@sienklogic/plan-build-run 2.40.1 → 2.41.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 +18 -0
- package/package.json +1 -1
- package/plugins/copilot-pbr/agents/dev-sync.agent.md +8 -0
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/plan-authoring.md +37 -0
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/agents/dev-sync.md +8 -0
- package/plugins/cursor-pbr/references/plan-authoring.md +37 -0
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/dev-sync.md +8 -0
- package/plugins/pbr/references/plan-authoring.md +37 -0
- package/plugins/pbr/scripts/check-plan-format.js +2 -2
- package/plugins/pbr/scripts/lib/state.js +14 -2
- package/plugins/pbr/scripts/pbr-tools.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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.41.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.40.1...plan-build-run-v2.41.0) (2026-02-28)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **47-01:** expand stateUpdate to cover all 9 STATE.md frontmatter fields ([de6a6b3](https://github.com/SienkLogic/plan-build-run/commit/de6a6b3b3f577c436396927a4b5511b5163a527c))
|
|
14
|
+
* **47-02:** add [@file](https://github.com/file): escape hatch tests and documentation ([6634f50](https://github.com/SienkLogic/plan-build-run/commit/6634f504c7e64f25caaecb0b06561c3a03b88d35))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **47-01:** update stale state update usage hint to list all 9 fields ([e0d0e39](https://github.com/SienkLogic/plan-build-run/commit/e0d0e39fa11c8a210b7f44f1e311f80ce761b6c6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
* **46-02:** add agent contract compliance audit for phase 46 ([78bca43](https://github.com/SienkLogic/plan-build-run/commit/78bca43bb1c37375c9b7bd3704d874d957f61b26))
|
|
25
|
+
|
|
8
26
|
## [2.40.1](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.40.0...plan-build-run-v2.40.1) (2026-02-27)
|
|
9
27
|
|
|
10
28
|
|
package/package.json
CHANGED
|
@@ -6,6 +6,14 @@ infer: true
|
|
|
6
6
|
target: "github-copilot"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
<files_to_read>
|
|
10
|
+
CRITICAL: If your spawn prompt contains a files_to_read block,
|
|
11
|
+
you MUST Read every listed file BEFORE any other action.
|
|
12
|
+
Skipping this causes hallucinated context and broken output.
|
|
13
|
+
</files_to_read>
|
|
14
|
+
|
|
15
|
+
> Default files: the changed pbr/ file path(s) provided in the spawn prompt
|
|
16
|
+
|
|
9
17
|
# Cross-Plugin Sync Agent
|
|
10
18
|
|
|
11
19
|
You are **dev-sync**, a specialized agent for the Plan-Build-Run project. Your sole job is to take changes made in `plugins/pbr/` and apply the equivalent changes to `plugins/cursor-pbr/` and `plugins/copilot-pbr/`, adjusting for each derivative's format requirements.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.41.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",
|
|
@@ -201,6 +201,43 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans:
|
|
|
201
201
|
|
|
202
202
|
---
|
|
203
203
|
|
|
204
|
+
## @file: Output Pattern (Large Payloads)
|
|
205
|
+
|
|
206
|
+
When a `pbr-tools` CLI command produces output exceeding 50,000 characters, the tool writes
|
|
207
|
+
the JSON payload to a temporary file instead of emitting it inline. It then prints a single
|
|
208
|
+
line of the form:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
@file:/tmp/pbr-1234567890.json
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This prevents stdout overflow in environments with limited buffer sizes (hooks, Task() runners).
|
|
215
|
+
|
|
216
|
+
### Verify Step Pattern
|
|
217
|
+
|
|
218
|
+
If a plan's `<verify>` step calls `pbr-tools` and inspects the output, guard against the
|
|
219
|
+
`@file:` case:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
OUT=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load)
|
|
223
|
+
if echo "$OUT" | grep -q '^@file:'; then
|
|
224
|
+
OUT=$(cat "${OUT#@file:}")
|
|
225
|
+
fi
|
|
226
|
+
echo "$OUT" | grep '"status"'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Agent Prompt Handling
|
|
230
|
+
|
|
231
|
+
When an agent receives `@file:` output from a spawned tool call, it must read the referenced
|
|
232
|
+
file to obtain the actual JSON payload. The `@file:` prefix is a signal — not a path fragment
|
|
233
|
+
to be appended to another command.
|
|
234
|
+
|
|
235
|
+
Plan actions that spawn `pbr-tools` subcommands should instruct the agent:
|
|
236
|
+
|
|
237
|
+
> If the output starts with `@file:`, read the file at that path to get the full JSON response.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
204
241
|
## Context Fidelity Checklist
|
|
205
242
|
|
|
206
243
|
Before writing plan files, verify context compliance:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
3
|
"displayName": "Plan-Build-Run",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.41.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",
|
|
@@ -5,6 +5,14 @@ model: sonnet
|
|
|
5
5
|
readonly: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
<files_to_read>
|
|
9
|
+
CRITICAL: If your spawn prompt contains a files_to_read block,
|
|
10
|
+
you MUST Read every listed file BEFORE any other action.
|
|
11
|
+
Skipping this causes hallucinated context and broken output.
|
|
12
|
+
</files_to_read>
|
|
13
|
+
|
|
14
|
+
> Default files: the changed pbr/ file path(s) provided in the spawn prompt
|
|
15
|
+
|
|
8
16
|
# Cross-Plugin Sync Agent
|
|
9
17
|
|
|
10
18
|
You are **dev-sync**, a specialized agent for the Plan-Build-Run project. Your sole job is to take changes made in `plugins/pbr/` and apply the equivalent changes to `plugins/cursor-pbr/` and `plugins/copilot-pbr/`, adjusting for each derivative's format requirements.
|
|
@@ -201,6 +201,43 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans:
|
|
|
201
201
|
|
|
202
202
|
---
|
|
203
203
|
|
|
204
|
+
## @file: Output Pattern (Large Payloads)
|
|
205
|
+
|
|
206
|
+
When a `pbr-tools` CLI command produces output exceeding 50,000 characters, the tool writes
|
|
207
|
+
the JSON payload to a temporary file instead of emitting it inline. It then prints a single
|
|
208
|
+
line of the form:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
@file:/tmp/pbr-1234567890.json
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This prevents stdout overflow in environments with limited buffer sizes (hooks, Task() runners).
|
|
215
|
+
|
|
216
|
+
### Verify Step Pattern
|
|
217
|
+
|
|
218
|
+
If a plan's `<verify>` step calls `pbr-tools` and inspects the output, guard against the
|
|
219
|
+
`@file:` case:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
OUT=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load)
|
|
223
|
+
if echo "$OUT" | grep -q '^@file:'; then
|
|
224
|
+
OUT=$(cat "${OUT#@file:}")
|
|
225
|
+
fi
|
|
226
|
+
echo "$OUT" | grep '"status"'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Agent Prompt Handling
|
|
230
|
+
|
|
231
|
+
When an agent receives `@file:` output from a spawned tool call, it must read the referenced
|
|
232
|
+
file to obtain the actual JSON payload. The `@file:` prefix is a signal — not a path fragment
|
|
233
|
+
to be appended to another command.
|
|
234
|
+
|
|
235
|
+
Plan actions that spawn `pbr-tools` subcommands should instruct the agent:
|
|
236
|
+
|
|
237
|
+
> If the output starts with `@file:`, read the file at that path to get the full JSON response.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
204
241
|
## Context Fidelity Checklist
|
|
205
242
|
|
|
206
243
|
Before writing plan files, verify context compliance:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pbr",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.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",
|
|
@@ -12,6 +12,14 @@ tools:
|
|
|
12
12
|
- Grep
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
<files_to_read>
|
|
16
|
+
CRITICAL: If your spawn prompt contains a files_to_read block,
|
|
17
|
+
you MUST Read every listed file BEFORE any other action.
|
|
18
|
+
Skipping this causes hallucinated context and broken output.
|
|
19
|
+
</files_to_read>
|
|
20
|
+
|
|
21
|
+
> Default files: the changed pbr/ file path(s) provided in the spawn prompt
|
|
22
|
+
|
|
15
23
|
# Cross-Plugin Sync Agent
|
|
16
24
|
|
|
17
25
|
You are **dev-sync**, a specialized agent for the Plan-Build-Run project. Your sole job is to take changes made in `plugins/pbr/` and apply the equivalent changes to `plugins/cursor-pbr/` and `plugins/copilot-pbr/`, adjusting for each derivative's format requirements.
|
|
@@ -200,6 +200,43 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans:
|
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
203
|
+
## @file: Output Pattern (Large Payloads)
|
|
204
|
+
|
|
205
|
+
When a `pbr-tools` CLI command produces output exceeding 50,000 characters, the tool writes
|
|
206
|
+
the JSON payload to a temporary file instead of emitting it inline. It then prints a single
|
|
207
|
+
line of the form:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
@file:/tmp/pbr-1234567890.json
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
This prevents stdout overflow in environments with limited buffer sizes (hooks, Task() runners).
|
|
214
|
+
|
|
215
|
+
### Verify Step Pattern
|
|
216
|
+
|
|
217
|
+
If a plan's `<verify>` step calls `pbr-tools` and inspects the output, guard against the
|
|
218
|
+
`@file:` case:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
OUT=$(node ${CLAUDE_PLUGIN_ROOT}/scripts/pbr-tools.js state load)
|
|
222
|
+
if echo "$OUT" | grep -q '^@file:'; then
|
|
223
|
+
OUT=$(cat "${OUT#@file:}")
|
|
224
|
+
fi
|
|
225
|
+
echo "$OUT" | grep '"status"'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Agent Prompt Handling
|
|
229
|
+
|
|
230
|
+
When an agent receives `@file:` output from a spawned tool call, it must read the referenced
|
|
231
|
+
file to obtain the actual JSON payload. The `@file:` prefix is a signal — not a path fragment
|
|
232
|
+
to be appended to another command.
|
|
233
|
+
|
|
234
|
+
Plan actions that spawn `pbr-tools` subcommands should instruct the agent:
|
|
235
|
+
|
|
236
|
+
> If the output starts with `@file:`, read the file at that path to get the full JSON response.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
203
240
|
## Context Fidelity Checklist
|
|
204
241
|
|
|
205
242
|
Before writing plan files, verify context compliance:
|
|
@@ -56,7 +56,7 @@ async function main() {
|
|
|
56
56
|
|
|
57
57
|
// Determine file type
|
|
58
58
|
const basename = path.basename(filePath);
|
|
59
|
-
const isPlan =
|
|
59
|
+
const isPlan = /^PLAN.*\.md$/.test(basename);
|
|
60
60
|
const isSummary = basename.includes('SUMMARY') && basename.endsWith('.md');
|
|
61
61
|
const isVerification = basename === 'VERIFICATION.md';
|
|
62
62
|
const isRoadmap = basename === 'ROADMAP.md';
|
|
@@ -276,7 +276,7 @@ function validateSummary(content, _filePath) {
|
|
|
276
276
|
async function checkPlanWrite(data) {
|
|
277
277
|
const filePath = data.tool_input?.file_path || data.tool_input?.path || '';
|
|
278
278
|
const basename = path.basename(filePath);
|
|
279
|
-
const isPlan =
|
|
279
|
+
const isPlan = /^PLAN.*\.md$/.test(basename);
|
|
280
280
|
const isSummary = basename.includes('SUMMARY') && basename.endsWith('.md');
|
|
281
281
|
const isVerification = basename === 'VERIFICATION.md';
|
|
282
282
|
const isRoadmap = basename === 'ROADMAP.md';
|
|
@@ -281,7 +281,8 @@ function stateCheckProgress(planningDir) {
|
|
|
281
281
|
* Atomically update a field in STATE.md using lockedFileUpdate.
|
|
282
282
|
* Supports both legacy and frontmatter (v2) formats.
|
|
283
283
|
*
|
|
284
|
-
* @param {string} field - One of: current_phase, status, plans_complete, last_activity
|
|
284
|
+
* @param {string} field - One of: current_phase, status, plans_complete, last_activity,
|
|
285
|
+
* progress_percent, phase_slug, total_phases, last_command, blockers
|
|
285
286
|
* @param {string} value - New value (use 'now' for last_activity to auto-timestamp)
|
|
286
287
|
* @param {string} [planningDir] - Path to .planning directory
|
|
287
288
|
*/
|
|
@@ -292,7 +293,18 @@ function stateUpdate(field, value, planningDir) {
|
|
|
292
293
|
return { success: false, error: 'STATE.md not found' };
|
|
293
294
|
}
|
|
294
295
|
|
|
295
|
-
|
|
296
|
+
// All 9 STATE.md frontmatter fields supported by stateUpdate
|
|
297
|
+
const validFields = [
|
|
298
|
+
'current_phase',
|
|
299
|
+
'status',
|
|
300
|
+
'plans_complete',
|
|
301
|
+
'last_activity',
|
|
302
|
+
'progress_percent',
|
|
303
|
+
'phase_slug',
|
|
304
|
+
'total_phases',
|
|
305
|
+
'last_command',
|
|
306
|
+
'blockers'
|
|
307
|
+
];
|
|
296
308
|
if (!validFields.includes(field)) {
|
|
297
309
|
return { success: false, error: `Invalid field: ${field}. Valid fields: ${validFields.join(', ')}` };
|
|
298
310
|
}
|
|
@@ -417,7 +417,7 @@ async function main() {
|
|
|
417
417
|
const field = args[2];
|
|
418
418
|
const value = args[3];
|
|
419
419
|
if (!field || value === undefined) {
|
|
420
|
-
error('Usage: pbr-tools.js state update <field> <value>\nFields: current_phase, status, plans_complete, last_activity');
|
|
420
|
+
error('Usage: pbr-tools.js state update <field> <value>\nFields: current_phase, status, plans_complete, last_activity, progress_percent, phase_slug, total_phases, last_command, blockers');
|
|
421
421
|
}
|
|
422
422
|
output(stateUpdate(field, value));
|
|
423
423
|
} else if (command === 'config' && subcommand === 'validate') {
|