@lumenflow/cli 3.18.0 → 3.19.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 (63) hide show
  1. package/README.md +44 -43
  2. package/dist/config-set.js +10 -1
  3. package/dist/config-set.js.map +1 -1
  4. package/dist/docs-sync.js +123 -6
  5. package/dist/docs-sync.js.map +1 -1
  6. package/dist/gate-co-change.js +28 -6
  7. package/dist/gate-co-change.js.map +1 -1
  8. package/dist/gates-runners.js +108 -12
  9. package/dist/gates-runners.js.map +1 -1
  10. package/dist/initiative-edit.js +8 -3
  11. package/dist/initiative-edit.js.map +1 -1
  12. package/dist/lumenflow-upgrade.js +50 -0
  13. package/dist/lumenflow-upgrade.js.map +1 -1
  14. package/dist/public-manifest.js +1 -1
  15. package/dist/public-manifest.js.map +1 -1
  16. package/dist/sync-templates.js +13 -0
  17. package/dist/sync-templates.js.map +1 -1
  18. package/dist/wu-block.js +10 -0
  19. package/dist/wu-block.js.map +1 -1
  20. package/dist/wu-claim-validation.js +3 -1
  21. package/dist/wu-claim-validation.js.map +1 -1
  22. package/dist/wu-claim.js +3 -1
  23. package/dist/wu-claim.js.map +1 -1
  24. package/dist/wu-done-memory-telemetry.js +5 -1
  25. package/dist/wu-done-memory-telemetry.js.map +1 -1
  26. package/dist/wu-done-ownership.js +6 -0
  27. package/dist/wu-done-ownership.js.map +1 -1
  28. package/dist/wu-edit-operations.js +4 -4
  29. package/dist/wu-edit-operations.js.map +1 -1
  30. package/dist/wu-prep.js +88 -13
  31. package/dist/wu-prep.js.map +1 -1
  32. package/dist/wu-recover.js +15 -0
  33. package/dist/wu-recover.js.map +1 -1
  34. package/dist/wu-release.js +10 -1
  35. package/dist/wu-release.js.map +1 -1
  36. package/dist/wu-spawn-prompt-builders.js +27 -2
  37. package/dist/wu-spawn-prompt-builders.js.map +1 -1
  38. package/dist/wu-state-mutation-ownership.js +136 -0
  39. package/dist/wu-state-mutation-ownership.js.map +1 -0
  40. package/dist/wu-unblock.js +10 -0
  41. package/dist/wu-unblock.js.map +1 -1
  42. package/package.json +111 -110
  43. package/packs/agent-runtime/.turbo/turbo-build.log +1 -1
  44. package/packs/agent-runtime/package.json +1 -1
  45. package/packs/sidekick/.turbo/turbo-build.log +1 -1
  46. package/packs/sidekick/package.json +1 -1
  47. package/packs/software-delivery/.turbo/turbo-build.log +1 -1
  48. package/packs/software-delivery/package.json +1 -1
  49. package/templates/core/AGENTS.md.template +157 -32
  50. package/templates/core/LUMENFLOW.md.template +44 -29
  51. package/templates/core/_frameworks/lumenflow/wu-sizing-guide.md.template +644 -0
  52. package/templates/core/ai/onboarding/agent-invocation-guide.md.template +5 -5
  53. package/templates/core/ai/onboarding/agent-safety-card.md.template +1 -0
  54. package/templates/core/ai/onboarding/docs-generation.md.template +94 -4
  55. package/templates/core/ai/onboarding/first-15-mins.md.template +1 -1
  56. package/templates/core/ai/onboarding/first-wu-mistakes.md.template +2 -1
  57. package/templates/core/ai/onboarding/initiative-orchestration.md.template +21 -21
  58. package/templates/core/ai/onboarding/quick-ref-commands.md.template +102 -95
  59. package/templates/core/ai/onboarding/release-process.md.template +12 -12
  60. package/templates/core/ai/onboarding/starting-prompt.md.template +31 -31
  61. package/templates/vendors/claude/.claude/skills/initiative-management/SKILL.md.template +2 -2
  62. package/templates/vendors/claude/.claude/skills/multi-agent-coordination/SKILL.md.template +2 -2
  63. package/templates/vendors/claude/.claude/skills/orchestration/SKILL.md.template +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/cli",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "description": "Command-line interface for LumenFlow workflow framework",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -31,127 +31,128 @@
31
31
  }
32
32
  },
