diff --git a/AUTONOMY.md b/AUTONOMY.md index f33ce9b0..716ed222 100644 --- a/AUTONOMY.md +++ b/AUTONOMY.md @@ -372,8 +372,15 @@ So, **for a batch launch only**: intersects the run's own repos**. A new YELLOW elsewhere in the organism does not park it — the reason is out of the branch's blast radius, and legs 1-3 and 5 gate the branch itself. -- A reason **generated by an earlier member of the same batch** is named as such - in the batch record and does not park later members. +- A reason **generated by an earlier member of the same batch** does not park + later members — but that classification is not the run's to make + (2026-08-31): it is valid **only where the new YELLOW reason matches an + `expected-effects:` line the human wrote into the batch record at + dispatch** ("member X merges into PyAutoArray and may stale release + validation"). A run attributing a new reason to its sibling on its own + authority is an autonomous acknowledgement, which the hard invariants + forbid — the party with the incentive to ship does not get to write its own + licence. No matching line, the run parks. - The grant **expires with the shift** — that is, at the `review-at:` the human stated at dispatch (see the 2026-08-31 amendment above). It is not standing, not ambient, and not carried into the next batch. @@ -382,6 +389,15 @@ Unchanged: RED still parks at every level; YELLOW is still never acknowledged *autonomously* — the acknowledgement is a human act performed in the slot, and this section only defines how far it reaches. +**How a member learns the shift's grant — 2026-08-31.** Dispatch hands a member +only `/start_dev --auto`; nothing in the invocation names a shift. So the +mechanism is the record: **at its leg-4 check a member session reads +`PyAutoMind/batches/-.md`**, and the `heart-ack:` block there is the +shift's acknowledgement — verbatim, human-written, scoped to that shift. **A +member that finds no batch record treats itself as a solo `--auto` launch**: the +exact-set rule applies, and any new YELLOW parks it. Without this line the leg-4 +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. diff --git a/agents/conductors/batch/AGENTS.md b/agents/conductors/batch/AGENTS.md index 549db932..107b1ac3 100644 --- a/agents/conductors/batch/AGENTS.md +++ b/agents/conductors/batch/AGENTS.md @@ -129,21 +129,42 @@ what a dispatcher actually needs before writing one. schema in that folder's `AGENTS.md`, and write the members, the planned review-minutes, `review-at:` and the reason set **before** dispatching. That file is what makes the launch auditable afterwards. -5. **Dispatch**: paste each line the decision prints into **its own session**. - One session per member — they must not share one, because a single session +5. **Dispatch — `local-dev` members first** (2026-08-31): paste their lines + into laptop CLI chats while the laptop is still on, so RAL submissions + queue this evening — that is the priority use of the remaining laptop + hours. Cloud members follow, each line into **its own session**. One + session per member — they must not share one, because a single session would serialise them and carry one member's context into the next. -6. Go and do something else. +6. **Open the packet now** (2026-08-31): write the review page to + `PyAutoMind/batches/packets/-.html` with every member present + — overnight runs as PENDING entries — stamped `generated:`. The human + wakes to a live page; the morning collect fills it in. +7. Go and do something else. **At `review-at:` (or whenever they actually sit down):** -7. Read the PRs. Failures first, then anything labelled `decision-taken`, then - clean ones. For each: merge (`/prm `), or say one line of what you want - changed and let a session draft the follow-up prompt into `queue.md`. -8. Append the outcome to the batch record — `reviewed-at:` (when they really - sat down, which calibrates their own estimates), `delivered:`, and especially - **`review-minutes-actual:`**. That last number is the only calibration the - review estimate will ever get, and everything the planner does rests on it. -9. Plan the next batch, and declare the next `review-at:`. +8. **Collect** (2026-08-31): science members — `hpc/sync pull` per project, + 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"). Dev members — the PR + number and whether every check ran green; no green-CI PR, not + `delivered:`. Fill the PENDING entries, stamp the page `refreshed:` — this + normally happens while the human is already reading the finished members. +9. The human reviews on the packet page — tick, choose, annotate, submit — + and the review lands as `batches/reviews/-.md` (or they + dictate it in-chat; same review). Failures first, then `decision-taken`, + then clean. Act on it member by member: merge (`/prm `) and write + science rulings into the project ledgers; tweaks become follow-up prompts + drafted for them at the **top of `queue.md`**; rejects go to + `condemned.md`. **Follow-ups are enacted in the next batch — a review + never executes its own follow-ups, and an open follow-up never holds the + next dispatch** (2026-08-31). +10. Close the batch record — `reviewed-at:` (when they really sat down, which + calibrates their own estimates), `delivered:`, `packet:`, `review:`, and + especially **`review-minutes-actual:`**. That last number is the only + calibration the review estimate will ever get, and everything the planner + does rests on it. +11. Plan the next batch, and declare the next `review-at:`. **The one leg you must not skip.** A batch launch requires the independent adversary (`AUTONOMY.md` leg 5). Until `batch collect` exists, run it by hand diff --git a/skills/batch/batch.md b/skills/batch/batch.md index e9d9e1ba..796c0e6a 100644 --- a/skills/batch/batch.md +++ b/skills/batch/batch.md @@ -54,49 +54,91 @@ In order: 1. Consult vitals (`bin/pyauto-brain vitals`). If Heart is YELLOW, **ask the human to acknowledge the reason set for this shift** and record it verbatim. You may not acknowledge it for them, and a set carried from an earlier batch - is void. + is void. **Write `expected-effects:` lines with them** (2026-08-31): one line + per member with reach, naming what it may legitimately change in the + organism's health ("member X merges into PyAutoArray and may stale release + validation") — ask the human for these whenever a member merges into a + library; they are the ONLY thing a later "generated by an earlier member" + YELLOW classification may match against (`AUTONOMY.md`, leg 4). 2. Write `PyAutoMind/batches/-.md` from the schema in that - folder's `AGENTS.md` — members, planned review-minutes, the reason set and + folder's `AGENTS.md` — members, planned review-minutes, the reason set, `expected-effects:` and **`review-at:`** — **before** any session starts. That file is what makes the launch auditable. `review-at:` is when the human expects to be back, and it is where the grant expires; **if they did not say, ask before dispatching.** It is the one thing only they know — never infer it from a schedule, a previous batch, or the time of day, and do not dispatch without it. 3. Start one session per member, each carrying exactly - `/start_dev --auto`. Spawn them if this harness can; otherwise hand + `/start_dev --auto` — nothing more: the batch record is what informs a + member of the shift's grant (it reads it at leg 4), not the dispatch line. Spawn them if this harness can; otherwise hand the human the lines to paste. **One session per member, never shared**: a shared session serialises them and carries one member's context into the - next. -4. Confirm what was dispatched, and stop. Do not follow the runs. - -## When they come back - -Read the PRs. Order: **failures first, then anything labelled `decision-taken`, -then clean.** For each, offer three things and do the one they pick: - -- **merge** — `/prm `; -- **tweak** — they say one line; *you* draft the follow-up prompt and put it at - the top of `queue.md`. They should never have to write a prompt file. -- **reject** — route it to `condemned.md`. - -Then append the outcome to the batch record: `reviewed-at:` (when they actually -sat down — the calibration of their own `review-at:` estimate), `delivered:` -(see below) and **`review-minutes-actual:`**. That last number is the only -calibration the review estimate will ever get, so ask for it if the human does -not volunteer it. + next. **`local-dev` members go first** (2026-08-31): they are pasted into + laptop CLI chats and their RAL submissions queue while the laptop is still + on — the priority use of the remaining laptop hours is getting cluster + queues running; cloud members follow, they do not need the laptop. +4. **Open the packet at dispatch** (2026-08-31): write the review page to + `PyAutoMind/batches/packets/-.html` with every member present — + dev members as stubs, overnight runs as **PENDING** entries — and stamp it + `generated:`. The human wakes to a live page, not a blank; the morning + collect fills it in. +5. Confirm what was dispatched, and stop. Do not follow the runs. + +## When they come back — collect, review, close (2026-08-31) + +**Collect first, before the human reads anything.** + +- **Science members end at pulled results.** Step 0 is each project's + `hpc/sync pull`, so every run output the packet cites is on the laptop — + these are evolving projects the human stays in the loop on, and the loop + runs through their own disk. Every "where to look" pointer in the packet is + a **local path**; a pointer may stay remote only when the pull cannot fetch + it by design, and must say so. A mobile session cannot pull: it says "run + collect from the laptop" rather than emitting a remote-only packet. +- **Dev members end at a PR with CI green.** The packet states, per dev + member, the PR number and whether **every check ran and ran green** — a + member without a green-CI PR is not `delivered:`, however clean its diff. +- **Fill the PENDING entries.** The packet was written at dispatch; the + morning collect replaces each PENDING member with its readout and adds a + `refreshed:` stamp. This normally happens while the human is already + reading the finished members. **Before reading any PR from a batch, the independent adversary leg must have run** (`AUTONOMY.md` leg 5): `bin/pyauto-brain review --task --witness "" --adversary`, **in a session using a different model -from the one that wrote the branch**. A self-run adversary leg is an absent leg, -not a weak one, and recording it as run is a false ledger row. If it has not -run, say so rather than reviewing as though it had. +from the one that wrote the branch**. A self-run adversary leg is an absent +leg, not a weak one, and recording it as run is a false ledger row. If it has +not run, say so rather than reviewing as though it had. + +**Then the human reviews — on the packet page, not in the chat.** Order: +failures first, then anything labelled `decision-taken`, then clean. They tick, +choose and annotate each member on the page and submit; the submission lands as +`PyAutoMind/batches/reviews/-.md` (or they dictate the same +content in-chat — both are the same review). When they say the review is done, +read that file and act on it, member by member: + +- **merge** — `/prm `; for a science member, write the ruling into the + project's own ledger (DECISIONS, harvest table, results summary) verbatim. +- **tweak** — their one line becomes a follow-up prompt *you* draft, placed at + the **top of `queue.md`**. They never write a prompt file. +- **reject** — route it to `condemned.md`. + +**Review closes the batch; follow-ups never block the next one** (2026-08-31). +Every tweak and follow-up is *queued*, enacted in the next batch the human +launches — it is never executed inside the review, and an open follow-up is +never a reason to hold the next dispatch. The batch is complete when: accepted +PRs are merged, science rulings are in their ledgers, follow-ups sit at the top +of `queue.md`, the packet page is archived in `batches/packets/`, and the batch +record carries `reviewed-at:` (when they actually sat down — the calibration of +their own `review-at:` estimate), `delivered:` (see below), `review:` (the +review file's path) and **`review-minutes-actual:`**. That last number is the +only calibration the review estimate will ever get, so ask for it if the human +does not volunteer it. **`delivered:` is not "green".** A cloud session's green status means it exited without an infrastructure error — not that the task succeeded. A member counts -as delivered only with a PR that has a non-empty diff and checks that ran. A -member that ended green with no PR is reported **not delivered**, loudly, at the -top. +as delivered only with a PR that has a non-empty diff and checks that ran green. +A member that ended green with no PR is reported **not delivered**, loudly, at +the top. ## Never @@ -108,3 +150,5 @@ top. - Present the proposal as a schedule. The schedule may carry the timing; it never carries the authority. - Dispatch without a `review-at:` in the batch record, or invent one for them. +- Execute a review follow-up inside the review, or hold the next batch waiting + on one — follow-ups go to the top of `queue.md` and run in the next batch.