Repository navigation
feat(cortex): a by-project check-in view and the two missing starting prompts #12
Description
Overview
Phase 3 (last) of the cortex-checkin epic. Phase 1 shed the review-slot and gate apparatus; phase 2 built the checkin door (pull → score → move → render → push → a minimal by-project summary). This phase finishes the sentence the original request asked for: "give me a summary of where every project is in terms of runs and what folders I should check out, and starting prompts to continue any individual project."
Today the dashboard and census are keyed by phase STATE, the Projects table omits local_path / mirror / ral_root, and each phase's ## Where to look bullets — the answer to which folder do I open — are parsed only to locate artefacts and never rendered. Two of the five starting prompts are also missing: "the results are good, file the ruling and open the next phase" and "rerun this".
Stacked on phase 2 (unmerged): branches cut from feature/cortex-checkin-p2-the-door in both repos; PRs target that branch and retarget to main as the stack merges.
Plan
- Render the
## By projectsection on the Cortex dashboard (md + html): one block per active project with its three paths, its phase counts, then each non-terminal phase with health, its## Where to lookbullets verbatim, and the copy-ready prompts for its state as chips. - Add
census --by-project, printing the same tree as text, and makecheckin's closing summary that same tree (replacing phase 2's minimal digest) — one builder, three renderings. - Add the two missing payload builders —
_next_phase_payload(accept → open phase N+1, honouringcortex.py new's own title-prefix convention and pre-filling from the epic ledger / an already-planned sibling phase) and_rerun_payload(rule rerun → move ready → submit → move submitted) — rendered as chips beside the existing rule prompt on the board and in the summary. - Add a
cortex.py checkrule for## Where to look, now that it is rendered rather than only parsed: a phase pastplannedmust name at least one real location. - Document the section, the two prompts and the new rule in
PyAutoCortex/REFERENCE.md. - Tests in both repos: the section, both payloads,
--by-project, a phase with no usable## Where to look, and the new check rule failing when tripped.
Detailed implementation plan
Affected Repositories
- PyAutoCortex (primary — the epic's home,
cortex.pycheck rule + REFERENCE.md + the regenerated board) - PyAutoBrain (
agents/conductors/cortex/_cortex.py— the renderer, census, checkin, payloads)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | main | clean |
| ./PyAutoCortex | main | clean |
Suggested branch: feature/cortex-checkin-p3-project-summary — cut from origin/feature/cortex-checkin-p2-the-door in both repos (stacked; PRs --base feature/cortex-checkin-p2-the-door).
Implementation Steps
PyAutoBrain/agents/conductors/cortex/_cortex.py— carry the bullets. Extract_where_bullets(mod, ph)fromwhere_paths()(the_where_to_lookgetter plus the older-checkout fallback), havewhere_paths()call it, and add"where": _where_bullets(mod, ph)to_phase_row(). Every renderer then has the bullets verbatim without re-reading the tree.census()— add aplannedbucket (sorted) so the by-project tree can render the state order the prompt asks for.SECTIONS/section_counts()are untouched: the board's counts strip stays the five it has.- The two payloads.
_next_phase_payload(r, c)— forawaiting-ruling/pulled/accepted: draft the accept body →cortex.py rule <rel> accept --body <file>, then eithermovean already-existing phaseN+1on (when the project already holds one — that is the ledger naming it) orcortex.py new <project> <slug> --phase <N+1> --title "<tail>"with the title-prefix rule stated inline (newwrites# <Project> — phase N:itself),--epicpre-filled from the phase's ownEpic:, then the launch lines._rerun_payload(r, c)— forawaiting-ruling/pulled/running:rule <rel> rerun --body <file>,move <rel> ready, the project's own submit line,move <rel> submitted --run <jobid>(one run per call).
Both stay short — a human pastes them into a fresh chat.
phase_chips(r, c)—(label, payload)for every prompt a phase's state has; the single place the board, the census tree and the check-in summary agree on which prompts a phase gets.project_groups(key, c)— that project's phases in state order (awaiting → live → ready → gated → planned), with accepted/dropped/rerun folded into the counts line.project_digest()— generalised: paths line, optional pull line (omitted bycensus), counts, then per phase the health/legs (when scored), the## Where to lookbullets verbatim, and the chips.checkin_summary()keeps using it;emit_by_project(c)prints it forcensus --by-project.render_dashboard()/render_dashboard_html()— a## By projectsection rendered from the sameproject_groups/phase_chips, placed immediately after the counts table and before## Awaiting ruling, with aSECTIONSentry (sourceprojects.yaml) so it links its source and joins the counts strip's index.build_parser()—census --by-project;main()dispatches it.PyAutoCortex/scripts/cortex.py— newcheckrule inphase_problems(): a phase whoseState:is notplannedmust carry at least one## Where to lookbullet that is not the template placeholder. The section is now rendered as the human's "which folder" answer, so a placeholder-only section is a hole exactly where a human is being asked to act.PyAutoCortex/REFERENCE.md— document the## By projectsection, the two new prompts and the new check rule.- Regenerate
dashboard.md/dashboard.htmlfrom inside the Cortex worktree with the Brain worktree's_cortex.py(same stacked branch), commit on the Cortex branch, and confirmdashboard --checkis current.
Testing
PyAutoBrain/tests/test_cortex_conductor.py: the## By projectsection renders one block per project with its three paths and its where-bullets;census --by-projectprints the same tree;_next_phase_payloadnames phase N+1 (both the "already planned" and the "new" branch, and the title-prefix note);_rerun_payloadcarries rule → ready → submit → submitted in that order; a phase whose## Where to lookholds only the placeholder renders without a where list and without crashing; the check-in summary carries the new chips.PyAutoCortex/tests/test_cortex.py: the new check rule passes on the skeleton and trips when a non-planned phase's## Where to lookis emptied to the placeholder.
Key Files
PyAutoBrain/agents/conductors/cortex/_cortex.py— renderer, census, checkin, payloadsPyAutoBrain/tests/test_cortex_conductor.py— contract testsPyAutoCortex/scripts/cortex.py— the newcheckrulePyAutoCortex/REFERENCE.md— the section, the prompts, the rulePyAutoCortex/dashboard.md+dashboard.html— regenerated
Original Prompt
Click to expand starting prompt
Cortex by project: the "where is everything, which folders" summary and the two missing starting prompts
Type: feature
Target: pyautocortex
Repos:
- PyAutoBrain
- PyAutoCortex
Themes: - mind-workflow
Difficulty: medium
Autonomy: safe
Priority: high
Status: draft
Consequence: judge
Witness: the regenerated Cortexdashboard.mdhas a## By projectsection (one block perstatus: activeproject, then a folded one-liner for dormant projects) that renders each project'slocal_path/mirror/ral_root, each non-dropped phase with State + health, the phase's## Where to lookbullets verbatim, and per phase the copy-ready prompt for its state, including two NEW ones: "accept → file and start the next phase" (wrapscortex.py rule <phase> accept --body …thencortex.py new <project> <slug> --phase N+1with the title-prefix rule from memory) and "rerun this phase" (rule … rerun --body …,move ready,move submitted --run);pyauto-brain cortex checkinprints the same by-project summary and prompts;pyauto-brain cortex census --by-projectexists; dashboard--checkcurrent; Brain + Cortex tests cover the section, both new payloads and a phase with no## Where to look
Review-minutes: 20
Unattended: ready
Epic: cortex-checkin
Phase: 3
Filed: 2026-09-03
Phase 3 of cortex-checkin. Branch from phase 2's branches if unmerged. Two
PRs (Brain renderer + census + checkin summary; Cortex docs/REFERENCE for the
new section and the two prompts, plus any check rule that ## Where to look
now needs, e.g. "every non-planned phase has at least one bullet").
By-project summary
Today every dashboard section and census are keyed by phase STATE
(SECTIONS in _cortex.py ~L231-253), the Projects table omits
local_path/mirror/ral_root, and ## Where to look is parsed
(where_paths ~L1231) only to locate artefacts, never rendered. Add:
## By projectin the dashboard (above the state sections or directly
below the header — pick the one that reads first on a phone and say why):
per active project, a header with the three paths, then its phases in
state order (awaiting-ruling, running, submitted, ready, gated, planned;
accepted/dropped folded into a count), each with health from the last
scoring, its## Where to lookbullets verbatim, and its prompt.census --by-projectprinting the same tree as text;checkinuses it for
its closing summary (replace phase 2's minimal version).
The two missing prompts
Dashboard rows already carry _ruling_payload (rule this),
launch_payload (submit + move), _live_payload (check jobs). Add:
_next_phase_payloadfor anawaiting-ruling(or freshlyaccepted)
phase: "the results are good — file the ruling and open phase N+1": the
rule … accept --body <file>line with a body stub, then
cortex.py new <project> <next-slug> --phase <N+1>(honour the title-prefix
and rerun-flow conventions in memoryreference_cortex_new_title_prefix_and_rerun_flow),
then the launch prompt for the new phase. Where the epic ledger names the
next phase's title, prefill it._rerun_payloadforawaiting-ruling/pulled/running: "rerun
this":rule … rerun --body <file>,move ready,move submitted --run,
with the phase's own submit command fromlaunch_payload.
Both render as chips beside the existing rule prompt and appear in the
by-project summary and in checkin's output. Keep the payload text short:
these are things a human pastes into a fresh chat, not scripts.
Activity
Jammy2211 commentedon Sep 4, 2026
Library PRs Created
Phase 3 is shipped to PR-open. Both branches are cut from
feature/cortex-checkin-p2-the-doorand target it; they retarget tomainas the stack merges.## By projectrenderer (md + html),census --by-project,checkin's closing summary,_next_phase_payload+_rerun_payload+ thephase_chipstable.## Where to look#13 — the## Where to lookcheckrule, REFERENCE.md, and the regenerated dashboard.Where
## By projectsits: first, immediately after the counts table and above## Awaiting ruling. The state sections are cross-project lists where every row has to be read to find out whose it is; this is the only section that answers "where is everything" a screen per project, and it opens with the folder paths. The counts table stays above it, so the urgency sections are one tap away by anchor.section_counts()is unchanged —board/_board.pyscrapes that table.The
checkrule added: a phase whoseState:is pastplannedmust carry at least one## Where to lookbullet that is not the template placeholder.plannedis exempt (there the placeholder is honest). Every phase in the tree already passes; the rule is a floor against a rendered hole. Consequence fixed in the same PR: a legacy-bornnewnow writes its--wherepath as the bullet, since it is bornready.Tests: Brain
test_cortex_conductor.py67 passed (13 new); full Brain suite 889 passed with 2 pre-existingtest_branch_sweepfailures that reproduce unchanged on the phase-2 base. Cortextest_cortex.py95 passed (2 new);cortex.py checkOK;dashboard --checkcurrent.Heart: RED at ship time, not acknowledged.
release validation FAILED (stage integrate)(red) andPyAutoArray: open PR 11d old(yellow) — release-chain facts about other repos; neither Brain nor Cortex is in that chain. PRs opened, nothing merged.Merge order for the epic's six PRs: PyAutoBrain#348 → PyAutoCortex#10 → PyAutoBrain#350 → PyAutoCortex#11 → PyAutoBrain#351 → PyAutoCortex#13. Brain before Cortex in each phase — the Cortex
dashboard_refresh.ymlrenders through PyAutoBrainmain.Jammy2211 commentedon Sep 4, 2026
Shipped
Phase 3 of the
cortex-checkinepic — the by-project summary and the twomissing starting prompts. This closes the epic: all three phases are on
main.5427234f56597b24f819622f1be4f3af2c0e01cc7ea86aa8bd64983b3820b148188400e29e1913a7Both merged to
mainon 2026-09-04, Brain before Cortex, after phases 1 and 2.GitHub retargeted both PRs to
mainas the phase below them merged.PyAutoBrain#351:
Brain Testsgreen on 3.12 and 3.13 (Docsis path-filteredand did not fire — the diff touches no docs path). PyAutoCortex#13's
refreshcheck was red on the documented Brain-main skew: that workflow renders the board
through PyAutoBrain
main, which did not yet carry this phase's renderer. It wasre-run once PyAutoBrain#351 was on
main(run33822978065, attempt 2) and wentgreen;
checkwas green throughout.Heart was RED at merge time with two reasons — "release validation FAILED
(stage integrate)" and "PyAutoArray: open PR 12d old" — both release-chain facts
about other repos, neither of which is in the release chain. Merged under an
explicit human acknowledgement.
Closed by
/prm.