@lumenflow/cli 5.4.0 → 5.7.12
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 +42 -40
- package/dist/db-journal-recover.js +400 -0
- package/dist/db-journal-recover.js.map +1 -0
- package/dist/docs-sync.js +8 -3
- package/dist/docs-sync.js.map +1 -1
- package/dist/gate-defaults.js +191 -9
- package/dist/gate-defaults.js.map +1 -1
- package/dist/gate-registry.js.map +1 -1
- package/dist/gates/monolithic-file-contention-guard.js +167 -0
- package/dist/gates/monolithic-file-contention-guard.js.map +1 -0
- package/dist/gates/prod-migration-drift.js +207 -0
- package/dist/gates/prod-migration-drift.js.map +1 -0
- package/dist/gates/test-over-deletion-guard.js +255 -0
- package/dist/gates/test-over-deletion-guard.js.map +1 -0
- package/dist/gates-runners.js +401 -2
- package/dist/gates-runners.js.map +1 -1
- package/dist/gates.js +349 -4
- package/dist/gates.js.map +1 -1
- package/dist/lumenflow-setup.js +144 -0
- package/dist/lumenflow-setup.js.map +1 -0
- package/dist/lumenflow-upgrade.js +2 -1
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/dist/mem-create.js +10 -1
- package/dist/mem-create.js.map +1 -1
- package/dist/mem-signal.js +21 -4
- package/dist/mem-signal.js.map +1 -1
- package/dist/metrics-cli.js +19 -2
- package/dist/metrics-cli.js.map +1 -1
- package/dist/metrics-snapshot.js +25 -2
- package/dist/metrics-snapshot.js.map +1 -1
- package/dist/orchestrate-initiative.js +28 -3
- package/dist/orchestrate-initiative.js.map +1 -1
- package/dist/public-manifest.js +17 -0
- package/dist/public-manifest.js.map +1 -1
- package/dist/release.js +53 -18
- package/dist/release.js.map +1 -1
- package/dist/wu-done-gates.js +121 -8
- package/dist/wu-done-gates.js.map +1 -1
- package/dist/wu-done.js +30 -6
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-edit-operations.js +74 -0
- package/dist/wu-edit-operations.js.map +1 -1
- package/dist/wu-edit-validators.js +58 -0
- package/dist/wu-edit-validators.js.map +1 -1
- package/dist/wu-edit.js +106 -4
- package/dist/wu-edit.js.map +1 -1
- package/dist/wu-prep.js +132 -8
- package/dist/wu-prep.js.map +1 -1
- package/dist/wu-recover.js +6 -0
- package/dist/wu-recover.js.map +1 -1
- package/dist/wu-release.js +120 -2
- package/dist/wu-release.js.map +1 -1
- package/dist/wu-sizing-validation.js +47 -17
- package/dist/wu-sizing-validation.js.map +1 -1
- package/dist/wu-status.js +33 -0
- package/dist/wu-status.js.map +1 -1
- package/package.json +13 -11
- package/packs/agent-runtime/package.json +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/templates/core/AGENTS.md.template +162 -26
- package/templates/core/LUMENFLOW.md.template +381 -70
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +0 -5
- package/templates/core/ai/onboarding/agent-safety-card.md.template +63 -17
- package/templates/core/ai/onboarding/initiative-orchestration.md.template +4 -0
- package/templates/core/ai/onboarding/release-process.md.template +7 -7
- package/templates/core/ai/onboarding/vendor-support.md.template +74 -10
- package/templates/vendors/claude/.claude/skills/frontend-design/SKILL.md.template +1 -1
- package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +28 -0
- package/packs/agent-runtime/agent-heartbeat.ts +0 -163
- package/packs/agent-runtime/auto-session-integration.ts +0 -888
- package/packs/agent-runtime/capability-factory.ts +0 -104
- package/packs/agent-runtime/constants.ts +0 -21
- package/packs/agent-runtime/delegation-registry-schema.ts +0 -220
- package/packs/agent-runtime/delegation-registry-store.ts +0 -269
- package/packs/agent-runtime/delegation-tree.ts +0 -328
- package/packs/agent-runtime/index.ts +0 -20
- package/packs/agent-runtime/manifest.ts +0 -348
- package/packs/agent-runtime/memory-coordination-contract.ts +0 -86
- package/packs/agent-runtime/orchestration.ts +0 -2027
- package/packs/agent-runtime/pack-registration.ts +0 -110
- package/packs/agent-runtime/policy-factory.ts +0 -165
- package/packs/agent-runtime/remote-controls/index.ts +0 -7
- package/packs/agent-runtime/remote-controls/operations.ts +0 -405
- package/packs/agent-runtime/remote-controls/port.ts +0 -48
- package/packs/agent-runtime/remote-controls/state-store.ts +0 -258
- package/packs/agent-runtime/remote-controls/types.ts +0 -105
- package/packs/agent-runtime/session-schema.ts +0 -467
- package/packs/agent-runtime/tool-impl/agent-turn-tools.ts +0 -793
- package/packs/agent-runtime/tool-impl/index.ts +0 -6
- package/packs/agent-runtime/tool-impl/provider-adapters.ts +0 -1245
- package/packs/agent-runtime/tool-impl/remote-controls.mock.ts +0 -256
- package/packs/agent-runtime/tool-impl/remote-controls.ts +0 -273
- package/packs/agent-runtime/tools/index.ts +0 -4
- package/packs/agent-runtime/tools/types.ts +0 -47
- package/packs/agent-runtime/turn-lifecycle-events.ts +0 -590
- package/packs/agent-runtime/types.ts +0 -128
- package/packs/agent-runtime/vitest.config.ts +0 -11
- package/packs/sidekick/channel-ingress.ts +0 -137
- package/packs/sidekick/constants.ts +0 -10
- package/packs/sidekick/index.ts +0 -8
- package/packs/sidekick/manifest-schema.ts +0 -49
- package/packs/sidekick/manifest.ts +0 -512
- package/packs/sidekick/pack-registration.ts +0 -110
- package/packs/sidekick/policy-factory.ts +0 -38
- package/packs/sidekick/sidekick-events.ts +0 -694
- package/packs/sidekick/src/adapters/cloud-queue.ts +0 -101
- package/packs/sidekick/src/adapters/control-plane-bridge.adapter.ts +0 -386
- package/packs/sidekick/src/adapters/filesystem-bridge.adapter.ts +0 -228
- package/packs/sidekick/src/domain/channel.types.ts +0 -64
- package/packs/sidekick/src/ports/channel-bridge.port.ts +0 -92
- package/packs/sidekick/src/routines/commit.ts +0 -74
- package/packs/sidekick/tool-impl/channel-tools.ts +0 -577
- package/packs/sidekick/tool-impl/channel-transports.ts +0 -75
- package/packs/sidekick/tool-impl/index.ts +0 -29
- package/packs/sidekick/tool-impl/memory-tools.ts +0 -290
- package/packs/sidekick/tool-impl/routine-commit.ts +0 -102
- package/packs/sidekick/tool-impl/routine-tools.ts +0 -440
- package/packs/sidekick/tool-impl/runtime-context.ts +0 -28
- package/packs/sidekick/tool-impl/shared.ts +0 -125
- package/packs/sidekick/tool-impl/storage.ts +0 -325
- package/packs/sidekick/tool-impl/system-tools.ts +0 -160
- package/packs/sidekick/tool-impl/task-tools.ts +0 -506
- package/packs/sidekick/tools/channel-tools.ts +0 -53
- package/packs/sidekick/tools/index.ts +0 -9
- package/packs/sidekick/tools/memory-tools.ts +0 -53
- package/packs/sidekick/tools/routine-tools.ts +0 -53
- package/packs/sidekick/tools/system-tools.ts +0 -47
- package/packs/sidekick/tools/task-tools.ts +0 -61
- package/packs/sidekick/tools/types.ts +0 -57
- package/packs/sidekick/vitest.config.ts +0 -11
- package/packs/software-delivery/constants.ts +0 -10
- package/packs/software-delivery/extensions.ts +0 -140
- package/packs/software-delivery/gate-policies.ts +0 -134
- package/packs/software-delivery/index.ts +0 -8
- package/packs/software-delivery/manifest-schema.ts +0 -268
- package/packs/software-delivery/manifest.ts +0 -657
- package/packs/software-delivery/pack-registration.ts +0 -113
- package/packs/software-delivery/src/commands/index.ts +0 -5
- package/packs/software-delivery/src/config/delivery-review-contract.ts +0 -256
- package/packs/software-delivery/src/config/env-accessors.ts +0 -66
- package/packs/software-delivery/src/config/index.ts +0 -8
- package/packs/software-delivery/src/config/normalize-config-keys.ts +0 -9
- package/packs/software-delivery/src/config/schemas/lumenflow-config-schema-types.ts +0 -460
- package/packs/software-delivery/src/config/workspace-reader.ts +0 -375
- package/packs/software-delivery/src/constants/backlog-patterns.ts +0 -31
- package/packs/software-delivery/src/constants/client-ids.ts +0 -19
- package/packs/software-delivery/src/constants/config-contract.ts +0 -7
- package/packs/software-delivery/src/constants/docs-layout-presets.ts +0 -50
- package/packs/software-delivery/src/constants/duration-constants.ts +0 -20
- package/packs/software-delivery/src/constants/gate-constants.ts +0 -32
- package/packs/software-delivery/src/constants/index.ts +0 -29
- package/packs/software-delivery/src/constants/lock-constants.ts +0 -35
- package/packs/software-delivery/src/constants/object-guards.ts +0 -12
- package/packs/software-delivery/src/constants/section-headings.ts +0 -107
- package/packs/software-delivery/src/constants/wu-cli-constants.ts +0 -488
- package/packs/software-delivery/src/constants/wu-domain-constants.ts +0 -466
- package/packs/software-delivery/src/constants/wu-git-constants.ts +0 -7
- package/packs/software-delivery/src/constants/wu-id-format.ts +0 -327
- package/packs/software-delivery/src/constants/wu-paths-constants.ts +0 -384
- package/packs/software-delivery/src/constants/wu-statuses.ts +0 -287
- package/packs/software-delivery/src/constants/wu-type-helpers.ts +0 -67
- package/packs/software-delivery/src/constants/wu-ui-constants.ts +0 -267
- package/packs/software-delivery/src/constants/wu-validation-constants.ts +0 -73
- package/packs/software-delivery/src/domain/index.ts +0 -5
- package/packs/software-delivery/src/domain/orchestration.constants.ts +0 -166
- package/packs/software-delivery/src/domain/orchestration.schemas.ts +0 -238
- package/packs/software-delivery/src/domain/orchestration.types.ts +0 -176
- package/packs/software-delivery/src/methodology/incremental-test.ts +0 -122
- package/packs/software-delivery/src/methodology/index.ts +0 -6
- package/packs/software-delivery/src/methodology/manual-test-validator.ts +0 -292
- package/packs/software-delivery/src/policy/coverage-gate.ts +0 -270
- package/packs/software-delivery/src/policy/gates-agent-mode.ts +0 -223
- package/packs/software-delivery/src/policy/gates-config-internal.ts +0 -121
- package/packs/software-delivery/src/policy/gates-config.ts +0 -300
- package/packs/software-delivery/src/policy/gates-coverage.ts +0 -356
- package/packs/software-delivery/src/policy/gates-presets.ts +0 -134
- package/packs/software-delivery/src/policy/gates-schemas.ts +0 -173
- package/packs/software-delivery/src/policy/index.ts +0 -22
- package/packs/software-delivery/src/policy/package-manager-resolver.ts +0 -319
- package/packs/software-delivery/src/policy/resolve-policy.ts +0 -601
- package/packs/software-delivery/src/ports/config.ports.ts +0 -90
- package/packs/software-delivery/src/ports/dashboard-renderer.port.ts +0 -125
- package/packs/software-delivery/src/ports/index.ts +0 -10
- package/packs/software-delivery/src/ports/sync-validator.ports.ts +0 -59
- package/packs/software-delivery/src/ports/wu-helpers.ports.ts +0 -168
- package/packs/software-delivery/src/ports/wu-state.ports.ts +0 -241
- package/packs/software-delivery/src/primitives/index.ts +0 -5
- package/packs/software-delivery/src/runtime/index.ts +0 -6
- package/packs/software-delivery/src/runtime/work-classifier.ts +0 -561
- package/packs/software-delivery/src/sandbox/index.ts +0 -10
- package/packs/software-delivery/src/sandbox/sandbox-allowlist.ts +0 -118
- package/packs/software-delivery/src/sandbox/sandbox-backend-linux.ts +0 -88
- package/packs/software-delivery/src/sandbox/sandbox-backend-macos.ts +0 -154
- package/packs/software-delivery/src/sandbox/sandbox-backend-windows.ts +0 -47
- package/packs/software-delivery/src/sandbox/sandbox-profile.ts +0 -153
- package/packs/software-delivery/src/schemas/index.ts +0 -5
- package/packs/software-delivery/src/state/date-utils.ts +0 -158
- package/packs/software-delivery/src/state/index.ts +0 -15
- package/packs/software-delivery/src/state/state-machine.ts +0 -119
- package/packs/software-delivery/src/state/wu-doc-types.ts +0 -51
- package/packs/software-delivery/src/state/wu-paths.ts +0 -381
- package/packs/software-delivery/src/state/wu-schema.ts +0 -1139
- package/packs/software-delivery/src/state/wu-state-schema.ts +0 -255
- package/packs/software-delivery/src/state/wu-yaml.ts +0 -338
- package/packs/software-delivery/tool-impl/agent-tools.ts +0 -263
- package/packs/software-delivery/tool-impl/delegation-tools.ts +0 -66
- package/packs/software-delivery/tool-impl/flow-metrics-tools.ts +0 -219
- package/packs/software-delivery/tool-impl/git-runner.ts +0 -113
- package/packs/software-delivery/tool-impl/git-tools.ts +0 -316
- package/packs/software-delivery/tool-impl/index.ts +0 -15
- package/packs/software-delivery/tool-impl/initiative-orchestration-tools.ts +0 -720
- package/packs/software-delivery/tool-impl/lane-lock.ts +0 -246
- package/packs/software-delivery/tool-impl/memory-tools.ts +0 -470
- package/packs/software-delivery/tool-impl/pending-runtime-tools.ts +0 -21
- package/packs/software-delivery/tool-impl/runtime-cli-adapter.ts +0 -329
- package/packs/software-delivery/tool-impl/runtime-native-tools.ts +0 -687
- package/packs/software-delivery/tool-impl/worker-loader.ts +0 -52
- package/packs/software-delivery/tool-impl/worktree-tools.ts +0 -46
- package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +0 -807
- package/packs/software-delivery/tools/delegation-tools.ts +0 -23
- package/packs/software-delivery/tools/git-tools.ts +0 -55
- package/packs/software-delivery/tools/index.ts +0 -8
- package/packs/software-delivery/tools/lane-lock-tool.ts +0 -37
- package/packs/software-delivery/tools/types.ts +0 -71
- package/packs/software-delivery/tools/worktree-tools.ts +0 -49
- package/packs/software-delivery/vitest.config.ts +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# LumenFlow Workflow Guide
|
|
2
2
|
|
|
3
|
-
**Last updated:** {{DATE}}
|
|
3
|
+
**Last updated:** {{DATE}} (5.6.0 — INIT-069: workflow ergonomics, smart guard gates, db primitives, prod drift CI gate)
|
|
4
4
|
|
|
5
5
|
LumenFlow is a vendor-agnostic workflow framework for AI-native software development.
|
|
6
6
|
|
|
@@ -205,7 +205,7 @@ intentionally exempt and the workspace policy does not already exclude it.
|
|
|
205
205
|
## Core Principles
|
|
206
206
|
|
|
207
207
|
1. **Design-First** (feature/refactor WUs): Load the `design-first` skill before implementation. Question requirements, delete unnecessary, simplify before optimizing. Invocation varies by vendor — see [Skills & Agents](#skills--agents) below.
|
|
208
|
-
2. **Fit-For-Surface Verification**: Choose the least brittle verification that gives strong confidence. Prefer TDD for runtime logic when repository policy requires it; prefer behavior-focused integration, smoke, visual, or manual verification for UI, content, and presentation work. Never assert inline styles, CSS values, exact copy, or DOM shape in E2E/integration tests.
|
|
208
|
+
2. **Fit-For-Surface Verification**: Choose the least brittle verification that gives strong confidence. Prefer TDD for runtime logic when repository policy requires it; prefer behavior-focused integration, smoke, visual, or manual verification for UI, content, and presentation work. Never assert inline styles, CSS values, exact copy, or DOM shape in E2E/integration tests. For the boundary between framework-owned gates, generated brief content, and consumer-authored local guidance, see [ADR-017](docs/09-architecture-decisions/ADR-017-lumenflow-configurability-principle.md).
|
|
209
209
|
3. **Library-First**: Search existing libraries before custom code
|
|
210
210
|
4. **DRY/SOLID/KISS/YAGNI**: No magic numbers, no hardcoded strings
|
|
211
211
|
5. **Worktree Discipline**: After `wu:claim`, work ONLY in the worktree
|
|
@@ -252,17 +252,60 @@ pnpm mem:inbox # coordination signals (defaults to unread)
|
|
|
252
252
|
The memory layer also supports live-session addressing for active agents:
|
|
253
253
|
|
|
254
254
|
```bash
|
|
255
|
-
pnpm mem:roster # list active session_id/display_name/role rows
|
|
256
|
-
pnpm mem:signal 'please review' --wu WU-XXXX --to Planck
|
|
257
|
-
pnpm mem:inbox --for Planck
|
|
255
|
+
pnpm mem:roster # list active session_id/display_name/agent_identity/role rows
|
|
256
|
+
pnpm mem:signal 'please review' --wu WU-XXXX --to Planck,codex:implementer:host42 --intent PROPOSE --requires-ack
|
|
257
|
+
pnpm mem:inbox --for Planck --thread thread-1234 # directed + broadcast signals for that identity
|
|
258
|
+
pnpm mem:converged --thread thread-1234 # exit 0 when every root recipient replied AGREE
|
|
258
259
|
pnpm mem:context --wu WU-XXXX --no-roster # opt out when a test needs stable output
|
|
259
260
|
```
|
|
260
261
|
|
|
262
|
+
The wire contract for agent-to-agent coordination is `A2A.V1`, exported from
|
|
263
|
+
`@lumenflow/control-plane-sdk/a2a`. Local files under `.lumenflow/memory/`, the
|
|
264
|
+
Claude `PostToolUse` hook, and `mem:watch` are adapters over that contract, not
|
|
265
|
+
separate schemas. `workspace_id` is optional for local worktrees and required
|
|
266
|
+
for hosted transports such as lumenflow.cloud, where it is the tenant/workspace
|
|
267
|
+
routing key.
|
|
268
|
+
|
|
261
269
|
`display_name` is an ephemeral live-session handle, not a stable role alias. It
|
|
262
270
|
is assigned from `.lumenflow/agents/display-name-pool.yaml` when a session
|
|
263
271
|
starts and released when the session ends. `mem:signal --to` / `mem:inbox --for`
|
|
264
|
-
|
|
265
|
-
|
|
272
|
+
accept a `session_id`, current `display_name`, or explicit `agent_identity`.
|
|
273
|
+
`mem:signal --to` also accepts comma-separated recipients. Directed signals are
|
|
274
|
+
persisted as canonical A2A `recipients[]`; `target_agent` remains only as the
|
|
275
|
+
single-recipient legacy alias.
|
|
276
|
+
|
|
277
|
+
`agent_identity` is an explicit stable reader identity for A2A receipt
|
|
278
|
+
coalescing across restarts or concurrent sessions. Set it with
|
|
279
|
+
`pnpm agent:session --agent-identity <owner>:<role>:<purpose>` or
|
|
280
|
+
`LUMENFLOW_AGENT_IDENTITY`; LumenFlow never derives it from PID, hostname, or
|
|
281
|
+
runtime metadata. When it is absent, receipt state falls back to the ephemeral
|
|
282
|
+
`session_id`.
|
|
283
|
+
|
|
284
|
+
A2A signal semantics are structured, not prose-only. `mem:signal` supports
|
|
285
|
+
`--thread`, `--reply-to`, `--intent INFO|PROPOSE|COUNTER|AGREE|REJECT`,
|
|
286
|
+
`--interrupt-class advisory|priority|urgent|soon|immediate` (canonical name;
|
|
287
|
+
`--interrupt` remains as a back-compat alias — WU-2940), and `--requires-ack`.
|
|
288
|
+
Directed root signals default to `interrupt_class: priority` and get a generated
|
|
289
|
+
`thread_id`; broadcasts default to `interrupt_class: advisory`. Replies inherit
|
|
290
|
+
the parent thread unless `--thread` is explicit. When a recipient posts
|
|
291
|
+
`--intent AGREE` or `--intent REJECT` on that thread, the root signal receipt is
|
|
292
|
+
promoted to `acked` or `rejected`, and `mem:converged --thread <id>` reports
|
|
293
|
+
whether every root recipient has agreed. Local JSONL remains only the dev
|
|
294
|
+
adapter over `A2ASignalV1` / `A2AReceiptV1`; lumenflow.cloud should use the same
|
|
295
|
+
contract over its hosted transport.
|
|
296
|
+
|
|
297
|
+
Claude Code projects with generated LumenFlow hooks receive addressed
|
|
298
|
+
`signal:received` events at the next `PostToolUse` boundary. The hook surfaces
|
|
299
|
+
`intent`, `interrupt_class`, `requires_ack`, and same-thread ACK/REJECT commands
|
|
300
|
+
without replacing the `wu:prep` unread-directed-signal gate. Other local clients
|
|
301
|
+
can run `pnpm mem:watch --session <session_id|display_name|agent_identity>` in
|
|
302
|
+
a side terminal for foreground `signal:received` delivery through the same event
|
|
303
|
+
queue and receipt model.
|
|
304
|
+
|
|
305
|
+
Before `wu:prep`, any unread directed signal addressed to the current reader on
|
|
306
|
+
the WU or its initiative is a decision point. Read, ACK, or dismiss it before
|
|
307
|
+
continuing. `pnpm wu:prep --allow-unread-signals --reason '<audit reason>'`
|
|
308
|
+
exists for explicit audited overrides only.
|
|
266
309
|
|
|
267
310
|
### During the WU (capture, don't hoard)
|
|
268
311
|
|
|
@@ -501,28 +544,75 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
501
544
|
|
|
502
545
|
### WU Lifecycle
|
|
503
546
|
|
|
504
|
-
| Command | Description
|
|
505
|
-
| ----------------------- |
|
|
506
|
-
| `pnpm wu:create` | Create new WU spec (ID auto-generated)
|
|
507
|
-
| `pnpm wu:claim` | Claim WU, update canonical state, create worktree (or `--cloud`)
|
|
508
|
-
| `pnpm wu:sandbox` | Run command through hardened WU sandbox backend
|
|
509
|
-
| `pnpm wu:prep` | Run gates in worktree, prep for wu:done
|
|
510
|
-
| `pnpm wu:done` | Complete WU (merge, stamp, cleanup)
|
|
511
|
-
| `pnpm wu:edit` | Edit WU spec fields
|
|
512
|
-
| `pnpm wu:block` | Block WU (transitions to blocked, frees lane)
|
|
513
|
-
| `pnpm wu:unblock` | Unblock WU (transitions to in_progress)
|
|
514
|
-
| `pnpm wu:release` | Release orphaned WU (in_progress to ready
|
|
515
|
-
| `pnpm wu:status` | Show WU status, location, and valid commands
|
|
516
|
-
| `pnpm wu:brief` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence
|
|
517
|
-
| `pnpm wu:delegate` | Generate prompt + record lineage + brief hash attestation
|
|
518
|
-
| `pnpm wu:validate` | Validate WU spec completeness and schema
|
|
519
|
-
| `pnpm wu:recover` | Analyze and fix WU state inconsistencies
|
|
520
|
-
| `pnpm wu:verify` | Verify WU completion (stamp, commit, clean tree)
|
|
521
|
-
| `pnpm wu:escalate` | Show or resolve WU escalation status
|
|
522
|
-
| `pnpm wu:delete` | Delete WU spec and cleanup
|
|
523
|
-
| `pnpm approval:request` | Request control-plane approval for a workflow action
|
|
524
|
-
| `pnpm approval:review` | Resolve a control-plane approval decision
|
|
525
|
-
| `pnpm approval:list` | List control-plane approvals with optional filters
|
|
547
|
+
| Command | Description |
|
|
548
|
+
| ----------------------- | ------------------------------------------------------------------------------- |
|
|
549
|
+
| `pnpm wu:create` | Create new WU spec (ID auto-generated) |
|
|
550
|
+
| `pnpm wu:claim` | Claim WU, update canonical state, create worktree (or `--cloud`) |
|
|
551
|
+
| `pnpm wu:sandbox` | Run command through hardened WU sandbox backend |
|
|
552
|
+
| `pnpm wu:prep` | Run gates in worktree, prep for wu:done |
|
|
553
|
+
| `pnpm wu:done` | Complete WU (merge, stamp, cleanup) |
|
|
554
|
+
| `pnpm wu:edit` | Edit WU spec fields (sizing flags + non-destructive in-progress edits, WU-2940) |
|
|
555
|
+
| `pnpm wu:block` | Block WU (transitions to blocked, frees lane) |
|
|
556
|
+
| `pnpm wu:unblock` | Unblock WU (transitions to in_progress) |
|
|
557
|
+
| `pnpm wu:release` | Release orphaned WU (in_progress to ready) AND reset lane branch (WU-2941) |
|
|
558
|
+
| `pnpm wu:status` | Show WU status, location, and valid commands |
|
|
559
|
+
| `pnpm wu:brief` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence |
|
|
560
|
+
| `pnpm wu:delegate` | Generate prompt + record lineage + brief hash attestation |
|
|
561
|
+
| `pnpm wu:validate` | Validate WU spec completeness and schema |
|
|
562
|
+
| `pnpm wu:recover` | Analyze and fix WU state inconsistencies |
|
|
563
|
+
| `pnpm wu:verify` | Verify WU completion (stamp, commit, clean tree) |
|
|
564
|
+
| `pnpm wu:escalate` | Show or resolve WU escalation status |
|
|
565
|
+
| `pnpm wu:delete` | Delete WU spec and cleanup |
|
|
566
|
+
| `pnpm approval:request` | Request control-plane approval for a workflow action |
|
|
567
|
+
| `pnpm approval:review` | Resolve a control-plane approval decision |
|
|
568
|
+
| `pnpm approval:list` | List control-plane approvals with optional filters |
|
|
569
|
+
|
|
570
|
+
#### wu:edit ergonomics (WU-2940)
|
|
571
|
+
|
|
572
|
+
`pnpm wu:edit` accepts the full sizing-estimate surface — `--estimated-files`,
|
|
573
|
+
`--estimated-tool-calls`, `--sizing-strategy`, `--sizing-exception-type`,
|
|
574
|
+
`--sizing-exception-reason` — for mid-flight scope correction without a
|
|
575
|
+
wu:delete + wu:create dance. Each flag is independently editable; partial edits
|
|
576
|
+
merge into the existing `sizing_estimate` sub-object.
|
|
577
|
+
|
|
578
|
+
In-progress WUs accept non-destructive edits (`--description`, `--notes`, and
|
|
579
|
+
the five sizing flags above) **from the main checkout** via the micro-worktree
|
|
580
|
+
path. Other edits — `--lane`, `--code-paths` replace, `--priority`, `--type`,
|
|
581
|
+
`--initiative` — still require the existing `wu:release`/`wu:recover` dance
|
|
582
|
+
because they restructure scope.
|
|
583
|
+
|
|
584
|
+
#### wu:release branch reset (WU-2941)
|
|
585
|
+
|
|
586
|
+
`pnpm wu:release` now resets the **lane branch** alongside the WU YAML so
|
|
587
|
+
subsequent `pnpm wu:status` reports no main↔worktree drift. Default behaviour
|
|
588
|
+
is to delete the lane branch locally and on `origin`. Override with:
|
|
589
|
+
|
|
590
|
+
- `--keep-branch` flag — retain the branch for diagnostic recovery.
|
|
591
|
+
- `software_delivery.wu_release.branch_action` in `workspace.yaml` —
|
|
592
|
+
`'delete'` (default), `'rebase'` (hard-reset local ref to
|
|
593
|
+
`baseline_main_sha`, no remote push), or `'keep'` (no-op for
|
|
594
|
+
air-gapped/offline repos).
|
|
595
|
+
|
|
596
|
+
Cloud `claimed_mode: branch-pr` releases are unaffected; the claimed branch
|
|
597
|
+
is owned by the cloud lifecycle and never touched by `wu:release`.
|
|
598
|
+
|
|
599
|
+
`pnpm wu:status` surfaces residual main↔worktree drift inline as a
|
|
600
|
+
structured remediation hint (matching the `wu:done` preflight error format):
|
|
601
|
+
`WU-X: main shows ready, branch shows in_progress. Run pnpm wu:recover --id
|
|
602
|
+
WU-X --action reset to reconcile.`
|
|
603
|
+
|
|
604
|
+
#### Pre-WU memory artifacts (WU-2940)
|
|
605
|
+
|
|
606
|
+
`pnpm mem:create` accepts pre-WU artifacts: omit `--wu` to capture findings
|
|
607
|
+
produced before any WU exists (Pre-Phase Audits per the wu-sizing-guide §1.5).
|
|
608
|
+
The persisted record stores `wu_id` null/absent and remains discoverable via
|
|
609
|
+
tag-only `mem:context --tags <csv>` queries.
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
# Capture an orchestrator finding before claiming the next WU
|
|
613
|
+
pnpm mem:create --type discovery --tags pre-phase-audit \
|
|
614
|
+
--title 'INIT-XXX wave 1 needs review-audit exception in WU-YYY'
|
|
615
|
+
```
|
|
526
616
|
|
|
527
617
|
### WU Maintenance
|
|
528
618
|
|
|
@@ -552,6 +642,194 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
552
642
|
| `pnpm typecheck` | Run TypeScript type checking |
|
|
553
643
|
| `pnpm test` | Run all tests (Vitest) |
|
|
554
644
|
|
|
645
|
+
#### Per-gate skip (WU-2925)
|
|
646
|
+
|
|
647
|
+
`pnpm wu:prep` and `pnpm wu:done` accept `--skip-gate <name>` (repeatable) to
|
|
648
|
+
suppress a single named gate. The legacy `--skip-gates` (binary) is deprecated
|
|
649
|
+
for one minor cycle and emits a deprecation warning pointing to the public
|
|
650
|
+
[Gates Reference](https://lumenflow.dev/reference/gates#per-gate-skip); use
|
|
651
|
+
`--skip-gate` per gate.
|
|
652
|
+
|
|
653
|
+
```bash
|
|
654
|
+
# Skip a single environmental gate (allow-list)
|
|
655
|
+
pnpm wu:done --id WU-XXX --skip-gate lane-health \
|
|
656
|
+
--reason "pre-existing 50-file coverage gap" --fix-wu WU-YYY
|
|
657
|
+
|
|
658
|
+
# Repeat the flag to skip multiple gates
|
|
659
|
+
pnpm wu:prep --id WU-XXX \
|
|
660
|
+
--skip-gate lane-health --skip-gate migration-verify \
|
|
661
|
+
--reason "no DB infra in agent worktree" --fix-wu WU-YYY
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
**Allow-list (skippable: true by default):** `migration-verify`,
|
|
665
|
+
`lane-health`, `tdd-diff-evidence`, the WU-2927 opt-in local-prep gates
|
|
666
|
+
`build`, `integration-test`, `e2e-smoke`, the WU-2943 advisory heuristic
|
|
667
|
+
gates `test-over-deletion`, `monolithic-file-contention`, and the WU-2944
|
|
668
|
+
opt-in `prod-migration-drift` gate (CI-scheduled; auto-skips not-applicable
|
|
669
|
+
when `PROD_DATABASE_URL` is not configured). All other framework gates
|
|
670
|
+
default to `skippable: false` and require a per-repo override at
|
|
671
|
+
`software_delivery.gates.overrides.<gate_id>.skippable=true` to be skipped:
|
|
672
|
+
|
|
673
|
+
```bash
|
|
674
|
+
pnpm config:set software_delivery.gates.overrides.db-dod-gate.skippable=true
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Audit format gains a discriminated `source` field
|
|
678
|
+
(`agent` | `auto-skip-not-applicable` | `auto-skip-missing-prereq` | `blocked`)
|
|
679
|
+
and a `lifecycle` field (`prep` | `done`) so the trail spans both lifecycle
|
|
680
|
+
commands. Legacy entries without `source` are read as `agent` for DORA/CFR
|
|
681
|
+
back-compat. CFR (Change Failure Rate) only counts `source: 'agent'` rows;
|
|
682
|
+
auto-skips and blocks are excluded.
|
|
683
|
+
|
|
684
|
+
MCP exposes both `skip_gate` (array, preferred) and `skip_gates` (boolean,
|
|
685
|
+
deprecated) for one minor cycle, symmetric with the CLI.
|
|
686
|
+
|
|
687
|
+
#### Discriminated GateResult states (WU-2926)
|
|
688
|
+
|
|
689
|
+
Each gate run produces one of six `GateResult` discriminated states. Stable
|
|
690
|
+
glyphs/labels (also surfaced verbatim in the public
|
|
691
|
+
[Gates Reference](https://lumenflow.dev/reference/gates#discriminated-gateresult-states)):
|
|
692
|
+
|
|
693
|
+
| State | Glyph | Meaning |
|
|
694
|
+
| ----------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
695
|
+
| `passed` | ✅ PASSED | Gate ran successfully. |
|
|
696
|
+
| `failed` | ❌ FAILED | Gate ran and failed (or `applicable + missing + skippable + 'fail'`). |
|
|
697
|
+
| `skipped-by-agent` | ⏭ SKIPPED-BY-AGENT | Explicit `--skip-gate <name>` (audit `source: 'agent'`). |
|
|
698
|
+
| `skipped-auto-not-applicable` | ⊘ AUTO-SKIPPED | `checkApplicability` returned not-applicable (audit `source: 'auto-skip-not-applicable'`). |
|
|
699
|
+
| `skipped-auto-missing-prereq` | ⊘ AUTO-SKIPPED | Applicable + missing prereq + skippable + `'auto-skip'` (audit `source: 'auto-skip-missing-prereq'`). |
|
|
700
|
+
| `blocked-missing-prereq` | 🚫 BLOCKED | Applicable + missing prereq + `skippable: false` (audit `source: 'blocked'`, exits non-zero). |
|
|
701
|
+
|
|
702
|
+
Decision matrix:
|
|
703
|
+
|
|
704
|
+
| Applicability | Preconditions | Skippable | `prereq_strategy` | Result |
|
|
705
|
+
| -------------- | ------------- | --------- | ----------------- | -------------------------------- |
|
|
706
|
+
| not-applicable | — | — | — | `skipped-auto-not-applicable` |
|
|
707
|
+
| applicable | satisfied | — | — | run → `passed` or `failed` |
|
|
708
|
+
| applicable | missing | false | — | `blocked-missing-prereq` (BLOCK) |
|
|
709
|
+
| applicable | missing | true | `'auto-skip'` | `skipped-auto-missing-prereq` |
|
|
710
|
+
| applicable | missing | true | `'fail'` | `failed` |
|
|
711
|
+
|
|
712
|
+
Each `GateDefinition` may implement `checkApplicability` and
|
|
713
|
+
`checkPreconditions`. Defaults return `'applicable'` and `'satisfied'` so
|
|
714
|
+
existing simple gates inherit always-runs semantics with no per-gate code
|
|
715
|
+
change. `safety-critical-test` ships with `skippable_default: false` and a
|
|
716
|
+
default applicability of `'applicable'` for every change set — preserving
|
|
717
|
+
today's runs-on-every-WU behaviour. Per-repo override:
|
|
718
|
+
|
|
719
|
+
```bash
|
|
720
|
+
# Narrow safety-critical-test applicability without flipping the default
|
|
721
|
+
pnpm config:set software_delivery.gates.overrides.safety-critical-test.applicability_paths \
|
|
722
|
+
--json-value '["app/security/**","lib/auth/**"]'
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
Auto-skip + blocked states write audit NDJSON with the discriminated `source`
|
|
726
|
+
field; CFR only counts `source: 'agent'` rows so auto-skips and blocks never
|
|
727
|
+
inflate change-failure-rate.
|
|
728
|
+
|
|
729
|
+
#### Extended local-prep profile (WU-2927)
|
|
730
|
+
|
|
731
|
+
`software_delivery.gates.local_prep` is an opt-in profile that extends
|
|
732
|
+
`wu:prep` with the build / integration-test / e2e-smoke gates that previously
|
|
733
|
+
only ran in CI. Driven by lumenflow.cloud's three P0 hotfixes in 24h
|
|
734
|
+
(WU-1497..WU-1499) — each slipped past local gates because `wu:prep` did not
|
|
735
|
+
run `pnpm build`, `pnpm test:integration`, or `pnpm test:e2e --smoke`.
|
|
736
|
+
|
|
737
|
+
```yaml
|
|
738
|
+
software_delivery:
|
|
739
|
+
gates:
|
|
740
|
+
local_prep:
|
|
741
|
+
build:
|
|
742
|
+
enabled: false # opt-in: pnpm build on every wu:prep
|
|
743
|
+
integration_test:
|
|
744
|
+
enabled: false # opt-in: pnpm test:integration on every wu:prep
|
|
745
|
+
e2e_smoke:
|
|
746
|
+
enabled: false # opt-in: pnpm test:e2e --tag <tag>
|
|
747
|
+
tag: smoke
|
|
748
|
+
latency_budget_warn_ms: 180000 # 3 min soft warn, never blocks
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
| Field | Default | Effect |
|
|
752
|
+
| --------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
753
|
+
| `build.enabled` | `false` | When `true`, registers a build gate that runs `pnpm build`. `prereq_strategy: 'fail'` — missing `build` script in `package.json` is a misconfig (`failed`), not an environmental gap. |
|
|
754
|
+
| `integration_test.enabled` | `false` | When `true`, makes the (now unconditionally registered) `integration-test` gate applicable. Runs `RUN_INTEGRATION_TESTS=1 pnpm vitest run '**/*.integration.*' '**/golden-*.test.*'`. Missing script → `failed`. |
|
|
755
|
+
| `e2e_smoke.enabled` + `tag` | `false` / `smoke` | When `true` AND `playwright.config.{ts,js,mjs}` exists at repo root, registers an `e2e-smoke` gate that runs `pnpm test:e2e --tag <tag>`. Repos without Playwright are auto `not-applicable` (clean opt-out — no explicit disable required). |
|
|
756
|
+
| `latency_budget_warn_ms` | `180000` | `wu:prep` prints total elapsed seconds; if it exceeds the budget, emits a non-failing warning. Soft signal only. |
|
|
757
|
+
|
|
758
|
+
All three gates are added to the `--skip-gate` allow-list (`skippable: true`),
|
|
759
|
+
extending WU-2925's initial `{migration-verify, lane-health, tdd-diff-evidence}`
|
|
760
|
+
set. Rationale: local-prep gates are opt-in environmental gates; agents need
|
|
761
|
+
`--skip-gate <name>` for legitimate hotfix scenarios where the gate is broken
|
|
762
|
+
or irrelevant for that WU. Skips are captured in audit per WU-2925 semantics
|
|
763
|
+
with `source: 'agent'`.
|
|
764
|
+
|
|
765
|
+
Backward-compat: omitting `local_prep` (the default) preserves today's
|
|
766
|
+
behaviour — none of the new gates is applicable, no new commands run.
|
|
767
|
+
|
|
768
|
+
#### Heuristic guard gates (WU-2943)
|
|
769
|
+
|
|
770
|
+
Two advisory gates ride the INIT-068 contract on every `wu:prep`. Both are
|
|
771
|
+
`skippable_default: true` and `prereq_strategy: 'auto-skip'`, surface their
|
|
772
|
+
findings via the `failed` `GateResult` state, and emit the standard six-state
|
|
773
|
+
legend (`✅ / ❌ / ⏭ / ⊘ / 🚫`). Each gate is per-repo configurable via
|
|
774
|
+
`software_delivery.gates.overrides.<gate_id>`.
|
|
775
|
+
|
|
776
|
+
| Gate | Driver | When applicable | When it fails |
|
|
777
|
+
| ---------------------------- | ---------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
778
|
+
| `test-over-deletion` | INIT-105 item 12 | wu:prep diff includes deleted `.test.ts` / `.test.tsx` | Any deleted test's `describe()` / `describe.each()` symbol is not present in the current WU's `code_paths`. Output lists each unrecognised symbol. |
|
|
779
|
+
| `monolithic-file-contention` | INIT-105 item 13 | Always (every `wu:prep`) | A file appears in 2+ active WUs' `code_paths` (statuses: `in_progress`, `ready`) and the current WU is one of the claimants. Output lists the file + claimant WUs + a re-laning hint. |
|
|
780
|
+
|
|
781
|
+
Both gates are advisory (`skippable_default: true`); intentional triggers can
|
|
782
|
+
be skipped with `--skip-gate test-over-deletion` / `--skip-gate
|
|
783
|
+
monolithic-file-contention` (with `--reason` and `--fix-wu` per WU-2925).
|
|
784
|
+
Repos that want either gate to BLOCK can flip the default:
|
|
785
|
+
|
|
786
|
+
```bash
|
|
787
|
+
pnpm config:set software_delivery.gates.overrides.test-over-deletion.skippable=false
|
|
788
|
+
pnpm config:set software_delivery.gates.overrides.monolithic-file-contention.skippable=false
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
Backward-compat: when the heuristic does not fire, both gates auto-skip
|
|
792
|
+
cleanly; existing `wu:prep` flows are unaffected.
|
|
793
|
+
|
|
794
|
+
#### prod-migration-drift gate (WU-2944)
|
|
795
|
+
|
|
796
|
+
Optional CI-scheduled gate (INIT-105 item 14). Compares the canonical
|
|
797
|
+
`migrations/` directory on main against the production database's applied
|
|
798
|
+
migrations and fails when drift exceeds a configurable threshold (default 5).
|
|
799
|
+
Driver: cloud INIT-105 — prod silently accumulated 7+ migrations of drift
|
|
800
|
+
before any human noticed; no automated detection caught it.
|
|
801
|
+
|
|
802
|
+
| Property | Value |
|
|
803
|
+
| --------------------- | ------------------------------------------------------------------------------------------------ |
|
|
804
|
+
| Gate name | `prod-migration-drift` |
|
|
805
|
+
| Allow-list status | `skippable: true` (advisory) |
|
|
806
|
+
| `prereq_strategy` | `auto-skip` |
|
|
807
|
+
| Default applicability | `not-applicable` until repo opts in via override (clean opt-out — most repos won't enable day 1) |
|
|
808
|
+
| Default threshold | `5` (drift > threshold ⇒ `failed`) |
|
|
809
|
+
|
|
810
|
+
Per-repo opt-in (set both keys; without `connection_string_env_var` the gate
|
|
811
|
+
auto-skips not-applicable):
|
|
812
|
+
|
|
813
|
+
```bash
|
|
814
|
+
pnpm config:set software_delivery.gates.overrides.prod-migration-drift.connection_string_env_var=PROD_DATABASE_URL
|
|
815
|
+
pnpm config:set software_delivery.gates.overrides.prod-migration-drift.threshold=5
|
|
816
|
+
# Optional: tighten to BLOCK on drift instead of advisory --skip-gate
|
|
817
|
+
pnpm config:set software_delivery.gates.overrides.prod-migration-drift.skippable=false
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
Local `wu:prep` impact: zero by default. The gate is registered in the
|
|
821
|
+
default registry alongside the WU-2943 heuristic gates, but
|
|
822
|
+
`checkApplicability` returns `not-applicable` for repos that have not set
|
|
823
|
+
`connection_string_env_var`, so it auto-skips cleanly. CI integration is
|
|
824
|
+
scheduled (e.g. daily) — never on every PR — because it requires prod
|
|
825
|
+
credentials and a reachable DB.
|
|
826
|
+
|
|
827
|
+
`@lumenflow/cli` ships without a Postgres driver dependency to keep the CLI
|
|
828
|
+
slim. The gate accepts a probe injection seam (`ctx.__prodDriftProbe`) used
|
|
829
|
+
by the scheduled CI workflow to query the prod DB's applied-migrations list;
|
|
830
|
+
when no probe is supplied (e.g. local `wu:prep`), the gate cleanly auto-skips
|
|
831
|
+
under `prereq_strategy: 'auto-skip'`.
|
|
832
|
+
|
|
555
833
|
### Lane Management
|
|
556
834
|
|
|
557
835
|
| Command | Description |
|
|
@@ -578,7 +856,9 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
578
856
|
| `pnpm mem:cleanup` | Clean up stale memory data |
|
|
579
857
|
| `pnpm mem:context` | Get context for current lane/WU |
|
|
580
858
|
| `pnpm mem:create` | Create memory node (bug discovery) |
|
|
859
|
+
| `pnpm mem:converged` | Check A2A thread agreement |
|
|
581
860
|
| `pnpm mem:inbox` | Check coordination signals |
|
|
861
|
+
| `pnpm mem:watch` | Deliver A2A signal events without hooks |
|
|
582
862
|
| `pnpm mem:roster` | List active sessions and display names |
|
|
583
863
|
| `pnpm mem:summarize` | Summarize memory context |
|
|
584
864
|
| `pnpm mem:triage` | Triage discovered bugs |
|
|
@@ -624,28 +904,63 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
624
904
|
| `pnpm agent:log-issue` | Log issue during agent session |
|
|
625
905
|
| `pnpm agent:issues-query` | Query GitHub issues for agent work |
|
|
626
906
|
|
|
627
|
-
**ADR-010 control-plane rule:** planning, handoff, execution, reconciliation, finish, and status are separate concerns. Prompt emission is not launch. Worker return is not WU completion. Reconcile live initiative truth against WU status, worktree / branch state, `wu:prep` / `wu:done` or `wu:cleanup`, stamps, and integrity evidence. `mem:inbox` remains the signal channel, not the whole execution ledger.
|
|
907
|
+
**ADR-010 control-plane rule:** planning, handoff, execution, reconciliation, finish, and status are separate concerns. Prompt emission is not launch. Worker return is not WU completion. Reconcile live initiative truth against WU status, worktree / branch state, `pnpm wu:prep` / `pnpm wu:done` or `pnpm wu:cleanup`, stamps, and integrity evidence. `mem:inbox` remains the signal channel, not the whole execution ledger.
|
|
908
|
+
|
|
909
|
+
#### Plan-time preflight (WU-2942)
|
|
910
|
+
|
|
911
|
+
`pnpm orchestrate:initiative` emits two preflight sections before agent dispatch so plan-time intelligence catches starvation that used to surface at claim time:
|
|
912
|
+
|
|
913
|
+
- **File-overlap preflight** — flags WU pairs (or N-tuples) inside a parallel-claimable wave that share a `code_paths` entry. `wu:claim` rejects overlap by default, so a wave with shared paths is silently serial. Resolution: serialize the WUs, split file ownership, or `--force-overlap` knowingly.
|
|
914
|
+
- **Lane-fit suggestions** — when N≥2 WUs in a wave share a lane whose `lock_policy` holds the lane lock (`all` or `active`), only one runs at a time. The advisor calls the same logic as `pnpm wu:infer-lane` and recommends a re-lane via `pnpm wu:edit --id <WU> --lane '<inferred>'` for the contended WUs.
|
|
915
|
+
|
|
916
|
+
Modes (set via `software_delivery.orchestrate.preflight` in `workspace.yaml`, default `advisory`):
|
|
917
|
+
|
|
918
|
+
- `advisory` — emit warnings and proceed.
|
|
919
|
+
- `strict` — emit warnings and exit non-zero (also enabled per-run with `--strict-preflight`).
|
|
920
|
+
- `off` — skip preflight scans entirely.
|
|
628
921
|
|
|
629
922
|
### Setup & Configuration
|
|
630
923
|
|
|
631
|
-
| Command | Description
|
|
632
|
-
| ------------------------------- |
|
|
633
|
-
| `pnpm setup` | Install deps and build CLI (first time)
|
|
634
|
-
| `pnpm lumenflow` | Initialize LumenFlow in a project
|
|
635
|
-
| `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration
|
|
636
|
-
| `pnpm lumenflow:commands` | List all available CLI commands
|
|
637
|
-
| `pnpm lumenflow:release` | Run release workflow
|
|
638
|
-
| `pnpm
|
|
639
|
-
| `pnpm lumenflow:sync
|
|
640
|
-
| `pnpm lumenflow:
|
|
641
|
-
| `pnpm lumenflow:
|
|
642
|
-
| `pnpm lumenflow:
|
|
643
|
-
| `pnpm lumenflow:
|
|
644
|
-
| `pnpm lumenflow:
|
|
645
|
-
| `pnpm
|
|
646
|
-
| `pnpm config:
|
|
647
|
-
| `pnpm
|
|
648
|
-
| `pnpm
|
|
924
|
+
| Command | Description |
|
|
925
|
+
| ------------------------------- | ------------------------------------------------------- |
|
|
926
|
+
| `pnpm setup` | Install deps and build CLI (first time) |
|
|
927
|
+
| `pnpm lumenflow` | Initialize LumenFlow in a project |
|
|
928
|
+
| `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration |
|
|
929
|
+
| `pnpm lumenflow:commands` | List all available CLI commands |
|
|
930
|
+
| `pnpm lumenflow:release` | Run release workflow |
|
|
931
|
+
| `pnpm distribution:preflight` | Audit consumer repos for npm-access flip readiness |
|
|
932
|
+
| `pnpm lumenflow:docs-sync` | Refresh core docs, onboarding docs, and vendor assets |
|
|
933
|
+
| `pnpm lumenflow:sync-templates` | Sync templates to project |
|
|
934
|
+
| `pnpm lumenflow:upgrade` | Upgrade LumenFlow packages |
|
|
935
|
+
| `pnpm lumenflow:integrate` | Generate enforcement hooks for client |
|
|
936
|
+
| `pnpm lumenflow:disable` | Reversibly turn enforcement off (hooks become no-ops) |
|
|
937
|
+
| `pnpm lumenflow:enable` | Re-enable enforcement after `lumenflow:disable` |
|
|
938
|
+
| `pnpm lumenflow:uninstall` | Remove LumenFlow files (dry-run by default) |
|
|
939
|
+
| `pnpm config:set` | Safely update workspace.yaml via micro-worktree |
|
|
940
|
+
| `pnpm config:get` | Read a value from workspace.yaml |
|
|
941
|
+
| `pnpm cloud:connect` | Connect workspace.yaml to cloud control plane |
|
|
942
|
+
| `pnpm backlog:prune` | Clean stale backlog entries |
|
|
943
|
+
| `pnpm db:journal-recover` | Recover drizzle journal collisions (dry-run default) |
|
|
944
|
+
| `pnpm lumenflow:setup-prereqs` | Surface external prereqs (e.g. Supabase CLI) post-setup |
|
|
945
|
+
|
|
946
|
+
#### db:journal-recover (WU-2945)
|
|
947
|
+
|
|
948
|
+
When two drizzle snapshots share the same `prevId` (chain fork) or journal entries share an `idx`,
|
|
949
|
+
`pnpm db:journal-recover` detects the collision and offers a safe-resequence path. Default mode is
|
|
950
|
+
dry-run; pass `--confirm` to apply. Every actual rewrite emits an audit log under
|
|
951
|
+
`.lumenflow/db-recovery/<timestamp>.log`. Idempotent — re-running on a healthy chain is a no-op.
|
|
952
|
+
|
|
953
|
+
```bash
|
|
954
|
+
pnpm db:journal-recover # show plan
|
|
955
|
+
pnpm db:journal-recover --drizzle-dir packages/db/drizzle
|
|
956
|
+
pnpm db:journal-recover --confirm # apply, write audit log
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
#### Supabase CLI prerequisite (WU-2945)
|
|
960
|
+
|
|
961
|
+
`pnpm setup` now runs `lumenflow:setup-prereqs` at the end. When the project uses Supabase
|
|
962
|
+
(via `supabase/config.toml` or `@supabase/*` deps), it surfaces a reminder that the Supabase CLI
|
|
963
|
+
is required for `pnpm db:reset` and similar workflows. Non-blocking informational only.
|
|
649
964
|
|
|
650
965
|
### Metrics & Flow
|
|
651
966
|
|
|
@@ -678,19 +993,6 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
678
993
|
| `pnpm pack:install` | Install a domain pack into workspace |
|
|
679
994
|
| `pnpm pack:search` | Search for domain packs in a registry |
|
|
680
995
|
|
|
681
|
-
### Audited Wrappers
|
|
682
|
-
|
|
683
|
-
| Command | Description |
|
|
684
|
-
| ------------------ | -------------------------------- |
|
|
685
|
-
| `pnpm file:read` | Read file with audit trail |
|
|
686
|
-
| `pnpm file:write` | Write file with audit trail |
|
|
687
|
-
| `pnpm file:edit` | Edit file with audit trail |
|
|
688
|
-
| `pnpm file:delete` | Delete file with audit trail |
|
|
689
|
-
| `pnpm git:status` | Show git status with audit trail |
|
|
690
|
-
| `pnpm git:diff` | Show git diff with audit trail |
|
|
691
|
-
| `pnpm git:log` | Show git log with audit trail |
|
|
692
|
-
| `pnpm git:branch` | Show git branch with audit trail |
|
|
693
|
-
|
|
694
996
|
Commands include **context-aware validation** that checks location, WU status, and git state. When validation fails, commands provide copy-paste ready fix commands.
|
|
695
997
|
|
|
696
998
|
---
|
|
@@ -728,12 +1030,13 @@ If you're an AI agent, read the onboarding docs:
|
|
|
728
1030
|
Skills are reusable workflow/knowledge bundles that agents load on demand. The `SKILL.md` format pioneered by Claude Code has converged into a de-facto standard adopted by OpenAI Codex (Dec 2025), Cursor (v2.4), and Windsurf Cascade (Jan 2026). LumenFlow stores vendor-neutral skill sources in `.lumenflow/skills/` and projects them to each vendor surface via `pnpm lumenflow:integrate --client <x>`.
|
|
729
1031
|
|
|
730
1032
|
Agent plugins are a distribution on-ramp, not a replacement for these repo-level
|
|
731
|
-
projections or for the Software Delivery Pack runtime.
|
|
732
|
-
|
|
733
|
-
skills
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
1033
|
+
projections or for the Software Delivery Pack runtime. Per
|
|
1034
|
+
[ADR-018](docs/09-architecture-decisions/ADR-018-agent-plugin-distribution-boundary.md),
|
|
1035
|
+
standalone projected skills keep local names such as `design-first`, while
|
|
1036
|
+
plugin-installed Claude skills use plugin-qualified names such as
|
|
1037
|
+
`/lumenflow:design-first`. If both surfaces exist, prompts and handoff text must
|
|
1038
|
+
say which one they mean. Installing a plugin gives the agent methodology and
|
|
1039
|
+
entrypoint guidance; repo-level enforcement still requires `npx lumenflow init`,
|
|
737
1040
|
`pnpm lumenflow:integrate`, or `pnpm lumenflow:integrate --sync`.
|
|
738
1041
|
|
|
739
1042
|
### Core skills (vendor-neutral)
|
|
@@ -765,9 +1068,10 @@ For plugin-distributed skills, prefer the vendor's plugin-qualified invocation
|
|
|
765
1068
|
surface instead of rewriting all canonical skill names. Claude Code plugin
|
|
766
1069
|
skills are namespaced as `/lumenflow:<skill>`. Codex plugin use should name the
|
|
767
1070
|
installed `lumenflow` plugin or one of its bundled skills through Codex's `@`
|
|
768
|
-
plugin selection surface.
|
|
769
|
-
|
|
770
|
-
|
|
1071
|
+
plugin selection surface. **Plugin packaging is scoped under INIT-065 and not
|
|
1072
|
+
yet shipped as of 5.4.0** — these invocations apply once the packaging WUs land.
|
|
1073
|
+
Standalone projections remain valid until a future explicit cleanup command such
|
|
1074
|
+
as `--plugin-only` exists and is run intentionally.
|
|
771
1075
|
|
|
772
1076
|
For vendor-specific setup details and per-vendor quirks, see:
|
|
773
1077
|
|
|
@@ -811,6 +1115,12 @@ Durable artifacts carry `requested_role` (from the orchestrator) and `actual_rol
|
|
|
811
1115
|
|
|
812
1116
|
---
|
|
813
1117
|
|
|
1118
|
+
## Remote / MCP Dispatch
|
|
1119
|
+
|
|
1120
|
+
LumenFlow ships `pnpm file:*` and `pnpm git:*` CLIs (`file:read`, `file:write`, `file:edit`, `file:delete`, `git:status`, `git:diff`, `git:log`, `git:branch`). These commands exist for non-native-tool agents (MCP remote dispatch, server-side sandbox). Local agents with native Read/Edit/Write should use those directly — they're faster and already audited via the client transcript. The wrappers are not part of the canonical local-development CLI surface.
|
|
1121
|
+
|
|
1122
|
+
---
|
|
1123
|
+
|
|
814
1124
|
## References
|
|
815
1125
|
|
|
816
1126
|
- [LumenFlow Agent Capsule]({{DOCS_OPERATIONS_PATH}}/_frameworks/lumenflow/lumenflow-agent-capsule.md) -- Full framework reference (lifecycle, lanes, gates, DoD)
|
|
@@ -819,5 +1129,6 @@ Durable artifacts carry `requested_role` (from the orchestrator) and `actual_rol
|
|
|
819
1129
|
- [.lumenflow/constraints.md](.lumenflow/constraints.md) -- Non-negotiable rules and forbidden commands
|
|
820
1130
|
- [WU Sizing Guide]({{DOCS_OPERATIONS_PATH}}/_frameworks/lumenflow/wu-sizing-guide.md) -- Scoping work without needless fragmentation
|
|
821
1131
|
- [ADR-014: Typed Agent-Role Contract](docs/09-architecture-decisions/ADR-014-typed-agent-role-contract.md) — Canonical orchestration role vocabulary
|
|
1132
|
+
- [ADR-017: LumenFlow Configurability Principle](docs/09-architecture-decisions/ADR-017-lumenflow-configurability-principle.md) — Defaults are allowed; framework prescription must be configurable or consumer-authored
|
|
822
1133
|
- [Skills Index](.lumenflow/skills/INDEX.md)
|
|
823
1134
|
- [Agents README](.claude/agents/README.md)
|
|
@@ -146,10 +146,6 @@ These surfaces already assemble the objective, scope, code paths, tests, recover
|
|
|
146
146
|
constraints block, and evidence metadata. Do not prepend or append a second wrapper block around
|
|
147
147
|
them.
|
|
148
148
|
|
|
149
|
-
The role aliases referenced by these handoffs are vendor-neutral framework names (`general-purpose`,
|
|
150
|
-
`lumenflow-pm`, `initiative-architect`, and so on). Client-specific overlays may implement those
|
|
151
|
-
aliases differently, but the orchestration brief should keep the shared alias vocabulary intact.
|
|
152
|
-
|
|
153
149
|
If you are building a fully custom or experimental prompt outside those canonical surfaces, use
|
|
154
150
|
this structure:
|
|
155
151
|
|
|
@@ -218,7 +214,6 @@ Before spawning:
|
|
|
218
214
|
|
|
219
215
|
- Confirm WU status and lane availability
|
|
220
216
|
- Ensure worktree exists (or claim first)
|
|
221
|
-
- Use the shared framework alias vocabulary in the brief, not vendor-specific display names
|
|
222
217
|
- Provide explicit code_paths and tests
|
|
223
218
|
- Require `mem:checkpoint` at 50+ tool calls
|
|
224
219
|
- Require `mem:signal` for milestones
|