@lumenflow/cli 3.16.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/config-get.js +3 -3
- package/dist/config-get.js.map +1 -1
- package/dist/config-set.js +3 -3
- package/dist/config-set.js.map +1 -1
- package/dist/docs-sync.js +302 -57
- package/dist/docs-sync.js.map +1 -1
- package/dist/doctor.js +3 -3
- package/dist/doctor.js.map +1 -1
- package/dist/gate-defaults.js +3 -0
- package/dist/gate-defaults.js.map +1 -1
- package/dist/gates-plan-resolvers.js +3 -4
- package/dist/gates-plan-resolvers.js.map +1 -1
- package/dist/gates-runners.js +48 -0
- package/dist/gates-runners.js.map +1 -1
- package/dist/gates-utils.js +64 -3
- package/dist/gates-utils.js.map +1 -1
- package/dist/gates.js +2 -1
- package/dist/gates.js.map +1 -1
- package/dist/init-scaffolding.js +28 -1
- package/dist/init-scaffolding.js.map +1 -1
- package/dist/init-templates.js +6 -2
- package/dist/init-templates.js.map +1 -1
- package/dist/init.js +22 -25
- package/dist/init.js.map +1 -1
- package/dist/lane-create.js +2 -2
- package/dist/lane-create.js.map +1 -1
- package/dist/lane-edit.js +2 -2
- package/dist/lane-edit.js.map +1 -1
- package/dist/lane-lock.js +8 -6
- package/dist/lane-lock.js.map +1 -1
- package/dist/lane-setup.js +7 -5
- package/dist/lane-setup.js.map +1 -1
- package/dist/lane-status.js +7 -5
- package/dist/lane-status.js.map +1 -1
- package/dist/lane-validate.js +8 -6
- package/dist/lane-validate.js.map +1 -1
- package/dist/lumenflow-upgrade.js +22 -13
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/dist/onboard.js +15 -16
- package/dist/onboard.js.map +1 -1
- package/dist/orchestrate-initiative.js +29 -8
- package/dist/orchestrate-initiative.js.map +1 -1
- package/dist/state-doctor.js +3 -4
- package/dist/state-doctor.js.map +1 -1
- package/dist/wu-done-policies.js +38 -0
- package/dist/wu-done-policies.js.map +1 -1
- package/dist/wu-edit-operations.js +27 -24
- package/dist/wu-edit-operations.js.map +1 -1
- package/dist/wu-edit-validators.js +68 -0
- package/dist/wu-edit-validators.js.map +1 -1
- package/dist/wu-edit.js +11 -3
- package/dist/wu-edit.js.map +1 -1
- package/package.json +8 -8
- package/packs/sidekick/.turbo/turbo-build.log +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/.turbo/turbo-build.log +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/templates/core/AGENTS.md.template +2 -1
- package/templates/core/LUMENFLOW.md.template +5 -1
- package/templates/core/UPGRADING.md.template +14 -10
- package/templates/core/ai/onboarding/initiative-orchestration.md.template +1 -1
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +11 -10
- package/templates/core/ai/onboarding/starting-prompt.md.template +3 -3
- package/templates/vendors/claude/.claude/CLAUDE.md.template +2 -1
- package/templates/vendors/cursor/.cursor/rules/lumenflow.md.template +2 -1
- package/templates/vendors/windsurf/.windsurf/rules/lumenflow.md.template +2 -1
- package/dist/chunk-2D2VOCA4.js +0 -37
- package/dist/chunk-2D5KFYGX.js +0 -284
- package/dist/chunk-2GXVIN57.js +0 -14072
- package/dist/chunk-2MQ7HZWZ.js +0 -26
- package/dist/chunk-2UFQ3A3C.js +0 -643
- package/dist/chunk-3RG5ZIWI.js +0 -10
- package/dist/chunk-4N74J3UT.js +0 -15
- package/dist/chunk-5GTOXFYR.js +0 -392
- package/dist/chunk-5VY6MQMC.js +0 -240
- package/dist/chunk-67XVPMRY.js +0 -1297
- package/dist/chunk-6HO4GWJE.js +0 -164
- package/dist/chunk-6W5XHWYV.js +0 -1890
- package/dist/chunk-6X4EMYJQ.js +0 -64
- package/dist/chunk-6XYXI2NQ.js +0 -772
- package/dist/chunk-7ANSOV6Q.js +0 -285
- package/dist/chunk-A624LFLB.js +0 -1380
- package/dist/chunk-ADN5NHG4.js +0 -126
- package/dist/chunk-B7YJYJKG.js +0 -33
- package/dist/chunk-CCLHCPKG.js +0 -210
- package/dist/chunk-CK36VROC.js +0 -1584
- package/dist/chunk-D3UOFRSB.js +0 -81
- package/dist/chunk-DFR4DJBM.js +0 -230
- package/dist/chunk-DSYBDHYH.js +0 -79
- package/dist/chunk-DWMLTXKQ.js +0 -1176
- package/dist/chunk-E3REJTAJ.js +0 -28
- package/dist/chunk-EA3IVO64.js +0 -633
- package/dist/chunk-EK2AKZKD.js +0 -55
- package/dist/chunk-ELD7JTTT.js +0 -343
- package/dist/chunk-EX6TT2XI.js +0 -195
- package/dist/chunk-EXINSFZE.js +0 -82
- package/dist/chunk-EZ6ZBYBM.js +0 -510
- package/dist/chunk-FBKAPTJ2.js +0 -16
- package/dist/chunk-FVLV5RYH.js +0 -1118
- package/dist/chunk-GDNSBQVK.js +0 -2485
- package/dist/chunk-GPQHMBNN.js +0 -278
- package/dist/chunk-GTFJB67L.js +0 -68
- package/dist/chunk-HANJXVKW.js +0 -1127
- package/dist/chunk-HEVS5YLD.js +0 -269
- package/dist/chunk-HMEVZKPQ.js +0 -9
- package/dist/chunk-HRGSYNLM.js +0 -3511
- package/dist/chunk-ISZR5N4K.js +0 -60
- package/dist/chunk-J6SUPR2C.js +0 -226
- package/dist/chunk-JERYVEIZ.js +0 -244
- package/dist/chunk-JHHWGL2N.js +0 -87
- package/dist/chunk-JONWQUB5.js +0 -775
- package/dist/chunk-K2DIWWDM.js +0 -1766
- package/dist/chunk-KY4PGL5V.js +0 -969
- package/dist/chunk-L737LQ4C.js +0 -1285
- package/dist/chunk-LFTWYIB2.js +0 -497
- package/dist/chunk-LV47RFNJ.js +0 -41
- package/dist/chunk-MKSAITI7.js +0 -15
- package/dist/chunk-MZ7RKIX4.js +0 -212
- package/dist/chunk-NAP6CFSO.js +0 -84
- package/dist/chunk-ND6MY37M.js +0 -16
- package/dist/chunk-NMG736UR.js +0 -683
- package/dist/chunk-NRAXROED.js +0 -32
- package/dist/chunk-NRIZR3A7.js +0 -690
- package/dist/chunk-NX43BG3M.js +0 -233
- package/dist/chunk-O645XLSI.js +0 -297
- package/dist/chunk-OMJD6A3S.js +0 -235
- package/dist/chunk-QB6SJD4T.js +0 -430
- package/dist/chunk-QFSTL4J3.js +0 -276
- package/dist/chunk-QLGDFMFX.js +0 -212
- package/dist/chunk-RIAAGL2E.js +0 -13
- package/dist/chunk-RWO5XMZ6.js +0 -86
- package/dist/chunk-RXRKBBSM.js +0 -149
- package/dist/chunk-RZOZMML6.js +0 -363
- package/dist/chunk-U7I7FS7T.js +0 -113
- package/dist/chunk-UI42RODY.js +0 -717
- package/dist/chunk-UTVMVSCO.js +0 -519
- package/dist/chunk-V6OJGLBA.js +0 -1746
- package/dist/chunk-W2JHVH7D.js +0 -152
- package/dist/chunk-WD3Y7VQN.js +0 -280
- package/dist/chunk-WOCTQ5MS.js +0 -303
- package/dist/chunk-WZR3ZUNN.js +0 -696
- package/dist/chunk-XGI665H7.js +0 -150
- package/dist/chunk-XKY65P2T.js +0 -304
- package/dist/chunk-Y4CQZY65.js +0 -57
- package/dist/chunk-YFEXKLVE.js +0 -194
- package/dist/chunk-YHO3HS5X.js +0 -287
- package/dist/chunk-YLS7AZSX.js +0 -738
- package/dist/chunk-ZE473AO6.js +0 -49
- package/dist/chunk-ZF747T3O.js +0 -644
- package/dist/chunk-ZHCZHZH3.js +0 -43
- package/dist/chunk-ZZNZX2XY.js +0 -87
- package/dist/constants-7QAP3VQ4.js +0 -23
- package/dist/dist-IY3UUMWK.js +0 -33
- package/dist/invariants-runner-W5RGHCSU.js +0 -27
- package/dist/lane-lock-6J36HD5O.js +0 -35
- package/dist/mem-checkpoint-core-EANG2GVN.js +0 -14
- package/dist/mem-signal-core-2LZ2WYHW.js +0 -19
- package/dist/memory-store-OLB5FO7K.js +0 -18
- package/dist/service-6BYCOCO5.js +0 -13
- package/dist/spawn-policy-resolver-NTSZYQ6R.js +0 -17
- package/dist/spawn-task-builder-R4E2BHSW.js +0 -22
- package/dist/wu-done-pr-WLFFFEPJ.js +0 -25
- package/dist/wu-done-validation-3J5E36FE.js +0 -30
- package/dist/wu-duplicate-id-detector-5S7JHELK.js +0 -232
- package/packs/sidekick/.turbo/turbo-typecheck.log +0 -4
- package/packs/software-delivery/.turbo/turbo-typecheck.log +0 -4
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
**Last updated:** {{DATE}}
|
|
4
4
|
|
|
5
5
|
This project uses LumenFlow workflow. For complete documentation, see [LUMENFLOW.md](LUMENFLOW.md).
|
|
6
|
+
If `LUMENFLOW.local.md` exists, read it after LUMENFLOW.md for project-specific additions.
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -61,7 +62,7 @@ This is the single most forgotten step. See [LUMENFLOW.md](LUMENFLOW.md) for det
|
|
|
61
62
|
| `pnpm wu:prep` | Run gates in worktree, prep for wu:done |
|
|
62
63
|
| `pnpm wu:done` | Complete WU (merge or PR, stamp, cleanup) |
|
|
63
64
|
| `pnpm wu:status` | Show WU status, location, valid commands |
|
|
64
|
-
| `pnpm wu:brief` | Generate handoff prompt + record evidence
|
|
65
|
+
| `pnpm wu:brief` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence |
|
|
65
66
|
| `pnpm wu:delegate` | Generate prompt + record delegation lineage |
|
|
66
67
|
| `pnpm wu:recover` | Analyze and fix WU state inconsistencies |
|
|
67
68
|
| `pnpm wu:escalate` | Show or resolve WU escalation status |
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**Last updated:** {{DATE}}
|
|
4
4
|
|
|
5
|
+
> **This file is managed by LumenFlow.** Do not edit — it will be overwritten on upgrade.
|
|
6
|
+
> For project-specific additions, create `LUMENFLOW.local.md` (never overwritten).
|
|
7
|
+
> If `LUMENFLOW.local.md` exists, agents should read it after this file.
|
|
8
|
+
|
|
5
9
|
LumenFlow is a vendor-agnostic workflow framework for AI-native software development.
|
|
6
10
|
|
|
7
11
|
> **Context Safety**: When approaching context limits (80% usage, 50+ tool calls), spawn a fresh agent instead of continuing after compaction. See [wu-sizing-guide.md]({{DOCS_ONBOARDING_PATH}}/wu-sizing-guide.md).
|
|
@@ -261,7 +265,7 @@ For the full worktree lifecycle (parallel execution, bootstrap, isolation guaran
|
|
|
261
265
|
| `pnpm wu:block` | Block WU (transitions to blocked, frees lane) |
|
|
262
266
|
| `pnpm wu:unblock` | Unblock WU (transitions to in_progress) |
|
|
263
267
|
| `pnpm wu:release` | Release orphaned WU (in_progress to ready for reclaim) |
|
|
264
|
-
| `pnpm wu:brief` | Generate handoff prompt + record evidence
|
|
268
|
+
| `pnpm wu:brief` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence |
|
|
265
269
|
| `pnpm wu:delegate` | Generate prompt + record lineage + brief hash attestation |
|
|
266
270
|
| `pnpm wu:escalate` | Show or resolve WU escalation status |
|
|
267
271
|
| `pnpm wu:verify` | Verify WU completion (stamp, commit, clean tree) |
|
|
@@ -10,14 +10,15 @@ pnpm outdated @lumenflow/*
|
|
|
10
10
|
|
|
11
11
|
# Update all LumenFlow packages atomically
|
|
12
12
|
pnpm lumenflow:upgrade --latest
|
|
13
|
-
|
|
14
|
-
# Refresh core docs, onboarding docs, and vendor assets
|
|
15
|
-
pnpm docs:sync --force
|
|
16
13
|
```
|
|
17
14
|
|
|
18
|
-
Package upgrades change the runtime `wu:brief` defaults immediately. `lumenflow:upgrade`
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
Package upgrades change the runtime `wu:brief` defaults immediately. `lumenflow:upgrade` automatically
|
|
16
|
+
syncs managed docs (LUMENFLOW.md, .lumenflow/constraints.md) from templates. Bootstrap files
|
|
17
|
+
(AGENTS.md, vendor overlays) are updated via merge-block markers — only the LumenFlow-managed
|
|
18
|
+
section between `<!-- LUMENFLOW:START -->` / `<!-- LUMENFLOW:END -->` is replaced; your content
|
|
19
|
+
outside markers is preserved.
|
|
20
|
+
|
|
21
|
+
If you have project-specific workflow additions, put them in `LUMENFLOW.local.md` (never overwritten).
|
|
21
22
|
Project-local `.lumenflow/templates/` remains optional unless you want custom overrides.
|
|
22
23
|
|
|
23
24
|
## Version Compatibility
|
|
@@ -57,17 +58,20 @@ pnpm lumenflow:upgrade --version 1.2.0
|
|
|
57
58
|
|
|
58
59
|
### 4. Sync Documentation
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
`lumenflow:upgrade` already syncs the shipped docs surfaces inside the upgrade transaction:
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
|
-
pnpm
|
|
64
|
+
pnpm lumenflow:upgrade --latest
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
This updates:
|
|
67
68
|
|
|
68
69
|
- Core docs: LUMENFLOW.md, AGENTS.md, .lumenflow/constraints.md
|
|
69
70
|
- Scaffolded onboarding documentation
|
|
70
|
-
-
|
|
71
|
+
- Already-present or configured vendor bootstraps
|
|
72
|
+
- Reserved Claude skills when Claude assets are configured
|
|
73
|
+
|
|
74
|
+
Run `pnpm docs:sync --vendor <type>` only when you want to refresh a specific vendor/bootstrap surface outside the upgrade flow.
|
|
71
75
|
|
|
72
76
|
## Defaults vs Overrides
|
|
73
77
|
|
|
@@ -113,7 +117,7 @@ pnpm install
|
|
|
113
117
|
|
|
114
118
|
### Template Conflicts
|
|
115
119
|
|
|
116
|
-
If
|
|
120
|
+
If a merge-block bootstrap file needs manual review:
|
|
117
121
|
|
|
118
122
|
1. Review the diff for each conflicting file
|
|
119
123
|
2. Merge manually or accept incoming changes
|
|
@@ -382,7 +382,7 @@ pnpm delegation:list --initiative INIT-XXX --json
|
|
|
382
382
|
| `pnpm orchestrate:initiative -i INIT-XXX` | Execute all waves continuously |
|
|
383
383
|
| `pnpm orchestrate:init-status -i INIT-XXX` | Compact progress view |
|
|
384
384
|
| `pnpm orchestrate:monitor` | Detect stuck agents and zombie locks |
|
|
385
|
-
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate
|
|
385
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | **MANDATORY after wu:claim.** Generate prompt + evidence |
|
|
386
386
|
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt + record delegation |
|
|
387
387
|
| `pnpm delegation:list --initiative INIT-XXX` | View delegation tree |
|
|
388
388
|
| `pnpm mem:signal "msg" --wu WU-XXX` | Broadcast coordination signal |
|
|
@@ -68,7 +68,7 @@ Run `--help` first, then run the real command with explicit flags.
|
|
|
68
68
|
| `pnpm exec lumenflow init` | Scaffold LumenFlow in a project |
|
|
69
69
|
| `pnpm exec lumenflow init --docs-structure simple` | Use simple docs structure (`docs/tasks`) |
|
|
70
70
|
| `pnpm exec lumenflow init --docs-structure arc42` | Use arc42 docs structure (`{{DOCS_OPERATIONS_PATH}}`) |
|
|
71
|
-
| `pnpm docs:sync --
|
|
71
|
+
| `pnpm docs:sync --vendor <type>` | Refresh selected vendor bootstrap assets outside upgrade |
|
|
72
72
|
| `pnpm sync:templates` | Sync repo docs into bundled templates |
|
|
73
73
|
| `pnpm lumenflow:upgrade` | Upgrade LumenFlow packages |
|
|
74
74
|
| `pnpm lumenflow:doctor` | Diagnose LumenFlow configuration |
|
|
@@ -106,21 +106,22 @@ commit and push atomically. Do NOT wrap them in a WU or use raw `pnpm update`/`g
|
|
|
106
106
|
| `pnpm config:set --key <dotpath> --value <value>` | Set workspace.yaml config (Zod-validated) |
|
|
107
107
|
| `pnpm config:get --key <dotpath>` | Read workspace.yaml config |
|
|
108
108
|
| `pnpm cloud:connect` | Configure cloud control-plane access |
|
|
109
|
-
| `pnpm docs:sync --
|
|
109
|
+
| `pnpm docs:sync --vendor <type>` | Optional targeted refresh for vendor/bootstrap assets |
|
|
110
110
|
| `pnpm sync:templates` | Sync repo docs into bundled templates |
|
|
111
111
|
|
|
112
112
|
**Key principle:** If a LumenFlow CLI command exists for the operation, use it instead of
|
|
113
113
|
raw pnpm/git. These tooling commands commit directly to main via micro-worktree — no dirty
|
|
114
114
|
files, no manual git, no WU ceremony. Only actual **code changes** need WUs.
|
|
115
115
|
|
|
116
|
-
`docs:sync` refreshes
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
`docs:sync` refreshes managed docs, the scaffolded onboarding set, and selected vendor bootstrap
|
|
117
|
+
assets. Managed docs are refreshed automatically during `pnpm lumenflow:upgrade --latest`, and
|
|
118
|
+
bootstrap files update safely via merge-block markers.
|
|
119
119
|
|
|
120
|
-
For existing installs, upgrade packages first with `pnpm lumenflow:upgrade --latest
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
For existing installs, upgrade packages first with `pnpm lumenflow:upgrade --latest`. That command
|
|
121
|
+
automatically syncs managed docs, onboarding docs, and configured vendor assets. Use
|
|
122
|
+
`pnpm docs:sync --vendor <type>` only when you want an additional targeted refresh outside upgrade.
|
|
123
|
+
The improved default `wu:brief` behavior comes from the package upgrade itself. New installs get
|
|
124
|
+
those defaults automatically, and `.lumenflow/templates/` remains optional unless you want custom overrides.
|
|
124
125
|
|
|
125
126
|
> **Anti-pattern:** Do NOT use `pnpm update @lumenflow/*` to upgrade packages.
|
|
126
127
|
> This leaves dirty `package.json` and `pnpm-lock.yaml` on main.
|
|
@@ -147,7 +148,7 @@ automatically, and `.lumenflow/templates/` remains optional unless you want cust
|
|
|
147
148
|
| `pnpm wu:unblock --id WU-XXX` | Unblock WU |
|
|
148
149
|
| `pnpm wu:release --id WU-XXX` | Release orphaned WU (in_progress to ready) |
|
|
149
150
|
| `pnpm wu:status --id WU-XXX` | Show WU status, location, valid commands |
|
|
150
|
-
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate handoff prompt + record evidence
|
|
151
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | **MANDATORY after wu:claim.** Generate handoff prompt + record evidence. wu:done blocks without this |
|
|
151
152
|
| `pnpm wu:brief --id WU-XXX --no-context` | Generate prompt without memory context injection |
|
|
152
153
|
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt, record lineage, and store brief hash attestation |
|
|
153
154
|
| `pnpm wu:sandbox --id WU-XXX -- <cmd>` | Run command through hardened WU sandbox backend |
|
|
@@ -520,8 +520,8 @@ extra project commands, or client-specific overrides.
|
|
|
520
520
|
|
|
521
521
|
- New installs get the current defaults automatically.
|
|
522
522
|
- Existing installs get the runtime defaults after `pnpm lumenflow:upgrade --latest`.
|
|
523
|
-
-
|
|
524
|
-
|
|
523
|
+
- `pnpm lumenflow:upgrade --latest` already refreshes managed docs, onboarding docs, and configured
|
|
524
|
+
vendor assets. Use `pnpm docs:sync --vendor <type>` only for an extra targeted refresh.
|
|
525
525
|
|
|
526
526
|
Default profiles:
|
|
527
527
|
|
|
@@ -556,7 +556,7 @@ Domain-specific commands must come from local configuration, not core framework
|
|
|
556
556
|
| `pnpm wu:claim --id WU-XXX --lane "Lane"` | Claim WU and create worktree (default) | Start working (local) |
|
|
557
557
|
| `pnpm wu:claim --id WU-XXX --lane "L" --cloud` | Claim WU in branch-pr mode (no worktree) | Start working (cloud) |
|
|
558
558
|
| `pnpm wu:edit --id WU-XXX --field value` | Edit WU spec fields | Update notes/desc |
|
|
559
|
-
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate
|
|
559
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | **MANDATORY after wu:claim.** Generate prompt + evidence | Delegation or self-impl |
|
|
560
560
|
| `pnpm wu:delegate --id WU-XXX --parent-wu P` | Generate prompt + record delegation | Auditable delegation flows |
|
|
561
561
|
| `pnpm wu:prep --id WU-XXX` | Run gates in claimed workspace, prep completion | Before wu:done |
|
|
562
562
|
| `pnpm wu:done --id WU-XXX` | Complete WU (merge or PR, cleanup) | After gates pass |
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
**Last updated:** {{DATE}}
|
|
4
4
|
|
|
5
5
|
This project uses LumenFlow workflow. For workflow documentation, see [LUMENFLOW.md](../LUMENFLOW.md).
|
|
6
|
+
If `LUMENFLOW.local.md` exists, read it after LUMENFLOW.md for project-specific additions.
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -48,7 +49,7 @@ Essential commands for multi-agent coordination and context management:
|
|
|
48
49
|
| `pnpm mem:inbox --since 30m` | Check coordination signals |
|
|
49
50
|
| `pnpm mem:signal "msg" --wu WU-XXX` | Broadcast signal to other agents |
|
|
50
51
|
| `pnpm mem:create "msg" --wu WU-XXX` | Create memory node (bug capture) |
|
|
51
|
-
| `pnpm wu:brief --id WU-XXX --client claude-code` | Generate
|
|
52
|
+
| `pnpm wu:brief --id WU-XXX --client claude-code` | **MANDATORY after wu:claim.** Generate prompt + evidence |
|
|
52
53
|
|
|
53
54
|
**When to checkpoint:**
|
|
54
55
|
- After each acceptance criterion completed
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Cursor LumenFlow Rules
|
|
2
2
|
|
|
3
3
|
**Read first:** [AGENTS.md](../../AGENTS.md) for universal startup rules, then [LUMENFLOW.md](../../LUMENFLOW.md) for the canonical workflow, commands, and safety rules.
|
|
4
|
+
If `LUMENFLOW.local.md` exists, read it after LUMENFLOW.md for project-specific additions.
|
|
4
5
|
|
|
5
6
|
This file contains Cursor-specific overrides only. Do not duplicate workflow rules from LUMENFLOW.md here.
|
|
6
7
|
|
|
@@ -51,7 +52,7 @@ pnpm wu:done --id WU-XXX
|
|
|
51
52
|
| `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree |
|
|
52
53
|
| `pnpm wu:prep --id WU-XXX` | Run gates in worktree |
|
|
53
54
|
| `pnpm wu:done --id WU-XXX` | Complete WU (from main) |
|
|
54
|
-
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate
|
|
55
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | **MANDATORY after wu:claim.** Generate prompt + evidence |
|
|
55
56
|
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt + record delegation lineage |
|
|
56
57
|
| `pnpm wu:recover --id WU-XXX` | Fix WU state inconsistencies |
|
|
57
58
|
| `pnpm wu:escalate --id WU-XXX` | Show or resolve WU escalation status |
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Windsurf LumenFlow Rules
|
|
2
2
|
|
|
3
3
|
**Read first:** [AGENTS.md](../../AGENTS.md) for universal startup rules, then [LUMENFLOW.md](../../LUMENFLOW.md) for the canonical workflow, commands, and safety rules.
|
|
4
|
+
If `LUMENFLOW.local.md` exists, read it after LUMENFLOW.md for project-specific additions.
|
|
4
5
|
|
|
5
6
|
This file contains Windsurf-specific overrides only. Do not duplicate workflow rules from LUMENFLOW.md here.
|
|
6
7
|
|
|
@@ -51,7 +52,7 @@ pnpm wu:done --id WU-XXX
|
|
|
51
52
|
| `pnpm wu:claim --id WU-XXX --lane <Lane>` | Claim WU and create worktree |
|
|
52
53
|
| `pnpm wu:prep --id WU-XXX` | Run gates in worktree |
|
|
53
54
|
| `pnpm wu:done --id WU-XXX` | Complete WU (from main) |
|
|
54
|
-
| `pnpm wu:brief --id WU-XXX --client <client>` | Generate
|
|
55
|
+
| `pnpm wu:brief --id WU-XXX --client <client>` | **MANDATORY after wu:claim.** Generate prompt + evidence |
|
|
55
56
|
| `pnpm wu:delegate --id WU-XXX --parent-wu <P>` | Generate prompt + record delegation lineage |
|
|
56
57
|
| `pnpm wu:recover --id WU-XXX` | Fix WU state inconsistencies |
|
|
57
58
|
| `pnpm wu:escalate --id WU-XXX` | Show or resolve WU escalation status |
|
package/dist/chunk-2D2VOCA4.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TEST_TYPES,
|
|
3
|
-
WU_TYPES
|
|
4
|
-
} from "./chunk-V6OJGLBA.js";
|
|
5
|
-
|
|
6
|
-
// ../core/dist/wu-type-helpers.js
|
|
7
|
-
function isNonEmptyArray(value) {
|
|
8
|
-
return Array.isArray(value) && value.length > 0;
|
|
9
|
-
}
|
|
10
|
-
function isDocumentationType(type) {
|
|
11
|
-
return typeof type === "string" && type === WU_TYPES.DOCUMENTATION;
|
|
12
|
-
}
|
|
13
|
-
function isProcessType(type) {
|
|
14
|
-
return typeof type === "string" && type === WU_TYPES.PROCESS;
|
|
15
|
-
}
|
|
16
|
-
function isDocsOrProcessType(type) {
|
|
17
|
-
return isDocumentationType(type) || isProcessType(type);
|
|
18
|
-
}
|
|
19
|
-
function hasAnyTests(tests) {
|
|
20
|
-
if (!tests || typeof tests !== "object")
|
|
21
|
-
return false;
|
|
22
|
-
const t = tests;
|
|
23
|
-
return isNonEmptyArray(t[TEST_TYPES.MANUAL]) || isNonEmptyArray(t[TEST_TYPES.UNIT]) || isNonEmptyArray(t[TEST_TYPES.E2E]) || isNonEmptyArray(t[TEST_TYPES.INTEGRATION]);
|
|
24
|
-
}
|
|
25
|
-
function hasManualTests(tests) {
|
|
26
|
-
if (!tests || typeof tests !== "object")
|
|
27
|
-
return false;
|
|
28
|
-
const t = tests;
|
|
29
|
-
return isNonEmptyArray(t[TEST_TYPES.MANUAL]);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
isDocumentationType,
|
|
34
|
-
isDocsOrProcessType,
|
|
35
|
-
hasAnyTests,
|
|
36
|
-
hasManualTests
|
|
37
|
-
};
|
package/dist/chunk-2D5KFYGX.js
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DomainPackManifestSchema,
|
|
3
|
-
PACK_MANIFEST_FILE_NAME,
|
|
4
|
-
UTF8_ENCODING,
|
|
5
|
-
computeDeterministicPackHash,
|
|
6
|
-
isBroadWildcardScopePattern,
|
|
7
|
-
resolvePackToolEntryPath,
|
|
8
|
-
validateDomainPackToolSafety,
|
|
9
|
-
validatePackImportBoundaries
|
|
10
|
-
} from "./chunk-HANJXVKW.js";
|
|
11
|
-
import {
|
|
12
|
-
WU_OPTIONS,
|
|
13
|
-
createWUParser,
|
|
14
|
-
runCLI
|
|
15
|
-
} from "./chunk-2GXVIN57.js";
|
|
16
|
-
|
|
17
|
-
// src/pack-validate.ts
|
|
18
|
-
import { readFile } from "fs/promises";
|
|
19
|
-
import { join, resolve } from "path";
|
|
20
|
-
import YAML from "yaml";
|
|
21
|
-
var LOG_PREFIX = "[pack:validate]";
|
|
22
|
-
var DEFAULT_PACKS_ROOT = "packages/@lumenflow/packs";
|
|
23
|
-
var HTTPS_PROTOCOL = "https:";
|
|
24
|
-
var NETWORK_URL_PROPERTY = "url";
|
|
25
|
-
var SECURITY_LINT_ERROR = {
|
|
26
|
-
PERMISSION_SCOPE_READ_WRITE: "permission/scope mismatch: read-permission tool cannot request write path access.",
|
|
27
|
-
PERMISSION_SCOPE_WRITE_MISSING: "permission/scope mismatch: write-permission tool must include at least one write path scope.",
|
|
28
|
-
WILDCARD_WRITE: "forbidden wildcard write scope. Replace with constrained path pattern (for example reports/**/*.md).",
|
|
29
|
-
NETWORK_URL_REQUIRED: "network-scoped tools must constrain input_schema.properties.url via const/enum https URL allow-list.",
|
|
30
|
-
NETWORK_URL_INVALID: "network-scoped tool has invalid URL in input_schema.properties.url.",
|
|
31
|
-
NETWORK_URL_SCHEME: "network-scoped tool URL must use https:// in input_schema.properties.url."
|
|
32
|
-
};
|
|
33
|
-
async function validatePack(options) {
|
|
34
|
-
const { packRoot, hashExclusions } = options;
|
|
35
|
-
const absolutePackRoot = resolve(packRoot);
|
|
36
|
-
let manifest;
|
|
37
|
-
const manifestResult = await validateManifest(absolutePackRoot);
|
|
38
|
-
if (manifestResult.status === "pass" && manifestResult.manifest) {
|
|
39
|
-
manifest = manifestResult.manifest;
|
|
40
|
-
}
|
|
41
|
-
const toolEntriesResult = manifest ? validateToolEntries(absolutePackRoot, manifest) : { status: "skip", error: "Skipped: manifest validation failed" };
|
|
42
|
-
const importBoundariesResult = await checkImportBoundaries(absolutePackRoot, hashExclusions);
|
|
43
|
-
const securityLintResult = manifest ? runSecurityLint(manifest) : { status: "skip", error: "Skipped: manifest validation failed" };
|
|
44
|
-
const integrityResult = await computeIntegrity(absolutePackRoot, hashExclusions);
|
|
45
|
-
const allPassed = manifestResult.status === "pass" && toolEntriesResult.status === "pass" && importBoundariesResult.status === "pass" && securityLintResult.status === "pass" && integrityResult.status === "pass";
|
|
46
|
-
return {
|
|
47
|
-
manifest: manifestResult,
|
|
48
|
-
importBoundaries: importBoundariesResult,
|
|
49
|
-
toolEntries: toolEntriesResult,
|
|
50
|
-
securityLint: securityLintResult,
|
|
51
|
-
integrity: integrityResult,
|
|
52
|
-
allPassed
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
async function validateManifest(packRoot) {
|
|
56
|
-
try {
|
|
57
|
-
const manifestPath = join(packRoot, PACK_MANIFEST_FILE_NAME);
|
|
58
|
-
const manifestRaw = await readFile(manifestPath, UTF8_ENCODING);
|
|
59
|
-
const parsed = YAML.parse(manifestRaw);
|
|
60
|
-
const manifest = DomainPackManifestSchema.parse(parsed);
|
|
61
|
-
return { status: "pass", manifest };
|
|
62
|
-
} catch (err) {
|
|
63
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
64
|
-
return { status: "fail", error: message };
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function validateToolEntries(packRoot, manifest) {
|
|
68
|
-
try {
|
|
69
|
-
for (const tool of manifest.tools) {
|
|
70
|
-
resolvePackToolEntryPath(packRoot, tool.entry);
|
|
71
|
-
}
|
|
72
|
-
return { status: "pass" };
|
|
73
|
-
} catch (err) {
|
|
74
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
75
|
-
return { status: "fail", error: message };
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async function checkImportBoundaries(packRoot, hashExclusions) {
|
|
79
|
-
try {
|
|
80
|
-
await validatePackImportBoundaries(packRoot, hashExclusions);
|
|
81
|
-
return { status: "pass" };
|
|
82
|
-
} catch (err) {
|
|
83
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
84
|
-
return { status: "fail", error: message };
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async function computeIntegrity(packRoot, hashExclusions) {
|
|
88
|
-
try {
|
|
89
|
-
const hash = await computeDeterministicPackHash({
|
|
90
|
-
packRoot,
|
|
91
|
-
exclusions: hashExclusions
|
|
92
|
-
});
|
|
93
|
-
return { status: "pass", hash };
|
|
94
|
-
} catch (err) {
|
|
95
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
96
|
-
return { status: "fail", error: message };
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function isObjectRecord(value) {
|
|
100
|
-
return typeof value === "object" && value !== null;
|
|
101
|
-
}
|
|
102
|
-
function extractNetworkUrls(tool) {
|
|
103
|
-
const inputSchema = tool.input_schema;
|
|
104
|
-
if (!isObjectRecord(inputSchema)) {
|
|
105
|
-
return [];
|
|
106
|
-
}
|
|
107
|
-
const properties = inputSchema.properties;
|
|
108
|
-
if (!isObjectRecord(properties)) {
|
|
109
|
-
return [];
|
|
110
|
-
}
|
|
111
|
-
const urlSchema = properties[NETWORK_URL_PROPERTY];
|
|
112
|
-
if (!isObjectRecord(urlSchema)) {
|
|
113
|
-
return [];
|
|
114
|
-
}
|
|
115
|
-
if (typeof urlSchema.const === "string") {
|
|
116
|
-
return [urlSchema.const];
|
|
117
|
-
}
|
|
118
|
-
if (!Array.isArray(urlSchema.enum)) {
|
|
119
|
-
return [];
|
|
120
|
-
}
|
|
121
|
-
return urlSchema.enum.filter((candidate) => typeof candidate === "string");
|
|
122
|
-
}
|
|
123
|
-
function lintPermissionScopeConsistency(tool) {
|
|
124
|
-
const pathScopes = tool.required_scopes.filter(
|
|
125
|
-
(scope) => scope.type === "path"
|
|
126
|
-
);
|
|
127
|
-
const hasWritePathScope = pathScopes.some((scope) => scope.access === "write");
|
|
128
|
-
const issues = [];
|
|
129
|
-
if (tool.permission === "read" && hasWritePathScope) {
|
|
130
|
-
issues.push(SECURITY_LINT_ERROR.PERMISSION_SCOPE_READ_WRITE);
|
|
131
|
-
}
|
|
132
|
-
if (tool.permission === "write" && pathScopes.length > 0 && !hasWritePathScope) {
|
|
133
|
-
issues.push(SECURITY_LINT_ERROR.PERMISSION_SCOPE_WRITE_MISSING);
|
|
134
|
-
}
|
|
135
|
-
return issues;
|
|
136
|
-
}
|
|
137
|
-
function runSecurityLint(manifest) {
|
|
138
|
-
const issues = /* @__PURE__ */ new Set();
|
|
139
|
-
for (const tool of manifest.tools) {
|
|
140
|
-
for (const issue of lintPermissionScopeConsistency(tool)) {
|
|
141
|
-
issues.add(`Tool "${tool.name}": ${issue}`);
|
|
142
|
-
}
|
|
143
|
-
for (const issue of validateDomainPackToolSafety(tool)) {
|
|
144
|
-
issues.add(`Tool "${tool.name}": ${issue}`);
|
|
145
|
-
}
|
|
146
|
-
const hasNetworkScope = tool.required_scopes.some((scope) => scope.type === "network");
|
|
147
|
-
for (const scope of tool.required_scopes) {
|
|
148
|
-
if (scope.type !== "path") {
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if ((tool.permission === "write" || tool.permission === "admin") && scope.access === "write" && isBroadWildcardScopePattern(scope.pattern)) {
|
|
152
|
-
issues.add(`Tool "${tool.name}": ${SECURITY_LINT_ERROR.WILDCARD_WRITE}`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (!hasNetworkScope) {
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
const allowedUrls = extractNetworkUrls(tool);
|
|
159
|
-
if (allowedUrls.length === 0) {
|
|
160
|
-
issues.add(`Tool "${tool.name}": ${SECURITY_LINT_ERROR.NETWORK_URL_REQUIRED}`);
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
for (const allowedUrl of allowedUrls) {
|
|
164
|
-
let parsedUrl;
|
|
165
|
-
try {
|
|
166
|
-
parsedUrl = new URL(allowedUrl);
|
|
167
|
-
} catch {
|
|
168
|
-
issues.add(
|
|
169
|
-
`Tool "${tool.name}" URL "${allowedUrl}": ${SECURITY_LINT_ERROR.NETWORK_URL_INVALID}`
|
|
170
|
-
);
|
|
171
|
-
continue;
|
|
172
|
-
}
|
|
173
|
-
if (parsedUrl.protocol !== HTTPS_PROTOCOL) {
|
|
174
|
-
issues.add(
|
|
175
|
-
`Tool "${tool.name}" URL "${allowedUrl}": ${SECURITY_LINT_ERROR.NETWORK_URL_SCHEME}`
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (issues.size > 0) {
|
|
181
|
-
return {
|
|
182
|
-
status: "fail",
|
|
183
|
-
error: [...issues].join("\n")
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return { status: "pass" };
|
|
187
|
-
}
|
|
188
|
-
var CHECK_LABELS = {
|
|
189
|
-
manifest: "Manifest schema",
|
|
190
|
-
importBoundaries: "Import boundaries",
|
|
191
|
-
toolEntries: "Tool entry resolution",
|
|
192
|
-
securityLint: "Security lint",
|
|
193
|
-
integrity: "Integrity hash"
|
|
194
|
-
};
|
|
195
|
-
var STATUS_INDICATORS = {
|
|
196
|
-
pass: "PASS",
|
|
197
|
-
fail: "FAIL",
|
|
198
|
-
skip: "SKIP"
|
|
199
|
-
};
|
|
200
|
-
function formatValidationReport(result) {
|
|
201
|
-
const lines = [];
|
|
202
|
-
lines.push("Pack Validation Report");
|
|
203
|
-
lines.push("=====================");
|
|
204
|
-
lines.push("");
|
|
205
|
-
const checks = [
|
|
206
|
-
["manifest", result.manifest],
|
|
207
|
-
["importBoundaries", result.importBoundaries],
|
|
208
|
-
["toolEntries", result.toolEntries],
|
|
209
|
-
["securityLint", result.securityLint],
|
|
210
|
-
["integrity", result.integrity]
|
|
211
|
-
];
|
|
212
|
-
for (const [key, check] of checks) {
|
|
213
|
-
const label = CHECK_LABELS[key];
|
|
214
|
-
const indicator = STATUS_INDICATORS[check.status];
|
|
215
|
-
lines.push(` [${indicator}] ${label}`);
|
|
216
|
-
if (check.status === "fail" && check.error) {
|
|
217
|
-
lines.push(` Error: ${check.error}`);
|
|
218
|
-
}
|
|
219
|
-
if (key === "integrity" && "hash" in check && check.hash) {
|
|
220
|
-
lines.push(` Hash: sha256:${check.hash}`);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
lines.push("");
|
|
224
|
-
lines.push(`Result: ${result.allPassed ? "ALL CHECKS PASSED" : "VALIDATION FAILED"}`);
|
|
225
|
-
return lines.join("\n");
|
|
226
|
-
}
|
|
227
|
-
var PACK_VALIDATE_OPTIONS = {
|
|
228
|
-
packId: {
|
|
229
|
-
name: "id",
|
|
230
|
-
flags: "--id <packId>",
|
|
231
|
-
description: "Pack ID to validate (resolves under --packs-root)"
|
|
232
|
-
},
|
|
233
|
-
packsRoot: {
|
|
234
|
-
name: "packsRoot",
|
|
235
|
-
flags: "--packs-root <dir>",
|
|
236
|
-
description: `Root directory containing packs (default: "${DEFAULT_PACKS_ROOT}")`
|
|
237
|
-
},
|
|
238
|
-
packRoot: {
|
|
239
|
-
name: "packRoot",
|
|
240
|
-
flags: "--pack-root <dir>",
|
|
241
|
-
description: "Direct path to pack directory (overrides --id and --packs-root)"
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
async function main() {
|
|
245
|
-
const opts = createWUParser({
|
|
246
|
-
name: "pack-validate",
|
|
247
|
-
description: "Validate a LumenFlow domain pack for integrity",
|
|
248
|
-
options: [
|
|
249
|
-
PACK_VALIDATE_OPTIONS.packId,
|
|
250
|
-
PACK_VALIDATE_OPTIONS.packsRoot,
|
|
251
|
-
PACK_VALIDATE_OPTIONS.packRoot,
|
|
252
|
-
WU_OPTIONS.force
|
|
253
|
-
]
|
|
254
|
-
});
|
|
255
|
-
const packId = opts.id;
|
|
256
|
-
const packsRoot = opts.packsRoot ?? DEFAULT_PACKS_ROOT;
|
|
257
|
-
const directPackRoot = opts.packRoot;
|
|
258
|
-
let resolvedPackRoot;
|
|
259
|
-
if (directPackRoot) {
|
|
260
|
-
resolvedPackRoot = resolve(directPackRoot);
|
|
261
|
-
} else if (packId) {
|
|
262
|
-
resolvedPackRoot = resolve(packsRoot, packId);
|
|
263
|
-
} else {
|
|
264
|
-
console.error(`${LOG_PREFIX} Error: Provide --id <packId> or --pack-root <dir>`);
|
|
265
|
-
process.exit(1);
|
|
266
|
-
}
|
|
267
|
-
console.log(`${LOG_PREFIX} Validating pack at: ${resolvedPackRoot}`);
|
|
268
|
-
const result = await validatePack({ packRoot: resolvedPackRoot });
|
|
269
|
-
const report = formatValidationReport(result);
|
|
270
|
-
console.log(report);
|
|
271
|
-
if (!result.allPassed) {
|
|
272
|
-
process.exit(1);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
if (import.meta.main) {
|
|
276
|
-
void runCLI(main);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export {
|
|
280
|
-
LOG_PREFIX,
|
|
281
|
-
validatePack,
|
|
282
|
-
formatValidationReport,
|
|
283
|
-
main
|
|
284
|
-
};
|