From 6f3ece4c6f305fb190a8907b11f04ec26d369e7f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 04:24:03 +0000 Subject: [PATCH] =?UTF-8?q?feat(batch):=20the=20cortex=20member=20kind=20?= =?UTF-8?q?=E2=80=94=20separate=20records,=20rolling=20board,=20carry-forw?= =?UTF-8?q?ard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/.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 Claude-Session: https://claude.ai/code/session_011GD9gpi75AT2SgymYQyGiT --- AUTONOMY.md | 13 + agents/conductors/batch/AGENTS.md | 82 ++- agents/conductors/batch/_batch.py | 983 ++++++++++++++++++++++++++++-- agents/conductors/batch/packet.js | 28 +- skills/batch/batch.md | 32 +- tests/_cortex_board.py | 172 ++++++ tests/test_batch_kinds.py | 546 +++++++++++++++++ tests/test_cortex_conductor.py | 163 +---- 8 files changed, 1789 insertions(+), 230 deletions(-) create mode 100644 tests/_cortex_board.py create mode 100644 tests/test_batch_kinds.py diff --git a/AUTONOMY.md b/AUTONOMY.md index 716ed222..4f4556e8 100644 --- a/AUTONOMY.md +++ b/AUTONOMY.md @@ -401,6 +401,19 @@ relaxation above never operates and every batch returns parked questions. *Revert condition:* one escape traceable to a YELLOW reason this section let through restores the exact-set rule for batches. +**Which record — 2026-09-02.** A member reads **its own organ's** batch record: +`PyAutoMind/batches/.md` for a dev member, `PyAutoCortex/batches/.md` +for a science one (`batch plan --kind cortex` writes it). The two surfaces hold +separate records with separate `review-at:`s, so a member that read the other +organ's would be reading another shift's grant. The "no record → solo `--auto`" +rule above is unchanged for dev members and **inapplicable to a cortex member**: +a science member is never `--auto` — the human submits the run and rules on it, +so there is no autonomous acknowledgement for a grant to license. A Cortex record +therefore carries no `heart-ack:` and no `expected-effects:` at all (the Cortex's +own `batches/AGENTS.md` drops both: the Heart gates releases, not runs), and +**their absence there is never read as an unacknowledged RED** — the fields are +not missing, they do not exist on that schema. + ## Corrective-PR exception for Heart RED (human-authorized) Heart RED forbids commit, push and PR-open at every autonomy level (the levels diff --git a/agents/conductors/batch/AGENTS.md b/agents/conductors/batch/AGENTS.md index 1a9f169b..0f977619 100644 --- a/agents/conductors/batch/AGENTS.md +++ b/agents/conductors/batch/AGENTS.md @@ -110,8 +110,26 @@ pyauto-brain batch collect --evidence ev.json # PR state from this session pyauto-brain batch collect --fetch # laptop: `gh pr view` per PR pyauto-brain batch collect --evidence ev.json --apply # the one form that writes pyauto-brain batch collect --out report.md --json + +pyauto-brain batch plan --kind cortex [--cortex DIR] [--cortex-budget N] +pyauto-brain batch plan --kind cortex --apply --review-at \ + [--slot ] [--shift