Skip to content

feat(cortex): 📋 retire chip on dormant rows, backed by a cortex.py retire door #358

Closed

Description

@Jammy2211

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's status: and note: in place (format preserved, no YAML library), re-parses to prove check is clean. Rulings and the row itself are never deleted. Docs + tests.
  • PyAutoBrain: STATUS_RANK gains retired; the Nothing-open table gains a Retire column — a 📋 copy button on every dormant row whose payload is the /cortex retire 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 refresh check 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.yaml header comment, regenerated dashboard.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.yaml is the only record of where a project's data lives.
  • Guard is "nothing live": states outside RULED_STATES ∪ {planned} block it; planned phases are unasked questions and may stay.
  • Chip on dormant rows only; a planned project with nothing open has not started and is not offered retirement.

Implementation Steps — PyAutoCortex

  1. PROJECT_STATUSES = ("active", "dormant", "planned", "retired"); _finish_row message lists four.
  2. retire_project(root, key, why, today) beside move_phase: unknown / already-retired → CortexError; scan the project's phases with the loader check uses and refuse naming every rel — state outside RULED_STATES ∪ {"planned"}; line-edit the <key>: block — ^ status: .*$ → status: retired, note: → "retired <today>: <why>" (rewrite or append; quoted, no escapes); re-parse and require problems == [], restoring the original text on drift.
  3. cmd_retire + sub.add_parser("retire", …) with project, --why (required), _common(dated=True).
  4. Docs: REFERENCE.md vocabulary + "Retiring a project" paragraph; AGENTS.md verb list if it enumerates commands; projects.yaml header comment.
  5. Tests beside test_planned_is_a_legal_status: retired legal; flip + note with every other byte identical; refuses on a live phase naming it; allows planned + accepted; refuses unknown / already-retired; check clean after; CLI round-trip.

Implementation Steps — PyAutoBrain

  1. STATUS_RANK["retired"] = 3.
  2. _retire_payload(key) beside _checkin_payload: the /cortex paste — confirm nothing live, run python3 scripts/cortex.py retire <key> --why "<one line on why>", check, dashboard --apply, push the ledger.
  3. Nothing-open table in both twins: split folded into retired vs rest. Fourth column Retire: HTML <td><button class="copy" data-cmd="…" aria-label="Copy the retire prompt">📋 retire</button></td> on dormant rows, empty cell otherwise; markdown cell retire ↓ 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.
  4. census --by-project "Dormant, nothing open:" printout gets a separate "Retired:" line.
  5. skills/cortex/cortex.md: appendix row for retire <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-cmd contains cortex.py retire <key> --why; markdown has the 📋 retire <key> row); a planned row has an empty cell; a retired row 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, parser
  • PyAutoBrain/agents/conductors/cortex/_cortex.py — STATUS_RANK, by_project_keys, _checkin_payload, _html_task, _task_row, Nothing-open table in both twins
  • PyAutoBrain/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

https://claude.ai/code/session_01JYs4cX2wT5vsZScjLNLZif

Activity

  1. Jammy2211 commented on Sep 4, 2026

    @Jammy2211
    ContributorAuthor

    Both PRs are open.

    Merge the Brain PR first. The Cortex PR's refresh check renders its dashboard against PyAutoBrain main and 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, left check clean, and diff was exactly the two edited lines; retire euclid refused, naming its live ready phase; 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 bare class="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 .text is its own answer for a chip with words on it. The click handler binds on button.copy, so the copy behaviour and the tests are unchanged.

  2. Jammy2211 commented on Sep 4, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    • PyAutoBrain#359 — merged (1f425f0): the Nothing-open table under Summary gains a Retire column with a 📋 retire button on every dormant row (payload = the /cortex paste naming the project and the cortex.py retire <key> --why command, then check, dashboard --apply, push); STATUS_RANK knows retired and retired projects fold to one "N retired" line carrying their note; census --by-project prints a separate Retired line; the /cortex skill appendix documents the verb. 85 conductor tests, 914 full suite.
    • PyAutoCortex#16 — merged: status: retired joins 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-drifting projects.yaml, and otherwise line-edits exactly the row's status: and note: ("retired : "), re-parsing to prove check is clean. Rulings and the row are never deleted. REFERENCE / AGENTS / header comment updated; 122 tests. Pages regenerated: seven retire chips, none on the planned euclid_dr1_prelim. The refresh check was red until feat(cortex): 📋 retire chip on dormant Nothing-open rows #359 landed; re-run green, then merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions