@nclamvn/vibecode-cli 1.0.0 β†’ 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -188,7 +188,278 @@ export function getContractTemplate(projectName, sessionId) {
188
188
 
189
189
  ---
190
190
 
191
- *Generated by Vibecode CLI v1.0*
191
+ *Generated by Vibecode CLI v1.1*
192
192
  *Lock this contract with \`vibecode lock\` when ready*
193
193
  `;
194
194
  }
195
+
196
+ /**
197
+ * Get plan template
198
+ */
199
+ export function getPlanTemplate(projectName, sessionId, specHash, contractContent) {
200
+ const timestamp = new Date().toISOString();
201
+
202
+ // Extract deliverables from contract
203
+ const deliverablesMatch = contractContent.match(/## πŸ“¦ Deliverables[\s\S]*?\|[\s\S]*?(?=\n---|\n##|$)/);
204
+ const deliverables = deliverablesMatch ? deliverablesMatch[0] : '[Extract from contract]';
205
+
206
+ return `# πŸ“‹ EXECUTION PLAN: ${projectName}
207
+
208
+ ## Session: ${sessionId}
209
+ ## Created: ${timestamp}
210
+ ## Spec Hash: ${specHash}
211
+ ## Status: ACTIVE
212
+
213
+ ---
214
+
215
+ ## 🎯 Objective
216
+
217
+ Execute the locked contract deliverables in order.
218
+
219
+ ---
220
+
221
+ ## πŸ“¦ Deliverables from Contract
222
+
223
+ ${deliverables}
224
+
225
+ ---
226
+
227
+ ## πŸ”§ Execution Steps
228
+
229
+ | Step | Task | Command/Action | Status |
230
+ |------|------|----------------|--------|
231
+ | 1 | Setup | Initialize project structure | ⬜ |
232
+ | 2 | Core Build | Implement main functionality | ⬜ |
233
+ | 3 | Styling | Apply design system | ⬜ |
234
+ | 4 | Testing | Run tests and validate | ⬜ |
235
+ | 5 | Review | Check against acceptance criteria | ⬜ |
236
+
237
+ ---
238
+
239
+ ## πŸ“ Notes
240
+
241
+ - Follow contract scope strictly
242
+ - Capture evidence for each step
243
+ - No scope creep allowed
244
+
245
+ ---
246
+
247
+ ## ⏱️ Time Tracking
248
+
249
+ | Phase | Started | Completed | Duration |
250
+ |-------|---------|-----------|----------|
251
+ | Build | ${timestamp} | - | - |
252
+ | Review | - | - | - |
253
+
254
+ ---
255
+
256
+ *Generated by Vibecode CLI v1.1*
257
+ `;
258
+ }
259
+
260
+ /**
261
+ * Get coder pack template - instructions for AI coder
262
+ */
263
+ export function getCoderPackTemplate(projectName, sessionId, specHash, contractContent, blueprintContent) {
264
+ const timestamp = new Date().toISOString();
265
+
266
+ return `# πŸ—οΈ CODER PACK: ${projectName}
267
+
268
+ ## Session: ${sessionId}
269
+ ## Generated: ${timestamp}
270
+ ## Spec Hash: ${specHash}
271
+
272
+ ---
273
+
274
+ ## ⚠️ IMPORTANT - READ FIRST
275
+
276
+ You are the **Thợ (Builder)**. Your job is to execute the locked contract exactly as specified.
277
+
278
+ **Rules:**
279
+ 1. Do NOT add features not in the contract
280
+ 2. Do NOT modify the contract
281
+ 3. Capture evidence of your work
282
+ 4. Report any blockers immediately
283
+
284
+ ---
285
+
286
+ ## πŸ“œ CONTRACT (LOCKED)
287
+
288
+ ${contractContent}
289
+
290
+ ---
291
+
292
+ ## πŸ“˜ BLUEPRINT REFERENCE
293
+
294
+ ${blueprintContent}
295
+
296
+ ---
297
+
298
+ ## πŸ”§ BUILD INSTRUCTIONS
299
+
300
+ 1. Read the contract deliverables table
301
+ 2. Implement each item in order
302
+ 3. For each deliverable:
303
+ - Create/modify the required files
304
+ - Test the implementation
305
+ - Mark as complete
306
+ 4. Capture evidence:
307
+ - Screenshots if UI
308
+ - Terminal output if CLI
309
+ - Test results if automated
310
+
311
+ ---
312
+
313
+ ## πŸ“ Evidence Collection
314
+
315
+ Save evidence to: \`.vibecode/sessions/${sessionId}/evidence/\`
316
+
317
+ Required evidence:
318
+ - \`changes.diff\` - Git diff of all changes
319
+ - \`build.log\` - Terminal output during build
320
+ - \`screenshots/\` - Visual evidence if applicable
321
+
322
+ ---
323
+
324
+ ## βœ… Completion Checklist
325
+
326
+ - [ ] All deliverables implemented
327
+ - [ ] All acceptance criteria met
328
+ - [ ] Evidence captured
329
+ - [ ] No scope creep
330
+
331
+ ---
332
+
333
+ *Run \`vibecode build --complete\` when finished*
334
+
335
+ *Generated by Vibecode CLI v1.1*
336
+ `;
337
+ }
338
+
339
+ /**
340
+ * Get build report template
341
+ */
342
+ export function getBuildReportTemplate(projectName, sessionId, specHash, startTime, endTime, evidence) {
343
+ const duration = endTime ? Math.round((new Date(endTime) - new Date(startTime)) / 1000 / 60) : 'In progress';
344
+
345
+ return `# πŸ—οΈ BUILD REPORT: ${projectName}
346
+
347
+ ## Session: ${sessionId}
348
+ ## Spec Hash: ${specHash}
349
+ ## Status: ${endTime ? 'COMPLETED' : 'IN PROGRESS'}
350
+
351
+ ---
352
+
353
+ ## ⏱️ Timeline
354
+
355
+ | Metric | Value |
356
+ |--------|-------|
357
+ | Started | ${startTime} |
358
+ | Completed | ${endTime || '-'} |
359
+ | Duration | ${duration} ${endTime ? 'minutes' : ''} |
360
+
361
+ ---
362
+
363
+ ## πŸ“ Evidence Collected
364
+
365
+ ${evidence.hasDiff ? '- βœ… changes.diff' : '- ⬜ changes.diff'}
366
+ ${evidence.hasLog ? '- βœ… build.log' : '- ⬜ build.log'}
367
+ ${evidence.screenshots > 0 ? `- βœ… ${evidence.screenshots} screenshots` : '- ⬜ No screenshots'}
368
+
369
+ ---
370
+
371
+ ## πŸ“Š Summary
372
+
373
+ - Files changed: ${evidence.filesChanged || 'N/A'}
374
+ - Lines added: ${evidence.linesAdded || 'N/A'}
375
+ - Lines removed: ${evidence.linesRemoved || 'N/A'}
376
+
377
+ ---
378
+
379
+ ## πŸ” Next Steps
380
+
381
+ ${endTime ? '1. Run `vibecode review` to validate build' : '1. Continue building\n2. Run `vibecode build --complete` when done'}
382
+
383
+ ---
384
+
385
+ *Generated by Vibecode CLI v1.1*
386
+ `;
387
+ }
388
+
389
+ /**
390
+ * Get review report template
391
+ */
392
+ export function getReviewReportTemplate(projectName, sessionId, specHash, checks, passed) {
393
+ const timestamp = new Date().toISOString();
394
+
395
+ const checksList = checks.map(c =>
396
+ `| ${c.name} | ${c.passed ? 'βœ… PASS' : '❌ FAIL'} | ${c.message || '-'} |`
397
+ ).join('\n');
398
+
399
+ return `# πŸ” REVIEW REPORT: ${projectName}
400
+
401
+ ## Session: ${sessionId}
402
+ ## Spec Hash: ${specHash}
403
+ ## Reviewed: ${timestamp}
404
+ ## Result: ${passed ? 'βœ… PASSED' : '❌ FAILED'}
405
+
406
+ ---
407
+
408
+ ## πŸ“‹ Automated Checks
409
+
410
+ | Check | Result | Details |
411
+ |-------|--------|---------|
412
+ ${checksList}
413
+
414
+ ---
415
+
416
+ ## βœ”οΈ Acceptance Criteria Review
417
+
418
+ [Manually verified against contract]
419
+
420
+ ---
421
+
422
+ ## πŸ“Š Summary
423
+
424
+ - Total checks: ${checks.length}
425
+ - Passed: ${checks.filter(c => c.passed).length}
426
+ - Failed: ${checks.filter(c => !c.passed).length}
427
+
428
+ ---
429
+
430
+ ## 🎯 Verdict
431
+
432
+ ${passed ? `
433
+ **REVIEW PASSED**
434
+
435
+ All checks passed. Ready for shipping.
436
+ Run \`vibecode snapshot\` to create release.
437
+ ` : `
438
+ **REVIEW FAILED**
439
+
440
+ Some checks failed. Please fix the issues and run \`vibecode build\` again.
441
+ `}
442
+
443
+ ---
444
+
445
+ *Generated by Vibecode CLI v1.1*
446
+ `;
447
+ }
448
+
449
+ /**
450
+ * Get manifest template for release
451
+ */
452
+ export function getManifestTemplate(projectName, version, specHash, sessionId, files) {
453
+ const timestamp = new Date().toISOString();
454
+
455
+ return {
456
+ name: projectName,
457
+ version: version,
458
+ specHash: specHash,
459
+ sessionId: sessionId,
460
+ timestamp: timestamp,
461
+ generator: 'vibecode-cli@1.1.0',
462
+ files: files,
463
+ status: 'SHIPPED'
464
+ };
465
+ }
@@ -84,9 +84,16 @@ export async function getSessionFilesStatus() {
84
84
  if (!sessionPath) return null;
85
85
 
86
86
  return {
87
+ // Phase A files
87
88
  intake: await pathExists(path.join(sessionPath, 'intake.md')),
88
89
  blueprint: await pathExists(path.join(sessionPath, 'blueprint.md')),
89
- contract: await pathExists(path.join(sessionPath, 'contract.md'))
90
+ contract: await pathExists(path.join(sessionPath, 'contract.md')),
91
+ // Phase B files
92
+ plan: await pathExists(path.join(sessionPath, 'plan.md')),
93
+ coderPack: await pathExists(path.join(sessionPath, 'coder_pack.md')),
94
+ buildReport: await pathExists(path.join(sessionPath, 'build_report.md')),
95
+ reviewReport: await pathExists(path.join(sessionPath, 'review_report.md')),
96
+ manifest: await pathExists(path.join(sessionPath, 'manifest.json'))
90
97
  };
91
98
  }
92
99
 
package/src/index.js CHANGED
@@ -3,10 +3,17 @@
3
3
  // Spec Hash: 0fe43335f5a325e3279a079ce616c052
4
4
  // ═══════════════════════════════════════════════════════════════════════════════
5
5
 
6
+ // Phase A Commands
6
7
  export { initCommand } from './commands/init.js';
7
8
  export { startCommand } from './commands/start.js';
8
9
  export { statusCommand } from './commands/status.js';
9
10
  export { lockCommand } from './commands/lock.js';
10
11
  export { doctorCommand } from './commands/doctor.js';
11
12
 
13
+ // Phase B Commands
14
+ export { planCommand } from './commands/plan.js';
15
+ export { buildCommand } from './commands/build.js';
16
+ export { reviewCommand } from './commands/review.js';
17
+ export { snapshotCommand } from './commands/snapshot.js';
18
+
12
19
  export { VERSION, SPEC_HASH, STATES } from './config/constants.js';
package/src/ui/output.js CHANGED
@@ -52,11 +52,11 @@ export function printInfo(message) {
52
52
  export function printProgress(state) {
53
53
  const progress = PROGRESS_MAP[state] || PROGRESS_MAP.INIT;
54
54
 
55
- const bar = ` ${progress.intake} INTAKE ${progress.blueprint} BLUEPRINT ${progress.contract} CONTRACT ${progress.build} BUILD ${progress.ship} SHIP`;
55
+ const bar = ` ${progress.intake} INTAKE ${progress.blueprint} BLUEPRINT ${progress.contract} CONTRACT ${progress.plan} PLAN ${progress.build} BUILD ${progress.review} REVIEW ${progress.ship} SHIP`;
56
56
 
57
- console.log(chalk.gray('β”Œβ”€ Progress ─────────────────────────────────────────────────────────┐'));
57
+ console.log(chalk.gray('β”Œβ”€ Progress ───────────────────────────────────────────────────────────────────────────┐'));
58
58
  console.log(chalk.white(bar));
59
- console.log(chalk.gray('β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜'));
59
+ console.log(chalk.gray('β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜'));
60
60
  }
61
61
 
62
62
  /**