Public: anyone can read this; the crew can change it.
The week's pacing shows the polish share, a stored setting that starts at 10% #8879
Check · Review · Land · Live done — Landed and live in production.
The polish share is a stored per-repository setting. It starts at 10% and accepts 0–50. The week page and the `week` tool show polish spent against it, and dispatch stops picking polish issues once polish is over.
shipped production is serving it deploy eb43263
The polish share is a stored per-repository setting. It starts at 10% and accepts 0–50. The week page and the week tool show polish spent against it, and dispatch stops picking polish issues once polish is over.
tsc, scripts/gate.ts, scripts/design-lint.ts, test/mcp-size.test.ts and the week and small-share tests all pass, as does the new test/polish-share.test.ts. I did not run the full suite; the forge's check does that on push.
What changed
- Setting: a new
repo.polish_sharecolumn (additive migration, pinned), saved throughupdateRepoSettingsand recorded in the settings trail. The action refuses anything that isn't a whole number 0–50. The setting is one line on Settings under "Branch and gates", with its reason beside it. - Pacing:
src/crew/small_share.tsaddsisPolish,polishSpendandpolishWords. Polish is an issue labelledpolishor in the small-fixes lane. Polish is under its share when its agent spend is below the share's percent of all agent spend. Nothing spent yet counts as under, unless the share is 0. - Week page and tool: the week page has a "Polish this week" line, shown even before a retro exists. The
weektool returns the same figures as apolishobject, so there is no new tool. - Dispatch:
inSlotOrderinsrc/crew/autonomy.tsdrops ready polish issues while polish is over. It takesnow, so it runs on a fake clock. The existing small-issue slot cap still applies on top. - Docs: I added the share to
docs/features/bugs.md, which listed it as "not yet built".
Choices
- The window is a rolling seven days before
now, not the weekly-reset window, so it works when no reset is known. - Issues the owner raised, ranked or put first are never held back, which matches how they already skip the small cap.
- Spend is
run.cost_usdfor agent runs.
Not done: there is no MCP or API setter for the share, only the settings page and the action.
Tests: the new tests cover a $1 of $20 hand calculation, validation, the settings form, and dispatch on a fake clock (picks when under, skips when over, picks again eight days later). They also cover the small-fixes lane and the owner-raised exception, and the week page and tool output.
To try it: open /<owner>/<repo>/settings, change Polish share, then open /<owner>/<repo>/week. To run the new tests: bun test test/polish-share.test.ts.
I merged main into the branch, resolved the two conflicts, and pushed. tsc and scripts/gate.ts are clean, and the polish-share, small-share, next-up, MCP next-up, week and MCP-size tests pass (50 tests, 0 failures). I did not run the full suite; the forge's check does that on push.
src/crew/small_share.ts:mainhad movedroadmapIssuesout of this file. I dropped my copy of it and kept the polish additions:isPolish,polishSpend,polishWordsand the share bounds.src/crew/autonomy.ts: I tookmain'sinSlotOrder, which is now exported and sorts withpickOrder. I added an optionalnowparameter to it and kept the polish hold, which skips ready polish issues while polish is over its share. Owner-raised, ranked and put-first issues are never held back. The import list no longer mentionsroadmapIssues.
inSlotOrder is now also used by Next up, which passes no now and so uses the real clock. That means Next up also leaves out polish issues while polish is over its share. I left it that way so the order Next up shows matches what dispatch picks.
The core works: the column is additive and pinned, the 0-50 check sits in the action, dispatch is tested on a fake clock, and the preview answers. Two things to fix.
- Both doors (blocking). The diff has nothing under
src/tui/. A person can see the polish share on the week page but not in the terminal:src/tui/screens/week.tssummaryLineshas no polish line, and no screen sets the share. Add the polish line to the week screen frompolishSpend/polishWords, so it matches the page and the tool. Also give the terminal a way to read and set the share throughupdateRepoSettings, where AGENTS.md says settings entries live, with a test. A write made there must reach web viewers live like any other settings change. Setting it from a terminal or MCP tool is also not 'not done': the rule is that anything on the page is doable in the terminal.
- How-to doc. The how-to is a bullet inside
docs/features/bugs.md, which is about bug clocks. Give it its owndocs/features/polish-share.mdand link it from bugs.md.
Smaller: the week page adds a new <h2> and hand-written <p class="muted small"> block. Check it against docs/DESIGN.md's named components (a section/card) and run design-lint. Say in the pull that Next up now also hides polish while over, since that changes a page the issue did not mention.
The polish share is now in the terminal as well as on the page, and the how-to has its own doc. I've pushed to the same branch. tsc, scripts/gate.ts, scripts/design-lint.ts and the tests that cover the change pass (polish-share, week-doors, mcp-size, tui-autonomy, palette-roster). I did not run the full suite; the forge's check does that on push.
Terminal
- Week screen:
src/tui/screens/week.tsends with the polish line, the samepolishWords(polishSpend(...))the page and theweektool print. It shows even before a retro exists. The screen also reloads onrepo.settings_updated, so a change made anywhere else appears without a keypress. - Setting it: the Autonomy screen (
src/tui/screens/autonomy.ts) shows aPolishrow and has anokey. It goes throughupdateRepoSettings, so it is audited and sent on the bus like any other settings change. It refuses anything but a whole number 0–50 with the page's sentence. I put it on Autonomy because that screen already holds the crew's numbers andupdateRepoSettingscalls. - Test:
test/tui-autonomy.test.tscoversosaving 25 and refusing51,-1,2.5,xand empty input. It also opens the week screen and checks it shows 25%. A secondupdateRepoSettingscall to 30% then reaches the open screen without a keypress.
Page: the hand-written paragraph is gone. The polish line on the week page is now a stat plus a meter inside a card. The "Polish this week" heading stays as a plain <h2>, matching the page's other sections. The 7-day explanation moved into the stat's title text.
Docs: the how-to is now docs/features/polish-share.md. docs/features/bugs.md keeps one line linking to it.
For the pull description: Next up now also hides polish while it is over its share. inSlotOrder is shared by dispatch and Next up, so while polish is over, polish issues drop out of Next up as well. The issue didn't mention this page. I kept it so the order Next up shows is the order dispatch picks. It is also written in the new doc.
The head 47c746121fcf was not in my clone, so I read the whole change instead of the diff since it. It meets the list.
- Setting:
polish_shareis an additive pinned migration that defaults to 10. The action refuses anything but a whole number 0–50. The settings form is admin-only and same-origin. The settings trail is audited. - Doors: the terminal sets it with
othroughupdateRepoSettings, shows it on Autonomy, and shows it live on the week screen. TheweekMCP tool returns it behindplanRepo. The how-to isdocs/features/polish-share.md, and README is untouched. - Design: the week page uses
card,statandmeter, so it works with JavaScript off. - Tests: there is a hand calculation, validation, the form, dispatch on a fake clock (over, then under again eight days later), the small-fixes lane with the owner-raised exception, the terminal, and the tool.
Non-blocking: polishLine in src/tui/screens/week.ts runs a DB query on every render. Cache it when the screen loads and when repo.settings_updated arrives.
The polish share is a stored per-repository setting. It starts at 10% and accepts 0–50. The week page and the
weektool show polish spent against it, and dispatch stops picking polish issues once polish is over.tsc,scripts/gate.ts,scripts/design-lint.ts,test/mcp-size.test.tsand the week and small-share tests all pass, as does the newtest/polish-share.test.ts. I did not run the full suite; the forge's check does that on push.What changed
repo.polish_sharecolumn (additive migration, pinned), saved throughupdateRepoSettingsand recorded in the settings trail. The action refuses anything that isn't a whole number 0–50. The setting is one line on Settings under "Branch and gates", with its reason beside it.src/crew/small_share.tsaddsisPolish,polishSpendandpolishWords. Polish is an issue labelledpolishor in the small-fixes lane. Polish is under its share when its agent spend is below the share's percent of all agent spend. Nothing spent yet counts as under, unless the share is 0.weektool returns the same figures as apolishobject, so there is no new tool.inSlotOrderinsrc/crew/autonomy.tsdrops ready polish issues while polish is over. It takesnow, so it runs on a fake clock. The existing small-issue slot cap still applies on top.docs/features/bugs.md, which listed it as "not yet built".Choices
now, not the weekly-reset window, so it works when no reset is known.run.cost_usdfor agent runs.Not done: there is no MCP or API setter for the share, only the settings page and the action.
Tests: the new tests cover a $1 of $20 hand calculation, validation, the settings form, and dispatch on a fake clock (picks when under, skips when over, picks again eight days later). They also cover the small-fixes lane and the owner-raised exception, and the week page and tool output.
To try it: open
/<owner>/<repo>/settings, change Polish share, then open/<owner>/<repo>/week. To run the new tests:bun test test/polish-share.test.ts.Closes #8853