Skip to content

Cookbook

pnpm wu:create \
  --title "Handle a missing auth user" \
  --lane "Framework: Core" \
  --type bug \
  --exposure backend-only \
  --description "Prevent the auth handler from throwing when the user lookup returns empty" \
  --acceptance "A missing user returns the anonymous response without throwing" \
  --notes "Preserve the existing authenticated response contract" \
  --code-paths "src/auth/handler.ts" \
  --test-paths-unit "src/auth/__tests__/handler.test.ts" \
  --test-paths-manual "Run the auth smoke request with an unknown user and verify the anonymous response"

# Use the generated ID.
pnpm wu:claim --id WU-999 --lane "Framework: Core"
pnpm wu:brief --id WU-999
cd worktrees/framework-core-wu-999

# Implement, test, and commit in the worktree.
pnpm wu:prep --id WU-999

cd /path/to/main
pnpm wu:done --id WU-999
pnpm wu:verify --id WU-999

Parallelize independent WUs across lanes or disjoint paths permitted by the configured WIP limit:

# Terminal 1
pnpm wu:claim --id WU-100 --lane "Framework: Core"
pnpm wu:brief --id WU-100
cd worktrees/framework-core-wu-100

# Terminal 2
pnpm wu:claim --id WU-101 --lane "Content: Documentation"
pnpm wu:brief --id WU-101
cd worktrees/content-documentation-wu-101

Phase numbers do not impose execution order. Use blocked_by relationships when one WU must wait for another.

pnpm wu:block --id WU-042 --reason "Waiting for the upstream API contract"
pnpm wu:unblock --id WU-042

# Hand ownership back without deleting the preserved lane branch.
pnpm wu:release --id WU-042 --keep-branch

# The next owner follows the recovery guidance before reclaiming.
pnpm wu:recover --id WU-042 --action resume
pnpm wu:repair --id WU-042 --claim

If a worktree is missing while its active lane branch remains intact, restore it without resetting the WU:

pnpm wu:recover --id WU-042 --action restore

Use the governed command. It refreshes the changed-file baseline after a successful rebase so unrelated files landed by other WUs do not contaminate completion gates.

cd worktrees/framework-core-wu-042
pnpm wu:rebase --id WU-042

Do not force-push a lane branch or hand-edit baseline_main_sha.

pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm wu:prep --id WU-042

Only a specifically named, configured skippable gate with matching main-branch evidence can be skipped:

cd /path/to/main
pnpm wu:done --id WU-042 \
  --skip-gate lane-health \
  --reason "The same unrelated failure is recorded on main" \
  --fix-wu WU-050

Workers capture discoveries for triage; they do not create an unreviewed WU from inside the active worker session:

pnpm mem:create "Bug: payment handler rejects an empty card list" \
  --type discovery \
  --tags bug,scope-creep \
  --wu WU-042

pnpm mem:signal "Bug discovery captured for triage" --wu WU-042 --intent INFO
pnpm mem:signal "RED test passes; implementing the adapter" --wu WU-042
pnpm mem:checkpoint --wu WU-042
pnpm mem:inbox --since 1h
pnpm wu:brief --id WU-042

Do not copy a legacy flat workspace.yaml block. Use managed commands and fully qualified pack keys:

pnpm lane:create \
  --name "Framework: Core" \
  --wip-limit 1 \
  --add-path "src/core/**"

pnpm lane:edit --name "Framework: Core" --add-path "src/shared/**"
pnpm config:set --key software_delivery.gates.execution.preset --value node
pnpm config:set --key software_delivery.gates.minCoverage --value 90
pnpm config:get --key software_delivery.gates

See Workspace Spec for the distinction between kernel lanes and Software Delivery lane definitions.

# Preview first.
pnpm wu:prune
pnpm wu:prune --remote

# Execute only after reviewing the preview.
pnpm wu:prune --execute
pnpm wu:prune --remote --execute

Cleanup is lease-aware and records recoverable tracked removals. Raw git worktree prune is not the WU lifecycle authority.

TaskCommand
Discover commandspnpm lumenflow:commands
Check WUpnpm wu:status --id WU-XXX
Prepare completionpnpm wu:prep --id WU-XXX
Complete from mainpnpm wu:done --id WU-XXX
Verify completionpnpm wu:verify --id WU-XXX
Inspect lanepnpm lane:list --json
Save contextpnpm mem:checkpoint --wu WU-XXX