wu:done
wu:done
Section titled “wu:done”Complete WU (merge, stamp, cleanup) from main
Landing modes: the default is a direct, atomic fast-forward merge of the lane branch to main.
Pass --create-pr (alias --pr-mode) to land through a pull request instead: the lane branch
is pushed, a PR is opened with gh, and the direct merge is never attempted. After the PR
merges, finalize the record with pnpm wu:done --id WU-XXX --already-merged.
--already-merged never skips verification. It proves content against the tracking ref
(origin/main): every declared code_path must be present there (already-landed, otherwise
never-implemented refuses), and any lane commits not yet on the tracking ref may touch only
lifecycle metadata for this WU (event ledger, backlog, status, the WU spec) or paths whose
content is already identical. A real source delta is refused with the directive error;
there is no flag that bypasses the proof.
PR mode without gh: a host with no gh binary (e.g. a cloud sandbox) can still
complete branch-pr wu:done. Open the pull request for the lane branch with your platform
tooling first, then pass --pr-url <url>; the metadata commit and push proceed and the URL is
recorded without ever calling gh. An already-open PR for the lane branch (from gh pr create
reporting one exists) is reused instead of failing.
Local main after landing: once the push is verified, wu:done fast-forwards the main
checkout to exactly the completion commit it published, before worktree cleanup, so the landed
change is live there at once (the same fast-forward-only step as pnpm git:sync-main). It does
so only when main is checked out, has no tracked changes and the move is a fast-forward;
otherwise it leaves main where it was, prints the reason, and the landing still succeeds. Run
pnpm git:sync-main afterwards in that case.
Integration target binding
Section titled “Integration target binding”Direct, PR and already-merged completion land on the claim’s pinned integration target (remote, branch, repository identity, baseline and trusted policy), never the current workspace default. A substituted remote or changed policy identity refuses before the merge. The landed target and commit identity survive removal of the claim ref.
Repair: a claim that predates integration-target binding is upgraded through the governed
same-target route. Run pnpm wu:repair --id WU-XXXX --claim --integration-target --check first,
then the same command without --check. It adopts only the destination and policy that canonical
and remote evidence prove, and refuses guesses and conflicts. No command retargets an active claim.
Interrupted wu:done
Section titled “Interrupted wu:done”A wu:done stopped after it committed the done record on the lane branch but before landing
leaves the lane branch saying done while the integration target still says in_progress. That
lane holds unlanded work: wu:repair reports it as INTERRUPTED_DONE (never
ORPHAN_WORKTREE_DONE), never auto-repairs it, and no orphan cleanup deletes a lane branch whose
commits are not on the integration target. Every refusal of this state prints its one exit:
then wu:prep and wu:done. The release backs the lane tip up to
backup/<wu-id>-interrupted-done-<sha>, removes only the unlanded done commit (what wu:done
itself rolls back when a landing fails) and replays every later commit, so the reclaim continues
ordinary retained work. Without --keep-branch the release refuses.
Root and worktree release skew
Section titled “Root and worktree release skew”When the worktree has its own installed @hellmai/lumenflow-cli whose release differs from the CLI
running wu:prep or wu:done, the command refuses before the worktree gates run, naming both
releases and the install command (pnpm --dir "<worktree>" install). Equal releases run as before;
a framework source checkout builds its own branch source and is not compared.
A gates child started with --wu-id and --main-checkout but no --claim-generation (a previous
release’s wu:done re-running gates in a newer worktree) derives the generation from the worktree’s
claim binding and proves it through the same canonical loader as the explicit flag. An absent or
ambiguous binding refuses. A checkpoint-reuse refusal names the base the prep validated and prints
pnpm wu:rebase --id WU-XXXX, then pnpm wu:prep --id WU-XXXX.
Checkpoint reuse and the gate set
Section titled “Checkpoint reuse and the gate set”The gate checkpoint wu:prep writes records the stable ids of the gates it executed and a digest of
the gate configuration that selected them. wu:done resolves the gates it requires with the same
function and reuses the checkpoint only if every required gate was executed and the configuration
digest is unchanged; otherwise reuse is refused with the audited code gate-set-mismatch, and
wu:done runs the full gate set itself. This covers every optional or configurable gate: with
software_delivery.gates.delivery_review.enabled and auto_run: false, prep does not run
delivery_review, so wu:done runs it instead of skipping it. With auto_run: true prep runs it
and the checkpoint is reused. A checkpoint from an older release (schema version 1) is never reused.
Options:
| Flag | Description | Required |
|---|---|---|
--worktree <path> | Override worktree path (default: worktrees/<lane>-<wu-id>) | No |
--no-auto | Skip auto-updating YAML/backlog/status (you staged manually) | No |
--no-remove | Skip worktree removal | No |
--no-merge | Skip auto-merging lane branch to main | No |
--delete-branch | Delete lane branch after merge (both local and remote) | No |
--create-pr | Land via pull request instead of the direct atomic merge (requires gh CLI); finalize the record after the PR merges with —already-merged | No |
--pr-mode | Alias of —create-pr | No |
--pr-draft | Create PR as draft (use with —create-pr or —pr-mode) | No |
--pr-url <url> | PR mode without gh: record an already-open PR for the lane branch (push still happens); open it with your platform tooling first | No |
--skip-gate <name> | Skip a single named gate (repeatable). Requires —reason and —fix-wu. Only gates marked skippable: true (or overridden via software_delivery.gates.overrides.<name>.skippable=true) may be skipped. Per-invocation only: never inherited from an earlier attempt. On a resumed wu:done, restate —skip-gate/—reason/—fix-wu identically on THIS invocation if the skip is still needed. | No |
--skip-gates | REMOVED tombstone: always rejected. Use —skip-gate <name>. | No |
--skip-telemetry-check | Skip the telemetry sync-health gate. Audited to .lumenflow/force-bypasses.log and cloud-visible via governance events. | No |
--docs-only | Run docs-only gates (requires exposure: documentation) | No |
--reason "<text>" | Required with —skip-gate or —override-owner | No |
--fix-wu WU-{id} | Required with —skip-gate: WU ID that will fix the named failure | No |
--allow-todo | Allow TODO comments in code (requires justification in WU notes) | No |
--override-owner | Override ownership check (requires —reason, audited) | No |
--force, -f | Bypass dirty-main pre-merge guard (audited) | No |
--no-auto-rebase | Disable auto-rebase on branch divergence | No |
--already-merged | Skip merge phase; finalize metadata only for code already on main. Requires content proof against the tracking ref: unmerged lane commits may touch only lifecycle metadata or paths identical to origin/main | No |
--require-agents | Block completion if mandatory agents not invoked | No |
--handoff-receipt <receipt> | Consume a durable wu:brief lifecycle handoff receipt for cross-session authority | No |