@lumenflow/cli 3.8.7 → 3.9.1

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 (80) hide show
  1. package/README.md +11 -15
  2. package/dist/cli-entry-point.js +7 -0
  3. package/dist/cli-entry-point.js.map +1 -1
  4. package/dist/gate-defaults.js +5 -0
  5. package/dist/gate-defaults.js.map +1 -1
  6. package/dist/gates-runners.js +77 -1
  7. package/dist/gates-runners.js.map +1 -1
  8. package/dist/guard-main-branch.js +3 -2
  9. package/dist/guard-main-branch.js.map +1 -1
  10. package/dist/hooks/enforcement-checks.js +3 -2
  11. package/dist/hooks/enforcement-checks.js.map +1 -1
  12. package/dist/hooks/path-utils.js +2 -1
  13. package/dist/hooks/path-utils.js.map +1 -1
  14. package/dist/init-detection.js +3 -3
  15. package/dist/init-detection.js.map +1 -1
  16. package/dist/lane-create.js +223 -0
  17. package/dist/lane-create.js.map +1 -0
  18. package/dist/mem-signal.js +1 -1
  19. package/dist/mem-signal.js.map +1 -1
  20. package/dist/public-manifest.js +7 -0
  21. package/dist/public-manifest.js.map +1 -1
  22. package/dist/signal-middleware.js +192 -0
  23. package/dist/signal-middleware.js.map +1 -0
  24. package/dist/state-doctor.js +135 -0
  25. package/dist/state-doctor.js.map +1 -1
  26. package/dist/state-emit.js +72 -10
  27. package/dist/state-emit.js.map +1 -1
  28. package/dist/validate.js +2 -2
  29. package/dist/validate.js.map +1 -1
  30. package/dist/wu-claim.js +75 -10
  31. package/dist/wu-claim.js.map +1 -1
  32. package/dist/wu-done-already-merged.js +2 -7
  33. package/dist/wu-done-already-merged.js.map +1 -1
  34. package/dist/wu-done-gates.js +296 -0
  35. package/dist/wu-done-gates.js.map +1 -0
  36. package/dist/wu-done-memory-telemetry.js +145 -0
  37. package/dist/wu-done-memory-telemetry.js.map +1 -0
  38. package/dist/wu-done-mode-execution.js +136 -0
  39. package/dist/wu-done-mode-execution.js.map +1 -0
  40. package/dist/wu-done-policies.js +206 -1
  41. package/dist/wu-done-policies.js.map +1 -1
  42. package/dist/wu-done-preflight.js +207 -0
  43. package/dist/wu-done-preflight.js.map +1 -0
  44. package/dist/wu-done.js +48 -888
  45. package/dist/wu-done.js.map +1 -1
  46. package/dist/wu-edit-validators.js +30 -1
  47. package/dist/wu-edit-validators.js.map +1 -1
  48. package/dist/wu-edit.js +7 -2
  49. package/dist/wu-edit.js.map +1 -1
  50. package/dist/wu-prep.js +17 -1
  51. package/dist/wu-prep.js.map +1 -1
  52. package/dist/wu-spawn-prompt-builders.js +65 -10
  53. package/dist/wu-spawn-prompt-builders.js.map +1 -1
  54. package/package.json +9 -8
  55. package/packs/sidekick/.turbo/turbo-build.log +1 -1
  56. package/packs/sidekick/package.json +9 -2
  57. package/packs/software-delivery/.turbo/turbo-build.log +1 -1
  58. package/packs/software-delivery/package.json +1 -1
  59. package/templates/core/.lumenflow/constraints.md.template +12 -14
  60. package/templates/core/LUMENFLOW.md.template +7 -4
  61. package/templates/core/ai/onboarding/agent-invocation-guide.md.template +2 -2
  62. package/templates/core/ai/onboarding/docs-generation.md.template +1 -1
  63. package/templates/core/ai/onboarding/first-wu-mistakes.md.template +40 -0
  64. package/templates/core/ai/onboarding/initiative-orchestration.md.template +402 -0
  65. package/templates/core/ai/onboarding/quick-ref-commands.md.template +129 -56
  66. package/templates/core/ai/onboarding/release-process.md.template +102 -39
  67. package/templates/core/ai/onboarding/starting-prompt.md.template +1 -0
  68. package/templates/core/ai/onboarding/test-ratchet.md.template +2 -8
  69. package/templates/vendors/claude/.claude/CLAUDE.md.template +1 -1
  70. package/templates/vendors/claude/.claude/skills/bug-classification/SKILL.md.template +2 -2
  71. package/templates/vendors/claude/.claude/skills/code-quality/SKILL.md.template +3 -3
  72. package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +1 -1
  73. package/templates/vendors/claude/.claude/skills/frontend-design/SKILL.md.template +1 -1
  74. package/templates/vendors/claude/.claude/skills/lumenflow-gates/SKILL.md.template +4 -4
  75. package/templates/vendors/claude/.claude/skills/tdd-workflow/SKILL.md.template +4 -4
  76. package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +5 -5
  77. package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +4 -4
  78. package/templates/vendors/cline/.clinerules.template +1 -1
  79. package/templates/vendors/cursor/.cursor/rules/lumenflow.md.template +22 -2
  80. package/templates/vendors/windsurf/.windsurf/rules/lumenflow.md.template +22 -2
@@ -18,6 +18,10 @@ Reference for CLI commands. Organized by category for quick discovery.
18
18
  > pnpm wu:delete --help # See wu:delete options
19
19
  > pnpm wu:escalate --help # See wu:escalate options
20
20
  > ```
21
+ >
22
+ > **Never conclude a command doesn't exist without running `pnpm lumenflow:commands` first.**
23
+ >
24
+ > Maintainer reference for validation ownership: [validator-boundaries.md](../../validator-boundaries.md).
21
25
 
22
26
  ## Help-First Usage Examples By Category
23
27
 
@@ -26,6 +30,7 @@ Run `--help` first, then run the real command with explicit flags.
26
30
  | Category | Help-First Example | Real Command Example |
27
31
  | ------------------- | ------------------------------------- | ------------------------------------------------------------------------ |
28
32
  | Setup & Development | `pnpm bootstrap --help` | `pnpm bootstrap` |
33
+ | Tooling Operations | `pnpm lumenflow:upgrade --help` | `pnpm lumenflow:upgrade --latest` |
29
34
  | WU Lifecycle | `pnpm wu:claim --help` | `pnpm wu:claim --id WU-1561 --lane "Operations: Tooling"` |
30
35
  | WU Maintenance | `pnpm wu:recover --help` | `pnpm wu:recover --id WU-1561` |
31
36
  | Gates & Quality | `pnpm gates --help` | `pnpm gates --docs-only` |
@@ -39,7 +44,8 @@ Run `--help` first, then run the real command with explicit flags.
39
44
  | Documentation | `pnpm docs:validate --help` | `pnpm docs:validate` |
40
45
  | Release | `pnpm pre-release:check --help` | `pnpm pre-release:check` |
41
46
  | Configuration | `pnpm config:set --help` | `pnpm config:set --key methodology.testing --value test-after` |
42
- | Agent Utilities | `pnpm agent:issues-query --help` | `pnpm agent:issues-query` |
47
+ | Agent Utilities | `pnpm agent:session --help` | `pnpm agent:session` |
48
+ | Packs | `pnpm pack:install --help` | `pnpm pack:install --name software-delivery` |
43
49
 
44
50
  ---
45
51
 
@@ -62,6 +68,7 @@ Run `--help` first, then run the real command with explicit flags.
62
68
  | `pnpm lumenflow:upgrade` | Upgrade LumenFlow packages |
63
69
  | `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration |
64
70
  | `pnpm lumenflow:integrate` | Generate enforcement hooks for client |
71
+ | `pnpm cloud:connect` | Configure cloud control-plane access |
65
72
  | `npx lumenflow commands` | List all available CLI commands |
66
73
 
67
74
  **For external projects (end users):**
@@ -81,26 +88,53 @@ pnpm exec lumenflow --client all # All clients
81
88
 
82
89
  ---
83
90
 
91
+ ## Tooling Operations (No WU Required)
92
+
93
+ These commands use **micro-worktree isolation** internally — they handle their own
94
+ commit and push atomically. Do NOT wrap them in a WU or use raw `pnpm update`/`git commit`.
95
+
96
+ | Command | Description |
97
+ | ------------------------------------------------- | ----------------------------------------- |
98
+ | `pnpm lumenflow:upgrade --version 3.5.0` | Upgrade all 7 @lumenflow/\* packages |
99
+ | `pnpm lumenflow:upgrade --latest` | Upgrade to latest version |
100
+ | `pnpm lumenflow:upgrade --latest --dry-run` | Preview upgrade without executing |
101
+ | `pnpm config:set --key <dotpath> --value <value>` | Set workspace.yaml config (Zod-validated) |
102
+ | `pnpm config:get --key <dotpath>` | Read workspace.yaml config |
103
+ | `pnpm cloud:connect` | Configure cloud control-plane access |
104
+ | `pnpm docs:sync` | Sync agent docs after upgrade |
105
+ | `pnpm sync:templates` | Sync templates to project |
106
+
107
+ **Key principle:** If a LumenFlow CLI command exists for the operation, use it instead of
108
+ raw pnpm/git. These tooling commands commit directly to main via micro-worktree — no dirty
109
+ files, no manual git, no WU ceremony. Only actual **code changes** need WUs.
110
+
111
+ > **Anti-pattern:** Do NOT use `pnpm update @lumenflow/*` to upgrade packages.
112
+ > This leaves dirty `package.json` and `pnpm-lock.yaml` on main.
113
+ > Use `pnpm lumenflow:upgrade` instead — it handles everything atomically.
114
+
115
+ ---
116
+
84
117
  ## WU Lifecycle
85
118
 
