Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ the `/<verb>` slash commands.
| `workspace` | The voice — the organism's expressive function: plan/survey workspace + HowTo example authorship (workspace\|howto registers) — WorkspaceDecision (never writes) | `bin/pyauto-brain workspace` |
| `eyes` | The perceptive function — the organism's sense of its own appearance: survey/review a visualization workspace's figure surface, critiques route to intake/start_dev — EyesSurvey/EyesReviewSurface (never renders, never edits) | `bin/pyauto-brain eyes` |
| `profiling` | The proprioceptive function — the organism's sense of its own effort: campaign/ingest/triage plans over the autolens_profiling workspace — ProfilingDecision | `bin/pyauto-brain profiling` |
| `cortex` | The learning function — where the organism finds out what is true: reason over PyAutoCortex (phases, gates, rulings), render its board, grade the gates, admit ready phases into a slot — never submits a run, never writes a ruling | `bin/pyauto-brain cortex` |
| `cortex` | The learning function — where the organism finds out what is true: reason over PyAutoCortex (phases, gates, rulings), render its board, and check in on the runs — pull, score against the pre-registered witness, move what came back to awaiting-ruling; never submits a run, never writes a ruling | `bin/pyauto-brain cortex` |
| `hygiene` | The maintenance function — the organism's sense of its own upkeep: code-quality debt (dev-loop cost + tidiness), delegating fixes — HygieneDecision | `bin/pyauto-brain hygiene` |
| `clone` | The Mitosis Agent: partition the reference assistant, analyze the domain, emit the CloneDecision; --apply --mode lightweight-seed delegates the seed birth to Build; 'clone sync' patches the reference's generic-file diff onto the born siblings (dry run by default; rejected hunks are a human decision) | `bin/pyauto-brain clone` |
| `build` | Coordinate execution: consult the vitals faculty, then delegate to PyAutoHands | `bin/pyauto-brain build` |
Expand Down
116 changes: 19 additions & 97 deletions agents/conductors/batch/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,12 @@ pyauto-brain batch collect --fetch # laptop: `gh pr view` per PR
pyauto-brain batch collect --integration # laptop: merge every member's head into one worktree root
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 <ISO> \
[--slot <YYYY-MM-DD-label>] [--shift <label>] [--stamp <ISO>] # writes the record
pyauto-brain batch collect --kind cortex [--pull] [--apply] [--review-at <ISO>]
```

`--kind dev | cortex | both` picks the member kind, and its default is the
**lane's**: `local-dev` offers `both`, a cloud session `dev` only — with the
Cortex ready count reported rather than hidden, as the lane rule says. `--cortex
DIR` names the checkout when it is not where `_cortex.resolve_root` finds it;
`--cortex-budget N` is the science slot's own review-minute budget (default
`--budget`). `plan --kind cortex --apply` is the only form that opens a Cortex
record, and it **refuses without `--review-at`**: the shift is dispatch →
`review-at:`, and that horizon is the human's to declare, never inferred.
`collect --kind cortex` scores the record's members and refreshes the packet;
`--pull` runs each project's own sync CLI first (laptop only), and `--review-at`
re-declares the record's horizon at a refresh. `--fetch` and `--evidence` are
dev-only — a science member's evidence is on disk, not on GitHub.
**One board: the development one.** The science board this conductor once
opened (`--kind cortex`) was retired on 2026-09-03 — 0 slots were ever opened
by it, 0 rulings came from its packets — and checking in on the science is
`pyauto-brain cortex collect --pull --apply` now, which needs no record at all.

`plan` is stdlib-only, offline and writes nothing. `collect` is the same by
default — it reads the newest batch record (`--slot` picks another; the
Expand All @@ -186,8 +173,7 @@ why it needs a stamp (`--stamp <ISO>`, else now).

Exit codes: **0** every member delivered · **1** a member needs the human
(FAILED, NOT-DELIVERED, SUSPECT, or still PENDING) · **2** usage · **4** no
Mind (no `batches/` at all) · **5** no usable Cortex tree (`--kind cortex` with
nothing to read).
Mind (no `batches/` at all).

## Running a batch by hand (there is no dispatcher yet, and that is fine)

Expand Down Expand Up @@ -239,12 +225,8 @@ what a dispatcher actually needs before writing one.
entries in place and stamps the page `refreshed:` — normally while the
human is already reading the finished members. A dev member without a
green-CI PR is not `delivered:`, and collect says so first and loudly.
Science members are their own batch: `hpc/sync pull` per project (or
`collect --kind cortex --pull`), then `pyauto-brain batch collect --kind
cortex --apply` against the Cortex record, so every pointer in the packet is
a local path (remote-only pointers exist only where the pull cannot fetch by
design, and say so; a mobile session cannot pull and says "run collect from
the laptop").
Science runs are not batch members at all: `pyauto-brain cortex collect
--pull --apply` is their check-in, and it has its own door.
9. The human reviews on the packet page — tick, choose, annotate, submit —
and the review lands as `batches/reviews/<date>-<slot>.md` (or they
dictate it in-chat; same review). Failures first, then `decision-taken`,
Expand Down Expand Up @@ -577,78 +559,18 @@ here too, over the phase-2 Cortex conductor's own `score_phase` and
`member_block` rather than a second collect. A third kind is a scorer, a block
renderer and a claim function — nothing else moves.

## Two kinds, two records

`dev` reads the Mind, `cortex` reads the Cortex, and the two vocabularies are
kept apart on purpose: they are different genres of work reviewed by different
acts.

| | `dev` | `cortex` |
|---|---|---|
| a member is | a Mind prompt | a Cortex phase |
| its record | `PyAutoMind/batches/<slot>.md` | `PyAutoCortex/batches/<slot>.md` |
| its legs | pr · diff · checks · green · witness · adversary | the six science legs of `cortex collect` |
| its health words | FAILED · NOT-DELIVERED · SUSPECT · HEALTHY · PENDING · MERGED | FAILED · SUSPECT · HEALTHY · **RUNNING** |
| the human's verbs | merge · tweak · reject · defer | accept · rerun · drop · leave-to-finish |
| the review lands as | a merge and follow-up prompts | a ruling (`cortex.py rule`) |

**Admission is the phase-2 rule, not the dev one.** A cortex member is `ready`,
carries a witness, fits the budget and matches the lane. The **autonomy cap is
never consulted** — a science member is supervised by definition, the human
submits the run and rules on it — and the one-member-per-library-repo clash
applies **in neither direction**: a science run claims no library worktree, so
it can neither be blocked by a dev member nor block one.

**The Cortex packet is a rolling board.** A dev batch is dispatched at once and
reviewed at once; a science phase **joins** its board when its results are
pulled. `collect --kind cortex` may therefore run any number of times in one
slot — each pull appends the member that just landed and leaves every other
section byte-identical. Members still `submitted`/`running` render as RUNNING
with their job ids and wall-vs-budget, and **hold no review control at all**:
no chips, no ruled box, `(none)` in the submitted review. There is nothing for
the human to say about a run that has not finished.

**The first review does not close the slot, either.** A dev batch is reviewed
once — `collected:` puts the button on the packet, and `batches/reviews/
<slot>.md` existing closes it outright (see "The close leg" above). A Cortex
slot stays open across as many sittings as it takes: the human rules on
whatever is reviewable whenever they come in, and every sitting after the
first lands as its own numbered file, `batches/reviews/<slot>-r<N>.md` (N ≥
2 — `-r1` is not a name, the first sitting is `<slot>.md`;
`PyAutoCortex/batches/reviews/AGENTS.md`). `organ_for`'s `review_path` always
names the **next free** one, so the packet's submit button (and the GitHub
new-file link it builds) never points a later sitting at an earlier one's
file. The record's `- review:` key **repeats**, one line per sitting, in the
order they happened — `collect` appends whichever of a slot's review files the
record does not already carry a line for, and never touches the ones it does.

**A rolling slot closes when nothing is left in a board state.** Not "a review
exists" — a Cortex record may carry several `- review:` lines and still be
open, because a later sitting can rule on members a pull only just landed.
Closed means: every member is either **ruled** (its review row says `ruled:
yes` — `_on_the_board` drops it from the score for good, so no later sitting
re-splices it even if the underlying phase file changes afterward) or
**carried** (a `- carried: <slug> — still <state> at review` line for it is
already IN THE RECORD, written by an earlier sitting). A member that is merely
`submitted`/`running`/`pulled`/`awaiting-ruling` **right now**, with no
`- carried:` line yet, still holds the slot open — carrying happens at a
sitting, not by inference from the tree. This is the same reading
`agents/conductors/batch/_status.py`'s `cortex_status` gives the status box on
both dashboards (`_cortex_slot_open` in `_batch.py` is the collect-side
replay of it), so a slot the box shows as still in flight is a slot `collect`
also still treats as open.

**Carry-forward is the mechanism that moves them on.** At close, every member
still `submitted`/`running` gets a `- carried: <slug> — still <state> at review`
line on the record, and the next `plan --kind cortex --apply` includes those
members automatically with a `- carried-from:` naming the record they came from.
The human never re-specifies them, and **a Cortex member never blocks a Cortex
review** (`PyAutoCortex/batches/AGENTS.md`).

**A Mind record never lists a Cortex member, and a Cortex record never lists a
dev one.** Each surface holds its own `review-at:`, so one record cannot carry
two shifts — and a member reading its organ's record at leg 4 (`AUTONOMY.md`,
"How a member learns the shift's grant") would otherwise read the wrong grant.
## One kind, one record

`dev` reads the Mind, and that is the whole roster. A second kind — `cortex`,
a science phase on a rolling board with its own record, packet, chips and
carry-forward — existed from 2026-08-31 to 2026-09-03 and was retired: 0 slots
were opened by the conductor, 0 rulings came from a packet, 0 partial reviews
were ever filed. What the human actually does with the science is check in on
the runs, which is `pyauto-brain cortex collect` (`agents/conductors/cortex/`).

The extension point above (`KINDS`) is what made that possible and is kept: a
member kind is a scorer plus a block builder plus a claim, and nothing about
the record, the packet or the renderer has to learn its vocabulary.

## Not built yet

Expand Down
Loading
Loading