Repository navigation
feat(cortex): 📋 retire chip on dormant rows, backed by a cortex.py retire door #358
Copy link
Copy link
Closed
Description
Overview
The Nothing-open table under Summary (#357) lists the projects with nothing open, most of them status: dormant. The human wants a copy chip beside each dormant row whose payload is pasted into the laptop chat to retire that project. There is no retire door today: projects.yaml status is a closed active | dormant | planned vocabulary with a parser and no writer, and the Brain conductor knows three states. So the chip needs a door behind it.
Plan
- PyAutoCortex: a fourth status
retired;cortex.py retire <project> --why "…"refuses while any phase is live (submitted / running / pulled / awaiting-ruling / ready / gated), line-edits the row'sstatus:andnote:in place (format preserved, no YAML library), re-parses to provecheckis clean. Rulings and the row itself are never deleted. Docs + tests. - PyAutoBrain:
STATUS_RANKgainsretired; the Nothing-open table gains a Retire column — a 📋 copy button on everydormantrow whose payload is the/cortexretire paste naming the project and the command; retired projects leave the table for a folded "N retired" line carrying the note. Skill appendix documents the verb. Tests; pages regenerated. - Ship Brain PR first, then the Cortex PR (its
refreshcheck renders against Brain main; re-run after).
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary) —
agents/conductors/cortex/_cortex.py,tests/test_cortex_conductor.py,skills/cortex/cortex.md - PyAutoCortex —
scripts/cortex.py,tests/test_cortex.py,REFERENCE.md,AGENTS.md,projects.yamlheader comment, regenerateddashboard.md/dashboard.html
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | main | clean |
| ./PyAutoCortex | main | clean |
Suggested branch: feature/cortex-retire-project-chip
Design decisions
- Retiring keeps the row:
projects.yamlis the only record of where a project's data lives. - Guard is "nothing live": states outside
RULED_STATES ∪ {planned}block it;plannedphases are unasked questions and may stay. - Chip on
dormantrows only; aplannedproject with nothing open has not started and is not offered retirement.
Implementation Steps — PyAutoCortex
PROJECT_STATUSES = ("active", "dormant", "planned", "retired");_finish_rowmessage lists four.retire_project(root, key, why, today)besidemove_phase: unknown / already-retired →CortexError; scan the project's phases with the loadercheckuses and refuse naming everyrel — stateoutsideRULED_STATES ∪ {"planned"}; line-edit the<key>:block —^ status: .*$→status: retired,note:→"retired <today>: <why>"(rewrite or append; quoted, no escapes); re-parse and requireproblems == [], restoring the original text on drift.cmd_retire+sub.add_parser("retire", …)withproject,--why(required),_common(dated=True).- Docs:
REFERENCE.mdvocabulary + "Retiring a project" paragraph;AGENTS.mdverb list if it enumerates commands;projects.yamlheader comment. - Tests beside
test_planned_is_a_legal_status:retiredlegal; flip + note with every other byte identical; refuses on a live phase naming it; allows planned + accepted; refuses unknown / already-retired;checkclean after; CLI round-trip.
Implementation Steps — PyAutoBrain
STATUS_RANK["retired"] = 3._retire_payload(key)beside_checkin_payload: the/cortexpaste — confirm nothing live, runpython3 scripts/cortex.py retire <key> --why "<one line on why>",check,dashboard --apply, push the ledger.- Nothing-open table in both twins: split
foldedinto retired vs rest. Fourth columnRetire: HTML<td><button class="copy" data-cmd="…" aria-label="Copy the retire prompt">📋 retire</button></td>on dormant rows, empty cell otherwise; markdown cellretire ↓with one_task_row(f"retire {key}", payload)per dormant project under the table (a<details>inside a table cell does not render on GitHub). Retired projects: one folded<details><summary>N retired</summary>…</details>after the table carrying each row's note. census --by-project"Dormant, nothing open:" printout gets a separate "Retired:" line.skills/cortex/cortex.md: appendix row forretire <project> --why "…"and a rule bullet — retiring never deletes a row or a ruling.
Tests — PyAutoBrain
- Fixture's dormant nothing-open project carries the chip (HTML
data-cmdcontainscortex.py retire <key> --why; markdown has the📋 retire <key>row); aplannedrow has an empty cell; aretiredrow is absent from the table, present in the "1 retired" fold with its note, ordered last. - Run with
PYAUTO_CORTEX=<worktree>/PyAutoCortex; full Brain suite once; Cortex suite plain.
Key Files
PyAutoCortex/scripts/cortex.py—PROJECT_STATUSES,_finish_row,move_phase(pattern),parse_projects/load_projects, parserPyAutoBrain/agents/conductors/cortex/_cortex.py—STATUS_RANK,by_project_keys,_checkin_payload,_html_task,_task_row, Nothing-open table in both twinsPyAutoBrain/skills/cortex/cortex.md— verb appendix
Original Prompt
Click to expand starting prompt
Next to dormant projects can you put a copy thing which I would put into claude to retire it
Prompt file: PyAutoMind/draft/feature/pyautobrain/cortex_retire_project_chip.md
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
Jammy2211 commentedon Sep 4, 2026
Both PRs are open.
a8a0c96):STATUS_RANK["retired"],_retire_payload, theRetirecolumn on the Nothing-open table in both twins, the retired fold, theRetired:census line, the skill appendix row and rule bullet. 85 conductor tests, full Brain suite 914 passed.cortex.py retire <project> --why "…"— a fourth project status PyAutoCortex#16 (3d6f512):status: retired,cortex.py retire <project> --why "…", REFERENCE/AGENTS/projects.yamlheader docs, regenerated dashboards. 122 tests passed.Merge the Brain PR first. The Cortex PR's
refreshcheck renders its dashboard against PyAutoBrainmainand stays red until #359 lands; re-run it afterwards.Scratch verification of the door on a throwaway copy of the live tree:
retire concr --why "…"flipped the status, wrote the note, leftcheckclean, anddiffwas exactly the two edited lines;retire euclidrefused, naming its livereadyphase; the repeat and the unknown key were refused too.One deviation from the plan, noted for review: the HTML chip is
class="copy text"rather than a bareclass="copy". The shared theme documents that the bare class is a fixed 2.6rem square that a worded label wraps and spills out of, and.textis its own answer for a chip with words on it. The click handler binds onbutton.copy, so the copy behaviour and the tests are unchanged.Jammy2211 commentedon Sep 4, 2026
Shipped
dormantrow (payload = the/cortexpaste naming the project and thecortex.py retire <key> --whycommand, thencheck,dashboard --apply, push);STATUS_RANKknowsretiredand retired projects fold to one "N retired" line carrying their note;census --by-projectprints a separate Retired line; the/cortexskill appendix documents the verb. 85 conductor tests, 914 full suite.status: retiredjoins the vocabulary;python3 scripts/cortex.py retire <project> --why "…"refuses while any phase is live (submitted / running / pulled / awaiting-ruling / ready / gated), refuses on an already-driftingprojects.yaml, and otherwise line-edits exactly the row'sstatus:andnote:("retired : "), re-parsing to provecheckis clean. Rulings and the row are never deleted. REFERENCE / AGENTS / header comment updated; 122 tests. Pages regenerated: seven retire chips, none on the plannedeuclid_dr1_prelim. Therefreshcheck was red until feat(cortex): 📋 retire chip on dormant Nothing-open rows #359 landed; re-run green, then merged.