@lumenflow/cli 2.4.0 → 2.5.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.
Files changed (147) hide show
  1. package/README.md +11 -8
  2. package/dist/__tests__/init-config-lanes.test.js +131 -0
  3. package/dist/__tests__/init-docs-structure.test.js +119 -0
  4. package/dist/__tests__/init-lane-inference.test.js +125 -0
  5. package/dist/__tests__/init-onboarding-docs.test.js +132 -0
  6. package/dist/__tests__/init-quick-ref.test.js +145 -0
  7. package/dist/__tests__/init-scripts.test.js +207 -0
  8. package/dist/__tests__/init-template-portability.test.js +97 -0
  9. package/dist/__tests__/init.test.js +7 -2
  10. package/dist/__tests__/initiative-add-wu.test.js +420 -0
  11. package/dist/__tests__/initiative-plan-replacement.test.js +162 -0
  12. package/dist/__tests__/initiative-remove-wu.test.js +458 -0
  13. package/dist/__tests__/onboarding-smoke-test.test.js +211 -0
  14. package/dist/__tests__/path-centralization-cli.test.js +234 -0
  15. package/dist/__tests__/plan-create.test.js +126 -0
  16. package/dist/__tests__/plan-edit.test.js +157 -0
  17. package/dist/__tests__/plan-link.test.js +239 -0
  18. package/dist/__tests__/plan-promote.test.js +181 -0
  19. package/dist/__tests__/templates-sync.test.js +219 -0
  20. package/dist/__tests__/wu-create-strict.test.js +118 -0
  21. package/dist/__tests__/wu-edit-strict.test.js +109 -0
  22. package/dist/__tests__/wu-validate-strict.test.js +113 -0
  23. package/dist/flow-bottlenecks.js +4 -2
  24. package/dist/gates.js +22 -0
  25. package/dist/init.js +670 -87
  26. package/dist/initiative-add-wu.js +112 -16
  27. package/dist/initiative-remove-wu.js +248 -0
  28. package/dist/onboarding-smoke-test.js +400 -0
  29. package/dist/orchestrate-init-status.js +37 -9
  30. package/dist/orchestrate-initiative.js +10 -4
  31. package/dist/plan-create.js +199 -0
  32. package/dist/plan-edit.js +235 -0
  33. package/dist/plan-link.js +233 -0
  34. package/dist/plan-promote.js +231 -0
  35. package/dist/sync-templates.js +137 -5
  36. package/dist/wu-block.js +16 -5
  37. package/dist/wu-claim.js +15 -9
  38. package/dist/wu-create.js +50 -2
  39. package/dist/wu-deps.js +3 -1
  40. package/dist/wu-done.js +14 -5
  41. package/dist/wu-edit.js +35 -0
  42. package/dist/wu-prep.js +131 -8
  43. package/dist/wu-spawn.js +14 -1
  44. package/dist/wu-unblock.js +34 -2
  45. package/dist/wu-validate.js +25 -17
  46. package/package.json +11 -7
  47. package/templates/core/.lumenflow/constraints.md.template +61 -3
  48. package/templates/core/AGENTS.md.template +2 -2
  49. package/templates/core/LUMENFLOW.md.template +85 -23
  50. package/templates/core/ai/onboarding/agent-invocation-guide.md.template +157 -0
  51. package/templates/core/ai/onboarding/agent-safety-card.md.template +227 -0
  52. package/templates/core/ai/onboarding/docs-generation.md.template +277 -0
  53. package/templates/core/ai/onboarding/first-wu-mistakes.md.template +49 -7
  54. package/templates/core/ai/onboarding/quick-ref-commands.md.template +343 -110
  55. package/templates/core/ai/onboarding/release-process.md.template +8 -2
  56. package/templates/core/ai/onboarding/starting-prompt.md.template +407 -0
  57. package/templates/core/ai/onboarding/test-ratchet.md.template +131 -0
  58. package/templates/core/ai/onboarding/troubleshooting-wu-done.md.template +91 -38
  59. package/templates/core/ai/onboarding/vendor-support.md.template +219 -0
  60. package/templates/vendors/claude/.claude/skills/context-management/SKILL.md.template +13 -1
  61. package/templates/vendors/claude/.claude/skills/execution-memory/SKILL.md.template +14 -16
  62. package/templates/vendors/claude/.claude/skills/orchestration/SKILL.md.template +48 -4
  63. package/templates/vendors/claude/.claude/skills/worktree-discipline/SKILL.md.template +5 -1
  64. package/templates/vendors/claude/.claude/skills/wu-lifecycle/SKILL.md.template +19 -8
  65. package/dist/__tests__/init-plan.test.js +0 -340
  66. package/dist/agent-issues-query.d.ts +0 -16
  67. package/dist/agent-log-issue.d.ts +0 -10
  68. package/dist/agent-session-end.d.ts +0 -10
  69. package/dist/agent-session.d.ts +0 -10
  70. package/dist/backlog-prune.d.ts +0 -84
  71. package/dist/cli-entry-point.d.ts +0 -8
  72. package/dist/deps-add.d.ts +0 -91
  73. package/dist/deps-remove.d.ts +0 -17
  74. package/dist/docs-sync.d.ts +0 -50
  75. package/dist/file-delete.d.ts +0 -84
  76. package/dist/file-edit.d.ts +0 -82
  77. package/dist/file-read.d.ts +0 -92
  78. package/dist/file-write.d.ts +0 -90
  79. package/dist/flow-bottlenecks.d.ts +0 -16
  80. package/dist/flow-report.d.ts +0 -16
  81. package/dist/gates.d.ts +0 -94
  82. package/dist/git-branch.d.ts +0 -65
  83. package/dist/git-diff.d.ts +0 -58
  84. package/dist/git-log.d.ts +0 -69
  85. package/dist/git-status.d.ts +0 -58
  86. package/dist/guard-locked.d.ts +0 -62
  87. package/dist/guard-main-branch.d.ts +0 -50
  88. package/dist/guard-worktree-commit.d.ts +0 -59
  89. package/dist/index.d.ts +0 -10
  90. package/dist/init-plan.d.ts +0 -80
  91. package/dist/init-plan.js +0 -337
  92. package/dist/init.d.ts +0 -46
  93. package/dist/initiative-add-wu.d.ts +0 -22
  94. package/dist/initiative-bulk-assign-wus.d.ts +0 -16
  95. package/dist/initiative-create.d.ts +0 -28
  96. package/dist/initiative-edit.d.ts +0 -34
  97. package/dist/initiative-list.d.ts +0 -12
  98. package/dist/initiative-status.d.ts +0 -11
  99. package/dist/lumenflow-upgrade.d.ts +0 -103
  100. package/dist/mem-checkpoint.d.ts +0 -16
  101. package/dist/mem-cleanup.d.ts +0 -29
  102. package/dist/mem-create.d.ts +0 -17
  103. package/dist/mem-export.d.ts +0 -10
  104. package/dist/mem-inbox.d.ts +0 -35
  105. package/dist/mem-init.d.ts +0 -15
  106. package/dist/mem-ready.d.ts +0 -16
  107. package/dist/mem-signal.d.ts +0 -16
  108. package/dist/mem-start.d.ts +0 -16
  109. package/dist/mem-summarize.d.ts +0 -22
  110. package/dist/mem-triage.d.ts +0 -22
  111. package/dist/metrics-cli.d.ts +0 -90
  112. package/dist/metrics-snapshot.d.ts +0 -18
  113. package/dist/orchestrate-init-status.d.ts +0 -11
  114. package/dist/orchestrate-initiative.d.ts +0 -12
  115. package/dist/orchestrate-monitor.d.ts +0 -11
  116. package/dist/release.d.ts +0 -117
  117. package/dist/rotate-progress.d.ts +0 -48
  118. package/dist/session-coordinator.d.ts +0 -74
  119. package/dist/spawn-list.d.ts +0 -16
  120. package/dist/state-bootstrap.d.ts +0 -92
  121. package/dist/sync-templates.d.ts +0 -52
  122. package/dist/trace-gen.d.ts +0 -84
  123. package/dist/validate-agent-skills.d.ts +0 -50
  124. package/dist/validate-agent-sync.d.ts +0 -36
  125. package/dist/validate-backlog-sync.d.ts +0 -37
  126. package/dist/validate-skills-spec.d.ts +0 -40
  127. package/dist/validate.d.ts +0 -60
  128. package/dist/wu-block.d.ts +0 -16
  129. package/dist/wu-claim.d.ts +0 -74
  130. package/dist/wu-cleanup.d.ts +0 -35
  131. package/dist/wu-create.d.ts +0 -69
  132. package/dist/wu-delete.d.ts +0 -21
  133. package/dist/wu-deps.d.ts +0 -13
  134. package/dist/wu-done.d.ts +0 -225
  135. package/dist/wu-edit.d.ts +0 -63
  136. package/dist/wu-infer-lane.d.ts +0 -17
  137. package/dist/wu-preflight.d.ts +0 -47
  138. package/dist/wu-prune.d.ts +0 -16
  139. package/dist/wu-recover.d.ts +0 -37
  140. package/dist/wu-release.d.ts +0 -19
  141. package/dist/wu-repair.d.ts +0 -60
  142. package/dist/wu-spawn-completion.d.ts +0 -10
  143. package/dist/wu-spawn.d.ts +0 -192
  144. package/dist/wu-status.d.ts +0 -25
  145. package/dist/wu-unblock.d.ts +0 -16
  146. package/dist/wu-unlock-lane.d.ts +0 -19
  147. package/dist/wu-validate.d.ts +0 -16
