@lumenflow/cli 3.10.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +78 -74
  2. package/dist/docs-sync.js +24 -29
  3. package/dist/docs-sync.js.map +1 -1
  4. package/dist/init-lane-validation.js +102 -17
  5. package/dist/init-lane-validation.js.map +1 -1
  6. package/dist/init-scaffolding.js +2 -9
  7. package/dist/init-scaffolding.js.map +1 -1
  8. package/dist/init.js +7 -18
  9. package/dist/init.js.map +1 -1
  10. package/dist/lane-lifecycle-process.js +16 -1
  11. package/dist/lane-lifecycle-process.js.map +1 -1
  12. package/dist/lane-suggest.js +5 -1
  13. package/dist/lane-suggest.js.map +1 -1
  14. package/dist/onboarding-template-paths.js +19 -0
  15. package/dist/onboarding-template-paths.js.map +1 -0
  16. package/dist/public-manifest.js +2 -2
  17. package/dist/public-manifest.js.map +1 -1
  18. package/dist/sync-templates.js +12 -1
  19. package/dist/sync-templates.js.map +1 -1
  20. package/dist/template-directory-resolver.js +71 -0
  21. package/dist/template-directory-resolver.js.map +1 -0
  22. package/dist/wu-done-check.js +33 -13
  23. package/dist/wu-done-check.js.map +1 -1
  24. package/dist/wu-done.js +6 -5
  25. package/dist/wu-done.js.map +1 -1
  26. package/dist/wu-spawn-prompt-builders.js +96 -23
  27. package/dist/wu-spawn-prompt-builders.js.map +1 -1
  28. package/package.json +8 -8
  29. package/packs/sidekick/.turbo/turbo-build.log +1 -1
  30. package/packs/sidekick/package.json +1 -1
  31. package/packs/software-delivery/.turbo/turbo-build.log +1 -1
  32. package/packs/software-delivery/package.json +1 -1
  33. package/templates/core/.lumenflow/constraints.md.template +3 -3
  34. package/templates/core/LUMENFLOW.md.template +17 -17
  35. package/templates/core/UPGRADING.md.template +30 -11
  36. package/templates/core/ai/onboarding/agent-safety-card.md.template +15 -16
  37. package/templates/core/ai/onboarding/first-15-mins.md.template +80 -0
  38. package/templates/core/ai/onboarding/first-wu-mistakes.md.template +3 -3
  39. package/templates/core/ai/onboarding/initiative-orchestration.md.template +1 -1
  40. package/templates/core/ai/onboarding/lane-inference.md.template +64 -0
  41. package/templates/core/ai/onboarding/local-only.md.template +56 -0
  42. package/templates/core/ai/onboarding/quick-ref-commands.md.template +122 -92
  43. package/templates/core/ai/onboarding/starting-prompt.md.template +91 -46
  44. package/templates/core/ai/onboarding/vendor-support.md.template +14 -20
  45. package/templates/core/ai/onboarding/wu-create-checklist.md.template +31 -82
  46. package/templates/core/ai/onboarding/wu-sizing-guide.md.template +48 -0
  47. package/templates/vendors/claude/.claude/skills/bug-classification/SKILL.md.template +2 -2
  48. package/templates/vendors/claude/.claude/skills/code-quality/SKILL.md.template +2 -2
  49. package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +3 -3
  50. package/templates/vendors/claude/.claude/skills/execution-memory/SKILL.md.template +1 -1
  51. package/templates/vendors/claude/.claude/skills/initiative-management/SKILL.md.template +2 -2
  52. package/templates/vendors/claude/.claude/skills/library-first/SKILL.md.template +2 -2
  53. package/templates/vendors/claude/.claude/skills/lumenflow-gates/SKILL.md.template +3 -3
  54. package/templates/vendors/claude/.claude/skills/multi-agent-coordination/SKILL.md.template +2 -2
  55. package/templates/vendors/claude/.claude/skills/tdd-workflow/SKILL.md.template +3 -3
  56. package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +10 -10
  57. package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +3 -3
@@ -27,20 +27,20 @@ Quick reference for AI agents working in LumenFlow projects.
27
27
  | `git stash` (on main) | Hides work |
28
28
  | `git clean -fd` | Deletes files |
29
29
  | Work in main after claim | Breaks isolation |
30
- | Skip wu:done | Incomplete WU |
30
+ | Skip wu:prep or wu:done | Incomplete WU |
31
31
 
32
32
  ---
33
33
 
34
34
  ## Always Do
35
35
 
