@sienklogic/plan-build-run 2.43.0 → 2.44.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to Plan-Build-Run will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.44.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.43.0...plan-build-run-v2.44.0) (2026-02-28)
9
+
10
+
11
+ ### Features
12
+
13
+ * **49-03:** add CRITICAL spot-check CLI marker to build SKILL.md Step 6c ([255ee65](https://github.com/SienkLogic/plan-build-run/commit/255ee65506334a972ceb472b2fa90f1ba94eca80))
14
+ * **49-03:** GREEN - refactor check-subagent-output.js to SKILL_CHECKS lookup table ([fb4b272](https://github.com/SienkLogic/plan-build-run/commit/fb4b272a8a02dd22d27745e5a9d98bb9fc57ef26))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **49-03:** sync spot-check CRITICAL marker to cursor-pbr and copilot-pbr ([994ef46](https://github.com/SienkLogic/plan-build-run/commit/994ef46aa13afde61ffa0e38e0332ab13be8863d))
20
+
8
21
  ## [2.43.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.42.1...plan-build-run-v2.43.0) (2026-02-28)
9
22
 
10
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienklogic/plan-build-run",
3
- "version": "2.43.0",
3
+ "version": "2.44.0",
4
4
  "description": "Plan it, Build it, Run it — structured development workflow for Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.43.0",
4
+ "version": "2.44.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for GitHub Copilot CLI. Solves context rot through disciplined agent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -407,15 +407,40 @@ For each completed executor:
407
407
 
408
408
  **Spot-check executor claims:**
409
409
 
410
- After reading each SUMMARY, perform a lightweight verification:
411
- - Pick 2-3 files from the SUMMARY's `key_files` list and verify they exist (`ls`)
412
- - Run `git log --oneline -n {commit_count}` and confirm the count matches the claimed commits
413
- - For each spot-checked file, verify it has >10 lines (`wc -l`): warn if trivially small
414
- - For each spot-checked file, search for TODO/FIXME/placeholder/stub markers: warn if found
415
- - Check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user:
416
- "Plan {id} reported self-check failures: {list failures}. Inspect before continuing?"
417
- - If ANY spot-check fails, warn the user before proceeding to the next wave:
418
- "Spot-check failed for plan {id}: {detail}. Inspect before continuing?"
410
+ CRITICAL: Before reading results or advancing to the next wave, run the spot-check CLI for each completed plan.
411
+
412
+ For each completed plan in this wave:
413
+
414
+ ```bash
415
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js spot-check {phaseSlug} {planId}
416
+ ```
417
+
418
+ Where `{phaseSlug}` is the phase directory name (e.g., `49-build-workflow-hardening`) and `{planId}` is the plan identifier (e.g., `49-01`).
419
+
420
+ The command returns JSON: `{ ok, summary_exists, key_files_checked, commits_present, detail }`
421
+
422
+ **If `ok` is `false` for ANY plan: STOP.** Do NOT advance to the next wave. Present the user with:
423
+
424
+ ```
425
+ Spot-check FAILED for plan {planId}: {detail}
426
+
427
+ Choose an action:
428
+ Retry — Re-spawn executor for this plan
429
+ Continue — Skip this plan and proceed to next wave (may leave phase incomplete)
430
+ Abort — Stop the build entirely
431
+ ```
432
+
433
+ Use AskUserQuestion with the three options. Route:
434
+
435
+ - Retry: Re-spawn the executor for this plan (go back to Step 6a for this plan only)
436
+ - Continue: Log the failure, skip the plan, proceed
437
+ - Abort: Stop all build work, leave phase in partial state
438
+
439
+ **If `ok` is `true` for all plans:**
440
+
441
+ - Also check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user: "Plan {id} reported self-check failures: {list}. Inspect before continuing?"
442
+ - Also search SUMMARY.md for `## Self-Check: FAILED` marker — if present, warn before next wave
443
+ - Between waves: verify no file conflicts from parallel executors (`git status` for uncommitted changes)
419
444
 
420
445
  **Additional wave spot-checks:**
421
446
  - Check for `## Self-Check: FAILED` in SUMMARY.md — if present, warn user before proceeding to next wave
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.43.0",
4
+ "version": "2.44.0",
5
5
  "description": "Plan-Build-Run — Structured development workflow for Cursor. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
6
6
  "author": {
7
7
  "name": "SienkLogic",
@@ -408,15 +408,40 @@ For each completed executor:
408
408
 
409
409
  **Spot-check executor claims:**
410
410
 
411
- After reading each SUMMARY, perform a lightweight verification:
412
- - Pick 2-3 files from the SUMMARY's `key_files` list and verify they exist (`ls`)
413
- - Run `git log --oneline -n {commit_count}` and confirm the count matches the claimed commits
414
- - For each spot-checked file, verify it has >10 lines (`wc -l`): warn if trivially small
415
- - For each spot-checked file, search for TODO/FIXME/placeholder/stub markers: warn if found
416
- - Check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user:
417
- "Plan {id} reported self-check failures: {list failures}. Inspect before continuing?"
418
- - If ANY spot-check fails, warn the user before proceeding to the next wave:
419
- "Spot-check failed for plan {id}: {detail}. Inspect before continuing?"
411
+ CRITICAL: Before reading results or advancing to the next wave, run the spot-check CLI for each completed plan.
412
+
413
+ For each completed plan in this wave:
414
+
415
+ ```bash
416
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js spot-check {phaseSlug} {planId}
417
+ ```
418
+
419
+ Where `{phaseSlug}` is the phase directory name (e.g., `49-build-workflow-hardening`) and `{planId}` is the plan identifier (e.g., `49-01`).
420
+
421
+ The command returns JSON: `{ ok, summary_exists, key_files_checked, commits_present, detail }`
422
+
423
+ **If `ok` is `false` for ANY plan: STOP.** Do NOT advance to the next wave. Present the user with:
424
+
425
+ ```
426
+ Spot-check FAILED for plan {planId}: {detail}
427
+
428
+ Choose an action:
429
+ Retry — Re-spawn executor for this plan
430
+ Continue — Skip this plan and proceed to next wave (may leave phase incomplete)
431
+ Abort — Stop the build entirely
432
+ ```
433
+
434
+ Use AskUserQuestion with the three options. Route:
435
+
436
+ - Retry: Re-spawn the executor for this plan (go back to Step 6a for this plan only)
437
+ - Continue: Log the failure, skip the plan, proceed
438
+ - Abort: Stop all build work, leave phase in partial state
439
+
440
+ **If `ok` is `true` for all plans:**
441
+
442
+ - Also check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user: "Plan {id} reported self-check failures: {list}. Inspect before continuing?"
443
+ - Also search SUMMARY.md for `## Self-Check: FAILED` marker — if present, warn before next wave
444
+ - Between waves: verify no file conflicts from parallel executors (`git status` for uncommitted changes)
420
445
 
421
446
  **Additional wave spot-checks:**
422
447
  - Check for `## Self-Check: FAILED` in SUMMARY.md — if present, warn user before proceeding to next wave
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pbr",
3
- "version": "2.43.0",
3
+ "version": "2.44.0",
4
4
  "description": "Plan-Build-Run — Structured development workflow for Claude Code. Solves context rot through disciplined subagent delegation, structured planning, atomic execution, and goal-backward verification.",
5
5
  "author": {
6
6
  "name": "SienkLogic",
@@ -322,6 +322,74 @@ function checkSummaryCommits(planningDir, foundFiles, warnings) {
322
322
  }
323
323
  }
324
324
 
325
+ // Skill-specific check lookup table keyed by 'activeSkill:agentType'
326
+ const SKILL_CHECKS = {
327
+ 'begin:pbr:planner': {
328
+ description: 'begin planner core files',
329
+ check: (planningDir, _found, warnings) => {
330
+ const coreFiles = ['REQUIREMENTS.md', 'ROADMAP.md', 'STATE.md'];
331
+ for (const f of coreFiles) {
332
+ if (!fs.existsSync(path.join(planningDir, f))) {
333
+ warnings.push(`Begin planner: ${f} was not created. The project may be in an incomplete state.`);
334
+ }
335
+ }
336
+ }
337
+ },
338
+ 'plan:pbr:researcher': {
339
+ description: 'plan researcher phase-level RESEARCH.md',
340
+ check: (planningDir, found, warnings) => {
341
+ const phaseResearch = findInPhaseDir(planningDir, /^RESEARCH\.md$/i);
342
+ if (found.length === 0 && phaseResearch.length === 0) {
343
+ warnings.push('Plan researcher: No research output found in .planning/research/ or in the phase directory.');
344
+ }
345
+ }
346
+ },
347
+ 'scan:pbr:codebase-mapper': {
348
+ description: 'scan codebase-mapper 4 focus areas',
349
+ check: (planningDir, _found, warnings) => {
350
+ const expectedAreas = ['tech', 'arch', 'quality', 'concerns'];
351
+ const codebaseDir = path.join(planningDir, 'codebase');
352
+ if (fs.existsSync(codebaseDir)) {
353
+ try {
354
+ const files = fs.readdirSync(codebaseDir).map(f => f.toLowerCase());
355
+ for (const area of expectedAreas) {
356
+ if (!files.some(f => f.includes(area))) {
357
+ warnings.push(`Scan mapper: No output file containing "${area}" found in .planning/codebase/. One of the 4 mappers may have failed.`);
358
+ }
359
+ }
360
+ } catch (_e) { /* best-effort */ }
361
+ }
362
+ }
363
+ },
364
+ 'review:pbr:verifier': {
365
+ description: 'review verifier VERIFICATION.md status',
366
+ check: (planningDir, _found, warnings) => {
367
+ const verFiles = findInPhaseDir(planningDir, /^VERIFICATION\.md$/i);
368
+ for (const vf of verFiles) {
369
+ try {
370
+ const content = fs.readFileSync(path.join(planningDir, vf), 'utf8');
371
+ const statusMatch = content.match(/^status:\s*(\S+)/mi);
372
+ if (statusMatch && statusMatch[1] === 'gaps_found') {
373
+ warnings.push('Review verifier: VERIFICATION.md has status "gaps_found" — ensure gaps are surfaced to the user.');
374
+ }
375
+ } catch (_e) { /* best-effort */ }
376
+ }
377
+ }
378
+ },
379
+ 'build:pbr:executor': {
380
+ description: 'build executor SUMMARY commits',
381
+ check: (planningDir, found, warnings) => {
382
+ checkSummaryCommits(planningDir, found, warnings);
383
+ }
384
+ },
385
+ 'quick:pbr:executor': {
386
+ description: 'quick executor SUMMARY commits',
387
+ check: (planningDir, found, warnings) => {
388
+ checkSummaryCommits(planningDir, found, warnings);
389
+ }
390
+ }
391
+ };
392
+
325
393
  function readStdin() {
326
394
  try {
327
395
  const input = fs.readFileSync(0, 'utf8').trim();
@@ -406,57 +474,11 @@ async function main() {
406
474
  skillWarnings.push(`${label} output may be stale — no recent output files detected.`);
407
475
  }
408
476
 
409
- // GAP-04: Begin planner must produce core files
410
- if (activeSkill === 'begin' && agentType === 'pbr:planner') {
411
- const coreFiles = ['REQUIREMENTS.md', 'ROADMAP.md', 'STATE.md'];
412
- for (const f of coreFiles) {
413
- if (!fs.existsSync(path.join(planningDir, f))) {
414
- skillWarnings.push(`Begin planner: ${f} was not created. The project may be in an incomplete state.`);
415
- }
416
- }
417
- }
418
-
419
- // GAP-05: Plan researcher should produce phase-level RESEARCH.md
420
- if (activeSkill === 'plan' && agentType === 'pbr:researcher') {
421
- const phaseResearch = findInPhaseDir(planningDir, /^RESEARCH\.md$/i);
422
- if (found.length === 0 && phaseResearch.length === 0) {
423
- skillWarnings.push('Plan researcher: No research output found in .planning/research/ or in the phase directory.');
424
- }
425
- }
426
-
427
- // GAP-08: Scan codebase-mapper should produce all 4 focus areas
428
- if (activeSkill === 'scan' && agentType === 'pbr:codebase-mapper') {
429
- const expectedAreas = ['tech', 'arch', 'quality', 'concerns'];
430
- const codebaseDir = path.join(planningDir, 'codebase');
431
- if (fs.existsSync(codebaseDir)) {
432
- try {
433
- const files = fs.readdirSync(codebaseDir).map(f => f.toLowerCase());
434
- for (const area of expectedAreas) {
435
- if (!files.some(f => f.includes(area))) {
436
- skillWarnings.push(`Scan mapper: No output file containing "${area}" found in .planning/codebase/. One of the 4 mappers may have failed.`);
437
- }
438
- }
439
- } catch (_e) { /* best-effort */ }
440
- }
441
- }
442
-
443
- // GAP-07: Review verifier should produce meaningful VERIFICATION.md status
444
- if (activeSkill === 'review' && agentType === 'pbr:verifier') {
445
- const verFiles = findInPhaseDir(planningDir, /^VERIFICATION\.md$/i);
446
- for (const vf of verFiles) {
447
- try {
448
- const content = fs.readFileSync(path.join(planningDir, vf), 'utf8');
449
- const statusMatch = content.match(/^status:\s*(\S+)/mi);
450
- if (statusMatch && statusMatch[1] === 'gaps_found') {
451
- skillWarnings.push('Review verifier: VERIFICATION.md has status "gaps_found" — ensure gaps are surfaced to the user.');
452
- }
453
- } catch (_e) { /* best-effort */ }
454
- }
455
- }
456
-
457
- // GAP-06: Build/quick executor SUMMARY should have commits
458
- if ((activeSkill === 'build' || activeSkill === 'quick') && agentType === 'pbr:executor') {
459
- checkSummaryCommits(planningDir, found, skillWarnings);
477
+ // Skill-specific dispatch via SKILL_CHECKS lookup
478
+ const skillCheckKey = `${activeSkill}:${agentType}`;
479
+ const skillCheck = SKILL_CHECKS[skillCheckKey];
480
+ if (skillCheck) {
481
+ skillCheck.check(planningDir, found, skillWarnings);
460
482
  }
461
483
 
462
484
  // Output logic: avoid duplicating warnings
@@ -526,5 +548,5 @@ async function main() {
526
548
  process.exit(0);
527
549
  }
528
550
 
529
- module.exports = { AGENT_OUTPUTS, findInPhaseDir, findInQuickDir, checkSummaryCommits, isRecent, getCurrentPhase, checkRoadmapStaleness };
551
+ module.exports = { AGENT_OUTPUTS, SKILL_CHECKS, findInPhaseDir, findInQuickDir, checkSummaryCommits, isRecent, getCurrentPhase, checkRoadmapStaleness };
530
552
  if (require.main === module || process.argv[1] === __filename) { main(); }
@@ -409,15 +409,40 @@ For each completed executor:
409
409
 
410
410
  **Spot-check executor claims:**
411
411
 
412
- After reading each SUMMARY, perform a lightweight verification:
413
- - Pick 2-3 files from the SUMMARY's `key_files` list and verify they exist (`ls`)
414
- - Run `git log --oneline -n {commit_count}` and confirm the count matches the claimed commits
415
- - For each spot-checked file, verify it has >10 lines (`wc -l`): warn if trivially small
416
- - For each spot-checked file, search for TODO/FIXME/placeholder/stub markers: warn if found
417
- - Check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user:
418
- "Plan {id} reported self-check failures: {list failures}. Inspect before continuing?"
419
- - If ANY spot-check fails, warn the user before proceeding to the next wave:
420
- "Spot-check failed for plan {id}: {detail}. Inspect before continuing?"
412
+ CRITICAL: Before reading results or advancing to the next wave, run the spot-check CLI for each completed plan.
413
+
414
+ For each completed plan in this wave:
415
+
416
+ ```bash
417
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js spot-check {phaseSlug} {planId}
418
+ ```
419
+
420
+ Where `{phaseSlug}` is the phase directory name (e.g., `49-build-workflow-hardening`) and `{planId}` is the plan identifier (e.g., `49-01`).
421
+
422
+ The command returns JSON: `{ ok, summary_exists, key_files_checked, commits_present, detail }`
423
+
424
+ **If `ok` is `false` for ANY plan: STOP.** Do NOT advance to the next wave. Present the user with:
425
+
426
+ ```
427
+ Spot-check FAILED for plan {planId}: {detail}
428
+
429
+ Choose an action:
430
+ Retry — Re-spawn executor for this plan
431
+ Continue — Skip this plan and proceed to next wave (may leave phase incomplete)
432
+ Abort — Stop the build entirely
433
+ ```
434
+
435
+ Use AskUserQuestion with the three options. Route:
436
+
437
+ - Retry: Re-spawn the executor for this plan (go back to Step 6a for this plan only)
438
+ - Continue: Log the failure, skip the plan, proceed
439
+ - Abort: Stop all build work, leave phase in partial state
440
+
441
+ **If `ok` is `true` for all plans:**
442
+
443
+ - Also check SUMMARY.md frontmatter for `self_check_failures`: if present, warn the user: "Plan {id} reported self-check failures: {list}. Inspect before continuing?"
444
+ - Also search SUMMARY.md for `## Self-Check: FAILED` marker — if present, warn before next wave
445
+ - Between waves: verify no file conflicts from parallel executors (`git status` for uncommitted changes)
421
446
 
422
447
  **Additional wave spot-checks:**
423
448
  - Check for `## Self-Check: FAILED` in SUMMARY.md — if present, warn user before proceeding to next wave