Repository navigation
Description
Overview
The batch conductor is plan-only; both 2026-08-31 review packets were hand-built. This task ships pyauto-brain batch collect — the two-slot-batching epic's remaining review-side verb (queue.md #8): assert each member's delivery (a PR with a non-empty diff and checks that ran — green is not delivered), report not-delivered members loudly at the top, run failures-first, write/refresh the standalone HTML review packet in place, stamp the batch record, and close it from the human's review file (the only calibration the review-minute estimate ever gets). Built kind-neutral so Cortex phase 5 registers the science member kind without a rebuild. slice is out of scope and is re-filed as its own prompt at close-out.
Plan
- Add
collecttoagents/conductors/batch/_batch.py: read the batch record losslessly, resolve each member's prompt (Witness:),active.mdentry (three-pass match) and optional--evidenceJSON (filled from the GitHub MCP tools on the web;--fetchviaghon the laptop). - Score six legs (pr · diff · checks · green · witness · adversary) as PASS/FAIL/UNOBSERVABLE; health FAILED · NOT-DELIVERED · SUSPECT · HEALTHY · PENDING · MERGED, sorted failures-first; a self-run adversary leg is an absent leg (AUTONOMY leg 5).
- Emit the markdown report /
--json;--applyrenders the TEMPLATE.md packet (batches/packets/<slot>.html, sentinels + in-place per-member section refresh) and stamps the record (collected:,refreshed:,delivered:,packet:); a submitted review closes the record and freezes the packet. KINDS = {"dev": …}registry as the phase-5 extension point.- Doctrine: batch
AGENTS.md,skills/batch/batch.md,batch.sh,bin/pyauto-braindescription + agents-surface regen. - Tests:
tests/test_batch_collect.py(~25 cases).
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
- PyAutoMind (ledger only: prompt →
active/,active.md, completion record)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | claude/cortex-birth-phases-1-3-u9pq77 (= origin/main) | clean |
| ./PyAutoMind | claude/cortex-birth-phases-1-3-u9pq77 (= origin/main) | clean |
Suggested branch: claude/cortex-birth-phases-1-3-u9pq77 (web-github lane: the session branch is the PR branch; no worktree)
Implementation Steps
_batch.py:parse_member(split on—, maxsplit 3;--accepted; unparsable lines → notes), lossless line-indexedread_record,newest_slot,find_prompt/prompt_facts(basename across draft/active/complete),read_active/active_for(slug · prompt basename · "member ").- Evidence:
load_evidence(--evidenceJSON schema: prs[] with checks[], witness{holds}, adversary{ran, model, author_model}, flagged[], pending, summary),fetch_evidence(gh pr view --json …only whenghexists; else one pointer line). - Legs
LEGS = (pr, diff, checks, green, witness, adversary),health_of,HEALTHSsort order;score_dev/dev_blocks;KINDSregistry;collect()→ the decision dict;collect_report/emit/--json. - Packet:
packet.css/packet.jsassets ported from the 2026-08-31-pm reference with%%TOKEN%%substitution;packet_htmlwithpyauto:*sentinels,section_spandepth-aware in-place refresh, PENDING sections, archived sentinel-less packets degrade to member splices + a note. record_update(member outcome rewritten unless it starts with a ruling word;collected:once;refreshed:per apply;delivered:/packet:by key lookup; inserts before- notes:), rehearsed on a temp copy; close leg frombatches/reviews/<slot>.md(reviewed-at:,review-minutes-actual:,review:; packet never rewritten).- CLI:
verbplan|collect;--slot --evidence --fetch --apply --out --stamp; exit 0/1/2/4. - Doctrine + surface regen; tests.
Key Files
agents/conductors/batch/_batch.py— the conductor (plan + collect)agents/conductors/batch/packet.css,packet.js— packet assetsagents/conductors/batch/AGENTS.md,batch.sh,skills/batch/batch.md,bin/pyauto-brain— doctrine and surfacetests/test_batch_collect.py— the witnessagents/conductors/cortex/_cortex.py— the science collect this mirrors (phase 5 registers it as a kind)PyAutoMind/batches/AGENTS.md,batches/packets/TEMPLATE.md,batches/reviews/AGENTS.md— the schemas
Original Prompt
Click to expand starting prompt
PyAutoMind/draft/feature/pyautobrain/batch_conductor.md (Batch phase 2 — the batch conductor: plan, slice, collect). This issue covers the collect section only:
batch collect— the packetGather each member's outcome: what changed and why in one line, the witness and whether it holds, the diff size, which gate legs actually ran and what they returned, any flagged decision, and the links. Ordered failures-first.
Assert delivery rather than inferring it: a PR exists, its diff is non-empty, its checks ran. Green is not done — officially, a cloud session's green status "means the session started and exited without an infrastructure error. It does not mean the task in your prompt succeeded." A member that ends green with no PR is reported not delivered, loudly, at the top.
Record the human's actual review minutes per member when the slot ends. That is the only thing that will ever calibrate phase 0's estimate.
Done when
plan | slice | collectrun offline and stdlib-only, like every Brain entrypoint.
Full prompt: PyAutoMind draft/feature/pyautobrain/batch_conductor.md (moved to active/ on issue).
Activity
Jammy2211 commentedon Sep 2, 2026
Shipped
16e2a77(head11c319b; feature590e203+ tenant-firewall fix11c319b).pyauto-brain batch collect— six legs (pr · diff · checks · green · witness · adversary, PASS / FAIL / UNOBSERVABLE), one health word (FAILED · NOT-DELIVERED · SUSPECT · HEALTHY · PENDING · MERGED, failures first), the markdown report /--json,--applyrendering the standalone review packet in place by member section id and stamping the record, the close leg from a submitted review (fill, never overwrite),--evidence(web, via the GitHub MCP tools) /--fetch(laptop,gh),KINDSas Cortex phase 5's extension point. Doctrine in the batch conductor'sAGENTS.md("The collect recipe"),skills/batch/batch.md,batch.sh, the registry row. 32 tests; suite 776 green on 3.12 and 3.13.active.mdentry.collectverb only.sliceis re-filed asPyAutoMind/draft/feature/pyautobrain/batch_slice.md;queue.mdPyAutoBrain: full Stages 0-3 release-validation orchestrator (M4) #8 retires with this. Unblocks cortex-birth phase 5.complete/2026/09/batch-collect.md(close-out commit follows).Generated by Claude Code