@lumenflow/cli 3.10.1 → 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.
- package/README.md +78 -74
- package/dist/docs-sync.js +24 -29
- package/dist/docs-sync.js.map +1 -1
- package/dist/init-scaffolding.js +2 -9
- package/dist/init-scaffolding.js.map +1 -1
- package/dist/init.js +7 -18
- package/dist/init.js.map +1 -1
- package/dist/onboarding-template-paths.js +19 -0
- package/dist/onboarding-template-paths.js.map +1 -0
- package/dist/public-manifest.js +2 -2
- package/dist/public-manifest.js.map +1 -1
- package/dist/sync-templates.js +12 -1
- package/dist/sync-templates.js.map +1 -1
- package/dist/template-directory-resolver.js +71 -0
- package/dist/template-directory-resolver.js.map +1 -0
- package/dist/wu-done-check.js +33 -13
- package/dist/wu-done-check.js.map +1 -1
- package/dist/wu-done.js +6 -5
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-spawn-prompt-builders.js +96 -23
- package/dist/wu-spawn-prompt-builders.js.map +1 -1
- package/package.json +8 -8
- package/packs/sidekick/.turbo/turbo-build.log +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/.turbo/turbo-build.log +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/templates/core/.lumenflow/constraints.md.template +3 -3
- package/templates/core/LUMENFLOW.md.template +17 -17
- package/templates/core/UPGRADING.md.template +30 -11
- package/templates/core/ai/onboarding/agent-safety-card.md.template +15 -16
- package/templates/core/ai/onboarding/first-15-mins.md.template +80 -0
- package/templates/core/ai/onboarding/first-wu-mistakes.md.template +3 -3
- package/templates/core/ai/onboarding/initiative-orchestration.md.template +1 -1
- package/templates/core/ai/onboarding/lane-inference.md.template +64 -0
- package/templates/core/ai/onboarding/local-only.md.template +56 -0
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +122 -92
- package/templates/core/ai/onboarding/starting-prompt.md.template +91 -46
- package/templates/core/ai/onboarding/vendor-support.md.template +14 -20
- package/templates/core/ai/onboarding/wu-create-checklist.md.template +31 -82
- package/templates/core/ai/onboarding/wu-sizing-guide.md.template +48 -0
- package/templates/vendors/claude/.claude/skills/bug-classification/SKILL.md.template +2 -2
- package/templates/vendors/claude/.claude/skills/code-quality/SKILL.md.template +2 -2
- package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +3 -3
- package/templates/vendors/claude/.claude/skills/execution-memory/SKILL.md.template +1 -1
- package/templates/vendors/claude/.claude/skills/initiative-management/SKILL.md.template +2 -2
- package/templates/vendors/claude/.claude/skills/library-first/SKILL.md.template +2 -2
- package/templates/vendors/claude/.claude/skills/lumenflow-gates/SKILL.md.template +3 -3
- package/templates/vendors/claude/.claude/skills/multi-agent-coordination/SKILL.md.template +2 -2
- package/templates/vendors/claude/.claude/skills/tdd-workflow/SKILL.md.template +3 -3
- package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +10 -10
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +3 -3
|
@@ -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
|
-
>
|
|
8
|
+
> Use `pnpm lumenflow:commands` for the public CLI surface:
|
|
9
9
|
>
|
|
10
10
|
> ```bash
|
|
11
|
-
> pnpm lumenflow:commands # List
|
|
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
|
-
|
|
|
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
|
|
57
|
-
|
|
|
58
|
-
| `pnpm setup`
|
|
59
|
-
| `pnpm bootstrap`
|
|
60
|
-
| `pnpm build`
|
|
61
|
-
| `pnpm build:dist`
|
|
62
|
-
| `pnpm dev`
|
|
63
|
-
| `pnpm clean`
|
|
64
|
-
| `pnpm pack:all`
|
|
65
|
-
| `pnpm lumenflow
|
|
66
|
-
| `pnpm docs
|
|
67
|
-
| `pnpm
|
|
68
|
-
| `pnpm
|
|
69
|
-
| `pnpm
|
|
70
|
-
| `pnpm lumenflow:
|
|
71
|
-
| `pnpm
|
|
72
|
-
| `
|
|
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`
|
|
105
|
-
| `pnpm sync:templates` | Sync
|
|
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
|
|
120
|
-
|
|
|
121
|
-
| `pnpm wu:create --lane <Lane> --title "..." ..`
|
|
122
|
-
| `pnpm wu:claim --id WU-XXX --lane <Lane>`
|
|
123
|
-
| `pnpm wu:claim --id WU-XXX --lane <L> --cloud`
|
|
124
|
-
| `pnpm wu:prep --id WU-XXX [--full-tests]`
|
|
125
|
-
| `pnpm wu:done --id WU-XXX`
|
|
126
|
-
| `pnpm wu:edit --id WU-XXX --description "..."`
|
|
127
|
-
| `pnpm wu:escalate --id WU-XXX`
|
|
128
|
-
| `pnpm wu:escalate --resolve --id WU-XXX`
|
|
129
|
-
| `pnpm
|
|
130
|
-
| `pnpm
|
|
131
|
-
| `pnpm
|
|
132
|
-
| `pnpm wu:
|
|
133
|
-
| `pnpm wu:
|
|
134
|
-
| `pnpm wu:
|
|
135
|
-
| `pnpm wu:
|
|
136
|
-
| `pnpm wu:
|
|
137
|
-
| `pnpm wu:
|
|
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
|
|
160
|
-
|
|
|
161
|
-
| `pnpm gates`
|
|
162
|
-
| `pnpm gates --docs-only`
|
|
163
|
-
| `pnpm format`
|
|
164
|
-
| `pnpm format:check`
|
|
165
|
-
| `pnpm lint`
|
|
166
|
-
| `pnpm typecheck`
|
|
167
|
-
| `pnpm test`
|
|
168
|
-
| `pnpm spec:linter`
|
|
169
|
-
| `pnpm lane:health`
|
|
170
|
-
| `pnpm lane:suggest --
|
|
171
|
-
| `pnpm lane:status`
|
|
172
|
-
| `pnpm lane:setup`
|
|
173
|
-
| `pnpm lane:validate`
|
|
174
|
-
| `pnpm lane:lock`
|
|
175
|
-
| `pnpm lane:edit --
|
|
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
|
-
##
|
|
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
|
|
287
|
-
|
|
|
288
|
-
| `pnpm
|
|
289
|
-
| `pnpm
|
|
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
|
-
|
|
660
|
-
|
|
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
|
-
| `
|
|
681
|
-
| `
|
|
682
|
-
| `
|
|
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
|
|
780
|
+
**Cloud activation is explicit-only:**
|
|
744
781
|
|
|
745
|
-
|
|
746
|
-
|
|
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](
|
|
823
|
+
- **[WU Sizing Guide](./wu-sizing-guide.md)** -- Context safety triggers, complexity assessment, and session strategies
|
|
@@ -13,10 +13,12 @@ This is the complete onboarding document for AI agents working with LumenFlow. R
|
|
|
13
13
|
Before concluding a command doesn't exist, **always check what's available**:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
pnpm lumenflow:commands # List
|
|
16
|
+
pnpm lumenflow:commands # List public CLI commands, aliases, and legacy surfaces
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
LumenFlow has commands for WU lifecycle, maintenance, memory, initiatives, orchestration, metrics, packs, and more. Never guess or assume — run `pnpm lumenflow:commands` first.
|
|
20
|
+
Repo-only scripts such as `pnpm docs:validate` and `pnpm pre-release:check` are monorepo scripts,
|
|
21
|
+
not part of that public command list.
|
|
20
22
|
|
|
21
23
|
### Help-First Rule
|
|
22
24
|
|
|
@@ -102,7 +104,9 @@ If work spans multiple WUs or multiple days, create an initiative first.
|
|
|
102
104
|
When creating WUs or scoping initiatives, always evaluate whether the assigned lane fits the actual work:
|
|
103
105
|
|
|
104
106
|
- **Check code_paths alignment**: Compare the WU's `code_paths` against lane definitions in `workspace.yaml`. If the majority of paths belong to a different lane, propose a lane change.
|
|
105
|
-
- **Use lane
|
|
107
|
+
- **Use lane inference tooling correctly**:
|
|
108
|
+
- For a WU lane recommendation, run `pnpm wu:infer-lane --id WU-XXXX`.
|
|
109
|
+
- To regenerate derived lane taxonomy metadata, run `pnpm lane:suggest --output .lumenflow.lane-inference.yaml`.
|
|
106
110
|
- **Propose changes proactively**: If scope expansion during implementation pushes a WU beyond its lane's boundaries, flag the mismatch to the user and suggest either a lane change or a WU split.
|
|
107
111
|
- **Initiative-level review**: When planning an initiative with multiple WUs, ensure each WU is assigned to the lane whose `code_paths` best cover the work. Systematic mismatches signal that lane taxonomy may need updating.
|
|
108
112
|
|
|
@@ -112,7 +116,7 @@ When creating WUs or scoping initiatives, always evaluate whether the assigned l
|
|
|
112
116
|
|
|
113
117
|
```bash
|
|
114
118
|
# 1. Check your assigned WU
|
|
115
|
-
cat
|
|
119
|
+
cat {{DOCS_TASKS_PATH}}/wu/WU-XXXX.yaml
|
|
116
120
|
|
|
117
121
|
# 2. Claim the WU (creates isolated worktree)
|
|
118
122
|
pnpm wu:claim --id WU-XXXX --lane "Lane Name"
|
|
@@ -125,13 +129,12 @@ pnpm bootstrap
|
|
|
125
129
|
|
|
126
130
|
# 4. Do your work here (not in main!)
|
|
127
131
|
|
|
128
|
-
# 5.
|
|
129
|
-
pnpm
|
|
130
|
-
|
|
132
|
+
# 5. Prep from the worktree (runs the correct gates)
|
|
133
|
+
pnpm wu:prep --id WU-XXXX
|
|
134
|
+
# This prints the copy-paste completion command
|
|
131
135
|
|
|
132
136
|
# 6. Return to main and complete
|
|
133
|
-
cd /path/to/main/checkout
|
|
134
|
-
pnpm wu:done --id WU-XXXX
|
|
137
|
+
cd /path/to/main/checkout && pnpm wu:done --id WU-XXXX
|
|
135
138
|
```
|
|
136
139
|
|
|
137
140
|
## Quick Start -- Cloud / Branch-PR (Copy This)
|
|
@@ -140,7 +143,7 @@ For cloud agents (Codex, Claude web, CI bots) that cannot create local worktrees
|
|
|
140
143
|
|
|
141
144
|
```bash
|
|
142
145
|
# 1. Check your assigned WU
|
|
143
|
-
cat
|
|
146
|
+
cat {{DOCS_TASKS_PATH}}/wu/WU-XXXX.yaml
|
|
144
147
|
|
|
145
148
|
# 2. Claim in cloud mode (no worktree, sets claimed_mode: branch-pr)
|
|
146
149
|
pnpm wu:claim --id WU-XXXX --lane "Lane Name" --cloud
|
|
@@ -158,28 +161,28 @@ pnpm wu:done --id WU-XXXX
|
|
|
158
161
|
pnpm wu:cleanup --id WU-XXXX
|
|
159
162
|
```
|
|
160
163
|
|
|
161
|
-
**
|
|
164
|
+
**Activation is explicit-only:**
|
|
162
165
|
|
|
163
166
|
1. `--cloud` flag on `wu:claim` (explicit, always wins)
|
|
164
167
|
2. `LUMENFLOW_CLOUD=1` environment variable (explicit, always wins)
|
|
165
|
-
3. Config-driven auto-detection when `cloud.auto_detect: true` in `workspace.yaml`
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
Runtime identity env vars such as `CLAUDECODE`, `CODEX`, or `CI` do not activate cloud mode.
|
|
170
|
+
The `cloud.auto_detect` and `env_signals` config keys remain schema-supported metadata,
|
|
171
|
+
but they do not change runtime activation behavior.
|
|
168
172
|
|
|
169
173
|
```yaml
|
|
170
174
|
# workspace.yaml
|
|
171
175
|
cloud:
|
|
172
|
-
auto_detect:
|
|
173
|
-
env_signals:
|
|
174
|
-
- name: CI # presence check (any non-empty value)
|
|
175
|
-
- name: CODEX
|
|
176
|
-
- name: GITHUB_ACTIONS
|
|
177
|
-
equals: 'true' # exact match required
|
|
176
|
+
auto_detect: false
|
|
177
|
+
env_signals: []
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
Use explicit activation instead:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
pnpm wu:claim --id WU-XXXX --lane "Lane Name" --cloud
|
|
184
|
+
LUMENFLOW_CLOUD=1 pnpm wu:claim --id WU-XXXX --lane "Lane Name"
|
|
185
|
+
```
|
|
183
186
|
|
|
184
187
|
---
|
|
185
188
|
|
|
@@ -237,21 +240,26 @@ pnpm wu:claim --id WU-123 --lane "Framework: CLI" --cloud
|
|
|
237
240
|
|
|
238
241
|
**Why:** Worktrees isolate your changes. Main checkout is protected by git hooks. Branch-PR mode is the valid exception for cloud agents that cannot create local worktrees.
|
|
239
242
|
|
|
240
|
-
### Rule 2:
|
|
243
|
+
### Rule 2: Use wu:prep Then wu:done
|
|
241
244
|
|
|
242
|
-
|
|
245
|
+
Completion is a two-step flow:
|
|
246
|
+
|
|
247
|
+
1. From the worktree, run `pnpm wu:prep --id WU-XXXX`
|
|
248
|
+
2. From main, copy-paste the printed `pnpm wu:done --id WU-XXXX` command
|
|
249
|
+
|
|
250
|
+
Do not just write "to complete: run wu:done" and stop.
|
|
243
251
|
|
|
244
252
|
```bash
|
|
245
253
|
# WRONG
|
|
246
254
|
"Work complete. Next step: run pnpm wu:done --id WU-123"
|
|
247
255
|
|
|
248
256
|
# RIGHT
|
|
249
|
-
|
|
250
|
-
pnpm wu:done --id WU-123
|
|
257
|
+
pnpm wu:prep --id WU-123
|
|
258
|
+
cd /path/to/main && pnpm wu:done --id WU-123
|
|
251
259
|
# Then report: "WU-123 completed. Changes merged to main."
|
|
252
260
|
```
|
|
253
261
|
|
|
254
|
-
**Why:** wu:done merges
|
|
262
|
+
**Why:** `wu:prep` runs the correct gates in the claimed workspace. `wu:done` then merges or opens the PR, writes the completion metadata, and releases the lane lock.
|
|
255
263
|
|
|
256
264
|
### Rule 3: Use Relative Paths Only
|
|
257
265
|
|
|
@@ -333,6 +341,16 @@ pnpm config:set --key gates.minCoverage --value 85
|
|
|
333
341
|
pnpm config:set --key agents.methodology.principles --value Library-First,KISS
|
|
334
342
|
```
|
|
335
343
|
|
|
344
|
+
For lanes:
|
|
345
|
+
|
|
346
|
+
- `workspace.yaml` (`software_delivery.lanes.definitions`) is the source of truth for lane validation and claim-time lane checks.
|
|
347
|
+
- `.lumenflow.lane-inference.yaml` is derived metadata for suggestion/classification workflows.
|
|
348
|
+
- After lane definition changes, regenerate taxonomy metadata with:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
pnpm lane:suggest --output .lumenflow.lane-inference.yaml
|
|
352
|
+
```
|
|
353
|
+
|
|
336
354
|
### Modifying WU YAML Specs
|
|
337
355
|
|
|
338
356
|
```bash
|
|
@@ -384,7 +402,7 @@ git add . && git commit -m "your message"
|
|
|
384
402
|
**Fix:** Regenerate the backlog or manually add the missing WU:
|
|
385
403
|
|
|
386
404
|
```bash
|
|
387
|
-
# In worktree, edit
|
|
405
|
+
# In worktree, edit {{DOCS_TASKS_PATH}}/backlog.md
|
|
388
406
|
# Add the missing WU reference in the appropriate section
|
|
389
407
|
```
|
|
390
408
|
|
|
@@ -490,6 +508,33 @@ pnpm wu:delegate --id WU-XXXX --parent-wu WU-YYYY --client <client-type>
|
|
|
490
508
|
|
|
491
509
|
**IMPORTANT:** The `--client` flag identifies your IDE/tool environment, NOT the underlying AI model. Use `--client windsurf` even if Windsurf is running a Claude agent.
|
|
492
510
|
|
|
511
|
+
### Guidance Profiles (WU-2309 / WU-2329)
|
|
512
|
+
|
|
513
|
+
`wu:brief` verification guidance is profile-aware and ships with sensible built-in defaults.
|
|
514
|
+
Project-local `.lumenflow/templates` is optional and only needed when you want different wording,
|
|
515
|
+
extra project commands, or client-specific overrides.
|
|
516
|
+
|
|
517
|
+
- New installs get the current defaults automatically.
|
|
518
|
+
- Existing installs get the runtime defaults after `pnpm lumenflow:upgrade --latest`.
|
|
519
|
+
- Run `pnpm docs:sync --force` when you also want refreshed scaffolded onboarding docs and
|
|
520
|
+
supported vendor assets.
|
|
521
|
+
|
|
522
|
+
Default profiles:
|
|
523
|
+
|
|
524
|
+
- Behavior/logic changes: follow project policy (`methodology.testing`: `tdd`, `test-after`, or `none`).
|
|
525
|
+
- Structured-content-only changes (`.yaml/.yml/.json/.md/.mdx`): use parse/schema/lint/eval evidence; TDD checkpoint is omitted.
|
|
526
|
+
- UI presentation hints: prefer smoke/manual/integration/E2E verification and use unit tests for pure logic or explicitly required checks.
|
|
527
|
+
|
|
528
|
+
Common override points include `visual-directive`, `structured-content-directive`,
|
|
529
|
+
`verification-requirements`, and `design-context-ui`.
|
|
530
|
+
|
|
531
|
+
Domain-specific commands must come from local configuration, not core framework code:
|
|
532
|
+
|
|
533
|
+
- Template manifest: `.lumenflow/templates/manifest.yaml`
|
|
534
|
+
- Base templates: `.lumenflow/templates/spawn-prompt/*.md`
|
|
535
|
+
- Client overrides: `.lumenflow/templates.{client}/spawn-prompt/*.md`
|
|
536
|
+
- Client config: `workspace.yaml` under `software_delivery.agents.clients.*`
|
|
537
|
+
|
|
493
538
|
### Sub-Agent Coordination
|
|
494
539
|
|
|
495
540
|
- Sub-agents work in isolated micro-worktrees
|
|
@@ -501,23 +546,22 @@ pnpm wu:delegate --id WU-XXXX --parent-wu WU-YYYY --client <client-type>
|
|
|
501
546
|
|
|
502
547
|
## WU Lifecycle Commands
|
|
503
548
|
|
|
504
|
-
| Command | Description
|
|
505
|
-
| ---------------------------------------------- |
|
|
506
|
-
| `pnpm wu:status --id WU-XXX` | Show WU state and valid commands
|
|
507
|
-
| `pnpm wu:claim --id WU-XXX --lane "Lane"` | Claim WU and create worktree (default)
|
|
508
|
-
| `pnpm wu:claim --id WU-XXX --lane "L" --cloud` | Claim WU in branch-pr mode (no worktree)
|
|
509
|
-
| `pnpm wu:edit --id WU-XXX --field value` | Edit WU spec fields
|
|
510
|
-
| `pnpm wu:brief --id WU-XXX --client X` | Generate handoff prompt + evidence
|
|
511
|
-
| `pnpm wu:brief --id WU-XXX --evidence-only` | Record evidence only (no prompt output)
|
|
512
|
-
| `pnpm wu:delegate --id WU-XXX --parent-wu P` | Generate prompt + record delegation
|
|
513
|
-
| `pnpm
|
|
514
|
-
| `pnpm
|
|
515
|
-
| `pnpm wu:
|
|
516
|
-
| `pnpm wu:
|
|
517
|
-
| `pnpm wu:escalate --id WU-XXX`
|
|
518
|
-
| `pnpm wu:
|
|
519
|
-
| `pnpm wu:
|
|
520
|
-
| `pnpm wu:recover --id WU-XXX` | Fix inconsistent WU state | When state is broken |
|
|
549
|
+
| Command | Description | When to Use |
|
|
550
|
+
| ---------------------------------------------- | ----------------------------------------------- | --------------------------- |
|
|
551
|
+
| `pnpm wu:status --id WU-XXX` | Show WU state and valid commands | Check current state |
|
|
552
|
+
| `pnpm wu:claim --id WU-XXX --lane "Lane"` | Claim WU and create worktree (default) | Start working (local) |
|
|
553
|
+
| `pnpm wu:claim --id WU-XXX --lane "L" --cloud` | Claim WU in branch-pr mode (no worktree) | Start working (cloud) |
|
|
554
|
+
| `pnpm wu:edit --id WU-XXX --field value` | Edit WU spec fields | Update notes/desc |
|
|
555
|
+
| `pnpm wu:brief --id WU-XXX --client X` | Generate handoff prompt + evidence | Complex WUs |
|
|
556
|
+
| `pnpm wu:brief --id WU-XXX --evidence-only` | Record evidence only (no prompt output) | Self-implementation path |
|
|
557
|
+
| `pnpm wu:delegate --id WU-XXX --parent-wu P` | Generate prompt + record delegation | Auditable delegation flows |
|
|
558
|
+
| `pnpm wu:prep --id WU-XXX` | Run gates in claimed workspace, prep completion | Before wu:done |
|
|
559
|
+
| `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, cleanup) | After gates pass |
|
|
560
|
+
| `pnpm wu:cleanup --id WU-XXX` | Post-merge cleanup (branch-pr) | After PR merge (cloud only) |
|
|
561
|
+
| `pnpm wu:escalate --id WU-XXX` | Show or resolve escalation status | Escalation-triggered WUs |
|
|
562
|
+
| `pnpm wu:escalate --resolve --id WU-XXX` | Resolve human escalation | Before wu:done (escalation) |
|
|
563
|
+
| `pnpm wu:delete --id WU-XXX` | Delete WU spec and cleanup | Cancel stale/throwaway WUs |
|
|
564
|
+
| `pnpm wu:recover --id WU-XXX` | Fix inconsistent WU state | When state is broken |
|
|
521
565
|
|
|
522
566
|
---
|
|
523
567
|
|
|
@@ -525,7 +569,7 @@ pnpm wu:delegate --id WU-XXXX --parent-wu WU-YYYY --client <client-type>
|
|
|
525
569
|
|
|
526
570
|
```
|
|
527
571
|
/path/to/repo/
|
|
528
|
-
├──
|
|
572
|
+
├── {{DOCS_TASKS_PATH}}/
|
|
529
573
|
│ ├── backlog.md # All WUs listed here (auto-generated, don't edit)
|
|
530
574
|
│ └── wu/WU-XXXX.yaml # Individual WU specs
|
|
531
575
|
├── worktrees/
|
|
@@ -544,7 +588,7 @@ pnpm wu:delegate --id WU-XXXX --parent-wu WU-YYYY --client <client-type>
|
|
|
544
588
|
Before reporting a WU complete, verify:
|
|
545
589
|
|
|
546
590
|
- [ ] All acceptance criteria in WU YAML are satisfied
|
|
547
|
-
- [ ]
|
|
591
|
+
- [ ] `pnpm wu:prep --id WU-XXX` ran successfully in the claimed workspace
|
|
548
592
|
- [ ] `pnpm wu:done --id WU-XXX` ran successfully
|
|
549
593
|
- [ ] Output shows "Marked done, pushed, and cleaned up"
|
|
550
594
|
- [ ] Worktree was removed (check `ls worktrees/`)
|
|
@@ -685,4 +729,5 @@ rm -rf /tmp/nextjs-scaffold
|
|
|
685
729
|
- [troubleshooting-wu-done.md](troubleshooting-wu-done.md) - Why agents forget wu:done
|
|
686
730
|
- [first-wu-mistakes.md](first-wu-mistakes.md) - Common mistakes to avoid
|
|
687
731
|
- [quick-ref-commands.md](quick-ref-commands.md) - Command reference
|
|
732
|
+
- [wu-sizing-guide.md](wu-sizing-guide.md) - Context safety and WU sizing
|
|
688
733
|
- [initiative-orchestration.md](initiative-orchestration.md) - Initiative orchestration, delegation, recovery
|