Repository navigation
feat: cortex.py retire <project> --why "…" — a fourth project status - #16
Merged
Merged
Conversation
`projects.yaml` had a closed `active | dormant | planned` vocabulary, a parser and no writer, so a project that was over stayed dormant forever and the board had nowhere to send a human who wanted to end one. `status: retired` is the fourth value, and `retire` is the one verb that writes this file. It flips the row's `status:` and rewrites (or appends) its `note:` as `"retired <today>: <why>"` — two lines edited in place, every other byte of the file preserved, and the result re-parsed before it is kept, the original bytes restored if it does not read back clean. Three things it deliberately does not do. It does not delete the row: that row is the only record of where the project's data lives. It does not touch a phase or a ruling — `rulings/` is append-only and a change of status is not a rewrite of history. And it does not retire over live work: every state outside `accepted | rerun | dropped | planned` is an unfinished question, so the refusal names each `<phase> — <state>` and the human rules or drops them first. `planned` phases are unasked questions and may stay. Docs: REFERENCE.md gains the retirement paragraph under `projects.yaml` and a verb-reference entry; AGENTS.md lists the verb; the `projects.yaml` header comment carries the fourth value. The dashboards are regenerated against the Brain's paired change — every dormant row now shows a 📋 retire chip whose payload is this command. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYs4cX2wT5vsZScjLNLZif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
projects.yamlhad a closedactive | dormant | plannedvocabulary, aparser and no writer.
retiredis the fourth value, andretireis theone verb that writes this file.
PROJECT_STATUSESgainsretired;_finish_row's message lists allfour.
retire_project(root, key, why, today)— flips the row'sstatus:toretiredand rewrites (or appends) itsnote:as"retired <today>: <why>". Two lines edited in place; every other byte ofthe file is preserved; the result is re-parsed before it is kept and the
original bytes are restored if it does not read back clean.
--whythat isempty or holds a double quote (the file quotes with no escapes), a
projects.yamlthat does not already parse clean, and — the real guard —any project still holding a phase outside
accepted | rerun | dropped | planned, naming each<phase> — <state>.plannedphases are unasked questions and may stay.record of where a project's data lives, and
rulings/is append-only.cmd_retire+ aretiresubparser (project, required--why,--root,--today).projects.yamland a verb-reference entry; AGENTS.md lists the verb; the
projects.yamlheader comment carries the fourth value.
dashboard.md/dashboard.htmlregenerated against the Brain's pairedchange: every dormant row now carries a 📋 retire chip whose payload is
this command (7 chips, none on the
plannedrow).Tests
tests/test_cortex.py: 79 → 84 test functions, 122 passed. The flipand the appended note with every byte outside the two edited lines
identical; an existing
note:rewritten in place; the live-phase refusalnaming each phase and leaving the file untouched; unknown key, repeat and
bad
--why;checkclean afterwards; a CLI round-trip.Scratch-verified on a throwaway copy of the live tree:
retire concrflipsthe status, writes the note, leaves
checkclean, anddiffis exactlytwo lines;
retire euclidrefuses naming its livereadyphase.Merge order
Pairs with PyAutoLabs/PyAutoBrain#359. The
refreshcheck here rendersthe dashboard against PyAutoBrain
mainand is red until that PR merges —merge the Brain PR first, then re-run this check.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JYs4cX2wT5vsZScjLNLZif