package/dist/init.d.ts DELETED
@@ -1,46 +0,0 @@
1
- /**
2
- * @file init.ts
3
- * LumenFlow project scaffolding command (WU-1045)
4
- * WU-1006: Library-First - use core defaults for config generation
5
- * WU-1028: Vendor-agnostic core + vendor overlays
6
- * WU-1085: Added createWUParser for proper --help support
7
- */
8
- /**
9
- * WU-1085: Parse init command options using createWUParser
10
- * Provides proper --help, --version, and option parsing
11
- */
12
- export declare function parseInitOptions(): {
13
- force: boolean;
14
- full: boolean;
15
- framework?: string;
16
- vendor?: VendorType;
17
- preset?: GatePresetType;
18
- };
19
- /**
20
- * Supported vendor integrations
21
- */
22
- export type VendorType = 'claude' | 'cursor' | 'aider' | 'all' | 'none';
23
- export type DefaultClient = 'claude-code' | 'none';
24
- export type GatePresetType = 'node' | 'python' | 'go' | 'rust' | 'dotnet';
25
- export interface ScaffoldOptions {
26
- force: boolean;
27
- full: boolean;
28
- framework?: string;
29
- vendor?: VendorType;
30
- defaultClient?: DefaultClient;
31
- /** WU-1067: Gate preset to populate in gates.execution */
32
- gatePreset?: GatePresetType;
33
- }
34
- export interface ScaffoldResult {
35
- created: string[];
36
- skipped: string[];
37
- }
38
- /**
39
- * Scaffold a new LumenFlow project
40
- */
41
- export declare function scaffoldProject(targetDir: string, options: ScaffoldOptions): Promise<ScaffoldResult>;
42
- /**
43
- * CLI entry point
44
- * WU-1085: Updated to use parseInitOptions for proper --help support
45
- */
46
- export declare function main(): Promise<void>;
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative Add WU Command (WU-1389)
4
- *
5
- * Links an existing WU to an initiative bidirectionally:
6
- * 1. Adds `initiative: INIT-NNN` field to WU YAML
7
- * 2. Adds WU ID to initiative `wus: []` array
8
- *
9
- * Uses micro-worktree isolation for atomic operations.
10
- *
11
- * Usage:
12
- * pnpm initiative:add-wu --initiative INIT-001 --wu WU-123
13
- *
14
- * Features:
15
- * - Validates both WU and initiative exist before modifying
16
- * - Idempotent: no error if link already exists
17
- * - Errors if WU is already linked to a different initiative
18
- * - Atomic: both files updated in single commit
19
- *
20
- * Context: WU-1389 (initial implementation)
21
- */
22
- export {};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative Bulk Assign WUs CLI (WU-1018)
4
- *
5
- * Bulk-assigns orphaned WUs to initiatives based on lane prefix rules.
6
- * Uses micro-worktree isolation for race-safe commits.
7
- *
8
- * Usage:
9
- * pnpm initiative:bulk-assign # Dry-run (default)
10
- * LUMENFLOW_ADMIN=1 pnpm initiative:bulk-assign --apply # Apply changes
11
- * pnpm initiative:bulk-assign --config custom-config.yaml # Custom config
12
- * pnpm initiative:bulk-assign --reconcile-initiative INIT-001
13
- *
14
- * @module initiative-bulk-assign-wus
15
- */
16
- export {};
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative Create Helper (WU-1247, WU-1439)
4
- *
5
- * Race-safe Initiative creation using micro-worktree isolation.
6
- *
7
- * Canonical sequence:
8
- * 1) Validate inputs (id, slug, title)
9
- * 2) Ensure on main branch
10
- * 3) Use micro-worktree to atomically:
11
- * a) Create temp branch without switching main checkout
12
- * b) Create INIT-{id}.yaml in micro-worktree
13
- * c) Commit with "docs: create init-{id} for <title>" message
14
- * d) Merge to main with ff-only (retry with rebase if needed)
15
- * e) Push to origin/main
16
- * f) Cleanup temp branch and micro-worktree
17
- *
18
- * Benefits:
19
- * - Main checkout never modified (no impact on other agents)
20
- * - Race conditions handled via rebase+retry (up to 3 attempts)
21
- * - Cleanup guaranteed even on failure
22
- *
23
- * Usage:
24
- * pnpm initiative:create --id INIT-001 --slug shock-protocol --title "Shock Protocol Implementation"
25
- *
26
- * Context: WU-1247 (original implementation), WU-1439 (micro-worktree migration)
27
- */
28
- export {};
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative Edit Helper
4
- *
5
- * Race-safe Initiative editing using micro-worktree isolation (WU-1451).
6
- *
7
- * Enables editing Initiative YAML files with atomic commits, perfect for:
8
- * - Updating initiative status
9
- * - Setting blocked_by and blocked_reason
10
- * - Unblocking initiatives
11
- * - Adding lanes
12
- * - Appending notes
13
- * - Fixing malformed created dates (WU-2547)
14
- *
15
- * Uses the micro-worktree pattern with pushOnly mode (WU-1435):
16
- * 1) Validate inputs (Initiative exists, status is valid enum)
17
- * 2) Ensure main is clean and up-to-date with origin
18
- * 3) Create temp branch WITHOUT switching (main checkout stays on main)
19
- * 4) Create micro-worktree in /tmp pointing to temp branch
20
- * 5) Apply edits in micro-worktree
21
- * 6) Commit, push directly to origin/main
22
- * 7) Cleanup temp branch and micro-worktree
23
- *
24
- * Usage:
25
- * pnpm initiative:edit --id INIT-001 --status in_progress
26
- * pnpm initiative:edit --id INIT-001 --blocked-by INIT-002 --blocked-reason "Waiting for Phase 1"
27
- * pnpm initiative:edit --id INIT-001 --unblock
28
- * pnpm initiative:edit --id INIT-001 --add-lane "Operations: Tooling"
29
- * pnpm initiative:edit --id INIT-001 --notes "Phase 2 started"
30
- *
31
- * Part of WU-1451: Add initiative:edit command for updating initiative status and blockers
32
- * @see {@link tools/lib/micro-worktree.mjs} - Shared micro-worktree logic
33
- */
34
- export {};
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative List Helper (WU-1247)
4
- *
5
- * Lists all initiatives with progress percentages.
6
- *
7
- * Usage:
8
- * pnpm initiative:list # Table format
9
- * pnpm initiative:list --format json # JSON format
10
- * pnpm initiative:list --status open # Filter by status
11
- */
12
- export {};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Initiative Status Helper (WU-1247)
4
- *
5
- * Shows detailed initiative view with phases and WUs.
6
- *
7
- * Usage:
8
- * pnpm initiative:status INIT-001
9
- * pnpm initiative:status --id INIT-001 --format json
10
- */
11
- export {};
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * LumenFlow Upgrade CLI Command
4
- *
5
- * Updates all @lumenflow/* packages to a specified version or latest.
6
- * Uses micro-worktree pattern for atomic changes to main without requiring
7
- * users to be in a worktree.
8
- *
9
- * WU-1112: INIT-003 Phase 6 - Migrate remaining Tier 1 tools
10
- * WU-1127: Use micro-worktree isolation pattern (fixes user blocking issue)
11
- *
12
- * Key requirements:
13
- * - Uses micro-worktree pattern (atomic changes, no user worktree needed)
14
- * - Runs from main checkout (not inside a worktree)
15
- * - Checks all 7 @lumenflow/* packages
16
- *
17
- * Usage:
18
- * pnpm lumenflow:upgrade --version 1.5.0
19
- * pnpm lumenflow:upgrade --latest
20
- * pnpm lumenflow:upgrade --latest --dry-run
21
- */
22
- /**
23
- * All @lumenflow/* packages that should be upgraded together
24
- *
25
- * WU-1112: Must include all 7 packages (not just 4 as before)
26
- * Kept in alphabetical order for consistency
27
- */
28
- export declare const LUMENFLOW_PACKAGES: readonly ["@lumenflow/agent", "@lumenflow/cli", "@lumenflow/core", "@lumenflow/initiatives", "@lumenflow/memory", "@lumenflow/metrics", "@lumenflow/shims"];
29
- /**
30
- * Arguments for lumenflow-upgrade command
31
- */
32
- export interface UpgradeArgs {
33
- /** Specific version to upgrade to (e.g., '1.5.0') */
34
- version?: string;
35
- /** Upgrade to latest version */
36
- latest?: boolean;
37
- /** Dry run - show commands without executing */
38
- dryRun?: boolean;
39
- /** Show help */
40
- help?: boolean;
41
- }
42
- /**
43
- * Result of building upgrade commands
44
- */
45
- export interface UpgradeResult {
46
- /** The pnpm add command to run */
47
- addCommand: string;
48
- /** Version specifier used */
49
- versionSpec: string;
50
- }
51
- /**
52
- * Result of main checkout validation
53
- */
54
- export interface MainCheckoutValidationResult {
55
- /** Whether validation passed */
56
- valid: boolean;
57
- /** Error message if validation failed */
58
- error?: string;
59
- /** Suggested fix command */
60
- fixCommand?: string;
61
- }
62
- /**
63
- * Parse command line arguments for lumenflow-upgrade
64
- *
65
- * @param argv - Process argv array
66
- * @returns Parsed arguments
67
- */
68
- export declare function parseUpgradeArgs(argv: string[]): UpgradeArgs;
69
- /**
70
- * Build the upgrade commands based on arguments
71
- *
72
- * Creates pnpm add command for all @lumenflow/* packages.
73
- * Uses --save-dev since these are development dependencies.
74
- *
75
- * @param args - Parsed upgrade arguments
76
- * @returns Object containing the commands to run
77
- */
78
- export declare function buildUpgradeCommands(args: UpgradeArgs): UpgradeResult;
79
- /**
80
- * WU-1127: Validate that the command is run from main checkout
81
- *
82
- * The micro-worktree pattern requires the command to be run from the main
83
- * checkout (not inside a worktree). This is the inverse of the old behavior
84
- * which required users to be IN a worktree.
85
- *
86
- * @returns Validation result with error and fix command if invalid
87
- */
88
- export declare function validateMainCheckout(): Promise<MainCheckoutValidationResult>;
89
- /**
90
- * WU-1127: Execute the upgrade in a micro-worktree
91
- *
92
- * Uses the shared micro-worktree pattern (like wu:create, wu:edit) to:
93
- * 1. Create a temporary worktree without switching main checkout
94
- * 2. Run pnpm add in the temporary worktree
95
- * 3. Commit the changes
96
- * 4. FF-only merge to main
97
- * 5. Push to origin
98
- * 6. Cleanup
99
- *
100
- * @param args - Parsed upgrade arguments
101
- * @returns Promise resolving when upgrade is complete
102
- */
103
- export declare function executeUpgradeInMicroWorktree(args: UpgradeArgs): Promise<void>;
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Checkpoint CLI (WU-1467)
4
- *
5
- * Create a checkpoint node for context snapshots.
6
- * Used before /clear or session handoff to preserve progress state.
7
- *
8
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
9
- *
10
- * Usage:
11
- * pnpm mem:checkpoint 'note' [--session <id>] [--wu <id>] [--progress <text>] [--next-steps <text>] [--trigger <type>] [--quiet]
12
- *
13
- * @see {@link tools/lib/mem-checkpoint-core.mjs} - Core logic
14
- * @see {@link tools/__tests__/mem-checkpoint.test.mjs} - Tests
15
- */
16
- export {};
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Cleanup CLI (WU-1472, WU-1554)
4
- *
5
- * Prune closed memory nodes based on lifecycle policy and TTL.
6
- * Implements compaction to prevent memory bloat.
7
- *
8
- * Features:
9
- * - Remove ephemeral nodes (always discarded)
10
- * - Remove session nodes when session is closed
11
- * - Archive summarized nodes (marked with summarized_into)
12
- * - Respect sensitive:true flag for stricter retention
13
- * - Support dry-run mode for preview
14
- * - Report compaction metrics (ratio, bytes freed)
15
- * - WU-1554: TTL-based expiration (e.g., --ttl 30d)
16
- * - WU-1554: Active session protection (never removed)
17
- *
18
- * Usage:
19
- * pnpm mem:cleanup # Cleanup based on lifecycle policy
20
- * pnpm mem:cleanup --dry-run # Preview without changes
21
- * pnpm mem:cleanup --ttl 30d # Remove nodes older than 30 days
22
- * pnpm mem:cleanup --ttl 7d --dry-run # Preview TTL cleanup
23
- * pnpm mem:cleanup --session-id <uuid> # Close specific session
24
- * pnpm mem:cleanup --json # Output as JSON
25
- *
26
- * @see {@link tools/lib/mem-cleanup-core.mjs} - Core logic
27
- * @see {@link tools/__tests__/mem-cleanup.test.mjs} - Tests
28
- */
29
- export {};
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Create CLI (WU-1469)
4
- *
5
- * Create memory nodes with discovered-from provenance.
6
- * KEY DIFFERENTIATOR: supports discovered-from relationship for scope-creep
7
- * forensics. Creates audit trail of WHY work expanded, not just WHAT changed.
8
- *
9
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
10
- *
11
- * Usage:
12
- * pnpm mem:create 'title' [--type <type>] [--discovered-from <id>] [--wu <id>] [--quiet]
13
- *
14
- * @see {@link tools/lib/mem-create-core.mjs} - Core logic
15
- * @see {@link tools/__tests__/mem-create.test.mjs} - Tests
16
- */
17
- export {};
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Export CLI (WU-1137)
4
- *
5
- * Render memory.jsonl as markdown or JSON with basic filters.
6
- *
7
- * Usage:
8
- * pnpm mem:export [--wu WU-1234] [--type <type>] [--lifecycle <lifecycle>] [--format <markdown|json>] [--quiet]
9
- */
10
- export {};
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Inbox CLI (WU-1474)
4
- *
5
- * Read coordination signals from other agents for real-time awareness
6
- * of parallel agent progress. Filter by lane, WU, or time range.
7
- * Supports watch mode for continuous monitoring.
8
- *
9
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
10
- *
11
- * WU-2202: Added dependency validation before operations to prevent silent
12
- * failures when node_modules is corrupted or incomplete.
13
- *
14
- * Usage:
15
- * pnpm mem:inbox [--lane <name>] [--wu <id>] [--since <time>] [--watch]
16
- *
17
- * @see {@link tools/lib/mem-signal-core.mjs} - Core logic
18
- * @see {@link tools/__tests__/mem-inbox.test.mjs} - Tests
19
- */
20
- /**
21
- * Format signal count for --count flag output
22
- * WU-2401: Lightweight polling for orchestrators
23
- *
24
- * @param {number} count - Number of unread signals
25
- * @returns {string} Formatted count string
26
- */
27
- export declare function formatCount(count: any): string;
28
- /**
29
- * Parse relative time string to Date object
30
- * WU-1849: Replaced custom regex with ms package
31
- *
32
- * @param {string} timeStr - Time string like "1h", "30m", "2d", or ISO date
33
- * @returns {Date} Parsed date
34
- */
35
- export declare function parseTimeString(timeStr: any): Date;
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Init CLI (WU-1464)
4
- *
5
- * Initialize memory layer in the repository.
6
- * Creates .lumenflow/memory/ directory with memory.jsonl and config.yaml.
7
- *
8
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
9
- *
10
- * Usage:
11
- * pnpm mem:init [--base-dir <path>] [--quiet]
12
- *
13
- * @see {@link tools/lib/mem-init-core.mjs} - Core logic
14
- */
15
- export {};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Ready CLI (WU-1468)
4
- *
5
- * Deterministic ready-work query for "what next?" oracle.
6
- * Returns unblocked open nodes, ordered by priority then createdAt.
7
- *
8
- * Usage:
9
- * pnpm mem:ready --wu WU-1234 [--type <type>] [--format <json|human>] [--quiet]
10
- *
11
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
12
- *
13
- * @see {@link tools/lib/mem-ready-core.mjs} - Core logic
14
- * @see {@link tools/__tests__/mem-ready.test.mjs} - Tests
15
- */
16
- export {};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Signal CLI (WU-1473)
4
- *
5
- * Send coordination signals between parallel agents for sub-100ms
6
- * multi-agent swarm coordination without git sync latency.
7
- *
8
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
9
- *
10
- * Usage:
11
- * pnpm mem:signal 'message' [--wu <id>] [--lane <name>] [--quiet]
12
- *
13
- * @see {@link tools/lib/mem-signal-core.mjs} - Core logic
14
- * @see {@link tools/__tests__/mem-signal.test.mjs} - Tests
15
- */
16
- export {};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Start CLI (WU-1466)
4
- *
5
- * Create a session node linked to a WU.
6
- * Called by wu:claim enhancement for context restoration after /clear.
7
- *
8
- * Includes audit logging to .lumenflow/telemetry/tools.ndjson.
9
- *
10
- * Usage:
11
- * pnpm mem:start --wu WU-1234 [--agent-type <type>] [--context-tier <tier>] [--quiet]
12
- *
13
- * @see {@link tools/lib/mem-start-core.mjs} - Core logic
14
- * @see {@link tools/__tests__/mem-start.test.mjs} - Tests
15
- */
16
- export {};
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Summarize CLI (WU-1471)
4
- *
5
- * Rollup older memory nodes into summary nodes for compaction.
6
- * Implements forgetting as first-class feature.
7
- *
8
- * Features:
9
- * - Aggregate checkpoint/note/discovery nodes into summaries
10
- * - Mark originals for cleanup after summary creation
11
- * - Respect lifecycle TTL (ephemeral, session, wu, project)
12
- * - Support dry-run mode for preview
13
- *
14
- * Usage:
15
- * pnpm mem:summarize --wu WU-1234 # Create summary from WU nodes
16
- * pnpm mem:summarize --wu WU-1234 --dry-run # Preview without changes
17
- * pnpm mem:summarize --wu WU-1234 --json # Output as JSON
18
- *
19
- * @see {@link tools/lib/mem-summarize-core.mjs} - Core logic
20
- * @see {@link tools/__tests__/mem-summarize.test.mjs} - Tests
21
- */
22
- export {};
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Memory Triage CLI (WU-1470)
4
- *
5
- * Review discovery nodes and promote to WUs or archive.
6
- *
7
- * Features:
8
- * - List open discovery nodes
9
- * - Promote discovery to WU (integrates with wu:create)
10
- * - Archive discovery without promotion
11
- * - Interactive mode for human review
12
- *
13
- * Usage:
14
- * pnpm mem:triage # List open discoveries
15
- * pnpm mem:triage --wu WU-1234 # List discoveries for specific WU
16
- * pnpm mem:triage --promote mem-aaa1 --lane "Operations: Tooling"
17
- * pnpm mem:triage --archive mem-aaa1 --reason "Duplicate"
18
- *
19
- * @see {@link tools/lib/mem-triage-core.mjs} - Core logic
20
- * @see {@link tools/__tests__/mem-triage.test.mjs} - Tests
21
- */
22
- export {};
@@ -1,90 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Unified Metrics CLI with subcommands (WU-1110)
4
- *
5
- * Provides lanes, dora, and flow metrics subcommands in a single CLI.
6
- *
7
- * Usage:
8
- * pnpm metrics # All metrics, JSON output
9
- * pnpm metrics lanes # Lane health only
10
- * pnpm metrics dora # DORA metrics only
11
- * pnpm metrics flow # Flow state only
12
- * pnpm metrics --format table # Table output
13
- * pnpm metrics --days 30 # 30 day window
14
- * pnpm metrics --output metrics.json # Custom output file
15
- * pnpm metrics --dry-run # Preview without writing
16
- *
17
- * @module metrics-cli
18
- */
19
- import { type WUMetrics, type GitCommit, type SkipGatesEntry, type DORAMetrics, type FlowState, type LaneHealth } from '@lumenflow/metrics';
20
- /** Valid subcommands */
21
- export type MetricsSubcommand = 'lanes' | 'dora' | 'flow' | 'all';
22
- /** Output format types */
23
- export type MetricsFormat = 'json' | 'table';
24
- /** Parsed command result */
25
- export interface MetricsCommandResult {
26
- subcommand: MetricsSubcommand;
27
- days: number;
28
- format: MetricsFormat;
29
- output: string;
30
- dryRun: boolean;
31
- }
32
- /** Lane health result from WUs */
33
- export interface LaneHealthResult {
34
- lanes: LaneHealth[];
35
- totalActive: number;
36
- totalBlocked: number;
37
- totalCompleted: number;
38
- }
39
- /** DORA calculation input */
40
- export interface DoraCalculationInput {
41
- commits: GitCommit[];
42
- wuMetrics: WUMetrics[];
43
- skipGatesEntries: SkipGatesEntry[];
44
- weekStart: Date;
45
- weekEnd: Date;
46
- }
47
- /**
48
- * Parse command line arguments
49
- */
50
- export declare function parseCommand(argv: string[]): MetricsCommandResult;
51
- /**
52
- * Calculate lane health from WU metrics
53
- */
54
- export declare function calculateLaneHealthFromWUs(wuMetrics: WUMetrics[]): LaneHealthResult;
55
- /**
56
- * Calculate DORA metrics from data
57
- */
58
- export declare function calculateDoraFromData(input: DoraCalculationInput): DORAMetrics;
59
- /**
60
- * Calculate flow state from WU metrics
61
- */
62
- export declare function calculateFlowFromWUs(wuMetrics: WUMetrics[]): FlowState;
63
- /**
64
- * Format lanes output
65
- */
66
- export declare function formatLanesOutput(lanes: LaneHealthResult, format: MetricsFormat): string;
67
- /**
68
- * Format DORA output
69
- */
70
- export declare function formatDoraOutput(dora: DORAMetrics, format: MetricsFormat): string;
71
- /**
72
- * Format flow output
73
- */
74
- export declare function formatFlowOutput(flow: FlowState, format: MetricsFormat): string;
75
- /**
76
- * Run lanes subcommand
77
- */
78
- export declare function runLanesSubcommand(opts: MetricsCommandResult): Promise<void>;
79
- /**
80
- * Run dora subcommand
81
- */
82
- export declare function runDoraSubcommand(opts: MetricsCommandResult): Promise<void>;
83
- /**
84
- * Run flow subcommand
85
- */
86
- export declare function runFlowSubcommand(opts: MetricsCommandResult): Promise<void>;
87
- /**
88
- * Run all metrics (default)
89
- */
90
- export declare function runAllSubcommand(opts: MetricsCommandResult): Promise<void>;
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Metrics Snapshot Capture CLI (WU-1018)
4
- *
5
- * Captures DORA metrics, lane health, and flow state snapshots.
6
- *
7
- * Usage:
8
- * pnpm metrics:snapshot # All metrics, JSON output
9
- * pnpm metrics:snapshot --type dora # DORA metrics only
10
- * pnpm metrics:snapshot --type lanes # Lane health only
11
- * pnpm metrics:snapshot --type flow # Flow state only
12
- * pnpm metrics:snapshot --dry-run # Preview without writing
13
- * pnpm metrics:snapshot --output metrics.json
14
- *
15
- * @module metrics-snapshot
16
- * @see {@link @lumenflow/metrics/flow/capture-metrics-snapshot}
17
- */
18
- export {};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Orchestrate Initiative Status CLI
4
- *
5
- * Compact status view for initiative orchestration.
6
- * Shows progress of WUs in an initiative.
7
- *
8
- * Usage:
9
- * pnpm orchestrate:init-status --initiative INIT-001
10
- */
11
- export {};
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Orchestrate Initiative CLI
4
- *
5
- * Orchestrate initiative execution with parallel agent spawning.
6
- * Builds execution plan based on WU dependencies and manages wave-based execution.
7
- *
8
- * Usage:
9
- * pnpm orchestrate:initiative --initiative INIT-001
10
- * pnpm orchestrate:initiative --initiative INIT-001 --dry-run
11
- */
12
- export {};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Orchestrate Monitor CLI
4
- *
5
- * Monitors spawned agent progress using mem:inbox signals.
6
- * Designed to prevent context exhaustion by using compact signal output.
7
- *
8
- * Usage:
9
- * pnpm orchestrate:monitor --since 30m
10
- */
11
- export {};