Skip to content

feat: cortex.py retire <project> --why "…" — a fourth project status - #16

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cortex-retire-project-chip
Sep 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/cortex-retire-project-chip

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

What changed

projects.yaml had a closed active | dormant | planned vocabulary, a
parser and no writer. retired is the fourth value, and retire is the
one verb that writes this file.

  • PROJECT_STATUSES gains retired; _finish_row's message lists all
    four.
  • retire_project(root, key, why, today) — flips the row's status: to
    retired and rewrites (or appends) its note: as
    "retired <today>: <why>". Two lines edited in place; every other byte of
    the 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.
  • It refuses: an unknown key, an already-retired row, a --why that is
    empty or holds a double quote (the file quotes with no escapes), a
    projects.yaml that does not already parse clean, and — the real guard —
    any project still holding a phase outside
    accepted | rerun | dropped | planned, naming each <phase> — <state>.
    planned phases are unasked questions and may stay.
  • The row, its phases and its rulings all stay. The row is the only
    record of where a project's data lives, and rulings/ is append-only.
  • cmd_retire + a retire subparser (project, required --why,
    --root, --today).
  • 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.
  • dashboard.md / dashboard.html regenerated against the Brain's paired
    change: every dormant row now carries a 📋 retire chip whose payload is
    this command (7 chips, none on the planned row).

Tests

tests/test_cortex.py: 79 → 84 test functions, 122 passed. The flip
and the appended note with every byte outside the two edited lines
identical; an existing note: rewritten in place; the live-phase refusal
naming each phase and leaving the file untouched; unknown key, repeat and
bad --why; check clean afterwards; a CLI round-trip.

Scratch-verified on a throwaway copy of the live tree: retire concr flips
the status, writes the note, leaves check clean, and diff is exactly
two lines; retire euclid refuses naming its live ready phase.

Merge order

Pairs with PyAutoLabs/PyAutoBrain#359. The refresh check here renders
the dashboard against PyAutoBrain main and 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

`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
@Jammy2211
Jammy2211 merged commit 3e797e5 into main Sep 4, 2026
2 of 3 checks passed
@Jammy2211
Jammy2211 deleted the feature/cortex-retire-project-chip branch September 4, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant