mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
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
This commit is contained in:
@@ -72,6 +72,7 @@ IF NOT EXISTS(process_dir):
|
|||||||
SYNTHESIS_DIR = brainstorm_dir # Contains role analysis files: */analysis.md
|
SYNTHESIS_DIR = brainstorm_dir # Contains role analysis files: */analysis.md
|
||||||
IMPL_PLAN = session_dir/IMPL_PLAN.md
|
IMPL_PLAN = session_dir/IMPL_PLAN.md
|
||||||
TASK_FILES = Glob(task_dir/*.json)
|
TASK_FILES = Glob(task_dir/*.json)
|
||||||
|
PLANNING_NOTES = session_dir/planning-notes.md # N+1 context and constraints
|
||||||
|
|
||||||
# Abort if missing - in order of dependency
|
# Abort if missing - in order of dependency
|
||||||
SESSION_FILE_EXISTS = EXISTS(session_file)
|
SESSION_FILE_EXISTS = EXISTS(session_file)
|
||||||
@@ -79,6 +80,11 @@ IF NOT SESSION_FILE_EXISTS:
|
|||||||
WARNING: "workflow-session.json not found. User intent alignment verification will be skipped."
|
WARNING: "workflow-session.json not found. User intent alignment verification will be skipped."
|
||||||
# Continue execution - this is optional context, not blocking
|
# Continue execution - this is optional context, not blocking
|
||||||
|
|
||||||
|
PLANNING_NOTES_EXISTS = EXISTS(PLANNING_NOTES)
|
||||||
|
IF NOT PLANNING_NOTES_EXISTS:
|
||||||
|
WARNING: "planning-notes.md not found. Constraints/N+1 context verification will be skipped."
|
||||||
|
# Continue execution - optional context
|
||||||
|
|
||||||
SYNTHESIS_FILES = Glob(brainstorm_dir/*/analysis.md)
|
SYNTHESIS_FILES = Glob(brainstorm_dir/*/analysis.md)
|
||||||
IF SYNTHESIS_FILES.count == 0:
|
IF SYNTHESIS_FILES.count == 0:
|
||||||
ERROR: "No role analysis documents found in .brainstorming/*/analysis.md. Run /workflow:brainstorm:synthesis first"
|
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:
|
|||||||
- User's scope definition
|
- User's scope definition
|
||||||
- **IF MISSING**: Set user_intent_analysis = "SKIPPED: workflow-session.json not found"
|
- **IF MISSING**: Set user_intent_analysis = "SKIPPED: workflow-session.json not found"
|
||||||
|
|
||||||
|
**From planning-notes.md** (OPTIONAL - Constraints & N+1 Context):
|
||||||
|
- **ONLY IF EXISTS**: Load planning context
|
||||||
|
- Consolidated Constraints (numbered list from Phase 1-3)
|
||||||
|
- N+1 Context: Decisions table (Decision | Rationale | Revisit?)
|
||||||
|
- N+1 Context: Deferred items list
|
||||||
|
- **IF MISSING**: Set planning_notes_analysis = "SKIPPED: planning-notes.md not found"
|
||||||
|
|
||||||
**From role analysis documents** (AUTHORITATIVE SOURCE):
|
**From role analysis documents** (AUTHORITATIVE SOURCE):
|
||||||
- Functional Requirements (IDs, descriptions, acceptance criteria)
|
- Functional Requirements (IDs, descriptions, acceptance criteria)
|
||||||
- Non-Functional Requirements (IDs, targets)
|
- Non-Functional Requirements (IDs, targets)
|
||||||
@@ -161,8 +174,8 @@ Create internal representations (do not include raw artifacts in output):
|
|||||||
|
|
||||||
**Execution Order** (Agent orchestrates internally):
|
**Execution Order** (Agent orchestrates internally):
|
||||||
|
|
||||||
1. **Tier 1 (CRITICAL Path)**: A, B, C - User intent, coverage, consistency (full analysis)
|
1. **Tier 1 (CRITICAL Path)**: A, B, C, I - User intent, coverage, consistency, constraints compliance (full analysis)
|
||||||
2. **Tier 2 (HIGH Priority)**: D, E - Dependencies, synthesis alignment (limit 15 findings)
|
2. **Tier 2 (HIGH Priority)**: D, E, J - Dependencies, synthesis alignment, N+1 context validation (limit 15 findings)
|
||||||
3. **Tier 3 (MEDIUM Priority)**: F - Specification quality (limit 20 findings)
|
3. **Tier 3 (MEDIUM Priority)**: F - Specification quality (limit 20 findings)
|
||||||
4. **Tier 4 (LOW Priority)**: G, H - Duplication, feasibility (limit 15 findings)
|
4. **Tier 4 (LOW Priority)**: G, H - Duplication, feasibility (limit 15 findings)
|
||||||
|
|
||||||
@@ -182,9 +195,10 @@ Task(
|
|||||||
1. Read: ~/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json (dimensions & rules)
|
1. Read: ~/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json (dimensions & rules)
|
||||||
2. Read: ~/.claude/workflows/cli-templates/schemas/verify-json-schema.json (output schema)
|
2. Read: ~/.claude/workflows/cli-templates/schemas/verify-json-schema.json (output schema)
|
||||||
3. Read: ${session_file} (user intent)
|
3. Read: ${session_file} (user intent)
|
||||||
4. Read: ${IMPL_PLAN} (implementation plan)
|
4. Read: ${PLANNING_NOTES} (constraints & N+1 context)
|
||||||
5. Glob: ${task_dir}/*.json (task files)
|
5. Read: ${IMPL_PLAN} (implementation plan)
|
||||||
6. Glob: ${SYNTHESIS_DIR}/*/analysis.md (role analyses)
|
6. Glob: ${task_dir}/*.json (task files)
|
||||||
|
7. Glob: ${SYNTHESIS_DIR}/*/analysis.md (role analyses)
|
||||||
|
|
||||||
### Execution Flow
|
### Execution Flow
|
||||||
|
|
||||||
@@ -226,7 +240,8 @@ const byDimension = Object.groupBy(findings, f => f.dimension)
|
|||||||
const DIMS = {
|
const DIMS = {
|
||||||
A: "User Intent Alignment", B: "Requirements Coverage", C: "Consistency Validation",
|
A: "User Intent Alignment", B: "Requirements Coverage", C: "Consistency Validation",
|
||||||
D: "Dependency Integrity", E: "Synthesis Alignment", F: "Task Specification Quality",
|
D: "Dependency Integrity", E: "Synthesis Alignment", F: "Task Specification Quality",
|
||||||
G: "Duplication Detection", H: "Feasibility Assessment"
|
G: "Duplication Detection", H: "Feasibility Assessment",
|
||||||
|
I: "Constraints Compliance", J: "N+1 Context Validation"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -280,7 +295,7 @@ ${findings.map(f => `| ${f.id} | ${f.dimension_name} | ${f.severity} | ${f.locat
|
|||||||
|
|
||||||
## Analysis by Dimension
|
## Analysis by Dimension
|
||||||
|
|
||||||
${['A','B','C','D','E','F','G','H'].map(d => `### ${d}. ${DIMS[d]}\n\n${renderDimension(d)}`).join('\n\n---\n\n')}
|
${['A','B','C','D','E','F','G','H','I','J'].map(d => `### ${d}. ${DIMS[d]}\n\n${renderDimension(d)}`).join('\n\n---\n\n')}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -19,19 +19,23 @@
|
|||||||
"G": { "name": "Duplication Detection", "tier": 4, "severity": "LOW",
|
"G": { "name": "Duplication Detection", "tier": 4, "severity": "LOW",
|
||||||
"checks": ["Overlapping Task Scope", "Redundant Coverage"] },
|
"checks": ["Overlapping Task Scope", "Redundant Coverage"] },
|
||||||
"H": { "name": "Feasibility Assessment", "tier": 4, "severity": "LOW",
|
"H": { "name": "Feasibility Assessment", "tier": 4, "severity": "LOW",
|
||||||
"checks": ["Complexity Misalignment", "Resource Conflicts", "Skill Gap Risks"] }
|
"checks": ["Complexity Misalignment", "Resource Conflicts", "Skill Gap Risks"] },
|
||||||
|
"I": { "name": "Constraints Compliance", "tier": 1, "severity": "CRITICAL",
|
||||||
|
"checks": ["Consolidated Constraints Violation", "Phase Constraint Ignored", "User Constraint Override"] },
|
||||||
|
"J": { "name": "N+1 Context Validation", "tier": 2, "severity": "HIGH",
|
||||||
|
"checks": ["Deferred Item Included", "Decision Contradiction", "Revisit Flag Ignored"] }
|
||||||
},
|
},
|
||||||
|
|
||||||
"tiers": {
|
"tiers": {
|
||||||
"1": { "dimensions": ["A", "B", "C"], "priority": "CRITICAL", "limit": null, "rule": "analysis-review-architecture" },
|
"1": { "dimensions": ["A", "B", "C", "I"], "priority": "CRITICAL", "limit": null, "rule": "analysis-review-architecture" },
|
||||||
"2": { "dimensions": ["D", "E"], "priority": "HIGH", "limit": 15, "rule": "analysis-diagnose-bug-root-cause" },
|
"2": { "dimensions": ["D", "E", "J"], "priority": "HIGH", "limit": 15, "rule": "analysis-diagnose-bug-root-cause" },
|
||||||
"3": { "dimensions": ["F"], "priority": "MEDIUM", "limit": 20, "rule": "analysis-analyze-code-patterns" },
|
"3": { "dimensions": ["F"], "priority": "MEDIUM", "limit": 20, "rule": "analysis-analyze-code-patterns" },
|
||||||
"4": { "dimensions": ["G", "H"], "priority": "LOW", "limit": 15, "rule": "analysis-analyze-code-patterns" }
|
"4": { "dimensions": ["G", "H"], "priority": "LOW", "limit": 15, "rule": "analysis-analyze-code-patterns" }
|
||||||
},
|
},
|
||||||
|
|
||||||
"severity_rules": {
|
"severity_rules": {
|
||||||
"CRITICAL": ["User intent violation", "Synthesis authority violation", "Zero coverage", "Circular/broken deps"],
|
"CRITICAL": ["User intent violation", "Synthesis authority violation", "Zero coverage", "Circular/broken deps", "Constraint violation"],
|
||||||
"HIGH": ["NFR gaps", "Priority conflicts", "Missing risk mitigation"],
|
"HIGH": ["NFR gaps", "Priority conflicts", "Missing risk mitigation", "Deferred item included", "Decision contradiction"],
|
||||||
"MEDIUM": ["Terminology drift", "Missing refs", "Weak flow control"],
|
"MEDIUM": ["Terminology drift", "Missing refs", "Weak flow control"],
|
||||||
"LOW": ["Style improvements", "Minor redundancy"]
|
"LOW": ["Style improvements", "Minor redundancy"]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user