Skip to content

feat(batch): the cortex member kind — separate records, rolling board, carry-forward (Cortex phase 5) #334

Closed

Description

@Jammy2211

Overview

Cortex-birth phase 5. The batch conductor gains its second member kind: cortex (science phases) beside dev (Mind prompts), registered on the KINDS extension point batch collect shipped with (#332). It folds in the phase-2 cortex conductor's plan/collect — nothing rebuilt — gives each surface its own batch record and review-at:, makes the Cortex packet a rolling board (a phase joins when its results are pulled; running members show a live strip and hold no review control), formalises carry-forward Cortex-side, and routes the AUTONOMY leg-4 record read per organ. It supersedes two-slot-batching phase 8 (batch_science_lane.md) and retires queue.md #9. Gates: Cortex phase 2 (shipped) and the collect verb (#332, shipped).

Plan

  • --kind dev|cortex|both, default from the lane (local-dev → both; cloud → dev only, reporting the Cortex ready count); _cortex.py imported lazily so dev verbs keep working with no Cortex checkout; _cortex stays Mind-free.
  • plan --kind cortex delegates to _cortex.census + _cortex.plan (ready + witness + budget + lane; no autonomy cap; no library-repo clash in either direction); --apply --review-at <ISO> writes PyAutoCortex/batches/<slot>.md in the Cortex schema (refused without --review-at; the human's).
  • collect --kind cortex: score_cortex/cortex_blocks over _cortex.score_phase/member_block; Cortex health vocabulary (HEALTHY · SUSPECT · FAILED · RUNNING); the HTML packet through the shared renderer into PyAutoCortex/batches/packets/, parametrised per organ (### follow-ups, (none) default, the four ruling verbs); record writes via the phase-2 apply (phase moves, refreshed: per pull) plus collected:/packet:/delivered:; a submitted review closes the batch.
  • Carry-forward: - carried: lines at close; the next plan --kind cortex --apply auto-includes still-live members with carried-from:.
  • Doctrine: AUTONOMY leg 4 (a member reads its own organ's record), skills/batch/batch.md, batch AGENTS.md; PyAutoCortex batches/AGENTS.md + packets/AGENTS.md; Mind: supersede phase 8, retire queue PyAutoBrain: Health Agent renders the unified dashboard card — M5 #9, carry-forward pointer.
  • Tests: tests/test_batch_kinds.py over a two-organ fixture.
Detailed implementation plan

Affected Repositories

  • PyAutoBrain (primary) — conductor + doctrine
  • PyAutoCortex — batches/AGENTS.md, batches/packets/AGENTS.md
  • PyAutoMind — ledger (prompt → active/, epic/queue/prompt edits, completion record)

Branch Survey

Repository Current Branch Dirty?
./PyAutoBrain claude/cortex-birth-phases-1-3-u9pq77 (= origin/main 16e2a77) clean
./PyAutoCortex claude/cortex-birth-phases-1-3-u9pq77 (= origin/main 3346da2) 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). Merge order: PyAutoBrain → PyAutoCortex → Mind ledger.

Implementation Steps

  1. _batch.py: load_cortex_conductor/cortex_context (lazy); KINDS["cortex"] = (score_cortex, cortex_blocks, cortex_claims); HEALTHS + RUNNING; leg iterators read s["leg_order"].
  2. organ_for(kind, root, slot) → home, packet/review paths, follow-ups heading (##/###), default decision (UNREVIEWED/(none)), lede; _members_js, render_member_section (no controls when reviewable is false), _fresh_packet, _callout, packet.js tokens (%%FOLLOWUPS_HEADING%%, %%DEFAULT_DECISION%%, reviewable-aware progress).
  3. plan_cortex + cortex_record_text/write_cortex_record (run stems, integer minutes, current state, em dash; rehearsed with check_problems); carried members (newest_closed_record, carried_members, carried-from:).
  4. collect --kind cortex: apply_collect_cortex = cx._apply_checked over the movers, then record_update_cortex (keys only; member lines untouched), then the shared packet path; carried_lines at close; --review-at re-declaration; --pull laptop-only.
  5. CLI: --kind, --cortex, --cortex-budget, --review-at, --shift, --pull; RC_NO_CORTEX = 5.
  6. Doctrine + tests.

Key Files

  • agents/conductors/batch/_batch.py, packet.js — the conductor and packet assets
  • agents/conductors/cortex/_cortex.py — folded in, unchanged
  • AUTONOMY.md, agents/conductors/batch/AGENTS.md, skills/batch/batch.md — doctrine
  • PyAutoCortex/batches/AGENTS.md, batches/packets/AGENTS.md — the Cortex schema
  • tests/test_batch_kinds.py — the witness

Original Prompt

Click to expand starting prompt

PyAutoMind/draft/feature/pyautocortex/cortex_batch_member_kind.md — "Cortex phase 5 — the second batch member kind: separate records, separate review-at, rolling board". Witness: pyauto-brain batch plan --kind cortex in a laptop session proposes only ready Cortex phases against a Cortex review-minute budget and writes PyAutoCortex/batches/<date>-<slot>.md; batch plan (dev) in the same checkout proposes no Cortex phase and no science prompt; batch collect --kind cortex adds a newly pulled member to an open Cortex packet without touching the Mind record. Task items 1–7: two member kinds; separate batch records; rolling board; carry-forward formalised Cortex-side; AUTONOMY leg 4 per organ; supersede two-slot phase 8 and retire queue #9; tests. Full text in the Mind (moved to active/ on issue).

Activity

  1. Jammy2211 commented on Sep 2, 2026

    @Jammy2211
    ContributorAuthor

    Shipped


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions