Skip to content

Commit 4a84819

Browse files
author
catlog22
committed
feat: add planning-notes consumption to plan-verify
- Add dimensions I (Constraints Compliance) and J (N+1 Context Validation) - Verify tasks respect Consolidated Constraints from planning-notes.md - Detect deferred items incorrectly included in current plan - Check decision contradictions against N+1 Decisions table
1 parent 78b1287 commit 4a84819

2 files changed

Lines changed: 31 additions & 12 deletions

File tree

.claude/commands/workflow/plan-verify.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,19 @@ IF NOT EXISTS(process_dir):
7272
SYNTHESIS_DIR = brainstorm_dir # Contains role analysis files: */analysis.md
7373
IMPL_PLAN = session_dir/IMPL_PLAN.md
7474
TASK_FILES = Glob(task_dir/*.json)
75+
PLANNING_NOTES = session_dir/planning-notes.md # N+1 context and constraints
7576

7677
# Abort if missing - in order of dependency
7778
SESSION_FILE_EXISTS = EXISTS(session_file)
7879
IF NOT SESSION_FILE_EXISTS:
7980
WARNING: "workflow-session.json not found. User intent alignment verification will be skipped."
8081
# Continue execution - this is optional context, not blocking
8182

83+
PLANNING_NOTES_EXISTS = EXISTS(PLANNING_NOTES)
84+
IF NOT PLANNING_NOTES_EXISTS:
85+
WARNING: "planning-notes.md not found. Constraints/N+1 context verification will be skipped."
86+
# Continue execution - optional context
87+
8288
SYNTHESIS_FILES = Glob(brainstorm_dir/*/analysis.md)
8389
IF SYNTHESIS_FILES.count == 0:
8490
ERROR: "No role analysis documents found in .brainstorming/*/analysis.md. Run /workflow:brainstorm:synthesis first"
@@ -104,6 +110,13 @@ Load only minimal necessary context from each artifact:
104110
- User's scope definition
105111
- **IF MISSING**: Set user_intent_analysis = "SKIPPED: workflow-session.json not found"
106112

113+
**From planning-notes.md** (OPTIONAL - Constraints & N+1 Context):
114+
- **ONLY IF EXISTS**: Load planning context
115+
- Consolidated Constraints (numbered list from Phase 1-3)
116+
- N+1 Context: Decisions table (Decision | Rationale | Revisit?)
117+
- N+1 Context: Deferred items list
118+
- **IF MISSING**: Set planning_notes_analysis = "SKIPPED: planning-notes.md not found"
119+
107120
**From role analysis documents** (AUTHORITATIVE SOURCE):
108121
- Functional Requirements (IDs, descriptions, acceptance criteria)
109122
- Non-Functional Requirements (IDs, targets)
@@ -161,8 +174,8 @@ Create internal representations (do not include raw artifacts in output):
161174

162175
**Execution Order** (Agent orchestrates internally):
163176

164-
1. **Tier 1 (CRITICAL Path)**: A, B, C - User intent, coverage, consistency (full analysis)
165-
2. **Tier 2 (HIGH Priority)**: D, E - Dependencies, synthesis alignment (limit 15 findings)
177+
1. **Tier 1 (CRITICAL Path)**: A, B, C, I - User intent, coverage, consistency, constraints compliance (full analysis)
178+
2. **Tier 2 (HIGH Priority)**: D, E, J - Dependencies, synthesis alignment, N+1 context validation (limit 15 findings)
166179
3. **Tier 3 (MEDIUM Priority)**: F - Specification quality (limit 20 findings)
167180
4. **Tier 4 (LOW Priority)**: G, H - Duplication, feasibility (limit 15 findings)
168181

@@ -182,9 +195,10 @@ Task(
182195
1. Read: ~/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json (dimensions & rules)
183196
2. Read: ~/.claude/workflows/cli-templates/schemas/verify-json-schema.json (output schema)
184197
3. Read: ${session_file} (user intent)
185-
4. Read: ${IMPL_PLAN} (implementation plan)
186-
5. Glob: ${task_dir}/*.json (task files)
187-
6. Glob: ${SYNTHESIS_DIR}/*/analysis.md (role analyses)
198+
4. Read: ${PLANNING_NOTES} (constraints & N+1 context)
199+
5. Read: ${IMPL_PLAN} (implementation plan)
200+
6. Glob: ${task_dir}/*.json (task files)
201+
7. Glob: ${SYNTHESIS_DIR}/*/analysis.md (role analyses)
188202
189203
### Execution Flow
190204
@@ -226,7 +240,8 @@ const byDimension = Object.groupBy(findings, f => f.dimension)
226240
const DIMS = {
227241
A: "User Intent Alignment", B: "Requirements Coverage", C: "Consistency Validation",
228242
D: "Dependency Integrity", E: "Synthesis Alignment", F: "Task Specification Quality",
229-
G: "Duplication Detection", H: "Feasibility Assessment"
243+
G: "Duplication Detection", H: "Feasibility Assessment",
244+
I: "Constraints Compliance", J: "N+1 Context Validation"
230245
}
231246
```
232247

@@ -280,7 +295,7 @@ ${findings.map(f => `| ${f.id} | ${f.dimension_name} | ${f.severity} | ${f.locat
280295
281296
## Analysis by Dimension
282297
283-
${['A','B','C','D','E','F','G','H'].map(d => `### ${d}. ${DIMS[d]}\n\n${renderDimension(d)}`).join('\n\n---\n\n')}
298+
${['A','B','C','D','E','F','G','H','I','J'].map(d => `### ${d}. ${DIMS[d]}\n\n${renderDimension(d)}`).join('\n\n---\n\n')}
284299
285300
---
286301

.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,23 @@
1919
"G": { "name": "Duplication Detection", "tier": 4, "severity": "LOW",
2020
"checks": ["Overlapping Task Scope", "Redundant Coverage"] },
2121
"H": { "name": "Feasibility Assessment", "tier": 4, "severity": "LOW",
22-
"checks": ["Complexity Misalignment", "Resource Conflicts", "Skill Gap Risks"] }
22+
"checks": ["Complexity Misalignment", "Resource Conflicts", "Skill Gap Risks"] },
23+
"I": { "name": "Constraints Compliance", "tier": 1, "severity": "CRITICAL",
24+
"checks": ["Consolidated Constraints Violation", "Phase Constraint Ignored", "User Constraint Override"] },
25+
"J": { "name": "N+1 Context Validation", "tier": 2, "severity": "HIGH",
26+
"checks": ["Deferred Item Included", "Decision Contradiction", "Revisit Flag Ignored"] }
2327
},
2428

2529
"tiers": {
26-
"1": { "dimensions": ["A", "B", "C"], "priority": "CRITICAL", "limit": null, "rule": "analysis-review-architecture" },
27-
"2": { "dimensions": ["D", "E"], "priority": "HIGH", "limit": 15, "rule": "analysis-diagnose-bug-root-cause" },
30+
"1": { "dimensions": ["A", "B", "C", "I"], "priority": "CRITICAL", "limit": null, "rule": "analysis-review-architecture" },
31+
"2": { "dimensions": ["D", "E", "J"], "priority": "HIGH", "limit": 15, "rule": "analysis-diagnose-bug-root-cause" },
2832
"3": { "dimensions": ["F"], "priority": "MEDIUM", "limit": 20, "rule": "analysis-analyze-code-patterns" },
2933
"4": { "dimensions": ["G", "H"], "priority": "LOW", "limit": 15, "rule": "analysis-analyze-code-patterns" }
3034
},
3135

3236
"severity_rules": {
33-
"CRITICAL": ["User intent violation", "Synthesis authority violation", "Zero coverage", "Circular/broken deps"],
34-
"HIGH": ["NFR gaps", "Priority conflicts", "Missing risk mitigation"],
37+
"CRITICAL": ["User intent violation", "Synthesis authority violation", "Zero coverage", "Circular/broken deps", "Constraint violation"],
38+
"HIGH": ["NFR gaps", "Priority conflicts", "Missing risk mitigation", "Deferred item included", "Decision contradiction"],
3539
"MEDIUM": ["Terminology drift", "Missing refs", "Weak flow control"],
3640
"LOW": ["Style improvements", "Minor redundancy"]
3741
},

0 commit comments

Comments
 (0)