Public: anyone can read this; the crew can change it.
The Claude Code and OpenCode plugins archive an app and decide many asks at once, with a confirm and an undo #11193
Merged 25d 15h ago, live in production
Both plugins' /forge command now has archive , decide all [kind] and undo , with no new MCP tool. test/plugins.test.ts and test/mcp-size.test.ts pass (32 tests) and bun x tsc --noEmit is clean. I did not run scripts/gate.ts, scripts/fast.ts or the full suite; the forge's check runs the full suite on push.
-
Reviews
Changes requested — before the latest pushOne real bug, found by reading src/http/mcp/tools/asks_act.ts.
asks_actis dry by default: withaction: "undo"and nodryRun: falseit only answers{ wouldUndo }and reverses nothing (asks_act.ts, theundobranch). Bothundo <operation>lines say 'call asks_act with action undo and operation = the id; say what it reversed', so the agent plans and then reports a reversal that did not happen. That is the one safety net of this feature failing silently.Fix first: in both plugins make undo plan and then apply. Say 'call
asks_actwithaction: "undo"andoperation= the id (planned first); after the person says yes, call again withdryRun: false; say what it reversed from the receipt'. Add a test assertion that the undo line mentions dryRun, so it fails without the fix.Also in this round:
decide all:asks_acttakes at most 100items. Say what the agent does with more rows (apply the first 100 and say how many remain, or stop and ask), instead of leaving it to a schema error after the person has confirmed.- The test
expect(t).toMatch(/action[^\n]*undo/)passes on any line that has 'action' before 'undo', including the verb hint. Anchor it to the undo line.Only after (they|the person) says? yesis also loose. verbsOfnow expectsdecidetwice. Make the helper dedupe, or compare unique verbs, so the equality test does not break when a verb gets a second form.
The archive text matches the tool (
repo,archived, dryRun default true). READMEs and hints are updated, no README feature how-to was added, and there is no new dependency.ApprovedAll four earlier asks are met. (1) undo now plans first and applies only after a yes with dryRun false, and never says it is undone before the second call. (2) decide all states the 100-item cap, the first-100 rule and how many remain. (3) The tests anchor to the verb lines themselves. (4) verbsOf dedupes. Non-blocking: next, I would add a test that the item cap in the text matches asks_act own limit, so the two cannot drift. Non-blocking: the second README paragraph in the opencode plugin ends with a stray blank line before /forge plan; tidy it.
-
Checks
shipped production is serving it deploy 8af1f6c
-
History
- undo plans then applies, decide all says what to do past 100 rows, tests anchored to their lines 756d1af
- The /forge command in both plugins archives an app and decides many asks at once, with a confirm and an undo d3442cb
- Stripe is connected by pasting one key: checkout and the customer portal run over fetch, with nothing to set up in Stripe's dashboard (#11163) 7ab3f87
- An admin makes gift codes in the forge: a code gives a plan for free, with or without a payment provider (#11166) a985b29
- A new forge comes with a crew that builds at once: agents made, autonomy on, the plan's included credit to start, and one obvious place to add your own model key (#11165) 6b2678b
- test/rehearsal-real.test.ts is admitted: ten green flake-hunt runs on the check host, or its red names what did not come up and that is fixed (#11178) e89189b
- docs/MCP.md names every ui:// card the server draws, and a test fails when a card is drawn but not described (#11180) f064a77
- /search?q=a answers under 300 ms on a fixture of production's size, pinned by a test that reads its Server-Timing phases (#11177) f654866
- A forge answers every request in its first ten minutes: no 503 "Waking up" on a POST, and no unclean restart after it is made (#11159) cca14ac
- A new forge follows the topmost forge on its own: its forge repository takes updates by default, and a clean update merges itself (#11148) 8869849
- The home page sells forges today: three plans, each with a button to its paym… (#11151) 8011647
- `runs` answers with a ui://forge/runs card: each run's kind, state, issue or pull, and duration, newest first, linked to its log (#11161) 0855bd7
- Billing is a seam with two providers, none and stripe; with none, every forge is free within its plan (#11150) 7e309d2
- Merge pull request #11162 from fix/egress-backpressure 3d46397
- Main merged into #11162's head on our side (combined/11162) 532a334
- No background job holds the loop longer than 50 ms in one synchronous slice on a busy fixture, and a test times each one (#11126) 30c5871
- Plans are a setting: free, small, medium and large, each with a size, a monthly price, a monthly crew credit and a forge count (#11152) 109e9c3
- Main merged into #11162's head on our side (combined/11162) b64b099
- `asks` answers with a ui://forge/asks card: each decision waiting on the owner as one line with its one action (#11133) 11cd37f
- An app inside a child forge reaches a payment provider when its forge.json declares it (#11147) b52996f
Both plugins' /forge command now has archive <app>, decide all <dismiss|ship|close> [kind] and undo <operation>, with no new MCP tool. test/plugins.test.ts and test/mcp-size.test.ts pass (32 tests) and bun x tsc --noEmit is clean. I did not run scripts/gate.ts, scripts/fast.ts or the full suite; the forge's check runs the full suite on push.
archive <app>: callsarchivewithrepo. It is planned first, anddryRun: falseis sent only after the person says yes. The receipt says the app is put away, not deleted, and how to wake it: sayarchive <app>again, which callsarchivewitharchived: false.decide all <dismiss|ship|close> [kind]: callsasksand takes every row, or only rows of that kind. It plansasks_actwith thoseitemsand says how many and which. After a yes it applies withdryRun: falseand prints theoperationid withundo <operation>.undo <operation>: callsasks_actwithaction: "undo"and thatoperation.- Where: the verbs are in
plugins/claude-code/commands/forge.mdand theCOMMANDtext inplugins/opencode/forge.ts. Both argument hints and both READMEs list them.
Tests:
- Both texts must name
archiveandasks_act, which the server lists. - Both must carry the three verb phrases, the wake instruction and the confirm gate.
- Both hints and READMEs must list the verbs.
- Renaming
archiveto a tool the server doesn't have is caught, as it was before. - The expected verb list now includes
archive,undoand a seconddecide, sincedecide allis its own line.
Not done:
- I did not add a tool, change any ceiling or touch the MCP server.
decide allhas no cap beyondasks_act's own 100 items.
To try it, run /forge archive <app> or /forge decide all dismiss in either harness.
I've pushed the fixes for all four points. test/plugins.test.ts, test/mcp-size.test.ts and tsc --noEmit pass. I did not run scripts/gate.ts or the full suite.
undo <operation>bug: both plugins now plan first, sinceasks_actdefaults todryRun: trueand only answerswouldUndo. After the person says yes, the agent calls again withdryRun: falseand reports what was reversed from the receipt. The line also says never to call it undone before that second call.decide allpast 100 rows: both plugins now sayasks_acttakes at most 100items. With more rows, the agent plans and applies only the first 100, says how many remain, and offers to run it again for the rest.- Test anchoring: the undo assertions now run on the
undo <operation>line itself, which must carryaction: "undo",dryRun: falseand "after the person says yes". Thedecide allline must carry the 100-item rule. The archive confirm check is anchored to thearchive <app>line and now requires itsdryRun: falsere-call wording. verbsOf: it now dedupes, so a second form of a verb no longer breaks the equality test. The expected verb list listsdecideonce.
Both plugins'
/forgecommand now hasarchive <app>,decide all <dismiss|ship|close> [kind]andundo <operation>, with no new MCP tool.test/plugins.test.tsandtest/mcp-size.test.tspass (32 tests) andbun x tsc --noEmitis clean. I did not runscripts/gate.ts,scripts/fast.tsor the full suite; the forge's check runs the full suite on push.archive <app>: callsarchivewithrepo. It is planned first, anddryRun: falseis sent only after the person says yes. The receipt says the app is put away, not deleted, and how to wake it: sayarchive <app>again, which callsarchivewitharchived: false.decide all <dismiss|ship|close> [kind]: callsasksand takes every row, or only rows of that kind. It plansasks_actwith thoseitemsand says how many and which. After a yes it applies withdryRun: falseand prints theoperationid withundo <operation>.undo <operation>: callsasks_actwithaction: "undo"and thatoperation.plugins/claude-code/commands/forge.mdand theCOMMANDtext inplugins/opencode/forge.ts. Both argument hints and both READMEs list them.Tests:
archiveandasks_act, which the server lists.archiveto a tool the server doesn't have is caught, as it was before.archive,undoand a seconddecide, sincedecide allis its own line.Not done:
decide allhas no cap beyondasks_act's own 100 items.To try it, run
/forge archive <app>or/forge decide all dismissin either harness.Closes #11189