vibecodingmachine-cli 2026.3.14-1537 → 2026.6.17-1956

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 (162) hide show
  1. package/bin/auth/auth-compliance.js +7 -7
  2. package/bin/commands/agent-commands.js +15 -15
  3. package/bin/commands/auto-commands.js +3 -3
  4. package/bin/commands/command-aliases.js +13 -4
  5. package/bin/config/cli-config.js +15 -5
  6. package/bin/update/update-checker.js +5 -5
  7. package/bin/vibecodingmachine.js +2 -2
  8. package/package.json +2 -2
  9. package/src/commands/agents/add.js +5 -5
  10. package/src/commands/agents/check.js +19 -19
  11. package/src/commands/agents/list.js +24 -24
  12. package/src/commands/agents/remove.js +4 -4
  13. package/src/commands/agents-check.js +1 -1
  14. package/src/commands/analyze-file-sizes.js +43 -43
  15. package/src/commands/auto-direct/auto-provider-manager.js +19 -19
  16. package/src/commands/auto-direct/auto-start-phases.js +493 -0
  17. package/src/commands/auto-direct/auto-status-display.js +35 -35
  18. package/src/commands/auto-direct/auto-utils.js +50 -50
  19. package/src/commands/auto-direct/cline-installer.js +56 -0
  20. package/src/commands/auto-direct/code-processor.js +27 -27
  21. package/src/commands/auto-direct/file-scanner.js +19 -19
  22. package/src/commands/auto-direct/ide-completion-waiter.js +485 -0
  23. package/src/commands/auto-direct/ide-fallback-runner.js +226 -0
  24. package/src/commands/auto-direct/ide-provider-runner.js +103 -0
  25. package/src/commands/auto-direct/iteration-handlers.js +189 -0
  26. package/src/commands/auto-direct/iteration-runner.js +485 -0
  27. package/src/commands/auto-direct/provider-config.js +38 -7
  28. package/src/commands/auto-direct/provider-manager.js +132 -6
  29. package/src/commands/auto-direct/requirement-manager.js +169 -104
  30. package/src/commands/auto-direct/requirement-mover.js +350 -0
  31. package/src/commands/auto-direct/spec-handlers.js +155 -0
  32. package/src/commands/auto-direct/spec-ide-runner.js +318 -0
  33. package/src/commands/auto-direct/spec-processing.js +203 -0
  34. package/src/commands/auto-direct/status-display.js +9 -9
  35. package/src/commands/auto-direct/utils.js +83 -1
  36. package/src/commands/auto-direct-refactored.js +1 -413
  37. package/src/commands/auto-direct.js +127 -4119
  38. package/src/commands/auto-execution.js +21 -21
  39. package/src/commands/auto-status-helpers.js +0 -2
  40. package/src/commands/auto.js +22 -22
  41. package/src/commands/check-compliance.js +65 -65
  42. package/src/commands/computers.js +39 -39
  43. package/src/commands/continuous-scan.js +19 -19
  44. package/src/commands/ide.js +4 -4
  45. package/src/commands/locale.js +7 -7
  46. package/src/commands/refactor-file.js +59 -59
  47. package/src/commands/requirements/commands.js +17 -17
  48. package/src/commands/requirements/default-handlers.js +30 -30
  49. package/src/commands/requirements/disable.js +3 -3
  50. package/src/commands/requirements/enable.js +3 -3
  51. package/src/commands/requirements/utils.js +6 -6
  52. package/src/commands/requirements-refactored.js +3 -3
  53. package/src/commands/requirements-remote.js +38 -38
  54. package/src/commands/requirements.js +3 -3
  55. package/src/commands/settings.js +111 -0
  56. package/src/commands/specs/count.js +60 -0
  57. package/src/commands/specs/disable.js +3 -3
  58. package/src/commands/specs/enable.js +3 -3
  59. package/src/commands/status.js +10 -10
  60. package/src/commands/sync.js +25 -25
  61. package/src/commands/timeout.js +35 -35
  62. package/src/trui/TruiInterface.js +2 -2
  63. package/src/trui/agents/AgentInterface.js +4 -4
  64. package/src/trui/agents/handlers/CommandHandler.js +4 -4
  65. package/src/trui/agents/handlers/ContextManager.js +1 -1
  66. package/src/trui/agents/handlers/DisplayHandler.js +11 -11
  67. package/src/trui/agents/handlers/HelpHandler.js +1 -1
  68. package/src/utils/agent-selector.js +6 -6
  69. package/src/utils/antigravity-installer.js +4 -4
  70. package/src/utils/asset-cleanup.js +1 -1
  71. package/src/utils/auth.js +9 -12
  72. package/src/utils/clarification-actions.js +4 -4
  73. package/src/utils/cline-js-handler.js +5 -5
  74. package/src/utils/compliance-check.js +6 -6
  75. package/src/utils/config.js +12 -12
  76. package/src/utils/display-formatters-complete.js +2 -2
  77. package/src/utils/display-formatters-extracted.js +2 -2
  78. package/src/utils/display-formatters.js +2 -2
  79. package/src/utils/feedback-handler.js +2 -2
  80. package/src/utils/first-run.js +7 -7
  81. package/src/utils/ide-detection.js +1 -1
  82. package/src/utils/ide-handlers.js +6 -6
  83. package/src/utils/interactive/clarification-actions.js +3 -3
  84. package/src/utils/interactive/core-ui.js +7 -7
  85. package/src/utils/interactive/file-backup.js +6 -6
  86. package/src/utils/interactive/file-import-export.js +49 -49
  87. package/src/utils/interactive/file-operations.js +3 -3
  88. package/src/utils/interactive/file-validation.js +41 -41
  89. package/src/utils/interactive/interactive-prompts.js +41 -41
  90. package/src/utils/interactive/requirement-actions.js +5 -5
  91. package/src/utils/interactive/requirement-crud.js +4 -4
  92. package/src/utils/interactive/requirements-navigation.js +10 -10
  93. package/src/utils/interactive-broken.js +6 -6
  94. package/src/utils/interactive.js +37 -37
  95. package/src/utils/keyboard-handler.js +4 -4
  96. package/src/utils/prompt-helper.js +6 -6
  97. package/src/utils/provider-checker/agent-checker.js +1 -1
  98. package/src/utils/provider-checker/agent-runner.js +203 -314
  99. package/src/utils/provider-checker/agents-file-lock.js +134 -0
  100. package/src/utils/provider-checker/agents-manager.js +224 -36
  101. package/src/utils/provider-checker/cli-installer.js +28 -28
  102. package/src/utils/provider-checker/cli-utils.js +2 -2
  103. package/src/utils/provider-checker/cursor-approval-clicker.js +108 -0
  104. package/src/utils/provider-checker/format-utils.js +4 -4
  105. package/src/utils/provider-checker/ide-installer-helper.js +96 -0
  106. package/src/utils/provider-checker/ide-manager.js +19 -8
  107. package/src/utils/provider-checker/ide-quota-checker.js +120 -0
  108. package/src/utils/provider-checker/ide-utils.js +2 -2
  109. package/src/utils/provider-checker/node-detector.js +4 -4
  110. package/src/utils/provider-checker/node-utils.js +5 -5
  111. package/src/utils/provider-checker/opencode-checker.js +107 -73
  112. package/src/utils/provider-checker/process-utils.js +1 -1
  113. package/src/utils/provider-checker/provider-validator.js +11 -11
  114. package/src/utils/provider-checker/quota-checker.js +5 -5
  115. package/src/utils/provider-checker/quota-detector.js +5 -5
  116. package/src/utils/provider-checker/requirements-manager.js +6 -6
  117. package/src/utils/provider-checker/test-requirements.js +1 -1
  118. package/src/utils/provider-checker/vscode-approval-clicker.js +328 -0
  119. package/src/utils/provider-checker-new.js +6 -6
  120. package/src/utils/provider-checker.js +6 -6
  121. package/src/utils/provider-checkers/ide-manager.js +13 -13
  122. package/src/utils/provider-checkers/node-executable-finder.js +4 -4
  123. package/src/utils/provider-checkers/provider-checker-core.js +5 -5
  124. package/src/utils/provider-checkers/provider-checker-main.js +17 -17
  125. package/src/utils/provider-registry.js +5 -6
  126. package/src/utils/provider-utils.js +12 -12
  127. package/src/utils/quota-detectors.js +32 -32
  128. package/src/utils/requirement-action-handlers.js +12 -12
  129. package/src/utils/requirement-actions/requirement-operations.js +3 -3
  130. package/src/utils/requirement-actions.js +1 -1
  131. package/src/utils/requirement-file-operations.js +5 -5
  132. package/src/utils/requirement-helpers.js +1 -1
  133. package/src/utils/requirement-management.js +5 -5
  134. package/src/utils/requirement-navigation.js +2 -2
  135. package/src/utils/requirement-organization.js +3 -3
  136. package/src/utils/rui-trui-adapter.js +14 -14
  137. package/src/utils/simple-trui.js +3 -3
  138. package/src/utils/status-helpers-extracted.js +3 -3
  139. package/src/utils/trui-clarifications.js +11 -11
  140. package/src/utils/trui-debug.js +3 -2
  141. package/src/utils/trui-devin.js +217 -0
  142. package/src/utils/trui-feedback.js +7 -7
  143. package/src/utils/trui-kiro-integration.js +34 -34
  144. package/src/utils/trui-main-handlers.js +20 -21
  145. package/src/utils/trui-main-menu.js +19 -19
  146. package/src/utils/trui-nav-agents.js +59 -8
  147. package/src/utils/trui-nav-requirements.js +3 -3
  148. package/src/utils/trui-nav-settings.js +10 -10
  149. package/src/utils/trui-nav-specifications.js +1 -1
  150. package/src/utils/trui-navigation-backup.js +11 -11
  151. package/src/utils/trui-navigation.js +9 -9
  152. package/src/utils/trui-provider-health.js +25 -25
  153. package/src/utils/trui-provider-manager.js +28 -28
  154. package/src/utils/trui-quick-menu.js +2 -2
  155. package/src/utils/trui-req-actions-backup.js +21 -21
  156. package/src/utils/trui-req-actions.js +20 -20
  157. package/src/utils/trui-req-editor.js +10 -10
  158. package/src/utils/trui-req-file-ops.js +3 -3
  159. package/src/utils/trui-req-tree.js +7 -7
  160. package/src/utils/trui-windsurf.js +103 -103
  161. package/src/utils/user-tracking.js +15 -15
  162. package/src/utils/trui-req-tree-old.js +0 -719