86
- | Command | Description |
87
- | ----------------------------------------------- | ------------------------------------------------------------ |
88
- | `pnpm wu:create --lane <Lane> --title "..." ..` | Create new WU spec (ID auto-generated; see fields below) |
89
- | `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree (default) |
90
- | `pnpm wu:claim --id WU-XXX --lane <L> --cloud` | Claim WU in cloud/branch-pr mode (no worktree) |
91
- | `pnpm wu:prep --id WU-XXX [--full-tests]` | Run gates, prep for wu:done (`tests.unit` scoped by default) |
92
- | `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, stamp, cleanup) |
93
- | `pnpm wu:edit --id WU-XXX --description "..."` | Edit WU spec fields (run --help for all flags) |
94
- | `pnpm wu:block --id WU-XXX --reason "..."` | Block WU with reason |
95
- | `pnpm wu:unblock --id WU-XXX` | Unblock WU |
96
- | `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
97
- | `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
98
- | `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt + record evidence |
99
- | `pnpm wu:brief --id WU-XXX --evidence-only` | Record wu:brief evidence only (self-implementation path) |
100
- | `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
101
- | `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt and record delegation lineage |
102
- | `pnpm wu:escalate --id WU-XXX` | Show escalation status for a WU |
103
- | `pnpm wu:escalate --resolve --id WU-XXX` | Resolve escalation (sets resolved_by/resolved_at) |
119
+ | Command | Description |
120
+ | ----------------------------------------------- | --------------------------------------------------------------------- |
121
+ | `pnpm wu:create --lane <Lane> --title "..." ..` | Create new WU spec (ID auto-generated; see fields below) |
122
+ | `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree (default) |
123
+ | `pnpm wu:claim --id WU-XXX --lane <L> --cloud` | Claim WU in cloud/branch-pr mode (no worktree) |
124
+ | `pnpm wu:prep --id WU-XXX [--full-tests]` | Run gates, prep for wu:done (`tests.unit` scoped by default) |
125
+ | `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, stamp, cleanup) |
126
+ | `pnpm wu:edit --id WU-XXX --description "..."` | Edit WU spec fields (run --help for all flags) |
127
+ | `pnpm wu:escalate --id WU-XXX` | Show escalation status for a WU |
128
+ | `pnpm wu:escalate --resolve --id WU-XXX` | Resolve escalation (sets resolved_by/resolved_at) |
129
+ | `pnpm wu:block --id WU-XXX --reason "..."` | Block WU with reason |
130
+ | `pnpm wu:unblock --id WU-XXX` | Unblock WU |
131
+ | `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
132
+ | `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
133
+ | `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt + record evidence (claimed workspace/branch) |
134
+ | `pnpm wu:brief --id WU-XXX --evidence-only` | Record wu:brief evidence only (self-implementation, no prompt output) |
135
+ | `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
136
+ | `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt and record delegation lineage |
137
+ | `pnpm wu:sandbox --id WU-XXX -- <cmd>` | Run command through hardened WU sandbox backend |
104
138
 
105
139
  ### WU Maintenance
106
140
 
@@ -116,27 +150,29 @@ pnpm exec lumenflow --client all # All clients
116
150
  | `pnpm wu:infer-lane --id WU-XXX` | Infer lane from code paths/description |
117
151
  | `pnpm wu:delete --id WU-XXX` | Delete WU spec and cleanup |
118
152
  | `pnpm wu:unlock-lane --lane <L>` | Unlock stuck lane |
153
+ | `pnpm wu:proto --lane <Lane>` | Create WU prototype (lightweight draft) |
119
154
 
120
155
  ---
121
156
 
122
157
  ## Gates & Quality
123
158
 
124
- | Command | Description |
125
- | --------------------------------- | --------------------------------- |
126
- | `pnpm gates` | Run all quality gates |
127
- | `pnpm gates --docs-only` | Run gates for docs changes |
128
- | `pnpm format` | Format all files (Prettier) |
129
- | `pnpm format:check` | Check formatting without changes |
130
- | `pnpm lint` | Run ESLint |
131
- | `pnpm typecheck` | Run TypeScript type checking |
132
- | `pnpm test` | Run all tests (Vitest) |
133
- | `pnpm spec:linter` | Validate WU specs (all) ¹ |
134
- | `pnpm lane:health` | Check lane config health |
135
- | `pnpm lane:suggest --paths "..."` | Suggest lane for code paths |
136
- | `pnpm lane:status` | Show lane lifecycle status |
137
- | `pnpm lane:setup` | Create/update draft lane config |
138
- | `pnpm lane:validate` | Validate lane draft artifacts |
139
- | `pnpm lane:lock` | Lock lane lifecycle for WU create |
159
+ | Command | Description |
160
+ | --------------------------------- | ----------------------------------------------- |
161
+ | `pnpm gates` | Run all quality gates |
162
+ | `pnpm gates --docs-only` | Run gates for docs changes |
163
+ | `pnpm format` | Format all files (Prettier) |
164
+ | `pnpm format:check` | Check formatting without changes |
165
+ | `pnpm lint` | Run ESLint |
166
+ | `pnpm typecheck` | Run TypeScript type checking |
167
+ | `pnpm test` | Run all tests (Vitest) |
168
+ | `pnpm spec:linter` | Validate WU specs (all) ¹ |
169
+ | `pnpm lane:health` | Check lane config health |
170
+ | `pnpm lane:suggest --paths "..."` | Suggest lane for code paths |
171
+ | `pnpm lane:status` | Show lane lifecycle status |
172
+ | `pnpm lane:setup` | Create/update draft lane config |
173
+ | `pnpm lane:validate` | Validate lane draft artifacts |
174
+ | `pnpm lane:lock` | Lock lane lifecycle for WU create |
175
+ | `pnpm lane:edit --lane <L>` | Edit lane definition (rename, wip-limit, paths) |
140
176
 
