@lumenflow/cli 2.1.2 → 2.2.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.
- package/dist/agent-issues-query.d.ts +16 -0
- package/dist/agent-log-issue.d.ts +10 -0
- package/dist/agent-session-end.d.ts +10 -0
- package/dist/agent-session.d.ts +10 -0
- package/dist/backlog-prune.d.ts +84 -0
- package/dist/cli-entry-point.d.ts +8 -0
- package/dist/deps-add.d.ts +91 -0
- package/dist/deps-remove.d.ts +17 -0
- package/dist/docs-sync.d.ts +50 -0
- package/dist/file-delete.d.ts +84 -0
- package/dist/file-edit.d.ts +82 -0
- package/dist/file-read.d.ts +92 -0
- package/dist/file-write.d.ts +90 -0
- package/dist/flow-bottlenecks.d.ts +16 -0
- package/dist/flow-report.d.ts +16 -0
- package/dist/gates.d.ts +94 -0
- package/dist/git-branch.d.ts +65 -0
- package/dist/git-diff.d.ts +58 -0
- package/dist/git-log.d.ts +69 -0
- package/dist/git-status.d.ts +58 -0
- package/dist/guard-locked.d.ts +62 -0
- package/dist/guard-main-branch.d.ts +50 -0
- package/dist/guard-worktree-commit.d.ts +59 -0
- package/dist/index.d.ts +10 -0
- package/dist/init-plan.d.ts +80 -0
- package/dist/init.d.ts +46 -0
- package/dist/initiative-add-wu.d.ts +22 -0
- package/dist/initiative-bulk-assign-wus.d.ts +16 -0
- package/dist/initiative-create.d.ts +28 -0
- package/dist/initiative-edit.d.ts +34 -0
- package/dist/initiative-list.d.ts +12 -0
- package/dist/initiative-status.d.ts +11 -0
- package/dist/lumenflow-upgrade.d.ts +103 -0
- package/dist/mem-checkpoint.d.ts +16 -0
- package/dist/mem-cleanup.d.ts +29 -0
- package/dist/mem-create.d.ts +17 -0
- package/dist/mem-export.d.ts +10 -0
- package/dist/mem-export.js +138 -0
- package/dist/mem-inbox.d.ts +35 -0
- package/dist/mem-init.d.ts +15 -0
- package/dist/mem-ready.d.ts +16 -0
- package/dist/mem-signal.d.ts +16 -0
- package/dist/mem-start.d.ts +16 -0
- package/dist/mem-summarize.d.ts +22 -0
- package/dist/mem-triage.d.ts +22 -0
- package/dist/metrics-cli.d.ts +90 -0
- package/dist/metrics-snapshot.d.ts +18 -0
- package/dist/orchestrate-init-status.d.ts +11 -0
- package/dist/orchestrate-initiative.d.ts +12 -0
- package/dist/orchestrate-monitor.d.ts +11 -0
- package/dist/release.d.ts +117 -0
- package/dist/rotate-progress.d.ts +48 -0
- package/dist/session-coordinator.d.ts +74 -0
- package/dist/spawn-list.d.ts +16 -0
- package/dist/state-bootstrap.d.ts +92 -0
- package/dist/sync-templates.d.ts +52 -0
- package/dist/trace-gen.d.ts +84 -0
- package/dist/validate-agent-skills.d.ts +50 -0
- package/dist/validate-agent-sync.d.ts +36 -0
- package/dist/validate-backlog-sync.d.ts +37 -0
- package/dist/validate-skills-spec.d.ts +40 -0
- package/dist/validate.d.ts +60 -0
- package/dist/wu-block.d.ts +16 -0
- package/dist/wu-claim.d.ts +74 -0
- package/dist/wu-cleanup.d.ts +35 -0
- package/dist/wu-cleanup.js +11 -2
- package/dist/wu-create.d.ts +69 -0
- package/dist/wu-delete.d.ts +21 -0
- package/dist/wu-deps.d.ts +13 -0
- package/dist/wu-done.d.ts +225 -0
- package/dist/wu-done.js +9 -3
- package/dist/wu-edit.d.ts +63 -0
- package/dist/wu-edit.js +76 -9
- package/dist/wu-infer-lane.d.ts +17 -0
- package/dist/wu-preflight.d.ts +47 -0
- package/dist/wu-prune.d.ts +16 -0
- package/dist/wu-recover.d.ts +37 -0
- package/dist/wu-release.d.ts +19 -0
- package/dist/wu-repair.d.ts +60 -0
- package/dist/wu-spawn-completion.d.ts +10 -0
- package/dist/wu-spawn.d.ts +192 -0
- package/dist/wu-spawn.js +176 -12
- package/dist/wu-status.d.ts +25 -0
- package/dist/wu-unblock.d.ts +16 -0
- package/dist/wu-unlock-lane.d.ts +19 -0
- package/dist/wu-validate.d.ts +16 -0
- package/package.json +7 -6
package/dist/wu-spawn.js
CHANGED
|
@@ -53,6 +53,28 @@ const MANDATORY_TRIGGERS = {
|
|
|
53
53
|
'beacon-guardian': ['**/prompts/**', '**/classification/**', '**/detector/**', '**/llm/**'],
|
|
54
54
|
};
|
|
55
55
|
const LOG_PREFIX = '[wu:spawn]';
|
|
56
|
+
/**
|
|
57
|
+
* WU-1131: Truncation prevention constants
|
|
58
|
+
*
|
|
59
|
+
* These constants help detect when spawn output has been truncated during
|
|
60
|
+
* copy-paste operations or context loading. The warning banner alerts users
|
|
61
|
+
* to the truncation risk, and the end sentinel allows verification that
|
|
62
|
+
* the full output was received.
|
|
63
|
+
*/
|
|
64
|
+
export const TRUNCATION_WARNING_BANNER = `<!-- LUMENFLOW_TRUNCATION_WARNING -->
|
|
65
|
+
<!--
|
|
66
|
+
⚠️ CRITICAL: DO NOT TRUNCATE THIS OUTPUT
|
|
67
|
+
|
|
68
|
+
This spawn prompt MUST be copied verbatim. Truncation causes:
|
|
69
|
+
- Missing constraints (agents ignore safety rules)
|
|
70
|
+
- Missing TDD directives (agents skip tests)
|
|
71
|
+
- Degraded agent performance
|
|
72
|
+
|
|
73
|
+
VERIFICATION: The output MUST end with: <!-- LUMENFLOW_SPAWN_END -->
|
|
74
|
+
If you don't see that sentinel at the end, the output was truncated.
|
|
75
|
+
-->
|
|
76
|
+
`;
|
|
77
|
+
export const SPAWN_END_SENTINEL = '<!-- LUMENFLOW_SPAWN_END -->';
|
|
56
78
|
/**
|
|
57
79
|
* Detect mandatory agents based on code paths.
|
|
58
80
|
*
|
|
@@ -259,6 +281,79 @@ function generateInvariantsPriorArtSection(codePaths) {
|
|
|
259
281
|
];
|
|
260
282
|
return lines.join('\n');
|
|
261
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* WU types that require TDD (failing test first)
|
|
286
|
+
*/
|
|
287
|
+
const TDD_REQUIRED_TYPES = ['feature', 'bug', 'tooling', 'enhancement'];
|
|
288
|
+
/**
|
|
289
|
+
* WU types that require existing tests to pass (no new tests mandated)
|
|
290
|
+
*/
|
|
291
|
+
const EXISTING_TESTS_TYPES = ['refactor'];
|
|
292
|
+
/**
|
|
293
|
+
* WU types that require smoke tests + manual QA
|
|
294
|
+
*/
|
|
295
|
+
const SMOKE_TEST_TYPES = ['visual', 'design', 'ui'];
|
|
296
|
+
/**
|
|
297
|
+
* WU types that only need format checks (no TDD)
|
|
298
|
+
*/
|
|
299
|
+
const DOCS_ONLY_TYPES = ['documentation', 'docs', 'config'];
|
|
300
|
+
/**
|
|
301
|
+
* Generate type-aware test guidance (WU-1142)
|
|
302
|
+
*
|
|
303
|
+
* Returns appropriate test guidance based on WU type:
|
|
304
|
+
* - feature/bug/tooling: Full TDD directive
|
|
305
|
+
* - documentation: Format check only
|
|
306
|
+
* - visual/design: Smoke test + manual QA
|
|
307
|
+
* - refactor: Existing tests must pass
|
|
308
|
+
*
|
|
309
|
+
* @param {string} wuType - WU type from YAML
|
|
310
|
+
* @returns {string} Test guidance section
|
|
311
|
+
*/
|
|
312
|
+
export function generateTestGuidance(wuType) {
|
|
313
|
+
const type = (wuType || 'feature').toLowerCase();
|
|
314
|
+
// Documentation WUs - no TDD, just format checks
|
|
315
|
+
if (DOCS_ONLY_TYPES.includes(type)) {
|
|
316
|
+
return `## Documentation Standards
|
|
317
|
+
|
|
318
|
+
**Format check only** - No TDD required for documentation WUs.
|
|
319
|
+
|
|
320
|
+
### Requirements
|
|
321
|
+
|
|
322
|
+
1. Run \`pnpm gates --docs-only\` before completion
|
|
323
|
+
2. Ensure markdown formatting is correct
|
|
324
|
+
3. Verify links are valid
|
|
325
|
+
4. Check spelling and grammar`;
|
|
326
|
+
}
|
|
327
|
+
// Visual/Design WUs - smoke tests + manual QA
|
|
328
|
+
if (SMOKE_TEST_TYPES.includes(type)) {
|
|
329
|
+
return `## Visual/Design Testing
|
|
330
|
+
|
|
331
|
+
**Smoke test + manual QA** - Visual WUs require different verification.
|
|
332
|
+
|
|
333
|
+
### Requirements
|
|
334
|
+
|
|
335
|
+
1. Create smoke test for component rendering (if applicable)
|
|
336
|
+
2. Verify visual appearance manually
|
|
337
|
+
3. Test responsive behavior across breakpoints
|
|
338
|
+
4. Check accessibility (keyboard navigation, screen reader)
|
|
339
|
+
5. Document manual QA results in completion notes`;
|
|
340
|
+
}
|
|
341
|
+
// Refactor WUs - existing tests must pass
|
|
342
|
+
if (EXISTING_TESTS_TYPES.includes(type)) {
|
|
343
|
+
return `## Refactor Testing
|
|
344
|
+
|
|
345
|
+
**Existing tests must pass** - Refactoring must not break current behavior.
|
|
346
|
+
|
|
347
|
+
### Requirements
|
|
348
|
+
|
|
349
|
+
1. Run all existing tests BEFORE refactoring
|
|
350
|
+
2. Run all existing tests AFTER refactoring
|
|
351
|
+
3. No new tests required unless behavior changes
|
|
352
|
+
4. If tests fail after refactor, the refactor introduced a bug`;
|
|
353
|
+
}
|
|
354
|
+
// Default: TDD required (feature, bug, tooling, enhancement)
|
|
355
|
+
return generateTDDDirective();
|
|
356
|
+
}
|
|
262
357
|
/**
|
|
263
358
|
* Generate the TDD directive section (WU-1585)
|
|
264
359
|
*
|
|
@@ -363,6 +458,12 @@ CRITICAL RULES - ENFORCE BEFORE EVERY ACTION:
|
|
|
363
458
|
- Use \`pnpm mem:checkpoint --wu ${id}\` to save progress before risky operations
|
|
364
459
|
- Check \`pnpm mem:inbox --wu ${id}\` periodically for parallel signals from other agents
|
|
365
460
|
- Checkpoint triggers (WU-1943): checkpoint after each acceptance criterion completed, checkpoint before gates, checkpoint every 30 tool calls
|
|
461
|
+
|
|
462
|
+
8. SKIP-GATES AUTONOMY (WU-1142)
|
|
463
|
+
- If gates fail, first check if failure is pre-existing on main: \`git checkout main && pnpm gates\`
|
|
464
|
+
- If failure exists on main (not your change), use: \`pnpm wu:done --id ${id} --skip-gates --reason "pre-existing on main" --fix-wu WU-XXXX\`
|
|
465
|
+
- Do NOT ask for approval - autonomous skip-gates for pre-existing failures is correct
|
|
466
|
+
- This prevents getting stuck on infrastructure debt
|
|
366
467
|
</constraints>`;
|
|
367
468
|
}
|
|
368
469
|
function generateCodexConstraints(id) {
|
|
@@ -373,7 +474,8 @@ function generateCodexConstraints(id) {
|
|
|
373
474
|
3. **Verify before success**: run \`pnpm gates\` in the worktree, then run \`node tools/lib/agent-verification.mjs ${id}\` (from the shared checkout)
|
|
374
475
|
4. **No fabrication**: if blockers remain or verification fails, report INCOMPLETE
|
|
375
476
|
5. **Git workflow**: avoid merge commits; let \`pnpm wu:done\` handle completion
|
|
376
|
-
6. **Scope discipline**: stay within \`code_paths\`; capture out-of-scope issues via \`pnpm mem:create
|
|
477
|
+
6. **Scope discipline**: stay within \`code_paths\`; capture out-of-scope issues via \`pnpm mem:create\`
|
|
478
|
+
7. **Skip-gates for pre-existing**: if gates fail due to pre-existing issue on main, use \`--skip-gates --reason "pre-existing" --fix-wu WU-XXX\``;
|
|
377
479
|
}
|
|
378
480
|
/**
|
|
379
481
|
* Generate mandatory agent advisory section
|
|
@@ -579,6 +681,45 @@ pnpm typecheck # Check TypeScript types
|
|
|
579
681
|
|
|
580
682
|
**Use before gates** to catch simple issues early. These are faster than full \`pnpm gates\`.`;
|
|
581
683
|
}
|
|
684
|
+
/**
|
|
685
|
+
* Generate Worktree Block Recovery section (WU-1134)
|
|
686
|
+
*
|
|
687
|
+
* Provides guidance for agents when they're blocked by the worktree hook.
|
|
688
|
+
* This happens when agents try to commit from main instead of the worktree.
|
|
689
|
+
*
|
|
690
|
+
* @param {string} worktreePath - Worktree path from WU YAML
|
|
691
|
+
* @returns {string} Worktree block recovery section
|
|
692
|
+
*/
|
|
693
|
+
export function generateWorktreeBlockRecoverySection(worktreePath) {
|
|
694
|
+
return `## When Blocked by Worktree Hook
|
|
695
|
+
|
|
696
|
+
If you encounter a "worktree required" or "commit blocked" error:
|
|
697
|
+
|
|
698
|
+
1. **Check existing worktrees**: \`git worktree list\`
|
|
699
|
+
2. **Navigate to the worktree**: \`cd ${worktreePath || 'worktrees/<lane>-wu-xxx'}\`
|
|
700
|
+
3. **Retry your operation** from within the worktree
|
|
701
|
+
4. **Use relative paths only** (never absolute paths like \`/home/...\`)
|
|
702
|
+
|
|
703
|
+
### Common Causes
|
|
704
|
+
|
|
705
|
+
- Running \`git commit\` from main checkout instead of worktree
|
|
706
|
+
- Using absolute paths that bypass worktree isolation
|
|
707
|
+
- Forgetting to \`cd\` to worktree after \`wu:claim\`
|
|
708
|
+
|
|
709
|
+
### Quick Fix
|
|
710
|
+
|
|
711
|
+
\`\`\`bash
|
|
712
|
+
# Check where you are
|
|
713
|
+
pwd
|
|
714
|
+
git worktree list
|
|
715
|
+
|
|
716
|
+
# Navigate to your worktree
|
|
717
|
+
cd ${worktreePath || 'worktrees/<lane>-wu-xxx'}
|
|
718
|
+
|
|
719
|
+
# Retry your commit
|
|
720
|
+
git add . && git commit -m "your message"
|
|
721
|
+
\`\`\``;
|
|
722
|
+
}
|
|
582
723
|
/**
|
|
583
724
|
* Generate Lane Selection section (WU-2107)
|
|
584
725
|
*
|
|
@@ -832,10 +973,12 @@ export function generateTaskInvocation(doc, id, strategy, options = {}) {
|
|
|
832
973
|
const codePaths = doc.code_paths || [];
|
|
833
974
|
const mandatoryAgents = detectMandatoryAgents(codePaths);
|
|
834
975
|
const preamble = generatePreamble(id, strategy);
|
|
835
|
-
|
|
976
|
+
// WU-1142: Use type-aware test guidance instead of hardcoded TDD directive
|
|
977
|
+
const testGuidance = generateTestGuidance(doc.type);
|
|
836
978
|
const clientContext = options.client;
|
|
837
979
|
const config = options.config || getConfig();
|
|
838
|
-
|
|
980
|
+
// WU-1142: Pass lane to get byLane skills
|
|
981
|
+
const clientSkillsGuidance = generateClientSkillsGuidance(clientContext, doc.lane);
|
|
839
982
|
const skillsSection = generateSkillsSelectionSection(doc, config, clientContext?.name) +
|
|
840
983
|
(clientSkillsGuidance ? `\n${clientSkillsGuidance}` : '');
|
|
841
984
|
const clientBlocks = generateClientBlocksSection(clientContext);
|
|
@@ -859,6 +1002,8 @@ export function generateTaskInvocation(doc, id, strategy, options = {}) {
|
|
|
859
1002
|
const laneSelection = generateLaneSelectionSection();
|
|
860
1003
|
// WU-2362: Worktree path guidance for sub-agents
|
|
861
1004
|
const worktreeGuidance = generateWorktreePathGuidance(doc.worktree_path);
|
|
1005
|
+
// WU-1134: Worktree block recovery guidance
|
|
1006
|
+
const worktreeBlockRecovery = generateWorktreeBlockRecoverySection(doc.worktree_path);
|
|
862
1007
|
// Generate thinking mode sections if applicable
|
|
863
1008
|
const executionModeSection = generateExecutionModeSection(options);
|
|
864
1009
|
const thinkToolGuidance = generateThinkToolGuidance(options);
|
|
@@ -868,14 +1013,15 @@ export function generateTaskInvocation(doc, id, strategy, options = {}) {
|
|
|
868
1013
|
.join('\n\n---\n\n');
|
|
869
1014
|
const thinkingBlock = thinkingSections ? `${thinkingSections}\n\n---\n\n` : '';
|
|
870
1015
|
// Build the task prompt
|
|
871
|
-
//
|
|
872
|
-
|
|
1016
|
+
// WU-1131: Warning banner at start, end sentinel after constraints
|
|
1017
|
+
// WU-1142: Type-aware test guidance (TDD for code, format-only for docs, etc.)
|
|
1018
|
+
const taskPrompt = `${TRUNCATION_WARNING_BANNER}<task>
|
|
873
1019
|
${preamble}
|
|
874
1020
|
</task>
|
|
875
1021
|
|
|
876
1022
|
---
|
|
877
1023
|
|
|
878
|
-
${
|
|
1024
|
+
${testGuidance}
|
|
879
1025
|
|
|
880
1026
|
---
|
|
881
1027
|
|
|
@@ -959,7 +1105,13 @@ ${laneGuidance}${laneGuidance ? '\n\n---\n\n' : ''}## Action
|
|
|
959
1105
|
|
|
960
1106
|
${generateActionSection(doc, id)}
|
|
961
1107
|
|
|
962
|
-
|
|
1108
|
+
---
|
|
1109
|
+
|
|
1110
|
+
${worktreeBlockRecovery}
|
|
1111
|
+
|
|
1112
|
+
${constraints}
|
|
1113
|
+
|
|
1114
|
+
${SPAWN_END_SENTINEL}`;
|
|
963
1115
|
// Escape special characters for XML output
|
|
964
1116
|
const escapedPrompt = taskPrompt
|
|
965
1117
|
.replace(/&/g, '&')
|
|
@@ -986,7 +1138,8 @@ export function generateCodexPrompt(doc, id, strategy, options = {}) {
|
|
|
986
1138
|
const codePaths = doc.code_paths || [];
|
|
987
1139
|
const mandatoryAgents = detectMandatoryAgents(codePaths);
|
|
988
1140
|
const preamble = generatePreamble(id, strategy);
|
|
989
|
-
|
|
1141
|
+
// WU-1142: Use type-aware test guidance instead of hardcoded TDD directive
|
|
1142
|
+
const testGuidance = generateTestGuidance(doc.type);
|
|
990
1143
|
const mandatorySection = generateMandatoryAgentSection(mandatoryAgents, id);
|
|
991
1144
|
const laneGuidance = generateLaneGuidance(doc.lane);
|
|
992
1145
|
const bugDiscoverySection = generateBugDiscoverySection(id);
|
|
@@ -995,7 +1148,8 @@ export function generateCodexPrompt(doc, id, strategy, options = {}) {
|
|
|
995
1148
|
const constraints = generateCodexConstraints(id);
|
|
996
1149
|
const clientContext = options.client;
|
|
997
1150
|
const config = options.config || getConfig();
|
|
998
|
-
|
|
1151
|
+
// WU-1142: Pass lane to get byLane skills
|
|
1152
|
+
const clientSkillsGuidance = generateClientSkillsGuidance(clientContext, doc.lane);
|
|
999
1153
|
const skillsSection = generateSkillsSelectionSection(doc, config, clientContext?.name) +
|
|
1000
1154
|
(clientSkillsGuidance ? `\n${clientSkillsGuidance}` : '');
|
|
1001
1155
|
const clientBlocks = generateClientBlocksSection(clientContext);
|
|
@@ -1005,9 +1159,13 @@ export function generateCodexPrompt(doc, id, strategy, options = {}) {
|
|
|
1005
1159
|
.filter((section) => section.length > 0)
|
|
1006
1160
|
.join('\n\n---\n\n');
|
|
1007
1161
|
const thinkingBlock = thinkingSections ? `${thinkingSections}\n\n---\n\n` : '';
|
|
1008
|
-
|
|
1162
|
+
// WU-1134: Worktree block recovery guidance
|
|
1163
|
+
const worktreeBlockRecovery = generateWorktreeBlockRecoverySection(doc.worktree_path);
|
|
1164
|
+
// WU-1131: Warning banner at start, end sentinel after constraints
|
|
1165
|
+
// WU-1142: Type-aware test guidance
|
|
1166
|
+
return `${TRUNCATION_WARNING_BANNER}# ${id}: ${doc.title || 'Untitled'}
|
|
1009
1167
|
|
|
1010
|
-
${
|
|
1168
|
+
${testGuidance}
|
|
1011
1169
|
|
|
1012
1170
|
---
|
|
1013
1171
|
|
|
@@ -1062,7 +1220,13 @@ ${mandatorySection}${implementationContext ? `${implementationContext}\n\n---\n\
|
|
|
1062
1220
|
|
|
1063
1221
|
---
|
|
1064
1222
|
|
|
1065
|
-
${laneGuidance}${laneGuidance ? '\n\n---\n\n' : ''}${
|
|
1223
|
+
${laneGuidance}${laneGuidance ? '\n\n---\n\n' : ''}${worktreeBlockRecovery}
|
|
1224
|
+
|
|
1225
|
+
---
|
|
1226
|
+
|
|
1227
|
+
${constraints}
|
|
1228
|
+
|
|
1229
|
+
${SPAWN_END_SENTINEL}
|
|
1066
1230
|
`;
|
|
1067
1231
|
}
|
|
1068
1232
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* WU Status Command
|
|
4
|
+
*
|
|
5
|
+
* WU-1090: Context-aware state machine for WU lifecycle commands
|
|
6
|
+
*
|
|
7
|
+
* Shows:
|
|
8
|
+
* - Current location (main checkout vs worktree)
|
|
9
|
+
* - WU state if in worktree or --id provided
|
|
10
|
+
* - Git state (branch, dirty, ahead/behind)
|
|
11
|
+
* - Valid commands for current context
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* pnpm wu:status # Auto-detect from current directory
|
|
15
|
+
* pnpm wu:status --id WU-123 # Show status for specific WU
|
|
16
|
+
*/
|
|
17
|
+
import type { WuContext } from '@lumenflow/core/dist/validation/types.js';
|
|
18
|
+
/**
|
|
19
|
+
* Format complete status output
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatStatusOutput(context: WuContext): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get exit code based on context state
|
|
24
|
+
*/
|
|
25
|
+
export declare function getStatusExitCode(context: WuContext): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* WU Unblock Helper
|
|
4
|
+
*
|
|
5
|
+
* Sequence (micro-worktree pattern):
|
|
6
|
+
* 1) Create micro-worktree from main
|
|
7
|
+
* 2) Auto-update WU YAML/backlog/status to In Progress in micro-worktree
|
|
8
|
+
* 3) Commit in micro-worktree, push directly to origin/main
|
|
9
|
+
* 4) Optionally create a fresh work worktree/branch (default: skip unless --create-worktree)
|
|
10
|
+
*
|
|
11
|
+
* Uses micro-worktree pattern to avoid pre-commit hook blocking commits to main.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* pnpm wu:unblock --id WU-334 [--reason "Dependency cleared"] [--create-worktree] [--worktree ...] [--branch ...] [--no-auto]
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* WU Unlock Lane Helper
|
|
4
|
+
*
|
|
5
|
+
* Provides a dedicated audited command for operators to safely clear lane locks.
|
|
6
|
+
*
|
|
7
|
+
* Safety-first approach:
|
|
8
|
+
* - Zombie locks (PID not running): Can be unlocked without --force
|
|
9
|
+
* - Stale locks (>24h old): Can be unlocked without --force
|
|
10
|
+
* - Active locks (recent, PID running): Require --force to unlock
|
|
11
|
+
*
|
|
12
|
+
* All unlocks require a --reason parameter for audit purposes.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* pnpm wu:unlock-lane --lane "Core" --reason "Process crashed"
|
|
16
|
+
* pnpm wu:unlock-lane --lane "Core" --reason "Emergency" --force
|
|
17
|
+
* pnpm wu:unlock-lane --list # List all current locks
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* WU Validation Tool
|
|
4
|
+
*
|
|
5
|
+
* Validates WU YAML files against schema and checks for quality warnings.
|
|
6
|
+
* Returns exit code 0 if valid (warnings are advisory, not blocking).
|
|
7
|
+
* Returns exit code 1 only for schema errors.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* pnpm wu:validate --id WU-123 # Validate specific WU
|
|
11
|
+
* pnpm wu:validate --all # Validate all WUs
|
|
12
|
+
* pnpm wu:validate --all --strict # Fail on warnings too
|
|
13
|
+
*
|
|
14
|
+
* @see {@link tools/lib/wu-schema.mjs} - Schema definitions
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumenflow/cli",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Command-line interface for LumenFlow workflow framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lumenflow",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"mem-checkpoint": "./dist/mem-checkpoint.js",
|
|
58
58
|
"mem-start": "./dist/mem-start.js",
|
|
59
59
|
"mem-ready": "./dist/mem-ready.js",
|
|
60
|
+
"mem-export": "./dist/mem-export.js",
|
|
60
61
|
"mem-signal": "./dist/mem-signal.js",
|
|
61
62
|
"mem-cleanup": "./dist/mem-cleanup.js",
|
|
62
63
|
"mem-create": "./dist/mem-create.js",
|
|
@@ -132,11 +133,11 @@
|
|
|
132
133
|
"pretty-ms": "^9.2.0",
|
|
133
134
|
"simple-git": "^3.30.0",
|
|
134
135
|
"yaml": "^2.8.2",
|
|
135
|
-
"@lumenflow/
|
|
136
|
-
"@lumenflow/
|
|
137
|
-
"@lumenflow/memory": "2.1
|
|
138
|
-
"@lumenflow/initiatives": "2.1
|
|
139
|
-
"@lumenflow/agent": "2.1
|
|
136
|
+
"@lumenflow/metrics": "2.2.1",
|
|
137
|
+
"@lumenflow/core": "2.2.1",
|
|
138
|
+
"@lumenflow/memory": "2.2.1",
|
|
139
|
+
"@lumenflow/initiatives": "2.2.1",
|
|
140
|
+
"@lumenflow/agent": "2.2.1"
|
|
140
141
|
},
|
|
141
142
|
"devDependencies": {
|
|
142
143
|
"@vitest/coverage-v8": "^4.0.17",
|