@@ -7,36 +7,36 @@ const fs = require('fs-extra');
7
7
  */
8
8
  async function validateRequirementsFile() {
9
9
  const reqPath = await getRequirementsPath();
10
-
10
+
11
11
  if (!await fs.pathExists(reqPath)) {
12
12
  console.log(chalk.red('❌ Requirements file not found'));
13
13
  return false;
14
14
  }
15
-
15
+
16
16
  try {
17
17
  const content = await fs.readFile(reqPath, 'utf8');
18
18
  const lines = content.split('\n');
19
-
19
+
20
20
  const issues = [];
21
21
  let hasTodoSection = false;
22
22
  let hasVerifySection = false;
23
23
  let hasStatusSection = false;
24
-
24
+
25
25
  for (let i = 0; i < lines.length; i++) {
26
26
  const line = lines[i].trim();
27
-
27
+
28
28
  if (line.includes('Requirements not yet completed')) {
29
29
  hasTodoSection = true;
30
30
  }
31
-
31
+
32
32
  if (line.includes('Verified by AI screenshot')) {
33
33
  hasVerifySection = true;
34
34
  }
35
-
35
+
36
36
  if (line.includes('🚦 Current Status')) {
37
37
  hasStatusSection = true;
38
38
  }
39
-
39
+
40
40
  // Check for malformed requirement lines
41
41
  if (line && !line.startsWith('#') && !line.startsWith('-') && !line.startsWith('[') && !line.startsWith('```')) {
42
42
  if (i > 0 && !lines[i-1].trim().startsWith('#')) {
@@ -44,21 +44,21 @@ async function validateRequirementsFile() {
44
44
  }
45
45
  }
46
46
  }
47
-
47
+
48
48
  console.log(chalk.bold('\n🔍 Requirements File Validation\n'));
49
-
49
+
50
50
  if (!hasTodoSection) {
51
51
  issues.push('Missing TODO section');
52
52
  }
53
-
53
+
54
54
  if (!hasVerifySection) {
55
55
  issues.push('Missing verification section');
56
56
  }
57
-
57
+
58
58
  if (!hasStatusSection) {
59
59
  issues.push('Missing status section');
60
60
  }
61
-
61
+
62
62
  if (issues.length === 0) {
63
63
  console.log(chalk.green('✅ Requirements file format is valid\n'));
64
64
  return true;
@@ -79,15 +79,15 @@ async function validateRequirementsFile() {
79
79
  */
80
80
  async function getRequirementsStats() {
81
81
  const reqPath = await getRequirementsPath();
82
-
82
+
83
83
  if (!await fs.pathExists(reqPath)) {
84
84
  return null;
85
85
  }
86
-
86
+
87
87
  try {
88
88
  const content = await fs.readFile(reqPath, 'utf8');
89
89
  const lines = content.split('\n');
90
-
90
+
91
91
  const stats = {
92
92
  totalLines: lines.length,
93
93
  todoCount: 0,
@@ -97,12 +97,12 @@ async function getRequirementsStats() {
97
97
  totalRequirements: 0,
98
98
  lastModified: (await fs.stat(reqPath)).mtime
99
99
  };
100
-
100
+
101
101
  let currentSection = null;
102
-
102
+
103
103
  for (const line of lines) {
104
104
  const trimmed = line.trim();
105
-
105
+
106
106
  if (trimmed.includes('Requirements not yet completed')) {
107
107
  currentSection = 'todo';
108
108
  } else if (trimmed.includes('Verified by AI screenshot')) {
@@ -113,7 +113,7 @@ async function getRequirementsStats() {
113
113
  currentSection = 'recycled';
114
114
  } else if (trimmed.startsWith('- ')) {
115
115
  stats.totalRequirements++;
116
-
116
+
117
117
  switch (currentSection) {
118
118
  case 'todo':
119
119
  stats.todoCount++;
@@ -130,7 +130,7 @@ async function getRequirementsStats() {
130
130
  }
131
131
  }
132
132
  }
133
-
133
+
134
134
  return stats;
135
135
  } catch (error) {
136
136
  console.error(chalk.red('❌ Error getting requirements stats:'), error.message);
@@ -143,25 +143,25 @@ async function getRequirementsStats() {
143
143
  */
144
144
  async function checkDuplicateRequirements() {
145
145
  const reqPath = await getRequirementsPath();
146
-
146
+
147
147
  if (!await fs.pathExists(reqPath)) {
148
148
  console.log(chalk.red('❌ Requirements file not found'));
149
149
  return [];
150
150
  }
151
-
151
+
152
152
  try {
153
153
  const content = await fs.readFile(reqPath, 'utf8');
154
154
  const lines = content.split('\n');
155
-
155
+
156
156
  const requirements = [];
157
157
  const duplicates = [];
158
-
158
+
159
159
  for (const line of lines) {
160
160
  const trimmed = line.trim();
161
161
  if (trimmed.startsWith('- ')) {
162
162
  const requirement = trimmed.substring(2);
163
163
  const normalized = requirement.toLowerCase().replace(/\s+/g, ' ').trim();
164
-
164
+
165
165
  if (requirements[normalized]) {
166
166
  duplicates.push({
167
167
  requirement,
@@ -176,11 +176,11 @@ async function checkDuplicateRequirements() {
176
176
  }
177
177
  }
178
178
  }
179
-
179
+
180
180
  if (duplicates.length > 0) {
181
181
  console.log(chalk.bold('\n🔍 Duplicate Requirements Found\n'));
182
182
  console.log(chalk.yellow(`Found ${duplicates.length} duplicate(s):\n`));
183
-
183
+
184
184
  duplicates.forEach((dup, index) => {
185
185
  console.log(chalk.cyan(`${index + 1}. "${dup.requirement}"`));
186
186
  console.log(chalk.gray(` Original: Line ${dup.originalLine}`));
@@ -189,7 +189,7 @@ async function checkDuplicateRequirements() {
189
189
  } else {
190
190
  console.log(chalk.green('\n✅ No duplicate requirements found\n'));
191
191
  }
192
-
192
+
193
193
  return duplicates;
194
194
  } catch (error) {
195
195
  console.error(chalk.red('❌ Error checking duplicates:'), error.message);
@@ -202,42 +202,42 @@ async function checkDuplicateRequirements() {
202
202
  */
203
203
  async function checkOrphanedResponses() {
204
204
  const reqPath = await getRequirementsPath();
205
-
205
+
206
206
  if (!await fs.pathExists(reqPath)) {
207
207
  console.log(chalk.red('❌ Requirements file not found'));
208
208
  return [];
209
209
  }
210
-
210
+
211
211
  try {
212
212
  const content = await fs.readFile(reqPath, 'utf8');
213
213
  const lines = content.split('\n');
214
-
214
+
215
215
  const orphanedResponses = [];
216
216
  let inClarificationSection = false;
217
217
  let lastRequirement = null;
218
-
218
+
219
219
  for (let i = 0; i < lines.length; i++) {
220
220
  const line = lines[i].trim();
221
-
221
+
222
222
  if (line.includes('Needs clarification')) {
223
223
  inClarificationSection = true;
224
224
  continue;
225
225
  }
226
-
226
+
227
227
  if (line.startsWith('##') && !line.includes('Needs clarification')) {
228
228
  inClarificationSection = false;
229
229
  lastRequirement = null;
230
230
  continue;
231
231
  }
232
-
232
+
233
233
  if (line.startsWith('- ')) {
234
234
  lastRequirement = line;
235
235
  continue;
236
236
  }
237
-
237
+
238
238
  if (line.startsWith(' - ')) {
239
239
  const response = line.substring(4).trim();
240
-
240
+
241
241
  if (!lastRequirement) {
242
242
  orphanedResponses.push({
243
243
  response,
@@ -247,11 +247,11 @@ async function checkOrphanedResponses() {
247
247
  }
248
248
  }
249
249
  }
250
-
250
+
251
251
  if (orphanedResponses.length > 0) {
252
252
  console.log(chalk.bold('\n🔍 Orphaned Responses Found\n'));
253
253
  console.log(chalk.yellow(`Found ${orphanedResponses.length} orphaned response(s):\n`));
254
-
254
+
255
255
  orphanedResponses.forEach((orphan, index) => {
256
256
  console.log(chalk.cyan(`${index + 1}. "${orphan.response}"`));
257
257
  console.log(chalk.gray(` Line: ${orphan.line}`));
@@ -260,7 +260,7 @@ async function checkOrphanedResponses() {
260
260
  } else {
261
261
  console.log(chalk.green('\n✅ No orphaned responses found\n'));
262
262
  }
263
-
263
+
264
264
  return orphanedResponses;
265
265
  } catch (error) {
266
266
  console.error(chalk.red('❌ Error checking orphaned responses:'), error.message);
@@ -9,25 +9,25 @@ const os = require('os');
9
9
  */
10
10
  async function showWelcomeScreen() {
11
11
  const repoPath = process.cwd(); // Always use current working directory
12
-
12
+
13
13
  // System information
14
14
  const platform = os.platform();
15
15
  const arch = os.arch();
16
16
  const nodeVersion = process.version;
17
17
  const hostname = os.hostname();
18
-
18
+
19
19
  // Package information
20
20
  const pkg = require('../../package.json');
21
21
  const version = pkg.version;
22
-
22
+
23
23
  // Check if in Vibe Coding Machine directory
24
24
  const { checkVibeCodingMachineExists, requirementsExists, isComputerNameEnabled } = require('vibecodingmachine-core');
25
25
  const isVCMDir = await checkVibeCodingMachineExists(repoPath);
26
26
  const hasRequirements = await requirementsExists();
27
27
  const computerNameEnabled = isComputerNameEnabled();
28
-
28
+
29
29
  console.clear();
30
-
30
+
31
31
  const welcomeText = chalk.bold.cyan(`
32
32
  ╔══════════════════════════════════════════════════════════════╗
33
33
  ║ 🚀 Vibe Coding Machine ║
@@ -42,12 +42,12 @@ ${chalk.bold('🏷️ Computer Name:')} ${computerNameEnabled ? chalk.green('
42
42
  `);
43
43
 
44
44
  console.log(welcomeText);
45
-
45
+
46
46
  if (!isVCMDir) {
47
47
  console.log(chalk.yellow('\n⚠️ You are not in a Vibe Coding Machine directory.'));
48
48
  console.log(chalk.gray(' Some features may not be available.\n'));
49
49
  }
50
-
50
+
51
51
  if (!hasRequirements && isVCMDir) {
52
52
  console.log(chalk.yellow('\n⚠️ No requirements file found.'));
53
53
  console.log(chalk.gray(' Run "vibe init" to create one.\n'));
@@ -60,7 +60,7 @@ ${chalk.bold('🏷️ Computer Name:')} ${computerNameEnabled ? chalk.green('
60
60
  async function showMainMenu() {
61
61
  const { checkAutoModeStatus } = require('../auto-mode');
62
62
  const autoModeStatus = await checkAutoModeStatus();
63
-
63
+
64
64
  const choices = [
65
65
  { name: '📋 Navigate Requirements', value: 'requirements' },
66
66
  { name: '🔍 Search Requirements', value: 'search' },
@@ -73,9 +73,9 @@ async function showMainMenu() {
73
73
 
74
74
  // Add auto mode option if available
75
75
  if (autoModeStatus.available) {
76
- choices.splice(-2, 0, {
77
- name: autoModeStatus.running ? '⏹️ Stop Auto Mode' : '▶️ Start Auto Mode',
78
- value: 'auto-mode'
76
+ choices.splice(-2, 0, {
77
+ name: autoModeStatus.running ? '⏹️ Stop Auto Mode' : '▶️ Start Auto Mode',
78
+ value: 'auto-mode'
79
79
  });
80
80
  }
81
81
 
@@ -121,10 +121,10 @@ async function showSettingsMenu() {
121
121
  */
122
122
  async function showComputerNameSettings() {
123
123
  const { getHostname, setHostname, isComputerNameEnabled, enableComputerName, disableComputerName } = require('vibecodingmachine-core');
124
-
124
+
125
125
  const currentHostname = getHostname();
126
126
  const isEnabled = isComputerNameEnabled();
127
-
127
+
128
128
  console.log(chalk.bold('\n🏷️ Computer Name Settings\n'));
129
129
  console.log(chalk.gray(`Current hostname: ${currentHostname}`));
130
130
  console.log(chalk.gray(`Computer name enabled: ${isEnabled ? 'Yes' : 'No'}\n`));
@@ -164,7 +164,7 @@ async function showComputerNameSettings() {
164
164
  */
165
165
  async function changeHostname() {
166
166
  const { getHostname, setHostname } = require('vibecodingmachine-core');
167
-
167
+
168
168
  const { newHostname } = await inquirer.prompt([
169
169
  {
170
170
  type: 'input',
@@ -194,51 +194,51 @@ async function changeHostname() {
194
194
  */
195
195
  async function showStatistics() {
196
196
  console.log(chalk.bold('\n📊 Project Statistics\n'));
197
-
197
+
198
198
  try {
199
199
  const { countRequirements, getCurrentProgress } = require('./core-ui');
200
200
  const stats = await countRequirements();
201
201
  const progress = await getCurrentProgress();
202
-
202
+
203
203
  console.log(chalk.yellow('Requirements:'));
204
204
  console.log(chalk.gray(` • Todo: ${stats.todo} items`));
205
205
  console.log(chalk.gray(` • Completed: ${stats.completed} items`));
206
206
  console.log(chalk.gray(` • Total: ${stats.total} items`));
207
207
  console.log(chalk.gray(` • Progress: ${progress.progress}%`));
208
208
  console.log(chalk.gray(` • Current Stage: ${progress.stage}\n`));
209
-
209
+
210
210
  // Show file statistics
211
211
  const fs = require('fs-extra');
212
212
  const path = require('path');
213
-
213
+
214
214
  const countFiles = async (dir, pattern = /\.js$/) => {
215
215
  let count = 0;
216
216
  const items = await fs.readdir(dir);
217
-
217
+
218
218
  for (const item of items) {
219
219
  const fullPath = path.join(dir, item);
220
220
  const stat = await fs.stat(fullPath);
221
-
221
+
222
222
  if (stat.isDirectory() && !item.startsWith('.') && item !== 'node_modules') {
223
223
  count += await countFiles(fullPath, pattern);
224
224
  } else if (stat.isFile() && pattern.test(item)) {
225
225
  count++;
226
226
  }
227
227
  }
228
-
228
+
229
229
  return count;
230
230
  };
231
-
231
+
232
232
  const repoPath = process.cwd();
233
233
  const jsFiles = await countFiles(repoPath);
234
234
  const jsxFiles = await countFiles(repoPath, /\.jsx$/);
235
235
  const mdFiles = await countFiles(repoPath, /\.md$/);
236
-
236
+
237
237
  console.log(chalk.yellow('Files:'));
238
238
  console.log(chalk.gray(` • JavaScript files: ${jsFiles}`));
239
239
  console.log(chalk.gray(` • JSX files: ${jsxFiles}`));
240
240
  console.log(chalk.gray(` • Markdown files: ${mdFiles}\n`));
241
-
241
+
242
242
  } catch (error) {
243
243
  console.error(chalk.red('❌ Error getting statistics:'), error.message);
244
244
  }
@@ -249,23 +249,23 @@ async function showStatistics() {
249
249
  */
250
250
  async function showSyncStatus() {
251
251
  console.log(chalk.bold('\n🔄 Sync Status\n'));
252
-
252
+
253
253
  try {
254
254
  const { getSyncStatus } = require('./core-ui');
255
255
  const status = await getSyncStatus();
256
-
256
+
257
257
  console.log(chalk.yellow('Sync Status:'));
258
258
  console.log(chalk.gray(` • Status: ${status.status}`));
259
259
  if (status.message) {
260
260
  console.log(chalk.gray(` • Message: ${status.message}`));
261
261
  }
262
-
262
+
263
263
  if (status.lastSync) {
264
264
  console.log(chalk.gray(` • Last sync: ${new Date(status.lastSync).toLocaleString()}`));
265
265
  }
266
-
266
+
267
267
  console.log();
268
-
268
+
269
269
  } catch (error) {
270
270
  console.error(chalk.red('❌ Error getting sync status:'), error.message);
271
271
  }
@@ -277,7 +277,7 @@ async function showSyncStatus() {
277
277
  async function searchRequirements() {
278
278
  const { getRequirementsPath } = require('vibecodingmachine-core');
279
279
  const fs = require('fs-extra');
280
-
280
+
281
281
  try {
282
282
  const { query } = await inquirer.prompt([
283
283
  {
@@ -291,10 +291,10 @@ async function searchRequirements() {
291
291
  const reqPath = await getRequirementsPath();
292
292
  const content = await fs.readFile(reqPath, 'utf8');
293
293
  const lines = content.split('\n');
294
-
294
+
295
295
  const searchTerm = query.toLowerCase();
296
296
  const matches = [];
297
-
297
+
298
298
  for (let i = 0; i < lines.length; i++) {
299
299
  const line = lines[i];
300
300
  if (line.startsWith('- ') && line.toLowerCase().includes(searchTerm)) {
@@ -304,20 +304,20 @@ async function searchRequirements() {
304
304
  });
305
305
  }
306
306
  }
307
-
307
+
308
308
  console.log(chalk.bold(`\n🔍 Search Results for "${query}"\n`));
309
-
309
+
310
310
  if (matches.length === 0) {
311
311
  console.log(chalk.gray('No matches found.\n'));
312
312
  } else {
313
313
  console.log(chalk.yellow(`Found ${matches.length} match(es):\n`));
314
-
314
+
315
315
  matches.forEach((match, index) => {
316
316
  console.log(chalk.cyan(`${index + 1}. Line ${match.line}:`));
317
317
  console.log(chalk.gray(` ${match.content}\n`));
318
318
  });
319
319
  }
320
-
320
+
321
321
  } catch (error) {
322
322
  console.error(chalk.red('❌ Error searching requirements:'), error.message);
323
323
  }
@@ -335,7 +335,7 @@ async function showConfirmDialog(message, defaultValue = false) {
335
335
  default: defaultValue
336
336
  }
337
337
  ]);
338
-
338
+
339
339
  return confirmed;
340
340
  }
341
341
 
@@ -352,7 +352,7 @@ async function showInputDialog(message, defaultValue = '', validate = null) {
352
352
  validate: validate || ((input) => input.trim().length > 0 || 'Input cannot be empty')
353
353
  }
354
354
  ]);
355
-
355
+
356
356
  return input;
357
357
  }
358
358
 
@@ -369,7 +369,7 @@ async function showSelectDialog(message, choices, pageSize = 10) {
369
369
  pageSize
370
370
  }
371
371
  ]);
372
-
372
+
373
373
  return choice;
374
374
  }
375
375
 
@@ -386,7 +386,7 @@ async function showMultiSelectDialog(message, choices, pageSize = 10) {
386
386
  pageSize
387
387
  }
388
388
  ]);
389
-
389
+
390
390
  return selected;
391
391
  }
392
392
 
@@ -395,7 +395,7 @@ async function showMultiSelectDialog(message, choices, pageSize = 10) {
395
395
  */
396
396
  function showError(message, error = null) {
397
397
  const errorMessage = error ? `${message}\n\n${chalk.red(error.message || error)}` : message;
398
-
398
+
399
399
  console.log(
400
400
  boxen(
401
401
  chalk.red(errorMessage),
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Requirement Actions - Orchestrates requirement operations
3
- *
3
+ *
4
4
  * This module coordinates between CRUD operations and clarification actions.
5
5
  * It serves as the main entry point for requirement-related actions.
6
6
  */
@@ -96,7 +96,7 @@ async function loadVerified() {
96
96
  module.exports = {
97
97
  // Main orchestrator
98
98
  performRequirementAction,
99
-
99
+
100
100
  // CRUD operations
101
101
  renameRequirement,
102
102
  deleteRequirement,
@@ -107,20 +107,20 @@ module.exports = {
107
107
  demoteRequirement,
108
108
  restoreRequirement,
109
109
  moveRequirementToClarification,
110
-
110
+
111
111
  // Clarification actions
112
112
  editClarificationResponses,
113
113
  moveClarificationToTodo,
114
114
  deleteClarification,
115
115
  showClarificationActions,
116
-
116
+
117
117
  // Utilities
118
118
  confirmAction,
119
119
  confirmAndExit,
120
120
  getSectionTitle,
121
121
  getRequirementList,
122
122
  moveRequirementToRecycled,
123
-
123
+
124
124
  // Loaders (placeholders)
125
125
  loadSection,
126
126
  loadVerified
@@ -129,7 +129,7 @@ async function moveRequirementToRecycled(reqPath, requirementTitle, fromSection,
129
129
  while (insertIndex < lines.length && lines[insertIndex].trim() === '') {
130
130
  insertIndex++;
131
131
  }
132
-
132
+
133
133
  if (requirementLines) {
134
134
  lines.splice(insertIndex, 0, ...requirementLines);
135
135
  } else {
@@ -179,7 +179,7 @@ async function moveRequirementUp(req, sectionKey, tree) {
179
179
  // Helper to promote requirement to next list (TODO -> TO VERIFY -> VERIFIED)
180
180
  async function promoteRequirement(req, sectionKey, tree, loadSection, loadVerified) {
181
181
  const reqPath = await getRequirementsPath();
182
-
182
+
183
183
  if (sectionKey === 'todo') {
184
184
  await promoteTodoToVerify(reqPath, req.title);
185
185
  console.log(chalk.green('✅ Requirement promoted to verification'));
@@ -192,7 +192,7 @@ async function promoteRequirement(req, sectionKey, tree, loadSection, loadVerifi
192
192
  // Helper to demote requirement to previous list (VERIFIED -> TODO, TO VERIFY -> TODO)
193
193
  async function demoteRequirement(reqTitle, sectionKey, tree, loadSection, loadVerified) {
194
194
  const reqPath = await getRequirementsPath();
195
-
195
+
196
196
  if (sectionKey === 'verify') {
197
197
  await demoteVerifyToTodo(reqPath, reqTitle);
198
198
  console.log(chalk.green('✅ Requirement demoted to TODO'));
@@ -285,7 +285,7 @@ async function saveRequirementsOrder(reqPath, sectionTitle, requirements) {
285
285
  // Build new section content
286
286
  const newLines = lines.slice(0, sectionIndex + 1);
287
287
  newLines.push(''); // Empty line after header
288
-
288
+
289
289
  // Add requirements in new order
290
290
  requirements.forEach(req => {
291
291
  if (typeof req === 'string') {
@@ -29,10 +29,10 @@ async function showRequirementsTree() {
29
29
  try {
30
30
  const reqPath = await getRequirementsPath();
31
31
  const content = await fs.readFile(reqPath, 'utf8');
32
-
32
+
33
33
  // Parse requirements into tree structure
34
34
  const tree = parseRequirementsTree(content);
35
-
35
+
36
36
  // Show summary
37
37
  console.log(chalk.yellow(`📊 Summary:`));
38
38
  console.log(chalk.gray(` • Todo: ${tree.todoReqs.length} items`));
@@ -42,7 +42,7 @@ async function showRequirementsTree() {
42
42
 
43
43
  // Interactive navigation
44
44
  await navigateRequirements(tree);
45
-
45
+
46
46
  } catch (error) {
47
47
  console.error(chalk.red('❌ Error loading requirements:'), error.message);
48
48
  }
@@ -58,10 +58,10 @@ function parseRequirementsTree(content) {
58
58
  };
59
59
 
60
60
  let currentSection = null;
61
-
61
+
62
62
  for (let i = 0; i < lines.length; i++) {
63
63
  const line = lines[i].trim();
64
-
64
+
65
65
  // Detect section headers
66
66
  if (line.includes('Requirements not yet completed')) {
67
67
  currentSection = 'todo';
@@ -86,11 +86,11 @@ function parseRequirementsTree(content) {
86
86
  function parseRequirement(line, index) {
87
87
  // Remove the "- " prefix
88
88
  const content = line.substring(2);
89
-
89
+
90
90
  // Extract title (first sentence or up to 100 chars)
91
91
  const titleEnd = content.indexOf('.') !== -1 ? content.indexOf('.') + 1 : 100;
92
92
  const title = content.substring(0, Math.min(titleEnd, 100)).trim();
93
-
93
+
94
94
  return {
95
95
  title,
96
96
  content,
@@ -146,7 +146,7 @@ async function navigateRequirements(tree) {
146
146
  async function showSectionDetails(sectionKey, tree) {
147
147
  const reqList = getRequirementList(tree, sectionKey);
148
148
  const sectionTitle = getSectionTitle(sectionKey);
149
-
149
+
150
150
  if (reqList.length === 0) {
151
151
  console.log(chalk.gray(`\nNo items in ${sectionTitle}\n`));
152
152
  return;
@@ -174,7 +174,7 @@ async function showSectionDetails(sectionKey, tree) {
174
174
 
175
175
  const req = reqList[choice];
176
176
  await showRequirementDetails(req, sectionKey, tree);
177
-
177
+
178
178
  // Reload tree in case of changes
179
179
  const reqPath = await getRequirementsPath();
180
180
  const content = await fs.readFile(reqPath, 'utf8');
@@ -207,7 +207,7 @@ function getRequirementActions(sectionKey, requirementTitle = '') {
207
207
  ];
208
208
 
209
209
  const escTitle = requirementTitle.replace(/'/g, "\\'");
210
-
210
+
211
211
  switch (sectionKey) {
212
212
  case 'todo':
213
213
  return [
@@ -271,10 +271,10 @@ async function startInteractive() {
271
271
  showGoodbyeMessage();
272
272
  }
273
273
 
274
- module.exports = {
275
- startInteractive,
276
- showProviderManagerMenu,
277
- /* exported for tests */
278
- parseRequirementsFromContent,
279
- bootstrapProjectIfInHomeDir
274
+ module.exports = {
275
+ startInteractive,
276
+ showProviderManagerMenu,
277
+ /* exported for tests */
278
+ parseRequirementsFromContent,
279
+ bootstrapProjectIfInHomeDir
280
280
  };