141
177
  ¹ **Script aliases:** `spec:linter` and `tasks:validate` are pnpm script aliases
142
178
  for `wu:validate --all`. They are not standalone CLI commands.
@@ -226,10 +262,7 @@ Supported mismatch fixes:
226
262
 
227
263
  ## Configuration
228
264
 
229
- | Command | Description |
230
- | ------------------------------------------------- | ----------------------------------------------- |
231
- | `pnpm config:get --key <dotpath>` | Read a value from `workspace.yaml` |
232
- | `pnpm config:set --key <dotpath> --value <value>` | Set a value in `workspace.yaml` (Zod-validated) |
265
+ See **Tooling Operations** section above for `config:set` and `config:get` commands.
233
266
 
234
267
  `config:set` validates against the Zod schema before writing and uses the micro-worktree
235
268
  pattern for atomic commits. Always use these commands instead of raw Write/Edit on
@@ -269,14 +302,14 @@ If the plan exists only in conversation, use `--plan` on `wu:create` to generate
269
302
  stub in `$LUMENFLOW_HOME/plans/` and automatically set the WU's `plan` field to the
270
303
  `lumenflow://plans/` URI. Feature WUs should have a `plan` field; notes do not replace the plan link.
271
304
 
272
- | Command | Description |
273
- | ------------------------------------------------------------------------ | ------------------------------------------------------------- |
305
+ | Command | Description |
306
+ | ------------------------------------------------------------------------ | ------------------------------------------------------------------- |
274
307
  | `pnpm plan:create --id INIT-XXX --title "..."` | Create a repo-native plan file in configured `directories.plansDir` |
275
- | `pnpm plan:edit --id INIT-XXX --section Goal --content "..."` | Edit a section in a plan file |
276
- | `pnpm plan:link --id INIT-XXX --plan lumenflow://plans/INIT-XXX-plan.md` | Link plan URI to initiative or WU |
277
- | `pnpm plan:promote --id INIT-XXX` | Promote plan status to approved |
278
- | `pnpm initiative:plan --initiative INIT-XXX --plan <path>` | Legacy-compatible initiative linking command |
279
- | `pnpm initiative:plan --initiative INIT-XXX --create` | Legacy-compatible create-and-link flow |
308
+ | `pnpm plan:edit --id INIT-XXX --section Goal --content "..."` | Edit a section in a plan file |
309
+ | `pnpm plan:link --id INIT-XXX --plan lumenflow://plans/INIT-XXX-plan.md` | Link plan URI to initiative or WU |
310
+ | `pnpm plan:promote --id INIT-XXX` | Promote plan status to approved |
311
+ | `pnpm initiative:plan --initiative INIT-XXX --plan <path>` | Legacy-compatible initiative linking command |
312
+ | `pnpm initiative:plan --initiative INIT-XXX --create` | Legacy-compatible create-and-link flow |
280
313
 
281
314
  ### Linking Plans
282
315
 
@@ -355,15 +388,19 @@ pnpm initiative:edit --id INIT-025 --phase-id 1 --phase-status in_progress
355
388
  | `pnpm orchestrate:monitor` | Monitor delegation/agent activity |
356
389
  | `pnpm delegation:list` | List active delegation records |
357
390
 
391
+ For the complete orchestration workflow (delegation, memory coordination, failure recovery, checkpoint-per-wave mechanics), see [initiative-orchestration.md](initiative-orchestration.md).
392
+
358
393
  ---
359
394
 
360
395
  ## Metrics & Flow
361
396
 
362
- | Command | Description |
363
- | ----------------------- | ---------------------------- |
364
- | `pnpm flow:report` | Generate flow metrics report |
365
- | `pnpm flow:bottlenecks` | Identify flow bottlenecks |
366
- | `pnpm metrics:snapshot` | Capture metrics snapshot |
397
+ | Command | Description |
398
+ | ----------------------- | ------------------------------------------------------ |
399
+ | `pnpm flow:report` | Generate flow metrics report |
400
+ | `pnpm flow:bottlenecks` | Identify flow bottlenecks |
401
+ | `pnpm metrics:snapshot` | Capture metrics snapshot |
402
+ | `pnpm metrics` | View workflow metrics |
403
+ | `pnpm strict:progress` | Report strict TypeScript backlog and guard regressions |
367
404
 
368
405
  ---
369
406
 
@@ -390,9 +427,45 @@ pnpm initiative:edit --id INIT-025 --phase-id 1 --phase-status in_progress
390
427
 
391
428
  ## Agent Utilities
392
429
 
