Public: anyone can read this; the crew can change it.
The week's subscription is spent by reset: the crew paces to it and pulls the next ranked issues in itself #8701
Check · Review · Land · Live done — Landed and live in production.
The crew now paces itself to the week: home shows an on-pace/ahead/behind sentence with efficiency beside it, and the autonomy tick releases gated work when it falls behind. The auto-release itself has no test, because the pure decision is covered but the `driveRepo` wiring is not. `tsc`, `scripts/gate.ts`, `design-lint` and the covering tests pass: `week`, `pacing`, the autonomy suites, `hot-read…
shipped production is serving it deploy 0b73bce
The crew now paces itself to the week: home shows an on-pace/ahead/behind sentence with efficiency beside it, and the autonomy tick releases gated work when it falls behind. The auto-release itself has no test, because the pure decision is covered but the driveRepo wiring is not. tsc, scripts/gate.ts, design-lint and the covering tests pass: week, pacing, the autonomy suites, hot-reads-indexed and the home tests. scripts/fast.ts named 1321 test files for this diff, so I ran those covering suites by hand instead of the full list.
What changed
- Pace and settings:
src/crew/week.tsis a pure decision. From the week's crew capacity, what is spent and the time to the reset, it works out a target burn per day and a status. "On pace" is within 5% of an even burn. Everything is in a plainWEEKobject (tolerance, reserve, floor slots) that a person can read. - Home sentence:
src/web/studio/week_line.tsdraws it under the figures, with the efficiency line next to it. It is empty while no account's week has a known cap. - Behind pace:
src/crew/autonomy.tshas a newreleaseForPace. If builders are idle and nothing is startable, the tick releases the lowest-numbered issue the Later gate alone holds. It does this once per tick, writes a log line, and leaves a comment on the issue saying why. The tick now returns"released"for that. - Ahead of pace:
repoPaceshrinks slots in proportion to how far ahead the crew is, never below one while the reserve holds. - Reserve: 10% of the week's crew capacity is kept for
/talkand a person's own requests. At that point slots go to zero until the reset. - Efficiency:
src/crew/week_read.tsreports cost per real landing and runs per real landing since the week opened. Carried pulls (already on the base) and pulls that added nothing are not counted. It uses existing indexes (pull_merged,run_agent_latest), so there is no migration. - Docs:
docs/features/week-pace.md. - Tests:
test/week.test.tscovers the same state giving the same decision, each status, the release conditions, the slot cut ahead of pace, the reserve wall, and the efficiency query.
What I chose not to do
- "Next ranked" is lowest issue number among the gate-only-held issues, not the map's priority order.
- The home sentence and efficiency cover the first autonomous repo, as the idle reason does.
- The home sentence uses zero idle slots and zero startable, so it names the status but never shows a release decision.
- Whether
/talkand a person's own runs actually draw from that reserve has not been checked. I did not trace how those runs are counted, so the reserve is a dollar wall on crew slots only.
To try it: open home on a forge whose subscription has a known weekly cap, or run bun test test/week.test.ts.
I could not make "behind pace" release bet work: bets don't exist in the repo yet (#8713 is still open), so it still releases the lowest-numbered issue only the Later gate holds. This push adds only a doc note; no code changed, so nothing was re-run.
docs/features/week-pace.md now has a short "Bets (#8713)" section. It says the gate-held-issue release is a stand-in. Once bets land, being behind should release the next scope of a backed bet, or offer the next bet to back, in its place. The change is one candidate read in releaseForPace (src/crew/autonomy.ts).
On appetites sitting inside the week's capacity: the pace decision already works out the week's crew capacity (capUsd less the 10% reserve). Bet shares can be taken from that once bets exist, so no bet's share can exceed it.
I did not add a bet interface with no implementation behind it, because it would be dead code. Wiring bets into the release is left for whoever builds #8713, or a follow-up issue once it lands.
Everything from the first push stands: the on-pace/ahead/behind sentence on home with efficiency beside it, the automatic release one issue at a time with a logged reason, slots coming down when ahead, and the reserve for /talk and people. src/crew/week.ts holds the plain-value settings and test/week.test.ts covers the decision.
Two gaps remain from before. The auto-release wiring in the tick has no test, since the decision itself is covered but the driveRepo path is not. I also did not trace how /talk and a person's own runs draw on the reserve, so it is a dollar wall on crew slots only.
To try it, open home on a forge whose subscription has a known weekly cap, or run bun test test/week.test.ts.
🤖 Generated with Claude Code
Changes needed, in one round:
- Both doors: the week line is on home only; there is no screen in src/tui/ (entered where AGENTS.md says) showing the pace sentence and efficiency. Add it, drawing from weekFor/weekEfficiency, gated like the page.
- Tests: the new behaviour in driveRepo (releaseForPace returning "released", logging, commenting on the issue) and repoPace slot-cutting have no test; both would pass unchanged if the wiring were deleted. Add a driveRepo test: behind, idle slot, nothing startable, a Later-gated issue -> released + comment; and an ahead case through repoPace. weekLine has no test either.
- Direction: the owner set PIPELINE FIRST (#6534, #6611, #5276, #3316, #6217...). This is a feature outside that list; say in the pull why it goes before them, or hold it.
- Perf/clean: repoPace now runs standings + grantedAccounts queries on every call (it is called often); compute once per tick or cache. Also the reserve is claimed for /talk and people but is only a wall on crew slots (author admits untraced); either wire it or reword the doc so it does not promise it. weekLine on home is computed with idle/startable 0, so it can never show a release; fine, but drop the unused-looking parameters via a narrower function.
- Preview: home at this head showed no week sentence (no known weekly cap there), so it was not demonstrated working; show it with a seeded cap or a test of the rendered line.
This round addresses four of juniper's five points and holds the direction question for you. The tsc, scripts/gate.ts and design-lint checks are clean. 91 tests pass across the week, pacing, autonomy, dashboard and home suites. I did not run the full suite; the forge's check does.
What changed
- Both doors:
- Shared sentence: the pace sentence and efficiency now come from one function, weekWords in src/crew/week_read.ts. Home (weekLine) and the terminal dashboard both draw from it.
- Terminal gating: in the terminal it sits in the admin-only figures block, next to the idle-reason line. That matches home, where the kpi figures are admin-only too.
- No new screen: I used the existing dashboard rather than a new palette entry, because the line belongs with the figures.
- Tests: the new
test/week-wiring.test.tsseeds a real subscription with a known weekly cap, and these tests fail if the wiring is removed.
- Release: when behind, with an idle slot and nothing startable, driveRepo returns "released". The Later-gate edge is removed and the "why" comment is on the issue.
- No release on pace: the gated issue stays gated when the crew is on pace.
- Ahead cut: repoPace goes from 4 to 2 slots when ahead and to 0 at the reserve.
- Both doors: the home line and the terminal dashboard print the sentence, and with no known cap there is none.
- Perf:
repoPaceno longer reads standings on every call. The week's figures are remembered per repository for 5 seconds, keyed on thenowpassed in. - Cleanup:
weekFordefaults itsseenargument, soweekLineno longer passes unused zeros. - Reserve: I reworded
docs/features/week-pace.mdso it no longer claims more than the code does. The reserve is a wall on crew slots (a tenth of the week's capacity), and/talkand a person's own runs are not otherwise counted against it. I did not wire it further.
Not done
- Direction (#3): I have not justified why this goes before the pipeline list (#6534 and the rest). That is for you to decide: hold this pull until the pipeline items land, or merge it. The change is self-contained and can wait.
- Preview (#5): the sentence is now shown by the home-line and terminal tests on a seeded cap. I did not re-check the live preview, which has no weekly cap, so home there will still be blank.
Still open from before
- Bets: gate-held release stands in until bets (#8713) exist.
- Remembered week: a subscription's week can lag by up to 5 seconds in production.
🤖 Generated with Claude Code
Earlier asks: both doors met (weekWords shared by home and the admin-only dashboard block; home's kpis region is admin-gated); wiring tests in test/week-wiring.test.ts would fail without the change; docs/features/week-pace.md carries the how-to, not README; the reserve doc no longer overclaims. Direction (pipeline first) is the owner's merge call; the pull is small and self-contained. Preview has no known weekly cap so the line is blank there; the seeded tests show it. Next two things: (1) Non-blocking: 'next ranked' is lowest number, not map priority; use the map's rank when #8713 or the priority order is readable. (2) Non-blocking: the 5s remembered week is a module-level Map keyed on now; evict old keys so it cannot grow across repos over a long uptime.
The crew now paces itself to the week: home shows an on-pace/ahead/behind sentence with efficiency beside it, and the autonomy tick releases gated work when it falls behind. The auto-release itself has no test, because the pure decision is covered but the
driveRepowiring is not.tsc,scripts/gate.ts,design-lintand the covering tests pass:week,pacing, the autonomy suites,hot-reads-indexedand the home tests.scripts/fast.tsnamed 1321 test files for this diff, so I ran those covering suites by hand instead of the full list.What changed
src/crew/week.tsis a pure decision. From the week's crew capacity, what is spent and the time to the reset, it works out a target burn per day and a status. "On pace" is within 5% of an even burn. Everything is in a plainWEEKobject (tolerance, reserve, floor slots) that a person can read.src/web/studio/week_line.tsdraws it under the figures, with the efficiency line next to it. It is empty while no account's week has a known cap.src/crew/autonomy.tshas a newreleaseForPace. If builders are idle and nothing is startable, the tick releases the lowest-numbered issue the Later gate alone holds. It does this once per tick, writes a log line, and leaves a comment on the issue saying why. The tick now returns"released"for that.repoPaceshrinks slots in proportion to how far ahead the crew is, never below one while the reserve holds./talkand a person's own requests. At that point slots go to zero until the reset.src/crew/week_read.tsreports cost per real landing and runs per real landing since the week opened. Carried pulls (already on the base) and pulls that added nothing are not counted. It uses existing indexes (pull_merged,run_agent_latest), so there is no migration.docs/features/week-pace.md.test/week.test.tscovers the same state giving the same decision, each status, the release conditions, the slot cut ahead of pace, the reserve wall, and the efficiency query.What I chose not to do
/talkand a person's own runs actually draw from that reserve has not been checked. I did not trace how those runs are counted, so the reserve is a dollar wall on crew slots only.To try it: open home on a forge whose subscription has a known weekly cap, or run
bun test test/week.test.ts.Closes #8695