/forge:fg-donefrom forge
Seals a finished, verified task: writes retro log, marks STATUS.md done, archives it, and empties active .forge state to prevent re-runs. Supports batch sealing with `fg-done all`.
Ships in forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Host contract: sealing and .forge/ state transitions are host-neutral. Read ../../core/HOST.md and use the active host's interaction adapter (structured_choice, falling back to a numbered text choice) for confirmation; keep the deterministic seal scripts as the single implementation.
This is the last step of the forge loop — the ③ done stage that closes one loop. Its job is to tidy up the residue left by one loop (ask·plan → execute → done): decide the retro (step 0b — write a log when the run left something to learn, ask once only when a promotion clears the bar), mark the task's STATUS.md as done, archive it, empty the active state, and close the loop. The unit of cleanup is a single task — there is no notion of closing an epic or merging several tasks into one seal. (Even the all batch mode below seals each task into its own done/ directory: it judges each task's retro unattended, it does not bundle tasks.) Because a task is one loop, you only need to tidy up that one loop cleanly.
Language: This skill file is authored in English, but you MUST write every message shown to the user — questions, menus, status/next-step lines, and handoff text — in the user's language (detect it from the user's own messages), never mirroring this file's English. All documents this skill generates for the user's project (plan, run notes, retros, CONTEXT.md entries, ADRs, handoff messages) are written in the user's language. Section headings defined in the format docs are canonical English names — when writing a document, render headings in the user's language; consumers match sections by meaning and position, not exact strings.
Explaining forge: forge's vocabulary is not the user's — verified: failed, unsealed tail, a pillar or gate name means nothing unread. Always, never gated on eco: gloss a forge-specific term on first use in a message (a few words, not a paragraph), put the purpose before the mechanism, and lead with the answer, closing on what it means for the user. A gloss is not filler — with eco on, ECO.md's terse rules govern form (length, padding) while these govern vocabulary, so terseness never deletes a gloss.
Evidence and candor: every claim you make about code, state, or results — in a message or in a document you write (plan, run notes, retro, ADR) — carries its evidence in the same sentence (a file:line, a command and its output) or a label: Measured (you checked it this session), Inferred (reasoned from what you checked), Guess (a prediction or an unseen cause), rendered in the user's language. A label is not a license to skip a check — if a cheap check would settle it, run it; never hand the user a check you could run. Agreement is not the default: when asked whether to do something, invited to add scope, or shown an approach, give your real judgment first — the strongest objection, and "don't do it" when that is true. Change a recommendation only for a new fact or argument, never for repetition; the decision stays the user's — state the objection once, then follow their call without re-arguing or silently deviating. Output a deterministic script printed is already measured and needs no label.
Forge root: every .forge/... path below is relative to the resolved forge root — .forge/ on the default branch, .forge/branch/<branch>/ (git-tracked) on any other branch. The seal script resolves this itself (shared resolver, ADR-0011); when you read state by hand for routing, resolve it per ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/fg-run/FORGE-ROOT.md (skill-relative ../fg-run/FORGE-ROOT.md).
This skill is self-contained and standalone. It depends on no external skills: it reads input from .forge/ and writes output to .forge/done/.
The mechanical seal — pre-checks, gate enforcement, STATUS close-out, atomic archive, emptying the source bucket — is done by a deterministic script, not by an LLM hand-running a dozen bash steps and reasoning the guards in tokens (that was slow, the same problem ADR-0020 fixed for fg-status). This skill runs the script and routes on its exit code; the script never routes. It is the single seal primitive shared by all three seal paths — interactive fg-done, fg-done all, and fg-next all (which reaches it by delegating to fg-done) — so all of them get the same fast, atomic seal.
Unlike fg-status's read-only survey script, this one mutates files, so it is gate-first, non-destructive-on-refuse. After the gates pass, it copies the task into a temporary directory under done/, closes out the copied STATUS, and publishes the complete archive by rename before removing the known source files. Archive preparation failures leave the original task unchanged. Cleanup failures may leave duplicate source files alongside the complete archive; exit 6 requires inspection, not a success notice. Tests: scripts/forge-done.test.sh + scripts/forge-done.parity.test.sh.
Dual dispatch (ADR-0022): prefer bash, fall back to node.
bash "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/forge-done.sh" [args]node "${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/forge-done.js" [args] — identical behavior (exit codes, STATUS content, archive layout), guarded by the parity test.Arguments (the judgment this skill supplies to the mechanical seal):
--slug <slug> — target a parked executed/<slug> or a half-sealed done/*-<slug>. Omit to seal the active slot.--skip-retro "<reason>" — record retro: skipped (judged: <reason>). Passing this is the skip decision — pass it only when step 0b found nothing to learn, on any seal path. The script refuses it (exit 4, GATE_RETRO skip-refused) while run.md/STATUS carries a retro signal. Without it, the script requires a retro file and refuses (exit 4) if none exists.--docs-updated "<value>" — the STATUS docs updated: field (which CONTEXT/ADR this loop touched — LLM knowledge). Default none; on the skip path and on unattended seals it is none (promotion deferred to fg-learn's batch promotion).--completed <YYYY-MM-DD> — seal date; defaults to today (an arg so tests are deterministic).Resolve the target before invoking the script. The script defaults only to the active slot; it does not choose among parked tasks:
--slug <slug> targets that parked/half-sealed task.plan.md exists and no slug was requested, target the active slot. active-slot target: omit --slug — passing it is reserved for executed/ or half-sealed done/ targets.executed/<slug> candidates that can be routed by this invocation. With exactly one parked candidate, target it with --slug <slug> automatically. With 2–4, ask which via AskUserQuestion; with 5+, print a numbered list and ask for the task number/slug/list number. Do not call the script with no slug and then report EMPTY while a parked target exists.--slug and route the script's exit 2 normally.Exit codes → routing (this is the skill's job):
| Exit | Meaning | Route (see "Before starting" for the full rule) |
|---|---|---|
| 0 | sealed OK (or a half-sealed dir completed idempotently) | relay + completion notice + map offer + close loop |
| 2 | nothing to seal (empty state / slug not found) | guide to fg-ask to start a new task |
| 3 | verify gate: verified: not sealable (pending/failed/missing) | failed → fix-and-re-run via fg-run (or re-grill fg-ask); pending, active slot with running.md but no run.md → fg-run step 4a in-flight collection/confirmation; pending, active slot with run.md → fg-run verification-only resume; pending, parked/legacy → run the cleanup-time UAT here, record verified:, re-invoke |
| 4 | retro gate: retro owed (no retro file, no --skip-retro), or GATE_RETRO skip-refused signals=… (a skip was passed while run.md/STATUS carries a retro signal) | step 0b was not completed — decide the retro there (write the log; a skip is accepted only when there is no signal), then re-invoke |
| 5 | duplicate: done/<date>-<slug>/ already sealed | surface it, do not double-seal (confirm a separate cycle before any re-seal) |
| 6 | SEAL_IO: file operation failed | stop; inspect source and archive, correct the filesystem problem, and reconcile any duplicate source files before retrying; never report success or auto-advance |
The script emits language-neutral tokens (SEALED … / GATE_VERIFY … / GATE_RETRO … / DUP … / EMPTY …) — read the token to route; write the user-facing prose in the user's language.
Sealing is hard to undo. The two guards below are enforced deterministically by the script (it refuses non-destructively), but the routing on refusal is yours — that is the judgment this skill adds. The loop order is run → verify → done, with the retro decided inside the seal (ADR-0009, ADR 261024-191024): verification is checked before the retro.
No-seal-without-verification guard (exit 3). The task's STATUS.md verified: must be a sealable value: yes (<evidence>) (confirmed working, one-line evidence — the form fg-run records; ADR-0009) / n/a (<reason>) (nothing runnable) / skipped (<reason>) (a deliberate, auditable waiver — this still seals). The script refuses (exit 3) on pending, failed, or missing. Route by case:
running.md and no run.md → this execution is still in flight or awaiting collection, so it is not a sealing or cleanup-time UAT target. Route to fg-run step 4a, which collects or confirms the in-flight work before any re-run; do not delete the marker here.failed → the work is broken. Never seal, never waive to skipped. Route to fg-run (the single owner of unparking a failed task — it moves executed/<slug>/{plan,run,STATUS} back to the active slot when free, then fix-and-re-run; or re-grill via fg-ask). It returns for sealing only once a fresh re-run re-verifies it to yes/n/a.pending/missing, active slot with run.md → point to fg-run's verification-only resume (runs the UAT, writes verified:, no re-execution) before any retro.pending/missing, a parked executed/<slug> or an older run predating the guard → no reachable fg-run handoff, so run the UAT here, now against the plan's goal and record the outcome in STATUS. Sealable → re-invoke the script. If this cleanup-time UAT finds it broken, record failed (<reason>), stop, and route to repair — do not waive it.No-seal-without-retro guard (exit 4). For each task, either a retro .forge/retro/*-<slug>.md exists, or the seal is a deliberate skip (--skip-retro, which records retro: skipped (<reason>); a STATUS already reading retro: skipped also satisfies it). The script refuses (exit 4) when a retro is owed and no --skip-retro was passed. Since the retro is now decided inside this skill (Behavior step 0b, ADR 261024-191024), exit 4 means step 0b was not completed: finish it — write the log, or pass --skip-retro "<reason>" when the judgment found nothing to learn — and re-invoke. Whether to skip is step 0b's judgment on every seal path, interactive or unattended.
Empty / duplicate / half-sealed. Empty state or an unknown slug returns exit 2; an already sealed task returns exit 5. A half-sealed directory must pass the same verification and retro gates (exit 3/4 on refusal) before STATUS is completed idempotently (exit 0). File-operation failures return exit 6. Run the script and route on its code.
fg-done (single task)
│ step 0b: retro needed? (signals → log | no signal → judge, default skip) · promotion asked once if interactive
│ decide: target (--slug or active slot) · skip retro? (--skip-retro) · docs (--docs-updated)
▼
run forge-done.sh (bash) | forge-done.js (no bash)
├── exit 0 ──▶ relay SEALED → completion notice → (map offer) → close loop
├── exit 2 ──▶ "no task in progress" → guide to fg-ask
├── exit 3 ──▶ failed → fg-run fix-and-re-run / fg-ask re-grill
│ pending(active) → fg-run verify-only resume
│ pending(parked/legacy) → cleanup-time UAT here → record verified → re-invoke
├── exit 4 ──▶ retro owed → finish step 0b (write the log, or --skip-retro) → re-invoke
└── exit 5 ──▶ already sealed → surface, don't double-seal
The script does the mechanical seal in one call (copy into staging → close out the copied STATUS → publish the archive → remove known source files). Half-sealed recovery runs the same verification and retro gates before atomically replacing STATUS. Neither a failed nor a pending task may bypass those gates merely because its files are already under done/. Your job around it:
0) Preserve follow-ups for the selected task. Before every seal (explicit, delegated, auto-close, simple, or all), follow ../fg-learn/FOLLOWUPS-FORMAT.md's producer checkpoint 3. Only inspect/normalize a sealable task: do not mutate an in-flight or unverified task. Capture concrete candidates from its plan/run/matching retro into marked blocks at the end of its run or retro. The script collects these into .forge/followups.md after its gates and before source removal. Candidate collection failure blocks the seal; no candidates leaves the ledger absent. A skipped retro changes none of this.
0b) Decide the retro — the retro is part of the seal (ADR 261024-191024). The loop is ask → run → done: there is no separate retro stage, so every seal decides here whether the task left something to learn. fg-learn is no longer a loop stage — it stays only as the batch-promotion utility for learnings that unattended seals deferred. Guard first — run 0b only when the seal can actually happen: STATUS verified: is sealable (yes/skipped/n/a), no running.md is in flight, and the task is not already sealed (no done/*-<slug>/STATUS.md with status: done). Otherwise skip 0b and let step 1's script refuse and route (exit 3/5) — a retro written for a task that then fails to seal would be picked up as stale by the next seal. Read the task's run.md, STATUS.md and, if present, review.md, then decide in this order:
run.md marked ⚠ (plan and actual diverged — fg-run §4); (b) run.md has ## Failed attempts lines, or STATUS fix-rounds ≥ 1; (c) review.md holds a finding marked disposition: accepted (the human accepted it but did not fix it — fg-adversarial-review records the disposition); (d) run.md has a ## Rulings section with at least one line (an unattended drive decided something on the human's behalf). These are file reads, not opinions, so the same task gets the same answer in every session. ## Failed attempts and ## Rulings are machine-read: their headings stay in canonical English (fg-run §4, DRIVE.md Part 4) — the seal script refuses --skip-retro on (a), (b), (d) and fix-rounds.run.md's divergence prose. If it records nothing a future plan should know, seal with --skip-retro "<one-line reason>" (in the user's language) and write no file — a stub retro is noise (ADR-0002). If it does record such a learning, write the log anyway..forge/retro/*-<slug>.md, e.g. one an older fg-learn wrote, or one a crashed seal left behind). If one exists, update that file instead of creating a second one — the seal script records the first match, so a second file would be orphaned. Otherwise one file, .forge/retro/YYMMDD-HHMMSS-<slug>.md, in ../fg-learn/RETRO-FORMAT.md's template and the user's language, slug taken verbatim from the plan's forge-slug (the seal script pairs by it). Material is this task's plan/run/review/STATUS only — never invented. Classify each learning with the four destinations and bars in ../fg-learn/SKILL.md §2 (CONTEXT term · ADR · eval · retro log only)./fg-done or one-shot fg-next. Unattended = fg-next all, fg-loop, simple mode, fg-done all, and fg-ask's STEP 0 auto-close — the delegating skill says so when it hands the seal over.
structured_choice multi-select, or a numbered list when it does not fit) with "none" as an option. Apply the adopted ones after the seal succeeds (step 2's exit 0), never before — a refused seal must not leave promotions behind (CONTEXT.md per ../fg-ask/CONTEXT-FORMAT.md, ADR per ../fg-ask/ADR-FORMAT.md (including its "Superseding an ADR" rule when the new ADR replaces all or part of an existing one), a small eval written and run green — a large one becomes a backlog plan via fg-ask), and record the adopted set in the log's Doc updates and in --docs-updated before the seal. Until every adopted promotion is applied, the log's first line is <!-- promotion-pending -->; remove that line once the last one lands. If the session ends or an apply fails first, the marker keeps the task on fg-learn's candidate list, so a promotion the records claim is never silently lost. No candidate clears its bar → no question at all.<!-- auto-retro: <seal path> --> (e.g. fg-next all), Doc updates reads "unreviewed (auto retro)" in the user's language, nothing is promoted or proposed. The first-line marker is the only thing fg-learn's batch promotion reads — no STATUS edit is required, and the seal script keeps owning STATUS.--skip-retro. If the script refuses with exits 2–5 (nothing was moved), delete the retro log written in this attempt before routing, so a later seal decides afresh. On exit 6 keep the log: the archive may already be published with STATUS pointing at it — report the exit and inspect, never delete. Rulings decided after run.md was written (an auto-verified UAT outcome, a drive's commit choice) are appended to run.md's ## Rulings by this step, from the list the drive hands over, before the script runs. The verification gate is enforced by the guard above and by the script (ADR-0009) — no retro is decided for a pending or failed task.1) Decide the arguments (judgment), then run the script. Resolve the target with the rule above (active slot → no --slug; parked/half-sealed → --slug; active empty with multiple parked tasks → select one first), pass the retro outcome from step 0b (--skip-retro "<reason>" on a skip; nothing when the log was written), and fill --docs-updated "<value>" with the CONTEXT/ADR this loop touched (default none). Then invoke the script via dual dispatch (bash, else node). Do not hand-move files or hand-edit STATUS — the script owns that.
The script writes the closed-out STATUS.md in this fixed shape (documented here as the script's output contract — keep in sync with the script if it changes, per ADR-0020's consequence):
# STATUS — {task title}
slug: {slug}
status: done
executed: {YYYY-MM-DD}
completed: {YYYY-MM-DD}
verified: yes (<evidence>) # preserved from fg-run; or skipped/n/a
retro: .forge/retro/{YYMMDD-HHMMSS}-{slug}.md # or: skipped (judged: <reason>) — the script adds `judged:` to every --skip-retro
reviewed: .forge/review.md # only when an adversarial review left one (ADR-0018); omitted otherwise
docs updated: {CONTEXT.md terms / ADR <id> / none} # from --docs-updated
STATUS.md is the machine-readable completion marker that travels with the task files — fg-run reads done/*/STATUS.md (status: done) to summarize finished work. For reference, on the default branch the volatile loop state (including done/) is gitignored — only permanent docs are tracked via the whitelist; on a non-default branch the branch root is tracked whole (ADR-0011). The persistent trace cleanup leaves is the retro, .forge/followups.md when candidates exist, and the docs that task updated; .forge/done/ itself is volatile on the default branch.
2) Route on the exit code (judgment). Exit 0 → continue to the notice below. Non-zero → route per the table above and stop. Gate refusals leave the task untouched; exit 6 may follow archive publication and requires source/archive inspection. Whichever exit you land on, close with the handoff table, filled from that exit's routing.
3) Completion notice. After a successful seal, summarize at a glance what was finished, which persistent docs were updated (retro, ADR, CONTEXT), and where the archive landed (.forge/done/<date-slug>/). Make the wrap-up explicit so the user recognizes one loop is done. If git status shows the permanent docs this loop touched (.forge/retro/, .forge/adr/, CONTEXT.md — or the branch root on a non-default branch) still uncommitted, add a one-line reminder to commit them — a reminder only; never run git yourself (the same restraint as fg-merge).
Seal summary — explicit single seal only (ADR-0032). This is part of the step-3 completion notice: on an explicit, single /fg-done it replaces the terse notice above (render the docs/archive facts once, in the summary's meta line — but still append step 3's git-commit reminder if tracked docs are uncommitted). "Explicit single seal" = a bare human /fg-done (with or without --slug), not all mode, and not a seal delegated by an orchestrated/unattended drive (fg-next one-shot, fg-next all, fg-loop). In those delegated/batch cases keep the terse notice; no summary. Render a seal summary reconstructing "what this task set out to do, and what was actually done" from: plan.md/run.md/STATUS.md in the sealed archive (use the dest=<path> the script emitted in its SEALED token — do not reconstruct <date-slug>, which can differ from the retro's date), and the retro at the path in STATUS's retro: field (it lives in .forge/retro/, not the archive — the script records its path but never moves it). Map: plan.md → requirements (Goal + Source-of-truth: Related ADRs / Definition of Done), run.md → what was done + divergences, STATUS.md → verified/docs, the retro → learnings. Write it in the user's language, on screen only — do not persist it to a file (the archived plan/run + the retro already are the durable trace). The seal script is untouched; this is judgment-layer prose, not mechanical seal work (ADR-0031). Shape (render headings in the user's language; scale length to the work):
✅ Sealed: {title} (#{task})
▸ Requirements
· Goal: {plan Goal, one line}
· Key decisions: {1-2 from Related ADRs / Definition of Done, if any}
▸ What was done
· {3-5 lines from run.md — result per slice}
· vs plan: {run.md divergences, or "as planned"}
▸ Retro ← only when a retro file exists (omit this whole chapter if retro: skipped)
· Next time: {1-2 lines from the retro's "Do differently next time"}
· Keep: {1 line from the retro's "Confirmed"/"What went as planned", if present}
· Full: {the retro path from STATUS's `retro:` field}
▸ Verified {verified} · docs {docs updated} · retro {skipped (reason) — only if skipped} · archived {the dest= path from the SEALED token}
Eco: render the same summary as a table. If eco is true in the top-level .forge/config.json (a global exemption — never the branch root; treat as off when the file or key is absent), render the chapters above in the eco summary table shape instead of the bullet prose: the meta line folds into the header (title · #task · verified · divergence), ▸ What was done becomes the slice table built from run.md's per-slice lines (recorded by fg-run — see its SKILL §4), and the conditional Retro chapter keeps its existing rule below. The shape is defined once in ../fg-config/ECO.md ("eco summary table") — reference it, never restate the layout here. Only the rendering changes: the material still comes from the archived plan.md/run.md/STATUS.md at the dest= path the script emitted plus the retro at STATUS's retro: path, and the gate below is untouched (this is still the explicit-single-seal path only — batch and delegated seals are covered separately). When eco is false or absent, render the prose shape above unchanged.
The Retro chapter appears only when a retro file actually exists at STATUS's retro: path; on retro: skipped (or a dangling path) omit the whole chapter and let the bottom meta line carry retro: skipped (<reason>). Gate: the summary is for the explicit single seal only, per the definition above. fg-done cannot detect its caller (same limit as fg-run's handoff — ADR-0015), so the terseness of the delegated/batch paths is enforced from the orchestrator side: fg-next/fg-loop carry a matching "a delegated seal stays terse — no single-seal summary" rule in their own drive discipline (all mode also self-guards below), while a bare human-invoked single /fg-done (no all) renders the summary here. Note the enforcement is only cosmetic-on-forget (unlike ADR-0015's self-enforcing stop) — if a delegated path ever leaks the summary it is verbose, not broken. The rationale for the asymmetry (batch/drive favor momentum) is ADR-0032.
3a) Codebase map check (conditional — offer, never auto-run). Check two cheap signals: (a) does .forge/codebase/ exist? and (b) did this loop change project files the map describes — i.e. does git status --short show changes (modified or untracked) on paths not starting with .forge/ (skills, src/, manifests, README, …)? If both are true, the map may be stale, so offer once, in the user's language: "this task changed <changed project files> and a .forge/codebase/ map exists — the map may be stale. Run fg-map now?" On agreement, invoke fg-map; on decline, finish. Offer, never auto-run — fg-map fans out subagents and is on-demand (ADR-0006). If .forge/codebase/ is absent, or the loop changed only .forge/ docs, say nothing and skip.
4) Close the loop. Read saved open entries for this source task from .forge/followups.md; show their IDs/path when mentioning candidates, never recreate a chat-only queue. A follow-up the retro left belongs in the table's Next step cell as a new task — not in a second sentence here (several candidates → bullets below the table, per HANDOFF.md's list rule). Nothing is asked at this point: no "shall I start it?", no auto-invoking fg-ask (chaining is fg-next's job — ADR-0015). With no follow-up, the table still renders (a new task begins with fg-ask) and you finish there.
all mode — batch seal-only (every task an unattended seal)When invoked with the all argument (fg-done all, or "봉인 all" / "모두 봉인"), fg-done seals every already-executed task at once, each as an unattended seal: step 0b's retro judgment still runs per task (skip, or an auto retro log with promotion deferred), but no promotion question is asked. It is the seal-only counterpart to fg-next all: where fg-next all also promotes and runs backlog tasks, all mode here never promotes or runs anything — it only tidies up work that has already executed (the active slot + the whole .forge/executed/ queue). Rationale and boundary: .forge/adr/0023-fg-done-all-batch-seal.md.
It relaxes exactly one thing — the promotion question (deferred to fg-learn's batch promotion) — and leaves everything else to step 0b and the script's per-task enforcement:
.forge/executed/<slug>/. The backlog is out of scope — all never promotes/runs an unexecuted plan (that is fg-next all). Keep this sharp: if the user wants backlog work run too, point to fg-next all.all drops the promotion question, not verification; the script still refuses (exit 3) any task whose verified: is not sealable. A verified: failed task is never sealed — set it aside and route to fg-run, keep sealing the others. A pending/missing task takes the same cleanup-time UAT recovery as the single-task path (run the UAT here; sealable → seal, else set aside).261024-191024): a task with a retro signal gets an auto retro log (<!-- auto-retro: fg-done all --> on its first line); a task without one is sealed with --skip-retro "<one-line reason>" (in the user's language). Learnings that need a human go to fg-learn's batch promotion, never a question here.verified: value and whether step 0b will skip its retro or write an auto retro log) and the tasks set aside (failed → fg-run, unverifiable → still pending) — the deciding of this list is judgment (which tasks, what will happen), which is why it stays here and not in the script. Get a single go-ahead. After it, loop over the qualifying tasks, calling the script once per task: for the active-slot target omit --slug; for each parked executed/<slug> target pass --slug <slug>, and pass --skip-retro "…" only to tasks whose step 0b found nothing to learn (an auto retro log needs no flag — the script finds it by slug). Passing --slug indiscriminately would make the active task look absent to the script. (Under fg-next all, the drive's upfront go-ahead already covers this — do not re-prompt; see fg-next's DRIVE.md.)all drops the promotion question, never candidate persistence..forge/done/<date-slug>/ by its own script call — all only drops the per-task promotion question, it does not bundle tasks.all emits the per-task completion notice + set-aside list only — never the explicit-single-seal summary chapter (the seal-summary block in step 3, ADR-0032). Batch sealing favors momentum, so a summary per task would be a wall of text.
eco is true in the top-level .forge/config.json, replace the per-task notices with the batch shape of the eco summary table — one row per task — defined once in ../fg-config/ECO.md (reference it; never restate the layout). The single-seal summary chapter stays forbidden here: a one-row table and a summary chapter are different things, and only the former is allowed in batch. Keep the set-aside list (failed → fg-run, unverifiable → still pending) — as rows or a line, whichever is shorter. The upfront one-time confirmation and the verification gate are untouched. When eco is false or absent, emit the terse notices above unchanged. See ADR-0032's 2026-07-31 amendment for why a shorter form is not a reversal of the no-summary rule.fg-done all
│ collect already-executed tasks (active slot + all executed/) ── none ──▶ run script once (empty → exit 2) → guide to fg-ask
│ one or more
▼
per task — check verified (route failed→fg-run, pending→cleanup UAT) ; build the seal list + set-aside list
▼
show ONE confirmation (to-seal w/ retro skip or auto log · set-aside) → one go-ahead
▼
for each qualifying task: step 0b (unattended) → active slot: forge-done.sh [--skip-retro "<reason>"] ; executed/<slug>: forge-done.sh --slug <slug> [--skip-retro "<reason>"]
▼
completion notice (per-task summary + set-aside list)
Whichever exit you landed on — the successful seal (0) and each non-zero refusal alike — close with the handoff table, filled from that exit's routing in the exit-code table above and "Before starting" (read them; do not re-derive the route here). Its shape is defined once in ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/fg-next/HANDOFF.md (skill-relative ../fg-next/HANDOFF.md); reference it, never restate the layout here. Render it in the user's language, once per invocation — in all mode at the end of the batch, never per task — and not at all when an unattended drive suppressed it (HANDOFF.md, "Unattended drives").
Just did is always what actually happened this turn, and it may never assert what a path can falsify (HANDOFF.md's rule of that name — "the active state is now empty" is exactly the sentence one set-aside task makes false). Fill it from the first matching case:
all mode reaches this — a single verified: failed seal refuses at exit 3) → how many were sealed and how many set aside, and which. Do not claim the active state is empty: a set-aside task is still sitting in it, and the same plan therefore can run again — that is the point of routing it to fg-run.all with nothing set aside — the terse-notice paths, where no summary rendered) → the seal: archived into .forge/done/<date-slug>/, STATUS.md marked done, the active state now empty (so the same plan can never run again), plus the one-line summary of the docs this loop updated.The other rows are filled per exit, branching where the routing branches:
Next step by the first matching case: a task was set aside (case 2 above) → recovering it with fg-run (failed → unpark + fix-and-re-run; still-pending → the verification-only resume), How to start /forge:fg-run, Alternative re-grilling with fg-ask — the sealed ones are done, so the only thing still owed is the one that did not seal; a follow-up the retro left → it starts as a new task; otherwise → simply that a new task begins with fg-ask. How to start for the latter two: /forge:fg-ask, or fg-next. Several follow-up candidates → bullets below the table. If the git-tracked docs this loop touched are still uncommitted, the commit reminder is one line below the table — that is its single home (HANDOFF.md counts fg-done's commit reminder among the below-table sites); step 3's "still append the reminder" means the seal summary does not swallow it, not that it is rendered in two places. Reminder only, never run git yourself; a cell stays one line.Next step: fg-ask, to start a new task; How to start: the same triggers; omit Alternative.failed → Next step fg-run (unpark + fix-and-re-run), How to start /forge:fg-run, Alternative re-grill with fg-ask; pending, active slot → fg-run's verification-only resume, same trigger, no Alternative; pending, parked/legacy → the cleanup-time UAT is yours to run first, so the table comes after it — sealable → Next step is re-invoking fg-done (/forge:fg-done); broken → you recorded failed, so render the failed case.Next step: re-invoking fg-done, How to start: /forge:fg-done, no Alternative).Next step: nothing is owed for this task, so a new task with fg-ask; Alternative: a genuinely separate cycle, confirmed before any re-seal.State it and stop — the table is text output, never an AskUserQuestion, and Alternative states that another route exists rather than asking which to take: do not ask "shall I start it?" and do not auto-invoke the skill you named (chaining is fg-next's job — ADR-0015).
Order on screen — the table is last (HANDOFF.md). On an explicit single /fg-done the step-3 seal summary comes first (it replaces the terse notice; batch all and orchestrated/unattended seals keep the terse notice, no summary chapter — ADR-0032), then the step-3a fg-map offer when it applies, then the table. That offer is a real question, so it can never live in the table (the table is not a question and Alternative is not a menu) and nothing may follow the table — therefore ask it before rendering the table, never after, and never folded into a cell. On a non-zero exit nothing was sealed, so neither the summary nor the offer applies and the table stands alone. The summary looks back at the task just sealed; the table points at what comes next — do not render the summary twice. When eco is true, that summary is already the eco summary table (step 3); how the handoff table combines with it is HANDOFF.md's "Interaction with eco" — follow it, do not restate it here.
.forge/done/<date-slug>/ — archive of the sealed plan.md/run.md (+review.md if present) + the closed-out STATUS.md (status: done), written by the seal script (local; gitignored on the default branch, tracked under the branch root otherwise — ADR-0011). fg-run reads the STATUS.md markers to exclude finished work and summarize status..forge/ — emptied of plan.md/run.md/STATUS.md (by the script) so the next run finds no plan..forge/retro/YYMMDD-HHMMSS-<slug>.md, or updates the slug's existing one), and — on an interactive seal — applies adopted CONTEXT.md/ADR/eval promotions after the seal succeeds (promotion-pending until done).scripts/forge-done.sh / .js (ADR-0030) — this skill invokes it and routes; it does not hand-edit STATUS or hand-move files.If you need the format for retro·ADR·CONTEXT, read the original format docs directly (don't copy per skill):
${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/fg-learn/RETRO-FORMAT.md, ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/fg-ask/ADR-FORMAT.md, ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/skills/fg-ask/CONTEXT-FORMAT.md
(relative paths from the skill directory: ../fg-learn/RETRO-FORMAT.md, ../fg-ask/<file>)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
forge, task-sealing, retro-log, workflow-loop, state-cleanup
npx claudepluginhub gyuha/forge --plugin forge25 skills in this plugin
/fg-adversarial-reviewOptional adversarial review between fg-run and the seal (fg-done) — a reviewer assumes the result is WRONG and hunts for evidence across six lenses (failure points, hidden assumptions, misread requirements, security/perf/data-loss, unexpected misuse, weak decisions), fanning out as parallel subagents; fix-needed findings become a fix-forward plan on your approval. Outside the loop, never a seal gate, always skipped in fg-next all / fg-loop. Use in contexts like 'adversarial review', '적대적 리뷰', '이 결과 공격적으로 검토', '허점 찾아줘', 'red team this'./fg-agendaA decision queue for foggy work — outside the forge loop. Settles the destination with you, grills breadth-first to surface what must be decided, and keeps it in .forge/agenda.md (destination · decided · open questions · fog · out of scope), resolving one question at a time via fg-ask until the way is clear, then deleting itself. The agent finds the decisions; you answer them. Use in contexts like 'forge agenda', '의제', '결정 대기열', '뭘 결정해야 하는지 정리해줘', '어디서 시작할지 모르겠다'./fg-agentsGenerates a project's domain agents — conversational grilling derives the recurring roles, then writes standard Claude Code subagent cards to .claude/agents/<role>.md (each `description` carrying a "when to use" so fg-run can dispatch a matching role as agentType). Cards load only at session start, so RESTART the session after generating them before fg-run can use them. On-demand utility outside the loop. Use in contexts like 'forge agents', '도메인 에이전트 만들어', '에이전트 팀 구성', 'create project agents', 'domain agents', 'agent roles'./fg-askGrilling session that stress-tests your plan against the project's domain model, terminology, and documented decisions, updating CONTEXT.md/ADRs inline. The forge loop's entry point (the plan-grilling stage), always conversational. Use to start or refine a task — "start a new task", "start with forge", "let's work on this", "refine the plan", '새 작업 시작', '계획 다듬자', '이 계획 그릴링해줘'./fg-cleanupRetires stale or superseded ADRs out of the active decision set — proposes candidates with rationale, and on your approval moves each to .forge/adr/retired/ (IDs never reused, nothing deleted). fg-ask stops reading retired/ as source of truth, so retired decisions drop out of grilling fuel. On-demand utility outside the loop (sealing a task is fg-done, not this). Use in contexts like 'forge cleanup', 'ADR 정리', '오래된 ADR 치워'./fg-configUnified settings surface for forge — every key in .forge/config.json: `simple` (auto-seal — fg-run verifies then seals in the same turn, no questions), `eco` (sonnet-capped subagents + ECO.md discipline), `tdd` (test-first default), `driveCommit`/`driveCommitMessage`, `defaultBranch`, `monitorRetention`. `fg-config` (no arg) shows all and offers changes via a menu; `fg-config <key> <value>` sets one directly. Outside the loop. Use in contexts like 'forge config', '설정', 'simple mode', '심플 모드', 'eco on', 'eco off', '에코 모드', 'tdd on', 'tdd off', 'TDD 켜', 'TDD 꺼'.Other plugins' skills for the same job