393
- | Command | Description |
394
- | ------------------------- | ---------------------------------- |
395
- | `pnpm agent:issues-query` | Query GitHub issues for agent work |
430
+ | Command | Description |
431
+ | ------------------------- | -------------------------------------------- |
432
+ | `pnpm agent:session` | Start agent session (registers active agent) |
433
+ | `pnpm agent:session-end` | End agent session |
434
+ | `pnpm agent:log-issue` | Log issue during agent session |
435
+ | `pnpm agent:issues-query` | Query GitHub issues for agent work |
436
+ | `pnpm task:claim` | Claim a task directly through KernelRuntime |
437
+
438
+ ---
439
+
440
+ ## Packs
441
+
442
+ | Command | Description |
443
+ | ---------------------------------- | ------------------------------------ |
444
+ | `pnpm pack:author` | Author a secure domain pack |
445
+ | `pnpm pack:scaffold --name <name>` | Scaffold a new domain pack |
446
+ | `pnpm pack:validate --path <path>` | Validate a domain pack for integrity |
447
+ | `pnpm pack:hash --path <path>` | Compute integrity hash for a pack |
448
+ | `pnpm pack:publish --path <path>` | Publish a domain pack to registry |
449
+ | `pnpm pack:install --name <name>` | Install a domain pack into workspace |
450
+ | `pnpm pack:search --query <query>` | Search for packs in registry |
451
+
452
+ ---
453
+
454
+ ## Audited File & Git Wrappers
455
+
456
+ These commands wrap standard file/git operations with audit trail logging.
457
+ Use them when audit evidence is required (e.g., during WU execution).
458
+
459
+ | Command | Description |
460
+ | -------------------------------- | -------------------------------- |
461
+ | `pnpm file:read --path <path>` | Read file with audit trail |
462
+ | `pnpm file:write --path <path>` | Write file with audit trail |
463
+ | `pnpm file:edit --path <path>` | Edit file with audit trail |
464
+ | `pnpm file:delete --path <path>` | Delete file with audit trail |
465
+ | `pnpm git:status` | Show git status with audit trail |
466
+ | `pnpm git:diff` | Show git diff with audit trail |
467
+ | `pnpm git:log` | Show git log with audit trail |
468
+ | `pnpm git:branch` | Show git branch with audit trail |
396
469
 
397
470
  ---
398
471
 
@@ -713,8 +786,8 @@ Hooks provide automatic enforcement at the tool level:
713
786
 
714
787
  For a complete picture of how all WU commands, memory tools, and orchestration tools fit together, and for remediation of common failure modes, see:
715
788
 
