@sienklogic/plan-build-run 2.50.0 → 2.51.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,18 @@ 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.51.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.50.0...plan-build-run-v2.51.0) (2026-03-01)
9
+
10
+
11
+ ### Features
12
+
13
+ * **53-02:** add ci-poll and rollback CLI commands to pbr-tools ([c26434a](https://github.com/SienkLogic/plan-build-run/commit/c26434ac4d58ba8e0849205109f1978222131377))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **53-02:** sync ci-poll and rollback CLI updates to cursor-pbr and copilot-pbr ([ab78f09](https://github.com/SienkLogic/plan-build-run/commit/ab78f09db8e7e653d49d3b1bff366ae95bae98bc))
19
+
8
20
  ## [2.50.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.49.0...plan-build-run-v2.50.0) (2026-03-01)
9
21
 
10
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienklogic/plan-build-run",
3
- "version": "2.50.0",
3
+ "version": "2.51.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.50.0",
4
+ "version": "2.51.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",
@@ -487,19 +487,17 @@ Use AskUserQuestion (pattern: multi-option-failure from `skills/shared/gate-prom
487
487
  - If yes: warn user that those plans will also need to be skipped or adjusted
488
488
 
489
489
  **If user selects 'Rollback':**
490
- - Read `last_good_commit` from `.checkpoint-manifest.json`
491
- - If `last_good_commit` exists:
492
- - Show the user: "Rolling back to commit {sha} (last verified good state). This will soft-reset {N} commits."
493
- - Run: `git reset --soft {last_good_commit}`
494
- - Delete the failed plan's SUMMARY.md file if it was created
495
- - **CRITICAL — Invalidate downstream dependencies:**
496
- - Check if any plans in later waves depend on the rolled-back plan
497
- - For each downstream plan that depends on it: delete its SUMMARY.md (forces re-execution)
498
- - Remove ALL downstream dependent plans from `checkpoints_resolved` in the manifest
499
- - If downstream phases (outside this build) have `dependency_fingerprints` referencing this phase, warn: "Downstream phases may need re-planning with `/pbr:plan <N>` since Phase {current} was partially rolled back."
500
- - Update the checkpoint manifest: remove the failed plan from `checkpoints_resolved`
501
- - Continue to next wave or stop based on user preference
502
- - If no `last_good_commit`: warn "No rollback point available (this was the first plan). Use abort instead."
490
+ Run the rollback CLI:
491
+
492
+ ```bash
493
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js rollback .planning/phases/{NN}-{slug}/.checkpoint-manifest.json
494
+ ```
495
+
496
+ Returns `{ ok, rolled_back_to, plans_invalidated, files_deleted, warnings }`.
497
+
498
+ - If `ok` is `true`: display "Rolled back to commit {rolled_back_to}. {plans_invalidated.length} downstream plans invalidated."
499
+ Show any warnings. Continue to next wave or stop based on user preference.
500
+ - If `ok` is `false`: display the error message. Suggest "Use abort instead."
503
501
 
504
502
  **If user selects 'Abort':**
505
503
  - Update STATE.md with current progress
@@ -544,19 +542,21 @@ If `config.ci.gate_enabled` is `true` AND `config.git.branching` is not `none`:
544
542
 
545
543
  1. Push current commits: `git push`
546
544
  2. Wait 5 seconds for CI to trigger
547
- 3. Check: `gh run list --branch $(git branch --show-current) --limit 1 --json status,conclusion,url`
548
- 4. If in_progress: poll every 15 seconds up to `config.ci.wait_timeout_seconds`
549
- 5. If failed/timed out: show warning box:
550
-
545
+ 3. Get the current run ID:
546
+ ```bash
547
+ gh run list --branch $(git branch --show-current) --limit 1 --json databaseId -q '.[0].databaseId'
551
548
  ```
552
- CI Status: {conclusion}
553
- Run: {url}
554
- Options: [Wait] [Continue anyway] [Abort]
549
+ 4. Poll CI status using CLI:
550
+ ```bash
551
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js ci-poll <run-id> [--timeout <seconds>]
555
552
  ```
556
-
557
- 6. Use AskUserQuestion to present options: Wait / Continue anyway / Abort
558
- 7. If "Continue anyway": log deviation `DEVIATION: CI gate bypassed for wave {N}`
559
- 8. If "Abort": stop build, update STATE.md
553
+ Returns `{ status, conclusion, url, next_action, elapsed_seconds }`.
554
+ 5. If `next_action` is `"continue"`: proceed to next wave
555
+ 6. If `next_action` is `"wait"`: re-run ci-poll after 15 seconds (repeat up to `config.ci.wait_timeout_seconds`)
556
+ 7. If `next_action` is `"abort"` or `status` is `"failed"`:
557
+ Show warning box and use AskUserQuestion: Wait / Continue anyway / Abort
558
+ 8. If "Continue anyway": log deviation — `DEVIATION: CI gate bypassed for wave {N}`
559
+ 9. If "Abort": stop build, update STATE.md
560
560
 
561
561
  #### 6f. Update STATE.md
562
562
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbr",
3
3
  "displayName": "Plan-Build-Run",
4
- "version": "2.50.0",
4
+ "version": "2.51.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",
@@ -488,19 +488,17 @@ Use AskUserQuestion (pattern: multi-option-failure from `skills/shared/gate-prom
488
488
  - If yes: warn user that those plans will also need to be skipped or adjusted
489
489
 
490
490
  **If user selects 'Rollback':**
491
- - Read `last_good_commit` from `.checkpoint-manifest.json`
492
- - If `last_good_commit` exists:
493
- - Show the user: "Rolling back to commit {sha} (last verified good state). This will soft-reset {N} commits."
494
- - Run: `git reset --soft {last_good_commit}`
495
- - Delete the failed plan's SUMMARY.md file if it was created
496
- - **CRITICAL — Invalidate downstream dependencies:**
497
- - Check if any plans in later waves depend on the rolled-back plan
498
- - For each downstream plan that depends on it: delete its SUMMARY.md (forces re-execution)
499
- - Remove ALL downstream dependent plans from `checkpoints_resolved` in the manifest
500
- - If downstream phases (outside this build) have `dependency_fingerprints` referencing this phase, warn: "Downstream phases may need re-planning with `/pbr:plan <N>` since Phase {current} was partially rolled back."
501
- - Update the checkpoint manifest: remove the failed plan from `checkpoints_resolved`
502
- - Continue to next wave or stop based on user preference
503
- - If no `last_good_commit`: warn "No rollback point available (this was the first plan). Use abort instead."
491
+ Run the rollback CLI:
492
+
493
+ ```bash
494
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js rollback .planning/phases/{NN}-{slug}/.checkpoint-manifest.json
495
+ ```
496
+
497
+ Returns `{ ok, rolled_back_to, plans_invalidated, files_deleted, warnings }`.
498
+
499
+ - If `ok` is `true`: display "Rolled back to commit {rolled_back_to}. {plans_invalidated.length} downstream plans invalidated."
500
+ Show any warnings. Continue to next wave or stop based on user preference.
501
+ - If `ok` is `false`: display the error message. Suggest "Use abort instead."
504
502
 
505
503
  **If user selects 'Abort':**
506
504
  - Update STATE.md with current progress
@@ -545,18 +543,20 @@ If `config.ci.gate_enabled` is `true` AND `config.git.branching` is not `none`:
545
543
 
546
544
  1. Push current commits: `git push`
547
545
  2. Wait 5 seconds for CI to trigger
548
- 3. Check: `gh run list --branch $(git branch --show-current) --limit 1 --json status,conclusion,url`
549
- 4. If in_progress: poll every 15 seconds up to `config.ci.wait_timeout_seconds`
550
- 5. If failed/timed out: show warning box:
551
-
546
+ 3. Get the current run ID:
547
+ ```bash
548
+ gh run list --branch $(git branch --show-current) --limit 1 --json databaseId -q '.[0].databaseId'
552
549
  ```
553
- CI Status: {conclusion}
554
- Run: {url}
555
- Options: [Wait] [Continue anyway] [Abort]
550
+ 4. Poll CI status using CLI:
551
+ ```bash
552
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js ci-poll <run-id> [--timeout <seconds>]
556
553
  ```
557
-
558
- 6. Use AskUserQuestion to present options: Wait / Continue anyway / Abort
559
- 7. If "Continue anyway": log deviation `DEVIATION: CI gate bypassed for wave {N}`
554
+ Returns `{ status, conclusion, url, next_action, elapsed_seconds }`.
555
+ 5. If `next_action` is `"continue"`: proceed to next wave
556
+ 6. If `next_action` is `"wait"`: re-run ci-poll after 15 seconds (repeat up to `config.ci.wait_timeout_seconds`)
557
+ 7. If `next_action` is `"abort"` or `status` is `"failed"`:
558
+ Show warning box and use AskUserQuestion: Wait / Continue anyway / Abort
559
+ 8. If "Continue anyway": log deviation — `DEVIATION: CI gate bypassed for wave {N}`
560
560
  8. If "Abort": stop build, update STATE.md
561
561
 
562
562
  #### 6f. Update STATE.md
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pbr",
3
- "version": "2.50.0",
3
+ "version": "2.51.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",
@@ -460,19 +460,17 @@ Use AskUserQuestion (pattern: multi-option-failure from `skills/shared/gate-prom
460
460
  - If yes: warn user that those plans will also need to be skipped or adjusted
461
461
 
462
462
  **If user selects 'Rollback':**
463
- - Read `last_good_commit` from `.checkpoint-manifest.json`
464
- - If `last_good_commit` exists:
465
- - Show the user: "Rolling back to commit {sha} (last verified good state). This will soft-reset {N} commits."
466
- - Run: `git reset --soft {last_good_commit}`
467
- - Delete the failed plan's SUMMARY.md file if it was created
468
- - **CRITICAL — Invalidate downstream dependencies:**
469
- - Check if any plans in later waves depend on the rolled-back plan
470
- - For each downstream plan that depends on it: delete its SUMMARY.md (forces re-execution)
471
- - Remove ALL downstream dependent plans from `checkpoints_resolved` in the manifest
472
- - If downstream phases (outside this build) have `dependency_fingerprints` referencing this phase, warn: "Downstream phases may need re-planning with `/pbr:plan <N>` since Phase {current} was partially rolled back."
473
- - Update the checkpoint manifest: remove the failed plan from `checkpoints_resolved`
474
- - Continue to next wave or stop based on user preference
475
- - If no `last_good_commit`: warn "No rollback point available (this was the first plan). Use abort instead."
463
+ Run the rollback CLI:
464
+
465
+ ```bash
466
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js rollback .planning/phases/{NN}-{slug}/.checkpoint-manifest.json
467
+ ```
468
+
469
+ Returns `{ ok, rolled_back_to, plans_invalidated, files_deleted, warnings }`.
470
+
471
+ - If `ok` is `true`: display "Rolled back to commit {rolled_back_to}. {plans_invalidated.length} downstream plans invalidated."
472
+ Show any warnings. Continue to next wave or stop based on user preference.
473
+ - If `ok` is `false`: display the error message. Suggest "Use abort instead."
476
474
 
477
475
  **If user selects 'Abort':**
478
476
  - Update STATE.md with current progress
@@ -517,19 +515,21 @@ If `config.ci.gate_enabled` is `true` AND `config.git.branching` is not `none`:
517
515
 
518
516
  1. Push current commits: `git push`
519
517
  2. Wait 5 seconds for CI to trigger
520
- 3. Check: `gh run list --branch $(git branch --show-current) --limit 1 --json status,conclusion,url`
521
- 4. If in_progress: poll every 15 seconds up to `config.ci.wait_timeout_seconds`
522
- 5. If failed/timed out: show warning box:
523
-
518
+ 3. Get the current run ID:
519
+ ```bash
520
+ gh run list --branch $(git branch --show-current) --limit 1 --json databaseId -q '.[0].databaseId'
524
521
  ```
525
- CI Status: {conclusion}
526
- Run: {url}
527
- Options: [Wait] [Continue anyway] [Abort]
522
+ 4. Poll CI status using CLI:
523
+ ```bash
524
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js ci-poll <run-id> [--timeout <seconds>]
528
525
  ```
529
-
530
- 6. Use AskUserQuestion to present options: Wait / Continue anyway / Abort
531
- 7. If "Continue anyway": log deviation `DEVIATION: CI gate bypassed for wave {N}`
532
- 8. If "Abort": stop build, update STATE.md
526
+ Returns `{ status, conclusion, url, next_action, elapsed_seconds }`.
527
+ 5. If `next_action` is `"continue"`: proceed to next wave
528
+ 6. If `next_action` is `"wait"`: re-run ci-poll after 15 seconds (repeat up to `config.ci.wait_timeout_seconds`)
529
+ 7. If `next_action` is `"abort"` or `status` is `"failed"`:
530
+ Show warning box and use AskUserQuestion: Wait / Continue anyway / Abort
531
+ 8. If "Continue anyway": log deviation — `DEVIATION: CI gate bypassed for wave {N}`
532
+ 9. If "Abort": stop build, update STATE.md
533
533
 
534
534
  #### 6f. Update STATE.md
535
535