@sienklogic/plan-build-run 2.9.1 → 2.11.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 +44 -0
- package/package.json +1 -1
- package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +42 -0
- package/plugins/copilot-pbr/agents/debugger.agent.md +4 -1
- package/plugins/copilot-pbr/agents/executor.agent.md +31 -1
- package/plugins/copilot-pbr/agents/integration-checker.agent.md +33 -2
- package/plugins/copilot-pbr/agents/planner.agent.md +58 -1
- package/plugins/copilot-pbr/agents/researcher.agent.md +23 -0
- package/plugins/copilot-pbr/agents/synthesizer.agent.md +24 -0
- package/plugins/copilot-pbr/agents/verifier.agent.md +35 -1
- package/plugins/copilot-pbr/plugin.json +1 -1
- package/plugins/copilot-pbr/references/agent-contracts.md +297 -0
- package/plugins/copilot-pbr/references/pbr-rules.md +1 -0
- package/plugins/copilot-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/copilot-pbr/references/ui-formatting.md +38 -56
- package/plugins/copilot-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/copilot-pbr/skills/build/SKILL.md +28 -31
- package/plugins/copilot-pbr/skills/config/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/copilot-pbr/skills/debug/SKILL.md +23 -26
- package/plugins/copilot-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/copilot-pbr/skills/do/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/explore/SKILL.md +11 -14
- package/plugins/copilot-pbr/skills/health/SKILL.md +75 -19
- package/plugins/copilot-pbr/skills/help/SKILL.md +6 -6
- package/plugins/copilot-pbr/skills/import/SKILL.md +22 -18
- package/plugins/copilot-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/copilot-pbr/skills/note/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/pause/SKILL.md +11 -10
- package/plugins/copilot-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/copilot-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/copilot-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/copilot-pbr/skills/review/SKILL.md +17 -12
- package/plugins/copilot-pbr/skills/scan/SKILL.md +9 -11
- package/plugins/copilot-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/copilot-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/copilot-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/copilot-pbr/skills/status/SKILL.md +3 -3
- package/plugins/copilot-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/copilot-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/agents/codebase-mapper.md +42 -0
- package/plugins/cursor-pbr/agents/debugger.md +4 -1
- package/plugins/cursor-pbr/agents/executor.md +31 -1
- package/plugins/cursor-pbr/agents/integration-checker.md +33 -2
- package/plugins/cursor-pbr/agents/planner.md +58 -1
- package/plugins/cursor-pbr/agents/researcher.md +23 -0
- package/plugins/cursor-pbr/agents/synthesizer.md +24 -0
- package/plugins/cursor-pbr/agents/verifier.md +35 -1
- package/plugins/cursor-pbr/references/agent-contracts.md +297 -0
- package/plugins/cursor-pbr/references/pbr-rules.md +1 -0
- package/plugins/cursor-pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/cursor-pbr/references/ui-formatting.md +38 -56
- package/plugins/cursor-pbr/skills/begin/SKILL.md +30 -7
- package/plugins/cursor-pbr/skills/build/SKILL.md +28 -31
- package/plugins/cursor-pbr/skills/config/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/continue/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/cursor-pbr/skills/debug/SKILL.md +23 -23
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/cursor-pbr/skills/do/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/explore/SKILL.md +11 -12
- package/plugins/cursor-pbr/skills/health/SKILL.md +75 -19
- package/plugins/cursor-pbr/skills/help/SKILL.md +6 -6
- package/plugins/cursor-pbr/skills/import/SKILL.md +22 -16
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +90 -48
- package/plugins/cursor-pbr/skills/note/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/pause/SKILL.md +11 -9
- package/plugins/cursor-pbr/skills/plan/SKILL.md +22 -9
- package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/cursor-pbr/skills/quick/SKILL.md +9 -12
- package/plugins/cursor-pbr/skills/resume/SKILL.md +9 -9
- package/plugins/cursor-pbr/skills/review/SKILL.md +17 -12
- package/plugins/cursor-pbr/skills/scan/SKILL.md +9 -10
- package/plugins/cursor-pbr/skills/setup/SKILL.md +54 -8
- package/plugins/cursor-pbr/skills/shared/error-reporting.md +2 -1
- package/plugins/cursor-pbr/skills/shared/progress-display.md +0 -1
- package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/cursor-pbr/skills/status/SKILL.md +3 -3
- package/plugins/cursor-pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/cursor-pbr/skills/todo/SKILL.md +51 -28
- package/plugins/pbr/.claude-plugin/plugin.json +1 -1
- package/plugins/pbr/agents/codebase-mapper.md +42 -0
- package/plugins/pbr/agents/debugger.md +4 -1
- package/plugins/pbr/agents/executor.md +31 -1
- package/plugins/pbr/agents/integration-checker.md +34 -2
- package/plugins/pbr/agents/planner.md +58 -1
- package/plugins/pbr/agents/researcher.md +23 -0
- package/plugins/pbr/agents/synthesizer.md +24 -0
- package/plugins/pbr/agents/verifier.md +36 -1
- package/plugins/pbr/references/agent-contracts.md +297 -0
- package/plugins/pbr/references/pbr-rules.md +1 -0
- package/plugins/pbr/references/pbr-tools-cli.md +285 -0
- package/plugins/pbr/references/ui-formatting.md +37 -54
- package/plugins/pbr/scripts/check-skill-workflow.js +11 -0
- package/plugins/pbr/scripts/check-state-sync.js +58 -0
- package/plugins/pbr/scripts/check-subagent-output.js +43 -4
- package/plugins/pbr/scripts/validate-task.js +69 -17
- package/plugins/pbr/skills/begin/SKILL.md +36 -11
- package/plugins/pbr/skills/build/SKILL.md +37 -25
- package/plugins/pbr/skills/config/SKILL.md +12 -10
- package/plugins/pbr/skills/continue/SKILL.md +11 -9
- package/plugins/pbr/skills/dashboard/SKILL.md +12 -0
- package/plugins/pbr/skills/debug/SKILL.md +29 -23
- package/plugins/pbr/skills/discuss/SKILL.md +20 -10
- package/plugins/pbr/skills/do/SKILL.md +3 -3
- package/plugins/pbr/skills/explore/SKILL.md +14 -12
- package/plugins/pbr/skills/health/SKILL.md +76 -20
- package/plugins/pbr/skills/help/SKILL.md +8 -6
- package/plugins/pbr/skills/import/SKILL.md +25 -16
- package/plugins/pbr/skills/milestone/SKILL.md +88 -45
- package/plugins/pbr/skills/note/SKILL.md +3 -3
- package/plugins/pbr/skills/pause/SKILL.md +13 -9
- package/plugins/pbr/skills/plan/SKILL.md +28 -13
- package/plugins/pbr/skills/plan/templates/planner-prompt.md.tmpl +1 -1
- package/plugins/pbr/skills/quick/SKILL.md +12 -10
- package/plugins/pbr/skills/resume/SKILL.md +11 -9
- package/plugins/pbr/skills/review/SKILL.md +35 -24
- package/plugins/pbr/skills/scan/SKILL.md +12 -10
- package/plugins/pbr/skills/setup/SKILL.md +53 -7
- package/plugins/pbr/skills/shared/error-reporting.md +2 -0
- package/plugins/pbr/skills/shared/universal-anti-patterns.md +10 -6
- package/plugins/pbr/skills/status/SKILL.md +8 -6
- package/plugins/pbr/skills/statusline/SKILL.md +12 -8
- package/plugins/pbr/skills/todo/SKILL.md +51 -28
|
@@ -35,9 +35,13 @@ You MUST perform all applicable categories (skip only if zero items exist for th
|
|
|
35
35
|
4. **E2E Flow Completeness** — Critical user workflows must trace from UI through API to data layer and back without breaks.
|
|
36
36
|
5. **Cross-Phase Dependency Satisfaction** — Phase N's declared dependencies on Phase M must be actually satisfied in code.
|
|
37
37
|
|
|
38
|
+
### Agent Contract Compliance
|
|
39
|
+
|
|
40
|
+
Read `references/agent-contracts.md` to validate agent-to-agent handoffs. Verify that each agent's actual output matches its declared contract schema — especially `provides`/`consumes` fields in SUMMARY.md and status enums in VERIFICATION.md.
|
|
41
|
+
|
|
38
42
|
## Critical Constraints
|
|
39
43
|
|
|
40
|
-
- **
|
|
44
|
+
- **Write access for output artifact only** — you have Write access for your output artifact only. You CANNOT fix source code — you REPORT issues.
|
|
41
45
|
- **Cross-phase scope** — unlike verifier (single phase), you check across phases.
|
|
42
46
|
|
|
43
47
|
## 6-Step Verification Process
|
|
@@ -53,6 +57,33 @@ You MUST perform all applicable categories (skip only if zero items exist for th
|
|
|
53
57
|
|
|
54
58
|
Read `templates/INTEGRATION-REPORT.md.tmpl` (relative to `plugins/pbr/`). Keep output concise: one row per check, evidence column brief. INTEGRATION-REPORT.md target 1,500 tokens (hard limit 2,500). Omit empty sections. Console output: score + critical issue count only.
|
|
55
59
|
|
|
60
|
+
### Fallback Format (if template unreadable)
|
|
61
|
+
|
|
62
|
+
If the template file cannot be read, use this minimum viable structure:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
---
|
|
66
|
+
status: passed|issues_found
|
|
67
|
+
checks_total: N
|
|
68
|
+
checks_passed: M
|
|
69
|
+
critical_issues: K
|
|
70
|
+
---
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
## Integration Checks
|
|
75
|
+
|
|
76
|
+
| Check | Status | Evidence |
|
|
77
|
+
|-------|--------|----------|
|
|
78
|
+
|
|
79
|
+
## E2E Flows
|
|
80
|
+
|
|
81
|
+
| Flow | Status | Broken Link |
|
|
82
|
+
|------|--------|-------------|
|
|
83
|
+
|
|
84
|
+
## Critical Issues
|
|
85
|
+
```
|
|
86
|
+
|
|
56
87
|
## When This Agent Is Spawned
|
|
57
88
|
|
|
58
89
|
- **Milestone Audit** (`/pbr:milestone audit`): Full check across ALL completed phases.
|
|
@@ -80,7 +111,7 @@ See `references/integration-patterns.md` for grep/search patterns by framework.
|
|
|
80
111
|
12. DO NOT read agent .md files from agents/ — auto-loaded via subagent_type
|
|
81
112
|
|
|
82
113
|
### Agent-Specific
|
|
83
|
-
- Never attempt to fix issues — you
|
|
114
|
+
- Never attempt to fix issues — you REPORT them
|
|
84
115
|
- Imports are not usage — verify symbols are actually called
|
|
85
116
|
- "File exists" is not "component is integrated"
|
|
86
117
|
- Auth middleware existing somewhere does not mean routes are protected
|
|
@@ -20,7 +20,7 @@ You are **planner**, the planning agent for the Plan-Build-Run development syste
|
|
|
20
20
|
## Operating Modes
|
|
21
21
|
|
|
22
22
|
### Mode 1: Standard Planning
|
|
23
|
-
Invoked with a phase goal, research, and/or planning request. Produce executable plan files at `.planning/phases/{NN}-{phase-name}/
|
|
23
|
+
Invoked with a phase goal, research, and/or planning request. Produce executable plan files at `.planning/phases/{NN}-{phase-name}/PLAN-{NN}.md`.
|
|
24
24
|
|
|
25
25
|
### Mode 2: Gap Closure Planning
|
|
26
26
|
Invoked with a VERIFICATION.md containing gaps. Read the report, identify gaps, produce targeted plans to close them. See Gap Closure Mode below.
|
|
@@ -31,6 +31,22 @@ Invoked with plan-checker feedback containing issues. Revise flagged plan(s) to
|
|
|
31
31
|
### Mode 4: Roadmap Mode
|
|
32
32
|
Invoked with a request to create/update the project roadmap. Produce `.planning/ROADMAP.md` using the template at `${CLAUDE_PLUGIN_ROOT}/templates/ROADMAP.md.tmpl`.
|
|
33
33
|
|
|
34
|
+
#### Fallback Format: ROADMAP.md (if template unreadable)
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Roadmap
|
|
38
|
+
|
|
39
|
+
## Milestone: {project} v1.0
|
|
40
|
+
**Goal:** {one-line milestone goal}
|
|
41
|
+
**Phases:** 1 - {N}
|
|
42
|
+
|
|
43
|
+
### Phase 01: {name}
|
|
44
|
+
**Goal:** {goal}
|
|
45
|
+
**Discovery:** {level}
|
|
46
|
+
**Provides:** {list}
|
|
47
|
+
**Depends on:** {list}
|
|
48
|
+
```
|
|
49
|
+
|
|
34
50
|
---
|
|
35
51
|
|
|
36
52
|
## Goal-Backward Methodology
|
|
@@ -55,6 +71,39 @@ Read `references/plan-format.md` for the complete plan file specification includ
|
|
|
55
71
|
- Task type variants (auto, tdd, checkpoint:human-verify, checkpoint:decision, checkpoint:human-action)
|
|
56
72
|
- Task ID format
|
|
57
73
|
|
|
74
|
+
### Fallback Format: PLAN.md (if template/reference unreadable)
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
---
|
|
78
|
+
phase: "{phase-slug}"
|
|
79
|
+
plan: "{NN-MM}"
|
|
80
|
+
wave: {N}
|
|
81
|
+
depends_on: []
|
|
82
|
+
files_modified: ["{path}"]
|
|
83
|
+
must_haves:
|
|
84
|
+
truths: ["{truth}"]
|
|
85
|
+
artifacts: ["{artifact}"]
|
|
86
|
+
key_links: ["{link}"]
|
|
87
|
+
provides: ["{item}"]
|
|
88
|
+
consumes: ["{item}"]
|
|
89
|
+
---
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```xml
|
|
93
|
+
<task id="{plan}-T1" type="auto" tdd="false" complexity="medium">
|
|
94
|
+
<name>{task name}</name>
|
|
95
|
+
<files>...</files>
|
|
96
|
+
<action>...</action>
|
|
97
|
+
<verify>...</verify>
|
|
98
|
+
<done>...</done>
|
|
99
|
+
</task>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## Summary
|
|
104
|
+
...
|
|
105
|
+
```
|
|
106
|
+
|
|
58
107
|
The task opening tag format is:
|
|
59
108
|
```xml
|
|
60
109
|
<task id="{plan_id}-T{n}" type="{type}" tdd="{true|false}" complexity="{simple|medium|complex}">
|
|
@@ -93,11 +142,19 @@ Two plans CONFLICT if their `files_modified` lists overlap. Conflicting plans MU
|
|
|
93
142
|
## Planning Process
|
|
94
143
|
|
|
95
144
|
1. **Load Context**: Read CONTEXT.md (locked decisions + deferred ideas), phase goal, and any research documents.
|
|
145
|
+
|
|
146
|
+
### Handling [NEEDS DECISION] Items
|
|
147
|
+
When CONTEXT.md or RESEARCH-SUMMARY.md contains `[NEEDS DECISION]` flags from the synthesizer:
|
|
148
|
+
- If the decision affects plan structure: create a `checkpoint:decision` task asking the user to decide
|
|
149
|
+
- If the decision is within "Claude's Discretion" scope: make the call and document it in the plan's frontmatter under a `decisions` key
|
|
150
|
+
- If the decision is out of scope for this phase: ignore it (do not plan for it)
|
|
96
151
|
2. **Derive Must-Haves**: Apply goal-backward methodology — state the phase goal as a user-observable outcome, derive truths, artifacts, and key links.
|
|
97
152
|
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).
|
|
98
153
|
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.
|
|
99
154
|
5. **Write Plan Files**: Complete YAML frontmatter (include `requirement_ids` from REQUIREMENTS.md or ROADMAP.md goal IDs for traceability), 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.
|
|
100
155
|
6. **Self-Check** before writing:
|
|
156
|
+
|
|
157
|
+
**CRITICAL — Run the self-check. Plans missing must-have coverage or incomplete tasks cause executor failures.**
|
|
101
158
|
- [ ] All must-haves covered by at least one task
|
|
102
159
|
- [ ] All tasks have all 5 elements
|
|
103
160
|
- [ ] No task exceeds 3 files (ideally)
|
|
@@ -111,6 +111,29 @@ Key sections: User Constraints, Phase Goal, Implementation Approach, Dependencie
|
|
|
111
111
|
Read `${CLAUDE_PLUGIN_ROOT}/templates/research-outputs/synthesis.md.tmpl` for format.
|
|
112
112
|
Key sections: Executive Summary, Key Findings, Contradictions Resolved, Recommended Approach, Risks and Mitigations, Sources.
|
|
113
113
|
|
|
114
|
+
### Fallback Format (if templates unreadable)
|
|
115
|
+
|
|
116
|
+
If the template files cannot be read, use this minimum viable structure:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
---
|
|
120
|
+
confidence: high|medium|low
|
|
121
|
+
sources_checked: N
|
|
122
|
+
coverage: "complete|partial|minimal"
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
## Key Findings
|
|
128
|
+
1. {finding with evidence}
|
|
129
|
+
|
|
130
|
+
## Gaps
|
|
131
|
+
- {area not covered and why}
|
|
132
|
+
|
|
133
|
+
## Sources
|
|
134
|
+
- {source}: {what it provided}
|
|
135
|
+
```
|
|
136
|
+
|
|
114
137
|
---
|
|
115
138
|
|
|
116
139
|
## Context and Output Budget
|
|
@@ -57,6 +57,30 @@ Read `${CLAUDE_PLUGIN_ROOT}/templates/RESEARCH-SUMMARY.md.tmpl` for the complete
|
|
|
57
57
|
|
|
58
58
|
Key sections: Executive Summary (3-5 sentences), Recommended Stack (table), Architecture Recommendations, Key Patterns, Pitfalls & Warnings, Contradictions Resolved, Open Questions, Sources.
|
|
59
59
|
|
|
60
|
+
### Fallback Format (if template unreadable)
|
|
61
|
+
|
|
62
|
+
If the template file cannot be read, use this minimum viable structure:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
---
|
|
66
|
+
confidence: high|medium|low
|
|
67
|
+
sources: N
|
|
68
|
+
conflicts: N
|
|
69
|
+
---
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
## Resolved Decisions
|
|
74
|
+
|
|
75
|
+
| Topic | Decision | Confidence | Sources |
|
|
76
|
+
|-------|----------|------------|---------|
|
|
77
|
+
|
|
78
|
+
## Open Questions
|
|
79
|
+
- [NEEDS DECISION] {topic}: {option A} vs {option B}
|
|
80
|
+
|
|
81
|
+
## Deferred Ideas
|
|
82
|
+
```
|
|
83
|
+
|
|
60
84
|
## Quality Standards
|
|
61
85
|
|
|
62
86
|
- SUMMARY.md must be **under 200 lines** — use tables over prose, one sentence per bullet max
|
|
@@ -17,7 +17,7 @@ You are **verifier**, the phase verification agent for the Plan-Build-Run develo
|
|
|
17
17
|
|
|
18
18
|
### Read-Only Agent
|
|
19
19
|
|
|
20
|
-
You have
|
|
20
|
+
You have Write access for your output artifact only. You CANNOT fix source code — you REPORT issues. The planner creates gap-closure plans; the executor fixes them.
|
|
21
21
|
|
|
22
22
|
### Evidence-Based Verification
|
|
23
23
|
|
|
@@ -25,6 +25,10 @@ Every claim must be backed by evidence. "I checked and it exists" is not evidenc
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
### Agent Contract Validation
|
|
29
|
+
|
|
30
|
+
When validating SUMMARY.md and VERIFICATION.md outputs, read `references/agent-contracts.md` to confirm output schemas match their contract definitions. Check required fields, format constraints, and status enums.
|
|
31
|
+
|
|
28
32
|
## The 10-Step Verification Process
|
|
29
33
|
|
|
30
34
|
### Step 1: Check Previous Verification (Always)
|
|
@@ -128,8 +132,38 @@ List items that cannot be verified programmatically (visual/UI, UX flows, third-
|
|
|
128
132
|
|
|
129
133
|
## Output Format
|
|
130
134
|
|
|
135
|
+
**CRITICAL — DO NOT SKIP. You MUST write VERIFICATION.md before returning. Without it, the review skill cannot complete and the phase is stuck.**
|
|
136
|
+
|
|
131
137
|
Write to `.planning/phases/{phase_dir}/VERIFICATION.md`. Read the template from `templates/VERIFICATION-DETAIL.md.tmpl` (relative to `plugins/pbr/`). The template defines: YAML frontmatter (status, scores, gaps), verification tables (truths, artifacts, key links), gap details, human verification items, anti-pattern scan, regressions (re-verification only), and summary.
|
|
132
138
|
|
|
139
|
+
### Fallback Format (if template unreadable)
|
|
140
|
+
|
|
141
|
+
If the template file cannot be read, use this minimum viable structure:
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
---
|
|
145
|
+
status: passed|gaps_found
|
|
146
|
+
attempt: 1
|
|
147
|
+
must_haves_total: N
|
|
148
|
+
must_haves_passed: M
|
|
149
|
+
gaps: ["gap description"]
|
|
150
|
+
overrides: []
|
|
151
|
+
---
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
## Must-Have Verification
|
|
156
|
+
|
|
157
|
+
| # | Must-Have | Status | Evidence |
|
|
158
|
+
|---|----------|--------|----------|
|
|
159
|
+
|
|
160
|
+
## Gaps (if any)
|
|
161
|
+
|
|
162
|
+
### Gap 1: {description}
|
|
163
|
+
**Evidence**: ...
|
|
164
|
+
**Suggested fix**: ...
|
|
165
|
+
```
|
|
166
|
+
|
|
133
167
|
---
|
|
134
168
|
|
|
135
169
|
## Re-Verification Mode
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# Agent Contracts
|
|
2
|
+
|
|
3
|
+
Input/output schemas for agent-to-agent handoffs in Plan-Build-Run.
|
|
4
|
+
|
|
5
|
+
Each contract defines: the file exchanged, required frontmatter fields, body structure, and special handling notes. Agents MUST produce output matching these schemas — consumers depend on them.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Contract: Researcher -> Synthesizer
|
|
10
|
+
|
|
11
|
+
**File**: `.planning/research/{topic-slug}.md` (project) or `.planning/phases/{NN}-{slug}/RESEARCH.md` (phase)
|
|
12
|
+
**Direction**: Researcher writes, Synthesizer reads 2-4 of these
|
|
13
|
+
|
|
14
|
+
### Required Frontmatter
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
---
|
|
18
|
+
confidence: high|medium|low
|
|
19
|
+
sources_checked: N # integer count of sources consulted
|
|
20
|
+
coverage: "complete|partial|minimal"
|
|
21
|
+
---
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Required Body Sections
|
|
25
|
+
|
|
26
|
+
- `## Key Findings` — each finding tagged with source level (`[S1]`..`[S6]`) and confidence
|
|
27
|
+
- `## Gaps` — areas not covered and why
|
|
28
|
+
- `## Sources` — source list with what each provided
|
|
29
|
+
|
|
30
|
+
### Special Handling
|
|
31
|
+
|
|
32
|
+
- Every factual claim must have a source attribution tag
|
|
33
|
+
- Version-sensitive info (API signatures, config syntax) must come from S1-S3 sources
|
|
34
|
+
- `[SPECULATIVE]` tag marks unverified reasoning — synthesizer must not upgrade confidence
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Contract: Synthesizer -> Planner
|
|
39
|
+
|
|
40
|
+
**File**: `.planning/research/SUMMARY.md` (or specified path)
|
|
41
|
+
**Direction**: Synthesizer writes, Planner reads
|
|
42
|
+
|
|
43
|
+
### Required Frontmatter
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
---
|
|
47
|
+
confidence: high|medium|low
|
|
48
|
+
sources: N # integer count of input documents
|
|
49
|
+
conflicts: N # integer count of contradictions found
|
|
50
|
+
---
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Required Body Sections
|
|
54
|
+
|
|
55
|
+
- `## Resolved Decisions` — table with Topic, Decision, Confidence, Sources columns
|
|
56
|
+
- `## Open Questions` — items marked `[NEEDS DECISION]` for planner to handle
|
|
57
|
+
- `## Deferred Ideas` — items out of scope
|
|
58
|
+
|
|
59
|
+
### Special Handling
|
|
60
|
+
|
|
61
|
+
- `[NEEDS DECISION]` flags: planner creates `checkpoint:decision` tasks OR decides within discretion scope
|
|
62
|
+
- Confidence levels never upgraded beyond what input documents support
|
|
63
|
+
- Contradictions always documented, never silently dropped
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Contract: Planner -> Executor
|
|
68
|
+
|
|
69
|
+
**File**: `.planning/phases/{NN}-{slug}/PLAN-{NN}.md`
|
|
70
|
+
**Direction**: Planner writes, Executor reads and executes sequentially
|
|
71
|
+
|
|
72
|
+
### Required Frontmatter
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
---
|
|
76
|
+
phase: "{phase-slug}"
|
|
77
|
+
plan: "{NN-MM}"
|
|
78
|
+
wave: N
|
|
79
|
+
depends_on: []
|
|
80
|
+
files_modified: ["{path}"]
|
|
81
|
+
must_haves:
|
|
82
|
+
truths: ["{observable condition}"]
|
|
83
|
+
artifacts: ["{file: description}"]
|
|
84
|
+
key_links: ["{connection description}"]
|
|
85
|
+
provides: ["{exported item}"]
|
|
86
|
+
consumes: ["{required item}"]
|
|
87
|
+
requirement_ids: []
|
|
88
|
+
---
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Required Body: XML Tasks (each task needs all 5 elements)
|
|
92
|
+
|
|
93
|
+
```xml
|
|
94
|
+
<task id="{plan}-T{n}" type="{type}" tdd="{bool}" complexity="{simple|medium|complex}">
|
|
95
|
+
<name>{imperative verb phrase}</name>
|
|
96
|
+
<files>{file paths, one per line}</files>
|
|
97
|
+
<action>{numbered steps}</action>
|
|
98
|
+
<verify>{executable shell command}</verify>
|
|
99
|
+
<done>{observable outcome}</done>
|
|
100
|
+
</task>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Special Handling
|
|
104
|
+
|
|
105
|
+
- Task types: `auto`, `tdd`, `checkpoint:human-verify`, `checkpoint:decision`, `checkpoint:human-action`
|
|
106
|
+
- Complexity drives model selection: simple=haiku, medium=sonnet, complex=inherit
|
|
107
|
+
- Executor stages ONLY files listed in `<files>` per task
|
|
108
|
+
- Plans end with a `## Summary` section (plan ID, task list, key files, must-haves, provides/consumes)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Contract: Planner -> Plan-Checker
|
|
113
|
+
|
|
114
|
+
**File**: Same `PLAN-{NN}.md` files (read-only)
|
|
115
|
+
**Direction**: Planner writes, Plan-Checker reads and returns text assessment
|
|
116
|
+
**Returns**: Inline text report (no file output)
|
|
117
|
+
|
|
118
|
+
### Expected Input
|
|
119
|
+
|
|
120
|
+
Plan-Checker reads plan frontmatter + XML tasks and evaluates across 9 dimensions (D1-D9). Optionally receives CONTEXT.md path.
|
|
121
|
+
|
|
122
|
+
### Output Format
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
VERIFICATION PASSED | ISSUES FOUND
|
|
126
|
+
Plans: N | Tasks: N | Blockers: N | Warnings: N | Info: N
|
|
127
|
+
|
|
128
|
+
## Blockers
|
|
129
|
+
- [{plan_id}] D{N} {severity}: {description} -> Fix: {hint}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Special Handling
|
|
133
|
+
|
|
134
|
+
- Blockers must be fixed before execution; warnings are advisory
|
|
135
|
+
- Plan-Checker never modifies plans — only reports issues
|
|
136
|
+
- Planner enters Revision Mode to address feedback
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Contract: Executor -> Verifier
|
|
141
|
+
|
|
142
|
+
**File**: `.planning/phases/{NN}-{slug}/SUMMARY-{plan_id}.md`
|
|
143
|
+
**Direction**: Executor writes after completing plan tasks, Verifier reads
|
|
144
|
+
|
|
145
|
+
### Required Frontmatter
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
---
|
|
149
|
+
plan: "{plan_id}"
|
|
150
|
+
status: complete|partial|checkpoint
|
|
151
|
+
commits: ["{sha1}", "{sha2}"]
|
|
152
|
+
provides: ["{exported item}"]
|
|
153
|
+
must_haves:
|
|
154
|
+
- "{must-have description}: DONE|PARTIAL|SKIPPED"
|
|
155
|
+
---
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Required Body Sections
|
|
159
|
+
|
|
160
|
+
- `## Task Results` — table with Task, Status, Notes columns
|
|
161
|
+
- `## Deviations` — list of deviations from plan, or "None"
|
|
162
|
+
|
|
163
|
+
### Special Handling
|
|
164
|
+
|
|
165
|
+
- Verifier does NOT trust SUMMARY.md claims — verifies against actual codebase
|
|
166
|
+
- Verifier checks must-haves from PLAN.md frontmatter, not SUMMARY.md self-reports
|
|
167
|
+
- One SUMMARY per plan execution; status reflects final state
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Contract: Verifier -> Planner (Gap Closure)
|
|
172
|
+
|
|
173
|
+
**File**: `.planning/phases/{NN}-{slug}/VERIFICATION.md`
|
|
174
|
+
**Direction**: Verifier writes, Planner reads to create gap-closure plans
|
|
175
|
+
|
|
176
|
+
### Required Frontmatter
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
---
|
|
180
|
+
status: passed|gaps_found|human_needed
|
|
181
|
+
attempt: N
|
|
182
|
+
must_haves_total: N
|
|
183
|
+
must_haves_passed: M
|
|
184
|
+
gaps: ["gap description"]
|
|
185
|
+
overrides: []
|
|
186
|
+
---
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Required Body Sections
|
|
190
|
+
|
|
191
|
+
- `## Must-Have Verification` — table with #, Must-Have, Status, Evidence columns
|
|
192
|
+
- `## Gaps` — per-gap detail with Evidence and Suggested fix
|
|
193
|
+
|
|
194
|
+
### Special Handling
|
|
195
|
+
|
|
196
|
+
- `gaps_found` triggers Planner Gap Closure Mode — planner creates targeted fix plans
|
|
197
|
+
- `overrides` list: must-haves marked as override by user, counted as passed
|
|
198
|
+
- Re-verification increments `attempt` counter; checks regressions on previously-passed items
|
|
199
|
+
- Verifier has Write access ONLY for VERIFICATION.md — cannot fix source code
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Contract: Integration-Checker -> Planner
|
|
204
|
+
|
|
205
|
+
**File**: `.planning/phases/{NN}-{slug}/INTEGRATION-REPORT.md`
|
|
206
|
+
**Direction**: Integration-Checker writes, Planner reads for cross-phase fixes
|
|
207
|
+
|
|
208
|
+
### Required Frontmatter
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
---
|
|
212
|
+
status: passed|issues_found
|
|
213
|
+
checks_total: N
|
|
214
|
+
checks_passed: M
|
|
215
|
+
critical_issues: K
|
|
216
|
+
---
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Required Body Sections
|
|
220
|
+
|
|
221
|
+
- `## Integration Checks` — table with Check, Status, Evidence columns
|
|
222
|
+
- `## E2E Flows` — table with Flow, Status, Broken Link columns
|
|
223
|
+
- `## Critical Issues` — detailed issue descriptions
|
|
224
|
+
|
|
225
|
+
### Special Handling
|
|
226
|
+
|
|
227
|
+
- Checks ACROSS phases (unlike Verifier which checks single phase)
|
|
228
|
+
- 5 check categories: Export/Import Wiring, API Route Coverage, Auth Protection, E2E Flows, Cross-Phase Dependencies
|
|
229
|
+
- Integration-Checker has Write access ONLY for INTEGRATION-REPORT.md — cannot fix source code
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Contract: Debugger (Self-Contained)
|
|
234
|
+
|
|
235
|
+
**File**: `.planning/debug/{slug}.md`
|
|
236
|
+
**Direction**: Debugger creates, updates, and resolves within a single session
|
|
237
|
+
|
|
238
|
+
### Required Frontmatter
|
|
239
|
+
|
|
240
|
+
```yaml
|
|
241
|
+
---
|
|
242
|
+
slug: "{slug}"
|
|
243
|
+
status: "gathering|investigating|fixing|verifying|resolved"
|
|
244
|
+
created: "{ISO-8601}"
|
|
245
|
+
updated: "{ISO-8601}"
|
|
246
|
+
mode: "find_and_fix|find_root_cause_only"
|
|
247
|
+
---
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Required Body Sections
|
|
251
|
+
|
|
252
|
+
- `## Current Focus` — Hypothesis, Test, Expecting, Disconfirm, Next action
|
|
253
|
+
- `## Symptoms` — IMMUTABLE after gathering phase
|
|
254
|
+
- `## Hypotheses` — Active (unchecked) and Eliminated (checked, append-only)
|
|
255
|
+
- `## Evidence Log` — append-only timestamped entries
|
|
256
|
+
- `## Resolution` — root cause, mechanism, fix, commit hash (when resolved)
|
|
257
|
+
|
|
258
|
+
### Special Handling
|
|
259
|
+
|
|
260
|
+
- Status transitions: `gathering -> investigating -> fixing -> verifying -> resolved`
|
|
261
|
+
- Symptoms and Evidence Log are append-only / immutable — prevents mutation bias
|
|
262
|
+
- Fix commits use format: `fix({scope}): {description}` with root cause in body
|
|
263
|
+
- May emit checkpoints (`HUMAN-VERIFY`, `HUMAN-ACTION`, `DECISION`) for user input
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Contract: Codebase-Mapper (Self-Contained)
|
|
268
|
+
|
|
269
|
+
**Files**: `.planning/codebase/{STACK,ARCHITECTURE,CONVENTIONS,CONCERNS}.md` (varies by focus)
|
|
270
|
+
**Direction**: Codebase-Mapper writes, consumed by Researcher (as S0 local prior) and Planner
|
|
271
|
+
|
|
272
|
+
### Focus Areas and Outputs
|
|
273
|
+
|
|
274
|
+
| Focus | Output Files |
|
|
275
|
+
|-------|-------------|
|
|
276
|
+
| `tech` | STACK.md, INTEGRATIONS.md |
|
|
277
|
+
| `arch` | ARCHITECTURE.md, STRUCTURE.md |
|
|
278
|
+
| `quality` | CONVENTIONS.md, TESTING.md |
|
|
279
|
+
| `concerns` | CONCERNS.md |
|
|
280
|
+
|
|
281
|
+
### Fallback Frontmatter (per file)
|
|
282
|
+
|
|
283
|
+
No YAML frontmatter required — these are reference documents with markdown tables.
|
|
284
|
+
|
|
285
|
+
### Required Body Structure (minimum per file)
|
|
286
|
+
|
|
287
|
+
- **STACK.md**: `## Tech Stack` table (Category, Technology, Version, Config File) + `## Package Manager`
|
|
288
|
+
- **ARCHITECTURE.md**: `## Architecture Overview` (pattern name) + `## Key Components` table + `## Data Flow`
|
|
289
|
+
- **CONVENTIONS.md**: `## Code Conventions` table (Convention, Pattern, Example File) + `## Naming Patterns`
|
|
290
|
+
- **CONCERNS.md**: `## Concerns` table (Severity, Area, Description, File) + `## Security Considerations`
|
|
291
|
+
|
|
292
|
+
### Special Handling
|
|
293
|
+
|
|
294
|
+
- Every claim must reference actual file paths — no vague references
|
|
295
|
+
- Codebase-Mapper does NOT commit — the orchestrator handles commits
|
|
296
|
+
- Researcher treats these as S0 (highest confidence) local prior research
|
|
297
|
+
- One focus area per invocation
|
|
@@ -28,6 +28,7 @@ Condensed from the 3,100-line `docs/DEVELOPMENT-GUIDE.md`. When in doubt, these
|
|
|
28
28
|
13. Read STATE.md and config.json fully. Read ROADMAP.md by section. Read PLAN.md/SUMMARY.md/VERIFICATION.md frontmatter only.
|
|
29
29
|
14. Use the `limit` parameter on Read to restrict line counts.
|
|
30
30
|
15. Proactively suggest `/pbr:pause` when context gets heavy — before compaction, not after.
|
|
31
|
+
15b. **After compaction or context recovery**, always read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
|
|
31
32
|
|
|
32
33
|
---
|
|
33
34
|
|