716
- - **[Canonical Lifecycle Map](../../lumenflow-complete.md#26-canonical-lifecycle-map-wu-1635)** -- Command-mode matrix (worktree vs cloud/branch-PR), expected locations, and handoff points
717
- - **[Failure-Mode Runbook](../../lumenflow-complete.md#appendix-a-failure-mode-runbook-wu-1635)** -- Concrete remediation for main-behind-origin, partial-claim state, spawn-provenance enforcement, and wu:recover usage
789
+ - **[Canonical Lifecycle Map](../../lumenflow-agent-capsule.md)** -- Command-mode matrix (worktree vs cloud/branch-PR), expected locations, and handoff points
790
+ - **[Failure-Mode Runbook](../../lumenflow-agent-capsule.md)** -- Concrete remediation for main-behind-origin, partial-claim state, spawn-provenance enforcement, and wu:recover usage
718
791
  - **[Troubleshooting wu:done](./troubleshooting-wu-done.md)** -- Most common agent mistake (two-step wu:prep + wu:done workflow)
719
792
  - **[First WU Mistakes](./first-wu-mistakes.md)** -- Common first-time pitfalls and how to avoid them
720
793
  - **[WU Sizing Guide](../../wu-sizing-guide.md)** -- Context safety triggers, complexity assessment, and session strategies
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Last updated:** {{DATE}}
4
4
 
5
- This document covers the complete release process for LumenFlow, including versioning, npm publishing, documentation updates, and the GitHub App.
5
+ This document covers the complete release process for LumenFlow, including versioning, npm publishing, and documentation updates.
6
6
 
7
7
  ---
8
8
 
@@ -10,11 +10,11 @@ This document covers the complete release process for LumenFlow, including versi
10
10
 
11
11
  LumenFlow has several components that need to stay in sync:
12
12
 
13
- | Component | Location | Deployment |
14
- | -------------- | ----------------------- | ----------------------------------- |
15
- | npm packages | `packages/@lumenflow/*` | Auto via GitHub Actions on tag push |
16
- | Starlight docs | `apps/docs/` | Manual via Vercel CLI |
17
- | GitHub App | `apps/github-app/` | Auto via Vercel Git integration |
13
+ | Component | Location | Deployment |
14
+ | -------------- | --------------------------- | ----------------------------------- |
15
+ | npm packages | `packages/@lumenflow/*` | Auto via GitHub Actions on tag push |
16
+ | Starlight docs | `apps/docs/` | Manual via Vercel CLI |
17
+ | Pack registry | `apps/web/` + pack tarballs | Manual deploy + curl publish |
18
18
 
19
19
  ---
20
20
 
@@ -251,39 +251,108 @@ vercel --prod
251
251
  ### Important Notes
252
252
 
253
253
  - **No private repo links**: Starlight docs are public; never link to `github.com/hellmai/lumenflow-dev`
254
- - **Link to GitHub App**: Use <https://github.com/apps/lumenflow-by-hellmai> for GitHub links
255
254
  - **Link to npm**: Use <https://www.npmjs.com/org/lumenflow> for package links
256
255
 
257
256
  ---
258
257
 
259
- ## GitHub App
258
+ ## Pack Registry Publishing
260
259
 
261
- The LumenFlow GitHub App provides workflow enforcement for teams.
260
+ Packs are published to the registry at <https://registry.lumenflow.dev>. The registry is served by the `apps/web` Next.js app deployed to Vercel.
262
261
 
263
- ### Components
262
+ ### Prerequisites
264
263
 
265
- - **App manifest**: `apps/github-app/app.yml`
266
- - **Webhook handler**: `apps/github-app/api/webhook.ts`
267
- - **Validation endpoints**: `apps/github-app/api/validate-token.ts`
264
+ 1. **Deploy `apps/web` to Vercel** before publishing. The registry API runs on the deployed app, so any code fixes (e.g. blob storage changes) must be live first.
265
+ 2. **Build the pack tarball** with `pnpm pack` from the pack directory.
266
+ 3. **Authenticate** with a GitHub token (`gh auth token`).
268
267
 
269
- ### Deployment
268
+ ### Step 1: Deploy the Registry
269
+
270
+ The `apps/web` Vercel project has `Root Directory: apps/web` configured. To deploy from the CLI, link the repo root to the `web` project:
271
+
272
+ ```bash
273
+ # From repo root — link to the 'web' project (not 'lumenflow-dev')
274
+ vercel link --project web --scope hellm-ai --yes
275
+
276
+ # Deploy to production
277
+ vercel --prod --yes
278
+ ```
279
+
280
+ **Gotcha:** Do NOT run `vercel` from inside `apps/web/` — the Vercel root directory setting doubles the path (`apps/web/apps/web`). Always deploy from the repo root.
281
+
282
+ **Gotcha:** The repo root `.vercel/project.json` may be linked to `lumenflow-dev` (the monorepo project). You must re-link to `web` before deploying the registry.
283
+
284
+ After deploying, restore the link if needed:
285
+
286
+ ```bash
287
+ vercel link --project lumenflow-dev --scope hellm-ai --yes
288
+ ```
289
+
290
+ ### Step 2: Build the Tarball
291
+
292
+ ```bash
293
+ cd packages/@lumenflow/packs/software-delivery # or sidekick, etc.
294
+ pnpm pack
295
+ # Creates: lumenflow-packs-software-delivery-X.Y.Z.tgz
296
+ ```
297
+
298
+ ### Step 3: Publish to Registry
299
+
300
+ ```bash
301
+ curl -s -X POST \
302
+ -H "Authorization: Bearer $(gh auth token)" \
303
+ -H "Origin: https://registry.lumenflow.dev" \
304
+ -F "tarball=@packages/@lumenflow/packs/software-delivery/lumenflow-packs-software-delivery-X.Y.Z.tgz" \
305
+ -F "description=Software delivery pack for LumenFlow" \
306
+ -F "version=X.Y.Z" \
307
+ "https://registry.lumenflow.dev/api/registry/packs/software-delivery/versions"
308
+ ```
309
+
310
+ Replace `software-delivery` with the pack ID and `X.Y.Z` with the version.
311
+
312
+ **Important:** The `Origin` header must match `https://registry.lumenflow.dev` — CSRF validation will reject requests without it.
313
+
314
+ ### Step 4: Verify
315
+
316
+ ```bash
317
+ # List all packs
318
+ curl -s https://registry.lumenflow.dev/api/registry/packs
319
+
320
+ # Check a specific pack
321
+ curl -s https://registry.lumenflow.dev/api/registry/packs/software-delivery
322
+ ```
270
323
 
271
- The GitHub App is deployed **automatically** via Vercel Git integration when changes are pushed to `main`.
324
+ ### Step 5: Cleanup
272
325
 
273
- - **Project**: `lumenflow-app` (ID: `prj_JKfcHVb4QjzAxdjCIJwaUf5PWusG`)
274
- - **URL**: <https://lumenflow-app.vercel.app>
326
+ ```bash
327
+ rm packages/@lumenflow/packs/software-delivery/lumenflow-packs-software-delivery-X.Y.Z.tgz
328
+ ```
275
329
 
276
- ### Package Configuration
330
+ ### Vercel Projects Reference
277
331
 
278
- The `apps/github-app/package.json` must have `"private": true` to prevent npm publish attempts.
332
+ | Project | Domain | Purpose |
333
+ | ----------------- | ------------------------ | ----------------------- |
334
+ | `web` | registry.lumenflow.dev | Pack registry + web app |
335
+ | `docs` | lumenflow.dev | Starlight documentation |
336
+ | `lumenflow-dev` | lumenflow-dev.vercel.app | Monorepo preview |
337
+ | `lumenflow-cloud` | cloud.lumenflow.dev | Control plane |
279
338
 
280
- ### Environment Variables (Vercel)
339
+ ### Troubleshooting Pack Publishing
281
340
 
282
- | Variable | Description |
283
- | ----------------------- | ---------------------------- |
284
- | `GITHUB_APP_ID` | GitHub App ID |
285
- | `GITHUB_PRIVATE_KEY` | PEM private key for app auth |
286
- | `GITHUB_WEBHOOK_SECRET` | Webhook signature secret |
341
+ #### "Pack not found" after publish returns success
342
+
343
+ The deploy running at publish time was using old code. Deploy first, then publish.
344
+
345
+ #### Version conflict (409)
346
+
347
+ The version already exists. Pack versions are immutable — bump the version number.
348
+
349
+ #### CSRF error (403)
350
+
351
+ Missing or wrong `Origin` header. Must be `https://registry.lumenflow.dev`.
352
+
353
+ #### Vercel build fails with d2 error
354
+
355
+ The `@lumenflow/docs` package requires `d2` (diagramming tool) which is not available on Vercel. Ensure you are deploying the `web` project (which uses `turbo build --filter=@lumenflow/web`) not the `lumenflow-dev` project (which builds all packages).
287
356
 
288
357
  ---
289
358
 
@@ -353,19 +422,19 @@ If you need more control:
353
422
 
354
423
  - [ ] Verify npm packages accessible: `npm view @lumenflow/cli`
355
424
  - [ ] Verify docs updated: <https://lumenflow.dev>
356
- - [ ] Verify GitHub App functional (if changed)
425
+ - [ ] Verify packs published: `curl -s https://registry.lumenflow.dev/api/registry/packs`
357
426
 
358
427
  ---
359
428
 
360
429
  ## Keeping Components in Sync
361
430
 
362
- | Change Type | npm | Docs | GitHub App |
363
- | ---------------- | ------------- | ------ | ------------ |
364
- | Bug fix in CLI | Tag + publish | Auto\* | No |
365
- | New CLI command | Tag + publish | Auto\* | No |
366
- | Docs-only update | No | Deploy | No |
367
- | GitHub App fix | No | No | Auto on push |
368
- | Full release | Tag + publish | Deploy | Auto |
431
+ | Change Type | npm | Docs | Packs |
432
+ | ---------------- | ------------- | ------ | ------- |
433
+ | Bug fix in CLI | Tag + publish | Auto\* | No |
434
+ | New CLI command | Tag + publish | Auto\* | No |
435
+ | Pack changes | Tag + publish | No | Publish |
436
+ | Docs-only update | No | Deploy | No |
437
+ | Full release | Tag + publish | Deploy | Publish |
369
438
 
370
439
  \* CLI/config reference docs regenerate automatically during `wu:done` when trigger files change. See [Automatic Docs Generation](./docs-generation.md).
371
440
 
@@ -385,12 +454,6 @@ If you need more control:
385
454
  2. Check Vercel CLI auth: `vercel whoami`
386
455
  3. Check project link: `vercel link`
387
456
 
388
- ### GitHub App webhook failures
389
-
390
- 1. Check Vercel deployment logs
391
- 2. Verify environment variables set
392
- 3. Check webhook secret matches GitHub App settings
393
-
394
457
  ---
395
458
 
396
459
  ## Known Warnings
@@ -685,3 +685,4 @@ rm -rf /tmp/nextjs-scaffold
685
685
  - [troubleshooting-wu-done.md](troubleshooting-wu-done.md) - Why agents forget wu:done
686
686
  - [first-wu-mistakes.md](first-wu-mistakes.md) - Common mistakes to avoid
687
687
  - [quick-ref-commands.md](quick-ref-commands.md) - Command reference
688
+ - [initiative-orchestration.md](initiative-orchestration.md) - Initiative orchestration, delegation, recovery
@@ -69,13 +69,7 @@ cat .lumenflow/test-baseline.json | grep -i "<test_name>"
69
69
 
70
70
  **Option B: Add to baseline** (for infrastructure issues only)
71
71
 
72
- ```bash
73
- pnpm baseline:add \
74
- --test "should handle edge case" \
75
- --file "path/to/test.ts" \
76
- --reason "CI flakiness - infrastructure issue" \
77
- --fix-wu WU-XXXX
78
- ```
72
+ To add a test to the baseline, edit `.lumenflow/test-baseline.json` and document the reason in your WU notes.
79
73
 
80
74
  ---
81
75
 
@@ -127,5 +121,5 @@ When encountering test failures:
127
121
  ## Related Documentation
128
122
 
129
123
  - [constraints.md](../../../../../../.lumenflow/constraints.md) - Constraint #7: Test Ratchet
130
- - [lumenflow-complete.md](../../lumenflow-complete.md) - Definition of Done
124
+ - [LumenFlow Agent Capsule](../../lumenflow-agent-capsule.md) - Definition of Done
131
125
  - [troubleshooting-wu-done.md](./troubleshooting-wu-done.md) - wu:done issues
@@ -48,7 +48,7 @@ Essential commands for multi-agent coordination and context management:
48
48
  | `pnpm mem:inbox --since 30m` | Check coordination signals |
49
49
  | `pnpm mem:signal "msg" --wu WU-XXX` | Broadcast signal to other agents |
50
50
  | `pnpm mem:create "msg" --wu WU-XXX` | Create memory node (bug capture) |
51
- | `pnpm wu:spawn --id WU-XXX --client claude-code` | Spawn sub-agent prompt |
51
+ | `pnpm wu:brief --id WU-XXX --client claude-code` | Generate handoff prompt + record evidence |
52
52
 
53
53
  **When to checkpoint:**
54
54
  - After each acceptance criterion completed
@@ -2,7 +2,7 @@
2
2
  name: bug-classification
3
3
  description: Classify bugs (P0-P3) and determine fix-in-place vs separate Bug WU. Use when bug discovered mid-WU, deciding bug priority, or handling production issues.
4
4
  version: 1.0.0
5
- source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
5
+ source: docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md
6
6
  source_sections: §8 (Bug Handling Mid-WU)
7
7
  last_updated: {{DATE}}
8
8
  allowed-tools: Read, Grep
@@ -189,4 +189,4 @@ blocking: []
189
189
 
190
190
  ## Reference
191
191
 
192
- See [lumenflow-complete.md §8](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md) for complete bug handling guide.
192
+ See [LumenFlow Agent Capsule](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md) for complete bug handling guide.
@@ -2,15 +2,15 @@
2
2
  name: code-quality
3
3
  description: Shared patterns for SOLID/DRY code review, hexagonal architecture compliance, TypeScript best practices, and performance anti-patterns. Use when reviewing code quality, checking architecture boundaries, or validating TypeScript patterns.
4
4
  version: 1.1.0
5
- source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
6
- source_sections: §2 (Core Principles), §4 (Hexagonal Architecture)
5
+ source: docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md
6
+ source_sections: Core Principles, Hexagonal Architecture
7
7
  last_updated: {{DATE}}
8
8
  allowed-tools: Read, Grep, Glob
9
9
  ---
10
10
 
11
11
  # Code Quality Skill
12
12
 
13
- **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md` §2, §4 (canonical)
13
+ **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md` (canonical)
14
14
 
15
15
  ## When to Use
16
16
 
@@ -165,7 +165,7 @@ Always load context in this order for best comprehension:
165
165
 
166
166
  1. `LUMENFLOW.md` — Workflow fundamentals
167
167
  2. `README.md` — Project structure
168
- 3. `lumenflow-complete.md` §§1-7 — Constraints
168
+ 3. `lumenflow-agent-capsule.md` — Constraints
169
169
  4. WU YAML — Current task spec
170
170
  5. Task instructions — What to do
171
171
  6. Constraints block — Critical rules (at END per "Lost in Middle" research)
@@ -2,7 +2,7 @@
2
2
  name: frontend-design
3
3
  description: Create distinctive, production-grade frontend interfaces. Use when building React components, pages, UI features, or when user requests visual/design work.
4
4
  version: 1.0.0
5
- source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
5
+ source: docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md
6
6
  last_updated: {{DATE}}
7
7
  allowed-tools: Read, Write, Edit, Bash
8
8
  ---
@@ -2,15 +2,15 @@
2
2
  name: lumenflow-gates
3
3
  description: Quality gates troubleshooting (format, lint, typecheck, tests). Use when gates fail, debugging format/lint/typecheck errors, or determining if failure is from your changes vs pre-existing.
4
4
  version: 2.1.0
5
- source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
6
- source_sections: §6.4 (Validation & Gates)
5
+ source: docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md
6
+ source_sections: Validation & Gates
7
7
  last_updated: {{DATE}}
8
8
  allowed-tools: Read, Bash, Grep
9
9
  ---
10
10
 
11
11
  # LumenFlow Gates Skill
12
12
 
13
- **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md` §6.4 (canonical)
13
+ **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md` (canonical)
14
14
 
15
15
  ## When to Use
16
16
 
@@ -84,4 +84,4 @@ pnpm tasks:validate # WU YAML validation
84
84
 
85
85
  ---
86
86
 
87
- **Full spec**: [lumenflow-complete.md §6.4](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md)
87
+ **Full spec**: [LumenFlow Agent Capsule](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md)
@@ -2,15 +2,15 @@
2
2
  name: tdd-workflow
3
3
  description: Test-driven development workflow. RED-GREEN-REFACTOR applies to all code; 5-step ports-first for hex architecture. Use when implementing new features, writing tests, or working with hexagonal architecture.
4
4
  version: 2.1.0
5
- source: docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md
6
- source_sections: §5 (AI-TDD 5-Step Workflow), §4 (Hexagonal Architecture)
5
+ source: docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md
6
+ source_sections: AI-TDD 5-Step Workflow, Hexagonal Architecture
7
7
  last_updated: {{DATE}}
8
8
  allowed-tools: Read, Write, Edit, Bash, Grep
9
9
  ---
10
10
 
11
11
  # TDD Workflow Skill
12
12
 
13
- **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md` §5 (canonical)
13
+ **Source**: `docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md` (canonical)
14
14
 
15
15
  ## When to Use
16
16
 
@@ -138,4 +138,4 @@ pnpm test:coverage # Check coverage
138
138
 
139
139
  ---
140
140
 
141
- **Full spec**: [lumenflow-complete.md §5](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-complete.md)
141
+ **Full spec**: [LumenFlow Agent Capsule](../../../docs/04-operations/_frameworks/lumenflow/lumenflow-agent-capsule.md)