36
- | Action | Why |
37
- | -------------------------- | ---------------- |
38
- | Read WU spec first | Understand scope |
39
- | cd to worktree after claim | Isolation |
40
- | Write tests before code | TDD |
41
- | Run gates before wu:done | Quality |
42
- | Run wu:done | Complete WU |
43
- | Stay within code_paths | Scope discipline |
36
+ | Action | Why |
37
+ | ------------------------------------ | --------------------------------- |
38
+ | Read WU spec first | Understand scope |
39
+ | cd to worktree after claim | Isolation |
40
+ | Write tests before code | TDD |
41
+ | Run wu:prep in the claimed workspace | Quality and lifecycle correctness |
42
+ | Run wu:done from main | Complete WU |
43
+ | Stay within code_paths | Scope discipline |
44
44
 
45
45
  ---
46
46
 
@@ -96,7 +96,7 @@ If same error happens 3 times:
96
96
 
97
97
  ```bash
98
98
  # Check lane availability
99
- cat docs/04-operations/tasks/status.md
99
+ cat {{DOCS_TASKS_PATH}}/status.md
100
100
 
101
101
  # Claim a WU
102
102
  pnpm wu:claim --id WU-XXX --lane <Lane>
@@ -104,13 +104,11 @@ pnpm wu:claim --id WU-XXX --lane <Lane>
104
104
  # Work in worktree
105
105
  cd worktrees/<lane>-wu-xxx
106
106
 
107
- # Run gates
108
- pnpm gates # Code changes
109
- pnpm gates --docs-only # Docs changes
107
+ # Prep in the claimed workspace
108
+ pnpm wu:prep --id WU-XXX
110
109
 
111
- # Complete WU
112
- cd /path/to/main
113
- pnpm wu:done --id WU-XXX
110
+ # Complete from main
111
+ cd /path/to/main && pnpm wu:done --id WU-XXX
114
112
  ```
115
113
 
116
114
  ---
@@ -118,6 +116,7 @@ pnpm wu:done --id WU-XXX
118
116
  ## Completion Checklist
119
117
 
120
118
  - [ ] Gates pass
119
+ - [ ] Run wu:prep in the claimed workspace
121
120
  - [ ] cd to main
122
121
  - [ ] Run wu:done
123
122
  - [ ] Verify success output
@@ -0,0 +1,80 @@
1
+ # First 15 Minutes with LumenFlow
2
+
3
+ **Last updated:** {{DATE}}
4
+
5
+ A fast start for agents entering an existing LumenFlow project.
6
+
7
+ ---
8
+
9
+ ## Minute 0-2: Verify the Workspace
10
+
11
+ ```bash
12
+ ls LUMENFLOW.md AGENTS.md workspace.yaml
13
+ pnpm exec lumenflow doctor
14
+ ```
15
+
16
+ If the doctor reports a repo-level problem, stop there and fix it before claiming work.
17
+
18
+ ---
19
+
20
+ ## Minute 2-5: Read the Required Docs
21
+
22
+ 1. Open `LUMENFLOW.md` for the lifecycle overview.
23
+ 2. Scan `AGENTS.md` for repo-specific workflow rules.
24
+ 3. Review `.lumenflow/constraints.md` for the non-negotiables.
25
+ 4. Open `starting-prompt.md` if you need the full onboarding flow.
26
+
27
+ ---
28
+
29
+ ## Minute 5-8: Find the Work
30
+
31
+ ```bash
32
+ cat {{DOCS_TASKS_PATH}}/status.md
33
+ ls {{DOCS_TASKS_PATH}}/wu/*.yaml | head -5
34
+ ```
35
+
36
+ Read the assigned WU spec before touching files.
37
+
38
+ ---
39
+
40
+ ## Minute 8-12: Claim and Move
41
+
42
+ ```bash
43
+ pnpm wu:claim --id WU-XXX --lane "Framework: CLI"
44
+ cd worktrees/framework-cli-wu-xxx
45
+ pnpm bootstrap
46
+ ```
47
+
48
+ After `wu:claim`, all implementation work happens in the worktree, not in the main checkout.
49
+
50
+ ---
51
+
52
+ ## Minute 12-15: Start the Right Cycle
53
+
54
+ For code WUs:
55
+
56
+ ```bash
57
+ pnpm test -- --run
58
+ ```
59
+
60
+ For docs-heavy WUs:
61
+
62
+ ```bash
63
+ pnpm format {{DOCS_ONBOARDING_PATH}}/*.md
64
+ ```
65
+
66
+ Before completion, always use the two-step flow:
67
+
68
+ ```bash
69
+ pnpm wu:prep --id WU-XXX
70
+ cd <project-root> && pnpm wu:done --id WU-XXX
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Key Reminders
76
+
77
+ - Stay in the claimed worktree.
78
+ - Run `pnpm lumenflow:commands` for public CLI discovery, then `--help` before first use.
79
+ - Use `pnpm wu:prep` before `pnpm wu:done`; do not jump straight to `wu:done`.
80
+ - If context starts getting heavy, read `./wu-sizing-guide.md` before pushing further.
@@ -254,7 +254,7 @@ pnpm wu:edit --id WU-1348 --notes "Research findings: ..."
254
254
  **Option 2: Direct file edit**
255
255
 
256
256
  ```bash
