@sienklogic/plan-build-run 2.59.0 → 2.61.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 +39 -0
- package/package.json +1 -1
- package/plugins/codex-pbr/agents/executor.md +8 -0
- package/plugins/codex-pbr/agents/plan-checker.md +5 -3
- package/plugins/codex-pbr/agents/planner.md +13 -7
- package/plugins/codex-pbr/agents/verifier.md +10 -1
- package/plugins/codex-pbr/references/plan-format.md +46 -8
- package/plugins/codex-pbr/skills/begin/SKILL.md +11 -27
- package/plugins/codex-pbr/skills/discuss/SKILL.md +52 -2
- package/plugins/codex-pbr/skills/health/SKILL.md +13 -0
- package/plugins/codex-pbr/skills/import/SKILL.md +275 -0
- package/plugins/codex-pbr/skills/plan/SKILL.md +11 -1
- package/plugins/codex-pbr/skills/shared/context-loader-task.md +2 -0
- package/plugins/codex-pbr/skills/status/SKILL.md +17 -0
- package/plugins/codex-pbr/templates/PROJECT.md.tmpl +41 -0
- package/plugins/codex-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
- package/plugins/codex-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
- package/plugins/codex-pbr/templates/project-CONTEXT.md.tmpl +43 -0
- package/plugins/copilot-pbr/agents/executor.agent.md +8 -0
- package/plugins/copilot-pbr/agents/plan-checker.agent.md +5 -3
- package/plugins/copilot-pbr/agents/planner.agent.md +13 -7
- package/plugins/copilot-pbr/agents/verifier.agent.md +10 -1
- package/plugins/copilot-pbr/hooks/hooks.json +1 -0
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/plan-format.md +46 -8
- package/plugins/copilot-pbr/skills/begin/SKILL.md +11 -27
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +52 -2
- package/plugins/copilot-pbr/skills/health/SKILL.md +13 -0
- package/plugins/copilot-pbr/skills/import/SKILL.md +275 -0
- package/plugins/copilot-pbr/skills/plan/SKILL.md +11 -1
- package/plugins/copilot-pbr/skills/shared/context-loader-task.md +2 -0
- package/plugins/copilot-pbr/skills/status/SKILL.md +17 -0
- package/plugins/copilot-pbr/templates/PROJECT.md.tmpl +41 -0
- package/plugins/copilot-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
- package/plugins/copilot-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
- package/plugins/copilot-pbr/templates/project-CONTEXT.md.tmpl +43 -0
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/agents/executor.md +8 -0
- package/plugins/cursor-pbr/agents/plan-checker.md +5 -3
- package/plugins/cursor-pbr/agents/planner.md +13 -7
- package/plugins/cursor-pbr/agents/verifier.md +10 -1
- package/plugins/cursor-pbr/hooks/hooks.json +1 -0
- package/plugins/cursor-pbr/references/plan-format.md +46 -8
- package/plugins/cursor-pbr/skills/begin/SKILL.md +11 -27
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +53 -3
- package/plugins/cursor-pbr/skills/health/SKILL.md +13 -0
- package/plugins/cursor-pbr/skills/import/SKILL.md +276 -1
- package/plugins/cursor-pbr/skills/plan/SKILL.md +11 -1
- package/plugins/cursor-pbr/skills/shared/context-loader-task.md +2 -0
- package/plugins/cursor-pbr/skills/status/SKILL.md +17 -0
- package/plugins/cursor-pbr/templates/PROJECT.md.tmpl +41 -0
- package/plugins/cursor-pbr/templates/REQUIREMENTS.md.tmpl +52 -0
- package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
- package/plugins/cursor-pbr/templates/project-CONTEXT.md.tmpl +43 -0
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/executor.md +8 -0
- package/plugins/pbr/agents/plan-checker.md +5 -3
- package/plugins/pbr/agents/planner.md +13 -7
- package/plugins/pbr/agents/verifier.md +10 -1
- package/plugins/pbr/hooks/hooks.json +1 -0
- package/plugins/pbr/references/plan-format.md +46 -8
- package/plugins/pbr/scripts/check-plan-format.js +29 -0
- package/plugins/pbr/scripts/config-schema.json +14 -1
- package/plugins/pbr/scripts/context-bridge.js +1 -1
- package/plugins/pbr/scripts/lib/gates/doc-existence.js +46 -0
- package/plugins/pbr/scripts/post-write-dispatch.js +22 -2
- package/plugins/pbr/scripts/sync-context-to-claude.js +100 -0
- package/plugins/pbr/scripts/validate-task.js +14 -1
- package/plugins/pbr/skills/begin/SKILL.md +11 -27
- package/plugins/pbr/skills/discuss/SKILL.md +53 -3
- package/plugins/pbr/skills/health/SKILL.md +13 -0
- package/plugins/pbr/skills/import/SKILL.md +276 -1
- package/plugins/pbr/skills/plan/SKILL.md +11 -1
- package/plugins/pbr/skills/shared/context-loader-task.md +2 -0
- package/plugins/pbr/skills/status/SKILL.md +17 -0
- package/plugins/pbr/templates/PROJECT.md.tmpl +41 -0
- package/plugins/pbr/templates/REQUIREMENTS.md.tmpl +52 -0
- package/plugins/pbr/templates/VERIFICATION-DETAIL.md.tmpl +5 -0
- package/plugins/pbr/templates/project-CONTEXT.md.tmpl +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ 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.61.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.60.0...plan-build-run-v2.61.0) (2026-03-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **prd-import:** add --prd flag and Steps A-G to import skill ([1260658](https://github.com/SienkLogic/plan-build-run/commit/1260658fc4341f61f7e5c7e8bc47b70932f34bd8))
|
|
14
|
+
* **prd-import:** add prd.auto_extract config schema key ([5ba6b8a](https://github.com/SienkLogic/plan-build-run/commit/5ba6b8a57c6d99ef7ceb8279dda8e25acf5352fb))
|
|
15
|
+
* **prd-import:** sync --prd import flow to derivative plugins ([0d5fa67](https://github.com/SienkLogic/plan-build-run/commit/0d5fa67dcf0b84411dbe09b3ba77f278d7c178cc))
|
|
16
|
+
|
|
17
|
+
## [2.60.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.59.0...plan-build-run-v2.60.0) (2026-03-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **65-01:** add project-CONTEXT.md.tmpl with planner-embeds pattern to all 4 plugins ([683f67c](https://github.com/SienkLogic/plan-build-run/commit/683f67c48197df79b17fb6199081914c663f458b))
|
|
23
|
+
* **65-01:** add PROJECT.md.tmpl to all 4 plugin template directories ([6416490](https://github.com/SienkLogic/plan-build-run/commit/6416490bdbd20867c2bc5f418c526d70b7f651e9))
|
|
24
|
+
* **65-01:** add REQUIREMENTS.md.tmpl with REQ-F/REQ-NF schema to all 4 plugins ([f293660](https://github.com/SienkLogic/plan-build-run/commit/f293660572dec225e7f3a25c137b199097af8d84))
|
|
25
|
+
* **65-02:** add --project flag and Step 1-project mode to discuss/SKILL.md across all 4 plugins ([35a40c4](https://github.com/SienkLogic/plan-build-run/commit/35a40c4a1ea24cf6b68fa076ca82e268cd208bb1))
|
|
26
|
+
* **65-02:** add PROJECT.md to context-loader-task.md briefing file lists across all 4 plugins ([12d4668](https://github.com/SienkLogic/plan-build-run/commit/12d46688632e6578e1e120ea123ff5de02bb781f))
|
|
27
|
+
* **65-02:** update begin/SKILL.md REQ-F/REQ-NF schema and project-CONTEXT template ref across 4 plugins; add 3 new keyTemplates to test ([b228120](https://github.com/SienkLogic/plan-build-run/commit/b228120d422cb3b8bd992cef1b4cada67cb11f3e))
|
|
28
|
+
* **65-03:** add doc-existence gate to validate-task; update test fixtures for implements advisory ([c5fc1e3](https://github.com/SienkLogic/plan-build-run/commit/c5fc1e3d6a360908d0652131173a784c5a7db427))
|
|
29
|
+
* **65-03:** GREEN - implement sync-context-to-claude.js ([65784a0](https://github.com/SienkLogic/plan-build-run/commit/65784a057622d600fc26891dc9ece84c8c53a2dd))
|
|
30
|
+
* **65-04:** add advisory warnings to health skill for missing PROJECT.md, REQUIREMENTS.md, CONTEXT.md across all 4 plugins ([182df09](https://github.com/SienkLogic/plan-build-run/commit/182df09681130b3927a09821f9d464b2546441ee))
|
|
31
|
+
* **65-04:** update planner agent for dual-source CONTEXT.md loading and plan/SKILL.md compliance check ([bd6cf41](https://github.com/SienkLogic/plan-build-run/commit/bd6cf4112b6f723459c5127be8bfc74efc98e370))
|
|
32
|
+
* **65-04:** update status skill to display PROJECT.md, REQUIREMENTS.md, CONTEXT.md presence across all 4 plugins ([60df410](https://github.com/SienkLogic/plan-build-run/commit/60df4104fa39d406b1833311a99df493922475d2))
|
|
33
|
+
* **xml-plan-format:** add auto_checkpoints to config-schema and satisfied/unsatisfied to VERIFICATION template ([72d08e8](https://github.com/SienkLogic/plan-build-run/commit/72d08e8dccf58e5011485bfb16a39db4e972ecef))
|
|
34
|
+
* **xml-plan-format:** add automated wrapper, feature type, and implements field to plan-format.md ([3ee897a](https://github.com/SienkLogic/plan-build-run/commit/3ee897a89016fe28b968266f33ff286f90de7671))
|
|
35
|
+
* **xml-plan-format:** enforce implements: blocking, add feature task validation, satisfied/unsatisfied advisory ([4d78e8e](https://github.com/SienkLogic/plan-build-run/commit/4d78e8eeccda91733b11f206c0d19ed075fd9fe7))
|
|
36
|
+
* **xml-plan-format:** sync cursor-pbr and copilot-pbr agents for implements:/automated/satisfied traceability ([753d4ed](https://github.com/SienkLogic/plan-build-run/commit/753d4ed0b3c4f486496781012d6dcef951d42076))
|
|
37
|
+
* **xml-plan-format:** update planner/executor/verifier/plan-checker for implements: traceability and must_haves locking ([98cc23f](https://github.com/SienkLogic/plan-build-run/commit/98cc23f7e5cfca60c188809b737c4156ceb49028))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* **cross-plugin-sync:** align status skill Step 1d heading order in cursor-pbr and copilot-pbr ([dc8419e](https://github.com/SienkLogic/plan-build-run/commit/dc8419e33c1184a2224cdb22d6383bf572d41d58))
|
|
43
|
+
* **cross-plugin-sync:** sync phase 66 references, templates, and agents to codex-pbr, copilot-pbr, cursor-pbr ([e143d9e](https://github.com/SienkLogic/plan-build-run/commit/e143d9ecfc4792fb8085f62ed9227738324ea69f))
|
|
44
|
+
* **doc-gates:** add 3-part format to doc-existence blocking reason ([ba2d732](https://github.com/SienkLogic/plan-build-run/commit/ba2d732e1fd89afce266a50057b2b1411152903e))
|
|
45
|
+
* **doc-gates:** upgrade doc-existence gate from advisory to blocking ([a4eeb3f](https://github.com/SienkLogic/plan-build-run/commit/a4eeb3fa015b0a81d4130dd7a9e4c220f124bf7d))
|
|
46
|
+
|
|
8
47
|
## [2.59.0](https://github.com/SienkLogic/plan-build-run/compare/plan-build-run-v2.58.0...plan-build-run-v2.59.0) (2026-03-06)
|
|
9
48
|
|
|
10
49
|
|
package/package.json
CHANGED
|
@@ -35,6 +35,9 @@ You are **executor**, the code execution agent for Plan-Build-Run. You receive v
|
|
|
35
35
|
a. Read task XML
|
|
36
36
|
b. Execute <action> steps
|
|
37
37
|
c. Run <verify> commands
|
|
38
|
+
- If <verify> contains an <automated> child element, extract and run the command inside it
|
|
39
|
+
- If <verify> is plain text (no <automated> child), run it as before (backward compat)
|
|
40
|
+
- Both forms produce the same result — <automated> is machine-parseable, plain text is human-readable
|
|
38
41
|
d. If verify passes: commit
|
|
39
42
|
e. If verify fails: apply deviation rules
|
|
40
43
|
f. If checkpoint: STOP and return
|
|
@@ -196,6 +199,11 @@ When a task has a checkpoint type, **STOP execution** and return a structured re
|
|
|
196
199
|
| `decision` | Before executing | Decision needed, options, context |
|
|
197
200
|
| `human-action` | Before executing | What user must do, step-by-step |
|
|
198
201
|
|
|
202
|
+
**auto_checkpoints config**: After loading plan frontmatter, read `gates.auto_checkpoints` from config.json (default false):
|
|
203
|
+
- Load with: `node pbr-tools.js config-get gates.auto_checkpoints`
|
|
204
|
+
- When `auto_checkpoints` is true AND task type is `checkpoint:human-verify`: run the automated verify command. If it passes, auto-approve and continue. If it fails, still STOP and return the checkpoint response.
|
|
205
|
+
- `checkpoint:decision` and `checkpoint:human-action` always require human input regardless of `auto_checkpoints`.
|
|
206
|
+
|
|
199
207
|
**Automation-first**: Complete all automatable pre-work before any checkpoint. Only checkpoint for genuinely human-required actions (API keys needing account login, architectural choices, destructive approvals).
|
|
200
208
|
|
|
201
209
|
All responses use: `CHECKPOINT: {TYPE}` header, task info, type-specific fields, completed tasks table, remaining tasks list.
|
|
@@ -157,14 +157,16 @@ Plans declare `provides`/`consumes`; all consumed items must have providers.
|
|
|
157
157
|
| Missing provides/consumes for exports | INFO |
|
|
158
158
|
|
|
159
159
|
### D9: Requirement Traceability
|
|
160
|
-
Plans declare `
|
|
160
|
+
Plans declare `implements` with bidirectional coverage. Forward: IDs trace to REQUIREMENTS.md (or ROADMAP.md goals). Backward: every requirement covered by at least one plan.
|
|
161
|
+
|
|
162
|
+
> **Note:** `requirement_ids:` is a deprecated alias for `implements:` — treat as equivalent during transition.
|
|
161
163
|
|
|
162
164
|
| Condition | Severity |
|
|
163
165
|
|-----------|----------|
|
|
164
|
-
|
|
|
166
|
+
| implements: ID references nonexistent requirement | BLOCKER |
|
|
165
167
|
| Requirement not covered by any plan | WARNING |
|
|
166
168
|
| ROADMAP goal not covered (no REQUIREMENTS.md) | WARNING |
|
|
167
|
-
| Plan missing
|
|
169
|
+
| Plan missing implements: entirely | WARNING |
|
|
168
170
|
|
|
169
171
|
### D10: Test Plan Coverage
|
|
170
172
|
Code-producing tasks should include test expectations. Check that tasks creating or modifying source code have corresponding test references in `<files>`, `<action>`, or `<verify>`. Test files should appear in `<files>`, test commands in `<verify>`, and test outcomes in `<done>`.
|
|
@@ -9,7 +9,7 @@ you MUST Read every listed file BEFORE any other action.
|
|
|
9
9
|
Skipping this causes hallucinated context and broken output.
|
|
10
10
|
</files_to_read>
|
|
11
11
|
|
|
12
|
-
> Default files: CONTEXT.md, ROADMAP.md, research documents, existing plan files
|
|
12
|
+
> Default files: PROJECT.md (if exists), CONTEXT.md (project-level, if exists), phase CONTEXT.md (if exists), ROADMAP.md, research documents, existing plan files
|
|
13
13
|
|
|
14
14
|
# Plan-Build-Run Planner
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ You are **planner**, the planning agent for the Plan-Build-Run development syste
|
|
|
20
20
|
|
|
21
21
|
## Core Principle: Context Fidelity
|
|
22
22
|
|
|
23
|
-
**Locked decisions from CONTEXT.md are NON-NEGOTIABLE.** You never substitute, reinterpret, or work around locked decisions. If CONTEXT.md says "Use PostgreSQL", the plan uses PostgreSQL. Period.
|
|
23
|
+
**Locked decisions from BOTH `.planning/CONTEXT.md` (project-level) AND `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level) are NON-NEGOTIABLE.** Phase-level overrides project-level for the same decision area. You never substitute, reinterpret, or work around locked decisions. If CONTEXT.md says "Use PostgreSQL", the plan uses PostgreSQL. Period.
|
|
24
24
|
|
|
25
25
|
**Deferred ideas from CONTEXT.md MUST NOT appear in plans.** If something is marked as deferred, it does not exist for planning purposes. Do not plan for it, do not create hooks for it, do not "prepare" for it.
|
|
26
26
|
</role>
|
|
@@ -192,7 +192,13 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans MU
|
|
|
192
192
|
<execution_flow>
|
|
193
193
|
## Planning Process
|
|
194
194
|
|
|
195
|
-
1. **Load Context**: Read
|
|
195
|
+
1. **Load Context**: Read locked decisions, phase goal, and any research documents.
|
|
196
|
+
- Read `.planning/PROJECT.md` (if exists) — project scope/out-of-scope constraints
|
|
197
|
+
- Read `.planning/CONTEXT.md` (project-level, if exists) — cross-cutting locked decisions
|
|
198
|
+
- Read `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level, if exists) — phase-specific decisions
|
|
199
|
+
- Phase-level CONTEXT.md overrides project-level for conflicting decision areas
|
|
200
|
+
- **For each locked decision found**: embed it directly into the relevant task's `<action>` block.
|
|
201
|
+
Executors NEVER read CONTEXT.md — PLAN.md task actions must be self-contained.
|
|
196
202
|
|
|
197
203
|
### Handling [NEEDS DECISION] Items
|
|
198
204
|
When CONTEXT.md or RESEARCH-SUMMARY.md contains `[NEEDS DECISION]` flags from the synthesizer:
|
|
@@ -202,7 +208,7 @@ When CONTEXT.md or RESEARCH-SUMMARY.md contains `[NEEDS DECISION]` flags from th
|
|
|
202
208
|
2. **Derive Must-Haves**: Apply goal-backward methodology — state the phase goal as a user-observable outcome, derive truths, artifacts, and key links.
|
|
203
209
|
3. **Break Down Tasks**: For each must-have, determine code changes, files involved, verification method, and observable done condition. Group related work into tasks (2-3 per plan).
|
|
204
210
|
4. **Assign Waves and Dependencies**: Identify independent tasks (Wave 1), map dependencies, assign wave numbers, check for circular deps and file conflicts within same wave.
|
|
205
|
-
5. **Write Plan Files**: Complete YAML frontmatter (include `
|
|
211
|
+
5. **Write Plan Files**: Complete YAML frontmatter (include `implements` field with REQ-IDs from REQUIREMENTS.md or ROADMAP.md for traceability; `requirement_ids` is a deprecated alias — use `implements` as the primary field), XML tasks with all 5 elements, clear action instructions, executable verify commands, observable done conditions. Append a `## Summary` section per `references/plan-format.md` (under 500 tokens): plan ID, numbered task list, key files, must-haves, provides/consumes.
|
|
206
212
|
6. **Self-Check** before writing:
|
|
207
213
|
|
|
208
214
|
**CRITICAL — Run the self-check. Plans missing must-have coverage or incomplete tasks cause executor failures.**
|
|
@@ -240,7 +246,7 @@ When receiving checker feedback:
|
|
|
240
246
|
|
|
241
247
|
## Context Optimization
|
|
242
248
|
|
|
243
|
-
**Context Fidelity Self-Check**: Before writing plans, verify: (1) every locked decision in CONTEXT.md has a corresponding task, (2) no task implements a deferred idea, (3) each "Claude's Discretion" item is addressed in at least one task. Report: "CONTEXT.md compliance: {M}/{N} locked decisions mapped."
|
|
249
|
+
**Context Fidelity Self-Check**: Before writing plans, verify: (1) every locked decision in BOTH `.planning/CONTEXT.md` (project-level) AND `.planning/phases/{NN}-{slug}/CONTEXT.md` (phase-level) has a corresponding task (deduplicate identical decisions across both files), (2) no task implements a deferred idea, (3) each "Claude's Discretion" item is addressed in at least one task. Report: "CONTEXT.md compliance: {M}/{N} locked decisions mapped."
|
|
244
250
|
|
|
245
251
|
**Frontmatter-First Assembly**: When prior plans exist, read SUMMARY.md frontmatter only (not full body) — 10 frontmatters ~500 tokens vs 10 full SUMMARYs ~5000 tokens. Extract: `provides`, `requires`, `key_files`, `key_decisions`, `patterns`. Only read full body when a specific detail is needed.
|
|
246
252
|
|
|
@@ -256,7 +262,7 @@ When receiving checker feedback:
|
|
|
256
262
|
- [ ] Tasks grouped into plans by wave
|
|
257
263
|
- [ ] PLAN files exist with XML task structure
|
|
258
264
|
- [ ] Each plan: frontmatter complete (depends_on, files_modified, must_haves)
|
|
259
|
-
- [ ] Each plan:
|
|
265
|
+
- [ ] Each plan: implements: field populated (list REQ-IDs; use [] only if phase has no REQUIREMENTS.md)
|
|
260
266
|
- [ ] Each task: all 5 elements (name, files, action, verify, done)
|
|
261
267
|
- [ ] Wave structure maximizes parallelism
|
|
262
268
|
- [ ] Every REQ-ID from ROADMAP/REQUIREMENTS appears in at least one plan
|
|
@@ -336,7 +342,7 @@ One-line task descriptions in `<name>`. File paths in `<files>`, not explanation
|
|
|
336
342
|
11. DO NOT leave done conditions vague — they must be observable
|
|
337
343
|
12. DO NOT specify literal `undefined` for parameters that have a known source in the calling context — use data contracts to map sources
|
|
338
344
|
13. DO NOT use Bash heredoc for file creation — ALWAYS use the Write tool
|
|
339
|
-
14. DO NOT leave
|
|
345
|
+
14. DO NOT leave implements: empty in PLAN frontmatter — use implements: as the primary traceability field (requirement_ids: is deprecated)
|
|
340
346
|
|
|
341
347
|
</anti_patterns>
|
|
342
348
|
|
|
@@ -74,7 +74,8 @@ Stop and report error if pbr-tools CLI is unavailable. Also read CONTEXT.md for
|
|
|
74
74
|
- `artifacts`: Files/exports that must exist, be substantive, and not be stubs
|
|
75
75
|
- `key_links`: Connections that must be wired between components
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Must-haves in plan frontmatter are canonical — use exactly what mustHavesCollect returns.
|
|
78
|
+
Only fall back to goal-backward derivation from ROADMAP.md if ALL plans in the phase have completely empty must_haves sections. Do NOT supplement or re-derive when must_haves are present.
|
|
78
79
|
|
|
79
80
|
Output: A numbered list of every must-have to verify.
|
|
80
81
|
|
|
@@ -159,6 +160,14 @@ Cross-reference all must-haves against verification results in a table:
|
|
|
159
160
|
|
|
160
161
|
L4 column shows `-` when no automated verification is available. Only artifacts with test commands or build verification get L4 checks.
|
|
161
162
|
|
|
163
|
+
### Step 7b: Write REQ-ID Traceability (Always)
|
|
164
|
+
|
|
165
|
+
After verifying all must-haves, collect `implements:[]` from all plan frontmatters in the phase.
|
|
166
|
+
|
|
167
|
+
- For each REQ-ID: if all must-haves for that plan passed → add to `satisfied:[]`
|
|
168
|
+
- If any must-have for that plan failed → add to `unsatisfied:[]`
|
|
169
|
+
- Write `satisfied:[]` and `unsatisfied:[]` to the VERIFICATION.md frontmatter
|
|
170
|
+
|
|
162
171
|
### Step 8: Scan for Anti-Patterns (Full Verification Only)
|
|
163
172
|
|
|
164
173
|
Scan for: dead code/unused imports, console.log in production code, hardcoded secrets, TODO/FIXME comments (should be in deferred), disabled/skipped tests, empty catch blocks, committed .env files. Report blockers only.
|
|
@@ -43,9 +43,9 @@ provides:
|
|
|
43
43
|
- "requireAuth() middleware"
|
|
44
44
|
consumes:
|
|
45
45
|
- "Database connection (from plan 01-01)"
|
|
46
|
-
|
|
47
|
-
- "
|
|
48
|
-
- "
|
|
46
|
+
implements:
|
|
47
|
+
- "REQ-F-001"
|
|
48
|
+
- "REQ-F-002"
|
|
49
49
|
closes_issues:
|
|
50
50
|
- 42
|
|
51
51
|
- 57
|
|
@@ -71,7 +71,8 @@ closes_issues:
|
|
|
71
71
|
| `must_haves.key_links` | YES | array | Connections between components. Append `: grep command` for verification. |
|
|
72
72
|
| `provides` | NO | array | What this plan exports for other plans to consume (classes, endpoints, modules) |
|
|
73
73
|
| `consumes` | NO | array | What this plan needs from prior plans. Format: `"Thing (from plan XX-YY)"` |
|
|
74
|
-
| `
|
|
74
|
+
| `implements` | NO (WARNING if absent) | array | REQ-IDs from REQUIREMENTS.md this plan addresses. Primary traceability field. |
|
|
75
|
+
| `requirement_ids` | NO | array | DEPRECATED — use `implements:` instead. Kept for backward compat. |
|
|
75
76
|
| `dependency_fingerprints` | NO | object | Hashes of dependency phase SUMMARY.md files at plan-creation time. Used to detect stale plans. |
|
|
76
77
|
| `data_contracts` | NO | array | Cross-boundary parameter mappings for calls where arguments originate from external boundaries. Format: `"param: source (context) [fallback]"` |
|
|
77
78
|
| `closes_issues` | NO | number[] | GitHub issue numbers to close when this plan's final commit lands. Default: `[]` |
|
|
@@ -162,14 +163,20 @@ The Summary section is generated by the planner agent at plan creation time. It
|
|
|
162
163
|
DISCORD_REDIRECT_URI=http://localhost:3000/auth/callback
|
|
163
164
|
</action>
|
|
164
165
|
<verify>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
<automated>
|
|
167
|
+
npx tsc --noEmit
|
|
168
|
+
ls src/auth/discord.ts
|
|
169
|
+
ls src/auth/types.ts
|
|
170
|
+
</automated>
|
|
168
171
|
</verify>
|
|
169
172
|
<done>Discord OAuth client module exists and compiles without errors</done>
|
|
170
173
|
</task>
|
|
171
174
|
```
|
|
172
175
|
|
|
176
|
+
> **Verify block forms**: The `<automated>` wrapper (Option A) is preferred — it enables machine-parsing
|
|
177
|
+
> for `auto_checkpoints` mode. Plain-text verify commands without the wrapper (Option B) remain valid
|
|
178
|
+
> for backward compatibility. Both forms are supported by the executor.
|
|
179
|
+
|
|
173
180
|
### TDD Task
|
|
174
181
|
|
|
175
182
|
```xml
|
|
@@ -204,6 +211,33 @@ The Summary section is generated by the planner agent at plan creation time. It
|
|
|
204
211
|
</task>
|
|
205
212
|
```
|
|
206
213
|
|
|
214
|
+
### Feature Task (TDD Variant)
|
|
215
|
+
|
|
216
|
+
Feature tasks add a `<feature>` element for structured TDD planning. The element contains two required children:
|
|
217
|
+
|
|
218
|
+
- **`<behavior>`** — the observable outcome from the user's perspective. Maps directly to a `must_haves.truths` entry.
|
|
219
|
+
- **`<implementation>`** — the technical approach at a high level (which files, patterns, or algorithms to use).
|
|
220
|
+
|
|
221
|
+
Prose structure (illustrative — not a live task block to avoid validator false-positives):
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
task id="02-01-T3" type="auto" tdd="true" complexity="medium"
|
|
225
|
+
name: Implement rate limiter for OAuth endpoint
|
|
226
|
+
files: src/middleware/rate-limit.ts / tests/middleware/rate-limit.test.ts
|
|
227
|
+
feature:
|
|
228
|
+
behavior: OAuth endpoint rejects more than 5 requests per minute per IP with HTTP 429
|
|
229
|
+
implementation: Token-bucket algorithm; Redis-backed counter with TTL; express-rate-limit wrapper
|
|
230
|
+
action:
|
|
231
|
+
RED: Write failing tests for 429 response at >5 req/min
|
|
232
|
+
GREEN: Implement token-bucket middleware using Redis
|
|
233
|
+
REFACTOR: Extract counter logic to RateLimitStore class
|
|
234
|
+
verify:
|
|
235
|
+
automated: npm test -- --grep "rate limiter"
|
|
236
|
+
done: Rate limiter rejects excessive OAuth requests with 429
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The `<feature>` element is optional — standard TDD tasks without it are still valid. Use `<feature>` when the planner wants to record the behavior/implementation split explicitly for traceability.
|
|
240
|
+
|
|
207
241
|
### Checkpoint: Human Verify
|
|
208
242
|
|
|
209
243
|
```xml
|
|
@@ -291,9 +325,13 @@ Every task MUST have ALL 5. No exceptions.
|
|
|
291
325
|
| `<name>` | What the task does | Imperative verb phrase. Short. |
|
|
292
326
|
| `<files>` | Files touched | One per line. Actual file paths. |
|
|
293
327
|
| `<action>` | How to do it | Numbered steps. Specific. Code snippets for complex work. |
|
|
294
|
-
| `<verify>` | How to check | Executable shell commands. Or checkpoint format. |
|
|
328
|
+
| `<verify>` | How to check | Executable shell commands (plain-text or wrapped in `<automated>`). Or checkpoint format. |
|
|
295
329
|
| `<done>` | How to know it worked | Observable user/system behavior. Maps to a must-have. |
|
|
296
330
|
|
|
331
|
+
> **Optional `<feature>` element**: Feature tasks (TDD variant) may add a `<feature>` element with
|
|
332
|
+
> `<behavior>` and `<implementation>` children for structured TDD planning. The 5 standard elements
|
|
333
|
+
> above are still required.
|
|
334
|
+
|
|
297
335
|
---
|
|
298
336
|
|
|
299
337
|
## Task ID Format
|
|
@@ -546,11 +546,10 @@ For each category, present the features and ask the user to classify each:
|
|
|
546
546
|
- **Out of scope** — Will NOT be built
|
|
547
547
|
|
|
548
548
|
**7d. Assign REQ-IDs:**
|
|
549
|
-
For each committed requirement, assign an ID
|
|
550
|
-
- `
|
|
551
|
-
- `
|
|
552
|
-
- `
|
|
553
|
-
- `UI-02`: Mobile-responsive layout
|
|
549
|
+
For each committed requirement, assign an ID using the REQ-F/REQ-NF schema:
|
|
550
|
+
- Functional requirements: `REQ-F-xxx` numbered sequentially within each category (REQ-F-001, REQ-F-002, ...)
|
|
551
|
+
- Non-functional requirements: `REQ-NF-xxx` numbered sequentially across all NFR categories (REQ-NF-001, REQ-NF-002, ...)
|
|
552
|
+
- Examples: `REQ-F-001: User can log in with Discord OAuth`, `REQ-NF-001: Page loads in <2s on 4G`
|
|
554
553
|
|
|
555
554
|
Each requirement must be:
|
|
556
555
|
- **User-centric** — describes a capability from the user's perspective
|
|
@@ -663,28 +662,13 @@ Write the project state files from templates:
|
|
|
663
662
|
**CRITICAL (no hook): Write CONTEXT.md NOW. Do NOT skip this step.**
|
|
664
663
|
|
|
665
664
|
**9c. Write CONTEXT.md:**
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
| Decision | Rationale | Locked By |
|
|
675
|
-
|----------|-----------|-----------|
|
|
676
|
-
| {e.g., "Use TypeScript"} | {User preference, team skill} | User |
|
|
677
|
-
|
|
678
|
-
## User Constraints
|
|
679
|
-
{Budget, timeline, skill level, hosting, team size}
|
|
680
|
-
|
|
681
|
-
## Deferred Ideas
|
|
682
|
-
{Features explicitly moved to v2 or out-of-scope}
|
|
683
|
-
|
|
684
|
-
| Idea | Reason Deferred |
|
|
685
|
-
|------|----------------|
|
|
686
|
-
| {feature} | {reason} |
|
|
687
|
-
```
|
|
665
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/project-CONTEXT.md.tmpl`
|
|
666
|
+
2. Fill in from the questioning conversation:
|
|
667
|
+
- Locked Decisions: all technology choices and architecture decisions from Step 2
|
|
668
|
+
- User Constraints: budget, timeline, skill level, hosting, team
|
|
669
|
+
- Deferred Ideas: out-of-scope items identified in Step 7c scoping
|
|
670
|
+
- Claude's Discretion: any areas where user said "you decide"
|
|
671
|
+
3. Write to `.planning/CONTEXT.md`
|
|
688
672
|
|
|
689
673
|
**CRITICAL (no hook): Write HISTORY.md NOW. Do NOT skip this step.**
|
|
690
674
|
|
|
@@ -35,9 +35,12 @@ This skill runs **inline** (no Task delegation).
|
|
|
35
35
|
|
|
36
36
|
### Step 1: Parse Phase Number and Check for Existing Plans
|
|
37
37
|
|
|
38
|
-
Parse `$ARGUMENTS
|
|
38
|
+
Parse `$ARGUMENTS`:
|
|
39
|
+
- If argument is `--project`: enter PROJECT mode (see Step 1-project below). Skip Steps 2-8.
|
|
40
|
+
- If argument is a phase number: enter PHASE mode (existing flow — continue with Step 1 as-is).
|
|
41
|
+
- If no argument: existing logic applies (read STATE.md for current phase).
|
|
39
42
|
|
|
40
|
-
**Validation:**
|
|
43
|
+
**Validation (PHASE mode):**
|
|
41
44
|
- Must be a valid phase number (integer or decimal like `3.1`)
|
|
42
45
|
- If no argument provided, read STATE.md to get the current phase
|
|
43
46
|
- If no current phase and no argument: "Which phase do you want to discuss? Run `$pbr-status` to see available phases."
|
|
@@ -63,6 +66,53 @@ Phase {N} not found.
|
|
|
63
66
|
- Warn: "Phase {N} already has plans. Decisions from this discussion won't retroactively change them. Consider re-planning with `$pbr-plan {N}` after."
|
|
64
67
|
- This is a **warning only** — do not block the discussion
|
|
65
68
|
|
|
69
|
+
### Step 1-project: Project Discussion Mode (--project)
|
|
70
|
+
|
|
71
|
+
When invoked with `--project`, discuss project-level cross-cutting decisions.
|
|
72
|
+
This mode writes to `.planning/CONTEXT.md` (project-level), NOT a phase directory.
|
|
73
|
+
|
|
74
|
+
**Check for existing project CONTEXT.md:**
|
|
75
|
+
1. Use Glob to check if `.planning/CONTEXT.md` exists.
|
|
76
|
+
2. If it exists, ask the user (using the context-handling pattern from
|
|
77
|
+
`skills/shared/gate-prompts.md`):
|
|
78
|
+
question: "Project CONTEXT.md already exists. How should we handle it?"
|
|
79
|
+
options: Overwrite | Append | Cancel
|
|
80
|
+
3. If Cancel: stop and display the existing CONTEXT.md path.
|
|
81
|
+
|
|
82
|
+
**Load project context:**
|
|
83
|
+
- Read `.planning/PROJECT.md` (if exists) — project vision and scope
|
|
84
|
+
- Read `.planning/REQUIREMENTS.md` (if exists) — requirements for constraint awareness
|
|
85
|
+
- Read `.planning/CONTEXT.md` (if exists) — current locked decisions (for Append mode)
|
|
86
|
+
|
|
87
|
+
**Run gray areas for project-level decisions (Steps 2.5-5 pattern):**
|
|
88
|
+
- Identify 3-4 cross-cutting architectural decisions across ALL phases
|
|
89
|
+
- Focus on: technology stack choices, infrastructure, security posture,
|
|
90
|
+
observability approach, deployment strategy, data storage decisions
|
|
91
|
+
- Follow the same Steps 3-5 pattern (gray areas → options → follow-ups)
|
|
92
|
+
|
|
93
|
+
**Write project CONTEXT.md:**
|
|
94
|
+
1. Read `${CLAUDE_SKILL_DIR}/templates/project-CONTEXT.md.tmpl`
|
|
95
|
+
2. Fill in from discussion decisions:
|
|
96
|
+
- Locked Decisions table: all decisions the user made (not "Let Claude decide")
|
|
97
|
+
- User Constraints: budget, team, timeline, hosting from the conversation
|
|
98
|
+
- Deferred Ideas: anything explicitly ruled out for this project
|
|
99
|
+
- Claude's Discretion: decisions marked "Let Claude decide"
|
|
100
|
+
3. If Append mode: merge new decisions with existing CONTEXT.md content
|
|
101
|
+
4. Write to `.planning/CONTEXT.md`
|
|
102
|
+
|
|
103
|
+
**Update STATE.md pointer:**
|
|
104
|
+
Add under Accumulated Context:
|
|
105
|
+
```
|
|
106
|
+
Project context: .planning/CONTEXT.md ({N} locked decisions, {N} deferred, {N} discretion)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**After writing:** Auto-sync to CLAUDE.md is handled by the post-write-dispatch hook.
|
|
110
|
+
Display: `✓ Project CONTEXT.md written — locked decisions will auto-sync to CLAUDE.md`
|
|
111
|
+
|
|
112
|
+
Skip to Cleanup step. Do NOT run Steps 2-8 of the phase flow.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
66
116
|
### Step 2: Load Phase Context
|
|
67
117
|
|
|
68
118
|
Read the following files to understand what this phase needs to accomplish:
|
|
@@ -61,6 +61,19 @@ Stop all further checks.
|
|
|
61
61
|
- PASS: All three required files exist
|
|
62
62
|
- FAIL: List each missing file — "Run `$pbr-begin` to re-initialize, or create the file manually."
|
|
63
63
|
|
|
64
|
+
**Advisory checks — WARN if missing, do not FAIL:**
|
|
65
|
+
|
|
66
|
+
- `.planning/PROJECT.md`
|
|
67
|
+
If missing: `⚠ PROJECT.md not found. Run $pbr-begin to generate it, or create from plugins/pbr/templates/PROJECT.md.tmpl.`
|
|
68
|
+
|
|
69
|
+
- `.planning/REQUIREMENTS.md`
|
|
70
|
+
If missing: `⚠ REQUIREMENTS.md not found. Run $pbr-begin to generate it, or create from plugins/pbr/templates/REQUIREMENTS.md.tmpl.`
|
|
71
|
+
|
|
72
|
+
- `.planning/CONTEXT.md` (project-level)
|
|
73
|
+
If missing: `⚠ CONTEXT.md not found. Run $pbr-discuss --project to capture locked decisions.`
|
|
74
|
+
|
|
75
|
+
These files are generated by $pbr-begin. Absence is expected on projects created before v2.15.
|
|
76
|
+
|
|
64
77
|
### Check 2: Config Validity
|
|
65
78
|
|
|
66
79
|
Parse `.planning/config.json` as JSON. Check required fields: `version`, `depth`. Check recommended fields: `features`, `models`.
|