@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-done.d.ts
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Done Helper
|
|
4
|
-
*
|
|
5
|
-
* Canonical sequence (Worktree mode - DEFAULT):
|
|
6
|
-
* 1) Run gates in lane worktree (validates the change, not just main)
|
|
7
|
-
* 2) Pre-flight validation: run ALL pre-commit hooks before merge (prevents partial completion)
|
|
8
|
-
* 3) cd into worktree
|
|
9
|
-
* 4) Auto-update WU YAML/backlog/status to Done in worktree (unless --no-auto)
|
|
10
|
-
* 5) Create `.lumenflow/stamps/WU-{id}.done` in worktree
|
|
11
|
-
* 6) Validate staged files against whitelist
|
|
12
|
-
* 7) Commit metadata changes in worktree (on lane branch)
|
|
13
|
-
* 8) cd back to main
|
|
14
|
-
* 9) Merge lane branch to main with --ff-only (metadata + code merged atomically)
|
|
15
|
-
* 10) Push to `main`
|
|
16
|
-
* 11) Remove the associated worktree (unless --no-remove)
|
|
17
|
-
* 12) Optionally delete the lane branch (with --delete-branch)
|
|
18
|
-
* 13) Emit telemetry to .lumenflow/flow.log
|
|
19
|
-
*
|
|
20
|
-
* Canonical sequence (Branch-Only mode - LEGACY):
|
|
21
|
-
* 1) Run gates on lane branch (in main checkout)
|
|
22
|
-
* 2) Pre-flight validation
|
|
23
|
-
* 3) Merge lane branch to main
|
|
24
|
-
* 4) Update metadata on main
|
|
25
|
-
* 5) Commit and push
|
|
26
|
-
* 6) Delete lane branch
|
|
27
|
-
*
|
|
28
|
-
* Usage:
|
|
29
|
-
* pnpm wu:done --id WU-334 [--worktree worktrees/intelligence-wu-334] [--no-auto] [--no-remove] [--no-merge] [--delete-branch]
|
|
30
|
-
*
|
|
31
|
-
* WU-2542: This script imports utilities from @lumenflow/core package.
|
|
32
|
-
* Full migration to thin shim pending @lumenflow/core CLI export implementation.
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* WU-1999: Print exposure validation warnings.
|
|
36
|
-
*
|
|
37
|
-
* Validates exposure field and UI pairing for user-facing WUs.
|
|
38
|
-
* Non-blocking - logs warnings but doesn't prevent completion.
|
|
39
|
-
*
|
|
40
|
-
* Checks:
|
|
41
|
-
* - exposure field is present (warn if missing)
|
|
42
|
-
* - If exposure=api, warns if no ui_pairing_wus specified
|
|
43
|
-
* - If exposure=api, checks acceptance criteria for UI verification mention
|
|
44
|
-
* - If exposure=ui, recommends user_journey field if not present
|
|
45
|
-
*
|
|
46
|
-
* @param {object} wu - WU YAML document
|
|
47
|
-
* @param {object} options - Validation options
|
|
48
|
-
* @param {boolean} [options.skipExposureCheck=false] - Skip all exposure validation
|
|
49
|
-
* @returns {void}
|
|
50
|
-
*/
|
|
51
|
-
interface ExposureOptions {
|
|
52
|
-
skipExposureCheck?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export declare function printExposureWarnings(wu: Record<string, unknown>, options?: ExposureOptions): void;
|
|
55
|
-
/**
|
|
56
|
-
* WU-2022: Validate feature accessibility for UI-exposed WUs.
|
|
57
|
-
*
|
|
58
|
-
* BLOCKING validation - prevents wu:done if exposure=ui but feature is not accessible.
|
|
59
|
-
* This prevents "orphaned code" where UI features exist but users cannot navigate to them.
|
|
60
|
-
*
|
|
61
|
-
* Accessibility is verified by ANY of:
|
|
62
|
-
* 1. navigation_path field is specified (explicit route)
|
|
63
|
-
* 2. code_paths includes a page.tsx file (Next.js page)
|
|
64
|
-
* 3. tests.manual includes navigation/accessibility verification
|
|
65
|
-
*
|
|
66
|
-
* @param {object} wu - WU YAML document
|
|
67
|
-
* @param {object} options - Validation options
|
|
68
|
-
* @param {boolean} [options.skipAccessibilityCheck=false] - Skip accessibility validation
|
|
69
|
-
* @returns {void} Calls die() if validation fails
|
|
70
|
-
*/
|
|
71
|
-
interface AccessibilityOptions {
|
|
72
|
-
skipAccessibilityCheck?: boolean;
|
|
73
|
-
}
|
|
74
|
-
export declare function validateAccessibilityOrDie(wu: Record<string, unknown>, options?: AccessibilityOptions): void;
|
|
75
|
-
/**
|
|
76
|
-
* WU-1012: Validate --docs-only flag usage.
|
|
77
|
-
*
|
|
78
|
-
* The --docs-only flag can only be used when the WU is documentation-focused:
|
|
79
|
-
* 1. exposure field is 'documentation'
|
|
80
|
-
* 2. OR all code_paths are documentation paths (docs/, ai/, .claude/, *.md)
|
|
81
|
-
* 3. OR type is 'documentation'
|
|
82
|
-
*
|
|
83
|
-
* @param {object} wu - WU YAML document
|
|
84
|
-
* @param {object} args - Parsed CLI arguments
|
|
85
|
-
* @param {boolean} args.docsOnly - Whether --docs-only flag was passed
|
|
86
|
-
* @returns {{ valid: boolean, errors: string[] }} Validation result
|
|
87
|
-
*/
|
|
88
|
-
interface DocsOnlyArgs {
|
|
89
|
-
docsOnly?: boolean;
|
|
90
|
-
}
|
|
91
|
-
export declare function validateDocsOnlyFlag(wu: Record<string, unknown>, args: DocsOnlyArgs): {
|
|
92
|
-
valid: boolean;
|
|
93
|
-
errors: string[];
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* WU-1012: Build gates command with --docs-only flag support.
|
|
97
|
-
*
|
|
98
|
-
* Returns the appropriate gates command based on:
|
|
99
|
-
* - Explicit --docs-only flag from CLI
|
|
100
|
-
* - Auto-detected isDocsOnly from code_paths analysis
|
|
101
|
-
*
|
|
102
|
-
* @param {object} options - Build options
|
|
103
|
-
* @param {boolean} options.docsOnly - Explicit --docs-only flag from CLI
|
|
104
|
-
* @param {boolean} options.isDocsOnly - Auto-detected docs-only from code_paths
|
|
105
|
-
* @returns {string} Gates command string
|
|
106
|
-
*/
|
|
107
|
-
interface BuildGatesOptions {
|
|
108
|
-
docsOnly?: boolean;
|
|
109
|
-
isDocsOnly?: boolean;
|
|
110
|
-
}
|
|
111
|
-
export declare function buildGatesCommand(options: BuildGatesOptions): string;
|
|
112
|
-
/**
|
|
113
|
-
* WU-1946: Update spawn registry on WU completion.
|
|
114
|
-
* Non-blocking wrapper - failures logged as warnings.
|
|
115
|
-
*
|
|
116
|
-
* When a WU is completed via wu:done, this function updates the spawn registry
|
|
117
|
-
* to mark the spawned entry as completed (if one exists). This allows orchestrators
|
|
118
|
-
* to track sub-agent spawn completion status.
|
|
119
|
-
*
|
|
120
|
-
* Gracefully skips if:
|
|
121
|
-
* - No spawn entry found for this WU (legacy WU created before registry)
|
|
122
|
-
* - Registry file doesn't exist
|
|
123
|
-
* - Any error during update
|
|
124
|
-
*
|
|
125
|
-
* @param {string} id - WU ID being completed
|
|
126
|
-
* @param {string} baseDir - Base directory containing .lumenflow/state/
|
|
127
|
-
* @returns {Promise<void>}
|
|
128
|
-
*/
|
|
129
|
-
export declare function updateSpawnRegistryOnCompletion(id: any, baseDir?: string): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* WU-1234: Normalize username for ownership comparison
|
|
132
|
-
* Extracts username from email address for comparison.
|
|
133
|
-
* This allows tom@hellm.ai to match 'tom' assigned_to field.
|
|
134
|
-
*
|
|
135
|
-
* @param {string|null|undefined} value - Email address or username
|
|
136
|
-
* @returns {string} Normalized username (lowercase)
|
|
137
|
-
*/
|
|
138
|
-
export declare function normalizeUsername(value: any): string;
|
|
139
|
-
/**
|
|
140
|
-
* WU-1234: Detect if branch is already merged to main
|
|
141
|
-
* Checks if branch tip is an ancestor of main HEAD (i.e., already merged).
|
|
142
|
-
* This prevents merge loops when code was merged via emergency fix or manual merge.
|
|
143
|
-
*
|
|
144
|
-
* @param {string} branch - Lane branch name
|
|
145
|
-
* @returns {Promise<boolean>} True if branch is already merged to main
|
|
146
|
-
*/
|
|
147
|
-
export declare function isBranchAlreadyMerged(branch: any): Promise<boolean>;
|
|
148
|
-
export { shouldSkipWebTests as isDocsOnlyByPaths } from '@lumenflow/core/dist/path-classifiers.js';
|
|
149
|
-
/**
|
|
150
|
-
* WU-1234: Pre-flight check for backlog state consistency
|
|
151
|
-
* Fails fast if the WU appears in both Done and In Progress sections.
|
|
152
|
-
*
|
|
153
|
-
* @param {string} id - WU ID to check
|
|
154
|
-
* @param {string} backlogPath - Path to backlog.md
|
|
155
|
-
* @returns {{ valid: boolean, error: string|null }}
|
|
156
|
-
*/
|
|
157
|
-
export declare function checkBacklogConsistencyForWU(id: any, backlogPath: any): {
|
|
158
|
-
valid: boolean;
|
|
159
|
-
error: string;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* WU-1084: Check for uncommitted changes on main after merge completes.
|
|
163
|
-
*
|
|
164
|
-
* This catches cases where pnpm format (or other tooling) touched files
|
|
165
|
-
* outside the WU's code_paths during worktree work. These changes survive
|
|
166
|
-
* the merge and would be silently left behind when the worktree is removed.
|
|
167
|
-
*
|
|
168
|
-
* @param gitStatus - Output from git status (porcelain format)
|
|
169
|
-
* @param wuId - The WU ID for error messaging
|
|
170
|
-
* @returns Object with isDirty flag and optional error message
|
|
171
|
-
*/
|
|
172
|
-
export declare function checkPostMergeDirtyState(gitStatus: string, wuId: string): {
|
|
173
|
-
isDirty: boolean;
|
|
174
|
-
error?: string;
|
|
175
|
-
};
|
|
176
|
-
export declare function emitTelemetry(event: any): void;
|
|
177
|
-
/**
|
|
178
|
-
* Print State HUD for visibility
|
|
179
|
-
* Extracted from main() to reduce complexity (WU-1215 Phase 2 Extraction #4)
|
|
180
|
-
* @param {object} params - Parameters
|
|
181
|
-
* @param {string} params.id - WU ID
|
|
182
|
-
* @param {object} params.docMain - Main WU YAML document
|
|
183
|
-
* @param {boolean} params.isBranchOnly - Whether in branch-only mode
|
|
184
|
-
* @param {boolean} params.isDocsOnly - Whether this is a docs-only WU
|
|
185
|
-
* @param {string|null} params.derivedWorktree - Derived worktree path
|
|
186
|
-
* @param {string} params.STAMPS_DIR - Stamps directory path
|
|
187
|
-
*/
|
|
188
|
-
export declare function computeBranchOnlyFallback({ isBranchOnly, branchOnlyRequested, worktreeExists, derivedWorktree, }: {
|
|
189
|
-
isBranchOnly: boolean;
|
|
190
|
-
branchOnlyRequested: boolean | undefined;
|
|
191
|
-
worktreeExists: boolean;
|
|
192
|
-
derivedWorktree: string | null;
|
|
193
|
-
}): {
|
|
194
|
-
allowFallback: boolean;
|
|
195
|
-
effectiveBranchOnly: boolean;
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* WU-1983: Print migration deployment nudge when WU includes supabase changes.
|
|
199
|
-
* Notifies agent to deploy new migrations to production via MCP tools.
|
|
200
|
-
* Conditional output - only prints when migrations are in scope and new migrations exist.
|
|
201
|
-
*
|
|
202
|
-
* @param {string[]} codePaths - WU code_paths array
|
|
203
|
-
* @param {string} baseDir - Base directory for migration discovery
|
|
204
|
-
* @returns {Promise<void>}
|
|
205
|
-
*/
|
|
206
|
-
export declare function printMigrationDeploymentNudge(codePaths: any, baseDir: any): Promise<void>;
|
|
207
|
-
/**
|
|
208
|
-
* WU-1763: Print discovery summary nudge when discoveries exist for this WU.
|
|
209
|
-
* Conditional output - only prints when discoveryCount > 0.
|
|
210
|
-
* Non-blocking, single-line output to avoid flooding the console.
|
|
211
|
-
*
|
|
212
|
-
* @param {string} id - WU ID being completed
|
|
213
|
-
* @param {number} discoveryCount - Number of open discoveries for this WU
|
|
214
|
-
* @param {string[]} discoveryIds - List of discovery IDs (limited to 5 in output)
|
|
215
|
-
*/
|
|
216
|
-
export declare function printDiscoveryNudge(id: any, discoveryCount: any, discoveryIds: any): void;
|
|
217
|
-
/**
|
|
218
|
-
* WU-1763: Print documentation validation nudge when docs changed.
|
|
219
|
-
* Conditional output - only prints when changedDocPaths.length > 0.
|
|
220
|
-
* Non-blocking, single-line output to avoid flooding the console.
|
|
221
|
-
*
|
|
222
|
-
* @param {string} id - WU ID being completed
|
|
223
|
-
* @param {string[]} changedDocPaths - List of documentation paths that changed
|
|
224
|
-
*/
|
|
225
|
-
export declare function printDocValidationNudge(id: any, changedDocPaths: any): void;
|
package/dist/wu-edit.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Edit Helper
|
|
4
|
-
*
|
|
5
|
-
* Race-safe WU spec editing using micro-worktree isolation (WU-1274).
|
|
6
|
-
*
|
|
7
|
-
* Enables editing WU YAML files without claiming the WU, perfect for:
|
|
8
|
-
* - Filling in placeholder content after wu:create
|
|
9
|
-
* - Updating description/acceptance criteria
|
|
10
|
-
* - Adding code_paths, notes, or other spec fields
|
|
11
|
-
*
|
|
12
|
-
* Uses the same micro-worktree pattern as wu:create (WU-1262):
|
|
13
|
-
* 1) Validate inputs (WU exists, status is ready)
|
|
14
|
-
* 2) Ensure main is clean and up-to-date with origin
|
|
15
|
-
* 3) Create temp branch WITHOUT switching (main checkout stays on main)
|
|
16
|
-
* 4) Create micro-worktree in /tmp pointing to temp branch
|
|
17
|
-
* 5) Apply edits in micro-worktree
|
|
18
|
-
* 6) Commit, ff-only merge, push
|
|
19
|
-
* 7) Cleanup temp branch and micro-worktree
|
|
20
|
-
*
|
|
21
|
-
* Usage:
|
|
22
|
-
* pnpm wu:edit --id WU-123 --spec-file /path/to/spec.yaml
|
|
23
|
-
* pnpm wu:edit --id WU-123 --description "New description text"
|
|
24
|
-
* pnpm wu:edit --id WU-123 --acceptance "Criterion 1" --acceptance "Criterion 2"
|
|
25
|
-
*
|
|
26
|
-
* Part of WU-1274: Add wu:edit command for spec-only changes
|
|
27
|
-
* @see {@link tools/lib/micro-worktree.mjs} - Shared micro-worktree logic
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* WU-1039: Validate which edits are allowed on done WUs
|
|
31
|
-
*
|
|
32
|
-
* Done WUs only allow metadata reassignment: initiative, phase, and exposure.
|
|
33
|
-
* All other edits are blocked to preserve WU immutability after completion.
|
|
34
|
-
*
|
|
35
|
-
* @param opts - Parsed CLI options
|
|
36
|
-
* @returns { valid: boolean, disallowedEdits: string[] }
|
|
37
|
-
*/
|
|
38
|
-
export declare function validateDoneWUEdits(opts: Record<string, unknown>): {
|
|
39
|
-
valid: boolean;
|
|
40
|
-
disallowedEdits: string[];
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* WU-1039: Validate exposure value against schema
|
|
44
|
-
*
|
|
45
|
-
* Uses WU_EXPOSURE_VALUES from core constants (Library-First, no magic strings).
|
|
46
|
-
*
|
|
47
|
-
* @param exposure - Exposure value to validate
|
|
48
|
-
* @returns { valid: boolean, error?: string }
|
|
49
|
-
*/
|
|
50
|
-
export declare function validateExposureValue(exposure: string): {
|
|
51
|
-
valid: boolean;
|
|
52
|
-
error?: string;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* WU-1039: Apply exposure edit to WU object
|
|
56
|
-
*
|
|
57
|
-
* Returns a new WU object with updated exposure (immutable pattern).
|
|
58
|
-
*
|
|
59
|
-
* @param wu - Original WU object
|
|
60
|
-
* @param exposure - New exposure value
|
|
61
|
-
* @returns Updated WU object (does not mutate original)
|
|
62
|
-
*/
|
|
63
|
-
export declare function applyExposureEdit(wu: Record<string, unknown>, exposure: string): Record<string, unknown>;
|
package/dist/wu-infer-lane.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Lane Inference CLI (WU-908)
|
|
4
|
-
*
|
|
5
|
-
* Suggests sub-lane for a WU based on code paths and description.
|
|
6
|
-
* Wrapper around lib/lane-inference.mjs for standalone CLI usage.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* # Infer from existing WU
|
|
10
|
-
* node tools/wu-infer-lane.mjs --id WU-123
|
|
11
|
-
*
|
|
12
|
-
* # Infer from manual inputs
|
|
13
|
-
* node tools/wu-infer-lane.mjs --paths "tools/**" "docs/**" --desc "Tooling improvements"
|
|
14
|
-
*
|
|
15
|
-
* Returns suggested lane and confidence score (0-100).
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
package/dist/wu-preflight.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Preflight Validation
|
|
4
|
-
*
|
|
5
|
-
* WU-1803: Fast validation of code_paths and test paths before gates run.
|
|
6
|
-
* Completes in under 5 seconds vs 2+ minutes for full gates.
|
|
7
|
-
*
|
|
8
|
-
* This catches YAML mismatches early, preventing wasted time running full
|
|
9
|
-
* gates only to fail on code_paths validation at the end of wu:done.
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* pnpm wu:preflight --id WU-1803 # Validate from main checkout
|
|
13
|
-
* pnpm wu:preflight --id WU-1803 --worktree worktrees/operations-gates-wu-1803
|
|
14
|
-
*
|
|
15
|
-
* Validates:
|
|
16
|
-
* - code_paths files exist
|
|
17
|
-
* - test file paths exist (unit, e2e, integration)
|
|
18
|
-
* - WU YAML schema is valid
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Parse command-line arguments
|
|
22
|
-
* @param {string[]} argv - Process arguments
|
|
23
|
-
* @returns {object} Parsed arguments
|
|
24
|
-
*/
|
|
25
|
-
declare function parseArgs(argv: any): {
|
|
26
|
-
help: boolean;
|
|
27
|
-
error?: undefined;
|
|
28
|
-
id?: undefined;
|
|
29
|
-
worktree?: undefined;
|
|
30
|
-
} | {
|
|
31
|
-
error: string;
|
|
32
|
-
help?: undefined;
|
|
33
|
-
id?: undefined;
|
|
34
|
-
worktree?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
id: any;
|
|
37
|
-
worktree: any;
|
|
38
|
-
help: boolean;
|
|
39
|
-
error?: undefined;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Detect worktree path from WU YAML or calculate from lane
|
|
43
|
-
* @param {string} id - WU ID
|
|
44
|
-
* @returns {string|null} Worktree path or null if not found
|
|
45
|
-
*/
|
|
46
|
-
declare function detectWorktreePath(id: any): string;
|
|
47
|
-
export { parseArgs, detectWorktreePath };
|
package/dist/wu-prune.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Prune Utility
|
|
4
|
-
*
|
|
5
|
-
* Maintains worktree hygiene by:
|
|
6
|
-
* - Running git worktree prune to clean stale metadata
|
|
7
|
-
* - Validating worktree ↔ WU ↔ lane mappings
|
|
8
|
-
* - Warning on orphaned worktrees (no matching WU YAML)
|
|
9
|
-
* - Warning on stale worktrees (WU status is done/blocked)
|
|
10
|
-
* - Warning on invalid branch naming conventions
|
|
11
|
-
*
|
|
12
|
-
* Usage:
|
|
13
|
-
* pnpm wu:prune # Dry-run mode (shows what would be done)
|
|
14
|
-
* pnpm wu:prune --execute # Actually run cleanup
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
package/dist/wu-recover.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Recovery Command
|
|
4
|
-
*
|
|
5
|
-
* WU-1090: Context-aware state machine for WU lifecycle commands
|
|
6
|
-
*
|
|
7
|
-
* Analyzes WU state inconsistencies and offers recovery actions:
|
|
8
|
-
* - resume: Reconcile state and continue working (preserves work)
|
|
9
|
-
* - reset: Discard worktree and reset WU to ready
|
|
10
|
-
* - nuke: Remove all artifacts completely (requires --force)
|
|
11
|
-
* - cleanup: Remove leftover worktree for done WUs
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* pnpm wu:recover --id WU-123 # Analyze issues
|
|
15
|
-
* pnpm wu:recover --id WU-123 --action resume # Apply fix
|
|
16
|
-
* pnpm wu:recover --id WU-123 --action nuke --force # Destructive
|
|
17
|
-
*/
|
|
18
|
-
import { type RecoveryAnalysis } from '@lumenflow/core/dist/recovery/recovery-analyzer.js';
|
|
19
|
-
/**
|
|
20
|
-
* Check if action requires --force flag
|
|
21
|
-
*/
|
|
22
|
-
export declare function requiresForceFlag(action: string): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Validate recovery action
|
|
25
|
-
*/
|
|
26
|
-
export declare function validateRecoveryAction(action: string): {
|
|
27
|
-
valid: boolean;
|
|
28
|
-
error?: string;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Format recovery analysis output
|
|
32
|
-
*/
|
|
33
|
-
export declare function formatRecoveryOutput(analysis: RecoveryAnalysis): string;
|
|
34
|
-
/**
|
|
35
|
-
* Get exit code for recovery command
|
|
36
|
-
*/
|
|
37
|
-
export declare function getRecoveryExitCode(analysis: RecoveryAnalysis, actionFailed: boolean): number;
|
package/dist/wu-release.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU Release Command (WU-1080)
|
|
4
|
-
*
|
|
5
|
-
* Releases an orphaned WU from in_progress back to ready state.
|
|
6
|
-
* Use when an agent is interrupted mid-WU and the WU needs to be reclaimed.
|
|
7
|
-
*
|
|
8
|
-
* Sequence (micro-worktree pattern):
|
|
9
|
-
* 1) Validate WU is in_progress
|
|
10
|
-
* 2) Create micro-worktree from main
|
|
11
|
-
* 3) Append release event to state store
|
|
12
|
-
* 4) Regenerate backlog.md and status.md
|
|
13
|
-
* 5) Commit in micro-worktree, push directly to origin/main
|
|
14
|
-
* 6) Optionally remove the work worktree
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
* pnpm wu:release --id WU-1080 --reason "Agent interrupted"
|
|
18
|
-
*/
|
|
19
|
-
export {};
|
package/dist/wu-repair.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* WU State Repair Tool (Unified - WU-1826, WU-2240)
|
|
4
|
-
*
|
|
5
|
-
* Layer 2 defense-in-depth: detect and repair WU state inconsistencies.
|
|
6
|
-
*
|
|
7
|
-
* This unified tool consolidates four repair modes:
|
|
8
|
-
* - Consistency mode (default): detect/repair state inconsistencies
|
|
9
|
-
* - Claim mode (--claim): repair missing claim metadata in worktrees
|
|
10
|
-
* - Admin mode (--admin): administrative fixes for done WUs
|
|
11
|
-
* - State mode (--repair-state): repair corrupted wu-events.jsonl (WU-2240)
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
* # Consistency mode (default)
|
|
15
|
-
* pnpm wu:repair --id WU-123 # Repair single WU
|
|
16
|
-
* pnpm wu:repair --id WU-123 --check # Audit only, no changes
|
|
17
|
-
* pnpm wu:repair --all # Batch repair all WUs
|
|
18
|
-
* pnpm wu:repair --all --check # Audit all WUs
|
|
19
|
-
*
|
|
20
|
-
* # Claim mode
|
|
21
|
-
* pnpm wu:repair --claim --id WU-123 # Repair claim metadata
|
|
22
|
-
* pnpm wu:repair --claim --id WU-123 --check # Check only
|
|
23
|
-
* pnpm wu:repair --claim --id WU-123 --worktree /path/to/worktree
|
|
24
|
-
*
|
|
25
|
-
* # Admin mode
|
|
26
|
-
* pnpm wu:repair --admin --id WU-123 --lane "Operations: Tooling"
|
|
27
|
-
* pnpm wu:repair --admin --id WU-123 --status cancelled
|
|
28
|
-
* pnpm wu:repair --admin --id WU-123 --notes "Administrative fix"
|
|
29
|
-
* pnpm wu:repair --admin --id WU-123 --initiative INIT-001
|
|
30
|
-
*
|
|
31
|
-
* # State mode (WU-2240)
|
|
32
|
-
* pnpm wu:repair --repair-state # Repair default state file
|
|
33
|
-
* pnpm wu:repair --repair-state --path /path/to/wu-events.jsonl # Repair specific file
|
|
34
|
-
*
|
|
35
|
-
* Exit codes:
|
|
36
|
-
* 0: Success (no issues or all repaired)
|
|
37
|
-
* 1: Issues detected (--check mode)
|
|
38
|
-
* 2: Repair failed
|
|
39
|
-
*
|
|
40
|
-
* DEPRECATION NOTICE:
|
|
41
|
-
* - pnpm wu:repair-claim is deprecated. Use: pnpm wu:repair --claim
|
|
42
|
-
* - pnpm wu:admin-repair is deprecated. Use: pnpm wu:repair --admin
|
|
43
|
-
*
|
|
44
|
-
* @see {@link tools/lib/wu-repair-core.mjs} - Core repair logic
|
|
45
|
-
* @see {@link tools/lib/wu-consistency-checker.mjs} - Consistency detection/repair
|
|
46
|
-
* @see {@link tools/lib/wu-state-store.mjs} - State file repair (repairStateFile)
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* Normalise WU ID to uppercase with WU- prefix
|
|
50
|
-
* @param {string} id - Raw WU ID
|
|
51
|
-
* @returns {string} Normalised WU ID
|
|
52
|
-
*/
|
|
53
|
-
declare function normaliseWUId(id: any): any;
|
|
54
|
-
/**
|
|
55
|
-
* Validate WU ID format
|
|
56
|
-
* @param {string} id - WU ID to validate
|
|
57
|
-
* @returns {boolean} True if valid
|
|
58
|
-
*/
|
|
59
|
-
declare function isValidWUId(id: any): boolean;
|
|
60
|
-
export { normaliseWUId, isValidWUId };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate the Completion Workflow section for sub-agents (WU-2682).
|
|
3
|
-
*
|
|
4
|
-
* Explicitly instructs sub-agents to run wu:done autonomously after gates pass.
|
|
5
|
-
* This prevents agents from asking permission instead of completing.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} id - WU ID
|
|
8
|
-
* @returns {string} Completion Workflow section
|
|
9
|
-
*/
|
|
10
|
-
export declare function generateCompletionWorkflowSection(id: string): string;
|