@lumenflow/cli 2.3.2 → 2.5.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/dist/__tests__/init-config-lanes.test.js +131 -0
- package/dist/__tests__/init-docs-structure.test.js +119 -0
- package/dist/__tests__/init-lane-inference.test.js +125 -0
- package/dist/__tests__/init-onboarding-docs.test.js +132 -0
- package/dist/__tests__/init-quick-ref.test.js +145 -0
- package/dist/__tests__/init-scripts.test.js +96 -0
- package/dist/__tests__/init-template-portability.test.js +97 -0
- package/dist/__tests__/init.test.js +199 -3
- package/dist/__tests__/initiative-add-wu.test.js +420 -0
- package/dist/__tests__/initiative-plan-replacement.test.js +162 -0
- package/dist/__tests__/initiative-remove-wu.test.js +458 -0
- package/dist/__tests__/onboarding-smoke-test.test.js +211 -0
- package/dist/__tests__/path-centralization-cli.test.js +234 -0
- package/dist/__tests__/plan-create.test.js +126 -0
- package/dist/__tests__/plan-edit.test.js +157 -0
- package/dist/__tests__/plan-link.test.js +239 -0
- package/dist/__tests__/plan-promote.test.js +181 -0
- package/dist/__tests__/wu-create-strict.test.js +118 -0
- package/dist/__tests__/wu-edit-strict.test.js +109 -0
- package/dist/__tests__/wu-validate-strict.test.js +113 -0
- package/dist/flow-bottlenecks.js +4 -2
- package/dist/flow-report.js +3 -2
- package/dist/gates.js +202 -2
- package/dist/init.js +720 -40
- package/dist/initiative-add-wu.js +112 -16
- package/dist/initiative-plan.js +3 -2
- package/dist/initiative-remove-wu.js +248 -0
- package/dist/mem-context.js +0 -0
- package/dist/metrics-snapshot.js +3 -2
- package/dist/onboarding-smoke-test.js +400 -0
- package/dist/plan-create.js +199 -0
- package/dist/plan-edit.js +235 -0
- package/dist/plan-link.js +233 -0
- package/dist/plan-promote.js +231 -0
- package/dist/rotate-progress.js +8 -5
- package/dist/spawn-list.js +4 -3
- package/dist/state-bootstrap.js +6 -4
- package/dist/state-doctor-fix.js +5 -4
- package/dist/state-doctor.js +32 -2
- package/dist/trace-gen.js +6 -3
- package/dist/wu-block.js +16 -5
- package/dist/wu-claim.js +15 -9
- package/dist/wu-create.js +50 -2
- package/dist/wu-deps.js +3 -1
- package/dist/wu-done.js +14 -5
- package/dist/wu-edit.js +35 -0
- package/dist/wu-infer-lane.js +3 -1
- package/dist/wu-spawn.js +8 -0
- package/dist/wu-unblock.js +34 -2
- package/dist/wu-validate.js +25 -17
- package/package.json +12 -6
- package/templates/core/AGENTS.md.template +2 -2
- package/dist/__tests__/init-plan.test.js +0 -340
- package/dist/agent-issues-query.d.ts +0 -16
- package/dist/agent-log-issue.d.ts +0 -10
- package/dist/agent-session-end.d.ts +0 -10
- package/dist/agent-session.d.ts +0 -10
- package/dist/backlog-prune.d.ts +0 -84
- package/dist/cli-entry-point.d.ts +0 -8
- package/dist/deps-add.d.ts +0 -91
- package/dist/deps-remove.d.ts +0 -17
- package/dist/docs-sync.d.ts +0 -50
- package/dist/file-delete.d.ts +0 -84
- package/dist/file-edit.d.ts +0 -82
- package/dist/file-read.d.ts +0 -92
- package/dist/file-write.d.ts +0 -90
- package/dist/flow-bottlenecks.d.ts +0 -16
- package/dist/flow-report.d.ts +0 -16
- package/dist/gates.d.ts +0 -94
- package/dist/git-branch.d.ts +0 -65
- package/dist/git-diff.d.ts +0 -58
- package/dist/git-log.d.ts +0 -69
- package/dist/git-status.d.ts +0 -58
- package/dist/guard-locked.d.ts +0 -62
- package/dist/guard-main-branch.d.ts +0 -50
- package/dist/guard-worktree-commit.d.ts +0 -59
- package/dist/index.d.ts +0 -10
- package/dist/init-plan.d.ts +0 -80
- package/dist/init-plan.js +0 -337
- package/dist/init.d.ts +0 -46
- package/dist/initiative-add-wu.d.ts +0 -22
- package/dist/initiative-bulk-assign-wus.d.ts +0 -16
- package/dist/initiative-create.d.ts +0 -28
- package/dist/initiative-edit.d.ts +0 -34
- package/dist/initiative-list.d.ts +0 -12
- package/dist/initiative-status.d.ts +0 -11
- package/dist/lumenflow-upgrade.d.ts +0 -103
- package/dist/mem-checkpoint.d.ts +0 -16
- package/dist/mem-cleanup.d.ts +0 -29
- package/dist/mem-create.d.ts +0 -17
- package/dist/mem-export.d.ts +0 -10
- package/dist/mem-inbox.d.ts +0 -35
- package/dist/mem-init.d.ts +0 -15
- package/dist/mem-ready.d.ts +0 -16
- package/dist/mem-signal.d.ts +0 -16
- package/dist/mem-start.d.ts +0 -16
- package/dist/mem-summarize.d.ts +0 -22
- package/dist/mem-triage.d.ts +0 -22
- package/dist/metrics-cli.d.ts +0 -90
- package/dist/metrics-snapshot.d.ts +0 -18
- package/dist/orchestrate-init-status.d.ts +0 -11
- package/dist/orchestrate-initiative.d.ts +0 -12
- package/dist/orchestrate-monitor.d.ts +0 -11
- package/dist/release.d.ts +0 -117
- package/dist/rotate-progress.d.ts +0 -48
- package/dist/session-coordinator.d.ts +0 -74
- package/dist/spawn-list.d.ts +0 -16
- package/dist/state-bootstrap.d.ts +0 -92
- package/dist/sync-templates.d.ts +0 -52
- package/dist/trace-gen.d.ts +0 -84
- package/dist/validate-agent-skills.d.ts +0 -50
- package/dist/validate-agent-sync.d.ts +0 -36
- package/dist/validate-backlog-sync.d.ts +0 -37
- package/dist/validate-skills-spec.d.ts +0 -40
- package/dist/validate.d.ts +0 -60
- package/dist/wu-block.d.ts +0 -16
- package/dist/wu-claim.d.ts +0 -74
- package/dist/wu-cleanup.d.ts +0 -35
- package/dist/wu-create.d.ts +0 -69
- package/dist/wu-delete.d.ts +0 -21
- package/dist/wu-deps.d.ts +0 -13
- package/dist/wu-done.d.ts +0 -225
- package/dist/wu-edit.d.ts +0 -63
- package/dist/wu-infer-lane.d.ts +0 -17
- package/dist/wu-preflight.d.ts +0 -47
- package/dist/wu-prune.d.ts +0 -16
- package/dist/wu-recover.d.ts +0 -37
- package/dist/wu-release.d.ts +0 -19
- package/dist/wu-repair.d.ts +0 -60
- package/dist/wu-spawn-completion.d.ts +0 -10
- package/dist/wu-spawn.d.ts +0 -192
- package/dist/wu-status.d.ts +0 -25
- package/dist/wu-unblock.d.ts +0 -16
- package/dist/wu-unlock-lane.d.ts +0 -19
- package/dist/wu-validate.d.ts +0 -16
package/dist/wu-spawn.d.ts
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Spawn Helper
|
|
4
|
-
*
|
|
5
|
-
* Generates ready-to-use Task tool invocations for sub-agent WU execution.
|
|
6
|
-
* Includes context loading preamble, skills selection guidance, and constraints block.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* pnpm wu:spawn --id WU-123
|
|
10
|
-
* pnpm wu:spawn --id WU-123 --codex
|
|
11
|
-
*
|
|
12
|
-
* Output:
|
|
13
|
-
* A complete Task tool invocation block with:
|
|
14
|
-
* - Context loading preamble (.claude/CLAUDE.md, README, lumenflow, WU YAML)
|
|
15
|
-
* - WU details and acceptance criteria
|
|
16
|
-
* - Skills Selection section (sub-agent reads catalogue and selects at runtime)
|
|
17
|
-
* - Mandatory agent advisory
|
|
18
|
-
* - Constraints block at end (Lost in the Middle research)
|
|
19
|
-
*
|
|
20
|
-
* Skills Selection:
|
|
21
|
-
* This command is AGENT-FACING. Unlike /wu-prompt (human-facing, skills selected
|
|
22
|
-
* at generation time), wu:spawn instructs the sub-agent to read the skill catalogue
|
|
23
|
-
* and select skills at execution time based on WU context.
|
|
24
|
-
*
|
|
25
|
-
* Codex Mode:
|
|
26
|
-
* When --codex is used, outputs a Codex/GPT-friendly Markdown prompt (no antml/XML escaping).
|
|
27
|
-
*
|
|
28
|
-
* @see {@link docs/04-operations/_frameworks/lumenflow/agent/onboarding/agent-invocation-guide.md} - Context loading templates
|
|
29
|
-
*/
|
|
30
|
-
import { getConfig } from '@lumenflow/core/dist/lumenflow-config.js';
|
|
31
|
-
import type { ClientConfig } from '@lumenflow/core/dist/lumenflow-config-schema.js';
|
|
32
|
-
/**
|
|
33
|
-
* WU-1131: Truncation prevention constants
|
|
34
|
-
*
|
|
35
|
-
* These constants help detect when spawn output has been truncated during
|
|
36
|
-
* copy-paste operations or context loading. The warning banner alerts users
|
|
37
|
-
* to the truncation risk, and the end sentinel allows verification that
|
|
38
|
-
* the full output was received.
|
|
39
|
-
*/
|
|
40
|
-
export declare const TRUNCATION_WARNING_BANNER = "<!-- LUMENFLOW_TRUNCATION_WARNING -->\n<!--\n \u26A0\uFE0F CRITICAL: DO NOT TRUNCATE THIS OUTPUT\n\n This spawn prompt MUST be copied verbatim. Truncation causes:\n - Missing constraints (agents ignore safety rules)\n - Missing TDD directives (agents skip tests)\n - Degraded agent performance\n\n VERIFICATION: The output MUST end with: <!-- LUMENFLOW_SPAWN_END -->\n If you don't see that sentinel at the end, the output was truncated.\n-->\n";
|
|
41
|
-
export declare const SPAWN_END_SENTINEL = "<!-- LUMENFLOW_SPAWN_END -->";
|
|
42
|
-
/**
|
|
43
|
-
* Generate effort scaling rules section (WU-1986)
|
|
44
|
-
*
|
|
45
|
-
* Based on Anthropic multi-agent research: helps agents decide when to
|
|
46
|
-
* spawn sub-agents vs handle inline.
|
|
47
|
-
*
|
|
48
|
-
* @returns {string} Effort scaling section
|
|
49
|
-
*/
|
|
50
|
-
export declare function generateEffortScalingRules(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Generate parallel tool call guidance (WU-1986)
|
|
53
|
-
*
|
|
54
|
-
* Based on Anthropic research: 3+ parallel tool calls significantly improve performance.
|
|
55
|
-
*
|
|
56
|
-
* @returns {string} Parallel tool call guidance
|
|
57
|
-
*/
|
|
58
|
-
export declare function generateParallelToolCallGuidance(): string;
|
|
59
|
-
/**
|
|
60
|
-
* Generate iterative search heuristics (WU-1986)
|
|
61
|
-
*
|
|
62
|
-
* Based on Anthropic research: start broad, narrow focus.
|
|
63
|
-
*
|
|
64
|
-
* @returns {string} Search heuristics section
|
|
65
|
-
*/
|
|
66
|
-
export declare function generateIterativeSearchHeuristics(): string;
|
|
67
|
-
/**
|
|
68
|
-
* Generate token budget awareness section (WU-1986)
|
|
69
|
-
*
|
|
70
|
-
* @param {string} id - WU ID
|
|
71
|
-
* @returns {string} Token budget section
|
|
72
|
-
*/
|
|
73
|
-
export declare function generateTokenBudgetAwareness(id: any): string;
|
|
74
|
-
/**
|
|
75
|
-
* Generate structured completion format (WU-1986)
|
|
76
|
-
*
|
|
77
|
-
* @param {string} id - WU ID
|
|
78
|
-
* @returns {string} Completion format section
|
|
79
|
-
*/
|
|
80
|
-
export declare function generateCompletionFormat(_id: any): string;
|
|
81
|
-
/**
|
|
82
|
-
* Generate agent coordination section (WU-1987)
|
|
83
|
-
*
|
|
84
|
-
* Provides guidance on mem:signal for parallel agent coordination,
|
|
85
|
-
* orchestrate:status for dashboard checks, and abandoned WU handling.
|
|
86
|
-
*
|
|
87
|
-
* @param {string} id - WU ID
|
|
88
|
-
* @returns {string} Agent coordination section
|
|
89
|
-
*/
|
|
90
|
-
export declare function generateAgentCoordinationSection(id: any): string;
|
|
91
|
-
/**
|
|
92
|
-
* Generate quick fix commands section (WU-1987)
|
|
93
|
-
*
|
|
94
|
-
* Provides format/lint/typecheck commands for quick fixes before gates.
|
|
95
|
-
*
|
|
96
|
-
* @returns {string} Quick fix commands section
|
|
97
|
-
*/
|
|
98
|
-
export declare function generateQuickFixCommands(): string;
|
|
99
|
-
/**
|
|
100
|
-
* Generate Lane Selection section (WU-2107)
|
|
101
|
-
*
|
|
102
|
-
* Provides guidance on lane selection when creating new WUs.
|
|
103
|
-
* Points agents to wu:infer-lane for automated lane suggestions.
|
|
104
|
-
*
|
|
105
|
-
* @returns {string} Lane Selection section
|
|
106
|
-
*/
|
|
107
|
-
export declare function generateLaneSelectionSection(): string;
|
|
108
|
-
/**
|
|
109
|
-
* Generate Worktree Path Guidance section (WU-2362)
|
|
110
|
-
*
|
|
111
|
-
* Provides guidance for sub-agents on working within worktrees, including
|
|
112
|
-
* how to determine the worktree root and where to create stamps.
|
|
113
|
-
*
|
|
114
|
-
* Problem: CLAUDE_PROJECT_DIR is hook-only; sub-agents inherit parent cwd (main).
|
|
115
|
-
* Solution: Use git rev-parse --show-toplevel to determine actual worktree root.
|
|
116
|
-
*
|
|
117
|
-
* @param {string|undefined} worktreePath - Worktree path from WU YAML
|
|
118
|
-
* @returns {string} Worktree path guidance section
|
|
119
|
-
*/
|
|
120
|
-
export declare function generateWorktreePathGuidance(worktreePath: any): string;
|
|
121
|
-
/**
|
|
122
|
-
* Generate the Action section based on WU claim status (WU-1745).
|
|
123
|
-
*
|
|
124
|
-
* If WU is already claimed (has claimed_at and worktree_path), tells agent
|
|
125
|
-
* to continue in the existing worktree.
|
|
126
|
-
*
|
|
127
|
-
* If WU is unclaimed (status: ready), tells agent to run wu:claim first.
|
|
128
|
-
*
|
|
129
|
-
* @param {object} doc - WU YAML document
|
|
130
|
-
* @param {string} id - WU ID
|
|
131
|
-
* @returns {string} Action section content
|
|
132
|
-
*/
|
|
133
|
-
export declare function generateActionSection(doc: any, id: any): string;
|
|
134
|
-
/**
|
|
135
|
-
* Generate the Completion Workflow section for sub-agents (WU-2682).
|
|
136
|
-
*
|
|
137
|
-
* Explicitly instructs sub-agents to run wu:done autonomously after gates pass.
|
|
138
|
-
* This prevents agents from asking permission instead of completing.
|
|
139
|
-
*
|
|
140
|
-
* @param {string} id - WU ID
|
|
141
|
-
* @returns {string} Completion Workflow section
|
|
142
|
-
*/
|
|
143
|
-
export declare function generateCompletionWorkflowSection(id: string): string;
|
|
144
|
-
interface ClientContext {
|
|
145
|
-
name: string;
|
|
146
|
-
config?: ClientConfig;
|
|
147
|
-
}
|
|
148
|
-
interface SpawnOptions {
|
|
149
|
-
thinking?: boolean;
|
|
150
|
-
noThinking?: boolean;
|
|
151
|
-
budget?: string;
|
|
152
|
-
client?: ClientContext;
|
|
153
|
-
config?: ReturnType<typeof getConfig>;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Generate the complete Task tool invocation
|
|
157
|
-
*
|
|
158
|
-
* @param {object} doc - WU YAML document
|
|
159
|
-
* @param {string} id - WU ID
|
|
160
|
-
* @param {SpawnStrategy} strategy - Client strategy
|
|
161
|
-
* @param {object} [options={}] - Thinking mode options
|
|
162
|
-
* @param {boolean} [options.thinking] - Whether extended thinking is enabled
|
|
163
|
-
* @param {boolean} [options.noThinking] - Whether thinking is explicitly disabled
|
|
164
|
-
* @param {string} [options.budget] - Token budget for thinking
|
|
165
|
-
* @returns {string} Complete Task tool invocation
|
|
166
|
-
*/
|
|
167
|
-
export declare function generateTaskInvocation(doc: any, id: any, strategy: any, options?: SpawnOptions): string;
|
|
168
|
-
export declare function generateCodexPrompt(doc: any, id: any, strategy: any, options?: SpawnOptions): string;
|
|
169
|
-
/**
|
|
170
|
-
* WU-1603: Check if a lane is currently occupied by another WU
|
|
171
|
-
*
|
|
172
|
-
* @param {string} lane - Lane name (e.g., "Operations: Tooling")
|
|
173
|
-
* @returns {import('@lumenflow/core/dist/lane-lock.js').LockMetadata|null} Lock metadata if occupied, null otherwise
|
|
174
|
-
*/
|
|
175
|
-
export declare function checkLaneOccupation(lane: any): import("@lumenflow/core/dist/lane-lock.js").LockMetadata;
|
|
176
|
-
/**
|
|
177
|
-
* WU-1603: Generate a warning message when lane is occupied
|
|
178
|
-
*
|
|
179
|
-
* @param {import('@lumenflow/core/dist/lane-lock.js').LockMetadata} lockMetadata - Lock metadata
|
|
180
|
-
* @param {string} targetWuId - WU ID being spawned
|
|
181
|
-
* @param {Object} [options={}] - Options
|
|
182
|
-
* @param {boolean} [options.isStale] - Whether the lock is stale (>24h old)
|
|
183
|
-
* @returns {string} Warning message
|
|
184
|
-
*/
|
|
185
|
-
interface LaneOccupationOptions {
|
|
186
|
-
isStale?: boolean;
|
|
187
|
-
}
|
|
188
|
-
export declare function generateLaneOccupationWarning(lockMetadata: {
|
|
189
|
-
lane: string;
|
|
190
|
-
wuId: string;
|
|
191
|
-
}, targetWuId: string, options?: LaneOccupationOptions): string;
|
|
192
|
-
export {};
|
package/dist/wu-status.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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;
|
package/dist/wu-unblock.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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 {};
|
package/dist/wu-unlock-lane.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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 {};
|
package/dist/wu-validate.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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 {};
|