specweave 0.22.0 → 0.22.2

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 (184) hide show
  1. package/CLAUDE.md +211 -0
  2. package/README.md +5 -5
  3. package/bin/specweave.js +5 -8
  4. package/dist/plugins/specweave-github/lib/CodeValidator.d.ts +1 -1
  5. package/dist/plugins/specweave-github/lib/CodeValidator.js +1 -1
  6. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +10 -0
  7. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-client-v2.js +26 -0
  9. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  10. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +1 -1
  11. package/dist/plugins/specweave-github/lib/task-sync.js +7 -0
  12. package/dist/plugins/specweave-github/lib/task-sync.js.map +1 -1
  13. package/dist/src/cli/commands/migrate-to-profiles.d.ts +1 -0
  14. package/dist/src/cli/commands/migrate-to-profiles.d.ts.map +1 -1
  15. package/dist/src/cli/commands/migrate-to-profiles.js +12 -1
  16. package/dist/src/cli/commands/migrate-to-profiles.js.map +1 -1
  17. package/dist/src/cli/commands/next-command.d.ts +52 -0
  18. package/dist/src/cli/commands/next-command.d.ts.map +1 -0
  19. package/dist/src/cli/commands/next-command.js +204 -0
  20. package/dist/src/cli/commands/next-command.js.map +1 -0
  21. package/dist/src/cli/commands/sync-specs.d.ts +16 -0
  22. package/dist/src/cli/commands/sync-specs.d.ts.map +1 -0
  23. package/dist/src/cli/commands/sync-specs.js +130 -0
  24. package/dist/src/cli/commands/sync-specs.js.map +1 -0
  25. package/dist/src/cli/count-tasks.d.ts +20 -0
  26. package/dist/src/cli/count-tasks.d.ts.map +1 -0
  27. package/dist/src/cli/count-tasks.js +50 -0
  28. package/dist/src/cli/count-tasks.js.map +1 -0
  29. package/dist/src/config/ConfigManager.d.ts.map +1 -1
  30. package/dist/src/config/ConfigManager.js +2 -1
  31. package/dist/src/config/ConfigManager.js.map +1 -1
  32. package/dist/src/config/types.d.ts +50 -50
  33. package/dist/src/core/cicd/state-manager.d.ts +8 -0
  34. package/dist/src/core/cicd/state-manager.d.ts.map +1 -1
  35. package/dist/src/core/cicd/state-manager.js +60 -15
  36. package/dist/src/core/cicd/state-manager.js.map +1 -1
  37. package/dist/src/core/cost-tracker.d.ts.map +1 -1
  38. package/dist/src/core/cost-tracker.js +2 -1
  39. package/dist/src/core/cost-tracker.js.map +1 -1
  40. package/dist/src/core/iac/template-engine.d.ts.map +1 -1
  41. package/dist/src/core/iac/template-engine.js +28 -0
  42. package/dist/src/core/iac/template-engine.js.map +1 -1
  43. package/dist/src/core/iac/template-generator.d.ts +53 -0
  44. package/dist/src/core/iac/template-generator.d.ts.map +1 -0
  45. package/dist/src/core/iac/template-generator.js +125 -0
  46. package/dist/src/core/iac/template-generator.js.map +1 -0
  47. package/dist/src/core/increment/status-auto-transition.js +3 -3
  48. package/dist/src/core/increment/status-auto-transition.js.map +1 -1
  49. package/dist/src/core/living-docs/CodeValidator.js +1 -1
  50. package/dist/src/core/living-docs/CodeValidator.js.map +1 -1
  51. package/dist/src/core/living-docs/content-distributor.d.ts.map +1 -1
  52. package/dist/src/core/living-docs/content-distributor.js +11 -1
  53. package/dist/src/core/living-docs/content-distributor.js.map +1 -1
  54. package/dist/src/core/living-docs/living-docs-sync.d.ts +166 -0
  55. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -0
  56. package/dist/src/core/living-docs/living-docs-sync.js +726 -0
  57. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -0
  58. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +7 -3
  59. package/dist/src/core/living-docs/task-project-specific-generator.d.ts.map +1 -1
  60. package/dist/src/core/living-docs/task-project-specific-generator.js +40 -24
  61. package/dist/src/core/living-docs/task-project-specific-generator.js.map +1 -1
  62. package/dist/src/core/plugin-loader.d.ts +7 -0
  63. package/dist/src/core/plugin-loader.d.ts.map +1 -1
  64. package/dist/src/core/plugin-loader.js +18 -1
  65. package/dist/src/core/plugin-loader.js.map +1 -1
  66. package/dist/src/core/serverless/platform-data-loader.d.ts +8 -0
  67. package/dist/src/core/serverless/platform-data-loader.d.ts.map +1 -1
  68. package/dist/src/core/serverless/platform-data-loader.js +14 -0
  69. package/dist/src/core/serverless/platform-data-loader.js.map +1 -1
  70. package/dist/src/core/serverless/types.d.ts +1 -1
  71. package/dist/src/core/serverless/types.d.ts.map +1 -1
  72. package/dist/src/core/status-line/status-line-manager.d.ts +6 -2
  73. package/dist/src/core/status-line/status-line-manager.d.ts.map +1 -1
  74. package/dist/src/core/status-line/status-line-manager.js +11 -5
  75. package/dist/src/core/status-line/status-line-manager.js.map +1 -1
  76. package/dist/src/core/status-line/task-counter.d.ts +69 -0
  77. package/dist/src/core/status-line/task-counter.d.ts.map +1 -0
  78. package/dist/src/core/status-line/task-counter.js +107 -0
  79. package/dist/src/core/status-line/task-counter.js.map +1 -0
  80. package/dist/src/core/workflow/autonomous-executor.d.ts +111 -0
  81. package/dist/src/core/workflow/autonomous-executor.d.ts.map +1 -0
  82. package/dist/src/core/workflow/autonomous-executor.js +275 -0
  83. package/dist/src/core/workflow/autonomous-executor.js.map +1 -0
  84. package/dist/src/core/workflow/backlog-scanner.d.ts +94 -0
  85. package/dist/src/core/workflow/backlog-scanner.d.ts.map +1 -0
  86. package/dist/src/core/workflow/backlog-scanner.js +170 -0
  87. package/dist/src/core/workflow/backlog-scanner.js.map +1 -0
  88. package/dist/src/core/workflow/command-invoker.d.ts +86 -0
  89. package/dist/src/core/workflow/command-invoker.d.ts.map +1 -0
  90. package/dist/src/core/workflow/command-invoker.js +131 -0
  91. package/dist/src/core/workflow/command-invoker.js.map +1 -0
  92. package/dist/src/core/workflow/cost-estimator.d.ts +120 -0
  93. package/dist/src/core/workflow/cost-estimator.d.ts.map +1 -0
  94. package/dist/src/core/workflow/cost-estimator.js +222 -0
  95. package/dist/src/core/workflow/cost-estimator.js.map +1 -0
  96. package/dist/src/core/workflow/index.d.ts +20 -0
  97. package/dist/src/core/workflow/index.d.ts.map +1 -0
  98. package/dist/src/core/workflow/index.js +24 -0
  99. package/dist/src/core/workflow/index.js.map +1 -0
  100. package/dist/src/core/workflow/state-manager.d.ts +107 -0
  101. package/dist/src/core/workflow/state-manager.d.ts.map +1 -0
  102. package/dist/src/core/workflow/state-manager.js +126 -0
  103. package/dist/src/core/workflow/state-manager.js.map +1 -0
  104. package/dist/src/core/workflow/workflow-orchestrator.d.ts +93 -0
  105. package/dist/src/core/workflow/workflow-orchestrator.d.ts.map +1 -0
  106. package/dist/src/core/workflow/workflow-orchestrator.js +195 -0
  107. package/dist/src/core/workflow/workflow-orchestrator.js.map +1 -0
  108. package/dist/src/init/architecture/types.d.ts +10 -10
  109. package/dist/src/metrics/dora-calculator.js +2 -2
  110. package/dist/src/metrics/dora-calculator.js.map +1 -1
  111. package/dist/src/utils/pricing-constants.d.ts +5 -2
  112. package/dist/src/utils/pricing-constants.d.ts.map +1 -1
  113. package/dist/src/utils/pricing-constants.js +3 -2
  114. package/dist/src/utils/pricing-constants.js.map +1 -1
  115. package/package.json +4 -4
  116. package/plugins/specweave/agents/infrastructure/AGENT.md +88 -46
  117. package/plugins/specweave/agents/pm/AGENT.md +58 -1
  118. package/plugins/specweave/commands/specweave-archive-features.md +1 -1
  119. package/plugins/specweave/commands/specweave-archive-increments.md +1 -1
  120. package/plugins/specweave/commands/specweave-check-hooks.md +5 -0
  121. package/plugins/specweave/commands/specweave-done.md +12 -0
  122. package/plugins/specweave/commands/specweave-plan.md +1 -1
  123. package/plugins/specweave/commands/specweave-progress.md +108 -379
  124. package/plugins/specweave/commands/specweave-reopen.md +1 -1
  125. package/plugins/specweave/commands/specweave-restore-feature.md +1 -1
  126. package/plugins/specweave/commands/specweave-sync-specs.md +20 -48
  127. package/plugins/specweave/hooks/lib/update-status-line.sh +44 -35
  128. package/plugins/specweave/hooks/lib/validate-spec-status.sh +163 -0
  129. package/plugins/specweave/hooks/user-prompt-submit.sh +17 -35
  130. package/plugins/specweave/lib/hooks/update-tasks-md.js +52 -9
  131. package/plugins/specweave/lib/hooks/update-tasks-md.ts +77 -16
  132. package/plugins/specweave/templates/iac/aws-lambda/defaults.json +24 -0
  133. package/plugins/specweave/templates/iac/aws-lambda/templates/README.md.hbs +260 -0
  134. package/plugins/specweave/templates/iac/aws-lambda/templates/environments/dev.tfvars.hbs +34 -0
  135. package/plugins/specweave/templates/iac/aws-lambda/templates/environments/prod.tfvars.hbs +37 -0
  136. package/plugins/specweave/templates/iac/aws-lambda/templates/environments/staging.tfvars.hbs +35 -0
  137. package/plugins/specweave/templates/iac/aws-lambda/templates/outputs.tf.hbs +77 -0
  138. package/plugins/specweave/templates/iac/aws-lambda/templates/providers.tf.hbs +36 -0
  139. package/plugins/specweave/templates/iac/aws-lambda/templates/variables.tf.hbs +115 -0
  140. package/plugins/specweave/templates/iac/azure-functions/defaults.json +25 -0
  141. package/plugins/specweave/templates/iac/azure-functions/templates/README.md.hbs +268 -0
  142. package/plugins/specweave/templates/iac/azure-functions/templates/environments/dev.tfvars.hbs +34 -0
  143. package/plugins/specweave/templates/iac/azure-functions/templates/environments/prod.tfvars.hbs +46 -0
  144. package/plugins/specweave/templates/iac/azure-functions/templates/environments/staging.tfvars.hbs +34 -0
  145. package/plugins/specweave/templates/iac/azure-functions/templates/main.tf.hbs +225 -0
  146. package/plugins/specweave/templates/iac/azure-functions/templates/outputs.tf.hbs +89 -0
  147. package/plugins/specweave/templates/iac/azure-functions/templates/provider.tf.hbs +27 -0
  148. package/plugins/specweave/templates/iac/azure-functions/templates/providers.tf.hbs +35 -0
  149. package/plugins/specweave/templates/iac/azure-functions/templates/variables.tf.hbs +124 -0
  150. package/plugins/specweave/templates/iac/firebase/defaults.json +29 -0
  151. package/plugins/specweave/templates/iac/firebase/templates/README.md.hbs +35 -0
  152. package/plugins/specweave/templates/iac/firebase/templates/environments/dev.tfvars.hbs +7 -0
  153. package/plugins/specweave/templates/iac/firebase/templates/environments/prod.tfvars.hbs +7 -0
  154. package/plugins/specweave/templates/iac/firebase/templates/environments/staging.tfvars.hbs +7 -0
  155. package/plugins/specweave/templates/iac/firebase/templates/main.tf.hbs +90 -0
  156. package/plugins/specweave/templates/iac/firebase/templates/outputs.tf.hbs +15 -0
  157. package/plugins/specweave/templates/iac/firebase/templates/providers.tf.hbs +23 -0
  158. package/plugins/specweave/templates/iac/firebase/templates/variables.tf.hbs +42 -0
  159. package/plugins/specweave/templates/iac/gcp-cloud-functions/defaults.json +26 -0
  160. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/README.md.hbs +299 -0
  161. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/dev.tfvars.hbs +36 -0
  162. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/prod.tfvars.hbs +48 -0
  163. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/staging.tfvars.hbs +41 -0
  164. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/main.tf.hbs +192 -0
  165. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/outputs.tf.hbs +66 -0
  166. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/providers.tf.hbs +25 -0
  167. package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/variables.tf.hbs +119 -0
  168. package/plugins/specweave/templates/iac/supabase/defaults.json +15 -0
  169. package/plugins/specweave/templates/iac/supabase/templates/README.md.hbs +46 -0
  170. package/plugins/specweave/templates/iac/supabase/templates/main.tf.hbs +50 -0
  171. package/plugins/specweave-github/agents/github-manager/AGENT.md +39 -7
  172. package/plugins/specweave-github/commands/specweave-github-create-issue.md +5 -5
  173. package/plugins/specweave-github/lib/CodeValidator.ts +1 -1
  174. package/plugins/specweave-github/lib/github-client-v2.js +29 -0
  175. package/plugins/specweave-github/lib/github-client-v2.ts +30 -0
  176. package/plugins/specweave-github/lib/task-sync.js +4 -0
  177. package/plugins/specweave-github/lib/task-sync.ts +7 -0
  178. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  179. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +2022 -0
  180. package/src/templates/CLAUDE.md.template +31 -0
  181. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts +0 -116
  182. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts.map +0 -1
  183. package/dist/src/core/living-docs/ThreeLayerSyncManager.js +0 -356
  184. package/dist/src/core/living-docs/ThreeLayerSyncManager.js.map +0 -1
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Next Command - Intelligent workflow orchestration
3
+ *
4
+ * CLI wrapper for WorkflowOrchestrator and AutonomousExecutor.
5
+ * Provides /specweave:next command functionality.
6
+ *
7
+ * Part of increment 0039: Ultra-Smart Next Command
8
+ *
9
+ * @module cli/commands/next-command
10
+ * @since v0.22.0
11
+ */
12
+ /**
13
+ * Next command configuration
14
+ */
15
+ export interface NextCommandConfig {
16
+ /** Increment ID (auto-detect if not provided) */
17
+ incrementId?: string;
18
+ /** Enable autonomous mode */
19
+ autonomous?: boolean;
20
+ /** Dry-run mode (preview only) */
21
+ dryRun?: boolean;
22
+ /** Verbose output */
23
+ verbose?: boolean;
24
+ /** Force execution with low confidence */
25
+ force?: boolean;
26
+ /** Maximum iterations (autonomous mode) */
27
+ maxIterations?: number;
28
+ /** Maximum cost threshold in USD (autonomous mode) */
29
+ maxCost?: number;
30
+ /** Resume from checkpoint ID (autonomous mode) */
31
+ resumeFrom?: string;
32
+ /** Stop on first error (autonomous mode) */
33
+ stopOnError?: boolean;
34
+ }
35
+ /**
36
+ * Execute next command
37
+ *
38
+ * @param config - Command configuration
39
+ */
40
+ export declare function executeNextCommand(config?: NextCommandConfig): Promise<void>;
41
+ /**
42
+ * Parse command line arguments
43
+ *
44
+ * @param args - Process argv array
45
+ * @returns Parsed configuration
46
+ */
47
+ export declare function parseArgs(args: string[]): NextCommandConfig;
48
+ /**
49
+ * Display help text
50
+ */
51
+ export declare function displayHelp(): void;
52
+ //# sourceMappingURL=next-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/next-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAYtF;AAuHD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAkD3D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAyBlC"}
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Next Command - Intelligent workflow orchestration
3
+ *
4
+ * CLI wrapper for WorkflowOrchestrator and AutonomousExecutor.
5
+ * Provides /specweave:next command functionality.
6
+ *
7
+ * Part of increment 0039: Ultra-Smart Next Command
8
+ *
9
+ * @module cli/commands/next-command
10
+ * @since v0.22.0
11
+ */
12
+ import { WorkflowOrchestrator } from '../../core/workflow/workflow-orchestrator.js';
13
+ import { AutonomousExecutor } from '../../core/workflow/autonomous-executor.js';
14
+ import chalk from 'chalk';
15
+ /**
16
+ * Execute next command
17
+ *
18
+ * @param config - Command configuration
19
+ */
20
+ export async function executeNextCommand(config = {}) {
21
+ try {
22
+ if (config.autonomous) {
23
+ await executeAutonomousMode(config);
24
+ }
25
+ else {
26
+ await executeInteractiveMode(config);
27
+ }
28
+ }
29
+ catch (error) {
30
+ console.error(chalk.red('❌ Error executing next command:'));
31
+ console.error(error instanceof Error ? error.message : String(error));
32
+ process.exit(1);
33
+ }
34
+ }
35
+ /**
36
+ * Execute interactive mode
37
+ *
38
+ * Suggests next action, waits for user confirmation.
39
+ */
40
+ async function executeInteractiveMode(config) {
41
+ console.log(chalk.blue('🔍 Detecting current workflow phase...\n'));
42
+ const orchestrator = new WorkflowOrchestrator();
43
+ const options = {
44
+ verbose: config.verbose,
45
+ dryRun: config.dryRun,
46
+ force: config.force
47
+ };
48
+ const result = await orchestrator.executeNext(config.incrementId, options);
49
+ // Display result
50
+ displayPhaseDetection(result);
51
+ if (result.success && result.command) {
52
+ displaySuggestedAction(result);
53
+ if (!config.dryRun) {
54
+ // In real implementation, would prompt user for confirmation
55
+ console.log(chalk.yellow('\n💡 Run the suggested command above to proceed.'));
56
+ }
57
+ }
58
+ else if (result.error) {
59
+ console.error(chalk.red(`\n❌ ${result.error}`));
60
+ process.exit(1);
61
+ }
62
+ }
63
+ /**
64
+ * Execute autonomous mode
65
+ *
66
+ * Runs complete workflow automatically with safety guardrails.
67
+ */
68
+ async function executeAutonomousMode(config) {
69
+ console.log(chalk.blue('🚀 Starting autonomous execution...\n'));
70
+ const autonomousConfig = {
71
+ maxIterations: config.maxIterations,
72
+ costThreshold: config.maxCost,
73
+ maxRetries: 3,
74
+ stopOnError: config.stopOnError,
75
+ verbose: config.verbose,
76
+ enableCheckpoints: true
77
+ };
78
+ const executor = new AutonomousExecutor(autonomousConfig);
79
+ // Ensure increment ID is provided
80
+ if (!config.incrementId) {
81
+ console.error(chalk.red('❌ Increment ID required for autonomous mode'));
82
+ console.error(chalk.yellow('Usage: /specweave:next --autonomous <increment-id>'));
83
+ process.exit(1);
84
+ }
85
+ const result = await executor.execute(config.incrementId, config.resumeFrom);
86
+ // Display result
87
+ displayAutonomousResult(result);
88
+ if (!result.success) {
89
+ process.exit(1);
90
+ }
91
+ }
92
+ /**
93
+ * Display phase detection result
94
+ */
95
+ function displayPhaseDetection(result) {
96
+ console.log(chalk.cyan(`📊 Phase: ${result.phase}`) + chalk.gray(` (confidence: ${(result.confidence * 100).toFixed(0)}%)`));
97
+ if (result.reasoning) {
98
+ console.log(chalk.gray(`\n${result.reasoning}`));
99
+ }
100
+ }
101
+ /**
102
+ * Display suggested action
103
+ */
104
+ function displaySuggestedAction(result) {
105
+ console.log(chalk.green(`\n🎯 Suggested action: ${result.action}`));
106
+ if (result.command) {
107
+ console.log(chalk.white(`💡 Command: ${chalk.bold(result.command)}`));
108
+ }
109
+ }
110
+ /**
111
+ * Display autonomous execution result
112
+ */
113
+ function displayAutonomousResult(result) {
114
+ if (result.success) {
115
+ console.log(chalk.green('\n✅ Autonomous execution completed successfully!\n'));
116
+ }
117
+ else {
118
+ console.log(chalk.red('\n❌ Autonomous execution failed\n'));
119
+ }
120
+ console.log(chalk.cyan('📊 Execution Summary:'));
121
+ console.log(` • Iterations: ${result.iterations}`);
122
+ console.log(` • Commands executed: ${result.commandsExecuted.length}`);
123
+ console.log(` • Total cost: $${result.totalCost.toFixed(2)}`);
124
+ console.log(` • Final phase: ${result.finalPhase}`);
125
+ console.log(` • Reason: ${result.reason}`);
126
+ if (result.commandsExecuted.length > 0) {
127
+ console.log(chalk.cyan('\n📝 Commands executed:'));
128
+ result.commandsExecuted.forEach((cmd, i) => {
129
+ console.log(` ${i + 1}. ${cmd}`);
130
+ });
131
+ }
132
+ }
133
+ /**
134
+ * Parse command line arguments
135
+ *
136
+ * @param args - Process argv array
137
+ * @returns Parsed configuration
138
+ */
139
+ export function parseArgs(args) {
140
+ const config = {};
141
+ for (let i = 0; i < args.length; i++) {
142
+ const arg = args[i];
143
+ switch (arg) {
144
+ case '--autonomous':
145
+ config.autonomous = true;
146
+ break;
147
+ case '--dry-run':
148
+ config.dryRun = true;
149
+ break;
150
+ case '--verbose':
151
+ case '-v':
152
+ config.verbose = true;
153
+ break;
154
+ case '--force':
155
+ config.force = true;
156
+ break;
157
+ case '--stop-on-error':
158
+ config.stopOnError = true;
159
+ break;
160
+ case '--max-iterations':
161
+ config.maxIterations = parseInt(args[++i], 10);
162
+ break;
163
+ case '--max-cost':
164
+ config.maxCost = parseFloat(args[++i]);
165
+ break;
166
+ case '--resume-from':
167
+ config.resumeFrom = args[++i];
168
+ break;
169
+ default:
170
+ // Assume it's the increment ID
171
+ if (!arg.startsWith('-')) {
172
+ config.incrementId = arg;
173
+ }
174
+ break;
175
+ }
176
+ }
177
+ return config;
178
+ }
179
+ /**
180
+ * Display help text
181
+ */
182
+ export function displayHelp() {
183
+ console.log(chalk.bold('\n/specweave:next - Intelligent Workflow Orchestrator\n'));
184
+ console.log(chalk.cyan('Usage:'));
185
+ console.log(' /specweave:next [options] [increment-id]\n');
186
+ console.log(chalk.cyan('Modes:'));
187
+ console.log(' Interactive (default) Suggests next action, waits for confirmation');
188
+ console.log(' --autonomous Executes full workflow automatically\n');
189
+ console.log(chalk.cyan('Options:'));
190
+ console.log(' --dry-run Preview actions without executing');
191
+ console.log(' --verbose, -v Show detailed execution information');
192
+ console.log(' --force Execute even with low confidence');
193
+ console.log(' --stop-on-error Stop on first error (autonomous mode)');
194
+ console.log(' --max-iterations <n> Maximum iterations (default: 50)');
195
+ console.log(' --max-cost <amount> Maximum cost in USD (default: $20)');
196
+ console.log(' --resume-from <id> Resume from checkpoint\n');
197
+ console.log(chalk.cyan('Examples:'));
198
+ console.log(' /specweave:next # Interactive mode, auto-detect increment');
199
+ console.log(' /specweave:next 0039 # Interactive mode, specific increment');
200
+ console.log(' /specweave:next --autonomous 0039 # Autonomous mode');
201
+ console.log(' /specweave:next --dry-run --verbose # Preview with details');
202
+ console.log(' /specweave:next --autonomous --max-cost 10 # Autonomous with cost limit\n');
203
+ }
204
+ //# sourceMappingURL=next-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-command.js","sourceRoot":"","sources":["../../../../src/cli/commands/next-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,oBAAoB,EAA0B,MAAM,8CAA8C,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAoB,MAAM,4CAA4C,CAAC;AAClG,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,SAA4B,EAAE;IACrE,IAAI,CAAC;QACH,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACtB,MAAM,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,MAAM,sBAAsB,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,sBAAsB,CAAC,MAAyB;IAC7D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAEhD,MAAM,OAAO,GAA2B;QACtC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE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+ incrementId?: string;
8
+ all?: boolean;
9
+ force?: boolean;
10
+ dryRun?: boolean;
11
+ }
12
+ /**
13
+ * Sync specs command entry point
14
+ */
15
+ export declare function syncSpecs(args: string[]): Promise<void>;
16
+ //# sourceMappingURL=sync-specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-specs.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/sync-specs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiE7D"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * CLI Command: sync-specs
3
+ *
4
+ * Syncs increment specifications to living docs structure
5
+ */
6
+ import fs from 'fs-extra';
7
+ import path from 'path';
8
+ import { LivingDocsSync } from '../../core/living-docs/living-docs-sync.js';
9
+ /**
10
+ * Sync specs command entry point
11
+ */
12
+ export async function syncSpecs(args) {
13
+ const parsedArgs = parseArgs(args);
14
+ const projectRoot = process.cwd();
15
+ const sync = new LivingDocsSync(projectRoot);
16
+ try {
17
+ if (parsedArgs.all) {
18
+ // Sync all completed increments
19
+ console.log('🔄 Syncing all completed increments...\n');
20
+ const increments = await findCompletedIncrements(projectRoot);
21
+ let successCount = 0;
22
+ let failCount = 0;
23
+ for (const incrementId of increments) {
24
+ try {
25
+ const result = await sync.syncIncrement(incrementId, {
26
+ dryRun: parsedArgs.dryRun,
27
+ force: parsedArgs.force
28
+ });
29
+ if (result.success) {
30
+ successCount++;
31
+ }
32
+ else {
33
+ failCount++;
34
+ console.error(` ❌ Failed: ${result.errors.join(', ')}`);
35
+ }
36
+ }
37
+ catch (error) {
38
+ failCount++;
39
+ console.error(` ❌ Failed to sync ${incrementId}:`, error);
40
+ }
41
+ }
42
+ console.log(`\n✅ Sync complete: ${successCount} succeeded, ${failCount} failed`);
43
+ }
44
+ else {
45
+ // Sync single increment
46
+ const incrementId = parsedArgs.incrementId || await findLatestCompletedIncrement(projectRoot);
47
+ if (!incrementId) {
48
+ console.error('❌ No increment specified and no completed increments found');
49
+ process.exit(1);
50
+ }
51
+ const result = await sync.syncIncrement(incrementId, {
52
+ dryRun: parsedArgs.dryRun,
53
+ force: parsedArgs.force
54
+ });
55
+ if (!result.success) {
56
+ console.error('❌ Sync failed:', result.errors.join(', '));
57
+ process.exit(1);
58
+ }
59
+ console.log('\n✅ Sync complete!');
60
+ if (parsedArgs.dryRun) {
61
+ console.log(' (Dry run - no files were actually created)');
62
+ }
63
+ }
64
+ }
65
+ catch (error) {
66
+ console.error('❌ Sync failed:', error);
67
+ process.exit(1);
68
+ }
69
+ }
70
+ /**
71
+ * Parse command-line arguments
72
+ */
73
+ function parseArgs(args) {
74
+ const parsed = {};
75
+ for (let i = 0; i < args.length; i++) {
76
+ const arg = args[i];
77
+ if (arg === '--all') {
78
+ parsed.all = true;
79
+ }
80
+ else if (arg === '--force') {
81
+ parsed.force = true;
82
+ }
83
+ else if (arg === '--dry-run') {
84
+ parsed.dryRun = true;
85
+ }
86
+ else if (!arg.startsWith('--')) {
87
+ // Assume it's the increment ID
88
+ parsed.incrementId = arg;
89
+ }
90
+ }
91
+ return parsed;
92
+ }
93
+ /**
94
+ * Find all completed increments
95
+ */
96
+ async function findCompletedIncrements(projectRoot) {
97
+ const incrementsDir = path.join(projectRoot, '.specweave/increments');
98
+ if (!await fs.pathExists(incrementsDir)) {
99
+ return [];
100
+ }
101
+ const entries = await fs.readdir(incrementsDir);
102
+ const completed = [];
103
+ for (const entry of entries) {
104
+ if (!entry.match(/^\d{4}-/))
105
+ continue;
106
+ const metadataPath = path.join(incrementsDir, entry, 'metadata.json');
107
+ const specPath = path.join(incrementsDir, entry, 'spec.md');
108
+ // Skip if no spec.md
109
+ if (!await fs.pathExists(specPath)) {
110
+ console.log(` ⚠️ Skipping ${entry} (no spec.md)`);
111
+ continue;
112
+ }
113
+ // Check if completed
114
+ if (await fs.pathExists(metadataPath)) {
115
+ const metadata = await fs.readJson(metadataPath);
116
+ if (metadata.status === 'completed') {
117
+ completed.push(entry);
118
+ }
119
+ }
120
+ }
121
+ return completed.sort();
122
+ }
123
+ /**
124
+ * Find latest completed increment
125
+ */
126
+ async function findLatestCompletedIncrement(projectRoot) {
127
+ const completed = await findCompletedIncrements(projectRoot);
128
+ return completed.length > 0 ? completed[completed.length - 1] : null;
129
+ }
130
+ //# sourceMappingURL=sync-specs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-specs.js","sourceRoot":"","sources":["../../../../src/cli/commands/sync-specs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAe,MAAM,4CAA4C,CAAC;AASzF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAElC,MAAM,IAAI,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;IAE7C,IAAI,CAAC;QACH,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC;YACnB,gCAAgC;YAChC,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,MAAM,uBAAuB,CAAC,WAAW,CAAC,CAAC;YAE9D,IAAI,YAAY,GAAG,CAAC,CAAC;YACrB,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE,CAAC;gBACrC,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CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC"}
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Count Tasks CLI
4
+ *
5
+ * CLI utility for counting tasks in tasks.md files.
6
+ * Used by status line hook to get accurate task counts.
7
+ *
8
+ * Usage:
9
+ * count-tasks <path-to-tasks.md>
10
+ *
11
+ * Output (JSON):
12
+ * {"total": 23, "completed": 15, "percentage": 65}
13
+ *
14
+ * Exit codes:
15
+ * 0 - Success
16
+ * 1 - File not found or read error
17
+ * 2 - Invalid arguments
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=count-tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tasks.d.ts","sourceRoot":"","sources":["../../../src/cli/count-tasks.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Count Tasks CLI
4
+ *
5
+ * CLI utility for counting tasks in tasks.md files.
6
+ * Used by status line hook to get accurate task counts.
7
+ *
8
+ * Usage:
9
+ * count-tasks <path-to-tasks.md>
10
+ *
11
+ * Output (JSON):
12
+ * {"total": 23, "completed": 15, "percentage": 65}
13
+ *
14
+ * Exit codes:
15
+ * 0 - Success
16
+ * 1 - File not found or read error
17
+ * 2 - Invalid arguments
18
+ */
19
+ import * as fs from 'fs/promises';
20
+ import { TaskCounter } from '../core/status-line/task-counter.js';
21
+ async function main() {
22
+ // Parse arguments
23
+ const args = process.argv.slice(2);
24
+ if (args.length === 0) {
25
+ console.error('Usage: count-tasks <path-to-tasks.md>');
26
+ process.exit(2);
27
+ }
28
+ const tasksFilePath = args[0];
29
+ try {
30
+ // Read tasks.md
31
+ const content = await fs.readFile(tasksFilePath, 'utf8');
32
+ // Count tasks
33
+ const counts = TaskCounter.countTasks(content);
34
+ // Output JSON
35
+ console.log(JSON.stringify(counts));
36
+ process.exit(0);
37
+ }
38
+ catch (error) {
39
+ if (error.code === 'ENOENT') {
40
+ // File not found - output zero counts (graceful fallback)
41
+ console.log(JSON.stringify({ total: 0, completed: 0, percentage: 0 }));
42
+ process.exit(0);
43
+ }
44
+ // Other errors
45
+ console.error(`Error reading tasks file: ${error.message}`);
46
+ process.exit(1);
47
+ }
48
+ }
49
+ main();
50
+ //# sourceMappingURL=count-tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tasks.js","sourceRoot":"","sources":["../../../src/cli/count-tasks.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,KAAK,UAAU,IAAI;IACjB,kBAAkB;IAClB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAI,CAAC;QACH,gBAAgB;QAChB,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEzD,cAAc;QACd,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAE/C,cAAc;QACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IA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eAAe,CAAC;CAa5B"}
1
+ {"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../../../src/config/ConfigManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,eAAe,EAAyB,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpF;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAa;IACxB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAA4B;IAE/D;;;;;;OAMG;WACU,IAAI,CAAC,UAAU,GAAE,MAAkC,GAAG,OAAO,CAAC,eAAe,CAAC;IAiB3F;;;;;OAKG;WACU,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,GAAE,MAAkC,GAAG,OAAO,CAAC,IAAI,CAAC;IAezG;;;;;;;OAOG;WACU,cAAc,CACzB,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,EAChC,UAAU,GAAE,MAAkC,GAC7C,OAAO,CAAC,IAAI,CAAC;IAsBhB;;;;;OAKG;WACU,MAAM,CAAC,UAAU,GAAE,MAAkC,GAAG,OAAO,CAAC,OAAO,CAAC;IASrF;;;;;;OAMG;WACU,UAAU,CACrB,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,MAAkC,GAC7C,OAAO,CAAC,eAAe,CAAC;CAa5B"}
@@ -82,7 +82,8 @@ export class ConfigManager {
82
82
  await ConfigManager.save(config, configPath);
83
83
  }
84
84
  catch (error) {
85
- if (error.code === 'ENOENT') {
85
+ const errorMessage = error.message || '';
86
+ if (error.code === 'ENOENT' || errorMessage.includes('Config file not found')) {
86
87
  throw new Error(`Cannot update research: config file not found. Run 'specweave init' first.`);
87
88
  }
88
89
  throw error;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigManager.js","sourceRoot":"","sources":["../../../src/config/ConfigManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,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