33
33
  "bin": {
34
- "wu-claim": "./dist/wu-claim.js",
35
- "wu-sandbox": "./dist/wu-sandbox.js",
36
- "wu-done": "./dist/wu-done.js",
37
- "wu-prep": "./dist/wu-prep.js",
38
- "wu-block": "./dist/wu-block.js",
39
- "wu-unblock": "./dist/wu-unblock.js",
40
- "wu-create": "./dist/wu-create.js",
41
- "wu-proto": "./dist/wu-proto.js",
42
- "wu-edit": "./dist/wu-edit.js",
43
- "wu-escalate": "./dist/wu-escalate.js",
44
- "approval-request": "./dist/approval-request.js",
45
- "approval-review": "./dist/approval-review.js",
46
- "approval-list": "./dist/approval-list.js",
47
- "wu-brief": "./dist/wu-brief.js",
48
- "wu-delegate": "./dist/wu-delegate.js",
49
- "wu-validate": "./dist/wu-validate.js",
50
- "wu-preflight": "./dist/wu-preflight.js",
51
- "wu-repair": "./dist/wu-repair.js",
52
- "wu-prune": "./dist/wu-prune.js",
53
- "wu-cleanup": "./dist/wu-cleanup.js",
54
- "wu-deps": "./dist/wu-deps.js",
55
- "wu-infer-lane": "./dist/wu-infer-lane.js",
56
- "wu-delete": "./dist/wu-delete.js",
57
- "wu-unlock-lane": "./dist/wu-unlock-lane.js",
58
- "wu-release": "./dist/wu-release.js",
59
- "wu-status": "./dist/wu-status.js",
60
- "task-claim": "./dist/task-claim.js",
61
- "wu-recover": "./dist/wu-recover.js",
62
- "wu-verify": "./dist/wu-verify.js",
63
- "mem-init": "./dist/mem-init.js",
64
- "mem-checkpoint": "./dist/mem-checkpoint.js",
65
- "mem-start": "./dist/mem-start.js",
66
- "mem-ready": "./dist/mem-ready.js",
67
- "mem-export": "./dist/mem-export.js",
68
- "mem-signal": "./dist/mem-signal.js",
69
- "mem-cleanup": "./dist/mem-cleanup.js",
70
- "mem-context": "./dist/mem-context.js",
71
- "signal-cleanup": "./dist/signal-cleanup.js",
72
- "mem-create": "./dist/mem-create.js",
73
- "mem-inbox": "./dist/mem-inbox.js",
74
- "mem-summarize": "./dist/mem-summarize.js",
75
- "mem-triage": "./dist/mem-triage.js",
76
- "mem-delete": "./dist/mem-delete.js",
77
- "mem-recover": "./dist/mem-recover.js",
78
- "initiative-create": "./dist/initiative-create.js",
79
- "initiative-edit": "./dist/initiative-edit.js",
80
- "initiative-list": "./dist/initiative-list.js",
81
- "initiative-status": "./dist/initiative-status.js",
82
- "initiative-add-wu": "./dist/initiative-add-wu.js",
83
- "initiative-remove-wu": "./dist/initiative-remove-wu.js",
84
- "initiative-plan": "./dist/initiative-plan.js",
85
- "init-plan": "./dist/initiative-plan.js",
86
- "plan-create": "./dist/plan-create.js",
87
- "plan-link": "./dist/plan-link.js",
88
- "plan-edit": "./dist/plan-edit.js",
89
- "plan-promote": "./dist/plan-promote.js",
34
+ "agent-issues-query": "./dist/agent-issues-query.js",
35
+ "agent-log-issue": "./dist/agent-log-issue.js",
90
36
  "agent-session": "./dist/agent-session.js",
91
37
  "agent-session-end": "./dist/agent-session-end.js",
92
- "agent-log-issue": "./dist/agent-log-issue.js",
93
- "orchestrate-initiative": "./dist/orchestrate-initiative.js",
94
- "orchestrate-init-status": "./dist/orchestrate-init-status.js",
95
- "orchestrate-monitor": "./dist/orchestrate-monitor.js",
96
- "delegation-list": "./dist/delegation-list.js",
97
- "flow-report": "./dist/flow-report.js",
98
- "flow-bottlenecks": "./dist/flow-bottlenecks.js",
99
- "metrics-snapshot": "./dist/metrics-snapshot.js",
100
- "cost-summary": "./dist/cost-summary.js",
101
- "metrics": "./dist/metrics-cli.js",
102
- "lumenflow-metrics": "./dist/metrics-cli.js",
103
- "initiative-bulk-assign-wus": "./dist/initiative-bulk-assign-wus.js",
104
- "agent-issues-query": "./dist/agent-issues-query.js",
105
- "gates": "./dist/gates.js",
106
- "lumenflow-gates": "./dist/gates.js",
107
- "lumenflow-init": "./dist/init.js",
108
- "lumenflow": "./dist/init.js",
109
- "lumenflow-doctor": "./dist/doctor.js",
110
- "lumenflow-commands": "./dist/commands.js",
111
- "lumenflow-release": "./dist/release.js",
112
- "lumenflow-docs-sync": "./dist/docs-sync.js",
113
- "lumenflow-sync-templates": "./dist/sync-templates.js",
114
- "sync-templates": "./dist/sync-templates.js",
115
- "templates-sync": "./dist/sync-templates.js",
38
+ "approval-list": "./dist/approval-list.js",
39
+ "approval-request": "./dist/approval-request.js",
40
+ "approval-review": "./dist/approval-review.js",
116
41
  "backlog-prune": "./dist/backlog-prune.js",
42
+ "cloud-connect": "./dist/init.js",
43
+ "config-get": "./dist/config-get.js",
44
+ "config-set": "./dist/config-set.js",
45
+ "cost-summary": "./dist/cost-summary.js",
46
+ "delegation-list": "./dist/delegation-list.js",
47
+ "file-delete": "./dist/file-delete.js",
48
+ "file-edit": "./dist/file-edit.js",
117
49
  "file-read": "./dist/file-read.js",
118
50
  "file-write": "./dist/file-write.js",
119
- "file-edit": "./dist/file-edit.js",
120
- "file-delete": "./dist/file-delete.js",
121
- "validate": "./dist/validate.js",
122
- "lumenflow-validate": "./dist/validate.js",
123
- "lumenflow-upgrade": "./dist/lumenflow-upgrade.js",
124
- "lumenflow-pre-commit-check": "./dist/pre-commit-check.js",
125
- "git-status": "./dist/git-status.js",
51
+ "flow-bottlenecks": "./dist/flow-bottlenecks.js",
52
+ "flow-report": "./dist/flow-report.js",
53
+ "gate-co-change": "./dist/gate-co-change.js",
54
+ "gates": "./dist/gates.js",
55
+ "git-branch": "./dist/git-branch.js",
126
56
  "git-diff": "./dist/git-diff.js",
127
57
  "git-log": "./dist/git-log.js",
128
- "git-branch": "./dist/git-branch.js",
129
- "state-bootstrap": "./dist/state-bootstrap.js",
58
+ "git-status": "./dist/git-status.js",
59
+ "init-plan": "./dist/initiative-plan.js",
60
+ "initiative-add-wu": "./dist/initiative-add-wu.js",
61
+ "initiative-bulk-assign-wus": "./dist/initiative-bulk-assign-wus.js",
62
+ "initiative-create": "./dist/initiative-create.js",
63
+ "initiative-edit": "./dist/initiative-edit.js",
64
+ "initiative-list": "./dist/initiative-list.js",
65
+ "initiative-plan": "./dist/initiative-plan.js",
66
+ "initiative-remove-wu": "./dist/initiative-remove-wu.js",
67
+ "initiative-status": "./dist/initiative-status.js",
130
68
  "lane-create": "./dist/lane-create.js",
131
69
  "lane-edit": "./dist/lane-edit.js",
132
70
  "lane-health": "./dist/lane-health.js",
133
- "lane-suggest": "./dist/lane-suggest.js",
134
- "lane-status": "./dist/lane-status.js",
71
+ "lane-lock": "./dist/lane-lock.js",
135
72
  "lane-setup": "./dist/lane-setup.js",
73
+ "lane-status": "./dist/lane-status.js",
74
+ "lane-suggest": "./dist/lane-suggest.js",
136
75
  "lane-validate": "./dist/lane-validate.js",
137
- "lane-lock": "./dist/lane-lock.js",
138
- "state-cleanup": "./dist/state-cleanup.js",
139
- "state-doctor": "./dist/state-doctor.js",
140
- "state-emit": "./dist/state-emit.js",
76
+ "lumenflow": "./dist/init.js",
77
+ "lumenflow-commands": "./dist/commands.js",
78
+ "lumenflow-docs-sync": "./dist/docs-sync.js",
79
+ "lumenflow-doctor": "./dist/doctor.js",
80
+ "lumenflow-gates": "./dist/gates.js",
81
+ "lumenflow-init": "./dist/init.js",
141
82
  "lumenflow-integrate": "./dist/commands/integrate.js",
83
+ "lumenflow-metrics": "./dist/metrics-cli.js",
84
+ "lumenflow-onboard": "./dist/onboard.js",
85
+ "lumenflow-pre-commit-check": "./dist/pre-commit-check.js",
86
+ "lumenflow-release": "./dist/release.js",
87
+ "lumenflow-sync-templates": "./dist/sync-templates.js",
88
+ "lumenflow-upgrade": "./dist/lumenflow-upgrade.js",
89
+ "lumenflow-validate": "./dist/validate.js",
90
+ "mem-checkpoint": "./dist/mem-checkpoint.js",
91
+ "mem-cleanup": "./dist/mem-cleanup.js",
92
+ "mem-context": "./dist/mem-context.js",
93
+ "mem-create": "./dist/mem-create.js",
94
+ "mem-delete": "./dist/mem-delete.js",
95
+ "mem-export": "./dist/mem-export.js",
96
+ "mem-inbox": "./dist/mem-inbox.js",
97
+ "mem-init": "./dist/mem-init.js",
98
+ "mem-ready": "./dist/mem-ready.js",
99
+ "mem-recover": "./dist/mem-recover.js",
100
+ "mem-signal": "./dist/mem-signal.js",
101
+ "mem-start": "./dist/mem-start.js",
102
+ "mem-summarize": "./dist/mem-summarize.js",
103
+ "mem-triage": "./dist/mem-triage.js",
104
+ "metrics": "./dist/metrics-cli.js",
105
+ "metrics-snapshot": "./dist/metrics-snapshot.js",
106
+ "onboard": "./dist/onboard.js",
107
+ "orchestrate-init-status": "./dist/orchestrate-init-status.js",
108
+ "orchestrate-initiative": "./dist/orchestrate-initiative.js",
109
+ "orchestrate-monitor": "./dist/orchestrate-monitor.js",
142
110
  "pack-author": "./dist/pack-author.js",
143
- "pack-scaffold": "./dist/pack-scaffold.js",
144
- "pack-validate": "./dist/pack-validate.js",
145
111
  "pack-hash": "./dist/pack-hash.js",
146
112
  "pack-install": "./dist/pack-install.js",
147
113
  "pack-publish": "./dist/pack-publish.js",
114
+ "pack-scaffold": "./dist/pack-scaffold.js",
148
115
  "pack-search": "./dist/pack-search.js",
116
+ "pack-validate": "./dist/pack-validate.js",
117
+ "plan-create": "./dist/plan-create.js",
118
+ "plan-edit": "./dist/plan-edit.js",
119
+ "plan-link": "./dist/plan-link.js",
120
+ "plan-promote": "./dist/plan-promote.js",
121
+ "signal-cleanup": "./dist/signal-cleanup.js",
122
+ "state-bootstrap": "./dist/state-bootstrap.js",
123
+ "state-cleanup": "./dist/state-cleanup.js",
124
+ "state-doctor": "./dist/state-doctor.js",
125
+ "state-emit": "./dist/state-emit.js",
126
+ "sync-templates": "./dist/sync-templates.js",
127
+ "task-claim": "./dist/task-claim.js",
128
+ "templates-sync": "./dist/sync-templates.js",
129
+ "validate": "./dist/validate.js",
149
130
  "workspace-init": "./dist/workspace-init.js",
150
- "config-set": "./dist/config-set.js",
151
- "config-get": "./dist/config-get.js",
152
- "cloud-connect": "./dist/init.js",
153
- "lumenflow-onboard": "./dist/onboard.js",
154
- "onboard": "./dist/onboard.js"
131
+ "wu-block": "./dist/wu-block.js",
132
+ "wu-brief": "./dist/wu-brief.js",
133
+ "wu-claim": "./dist/wu-claim.js",
134
+ "wu-cleanup": "./dist/wu-cleanup.js",
135
+ "wu-create": "./dist/wu-create.js",
136
+ "wu-delegate": "./dist/wu-delegate.js",
137
+ "wu-delete": "./dist/wu-delete.js",
138
+ "wu-deps": "./dist/wu-deps.js",
139
+ "wu-done": "./dist/wu-done.js",
140
+ "wu-edit": "./dist/wu-edit.js",
141
+ "wu-escalate": "./dist/wu-escalate.js",
142
+ "wu-infer-lane": "./dist/wu-infer-lane.js",
143
+ "wu-preflight": "./dist/wu-preflight.js",
144
+ "wu-prep": "./dist/wu-prep.js",
145
+ "wu-proto": "./dist/wu-proto.js",
146
+ "wu-prune": "./dist/wu-prune.js",
147
+ "wu-recover": "./dist/wu-recover.js",
148
+ "wu-release": "./dist/wu-release.js",
149
+ "wu-repair": "./dist/wu-repair.js",
150
+ "wu-sandbox": "./dist/wu-sandbox.js",
151
+ "wu-status": "./dist/wu-status.js",
152
+ "wu-unblock": "./dist/wu-unblock.js",
153
+ "wu-unlock-lane": "./dist/wu-unlock-lane.js",
154
+ "wu-validate": "./dist/wu-validate.js",
155
+ "wu-verify": "./dist/wu-verify.js"
155
156
  },