257
- # Edit docs/04-operations/tasks/wu/WU-1348.yaml directly
257
+ # Edit {{DOCS_TASKS_PATH}}/wu/WU-1348.yaml directly
258
258
  ```
259
259
 
260
260
  ### Recognizing Implied Directives
@@ -311,7 +311,7 @@ sizing_estimate:
311
311
  exception_reason: All markdown documentation files, low complexity
312
312
  ```
313
313
 
314
- 2. **Split the WU** if the estimate genuinely exceeds session capacity (see [wu-sizing-guide.md](../../wu-sizing-guide.md) section 3 for splitting patterns).
314
+ 2. **Split the WU** if the estimate genuinely exceeds session capacity (see [wu-sizing-guide.md](./wu-sizing-guide.md) section 3 for splitting patterns).
315
315
 
316
316
  **Strict mode:** Teams can enforce sizing compliance for delegated work with `--strict-sizing` on `wu:brief`. In strict mode, missing or non-compliant sizing metadata blocks the operation.
317
317
 
@@ -320,7 +320,7 @@ sizing_estimate:
320
320
  pnpm wu:brief --id WU-XXX --client claude-code --strict-sizing
321
321
  ```
322
322
 
323
- See the [WU Sizing Guide](../../wu-sizing-guide.md) section 1.4 for the full contract specification.
323
+ See the [WU Sizing Guide](./wu-sizing-guide.md) section 1.4 for the full contract specification.
324
324
 
325
325
  ---
326
326
 
@@ -10,7 +10,7 @@ Step-by-step guide for agents orchestrating multi-WU initiatives. This document
10
10
 
11
11
  Before orchestrating an initiative, ensure:
12
12
 
13
- 1. The initiative YAML exists at `docs/04-operations/tasks/initiatives/INIT-XXX.yaml`
13
+ 1. The initiative YAML exists at `{{DOCS_TASKS_PATH}}/initiatives/INIT-XXX.yaml`
14
14
  2. All WUs are linked to the initiative via `initiative:add-wu`
15
15
  3. Dependencies between WUs are defined (blocking relationships)
16
16
  4. Lane lifecycle is locked (`pnpm lane:status` shows `locked`)
@@ -0,0 +1,64 @@
1
+ # Lane Inference
2
+
3
+ **Last updated:** {{DATE}}
4
+
5
+ Lanes define which area of the system a WU belongs to. Use the lane tools before creating or reshaping work.
6
+
7
+ ---
8
+
9
+ ## The Two Inputs
10
+
11
+ Lane fit is driven by:
12
+
13
+ 1. The WU `code_paths`
14
+ 2. The implementation description or acceptance criteria
15
+
16
+ If those disagree with the assigned lane, fix the lane or split the WU.
17
+
18
+ ---
19
+
20
+ ## Runtime Checks
21
+
22
+ ```bash
23
+ pnpm wu:infer-lane --id WU-XXX
24
+ pnpm lane:status
25
+ ```
26
+
27
+ Use `wu:infer-lane` for a WU-level recommendation and `lane:status` for current lifecycle state.
28
+
29
+ ---
30
+
31
+ ## Taxonomy Source
32
+
33
+ Lane metadata is stored in `.lumenflow.lane-inference.yaml`.
34
+
35
+ Regenerate it when taxonomy drifts from `workspace.yaml`:
36
+
37
+ ```bash
38
+ pnpm lane:suggest --output .lumenflow.lane-inference.yaml
39
+ pnpm lane:validate
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Before Delivery WUs
45
+
46
+ Lane lifecycle must be complete before the first delivery WU:
47
+
48
+ ```bash
49
+ pnpm lane:setup
50
+ pnpm lane:validate
51
+ pnpm lane:lock
52
+ ```
53
+
54
+ `locked` means delivery WUs can be created safely.
55
+
56
+ ---
57
+
58
+ ## Common Failure Mode
59
+
60
+ If a WU touches files outside the assigned lane's code paths, do not just keep coding.
61
+
62
+ - Propose a lane change if the WU is genuinely in the wrong lane.
63
+ - Split the WU if the work spans multiple lanes.
64
+ - Update the taxonomy only when the lane model itself is outdated.
@@ -0,0 +1,56 @@
1
+ # Local-Only Development
2
+
3
+ **Last updated:** {{DATE}}
4
+
5
+ Use this local-only mode when the repo has no `origin` remote yet or you are intentionally working offline.
6
+
7
+ ---
8
+
9
+ ## Raw YAML Configuration
10
+
11
+ Set the workspace config under `software_delivery.git`:
12
+
13
+ ```yaml
14
+ software_delivery:
15
+ git:
16
+ requireRemote: false
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Safer CLI Alternative
22
+
23
+ Use the config command when possible instead of editing YAML directly:
24
+
25
+ ```bash
26
+ pnpm config:set --key git.requireRemote --value false
27
+ ```
28
+
29
+ The `git.requireRemote` dotpath is rooted under `software_delivery`.
30
+
31
+ ---
32
+
33
+ ## Behavior Changes
34
+
35
+ When `requireRemote: false`:
36
+
37
+ - `wu:create` skips remote fetch requirements.
38
+ - `wu:claim` can proceed without pushing a lane branch.
39
+ - Local evaluation and air-gapped testing remain unblocked.
40
+
41
+ When `requireRemote: true` (default):
42
+
43
+ - `wu:create` and `wu:claim` expect `origin/main`.
44
+ - Team-visible coordination happens through the remote.
45
+
46
+ ---
47
+
48
+ ## Transitioning Back to Remote Mode
49
+
50
+ ```bash
51
+ pnpm config:set --key git.requireRemote --value true
52
+ git remote add origin <url>
53
+ git push -u origin main
54
+ ```
55
+
56
+ If the repo already has the correct remote, you can simply remove the override and resume the standard workflow.
@@ -5,10 +5,10 @@
5
5
  Reference for CLI commands. Organized by category for quick discovery.
6
6
 
7
7
  > **Rule (WU-1358, WU-1530, WU-2228):** This document is a quick reference, not the complete list.
8
- > LumenFlow has 100+ commands. To see ALL available commands:
8
+ > Use `pnpm lumenflow:commands` for the public CLI surface:
9
9
  >
10
10
  > ```bash
