@lumenflow/cli 3.2.0 → 3.2.2
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/dist/agent-issues-query.js.map +1 -0
- package/dist/agent-log-issue.js.map +1 -0
- package/dist/agent-session-end.js.map +1 -0
- package/dist/agent-session.js.map +1 -0
- package/dist/backlog-prune.js.map +1 -0
- package/dist/cli-entry-point.js +139 -0
- package/dist/cli-entry-point.js.map +1 -0
- package/dist/commands/integrate.js.map +1 -0
- package/dist/commands.js.map +1 -0
- package/dist/config-get.js.map +1 -0
- package/dist/config-set.js.map +1 -0
- package/dist/constants.js +98 -0
- package/dist/constants.js.map +1 -0
- package/dist/delegation-list.js.map +1 -0
- package/dist/deps-add.js +259 -0
- package/dist/deps-add.js.map +1 -0
- package/dist/deps-remove.js +105 -0
- package/dist/deps-remove.js.map +1 -0
- package/dist/docs-sync.js.map +1 -0
- package/dist/doctor.js.map +1 -0
- package/dist/file-delete.js.map +1 -0
- package/dist/file-edit.js.map +1 -0
- package/dist/file-read.js.map +1 -0
- package/dist/file-write.js.map +1 -0
- package/dist/flow-bottlenecks.js.map +1 -0
- package/dist/flow-report.js.map +1 -0
- package/dist/formatters.js +151 -0
- package/dist/formatters.js.map +1 -0
- package/dist/gate-defaults.js +137 -0
- package/dist/gate-defaults.js.map +1 -0
- package/dist/gate-registry.js +73 -0
- package/dist/gate-registry.js.map +1 -0
- package/dist/gates-graceful-degradation.js +153 -0
- package/dist/gates-graceful-degradation.js.map +1 -0
- package/dist/gates-plan-resolvers.js +190 -0
- package/dist/gates-plan-resolvers.js.map +1 -0
- package/dist/gates-runners.js +545 -0
- package/dist/gates-runners.js.map +1 -0
- package/dist/gates-types.js +4 -0
- package/dist/gates-types.js.map +1 -0
- package/dist/gates-utils.js +333 -0
- package/dist/gates-utils.js.map +1 -0
- package/dist/gates.js.map +1 -0
- package/dist/git-branch.js.map +1 -0
- package/dist/git-diff.js.map +1 -0
- package/dist/git-log.js.map +1 -0
- package/dist/git-status.js.map +1 -0
- package/dist/guard-locked.js +172 -0
- package/dist/guard-locked.js.map +1 -0
- package/dist/guard-main-branch.js +217 -0
- package/dist/guard-main-branch.js.map +1 -0
- package/dist/guard-worktree-commit.js +163 -0
- package/dist/guard-worktree-commit.js.map +1 -0
- package/dist/hooks/auto-checkpoint-utils.js +54 -0
- package/dist/hooks/auto-checkpoint-utils.js.map +1 -0
- package/dist/hooks/enforcement-checks.js +399 -0
- package/dist/hooks/enforcement-checks.js.map +1 -0
- package/dist/hooks/enforcement-generator.js +139 -0
- package/dist/hooks/enforcement-generator.js.map +1 -0
- package/dist/hooks/enforcement-sync.js +380 -0
- package/dist/hooks/enforcement-sync.js.map +1 -0
- package/dist/hooks/generators/auto-checkpoint.js +125 -0
- package/dist/hooks/generators/auto-checkpoint.js.map +1 -0
- package/dist/hooks/generators/enforce-worktree.js +190 -0
- package/dist/hooks/generators/enforce-worktree.js.map +1 -0
- package/dist/hooks/generators/index.js +18 -0
- package/dist/hooks/generators/index.js.map +1 -0
- package/dist/hooks/generators/pre-compact-checkpoint.js +136 -0
- package/dist/hooks/generators/pre-compact-checkpoint.js.map +1 -0
- package/dist/hooks/generators/require-wu.js +117 -0
- package/dist/hooks/generators/require-wu.js.map +1 -0
- package/dist/hooks/generators/session-start-recovery.js +103 -0
- package/dist/hooks/generators/session-start-recovery.js.map +1 -0
- package/dist/hooks/generators/signal-utils.js +54 -0
- package/dist/hooks/generators/signal-utils.js.map +1 -0
- package/dist/hooks/generators/warn-incomplete.js +67 -0
- package/dist/hooks/generators/warn-incomplete.js.map +1 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/init-detection.js +232 -0
- package/dist/init-detection.js.map +1 -0
- package/dist/init-lane-validation.js +147 -0
- package/dist/init-lane-validation.js.map +1 -0
- package/dist/init-scaffolding.js +158 -0
- package/dist/init-scaffolding.js.map +1 -0
- package/dist/init-templates.js +1983 -0
- package/dist/init-templates.js.map +1 -0
- package/dist/init.js.map +1 -0
- package/dist/initiative-add-wu.js.map +1 -0
- package/dist/initiative-bulk-assign-wus.js.map +1 -0
- package/dist/initiative-create.js.map +1 -0
- package/dist/initiative-edit.js.map +1 -0
- package/dist/initiative-list.js.map +1 -0
- package/dist/initiative-plan.js.map +1 -0
- package/dist/initiative-remove-wu.js.map +1 -0
- package/dist/initiative-status.js.map +1 -0
- package/dist/lane-edit.js.map +1 -0
- package/dist/lane-health.js.map +1 -0
- package/dist/lane-lifecycle-process.js +381 -0
- package/dist/lane-lifecycle-process.js.map +1 -0
- package/dist/lane-lock.js.map +1 -0
- package/dist/lane-setup.js.map +1 -0
- package/dist/lane-status.js.map +1 -0
- package/dist/lane-suggest.js.map +1 -0
- package/dist/lane-validate.js.map +1 -0
- package/dist/lifecycle-regression-harness.js +181 -0
- package/dist/lifecycle-regression-harness.js.map +1 -0
- package/dist/lumenflow-upgrade.js +188 -12
- package/dist/lumenflow-upgrade.js.map +1 -0
- package/dist/mem-checkpoint.js.map +1 -0
- package/dist/mem-cleanup.js.map +1 -0
- package/dist/mem-context.js.map +1 -0
- package/dist/mem-create.js.map +1 -0
- package/dist/mem-delete.js.map +1 -0
- package/dist/mem-export.js.map +1 -0
- package/dist/mem-inbox.js.map +1 -0
- package/dist/mem-index.js +214 -0
- package/dist/mem-index.js.map +1 -0
- package/dist/mem-init.js.map +1 -0
- package/dist/mem-profile.js +210 -0
- package/dist/mem-profile.js.map +1 -0
- package/dist/mem-promote.js +257 -0
- package/dist/mem-promote.js.map +1 -0
- package/dist/mem-ready.js.map +1 -0
- package/dist/mem-recover.js.map +1 -0
- package/dist/mem-signal.js.map +1 -0
- package/dist/mem-start.js.map +1 -0
- package/dist/mem-summarize.js.map +1 -0
- package/dist/mem-triage.js.map +1 -0
- package/dist/merge-block.js +225 -0
- package/dist/merge-block.js.map +1 -0
- package/dist/metrics-cli.js.map +1 -0
- package/dist/metrics-snapshot.js.map +1 -0
- package/dist/object-guards.js +9 -0
- package/dist/object-guards.js.map +1 -0
- package/dist/onboard.js.map +1 -0
- package/dist/onboarding-smoke-test.js +432 -0
- package/dist/onboarding-smoke-test.js.map +1 -0
- package/dist/orchestrate-init-status.js.map +1 -0
- package/dist/orchestrate-initiative.js.map +1 -0
- package/dist/orchestrate-monitor.js.map +1 -0
- package/dist/pack-author.js.map +1 -0
- package/dist/pack-hash.js.map +1 -0
- package/dist/pack-install.js.map +1 -0
- package/dist/pack-publish.js.map +1 -0
- package/dist/pack-scaffold.js.map +1 -0
- package/dist/pack-search.js.map +1 -0
- package/dist/pack-validate.js.map +1 -0
- package/dist/plan-create.js.map +1 -0
- package/dist/plan-edit.js.map +1 -0
- package/dist/plan-link.js.map +1 -0
- package/dist/plan-promote.js.map +1 -0
- package/dist/public-manifest.js +972 -0
- package/dist/public-manifest.js.map +1 -0
- package/dist/release.js +663 -113
- package/dist/release.js.map +1 -0
- package/dist/rotate-progress.js +253 -0
- package/dist/rotate-progress.js.map +1 -0
- package/dist/session-coordinator.js +303 -0
- package/dist/session-coordinator.js.map +1 -0
- package/dist/shared-validators.js +81 -0
- package/dist/shared-validators.js.map +1 -0
- package/dist/signal-cleanup.js.map +1 -0
- package/dist/state-bootstrap.js.map +1 -0
- package/dist/state-cleanup.js.map +1 -0
- package/dist/state-doctor-fix.js +226 -0
- package/dist/state-doctor-fix.js.map +1 -0
- package/dist/state-doctor-stamps.js +23 -0
- package/dist/state-doctor-stamps.js.map +1 -0
- package/dist/state-doctor.js.map +1 -0
- package/dist/strict-progress.js +255 -0
- package/dist/strict-progress.js.map +1 -0
- package/dist/sync-templates.js +3 -2
- package/dist/sync-templates.js.map +1 -0
- package/dist/task-claim.js.map +1 -0
- package/dist/trace-gen.js +401 -0
- package/dist/trace-gen.js.map +1 -0
- package/dist/validate-agent-skills.js +224 -0
- package/dist/validate-agent-skills.js.map +1 -0
- package/dist/validate-agent-sync.js +152 -0
- package/dist/validate-agent-sync.js.map +1 -0
- package/dist/validate-backlog-sync.js +77 -0
- package/dist/validate-backlog-sync.js.map +1 -0
- package/dist/validate-skills-spec.js +211 -0
- package/dist/validate-skills-spec.js.map +1 -0
- package/dist/validate.js.map +1 -0
- package/dist/validator-defaults.js +107 -0
- package/dist/validator-defaults.js.map +1 -0
- package/dist/validator-registry.js +71 -0
- package/dist/validator-registry.js.map +1 -0
- package/dist/workspace-init.js.map +1 -0
- package/dist/wu-block.js.map +1 -0
- package/dist/wu-brief.js.map +1 -0
- package/dist/wu-claim-branch.js +123 -0
- package/dist/wu-claim-branch.js.map +1 -0
- package/dist/wu-claim-cloud.js +79 -0
- package/dist/wu-claim-cloud.js.map +1 -0
- package/dist/wu-claim-mode.js +82 -0
- package/dist/wu-claim-mode.js.map +1 -0
- package/dist/wu-claim-output.js +85 -0
- package/dist/wu-claim-output.js.map +1 -0
- package/dist/wu-claim-repair-guidance.js +12 -0
- package/dist/wu-claim-repair-guidance.js.map +1 -0
- package/dist/wu-claim-resume-handler.js +87 -0
- package/dist/wu-claim-resume-handler.js.map +1 -0
- package/dist/wu-claim-state.js +581 -0
- package/dist/wu-claim-state.js.map +1 -0
- package/dist/wu-claim-validation.js +458 -0
- package/dist/wu-claim-validation.js.map +1 -0
- package/dist/wu-claim-worktree.js +238 -0
- package/dist/wu-claim-worktree.js.map +1 -0
- package/dist/wu-claim.js.map +1 -0
- package/dist/wu-cleanup-cloud.js +78 -0
- package/dist/wu-cleanup-cloud.js.map +1 -0
- package/dist/wu-cleanup.js.map +1 -0
- package/dist/wu-code-path-coverage.js +83 -0
- package/dist/wu-code-path-coverage.js.map +1 -0
- package/dist/wu-create-cloud.js +30 -0
- package/dist/wu-create-cloud.js.map +1 -0
- package/dist/wu-create-content.js +264 -0
- package/dist/wu-create-content.js.map +1 -0
- package/dist/wu-create-readiness.js +59 -0
- package/dist/wu-create-readiness.js.map +1 -0
- package/dist/wu-create-validation.js +128 -0
- package/dist/wu-create-validation.js.map +1 -0
- package/dist/wu-create.js.map +1 -0
- package/dist/wu-delegate.js.map +1 -0
- package/dist/wu-delete.js.map +1 -0
- package/dist/wu-deps.js.map +1 -0
- package/dist/wu-done-auto-cleanup.js +194 -0
- package/dist/wu-done-auto-cleanup.js.map +1 -0
- package/dist/wu-done-check.js +38 -0
- package/dist/wu-done-check.js.map +1 -0
- package/dist/wu-done-cloud.js +48 -0
- package/dist/wu-done-cloud.js.map +1 -0
- package/dist/wu-done-decay.js +83 -0
- package/dist/wu-done-decay.js.map +1 -0
- package/dist/wu-done.js.map +1 -0
- package/dist/wu-edit-operations.js +399 -0
- package/dist/wu-edit-operations.js.map +1 -0
- package/dist/wu-edit-validators.js +282 -0
- package/dist/wu-edit-validators.js.map +1 -0
- package/dist/wu-edit.js.map +1 -0
- package/dist/wu-infer-lane.js.map +1 -0
- package/dist/wu-preflight.js.map +1 -0
- package/dist/wu-prep.js.map +1 -0
- package/dist/wu-proto.js.map +1 -0
- package/dist/wu-prune.js.map +1 -0
- package/dist/wu-recover.js.map +1 -0
- package/dist/wu-release.js.map +1 -0
- package/dist/wu-repair.js.map +1 -0
- package/dist/wu-sandbox.js.map +1 -0
- package/dist/wu-spawn-completion.js +58 -0
- package/dist/wu-spawn-completion.js.map +1 -0
- package/dist/wu-spawn-prompt-builders.js +1190 -0
- package/dist/wu-spawn-prompt-builders.js.map +1 -0
- package/dist/wu-spawn-strategy-resolver.js +322 -0
- package/dist/wu-spawn-strategy-resolver.js.map +1 -0
- package/dist/wu-spawn.js +59 -0
- package/dist/wu-spawn.js.map +1 -0
- package/dist/wu-state-cloud.js +41 -0
- package/dist/wu-state-cloud.js.map +1 -0
- package/dist/wu-status.js.map +1 -0
- package/dist/wu-unblock.js.map +1 -0
- package/dist/wu-unlock-lane.js.map +1 -0
- package/dist/wu-validate.js.map +1 -0
- package/package.json +7 -10
- package/templates/core/.lumenflow/constraints.md.template +31 -3
- package/templates/core/LUMENFLOW.md.template +68 -30
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +29 -2
- package/templates/core/ai/onboarding/first-wu-mistakes.md.template +14 -0
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +109 -50
- package/templates/core/ai/onboarding/starting-prompt.md.template +62 -4
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +4 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# LumenFlow Constraints Capsule
|
|
2
2
|
|
|
3
|
-
**Version:** 1.
|
|
3
|
+
**Version:** 1.3
|
|
4
4
|
**Last updated:** {{DATE}}
|
|
5
5
|
|
|
6
|
-
This document contains the
|
|
6
|
+
This document contains the 9 non-negotiable constraints that every agent must keep "in working memory" from first plan through `wu:done`.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## The
|
|
10
|
+
## The 9 Non-Negotiable Constraints
|
|
11
11
|
|
|
12
12
|
### 1. Worktree Discipline and Git Safety
|
|
13
13
|
|
|
@@ -179,6 +179,34 @@ If you see something broken on main (failing gates, format issues, typos, lint e
|
|
|
179
179
|
|
|
180
180
|
---
|
|
181
181
|
|
|
182
|
+
### 9. YAML Files Must Be Modified via CLI Tooling Only (WU-1907)
|
|
183
|
+
|
|
184
|
+
**Rule:** Never use raw Write/Edit tools to modify `.lumenflow.config.yaml` or WU YAML specification files. Always use the dedicated CLI commands.
|
|
185
|
+
|
|
186
|
+
**Safe commands:**
|
|
187
|
+
|
|
188
|
+
| File | Command | Example |
|
|
189
|
+
| ------------------------ | --------------------------- | -------------------------------------------------------------- |
|
|
190
|
+
| `.lumenflow.config.yaml` | `pnpm config:set` | `pnpm config:set --key methodology.testing --value test-after` |
|
|
191
|
+
| `.lumenflow.config.yaml` | `pnpm config:get` (read) | `pnpm config:get --key methodology.testing` |
|
|
192
|
+
| WU YAML specs | `pnpm wu:edit` | `pnpm wu:edit --id WU-XXX --description "..."` |
|
|
193
|
+
| WU YAML specs | `pnpm wu:create` (creation) | `pnpm wu:create --lane "Framework: Core" --title "..."` |
|
|
194
|
+
|
|
195
|
+
**Blocked operations:**
|
|
196
|
+
|
|
197
|
+
- `Write(.lumenflow.config.yaml, ...)` -- use `pnpm config:set` instead
|
|
198
|
+
- `Edit(.lumenflow.config.yaml, ...)` -- use `pnpm config:set` instead
|
|
199
|
+
- `Write(docs/04-operations/tasks/wu/WU-XXX.yaml, ...)` -- use `pnpm wu:edit` instead
|
|
200
|
+
- `Edit(docs/04-operations/tasks/wu/WU-XXX.yaml, ...)` -- use `pnpm wu:edit` instead
|
|
201
|
+
|
|
202
|
+
**Exception:** Reading YAML files with the Read tool is acceptable for inspection purposes.
|
|
203
|
+
|
|
204
|
+
**Why:** CLI tooling provides Zod schema validation, atomic commits via micro-worktree, audit trail, and automatic type coercion. Raw edits bypass all of these safeguards and can produce invalid configurations that break downstream commands.
|
|
205
|
+
|
|
206
|
+
**Full policy:** See [.lumenflow/rules/yaml-editing-policy.md](rules/yaml-editing-policy.md).
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
182
210
|
## Mini Audit Checklist
|
|
183
211
|
|
|
184
212
|
Before running `wu:done`, verify:
|
|
@@ -22,23 +22,28 @@ For detailed troubleshooting, common mistakes, and recovery steps, see [troubles
|
|
|
22
22
|
# 1. Setup (first time only)
|
|
23
23
|
pnpm setup
|
|
24
24
|
|
|
25
|
-
# 2.
|
|
25
|
+
# 2. Configure lane lifecycle once per project (after context/plan is clear)
|
|
26
|
+
pnpm lane:setup
|
|
27
|
+
pnpm lane:validate
|
|
28
|
+
pnpm lane:lock
|
|
29
|
+
|
|
30
|
+
# 3. Create a WU (--id is optional, auto-generates next sequential ID if omitted)
|
|
26
31
|
pnpm wu:create --lane <Lane> --title "Title" \
|
|
27
32
|
--description "..." --acceptance "..." --code-paths "..." \
|
|
28
33
|
--test-paths-unit "..." --exposure backend-only \
|
|
29
34
|
--spec-refs "lumenflow://plans/WU-XXXX-plan.md"
|
|
30
35
|
|
|
31
|
-
#
|
|
36
|
+
# 4. Claim (auto-merges spec branch to main if needed)
|
|
32
37
|
pnpm wu:claim --id WU-XXXX --lane <Lane>
|
|
33
38
|
cd worktrees/<lane>-wu-xxxx
|
|
34
39
|
|
|
35
|
-
#
|
|
40
|
+
# 5. Implement in worktree
|
|
36
41
|
|
|
37
|
-
#
|
|
42
|
+
# 6. Prepare (runs gates in worktree) - WU-1223 NEW
|
|
38
43
|
pnpm wu:prep --id WU-XXXX
|
|
39
44
|
# This prints a copy-paste instruction for the next step
|
|
40
45
|
|
|
41
|
-
#
|
|
46
|
+
# 7. Complete (from main checkout - copy-paste from wu:prep output)
|
|
42
47
|
cd /path/to/main && pnpm wu:done --id WU-XXXX
|
|
43
48
|
```
|
|
44
49
|
|
|
@@ -70,14 +75,17 @@ pnpm initiative:status --id INIT-001
|
|
|
70
75
|
|
|
71
76
|
## Setup Notes (Common First-Run Failures)
|
|
72
77
|
|
|
73
|
-
### Lane
|
|
78
|
+
### Lane lifecycle (deferred setup)
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
`lumenflow init` no longer finalizes delivery lanes. Lane setup is an explicit process:
|
|
76
81
|
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
```bash
|
|
83
|
+
pnpm lane:setup # creates/updates draft lane artifacts
|
|
84
|
+
pnpm lane:validate # validates draft lane artifacts
|
|
85
|
+
pnpm lane:lock # finalizes lane lifecycle for delivery WUs
|
|
86
|
+
```
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
`wu:create` requires lane lifecycle status `locked` and prints a deterministic next step when lanes are `unconfigured` or `draft`.
|
|
81
89
|
|
|
82
90
|
### Local-only / no remote
|
|
83
91
|
|
|
@@ -86,8 +94,9 @@ By default, `wu:create` expects an `origin` remote and will fetch `origin/main`.
|
|
|
86
94
|
For local-only or offline development, add this to `workspace.yaml`:
|
|
87
95
|
|
|
88
96
|
```yaml
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
software_delivery:
|
|
98
|
+
git:
|
|
99
|
+
requireRemote: false
|
|
91
100
|
```
|
|
92
101
|
|
|
93
102
|
When `requireRemote: false`:
|
|
@@ -156,6 +165,15 @@ For cloud agents (Codex/Claude web/CI) operating on feature branches:
|
|
|
156
165
|
- **.lumenflow/rules/** - Workflow rules (git-safety.md, wu-workflow.md, etc.)
|
|
157
166
|
- **docs/04-operations/\_frameworks/lumenflow/agent/onboarding/** - Agent onboarding documentation
|
|
158
167
|
|
|
168
|
+
### Public Starlight Docs (Kernel/Packs IA)
|
|
169
|
+
|
|
170
|
+
- **apps/docs/src/content/docs/kernel/** - Kernel-only user docs
|
|
171
|
+
- **apps/docs/src/content/docs/packs/software-delivery/** - Software Delivery Pack docs
|
|
172
|
+
- **apps/docs/src/content/docs/packs/software-delivery/languages/** - Pack-scoped language guides
|
|
173
|
+
- **apps/docs/src/data/version-policy.yaml** - Published stable version source of truth
|
|
174
|
+
- **apps/docs/src/data/language-support.yaml** - Language guide support metadata
|
|
175
|
+
- **apps/docs/src/data/example-repos.yaml** - Companion example-repo mapping
|
|
176
|
+
|
|
159
177
|
### Client/Vendor Overlays
|
|
160
178
|
|
|
161
179
|
- **CLAUDE.md** - Claude Code overlay (single file at root)
|
|
@@ -184,6 +202,15 @@ After claiming a WU, immediately `cd worktrees/<lane>-wu-xxx` and work exclusive
|
|
|
184
202
|
|
|
185
203
|
For the full worktree lifecycle (parallel execution, bootstrap, isolation guarantees), see [lumenflow-complete.md section 2.4](docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md). For the mandatory pre-write check, see [.lumenflow/constraints.md](.lumenflow/constraints.md).
|
|
186
204
|
|
|
205
|
+
### Vendor-Agnostic Dirty-Main Guard
|
|
206
|
+
|
|
207
|
+
`wu:prep` and `wu:done` enforce a runtime guard (not just hooks) across all clients and tools:
|
|
208
|
+
|
|
209
|
+
- In worktree mode, commands block if main checkout has non-allowlisted dirty files
|
|
210
|
+
- This includes writes from MCP tools or any vendor client that bypasses hook execution
|
|
211
|
+
- Allowed dirty prefixes on main: `docs/04-operations/tasks/wu/`, `.lumenflow/`, `.claude/`, `plan/`
|
|
212
|
+
- `branch-pr` mode is exempt (no local worktree/main split)
|
|
213
|
+
|
|
187
214
|
---
|
|
188
215
|
|
|
189
216
|
## Definition of Done
|
|
@@ -200,21 +227,29 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
200
227
|
|
|
201
228
|
> **Complete CLI reference (60+ commands):** See [quick-ref-commands.md](docs/04-operations/_frameworks/lumenflow/agent/onboarding/quick-ref-commands.md). Always run `<command> --help` for the authoritative option list.
|
|
202
229
|
|
|
203
|
-
| Command
|
|
204
|
-
|
|
|
205
|
-
| `pnpm wu:create`
|
|
206
|
-
| `pnpm wu:claim`
|
|
207
|
-
| `pnpm wu:prep`
|
|
208
|
-
| `pnpm wu:done`
|
|
209
|
-
| `pnpm wu:status`
|
|
210
|
-
| `pnpm wu:recover`
|
|
211
|
-
| `pnpm wu:block`
|
|
212
|
-
| `pnpm wu:unblock`
|
|
213
|
-
| `pnpm wu:release`
|
|
214
|
-
| `pnpm gates`
|
|
215
|
-
| `pnpm
|
|
216
|
-
|
|
217
|
-
|
|
230
|
+
| Command | Description |
|
|
231
|
+
| ------------------------- | ------------------------------------------------------ |
|
|
232
|
+
| `pnpm wu:create` | Create new WU spec |
|
|
233
|
+
| `pnpm wu:claim` | Claim WU, update canonical state, create worktree |
|
|
234
|
+
| `pnpm wu:prep` | Run gates in worktree, prep for wu:done |
|
|
235
|
+
| `pnpm wu:done` | Complete WU (merge, stamp, cleanup) |
|
|
236
|
+
| `pnpm wu:status` | Show WU status, location, and valid commands |
|
|
237
|
+
| `pnpm wu:recover` | Analyze and fix WU state inconsistencies |
|
|
238
|
+
| `pnpm wu:block` | Block WU (transitions to blocked, frees lane) |
|
|
239
|
+
| `pnpm wu:unblock` | Unblock WU (transitions to in_progress) |
|
|
240
|
+
| `pnpm wu:release` | Release orphaned WU (in_progress to ready for reclaim) |
|
|
241
|
+
| `pnpm gates` | Run quality gates (`--docs-only` for docs WUs) |
|
|
242
|
+
| `pnpm lumenflow:commands` | List all public commands (primary + alias + legacy) |
|
|
243
|
+
| `pnpm docs:generate` | Regenerate CLI/config reference docs from source |
|
|
244
|
+
| `pnpm docs:validate` | Verify generated docs are up-to-date |
|
|
245
|
+
| `pnpm lane:status` | Show lane lifecycle status + next step |
|
|
246
|
+
| `pnpm lane:setup` | Create/update draft lane artifacts |
|
|
247
|
+
| `pnpm lane:validate` | Validate lane artifacts before lock |
|
|
248
|
+
| `pnpm lane:lock` | Lock lane lifecycle for delivery WUs |
|
|
249
|
+
| `pnpm mem:checkpoint` | Save memory checkpoint |
|
|
250
|
+
|
|
251
|
+
Commands include **context-aware validation** that checks location, WU status, and git state. When validation fails, commands provide copy-paste ready fix commands. Configure in `workspace.yaml` under `software_delivery.experimental.context_validation`.
|
|
252
|
+
The Starlight CLI reference page is intentionally curated to primary commands; use `pnpm lumenflow:commands` for complete discovery.
|
|
218
253
|
|
|
219
254
|
For recovery commands, state management, memory coordination, and orchestration tools, see [quick-ref-commands.md](docs/04-operations/_frameworks/lumenflow/agent/onboarding/quick-ref-commands.md).
|
|
220
255
|
|
|
@@ -222,7 +257,7 @@ For recovery commands, state management, memory coordination, and orchestration
|
|
|
222
257
|
|
|
223
258
|
## Constraints
|
|
224
259
|
|
|
225
|
-
See [.lumenflow/constraints.md](.lumenflow/constraints.md) for the
|
|
260
|
+
See [.lumenflow/constraints.md](.lumenflow/constraints.md) for the 9 non-negotiable rules:
|
|
226
261
|
|
|
227
262
|
1. Worktree discipline and git safety
|
|
228
263
|
2. WUs are specs, not code
|
|
@@ -232,6 +267,7 @@ See [.lumenflow/constraints.md](.lumenflow/constraints.md) for the 8 non-negotia
|
|
|
232
267
|
6. Safety and governance
|
|
233
268
|
7. Test ratchet pattern
|
|
234
269
|
8. Lane-fit reasoning
|
|
270
|
+
9. YAML files must be modified via CLI tooling only
|
|
235
271
|
|
|
236
272
|
---
|
|
237
273
|
|
|
@@ -277,8 +313,10 @@ Pre-configured agent definitions in `.claude/agents/`:
|
|
|
277
313
|
| `code-reviewer` | Quality checks |
|
|
278
314
|
| `bug-triage` | Bug classification |
|
|
279
315
|
|
|
280
|
-
Generate handoff prompts (prompt-only, execution is a separate step): `pnpm wu:brief --id WU-XXX --client
|
|
281
|
-
Record explicit delegation lineage when needed: `pnpm wu:delegate --id WU-XXX --parent-wu WU-YYY --client
|
|
316
|
+
Generate handoff prompts (prompt-only, execution is a separate step): `pnpm wu:brief --id WU-XXX --client <client>`
|
|
317
|
+
Record explicit delegation lineage when needed: `pnpm wu:delegate --id WU-XXX --parent-wu WU-YYY --client <client>`
|
|
318
|
+
|
|
319
|
+
Supported clients: `claude-code`, `codex-cli`, `cursor`, `gemini-cli`, `windsurf`
|
|
282
320
|
|
|
283
321
|
---
|
|
284
322
|
|
|
@@ -52,7 +52,7 @@ The handoff prompt is the bridge between sessions. `wu:brief` generates this pro
|
|
|
52
52
|
pnpm mem:checkpoint "Progress: completed X, next: Y" --wu WU-XXX
|
|
53
53
|
git add -A && git commit -m "checkpoint: progress on X"
|
|
54
54
|
git push origin lane/<lane>/wu-xxx
|
|
55
|
-
pnpm wu:brief --id WU-XXX --client
|
|
55
|
+
pnpm wu:brief --id WU-XXX --client <client>
|
|
56
56
|
# Copy generated prompt into Task tool to start the next agent session.
|
|
57
57
|
# Exit current session; start fresh in the new session.
|
|
58
58
|
```
|
|
@@ -90,7 +90,7 @@ memory:
|
|
|
90
90
|
Use `--no-context` when you want a clean prompt without memory context:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
pnpm wu:brief --id WU-XXX --client
|
|
93
|
+
pnpm wu:brief --id WU-XXX --client <client> --no-context
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
This is useful when:
|
|
@@ -123,6 +123,33 @@ Use this structure for sub-agent prompts:
|
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
|
+
## 3a) Template Condition Evaluation (WU-1898)
|
|
127
|
+
|
|
128
|
+
Spawn prompt templates support conditional inclusion via the `condition` field in template frontmatter. Conditions are evaluated against the WU context before templates are included in the assembled prompt.
|
|
129
|
+
|
|
130
|
+
**How it works:**
|
|
131
|
+
|
|
132
|
+
- Templates with a `condition` field are only included when the condition evaluates to `true`
|
|
133
|
+
- The `type` context variable (from WU YAML) gates type-specific directives
|
|
134
|
+
- The `policy.testing` and `policy.architecture` context variables gate methodology templates
|
|
135
|
+
- Templates without a `condition` field are always included
|
|
136
|
+
|
|
137
|
+
**Examples of condition gating:**
|
|
138
|
+
|
|
139
|
+
| Template | Condition | Effect |
|
|
140
|
+
| ------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------- |
|
|
141
|
+
| `tdd-directive` | `type !== 'documentation' && type !== 'docs' && type !== 'config'` | Excluded for documentation WUs |
|
|
142
|
+
| `documentation-directive` | `type === 'documentation' \|\| type === 'docs' \|\| type === 'config'` | Included only for documentation WUs |
|
|
143
|
+
| `refactor-directive` | `type === 'refactor'` | Included only for refactor WUs |
|
|
144
|
+
| `methodology-tdd` | `policy.testing === 'tdd'` | Included only when TDD policy is active |
|
|
145
|
+
| `methodology-test-after` | `policy.testing === 'test-after'` | Included only when test-after policy is active |
|
|
146
|
+
|
|
147
|
+
This ensures documentation WUs do not receive TDD directives, and methodology-specific directives are only included when the project's resolved policy matches.
|
|
148
|
+
|
|
149
|
+
**Reference:** See the [Template Format reference](https://lumenflow.dev/reference/templates/) for full condition syntax and context variables.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
126
153
|
## 4) Append These Constraints at the End (Mandatory)
|
|
127
154
|
|
|
128
155
|
Paste this block at the end of every multi-agent prompt:
|
|
@@ -271,6 +271,20 @@ Phrases that mean "do this now":
|
|
|
271
271
|
|
|
272
272
|
---
|
|
273
273
|
|
|
274
|
+
## Lane Lock Lifecycle and Zombie Detection (WU-1901)
|
|
275
|
+
|
|
276
|
+
Lane locks (`.lumenflow/locks/<lane-kebab>.lock`) enforce WIP=1. Key semantics:
|
|
277
|
+
|
|
278
|
+
- **Lock acquisition**: `wu:claim` creates a lock file atomically with a PID, timestamp, and WU ID.
|
|
279
|
+
- **PID becomes invalid immediately**: Since `wu:claim` is a short-lived process, the PID in the lock becomes dead as soon as the claim completes. This is expected -- the lock persists on disk.
|
|
280
|
+
- **Zombie detection requires BOTH conditions**: A lock is only auto-cleared if it is BOTH stale (older than 2 hours) AND the PID is dead. A dead PID alone does NOT trigger auto-clearing.
|
|
281
|
+
- **Normal release**: `wu:done` removes the lock after merging.
|
|
282
|
+
- **Manual unlock**: `pnpm wu:unlock-lane --lane "<lane>" --reason "<reason>"` for genuinely abandoned locks.
|
|
283
|
+
|
|
284
|
+
This means a recently claimed lane (within 2 hours) will NOT be auto-cleared even if the claiming process has exited. To reclaim a lane held by another WU, complete or release the existing WU first.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
274
288
|
## Quick Checklist
|
|
275
289
|
|
|
276
290
|
Before starting any WU:
|
|
@@ -33,6 +33,7 @@ Run `--help` first, then run the real command with explicit flags.
|
|
|
33
33
|
| Metrics & Flow | `pnpm flow:report --help` | `pnpm flow:report` |
|
|
34
34
|
| Documentation | `pnpm docs:validate --help` | `pnpm docs:validate` |
|
|
35
35
|
| Release | `pnpm pre-release:check --help` | `pnpm pre-release:check` |
|
|
36
|
+
| Configuration | `pnpm config:set --help` | `pnpm config:set --key methodology.testing --value test-after` |
|
|
36
37
|
| Agent Utilities | `pnpm agent:issues-query --help` | `pnpm agent:issues-query` |
|
|
37
38
|
|
|
38
39
|
---
|
|
@@ -77,21 +78,21 @@ pnpm exec lumenflow --client all # All clients
|
|
|
77
78
|
|
|
78
79
|
## WU Lifecycle
|
|
79
80
|
|
|
80
|
-
| Command
|
|
81
|
-
|
|
|
82
|
-
| `pnpm wu:create --
|
|
83
|
-
| `pnpm wu:claim --id WU-XXX --lane <Lane>`
|
|
84
|
-
| `pnpm wu:claim --id WU-XXX --lane <L> --cloud`
|
|
85
|
-
| `pnpm wu:prep --id WU-XXX [--full-tests]`
|
|
86
|
-
| `pnpm wu:done --id WU-XXX`
|
|
87
|
-
| `pnpm wu:edit --id WU-XXX --description "..."`
|
|
88
|
-
| `pnpm wu:block --id WU-XXX --reason "..."`
|
|
89
|
-
| `pnpm wu:unblock --id WU-XXX`
|
|
90
|
-
| `pnpm wu:release --id WU-XXX`
|
|
91
|
-
| `pnpm wu:status --id WU-XXX`
|
|
92
|
-
| `pnpm wu:brief --id WU-XXX --client <client>`
|
|
93
|
-
| `pnpm wu:brief --id WU-XXX --no-context`
|
|
94
|
-
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>`
|
|
81
|
+
| Command | Description |
|
|
82
|
+
| ----------------------------------------------- | ------------------------------------------------------------ |
|
|
83
|
+
| `pnpm wu:create --lane <Lane> --title "..." ..` | Create new WU spec (ID auto-generated; see fields below) |
|
|
84
|
+
| `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree (default) |
|
|
85
|
+
| `pnpm wu:claim --id WU-XXX --lane <L> --cloud` | Claim WU in cloud/branch-pr mode (no worktree) |
|
|
86
|
+
| `pnpm wu:prep --id WU-XXX [--full-tests]` | Run gates, prep for wu:done (`tests.unit` scoped by default) |
|
|
87
|
+
| `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, stamp, cleanup) |
|
|
88
|
+
| `pnpm wu:edit --id WU-XXX --description "..."` | Edit WU spec fields (run --help for all flags) |
|
|
89
|
+
| `pnpm wu:block --id WU-XXX --reason "..."` | Block WU with reason |
|
|
90
|
+
| `pnpm wu:unblock --id WU-XXX` | Unblock WU |
|
|
91
|
+
| `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
|
|
92
|
+
| `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
|
|
93
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt (does not execute) |
|
|
94
|
+
| `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
|
|
95
|
+
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt and record delegation lineage |
|
|
95
96
|
|
|
96
97
|
### WU Maintenance
|
|
97
98
|
|
|
@@ -112,18 +113,22 @@ pnpm exec lumenflow --client all # All clients
|
|
|
112
113
|
|
|
113
114
|
## Gates & Quality
|
|
114
115
|
|
|
115
|
-
| Command | Description
|
|
116
|
-
| --------------------------------- |
|
|
117
|
-
| `pnpm gates` | Run all quality gates
|
|
118
|
-
| `pnpm gates --docs-only` | Run gates for docs changes
|
|
119
|
-
| `pnpm format` | Format all files (Prettier)
|
|
120
|
-
| `pnpm format:check` | Check formatting without changes
|
|
121
|
-
| `pnpm lint` | Run ESLint
|
|
122
|
-
| `pnpm typecheck` | Run TypeScript type checking
|
|
123
|
-
| `pnpm test` | Run all tests (Vitest)
|
|
124
|
-
| `pnpm spec:linter` | Validate WU specs (all) ¹
|
|
125
|
-
| `pnpm lane:health` | Check lane config health
|
|
126
|
-
| `pnpm lane:suggest --paths "..."` | Suggest lane for code paths
|
|
116
|
+
| Command | Description |
|
|
117
|
+
| --------------------------------- | --------------------------------- |
|
|
118
|
+
| `pnpm gates` | Run all quality gates |
|
|
119
|
+
| `pnpm gates --docs-only` | Run gates for docs changes |
|
|
120
|
+
| `pnpm format` | Format all files (Prettier) |
|
|
121
|
+
| `pnpm format:check` | Check formatting without changes |
|
|
122
|
+
| `pnpm lint` | Run ESLint |
|
|
123
|
+
| `pnpm typecheck` | Run TypeScript type checking |
|
|
124
|
+
| `pnpm test` | Run all tests (Vitest) |
|
|
125
|
+
| `pnpm spec:linter` | Validate WU specs (all) ¹ |
|
|
126
|
+
| `pnpm lane:health` | Check lane config health |
|
|
127
|
+
| `pnpm lane:suggest --paths "..."` | Suggest lane for code paths |
|
|
128
|
+
| `pnpm lane:status` | Show lane lifecycle status |
|
|
129
|
+
| `pnpm lane:setup` | Create/update draft lane config |
|
|
130
|
+
| `pnpm lane:validate` | Validate lane draft artifacts |
|
|
131
|
+
| `pnpm lane:lock` | Lock lane lifecycle for WU create |
|
|
127
132
|
|
|
128
133
|
¹ **Script aliases:** `spec:linter` and `tasks:validate` are pnpm script aliases
|
|
129
134
|
for `wu:validate --all`. They are not standalone CLI commands.
|
|
@@ -211,6 +216,30 @@ Supported mismatch fixes:
|
|
|
211
216
|
|
|
212
217
|
---
|
|
213
218
|
|
|
219
|
+
## Configuration
|
|
220
|
+
|
|
221
|
+
| Command | Description |
|
|
222
|
+
| ------------------------------------------------- | ----------------------------------------------- |
|
|
223
|
+
| `pnpm config:get --key <dotpath>` | Read a value from `workspace.yaml` |
|
|
224
|
+
| `pnpm config:set --key <dotpath> --value <value>` | Set a value in `workspace.yaml` (Zod-validated) |
|
|
225
|
+
|
|
226
|
+
`config:set` validates against the Zod schema before writing and uses the micro-worktree
|
|
227
|
+
pattern for atomic commits. Always use these commands instead of raw Write/Edit on
|
|
228
|
+
`workspace.yaml`. See [Constraint 9](../../../../../.lumenflow/constraints.md)
|
|
229
|
+
and [YAML editing policy](../../../../../.lumenflow/rules/yaml-editing-policy.md).
|
|
230
|
+
|
|
231
|
+
**Common dotpaths:**
|
|
232
|
+
|
|
233
|
+
| Dotpath | Type | Example Values |
|
|
234
|
+
| --------------------------------- | ------- | --------------------------- |
|
|
235
|
+
| `methodology.testing` | enum | `tdd`, `test-after`, `none` |
|
|
236
|
+
| `gates.minCoverage` | number | `0`-`100` |
|
|
237
|
+
| `gates.enableCoverage` | boolean | `true`, `false` |
|
|
238
|
+
| `experimental.context_validation` | boolean | `true`, `false` |
|
|
239
|
+
| `git.requireRemote` | boolean | `true`, `false` |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
214
243
|
## Dependencies
|
|
215
244
|
|
|
216
245
|
| Command | Description |
|
|
@@ -222,15 +251,15 @@ Supported mismatch fixes:
|
|
|
222
251
|
|
|
223
252
|
## Plans
|
|
224
253
|
|
|
225
|
-
Plans are markdown documents that capture goals, scope, approach, and success criteria before implementation begins. They link to WUs (via `
|
|
254
|
+
Plans are markdown documents that capture goals, scope, approach, and success criteria before implementation begins. They link to WUs (via the `plan` field, WU-1683) and initiatives (via `related_plan`).
|
|
226
255
|
|
|
227
256
|
### Plan Storage
|
|
228
257
|
|
|
229
258
|
Plans are stored in the repo at `docs/04-operations/plans/` by default (configurable via `directories.plansDir` in `workspace.yaml`).
|
|
230
259
|
|
|
231
260
|
If the plan exists only in conversation, use `--plan` on `wu:create` to generate a lightweight
|
|
232
|
-
stub in `$LUMENFLOW_HOME/plans
|
|
233
|
-
`
|
|
261
|
+
stub in `$LUMENFLOW_HOME/plans/` and automatically set the WU's `plan` field to the
|
|
262
|
+
`lumenflow://plans/` URI. Feature WUs should have a `plan` field; notes do not replace the plan link.
|
|
234
263
|
|
|
235
264
|
| Command | Description |
|
|
236
265
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------- |
|
|
@@ -263,15 +292,17 @@ pnpm initiative:plan --initiative INIT-001 --create
|
|
|
263
292
|
pnpm initiative:plan --initiative INIT-001 --plan docs/04-operations/plans/my-plan.md
|
|
264
293
|
```
|
|
265
294
|
|
|
266
|
-
**To a WU (via
|
|
295
|
+
**To a WU (via `plan` field, WU-1683):**
|
|
267
296
|
|
|
268
297
|
```bash
|
|
269
|
-
# When creating a WU
|
|
270
|
-
pnpm wu:create --
|
|
271
|
-
|
|
298
|
+
# When creating a WU (--plan auto-generates and links)
|
|
299
|
+
pnpm wu:create --lane "Framework: Core" --title "Feature" --plan
|
|
300
|
+
|
|
301
|
+
# Or edit an existing WU with a specific plan URI
|
|
302
|
+
pnpm wu:edit --id WU-123 --plan "lumenflow://plans/WU-123-plan.md"
|
|
272
303
|
|
|
273
|
-
# Or
|
|
274
|
-
pnpm
|
|
304
|
+
# Or use plan:link
|
|
305
|
+
pnpm plan:link --id WU-123 --plan lumenflow://plans/WU-123-plan.md
|
|
275
306
|
```
|
|
276
307
|
|
|
277
308
|
### Plan URI Format
|
|
@@ -396,18 +427,18 @@ pnpm gates # Now works
|
|
|
396
427
|
# 0. Check available options (do this before first use of any command)
|
|
397
428
|
pnpm wu:create --help
|
|
398
429
|
|
|
399
|
-
# 1. Create WU
|
|
400
|
-
pnpm wu:create --
|
|
430
|
+
# 1. Create WU (ID auto-generated)
|
|
431
|
+
pnpm wu:create --lane "Framework: Core" --title "Add feature" \
|
|
401
432
|
--description "Context: ... Problem: ... Solution: ..." \
|
|
402
433
|
--acceptance "Criterion 1" --acceptance "Criterion 2" \
|
|
403
434
|
--code-paths "src/file.ts" \
|
|
404
435
|
--test-paths-unit "src/__tests__/file.test.ts" \
|
|
405
|
-
--exposure backend-only
|
|
406
|
-
|
|
436
|
+
--exposure backend-only
|
|
437
|
+
# Output: Created WU-1990 at docs/.../wu/WU-1990.yaml
|
|
407
438
|
|
|
408
|
-
# 2. Claim (creates worktree)
|
|
409
|
-
pnpm wu:claim --id WU-
|
|
410
|
-
cd worktrees/framework-core-wu-
|
|
439
|
+
# 2. Claim (creates worktree) -- use the ID from wu:create output
|
|
440
|
+
pnpm wu:claim --id WU-1990 --lane "Framework: Core"
|
|
441
|
+
cd worktrees/framework-core-wu-1990
|
|
411
442
|
|
|
412
443
|
# 2b. Bootstrap (build CLI for dist-backed commands)
|
|
413
444
|
pnpm bootstrap
|
|
@@ -419,10 +450,10 @@ pnpm bootstrap
|
|
|
419
450
|
git add . && git commit -m "feat: description"
|
|
420
451
|
|
|
421
452
|
# 5. Prep (runs gates in worktree)
|
|
422
|
-
pnpm wu:prep --id WU-
|
|
453
|
+
pnpm wu:prep --id WU-1990
|
|
423
454
|
|
|
424
455
|
# 6. Complete (from main - copy from wu:prep output)
|
|
425
|
-
cd /path/to/main && pnpm wu:done --id WU-
|
|
456
|
+
cd /path/to/main && pnpm wu:done --id WU-1990
|
|
426
457
|
```
|
|
427
458
|
|
|
428
459
|
---
|
|
@@ -437,9 +468,24 @@ For code changes, you must include **all** of the following (or wu:create will f
|
|
|
437
468
|
- `--test-paths-unit` or `--test-paths-e2e` (automated tests required)
|
|
438
469
|
- `--exposure` (ui | api | backend-only | documentation)
|
|
439
470
|
- `--spec-refs` (required for type: feature)
|
|
471
|
+
- `--plan` (optional, auto-generates plan file and sets `plan` field — WU-1683)
|
|
440
472
|
|
|
441
473
|
Documentation WUs can omit code/test paths but should set `--type documentation` and `--exposure documentation`.
|
|
442
474
|
|
|
475
|
+
**Auto-generated IDs (recommended):** Omit `--id` and let `wu:create` assign the next sequential ID. Capture the output for dependency chaining:
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
# Create first WU (ID auto-generated)
|
|
479
|
+
pnpm wu:create --lane "Framework: Core" --title "First WU" ...
|
|
480
|
+
# Output: Created WU-1990
|
|
481
|
+
|
|
482
|
+
# Create second WU blocked by the first
|
|
483
|
+
pnpm wu:create --lane "Framework: Core" --title "Second WU" --blocked-by WU-1990 ...
|
|
484
|
+
# Output: Created WU-1991
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
> **Note:** Use `--id` only when re-creating a specific WU or for migration tooling.
|
|
488
|
+
|
|
443
489
|
---
|
|
444
490
|
|
|
445
491
|
## Strict WU Validation (WU-1329)
|
|
@@ -498,14 +544,27 @@ Agents should:
|
|
|
498
544
|
|
|
499
545
|
---
|
|
500
546
|
|
|
501
|
-
## Lane
|
|
547
|
+
## Lane Lifecycle Requirement
|
|
502
548
|
|
|
503
|
-
|
|
549
|
+
Before the first delivery WU, complete lane lifecycle once per project:
|
|
504
550
|
|
|
505
|
-
|
|
506
|
-
|
|
551
|
+
```bash
|
|
552
|
+
pnpm lane:setup
|
|
553
|
+
pnpm lane:validate
|
|
554
|
+
pnpm lane:lock
|
|
555
|
+
```
|
|
507
556
|
|
|
508
|
-
|
|
557
|
+
Lifecycle states:
|
|
558
|
+
|
|
559
|
+
- `unconfigured` -> next step `pnpm lane:setup`
|
|
560
|
+
- `draft` -> next step `pnpm lane:lock`
|
|
561
|
+
- `locked` -> delivery WUs can be created
|
|
562
|
+
|
|
563
|
+
Check current lifecycle state any time:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
pnpm lane:status
|
|
567
|
+
```
|
|
509
568
|
|
|
510
569
|
---
|
|
511
570
|
|
|
@@ -56,6 +56,10 @@ If you are starting a new project or feature from a product vision (e.g., "Build
|
|
|
56
56
|
3. **Create WUs under the Initiative**: Each WU belongs to a phase
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
+
pnpm lane:setup
|
|
60
|
+
pnpm lane:validate
|
|
61
|
+
pnpm lane:lock
|
|
62
|
+
|
|
59
63
|
pnpm wu:create --lane "Core: Platform" --title "Add task model" \
|
|
60
64
|
--description "..." --acceptance "..." --code-paths "..." \
|
|
61
65
|
&& pnpm initiative:add-wu --initiative INIT-001 --wu WU-XXX --phase 1
|
|
@@ -168,10 +172,15 @@ all signals are user-configured.
|
|
|
168
172
|
|
|
169
173
|
## Before Creating WUs
|
|
170
174
|
|
|
171
|
-
|
|
175
|
+
Before the first delivery WU in a project, complete lane lifecycle:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pnpm lane:setup
|
|
179
|
+
pnpm lane:validate
|
|
180
|
+
pnpm lane:lock
|
|
181
|
+
```
|
|
172
182
|
|
|
173
|
-
|
|
174
|
-
- Generate it with `pnpm lane:suggest --output .lumenflow.lane-inference.yaml`
|
|
183
|
+
Use `pnpm lane:status` to verify lifecycle state and recommended next step.
|
|
175
184
|
|
|
176
185
|
**No remote yet?** `wu:create` expects `origin/main`. If your repo is local-only, add a remote
|
|
177
186
|
before running `wu:create`. `wu:claim` supports `--no-push` for local-only work.
|
|
@@ -274,6 +283,55 @@ LUMENFLOW_FORCE=1 LUMENFLOW_FORCE_REASON="backlog corruption recovery" git push
|
|
|
274
283
|
|
|
275
284
|
---
|
|
276
285
|
|
|
286
|
+
## Safe Configuration Modification (Constraint 9)
|
|
287
|
+
|
|
288
|
+
**Never use Write or Edit tools to modify YAML configuration files.** Always use the dedicated CLI commands.
|
|
289
|
+
|
|
290
|
+
### Modifying workspace.yaml
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# Read a config value
|
|
294
|
+
pnpm config:get --key methodology.testing
|
|
295
|
+
|
|
296
|
+
# Set a config value (validates against Zod schema, uses atomic commit)
|
|
297
|
+
pnpm config:set --key methodology.testing --value test-after
|
|
298
|
+
|
|
299
|
+
# Set a boolean
|
|
300
|
+
pnpm config:set --key gates.enableCoverage --value false
|
|
301
|
+
|
|
302
|
+
# Set a number
|
|
303
|
+
pnpm config:set --key gates.minCoverage --value 85
|
|
304
|
+
|
|
305
|
+
# Append to an array
|
|
306
|
+
pnpm config:set --key agents.methodology.principles --value Library-First,KISS
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Modifying WU YAML Specs
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Edit WU fields (run --help for all available flags)
|
|
313
|
+
pnpm wu:edit --id WU-XXX --description "Updated description"
|
|
314
|
+
|
|
315
|
+
# Create new WU (never manually Write a YAML file)
|
|
316
|
+
pnpm wu:create --lane "Framework: Core" --title "Add feature" \
|
|
317
|
+
--description "..." --acceptance "..."
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Why This Matters
|
|
321
|
+
|
|
322
|
+
Raw-editing YAML files with Write/Edit tools bypasses:
|
|
323
|
+
|
|
324
|
+
1. **Schema validation** -- `config:set` validates against the Zod schema
|
|
325
|
+
2. **Atomic commits** -- `config:set` uses micro-worktree for safe writes
|
|
326
|
+
3. **Audit trail** -- CLI commands produce structured log entries
|
|
327
|
+
4. **Type coercion** -- Automatic boolean/number/array handling
|
|
328
|
+
|
|
329
|
+
**Exception:** Reading YAML files with the Read tool is acceptable for inspection.
|
|
330
|
+
|
|
331
|
+
For the full policy, see [.lumenflow/rules/yaml-editing-policy.md](../../../../../.lumenflow/rules/yaml-editing-policy.md) and Constraint 9 in [.lumenflow/constraints.md](../../../../../.lumenflow/constraints.md).
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
277
335
|
## Common Failure Scenarios and Recovery
|
|
278
336
|
|
|
279
337
|
### Scenario 1: "BLOCKED: Direct commit to main"
|
|
@@ -565,7 +623,7 @@ rm -rf /tmp/nextjs-scaffold
|
|
|
565
623
|
|
|
566
624
|
- [LUMENFLOW.md](../../../../../LUMENFLOW.md) - Main workflow documentation
|
|
567
625
|
- [AGENTS.md](../../../../../AGENTS.md) - Universal agent entry point
|
|
568
|
-
- [.lumenflow/constraints.md](../../../../../.lumenflow/constraints.md) - The
|
|
626
|
+
- [.lumenflow/constraints.md](../../../../../.lumenflow/constraints.md) - The 9 non-negotiable rules
|
|
569
627
|
- [troubleshooting-wu-done.md](troubleshooting-wu-done.md) - Why agents forget wu:done
|
|
570
628
|
- [first-wu-mistakes.md](first-wu-mistakes.md) - Common mistakes to avoid
|
|
571
629
|
- [quick-ref-commands.md](quick-ref-commands.md) - Command reference
|