Repository navigation
Description
Overview
Phase 3 of the mind-post-cortex epic (ledger:
draft/maintenance/pyautomind/mind_post_cortex_epic.md),
covering assessment gaps 1 and 2.
Mind's ledger stops at "issue open". library-pr: / workspace-pr: are written by
ship_library and read by /prm, but they are absent from the active.md schema in
REFERENCE.md — so nothing validates them and the dashboard renders only the free-text
status:. Separately, two libraries (PyAutoArray, PyAutoLens) have sat pending-release
since 2026-09-02 with no machine view except the Brain board's live gh search, and the
workspace tasks blocked behind those releases are gated only in prose.
This task schematises the PR keys, adds a drift check for them, and renders both the PR
links and the pending-release → release → unblocked-workspace chain on the Mind dashboard
— as a ledger view, never a live gh call at render time.
Plan
- Add
library-pr:,workspace-pr:(repeatable, single-line form preserved),
pending-release:andrelease-gate:to theactive.mdschema inREFERENCE.md,
pluspending-release:to the completion-record schema, with the rule that a row
whosestatus:declaresawaiting-merge/PR open/shippedmust carry at least
one*-pr:. - Enforce that rule in
scripts/lifecycle.py checkas a warning first (exit 0),
with the escalation rule to an error stated inREFERENCE.md; add tests. - Warn (never error) on a
complete/record whosepending-release:is still uncleared
after N days. - Brain
_intake.py: In-flight rows gain PR links (PyAutoBrain#343) and a
pending-releasebadge read from the ledger; a new Pending release section
under In flight groups merged-but-unreleased library PRs and, under each, the active
tasks whoserelease-gate:names that library. Empty section is omitted. - Skill wording:
ship_library/ship_workspacewrite the schematised keys;
/prmcarriespending-release:into the completion record;/review_release
step 5 (the "Live run" branch) is the step that clears it once a release has
actually published. - Fix the CI render defect phase 2 found:
dashboard_refresh.ymlruns--mind .from
inside PyAutoMind, so_intake._cortex_rootnever resolves the sibling PyAutoCortex
checkout and CI renders silently drop the Cortex-gate badges.
Detailed implementation plan
Work Classification
Library (organ source + docs; no workspace scripts).
Affected Repositories
- PyAutoMind (primary) —
REFERENCE.md,scripts/lifecycle.py,tests/ - PyAutoBrain —
agents/conductors/intake/_intake.py,tests/test_intake_dashboard.py,
skills/ship_library/,skills/ship_workspace/,skills/prm/ - PyAutoHeart —
skills/review_release/review_release.md(the clearing step)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoMind | main | clean |
| ./PyAutoBrain | main | clean |
| ./PyAutoHeart | main | clean |
Suggested branch: feature/mind-post-cortex-p3-pr-ledger
Worktree root: ~/Code/PyAutoLabs-wt/mind-post-cortex-p3-pr-ledger/
Branched from main, not from phase 2's feature/mind-post-cortex-p2-science-residue
(open, unmerged: PyAutoMind#391, PyAutoBrain#343, PyAutoCortex#8). A git merge-tree
against that branch is run in both repos before shipping and the result is reported in the
PR body.
Implementation Steps
PyAutoMind/REFERENCE.md— extend theactive.mdschema block with
- library-pr:,- workspace-pr:(both repeatable; the existing single-line
<url>, <url>form stays valid),- pending-release: <lib>@<pr-url>and
- release-gate: <lib>. Add the*-pr:-required rule and its warning→error
escalation rule. Add- pending-release:to the completion-record schema. Add a short
"the pending-release chain" subsection naming GitHub's label + the Hands release as the
source of truth, Mind as the link and gate, the dashboard section as the ledger view and
the Brain board's liveghquery as the fresh view, and/review_releasestep 5 as the
step that clears the key.PyAutoMind/scripts/lifecycle.py—registry_entries()gains a repeat-tolerant
multi-value collector; newpr_key_problems()(status declares merge-ready but no
*-pr:) andpending_release_problems()(unclearedpending-release:older than N
days on acomplete/record).cmd_checkprints these aswarning:lines and keeps
exit 0; hard drift keeps exit 1.PyAutoMind/tests/test_lifecycle_check.py— fixture rows for both warnings, the
single-line and repeated*-pr:forms, and a passing live-shaped ledger.PyAutoBrain/agents/conductors/intake/_intake.py—parse_registrycollects
repeated keys into amultimap and derivesprs/pending_release/
release_gate;censuscarries them ontoin_flightrows and builds a
pending_releaseaggregate fromactive.mdrows pluscomplete/records;
render_dashboardandrender_dashboard_htmlrender the PR links, the badge and the
new Pending release section.PyAutoBrain/agents/conductors/intake/_intake.py—_cortex_rootresolves the
Mind path before taking.parent, so--mind .from inside the Mind checkout finds
the siblingPyAutoCortex/.PyAutoBrain/tests/test_intake_dashboard.py— fixtures covering the PR column,
the badge, the Pending release section (present and omitted), and the--mind .
Cortex-root resolution.- Skill wording —
PyAutoBrain/skills/ship_library/reference.md,
skills/ship_workspace/reference.md,skills/prm/prm.md; and
PyAutoHeart/skills/review_release/review_release.mdstep 5.
Key Files
PyAutoMind/REFERENCE.md— theactive.md/ completion-record schemasPyAutoMind/scripts/lifecycle.py—registry_entries,cmd_checkPyAutoBrain/agents/conductors/intake/_intake.py—parse_registry,census,
render_dashboard,render_dashboard_html,_cortex_rootPyAutoBrain/skills/{ship_library,ship_workspace,prm}/— the writers and readersPyAutoHeart/skills/review_release/review_release.md— the clearing step
Testing
python3 -m pytest -q in PyAutoMind and PyAutoBrain, plus
python3 scripts/lifecycle.py check on the live ledger and a
TZ=UTC pyauto-brain intake --apply dashboard regeneration from the canonical checkouts.
Design guardrails (from the epic)
- Prefer the lean existing lever; do not build a fourth surface.
- Never call
ghat dashboard render time — the dashboard renders the ledger only. - GitHub's
pending-releaselabel and the Hands release stay the source of truth. - Keep the single-line
library-pr:form working; omit an empty Pending release section.
Original Prompt
Click to expand starting prompt
# Mind's PR ledger: schematise `library-pr:`/`workspace-pr:`, render PRs and the pending-release chain
Type: feature
Target: pyautomind
Repos:
- PyAutoMind
- PyAutoBrain
Themes:
- mind-workflow
Difficulty: medium
Autonomy: safe
Priority: high
Status: draft
Consequence: judge
Witness: `REFERENCE.md` "Registry entries → active.md" lists `library-pr:`, `workspace-pr:` and `release-gate:`; `python3 scripts/lifecycle.py check` fails on a fixture row whose `status:` says `awaiting-merge` but carries no `*-pr:` key and passes on the live ledger; the regenerated `dashboard.md` In-flight table has a PR column linking every `*-pr:` and a new "Pending release" section listing merged-but-unreleased library PRs and the active tasks whose `release-gate:` names them; Brain intake tests cover both renders
Review-minutes: 20
Unattended: ready
Epic: mind-post-cortex
Phase: 3
Filed: 2026-09-03
Phase 3 of `mind-post-cortex` — assessment gaps 1 and 2. Two PRs: Mind
(schema + drift check) and Brain (dashboard renderer).
## Gap 1 — the PR ledger is unschematised (S)
`library-pr:` / `workspace-pr:` are written by `ship_library` (`skills/ship_library/ship_library.md` ~L113)
and read by `/prm` (`skills/prm/prm.md` ~L69) but absent from the `active.md`
schema (`REFERENCE.md` ~L525-553); they are documented only for completion
records (~L631). So nothing validates them and the dashboard renders only the
free-text `status:`.
- Add `library-pr:`, `workspace-pr:` (URL, repeatable — a task may have several
per kind; keep the existing single-line form working) and `release-gate:`
(see gap 2) to the `active.md` schema in `REFERENCE.md`, with the rule:
a row whose `status:` contains `awaiting-merge`, `PR open` or `shipped`
must carry at least one `*-pr:`.
- `scripts/lifecycle.py check`: enforce that rule (warn → error after one
release cycle if you prefer; state which). Add a test.
- Brain `_intake.py` dashboard: In-flight rows get a **PR** column — one link
per `*-pr:` labelled by repo (`PyAutoFit#1555`), plus the `pending-release`
badge when the PR carries that GitHub label *as recorded in the ledger*
(never a live `gh` call at render time). Extend the dashboard fixture test.
- Ship skills: confirm `ship_library`/`ship_workspace` write the keys in the
schematised form; fix the wording in `skills/*/reference.md` if it differs.
## Gap 2 — no pending-release → release → unblocked-workspace chain (M)
Two libraries (PyAutoArray, PyAutoLens) have sat `pending-release` since
2026-09-02 (`epics.md` image-source-mappings status) and phase 3 was opened
ahead of the release by hand. The only machine view is the Brain board's live
`gh` search (`board/_board.py` ~L653-664).
Design (prefer the lean existing lever; do not build a fourth surface):
- **Source of truth stays GitHub** (the `pending-release` label on merged
library PRs) and Hands (the release that clears it). Mind holds only the
*link and gate*.
- `ship_library` writes `pending-release: <lib>@<pr-url>` into the task's
`active.md` row when it opens a pending-release PR; `ship_workspace` writes
`release-gate: <lib>` on a workspace task blocked behind an unreleased
library. `/prm` close-out carries `pending-release:` into the completion
record; the release path (`pre_build`/Hands post-publish or `/prm` on the
release) clears it — specify exactly which step and edit that skill.
- Dashboard: a **Pending release** section under In flight, grouped by
library: merged-but-unreleased PRs (from `active.md` rows and
`complete/` records whose `pending-release:` is not yet cleared) and, under
each, the active tasks whose `release-gate:` names it. Empty section is
omitted.
- `lifecycle.py check`: a `complete/` record with an uncleared
`pending-release:` older than N days is a warning, not an error.
Keep the Brain board's live query as the fresh view; the dashboard section is
the ledger view and must say so in one line.
Activity
prompt: route mind-post-cortex-p3-pr-ledger (#392) -> start_library
prompt: mind-post-cortex-p3-pr-ledger shipped — three PRs open (#392)
Jammy2211 commentedon Sep 3, 2026
Shipped to PR-open — three PRs, merge stays human
REFERENCE.mdschema (library-pr:,workspace-pr:,pending-release:,release-gate:) +lifecycle.py check/review_releasestep 6 — the step that clearspending-release:Suggested merge order: PyAutoMind#393 → PyAutoBrain#344 → PyAutoHeart#195 (the schema is what the other two point at). Nothing forces it technically.
Which step clears
pending-release:— and whypre_build(Hands) only asserts the label exists and dispatchesrelease.yml;/buildand/releasecoordinate and validate. Nothing in the organism removed the label at all./review_releasestep 5's "Live run" branch is the one step that establishes a release actually published, so a new step 6 there does the clearing (label off the merged PRs, then thepending-release:/release-gate:lines out of Mind). A release that was dispatched is not a release that published.Witness
REFERENCE.md"active.mdschema" lists all four keys ✅lifecycle.py checkfails on a fixture row withstatus: awaiting-mergeand no*-pr:, and passes on the live ledger ✅*-pr:labelled by repo; the Pending release section groups merged-but-unreleased PRs with the tasks whoserelease-gate:names them; empty section omitted ✅The one deliberate deviation from the gap-1 text: the PR-key rule is drift (exit 1), not a warning — it is a contradiction inside a single entry, and the witness asks for
checkto fail on it. The pending-release staleness check is the warning, andREFERENCE.mdstates that it must never escalate.Bonus
The CI defect phase 2 found is fixed in PyAutoBrain#344:
dashboard_refresh.ymlruns the renderer as--mind ., andPath(".").parentis.— so_cortex_rootlooked forPyAutoMind/PyAutoCortexand every CI render silently dropped the Cortex-gate badges. One line + a test; no workflow change needed.Tests
PyAutoMind
pytest -q→ 380 passed. PyAutoBrainpytest -q→ 867 passed, 1 failed —test_cortex_conductor::test_a_fixture_tree_finds_the_schema_its_checkout_ships, which fails identically onmaininside a task worktree (symlinkedPyAutoCortex, resolved-path compare) and passes in the canonical checkout.Merge-tree vs the open phase-2 branch
PyAutoBrain: CLEAN. PyAutoMind: conflicts only in the generated
dashboard.md/.html— and a control merge of that same phase-2 branch into plainorigin/maingives the identical conflict, so it is phase 2's rebase debt, not an interaction.Heart
RED at PR-open:
PyAutoLens: CI failure,release validation FAILED (stage integrate),PyAutoArray: open PR 11d old. None touches this diff. Not acknowledged for this task — merge needs your own call.Jammy2211 commentedon Sep 3, 2026
Shipped
Phase 3 of
mind-post-cortex— the Mind's PR ledger, its drift check, its dashboard render and the step that clears the pending-release chain.7d3ed60ffcb43755review_releasestep 6, the clearing stepb91c026aREFERENCE.mdnow schematiseslibrary-pr:/workspace-pr:(repeatable; the old<url>, <url>line still parses) pluspending-release: <lib>@<pr-url>andrelease-gate: <lib>, with two prose sections stating the contract once. GitHub's label and the Hands release stay the source of truth; Mind holds only the link and the gate.lifecycle.py check— drift (exit 1) on anactive.mdrow that declares open/shipped PRs and names none; warning (exit 0, never escalatable) on acomplete/record whosepending-release:is uncleared after 30 days.*-pr:as a repo-labelled link on the In-flight line, and a new Pending release section groups merged-but-unreleased library PRs with the tasks theirrelease-gate:blocks. Noghcall at render time. It also fixes the CI defect phase 2 found:--mind .from inside the Mind checkout resolved_cortex_roottoPyAutoMind/PyAutoCortex, so every CI render silently dropped the Cortex-gate badges./review_releasestep 6 is the one place that clears the chain — only for a live run whose release jobs succeeded. A release that was dispatched is not a release that published.One trap worth knowing: the new check went RED on #393's own CI, not on main —
euclid-cpu-two-stage-routelanded on main after the branch was cut and names its PR only inside thestatus:prose. It got itsworkspace-pr:key in16bdd13f;lifecycle checkisOKon the live ledger.REFERENCE.mdhad predicted exactly this: "the first failure can only be a new row."Record:
complete/2026/09/mind-post-cortex-p3-pr-ledger.md. Next in the epic is phase 4 (mind-post-cortex-p4-batch-fidelity, PyAutoBrain#345) — GitHub has already retargeted PyAutoMind#394 from this branch ontomain, where it now readsCONFLICTINGon the generated dashboard pages; take upstream and re-render.