11
- > pnpm lumenflow:commands # List ALL CLI commands the authoritative source
11
+ > pnpm lumenflow:commands # List public commands, aliases, and legacy surfaces
12
12
  > ```
13
13
  >
14
14
  > Before using any unfamiliar command, run `--help` first:
@@ -21,6 +21,9 @@ Reference for CLI commands. Organized by category for quick discovery.
21
21
  >
22
22
  > **Never conclude a command doesn't exist without running `pnpm lumenflow:commands` first.**
23
23
  >
24
+ > Repo-only scripts such as `pnpm docs:validate`, `pnpm docs:generate`, and
25
+ > `pnpm pre-release:check` are maintainer scripts, not part of the public CLI manifest.
26
+ >
24
27
  > Maintainer reference for validation ownership: [validator-boundaries.md](../../validator-boundaries.md).
25
28
 
26
29
  ## Help-First Usage Examples By Category
@@ -36,7 +39,7 @@ Run `--help` first, then run the real command with explicit flags.
36
39
  | Gates & Quality | `pnpm gates --help` | `pnpm gates --docs-only` |
37
40
  | Memory & Sessions | `pnpm mem:checkpoint --help` | `pnpm mem:checkpoint --wu WU-1561` |
38
41
  | State Management | `pnpm state:doctor --help` | `pnpm state:doctor --json` |
39
- | Dependencies | `pnpm deps:add --help` | `pnpm deps:add --pkg zod` |
42
+ | Repo-Only Scripts | `pnpm docs:validate --help` | `pnpm docs:validate` |
40
43
  | Plans | `pnpm plan:link --help` | `pnpm plan:link --id INIT-021 --plan lumenflow://plans/INIT-021-plan.md` |
41
44
  | Initiatives | `pnpm initiative:status --help` | `pnpm initiative:status --id INIT-021` |
42
45
  | Orchestration | `pnpm orchestrate:init-status --help` | `pnpm orchestrate:init-status --id INIT-021` |
@@ -53,23 +56,25 @@ Run `--help` first, then run the real command with explicit flags.
53
56
 
54
57
  **For this monorepo (development):**
55
58
 
56
- | Command | Description |
57
- | -------------------------- | ------------------------------------------------- |
58
- | `pnpm setup` | Install deps and build CLI (first time) |
59
- | `pnpm bootstrap` | Build CLI with dependency closure (worktree-safe) |
60
- | `pnpm build` | Build all packages |
61
- | `pnpm build:dist` | Build distribution packages |
62
- | `pnpm dev` | Start development mode |
63
- | `pnpm clean` | Clean build artifacts and caches |
64
- | `pnpm pack:all` | Pack all packages for distribution |
65
- | `pnpm lumenflow:init` | Scaffold LumenFlow in a project |
66
- | `pnpm docs:sync` | Sync agent docs (for upgrades) |
67
- | `pnpm sync:templates` | Sync templates to project |
68
- | `pnpm lumenflow:upgrade` | Upgrade LumenFlow packages |
69
- | `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration |
70
- | `pnpm lumenflow:integrate` | Generate enforcement hooks for client |
71
- | `pnpm cloud:connect` | Configure cloud control-plane access |
72
- | `npx lumenflow commands` | List all available CLI commands |
59
+ | Command | Description |
60
+ | -------------------------------------------------- | -------------------------------------------------------------- |
61
+ | `pnpm setup` | Install deps and build CLI (first time) |
62
+ | `pnpm bootstrap` | Build CLI with dependency closure (worktree-safe) |
63
+ | `pnpm build` | Build all packages |
64
+ | `pnpm build:dist` | Build distribution packages |
65
+ | `pnpm dev` | Start development mode |
66
+ | `pnpm clean` | Clean build artifacts and caches |
67
+ | `pnpm pack:all` | Pack all packages for distribution |
68
+ | `pnpm exec lumenflow init` | Scaffold LumenFlow in a project |
69
+ | `pnpm exec lumenflow init --docs-structure simple` | Use simple docs structure (`docs/tasks`) |
70
+ | `pnpm exec lumenflow init --docs-structure arc42` | Use arc42 docs structure (`{{DOCS_OPERATIONS_PATH}}`) |
71
+ | `pnpm docs:sync --force` | Refresh scaffolded onboarding docs and supported vendor assets |
72
+ | `pnpm sync:templates` | Sync repo docs into bundled templates |
73
+ | `pnpm lumenflow:upgrade` | Upgrade LumenFlow packages |
74
+ | `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration |
75
+ | `pnpm lumenflow:integrate` | Generate enforcement hooks for client |
76
+ | `pnpm cloud:connect` | Configure cloud control-plane access |
77
+ | `npx lumenflow commands` | List all available CLI commands |
73
78
 
74
79
  **For external projects (end users):**
75
80
 
@@ -78,12 +83,12 @@ Run `--help` first, then run the real command with explicit flags.
78
83
  pnpm add -D @lumenflow/cli # or: npm install -D @lumenflow/cli
79
84
 
80
85
  # Initialize LumenFlow
81
- pnpm exec lumenflow
86
+ pnpm exec lumenflow init
82
87
 
83
88
  # With client-specific overlays
84
- pnpm exec lumenflow --client claude # Claude Code
85
- pnpm exec lumenflow --client cursor # Cursor IDE
86
- pnpm exec lumenflow --client all # All clients
89
+ pnpm exec lumenflow init --client claude # Claude Code
90
+ pnpm exec lumenflow init --client cursor # Cursor IDE
91
+ pnpm exec lumenflow init --client all # All clients
87
92
  ```
88
93
 
89
94
  ---
@@ -93,21 +98,29 @@ pnpm exec lumenflow --client all # All clients
93
98
  These commands use **micro-worktree isolation** internally — they handle their own
94
99
  commit and push atomically. Do NOT wrap them in a WU or use raw `pnpm update`/`git commit`.
95
100
 
96
- | Command | Description |
97
- | ------------------------------------------------- | ----------------------------------------- |
98
- | `pnpm lumenflow:upgrade --version 3.5.0` | Upgrade all 7 @lumenflow/\* packages |
99
- | `pnpm lumenflow:upgrade --latest` | Upgrade to latest version |
100
- | `pnpm lumenflow:upgrade --latest --dry-run` | Preview upgrade without executing |
101
- | `pnpm config:set --key <dotpath> --value <value>` | Set workspace.yaml config (Zod-validated) |
102
- | `pnpm config:get --key <dotpath>` | Read workspace.yaml config |
103
- | `pnpm cloud:connect` | Configure cloud control-plane access |
104
- | `pnpm docs:sync` | Sync agent docs after upgrade |
105
- | `pnpm sync:templates` | Sync templates to project |
101
+ | Command | Description |
102
+ | ------------------------------------------------- | ------------------------------------------------ |
103
+ | `pnpm lumenflow:upgrade --version 3.5.0` | Upgrade all 7 @lumenflow/\* packages |
104
+ | `pnpm lumenflow:upgrade --latest` | Upgrade to latest version |
105
+ | `pnpm lumenflow:upgrade --latest --dry-run` | Preview upgrade without executing |
106
+ | `pnpm config:set --key <dotpath> --value <value>` | Set workspace.yaml config (Zod-validated) |
107
+ | `pnpm config:get --key <dotpath>` | Read workspace.yaml config |
108
+ | `pnpm cloud:connect` | Configure cloud control-plane access |
109
+ | `pnpm docs:sync --force` | Refresh scaffolded onboarding docs after upgrade |
110
+ | `pnpm sync:templates` | Sync repo docs into bundled templates |
106
111
 
107
112
  **Key principle:** If a LumenFlow CLI command exists for the operation, use it instead of
108
113
  raw pnpm/git. These tooling commands commit directly to main via micro-worktree — no dirty
109
114
  files, no manual git, no WU ceremony. Only actual **code changes** need WUs.
110
115
 
116
+ `docs:sync` refreshes the scaffolded onboarding set plus supported vendor assets. Existing
117
+ tracked docs are skipped by default; use `--force` when you intentionally want the refresh.
118
+
119
+ For existing installs, upgrade packages first with `pnpm lumenflow:upgrade --latest`, then run
120
+ `pnpm docs:sync --force` if you want refreshed onboarding docs and vendor assets. The improved
121
+ default `wu:brief` behavior comes from the package upgrade itself. New installs get those defaults
122
+ automatically, and `.lumenflow/templates/` remains optional unless you want custom overrides.
123
+
111
124
  > **Anti-pattern:** Do NOT use `pnpm update @lumenflow/*` to upgrade packages.
112
125
  > This leaves dirty `package.json` and `pnpm-lock.yaml` on main.
113
126
  > Use `pnpm lumenflow:upgrade` instead — it handles everything atomically.
@@ -116,25 +129,28 @@ files, no manual git, no WU ceremony. Only actual **code changes** need WUs.
116
129
 
117
130
  ## WU Lifecycle
118
131
 
119
- | Command | Description |
120
- | ----------------------------------------------- | --------------------------------------------------------------------- |
121
- | `pnpm wu:create --lane <Lane> --title "..." ..` | Create new WU spec (ID auto-generated; see fields below) |
122
- | `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree (default) |
123
- | `pnpm wu:claim --id WU-XXX --lane <L> --cloud` | Claim WU in cloud/branch-pr mode (no worktree) |
124
- | `pnpm wu:prep --id WU-XXX [--full-tests]` | Run gates, prep for wu:done (`tests.unit` scoped by default) |
125
- | `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, stamp, cleanup) |
126
- | `pnpm wu:edit --id WU-XXX --description "..."` | Edit WU spec fields (run --help for all flags) |
127
- | `pnpm wu:escalate --id WU-XXX` | Show escalation status for a WU |
128
- | `pnpm wu:escalate --resolve --id WU-XXX` | Resolve escalation (sets resolved_by/resolved_at) |
129
- | `pnpm wu:block --id WU-XXX --reason "..."` | Block WU with reason |
130
- | `pnpm wu:unblock --id WU-XXX` | Unblock WU |
131
- | `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
132
- | `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
133
- | `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt + record evidence (claimed workspace/branch) |
134
- | `pnpm wu:brief --id WU-XXX --evidence-only` | Record wu:brief evidence only (self-implementation, no prompt output) |
135
- | `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
136
- | `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt, record lineage, and store brief hash attestation |
137
- | `pnpm wu:sandbox --id WU-XXX -- <cmd>` | Run command through hardened WU sandbox backend |
132
+ | Command | Description |
133
+ | -------------------------------------------------------------- | --------------------------------------------------------------------- |
134
+ | `pnpm wu:create --lane <Lane> --title "..." ..` | Create new WU spec (ID auto-generated; see fields below) |
135
+ | `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree (default) |
136
+ | `pnpm wu:claim --id WU-XXX --lane <L> --cloud` | Claim WU in cloud/branch-pr mode (no worktree) |
137
+ | `pnpm wu:prep --id WU-XXX [--full-tests]` | Run gates, prep for wu:done (`tests.unit` scoped by default) |
138
+ | `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, stamp, cleanup) |
139
+ | `pnpm wu:edit --id WU-XXX --description "..."` | Edit WU spec fields (run --help for all flags) |
140
+ | `pnpm wu:escalate --id WU-XXX` | Show escalation status for a WU |
141
+ | `pnpm wu:escalate --resolve --id WU-XXX` | Resolve escalation (sets resolved_by/resolved_at) |
142
+ | `pnpm approval:request --type <type> --subject <json>` | Request control-plane approval for an action |
143
+ | `pnpm approval:review --id <approvalId> --decision <decision>` | Resolve an approval decision (`approved`/`rejected`/`expired`) |
144
+ | `pnpm approval:list [--status <status>]` | List approvals with optional status/type filters |
145
+ | `pnpm wu:block --id WU-XXX --reason "..."` | Block WU with reason |
146
+ | `pnpm wu:unblock --id WU-XXX` | Unblock WU |
147
+ | `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
148
+ | `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
149
+ | `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt + record evidence (claimed workspace/branch) |
150
+ | `pnpm wu:brief --id WU-XXX --evidence-only` | Record wu:brief evidence only (self-implementation, no prompt output) |
151
+ | `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
152
+ | `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt, record lineage, and store brief hash attestation |
153
+ | `pnpm wu:sandbox --id WU-XXX -- <cmd>` | Run command through hardened WU sandbox backend |
138
154
 
139
155
  ### WU Maintenance
140
156
 
@@ -156,23 +172,23 @@ files, no manual git, no WU ceremony. Only actual **code changes** need WUs.
156
172
 
157
173
  ## Gates & Quality
158
174
 
159
- | Command | Description |
160
- | --------------------------------- | ----------------------------------------------- |
161
- | `pnpm gates` | Run all quality gates |
162
- | `pnpm gates --docs-only` | Run gates for docs changes |
163
- | `pnpm format` | Format all files (Prettier) |
164
- | `pnpm format:check` | Check formatting without changes |
165
- | `pnpm lint` | Run ESLint |
166
- | `pnpm typecheck` | Run TypeScript type checking |
167
- | `pnpm test` | Run all tests (Vitest) |
168
- | `pnpm spec:linter` | Validate WU specs (all) ¹ |
169
- | `pnpm lane:health` | Check lane config health |
170
- | `pnpm lane:suggest --paths "..."` | Suggest lane for code paths |
171
- | `pnpm lane:status` | Show lane lifecycle status |
172
- | `pnpm lane:setup` | Create/update draft lane config |
173
- | `pnpm lane:validate` | Validate lane draft artifacts |
174
- | `pnpm lane:lock` | Lock lane lifecycle for WU create |
175
- | `pnpm lane:edit --lane <L>` | Edit lane definition (rename, wip-limit, paths) |
175
+ | Command | Description |
176
+ | ----------------------------------------------------------- | --------------------------------------------------------- |
177
+ | `pnpm gates` | Run all quality gates |
178
+ | `pnpm gates --docs-only` | Run gates for docs changes |
179
+ | `pnpm format` | Format all files (Prettier) |
180
+ | `pnpm format:check` | Check formatting without changes |
181
+ | `pnpm lint` | Run ESLint |
182
+ | `pnpm typecheck` | Run TypeScript type checking |
183
+ | `pnpm test` | Run all tests (Vitest) |
184
+ | `pnpm spec:linter` | Validate WU specs (all) ¹ |
185
+ | `pnpm lane:health` | Check lane config health |
186
+ | `pnpm lane:suggest --output .lumenflow.lane-inference.yaml` | Regenerate lane inference taxonomy from project structure |
187
+ | `pnpm lane:status` | Show lane lifecycle status |
188
+ | `pnpm lane:setup` | Create/update draft lane config |
189
+ | `pnpm lane:validate` | Validate lane draft artifacts |
190
+ | `pnpm lane:lock` | Lock lane lifecycle for WU create |
191
+ | `pnpm lane:edit --name <L>` | Edit lane definition (rename, wip-limit, paths) |
176
192
 
177
193
  ¹ **Script aliases:** `spec:linter` and `tasks:validate` are pnpm script aliases
178
194
  for `wu:validate --all`. They are not standalone CLI commands.
@@ -281,12 +297,17 @@ and [YAML editing policy](../../../../../.lumenflow/rules/yaml-editing-policy.md
281
297
 
282
298
  ---
283
299
 
284
- ## Dependencies
300
+ ## Repo-Only Scripts
301
+
302
+ These scripts are useful in this monorepo, but they are **repo-only scripts** rather than part of
303
+ the public CLI surface shown by `pnpm lumenflow:commands`.
285
304
 
286
- | Command | Description |
287
- | ------------------------------- | ------------------------------ |
288
- | `pnpm deps:add --pkg <name>` | Add dependency to package |
289
- | `pnpm deps:remove --pkg <name>` | Remove dependency from package |
305
+ | Command | Description |
306
+ | ------------------------ | -------------------------------------- |
307
+ | `pnpm docs:validate` | Validate generated docs against source |
308
+ | `pnpm docs:generate` | Regenerate docs outputs |
309
+ | `pnpm pre-release:check` | Run pre-release verification |
310
+ | `pnpm release:changeset` | Create or update release changesets |
290
311
 
291
312
  ---
292
313
 
@@ -305,6 +326,7 @@ stub in `$LUMENFLOW_HOME/plans/` and automatically set the WU's `plan` field to
305
326
  | Command | Description |
306
327
  | ------------------------------------------------------------------------ | ------------------------------------------------------------------- |
307
328
  | `pnpm plan:create --id INIT-XXX --title "..."` | Create a repo-native plan file in configured `directories.plansDir` |
329
+ | `pnpm plan:create --id INIT-XXX --title "..." --from <path>` | Import external plan file into repo plansDir |
308
330
  | `pnpm plan:edit --id INIT-XXX --section Goal --content "..."` | Edit a section in a plan file |
309
331
  | `pnpm plan:link --id INIT-XXX --plan lumenflow://plans/INIT-XXX-plan.md` | Link plan URI to initiative or WU |
310
332
  | `pnpm plan:promote --id INIT-XXX` | Promote plan status to approved |
@@ -319,6 +341,9 @@ stub in `$LUMENFLOW_HOME/plans/` and automatically set the WU's `plan` field to
319
341
  # Create a plan
320
342
  pnpm plan:create --id INIT-001 --title "Auth System Rollout"
321
343
 
344
+ # Import an external plan into the repo
345
+ pnpm plan:create --id INIT-001 --title "Auth System Rollout" --from ~/.claude/plans/my-plan.md
346
+
322
347
  # Link plan URI to initiative
323
348
  pnpm plan:link --id INIT-001 --plan lumenflow://plans/INIT-001-plan.md
324
349
  ```
@@ -399,6 +424,7 @@ For the complete orchestration workflow (delegation, memory coordination, failur
399
424
  | `pnpm flow:report` | Generate flow metrics report |
400
425
  | `pnpm flow:bottlenecks` | Identify flow bottlenecks |
401
426
  | `pnpm metrics:snapshot` | Capture metrics snapshot |
427
+ | `pnpm cost:summary` | Summarize local cost telemetry by model, agent, and WU |
402
428
  | `pnpm metrics` | View workflow metrics |
403
429
  | `pnpm strict:progress` | Report strict TypeScript backlog and guard regressions |
404
430
 
@@ -647,6 +673,16 @@ Check current lifecycle state any time:
647
673
  pnpm lane:status
648
674
  ```
649
675
 
676
+ ### Lane Taxonomy Drift (workspace.yaml vs inference)
677
+
678
+ If lane commands report drift between `workspace.yaml` lane definitions and
679
+ `.lumenflow.lane-inference.yaml`, sync taxonomy first, then re-validate:
680
+
681
+ ```bash
682
+ pnpm lane:suggest --interactive --output .lumenflow.lane-inference.yaml
683
+ pnpm lane:validate
684
+ ```
685
+
650
686
  ---
651
687
 
652
688
  ## Local / Offline Behavior (No Remote)
@@ -656,8 +692,9 @@ By default, `wu:create` and `wu:claim` expect an `origin` remote and will fetch
656
692
  For local-only or offline development, add this to `workspace.yaml`:
657
693
 
658
694
  ```yaml
659
- git:
660
- requireRemote: false
695
+ software_delivery:
696
+ git:
697
+ requireRemote: false
661
698
  ```
662
699
 
663
700
  When `requireRemote: false`:
@@ -677,9 +714,9 @@ When `requireRemote: true` (default):
677
714
 
678
715
  | Path | Description |
679
716
  | ----------------------------------------- | -------------------- |
680
- | `docs/04-operations/tasks/wu/WU-XXX.yaml` | WU specification |
681
- | `docs/04-operations/tasks/status.md` | Current status board |
682
- | `docs/04-operations/tasks/backlog.md` | Backlog summary |
717
+ | `{{DOCS_TASKS_PATH}}/wu/WU-XXX.yaml` | WU specification |
718
+ | `{{DOCS_TASKS_PATH}}/status.md` | Current status board |
719
+ | `{{DOCS_TASKS_PATH}}/backlog.md` | Backlog summary |
683
720
  | `.lumenflow/stamps/WU-XXX.done` | Completion stamp |
684
721
  | `worktrees/<lane>-wu-xxx/` | Worktree directory |
685
722
 
@@ -740,18 +777,11 @@ pnpm wu:cleanup --id WU-XXX
740
777
  - Regenerates backlog.md and status.md
741
778
  - Deletes the lane branch (local and remote)
742
779
 
743
- **Cloud auto-detection (opt-in):**
780
+ **Cloud activation is explicit-only:**
744
781
 
745
- ```yaml
746
- # workspace.yaml
747
- cloud:
748
- auto_detect: true # default: false
749
- env_signals:
750
- - name: CI
751
- - name: CODEX
752
- - name: GITHUB_ACTIONS
753
- equals: 'true'
754
- ```
782
+ Branch-PR mode activates only through `--cloud` or `LUMENFLOW_CLOUD=1`.
783
+ Runtime identity env vars such as `CLAUDECODE`, `CODEX`, `CI`, and configured
784
+ `cloud.auto_detect` / `env_signals` values do not activate cloud mode.
755
785
 
756
786
  ### Enforcement Hooks (WU-1367)
757
787
 
@@ -790,4 +820,4 @@ For a complete picture of how all WU commands, memory tools, and orchestration t
790
820
  - **[Failure-Mode Runbook](../../lumenflow-agent-capsule.md)** -- Concrete remediation for main-behind-origin, partial-claim state, spawn-provenance enforcement, and wu:recover usage
791
821
  - **[Troubleshooting wu:done](./troubleshooting-wu-done.md)** -- Most common agent mistake (two-step wu:prep + wu:done workflow)
792
822
  - **[First WU Mistakes](./first-wu-mistakes.md)** -- Common first-time pitfalls and how to avoid them
793
- - **[WU Sizing Guide](../../wu-sizing-guide.md)** -- Context safety triggers, complexity assessment, and session strategies
823
+ - **[WU Sizing Guide](./wu-sizing-guide.md)** -- Context safety triggers, complexity assessment, and session strategies