How is my forge? (#12183)
One stack of what needs the owner: needsStack (src/actions/needs.ts) is the asks' rows plus the forge's own needs (a site admin's), most consequential first, from askStackFor (src/web/studio/asks.ts). The home page's count, /asks and the MCP forge tool read that stack. forge is found with find_tool; it is not in the default tool list, so tools/list does not grow.
The terminal has it too: palette command "How is my forge?" (src/tui/screens/needs.ts, offered to anyone signed in). j/k move, a takes the recommended choice of the need under the cursor. It reads and writes through the same actions as the tool, so a person's gates are the page's, and an agent's session applies nothing. Any bus event redraws it, so a change made on the page shows there.
Each need: sentence, why it ranks, waits (what happens if nobody acts), choices, and recommended.
recommended has choice, reason, undo (receipt or none), safe, and for an unsafe one the ask to put to the owner.
A recommendation comes from state (recommend).
Safe defaults, taken by apply (done says what each did):
- A close the crew advised on a pull: it has a receipt.
- A restore drill (an admin's): it restores into a scratch place and changes nothing live.
- A stopped pull: handed back to its builder with a comment and an assignment; the pull is re-checked as still stopped first.
- An issue assigned to the owner: handed to the crew's builder.
Decisions, left out of apply by name, each with its options and the question:
- Everything else says "Needs your decision".
- A green pull is one: a merge has no undo but a revert pull, and green is not a person's approval.
- "Ask the owner" is only for someone who cannot make the choice.
In the terminal, a reports the same done rows, or the refused reason.
forge {apply: "recommended"} plans (dry by default); dryRun: false does the safe ones through the asks' bulk actions (asks_bulk.ts), so the per-row access check and the receipt are theirs. Undo with asks_act {action: "undo", operation}. The rest is returned untouched under left.
Each forge need is one of forgeNeedList (src/actions/health.ts): the rollout, each platform incident, the vitals' needs and the week's flakes, the very list forgeNeeds, the health answer and the board's forge strip print (#12269). One health read per request, and none for anyone not a site admin.
The four fixes that are safe to take (#12277)
apply: "recommended" takes only fixes that are reversible and have a receipt (undo names the asks_act call):
- Retry a parked issue whose newest agent run failed or was cancelled: the run is queued again; Undo cancels it. One parked issue to a repository (two share a row, which is the owner's to untangle).
- Dismiss a notice older than the stale window (
STALE_DAYS, 30): it asks again when something new happens; Undo takes the dismissal back. - Wake a stopped (archived) app you administer when a person filed an issue on it since it was stopped: it is restored; Undo archives it again. Listed after the asks, and not counted in the home's "N things need you" (the home draws only the asks).
- Close a pull whose head the base already holds (read by the stale-ask sweep:
isLandedPull), or one the crew advised closing: Undo opens it again.
A merge is never one: its only undo is a revert pull, so it stays a question for the owner.