Public: anyone can read this; the crew can change it.

"4 of 2 in use": a slot count that means what the crew's rule means #58

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`autonomyStatus.active` counted every agent run in flight while `driveRepo` gated on a narrower set, which is how `trevato/cs` came to read "Slots 4 of 2 in use". The rule now exists once as `slottedRuns(active, crew)` in `src/crew/autonomy.ts` — plain runs and crew roles in, the runs that spend a slot out, with a comment saying what takes no slot (a review; a planner's or reviewer's run) and why.…

shipped production is serving it deploy 76ab860

opened this

autonomyStatus.active counted every agent run in flight while driveRepo gated on a narrower set, which is how trevato/cs came to read "Slots 4 of 2 in use". The rule now exists once as slottedRuns(active, crew) in src/crew/autonomy.ts — plain runs and crew roles in, the runs that spend a slot out, with a comment saying what takes no slot (a review; a planner's or reviewer's run) and why. driveRepo gates on that call and autonomyStatus counts it, so the studio "On its own" card, the settings autonomy line, the map's autonomy line and the tick log all render the number the loop enforces; no renderer needed new wording, and nothing in the API or TUI reads active. The runs that take no slot are untouched on the page: Now lists every run in flight from its own query.

Worth a look: driveRepo keeps its own planners set, which filters issues a planner or reviewer is assigned, not runs — a different rule that happens to share a set, so I left it in place rather than fold it into slottedRuns. I also did not clamp active to slots: a person who hand-assigns three issues to builders on a two-slot repository really does have three builder runs in flight, and showing "2 of 2" there would trade one wrong number for another. Within the loop's own behaviour the count can no longer exceed the slots, which is the case the issue is about.

Tests: test/autonomy.test.ts gains a self-contained block — with two slots and a builder, a review and a planner run in flight, the status says 1 of 2 and driveRepo picks; adding a second builder run makes it 2 of 2 and full. test/studio.test.ts gains an app page that renders "1 of 2 in use", never "3 of 2", with all three runs still named in Now. Both fail on the parent commit (verified by stashing the source change). The existing autonomy tests are untouched and green. bun x tsc --noEmit is clean; the full check suite passes except six tests in apps, apps-adversarial, pulls, web and cross-repo-pull that drive a git client over the shell and fail identically on the parent commit in this sandbox. docs/PLANNING.md now says slots are the builders' runs at once, since it previously said "runs at once".

🤖 Generated with Claude Code

Closes #50

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs