@girardmedia/bootspring 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/build.js +114 -50
- package/mcp/contracts/mcp-contract.v1.json +1 -1
- package/package.json +1 -1
package/cli/build.js
CHANGED
|
@@ -78,6 +78,10 @@ async function run(args) {
|
|
|
78
78
|
case 'next':
|
|
79
79
|
return buildNextTask(projectRoot, parsedArgs);
|
|
80
80
|
|
|
81
|
+
case 'done':
|
|
82
|
+
case 'complete':
|
|
83
|
+
return markTaskDone(projectRoot, parsedArgs);
|
|
84
|
+
|
|
81
85
|
case 'all':
|
|
82
86
|
return buildAll(projectRoot, parsedArgs);
|
|
83
87
|
|
|
@@ -184,15 +188,14 @@ Some tasks may be blocked. Run ${c.cyan}bootspring build status${c.reset} for de
|
|
|
184
188
|
// Show options
|
|
185
189
|
console.log(`${c.bold}What would you like to do?${c.reset}
|
|
186
190
|
|
|
187
|
-
${c.cyan}1${c.reset}
|
|
188
|
-
${c.cyan}2${c.reset}
|
|
189
|
-
${c.cyan}3${c.reset}
|
|
190
|
-
${c.cyan}4${c.reset}
|
|
191
|
-
${c.cyan}5${c.reset} View full plan
|
|
191
|
+
${c.cyan}1${c.reset} Start this task (shows prompt for Claude Code)
|
|
192
|
+
${c.cyan}2${c.reset} View task details
|
|
193
|
+
${c.cyan}3${c.reset} Skip this task
|
|
194
|
+
${c.cyan}4${c.reset} View full plan
|
|
192
195
|
${c.cyan}q${c.reset} Quit
|
|
193
196
|
`);
|
|
194
197
|
|
|
195
|
-
const choice = await askQuestion('Choose [1-
|
|
198
|
+
const choice = await askQuestion('Choose [1-4, q]: ');
|
|
196
199
|
|
|
197
200
|
switch (choice.trim()) {
|
|
198
201
|
case '1':
|
|
@@ -200,20 +203,17 @@ Some tasks may be blocked. Run ${c.cyan}bootspring build status${c.reset} for de
|
|
|
200
203
|
return buildNextTask(projectRoot, args);
|
|
201
204
|
|
|
202
205
|
case '2':
|
|
203
|
-
return buildAll(projectRoot, args);
|
|
204
|
-
|
|
205
|
-
case '3':
|
|
206
206
|
showCurrentTask(projectRoot, { prompt: true });
|
|
207
207
|
console.log('');
|
|
208
208
|
return interactiveBuild(projectRoot, args);
|
|
209
209
|
|
|
210
|
-
case '
|
|
210
|
+
case '3': {
|
|
211
211
|
const reason = await askQuestion('Skip reason (optional): ');
|
|
212
212
|
skipCurrentTask(projectRoot, { reason: reason || 'Skipped by user' });
|
|
213
213
|
return interactiveBuild(projectRoot, args);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
case '
|
|
216
|
+
case '4':
|
|
217
217
|
showPlan(projectRoot);
|
|
218
218
|
return interactiveBuild(projectRoot, args);
|
|
219
219
|
|
|
@@ -229,9 +229,9 @@ Some tasks may be blocked. Run ${c.cyan}bootspring build status${c.reset} for de
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
|
-
* Build the next task
|
|
232
|
+
* Build the next task - outputs prompt for Claude Code to execute
|
|
233
233
|
*/
|
|
234
|
-
async function buildNextTask(projectRoot,
|
|
234
|
+
async function buildNextTask(projectRoot, _args = {}) {
|
|
235
235
|
const state = buildState.load(projectRoot);
|
|
236
236
|
|
|
237
237
|
if (!state) {
|
|
@@ -242,40 +242,105 @@ async function buildNextTask(projectRoot, args = {}) {
|
|
|
242
242
|
const nextTask = buildState.getNextTask(projectRoot);
|
|
243
243
|
|
|
244
244
|
if (!nextTask) {
|
|
245
|
-
console.log(`${c.green}
|
|
245
|
+
console.log(`${c.green}All tasks complete!${c.reset}`);
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
// Mark task as in progress
|
|
250
|
+
buildState.updateProgress(projectRoot, nextTask.id, 'in_progress');
|
|
251
|
+
|
|
252
|
+
// Generate the task prompt for Claude Code
|
|
253
|
+
const prompt = generateTaskPrompt(nextTask, projectRoot);
|
|
254
|
+
|
|
249
255
|
console.log(`
|
|
250
|
-
${c.cyan}${c.bold}
|
|
256
|
+
${c.cyan}${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
257
|
+
${c.bold}TASK: ${nextTask.title}${c.reset}
|
|
258
|
+
${c.cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
259
|
+
|
|
260
|
+
${prompt}
|
|
261
|
+
|
|
262
|
+
${c.cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
263
|
+
${c.dim}When complete, run: ${c.reset}${c.bold}bootspring build done${c.reset}
|
|
264
|
+
${c.dim}To skip this task: ${c.reset}${c.bold}bootspring build skip${c.reset}
|
|
265
|
+
${c.cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
251
266
|
`);
|
|
267
|
+
}
|
|
252
268
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
live: args.live,
|
|
259
|
-
verbose: args.verbose || args.v,
|
|
260
|
-
force: true // Always force to avoid "session already running" issues
|
|
261
|
-
});
|
|
269
|
+
/**
|
|
270
|
+
* Generate a prompt for Claude Code to execute
|
|
271
|
+
*/
|
|
272
|
+
function generateTaskPrompt(task, projectRoot) {
|
|
273
|
+
const lines = [];
|
|
262
274
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const updatedTask = buildState.getNextTask(projectRoot);
|
|
275
|
+
lines.push(`**Objective:** ${task.title}`);
|
|
276
|
+
lines.push('');
|
|
266
277
|
|
|
267
|
-
if (
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
278
|
+
if (task.description) {
|
|
279
|
+
lines.push(`**Description:**`);
|
|
280
|
+
lines.push(task.description);
|
|
281
|
+
lines.push('');
|
|
282
|
+
}
|
|
272
283
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
284
|
+
if (task.acceptanceCriteria && task.acceptanceCriteria.length > 0) {
|
|
285
|
+
lines.push('**Acceptance Criteria:**');
|
|
286
|
+
task.acceptanceCriteria.forEach(ac => {
|
|
287
|
+
lines.push(`- [ ] ${ac}`);
|
|
288
|
+
});
|
|
289
|
+
lines.push('');
|
|
276
290
|
}
|
|
277
291
|
|
|
278
|
-
|
|
292
|
+
if (task.sourceSection) {
|
|
293
|
+
lines.push(`**Source:** ${task.source} - ${task.sourceSection}`);
|
|
294
|
+
lines.push('');
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
lines.push('**Instructions:**');
|
|
298
|
+
lines.push('1. Implement the task as described above');
|
|
299
|
+
lines.push('2. Ensure all acceptance criteria are met');
|
|
300
|
+
lines.push('3. Test your implementation');
|
|
301
|
+
lines.push(`4. When done, run: bootspring build done`);
|
|
302
|
+
|
|
303
|
+
return lines.join('\n');
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Mark current task as done
|
|
308
|
+
*/
|
|
309
|
+
async function markTaskDone(projectRoot, _args = {}) {
|
|
310
|
+
const state = buildState.load(projectRoot);
|
|
311
|
+
|
|
312
|
+
if (!state) {
|
|
313
|
+
console.log(`${c.yellow}No build state found.${c.reset}`);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Find in-progress task
|
|
318
|
+
const inProgressTask = state.implementationQueue.find(t => t.status === 'in_progress');
|
|
319
|
+
|
|
320
|
+
if (!inProgressTask) {
|
|
321
|
+
console.log(`${c.yellow}No task currently in progress.${c.reset}`);
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Mark as complete
|
|
326
|
+
buildState.updateProgress(projectRoot, inProgressTask.id, 'completed');
|
|
327
|
+
|
|
328
|
+
console.log(`${c.green}✓${c.reset} Completed: ${c.bold}${inProgressTask.title}${c.reset}`);
|
|
329
|
+
|
|
330
|
+
// Show next task
|
|
331
|
+
const nextTask = buildState.getNextTask(projectRoot);
|
|
332
|
+
const stats = buildState.getStats(projectRoot);
|
|
333
|
+
|
|
334
|
+
console.log(`
|
|
335
|
+
${c.dim}Progress: ${stats.completed}/${stats.total} tasks (${Math.round(stats.completedPercent)}%)${c.reset}
|
|
336
|
+
`);
|
|
337
|
+
|
|
338
|
+
if (nextTask) {
|
|
339
|
+
console.log(`${c.bold}Next up:${c.reset} ${nextTask.title}`);
|
|
340
|
+
console.log(`\n${c.dim}Run ${c.reset}${c.bold}bootspring build${c.reset}${c.dim} to continue${c.reset}\n`);
|
|
341
|
+
} else {
|
|
342
|
+
console.log(`${c.green}${c.bold}🎉 All tasks complete!${c.reset}\n`);
|
|
343
|
+
}
|
|
279
344
|
}
|
|
280
345
|
|
|
281
346
|
/**
|
|
@@ -301,7 +366,7 @@ ${c.dim}Press Ctrl+C to stop at any time${c.reset}
|
|
|
301
366
|
await loop.runLoop(projectRoot, {
|
|
302
367
|
source: 'build',
|
|
303
368
|
iterations: args.iterations || 50,
|
|
304
|
-
live:
|
|
369
|
+
live: true, // Always show live output so user can see Claude working
|
|
305
370
|
verbose: args.verbose || args.v,
|
|
306
371
|
force: true // Always force to avoid "session already running" issues
|
|
307
372
|
});
|
|
@@ -664,31 +729,30 @@ function formatPhaseName(phase) {
|
|
|
664
729
|
function showHelp() {
|
|
665
730
|
console.log(`
|
|
666
731
|
${c.cyan}${c.bold}Bootspring Build${c.reset}
|
|
667
|
-
${c.dim}
|
|
732
|
+
${c.dim}Task-driven build system for Claude Code${c.reset}
|
|
668
733
|
|
|
669
734
|
${c.bold}Quick Start:${c.reset}
|
|
670
735
|
${c.cyan}bootspring build${c.reset} Interactive mode (recommended)
|
|
671
736
|
|
|
672
|
-
${c.bold}
|
|
673
|
-
${c.cyan}bootspring build
|
|
674
|
-
|
|
737
|
+
${c.bold}Workflow:${c.reset}
|
|
738
|
+
1. Run ${c.cyan}bootspring build${c.reset} and select a task
|
|
739
|
+
2. Claude Code executes the task prompt
|
|
740
|
+
3. Run ${c.cyan}bootspring build done${c.reset} when complete
|
|
741
|
+
4. Repeat until MVP is complete
|
|
742
|
+
|
|
743
|
+
${c.bold}Commands:${c.reset}
|
|
744
|
+
${c.cyan}bootspring build${c.reset} Start interactive build
|
|
745
|
+
${c.cyan}bootspring build next${c.reset} Show next task prompt
|
|
746
|
+
${c.cyan}bootspring build done${c.reset} Mark current task complete
|
|
747
|
+
${c.cyan}bootspring build skip${c.reset} Skip current task
|
|
675
748
|
${c.cyan}bootspring build status${c.reset} View detailed progress
|
|
676
749
|
${c.cyan}bootspring build task${c.reset} View current task details
|
|
677
|
-
${c.cyan}bootspring build skip${c.reset} Skip current task
|
|
678
750
|
${c.cyan}bootspring build plan${c.reset} View the full master plan
|
|
679
|
-
${c.cyan}bootspring build pause${c.reset} Pause building
|
|
680
751
|
${c.cyan}bootspring build reset${c.reset} Start over
|
|
681
752
|
|
|
682
753
|
${c.bold}Options:${c.reset}
|
|
683
754
|
--prompt Show AI prompt for current task
|
|
684
755
|
--force Force reset even if in progress
|
|
685
|
-
|
|
686
|
-
${c.bold}Workflow:${c.reset}
|
|
687
|
-
1. Run ${c.cyan}bootspring build${c.reset}
|
|
688
|
-
2. Choose to build one task or all tasks
|
|
689
|
-
3. Review progress and continue
|
|
690
|
-
|
|
691
|
-
That's it! The system guides you through the rest.
|
|
692
756
|
`);
|
|
693
757
|
}
|
|
694
758
|
|
package/package.json
CHANGED