Repository navigation
feat(batch): the cortex member kind — separate records, rolling board, carry-forward (Cortex phase 5) - #335
Conversation
…, carry-forward
Cortex-birth phase 5. The batch conductor gains `--kind dev|cortex|both`
(default from the lane: local-dev offers both, a cloud session dev only and
reports the Cortex ready count). `plan --kind cortex` folds in the phase-2
cortex conductor's census + plan (ready + witness + budget + lane; no autonomy
cap, no library-repo clash in either direction) and `--apply --review-at`
opens `PyAutoCortex/batches/<slot>.md` in the Cortex schema — refused without
the human's review-at, rehearsed with the Cortex's own check. `collect --kind
cortex` scores members through `score_phase`/`member_block` into the shared
kind-neutral packet: Cortex health words (HEALTHY · SUSPECT · FAILED ·
RUNNING), the four ruling verbs, `###` follow-ups, RUNNING members with no
review control; phase moves and `refreshed:` lines through the Cortex apply,
collect keys only on the record, the packet spliced in place. Carry-forward:
`carried:` lines at close, `carried-from:` on the next record. `_cortex.py`
is imported lazily and unchanged (Mind-free by design).
Doctrine: AUTONOMY leg 4 (a member reads its own organ's record), batch
AGENTS.md ("Two kinds, two records"), skills/batch/batch.md (the Cortex
recipe). 21 tests; the cortex board fixture builder shared as
tests/_cortex_board.py.
Closes #334.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GD9gpi75AT2SgymYQyGiT
|
Autonomous-ship gate — leg 5, independent adversary (AUTONOMY.md, review faculty step 2b). Reader: Sonnet (a different model from the Opus implementer and the Fable architect). Surface: Witness — falsified and holds, by running it: Dispositions (one per lifted claim):
Adversarial inputs: Verdict: CLEAN. No must-fix findings. Tests 797 passed; tenant firewall OK. Heart at ship: YELLOW 65 (manifest drift 1 mismatch; CI status unavailable in the web container — measurement blindness), acknowledged under the human's standing authorisation for the cortex-birth epic and recorded on the Mind Generated by Claude Code |
Closes #334. PyAutoMind prompt:
active/cortex_batch_member_kind.md— cortex-birth phase 5. Gates: Cortex phase 2 (shipped) and thecollectverb (#332, shipped). Companion doctrine PR in PyAutoCortex (batches/AGENTS.md,packets/AGENTS.md); merge this one first.Summary
The batch conductor gains its second member kind.
--kind dev|cortex|both, defaulting from the lane:local-devoffers both, a cloud sessiondevonly and reports the Cortex ready count. The phase-2 cortex conductor is folded in, not rebuilt:_cortex.pyis imported lazily by file location and is unchanged (it stays Mind-free for the Cortex's owndashboard_refresh.yml).plan --kind cortex—_cortex.census+_cortex.plan: ready + witness + budget + lane, no autonomy cap, no library-repo clash in either direction (a science run claims no library worktree). Launch lines printed, never executed.--apply --review-at <ISO> [--slot] [--shift] [--stamp]opensPyAutoCortex/batches/<slot>.mdin the Cortex schema — refused without--review-at(the shift is dispatch → review-at, and it is the human's), refused on an existing slot, rehearsed with the Cortex's owncheckon a copy.collect --kind cortex— the rolling board.score_cortex/cortex_blocksregistered asKINDS["cortex"]overscore_phase/member_block; the Cortex health words (HEALTHY · SUSPECT · FAILED · RUNNING), the four ruling verbs,###follow-ups,(none)default; a RUNNING member renders a live strip and no review control, excluded from the progress count. Phase moves andrefreshed:lines go through the Cortex's_apply_checked; the record gets collect keys only (member state column never touched); the packet is spliced in place through the shared renderer, parametrised per organ. After the moves the board is re-scored so a member the apply just delivered gets its review controls in the same packet. May run any number of times per slot; ruled members and every other section stay byte-identical.--pulllaptop-only;--fetch/--evidencedev-only;--review-atre-declares the horizon at a refresh.- carried: <slug> — still <state> at reviewper still-live member; the nextplan --kind cortex --applyincludes them at their current state with- carried-from:— the human never re-specifies them. Absorbsqueue.mdRelocate the Health Agent into PyAutoBrain (canonical home) #2's science side.AUTONOMY.mdleg 4 ("Which record — 2026-09-02": a member reads its own organ's record; "no record → solo--auto" unchanged for dev, inapplicable to cortex). BatchAGENTS.md("Two kinds, two records",--kindunder Running, exit 5).skills/batch/batch.md(the Cortex recipe, two records / tworeview-at:s).Two decisions
heart-ack:/expected-effects:on a Cortex record. The Cortex's ownbatches/AGENTS.mddrops them (the Heart gates releases, not runs; no autonomy leg to license) and a science member is never--auto, so nothing reads them — the prompt'sheart-ack: n/a (cortex)wording is overridden by the organ's schema, and their absence is never read as an unacknowledged RED (AUTONOMY.md says so).(none); carry-forward, not an unclickable leave-to-finish, moves it to the next board.Changes
agents/conductors/batch/_batch.py(+926/−57),packet.js(three token-driven edits: follow-ups heading, default decision, reviewable-aware progress).tests/test_batch_kinds.py(21 tests),tests/_cortex_board.py(the cortex board fixture builder, lifted out oftest_cortex_conductor.pyunchanged in behaviour).AUTONOMY.md,agents/conductors/batch/AGENTS.md,skills/batch/batch.md.API Changes
New flags on the batch conductor:
--kind,--cortex DIR,--cortex-budget N,--review-at ISO,--shift LABEL,--pull;--slot/--apply/--stampaccepted onplanonly with an explicit--kind cortex; exit code 5 = no usable Cortex tree. Devplan/collectbehaviour unchanged._cortex.pyunchanged.Verification
python3 -m pytest -q -n auto tests→ 797 passed (776 before). Tenant firewall OK.plan --kind cortexreports the ready count and plans nothing;--lane local-devproposes only ready phases (none today); devplanproposes nophases/path; both trees untouched.plan --kind cortex --apply --review-at … --slot 2026-09-02-test→ record written,cortex check: OK;collect --kind cortex --applyon the four awaiting-ruling phases → a 60 KB standalone packet; second apply: record byte-identical, packet differs by the stamp only, tree still checks.2026-08-31-pm: report-only writes nothing;--applyleaves record and archived packet byte-identical, names the three already-ruled members.active.mdentry.🤖 Generated with Claude Code
https://claude.ai/code/session_011GD9gpi75AT2SgymYQyGiT
Generated by Claude Code