156
157
  "files": [
157
158
  "dist",
@@ -185,13 +186,13 @@
185
186
  "xstate": "^5.28.0",
186
187
  "yaml": "^2.8.2",
187
188
  "zod": "^4.3.6",
188
- "@lumenflow/agent": "3.18.0",
189
- "@lumenflow/initiatives": "3.18.0",
190
- "@lumenflow/core": "3.18.0",
191
- "@lumenflow/kernel": "3.18.0",
192
- "@lumenflow/control-plane-sdk": "3.18.0",
193
- "@lumenflow/memory": "3.18.0",
194
- "@lumenflow/metrics": "3.18.0"
189
+ "@lumenflow/agent": "3.19.0",
190
+ "@lumenflow/control-plane-sdk": "3.19.0",
191
+ "@lumenflow/core": "3.19.0",
192
+ "@lumenflow/initiatives": "3.19.0",
193
+ "@lumenflow/metrics": "3.19.0",
194
+ "@lumenflow/memory": "3.19.0",
195
+ "@lumenflow/kernel": "3.19.0"
195
196
  },
196
197
  "devDependencies": {
197
198
  "@vitest/coverage-v8": "^4.0.18",
@@ -1,4 +1,4 @@
1
1
 
2
- > @lumenflow/packs-agent-runtime@3.18.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/agent-runtime
2
+ > @lumenflow/packs-agent-runtime@3.19.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/agent-runtime
3
3
  > tsc
4
4
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/packs-agent-runtime",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "description": "Agent runtime pack scaffold for LumenFlow — governed model-turn execution, pack config, and provider capability baselines",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -1,4 +1,4 @@
1
1
 
2
- > @lumenflow/packs-sidekick@3.18.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/sidekick
2
+ > @lumenflow/packs-sidekick@3.19.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/sidekick
3
3
  > tsc
4
4
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/packs-sidekick",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "description": "Sidekick personal assistant pack for LumenFlow — 16 tools for task management, typed memory, channels, routines, and audit",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -1,4 +1,4 @@
1
1
 
2
- > @lumenflow/packs-software-delivery@3.18.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/software-delivery
2
+ > @lumenflow/packs-software-delivery@3.19.0 build /home/runner/work/lumenflow-dev/lumenflow-dev/packages/@lumenflow/packs/software-delivery
3
3
  > tsc
4
4
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/packs-software-delivery",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "description": "Software delivery pack for LumenFlow — work units, gates, lanes, initiatives, and agent coordination",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -2,6 +2,8 @@
2
2
 
3
3
  **Last updated:** {{DATE}}
4
4
 
5
+ > **Works with any AI coding assistant.** This file provides instructions that work regardless of which AI tool you're using -- Claude Code, Cursor, Windsurf, Cline, Codex, Aider, or any other. Just read this file and follow the workflow.
6
+
5
7
  This project uses LumenFlow workflow. For complete documentation, see [LUMENFLOW.md](LUMENFLOW.md).
6
8
  If `LUMENFLOW.local.md` exists, read it after LUMENFLOW.md for project-specific additions.
7
9
 
@@ -26,51 +28,102 @@ For the full workflow, principles, and setup instructions, read [LUMENFLOW.md](L
26
28
 
27
29
  ---
28
30
 
29
- ## Quick Start
31
+ ## Quick Start (Local Worktree -- Default)
32
+
33
+ First-time lane setup (once per project, after plan/context is known):
34
+
35
+ ```bash
36
+ pnpm lane:setup
37
+ pnpm lane:validate
38
+ pnpm lane:lock
39
+ ```
30
40
 
31
41
  ```bash
32
42
  # 1. Claim a WU
33
43
  pnpm wu:claim --id WU-XXXX --lane <Lane>
34
44
  cd worktrees/<lane>-wu-xxxx
35
45
 
36
- # 2. Work in worktree, run gates
37
- pnpm gates
46
+ # 2. Work in worktree
38
47
 
39
- # 3. Complete (ALWAYS run this!)
40
- cd <project-root>
41
- pnpm wu:done --id WU-XXXX
48
+ # 3. Prep (runs gates in worktree)
49
+ pnpm wu:prep --id WU-XXXX
50
+ # This prints a copy-paste command for step 4
51
+
52
+ # 4. Complete (from main - copy-paste from wu:prep output)
53
+ cd <project-root> && pnpm wu:done --id WU-XXXX
42
54
  ```
43
55
 
44
- > **Complete CLI reference:** See [quick-ref-commands.md]({{QUICK_REF_LINK}})
56
+ ## Quick Start (Cloud / Branch-PR)
45
57
 
46
- ---
58
+ Cloud agents (Codex, Claude web, CI bots) that cannot use local worktrees use the **branch-pr** mode. This is a first-class lifecycle, not a workaround.
59
+
60
+ **Activation is explicit-only:** cloud mode is enabled only by `--cloud` or `LUMENFLOW_CLOUD=1`. Runtime identity env vars such as `CLAUDECODE`, `CODEX`, or `CI` do not activate cloud mode.
61
+
62
+ ```bash
63
+ # 1. Create in cloud mode (ID auto-generated; optional if WU already exists)
64
+ pnpm wu:create --lane <Lane> --title "..." ... --cloud
65
+ # Output: Created WU-XXXX
66
+
67
+ # 2. Claim in cloud mode (creates lane branch, no worktree)
68
+ pnpm wu:claim --id WU-XXXX --lane <Lane> --cloud
69
+ # Or: LUMENFLOW_CLOUD=1 pnpm wu:claim --id WU-XXXX --lane <Lane>
47
70
 
48
- ## Critical: Always wu:done
71
+ # 3. Work on the lane branch in your cloud environment
49
72
 
50
- After completing work, ALWAYS run `pnpm wu:done --id WU-XXXX` from the main checkout.
73
+ # 4. Prep (validates branch, runs gates)
74
+ pnpm wu:prep --id WU-XXXX
51
75
 
52
- This is the single most forgotten step. See [LUMENFLOW.md](LUMENFLOW.md) for details.
76
+ # 5. Complete (creates PR instead of merging to main)
77
+ pnpm wu:done --id WU-XXXX
78
+ # Output: PR created. After merge, run: pnpm wu:cleanup --id WU-XXXX
79
+
80
+ # 6. Post-merge cleanup (after PR is merged)
81
+ pnpm wu:cleanup --id WU-XXXX
82
+ ```
83
+
84
+ **Key differences from worktree mode:**
85
+
86
+ - `wu:claim --cloud` sets `claimed_mode: branch-pr` (no worktree created)
87
+ - `wu:create --cloud` writes WU specs on the active branch (no main checkout requirement)
88
+ - `wu:done` creates a PR instead of fast-forward merging to main
89
+ - `wu:cleanup` handles post-merge stamp creation and state updates
90
+ - `wu:recover` and `wu:repair` respect branch-pr claimed branches for recovery/admin fixes
91
+ - Cloud mode is never auto-enabled by runtime identity env vars (`CLAUDECODE`, `CODEX`, `CI`)
53
92
 
54
93
  ---
55
94
 
56
- ## Essential Commands
95
+ ## CLI Commands and Lifecycle Reference
96
+
97
+ For complete CLI command documentation (100+ commands), see [quick-ref-commands.md]({{QUICK_REF_LINK}}).
98
+
99
+ **Essential commands:**
57
100
 
58
- | Command | Description |
59
- | ------------------------- | ----------------------------------------------------- |
60
- | `pnpm wu:create` | Create new WU spec (ID auto-generated) |
61
- | `pnpm wu:claim` | Claim WU and create worktree (or `--cloud`) |
62
- | `pnpm wu:prep` | Run gates in worktree, prep for wu:done |
63
- | `pnpm wu:done` | Complete WU (merge or PR, stamp, cleanup) |
64
- | `pnpm wu:status` | Show WU status, location, valid commands |
101
+ | Command | Description |
102
+ | ------------------------- | ----------------------------------------------------------------------- |
103
+ | `pnpm wu:create` | Create new WU spec (ID auto-generated) |
104
+ | `pnpm wu:claim` | Claim WU and create worktree (or `--cloud`) |
105
+ | `pnpm wu:prep` | Run gates in worktree, prep for wu:done |
106
+ | `pnpm wu:done` | Complete WU (merge or PR, stamp, cleanup) |
107
+ | `pnpm wu:status` | Show WU status, location, valid commands |
65
108
  | `pnpm wu:brief` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence |
66
- | `pnpm wu:delegate` | Generate prompt + record delegation lineage |
67
- | `pnpm wu:recover` | Analyze and fix WU state inconsistencies |
68
- | `pnpm wu:escalate` | Show or resolve WU escalation status |
69
- | `pnpm wu:delete` | Delete WU spec and cleanup |
70
- | `pnpm gates` | Run all quality gates (`--docs-only` for docs) |
71
- | `pnpm lumenflow:commands` | List all public commands (primary + aliases + legacy) |
72
- | `pnpm mem:checkpoint` | Save progress checkpoint |
73
- | `pnpm mem:recover` | Generate recovery context |
109
+ | `pnpm wu:delegate` | Generate prompt + record lineage + brief hash attestation |
110
+ | `pnpm wu:recover` | Analyze and fix WU state inconsistencies |
111
+ | `pnpm wu:escalate` | Show or resolve WU escalation status |
112
+ | `pnpm wu:verify` | Verify WU completion (stamp, commit, clean tree) |
113
+ | `pnpm wu:delete` | Delete WU spec and cleanup |
114
+ | `pnpm gates` | Run all quality gates (`--docs-only` for docs) |
115
+ | `pnpm lumenflow:commands` | List all public commands (primary + aliases + legacy) |
116
+ | `pnpm lane:status` | Show lane lifecycle status and next step |
117
+ | `pnpm lane:setup` | Create/update draft lane artifacts |
118
+ | `pnpm lane:lock` | Lock lane lifecycle for delivery WUs |
119
+ | `pnpm mem:checkpoint` | Save progress checkpoint |
120
+ | `pnpm mem:recover` | Generate recovery context |
121
+
122
+ **Two-step completion (wu:prep then wu:done):**
123
+
124
+ The completion workflow is a two-step process. Run `wu:prep` from the worktree (runs gates, prints copy-paste instruction), then run `wu:done` from main (merge + cleanup). Do NOT run `wu:done` from a worktree.
125
+
126
+ For detailed troubleshooting, see [troubleshooting-wu-done.md]({{DOCS_ONBOARDING_PATH}}/troubleshooting-wu-done.md).
74
127
 
75
128
  ---
76
129
 
@@ -80,15 +133,17 @@ This is the single most forgotten step. See [LUMENFLOW.md](LUMENFLOW.md) for det
80
133
  2. **Worktree Discipline**: After `wu:claim`, work ONLY in the worktree
81
134
  3. **Gates Before Done**: Run `pnpm gates` before `wu:done`
82
135
  4. **Never Bypass Hooks**: No `--no-verify`
136
+ 5. **Vendor-Agnostic Dirty-Main Guard**: `wu:prep` and `wu:done` hard-block when main has non-allowlisted dirty files during worktree WUs (including MCP/tool-originated writes). `branch-pr` mode is exempt.
137
+
138
+ For the complete set of non-negotiable constraints (git safety, forbidden commands, skip-gates policy, and more), see [.lumenflow/constraints.md](.lumenflow/constraints.md).
83
139
 
84
140
  ---
85
141
 
86
- ## Forbidden Commands
142
+ ## Safety: Forbidden Commands and Safe Alternatives
143
+
144
+ LumenFlow enforces safety at the repository level via git wrappers and hooks. For the full list of forbidden commands and their safe `wu:` alternatives, see [.lumenflow/constraints.md](.lumenflow/constraints.md).
87
145
 
88
- - `git reset --hard`
89
- - `git push --force`
90
- - `git stash` (on main)
91
- - `--no-verify`
146
+ **Key rule:** Always use `wu:` commands for worktree and branch management -- never raw `git worktree` or `git branch -D` commands. Use `wu:recover` for state inconsistencies, `wu:release` for abandoned WUs, and `wu:prune` for stale worktrees.
92
147
 
93
148
  ---
94
149
 
@@ -99,3 +154,73 @@ This file provides universal guidance for all AI agents. Additional vendor-speci
99
154
  - **Claude Code**: See `CLAUDE.md` (if present)
100
155
  - **Cursor**: See `.cursor/rules/lumenflow.md` (if present)
101
156
  - **Windsurf**: See `.windsurf/rules/lumenflow.md` (if present)
157
+ - **Cline**: See `.clinerules` (if present)
158
+
159
+ ---
160
+
161
+ ## Workflow Summary
162
+
163
+ ### Local (Worktree Mode -- Default)
164
+
165
+ | Step | Location | Command |
166
+ | ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
167
+ | 1. Create WU | main | `pnpm wu:create --lane <Lane> --title "Title" --description "..." --acceptance "..." --code-paths "..." --test-paths-unit "..." --exposure backend-only` (ID auto-generated) |
168
+ | 2. Claim | main | `pnpm wu:claim --id WU-XXX --lane <Lane>` |
169
+ | 3. Brief | worktree | `cd worktrees/<lane>-wu-xxx && pnpm wu:brief --id WU-XXX --client <client>` **(mandatory — wu:done blocks without this)** |
170
+ | 4. Work | worktree | Implement changes per acceptance criteria |
171
+ | 5. Prep | worktree | `pnpm wu:prep --id WU-XXX` (runs gates) |
172
+ | 6. Complete | main | `pnpm wu:done --id WU-XXX` (copy-paste from wu:prep) |
173
+
174
+ ### Cloud (Branch-PR Mode)
175
+
176
+ | Step | Location | Command |
177
+ | ------------ | ----------- | ------------------------------------------------------------------------------------------- |
178
+ | 1. Create WU | lane branch | `pnpm wu:create --lane <Lane> --title "..." ... --cloud` (ID auto-generated) |
179
+ | 2. Claim | lane branch | `pnpm wu:claim --id WU-XXX --lane <Lane> --cloud` |
180
+ | 3. Brief | lane branch | `pnpm wu:brief --id WU-XXX --client <client>` **(mandatory — wu:done blocks without this)** |
181
+ | 4. Work | lane branch | Work on `lane/<lane>/wu-xxx` in cloud environment |
182
+ | 5. Prep | lane branch | `pnpm wu:prep --id WU-XXX` (validates branch, runs gates) |
183
+ | 6. Complete | lane branch | `pnpm wu:done --id WU-XXX` (creates PR) |
184
+ | 7. Cleanup | after merge | `pnpm wu:cleanup --id WU-XXX` (post-merge stamps) |
185
+
186
+ ---
187
+
188
+ ## Public Docs IA (Kernel + Packs)
189
+
190
+ - Kernel docs source: `apps/docs/src/content/docs/kernel/**`
191
+ - Software Delivery Pack docs source: `apps/docs/src/content/docs/packs/software-delivery/**`
192
+ - Language guides (pack-scoped): `apps/docs/src/content/docs/packs/software-delivery/languages/**`
193
+ - Docs truth YAML files:
194
+ - `apps/docs/src/data/version-policy.yaml`
195
+ - `apps/docs/src/data/language-support.yaml`
196
+ - `apps/docs/src/data/example-repos.yaml`
197
+
198
+ ---
199
+
200
+ ## Further Reading
201
+
202
+ - [LUMENFLOW.md](LUMENFLOW.md) -- Main workflow documentation (principles, setup, initiatives, skills)
203
+ - [.lumenflow/constraints.md](.lumenflow/constraints.md) -- Non-negotiable rules and forbidden commands
204
+ - [Quick Reference: Commands]({{QUICK_REF_LINK}}) -- Complete CLI reference (100+ commands)
205
+ - [Troubleshooting wu:done]({{DOCS_ONBOARDING_PATH}}/troubleshooting-wu-done.md) -- Most common completion mistakes
206
+ - [LumenFlow Agent Capsule]({{DOCS_OPERATIONS_PATH}}/_frameworks/lumenflow/lumenflow-agent-capsule.md) -- Full framework reference (lifecycle, lanes, gates, DoD)
207
+
208
+ ---
209
+
210
+ ## Context Recovery (WU-2157)
211
+
212
+ If you are resuming work or have lost context, check for recovery files:
213
+
214
+ ```bash
215
+ # Check for pending recovery
216
+ ls .lumenflow/state/recovery-pending-*.md 2>/dev/null
217
+
218
+ # Generate fresh recovery context
219
+ pnpm mem:recover --wu WU-XXX
220
+
221
+ # Or generate a full handoff prompt
222
+ pnpm wu:brief --id WU-XXX --client codex-cli
223
+ ```
224
+
225
+ Recovery files contain your last checkpoint, acceptance criteria, code paths, and changed files.
226
+ Always save checkpoints before long operations: `pnpm mem:checkpoint "progress note" --wu WU-XXX`