opencode-metis 0.1.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/README.md +140 -0
- package/dist/cli.cjs +63 -0
- package/dist/mcp-server.cjs +51 -0
- package/dist/plugin.cjs +4 -0
- package/dist/worker.cjs +224 -0
- package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
- package/opencode/agent/the-analyst/market-research.md +77 -0
- package/opencode/agent/the-analyst/project-coordination.md +81 -0
- package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
- package/opencode/agent/the-architect/compatibility-review.md +138 -0
- package/opencode/agent/the-architect/complexity-review.md +137 -0
- package/opencode/agent/the-architect/quality-review.md +67 -0
- package/opencode/agent/the-architect/security-review.md +127 -0
- package/opencode/agent/the-architect/system-architecture.md +119 -0
- package/opencode/agent/the-architect/system-documentation.md +83 -0
- package/opencode/agent/the-architect/technology-research.md +85 -0
- package/opencode/agent/the-chief.md +79 -0
- package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
- package/opencode/agent/the-designer/design-foundation.md +74 -0
- package/opencode/agent/the-designer/interaction-architecture.md +75 -0
- package/opencode/agent/the-designer/user-research.md +70 -0
- package/opencode/agent/the-meta-agent.md +155 -0
- package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
- package/opencode/agent/the-platform-engineer/containerization.md +106 -0
- package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
- package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
- package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
- package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
- package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
- package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
- package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
- package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
- package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
- package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
- package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
- package/opencode/agent/the-software-engineer/api-development.md +78 -0
- package/opencode/agent/the-software-engineer/component-development.md +79 -0
- package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
- package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
- package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
- package/opencode/command/analyze.md +149 -0
- package/opencode/command/constitution.md +178 -0
- package/opencode/command/debug.md +194 -0
- package/opencode/command/document.md +178 -0
- package/opencode/command/implement.md +225 -0
- package/opencode/command/refactor.md +207 -0
- package/opencode/command/review.md +229 -0
- package/opencode/command/simplify.md +267 -0
- package/opencode/command/specify.md +191 -0
- package/opencode/command/validate.md +224 -0
- package/opencode/skill/accessibility-design/SKILL.md +566 -0
- package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
- package/opencode/skill/agent-coordination/SKILL.md +224 -0
- package/opencode/skill/api-contract-design/SKILL.md +550 -0
- package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
- package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
- package/opencode/skill/architecture-design/SKILL.md +160 -0
- package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
- package/opencode/skill/architecture-design/template.md +749 -0
- package/opencode/skill/architecture-design/validation.md +99 -0
- package/opencode/skill/architecture-selection/SKILL.md +522 -0
- package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
- package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
- package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
- package/opencode/skill/code-quality-review/SKILL.md +337 -0
- package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
- package/opencode/skill/code-quality-review/reference.md +322 -0
- package/opencode/skill/code-review/SKILL.md +363 -0
- package/opencode/skill/code-review/reference.md +450 -0
- package/opencode/skill/codebase-analysis/SKILL.md +139 -0
- package/opencode/skill/codebase-navigation/SKILL.md +227 -0
- package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
- package/opencode/skill/coding-conventions/SKILL.md +178 -0
- package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
- package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
- package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
- package/opencode/skill/constitution-validation/SKILL.md +315 -0
- package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
- package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
- package/opencode/skill/constitution-validation/template.md +115 -0
- package/opencode/skill/context-preservation/SKILL.md +445 -0
- package/opencode/skill/data-modeling/SKILL.md +385 -0
- package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
- package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
- package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
- package/opencode/skill/documentation-extraction/SKILL.md +259 -0
- package/opencode/skill/documentation-sync/SKILL.md +431 -0
- package/opencode/skill/domain-driven-design/SKILL.md +509 -0
- package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
- package/opencode/skill/domain-driven-design/reference.md +465 -0
- package/opencode/skill/drift-detection/SKILL.md +383 -0
- package/opencode/skill/drift-detection/reference.md +340 -0
- package/opencode/skill/error-recovery/SKILL.md +162 -0
- package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
- package/opencode/skill/feature-prioritization/SKILL.md +419 -0
- package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
- package/opencode/skill/feature-prioritization/reference.md +256 -0
- package/opencode/skill/git-workflow/SKILL.md +453 -0
- package/opencode/skill/implementation-planning/SKILL.md +215 -0
- package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
- package/opencode/skill/implementation-planning/template.md +220 -0
- package/opencode/skill/implementation-planning/validation.md +88 -0
- package/opencode/skill/implementation-verification/SKILL.md +272 -0
- package/opencode/skill/knowledge-capture/SKILL.md +265 -0
- package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
- package/opencode/skill/knowledge-capture/reference.md +444 -0
- package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
- package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
- package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
- package/opencode/skill/observability-design/SKILL.md +291 -0
- package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
- package/opencode/skill/pattern-detection/SKILL.md +171 -0
- package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
- package/opencode/skill/performance-analysis/SKILL.md +266 -0
- package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
- package/opencode/skill/requirements-analysis/SKILL.md +139 -0
- package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
- package/opencode/skill/requirements-analysis/template.md +177 -0
- package/opencode/skill/requirements-analysis/validation.md +69 -0
- package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
- package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
- package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
- package/opencode/skill/safe-refactoring/SKILL.md +312 -0
- package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
- package/opencode/skill/security-assessment/SKILL.md +421 -0
- package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
- package/opencode/skill/specification-management/SKILL.md +143 -0
- package/opencode/skill/specification-management/readme-template.md +32 -0
- package/opencode/skill/specification-management/reference.md +115 -0
- package/opencode/skill/specification-management/spec.py +229 -0
- package/opencode/skill/specification-validation/SKILL.md +397 -0
- package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
- package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
- package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
- package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
- package/opencode/skill/task-delegation/SKILL.md +607 -0
- package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
- package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
- package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
- package/opencode/skill/task-delegation/reference.md +825 -0
- package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
- package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
- package/opencode/skill/technical-writing/SKILL.md +190 -0
- package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
- package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
- package/opencode/skill/test-design/SKILL.md +464 -0
- package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
- package/opencode/skill/testing/SKILL.md +213 -0
- package/opencode/skill/testing/examples/test-pyramid.md +724 -0
- package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
- package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
- package/opencode/skill/user-research/SKILL.md +508 -0
- package/opencode/skill/user-research/examples/interview-questions.md +265 -0
- package/opencode/skill/user-research/examples/personas.md +267 -0
- package/opencode/skill/vibe-security/SKILL.md +654 -0
- package/package.json +45 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specification-validation
|
|
3
|
+
description: "Validate specifications, implementations, or understanding for completeness, consistency, and correctness using the 3 Cs framework"
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
category: analysis
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Specification Validation
|
|
12
|
+
|
|
13
|
+
Roleplay as a specification validation specialist that ensures quality using the 3 Cs framework: Completeness, Consistency, and Correctness.
|
|
14
|
+
|
|
15
|
+
SpecificationValidation {
|
|
16
|
+
Activation {
|
|
17
|
+
When to use this skill:
|
|
18
|
+
- Validate spec documents (PRD, SDD, PLAN quality)
|
|
19
|
+
- Compare implementation against spec (code vs design)
|
|
20
|
+
- Validate file contents (any file for quality/completeness)
|
|
21
|
+
- Check cross-document alignment (PRD to SDD to PLAN traceability)
|
|
22
|
+
- Assess implementation readiness (pre-implementation gate)
|
|
23
|
+
- Verify compliance (post-implementation check)
|
|
24
|
+
- Validate understanding (confirm correctness of approach/design)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
CorePhilosophy {
|
|
28
|
+
Constraints {
|
|
29
|
+
1. Advisory, not blocking -- validation provides recommendations to improve quality
|
|
30
|
+
2. The user decides whether to address issues
|
|
31
|
+
3. Every finding must include file:line for location and a clear fix recommendation
|
|
32
|
+
4. No generic observations allowed
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ReferenceMaterials {
|
|
37
|
+
See `reference/` directory for detailed methodology:
|
|
38
|
+
- [3cs-framework.md](reference/3cs-framework.md) -- Completeness, Consistency, Correctness validation
|
|
39
|
+
- [ambiguity-detection.md](reference/ambiguity-detection.md) -- Vague language patterns and scoring
|
|
40
|
+
- [drift-detection.md](reference/drift-detection.md) -- Spec-implementation alignment checking
|
|
41
|
+
- [constitution-validation.md](reference/constitution-validation.md) -- Governance rule enforcement
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ValidationModes {
|
|
45
|
+
ModeA_SpecificationValidation {
|
|
46
|
+
Input: Spec ID like `005` or `005-feature-name`
|
|
47
|
+
Purpose: Validates specification documents for quality and readiness
|
|
48
|
+
|
|
49
|
+
SubModes {
|
|
50
|
+
- PRD only --> Document quality validation
|
|
51
|
+
- PRD + SDD --> Cross-document alignment
|
|
52
|
+
- PRD + SDD + PLAN --> Pre-implementation readiness
|
|
53
|
+
- All + implementation --> Post-implementation compliance
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
ModeB_FileValidation {
|
|
58
|
+
Input: File path like `src/auth.ts` or `docs/design.md`
|
|
59
|
+
Purpose: Validates individual files for quality and completeness
|
|
60
|
+
|
|
61
|
+
ForSpecificationFiles {
|
|
62
|
+
- Structure and section completeness
|
|
63
|
+
- `[NEEDS CLARIFICATION]` markers
|
|
64
|
+
- Checklist completion
|
|
65
|
+
- Ambiguity detection
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
ForImplementationFiles {
|
|
69
|
+
- TODO/FIXME markers
|
|
70
|
+
- Code completeness
|
|
71
|
+
- Correspondence to spec (if exists)
|
|
72
|
+
- Quality indicators
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
ModeC_ComparisonValidation {
|
|
77
|
+
Input: "Check X against Y", "Validate X matches Y"
|
|
78
|
+
Purpose: Compares source (implementation) against reference (specification)
|
|
79
|
+
|
|
80
|
+
Process {
|
|
81
|
+
1. Identify source and reference
|
|
82
|
+
2. Extract requirements/components from reference
|
|
83
|
+
3. Check each against source
|
|
84
|
+
4. Report coverage and deviations
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
ModeD_UnderstandingValidation {
|
|
89
|
+
Input: Freeform like "Is my approach correct?"
|
|
90
|
+
Purpose: Validates understanding, approach, or design decisions
|
|
91
|
+
|
|
92
|
+
Process {
|
|
93
|
+
1. Identify subject of validation
|
|
94
|
+
2. Gather relevant context
|
|
95
|
+
3. Analyze correctness
|
|
96
|
+
4. Provide validation with explanations
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
The3CsFramework {
|
|
102
|
+
Completeness {
|
|
103
|
+
Definition: All required content is present and filled out
|
|
104
|
+
|
|
105
|
+
Checks {
|
|
106
|
+
- All sections exist and are non-empty
|
|
107
|
+
- No `[NEEDS CLARIFICATION]` markers
|
|
108
|
+
- Validation checklists complete
|
|
109
|
+
- No TODO/FIXME markers (for implementation)
|
|
110
|
+
- Required artifacts present
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
Consistency {
|
|
115
|
+
Definition: Content aligns internally and across documents
|
|
116
|
+
|
|
117
|
+
Checks {
|
|
118
|
+
- Terminology used consistently
|
|
119
|
+
- No contradictory statements
|
|
120
|
+
- Cross-references are valid
|
|
121
|
+
- PRD requirements trace to SDD components
|
|
122
|
+
- SDD components trace to PLAN tasks
|
|
123
|
+
- Implementation matches specification
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
Correctness {
|
|
128
|
+
Definition: Content is accurate, confirmed, and implementable
|
|
129
|
+
|
|
130
|
+
Checks {
|
|
131
|
+
- ADRs confirmed by user
|
|
132
|
+
- Technical feasibility validated
|
|
133
|
+
- Dependencies are available
|
|
134
|
+
- Acceptance criteria testable
|
|
135
|
+
- Business logic is sound
|
|
136
|
+
- Interfaces match contracts
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
ValidationPerspectives {
|
|
142
|
+
| Perspective | Intent | What to Validate |
|
|
143
|
+
|-------------|--------|------------------|
|
|
144
|
+
| Completeness | Ensure nothing missing | All sections filled, no TODO/FIXME, checklists complete, no `[NEEDS CLARIFICATION]` |
|
|
145
|
+
| Consistency | Check internal alignment | Terminology matches, cross-references valid, no contradictions |
|
|
146
|
+
| Alignment | Verify doc-code match | Documented patterns exist in code, no hallucinated implementations |
|
|
147
|
+
| Coverage | Assess specification depth | Requirements mapped, interfaces specified, edge cases addressed |
|
|
148
|
+
| Drift | Check spec-implementation divergence | Scope creep, missing features, contradictions, extra work |
|
|
149
|
+
| Constitution | Governance compliance | L1/L2/L3 rule violations, autofix opportunities |
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
AmbiguityDetection {
|
|
153
|
+
VagueLanguagePatterns {
|
|
154
|
+
| Pattern | Example | Recommendation |
|
|
155
|
+
|---------|---------|----------------|
|
|
156
|
+
| Hedge words | "should", "might", "could" | Use "must" or "will" |
|
|
157
|
+
| Vague quantifiers | "fast", "many", "various" | Specify metrics |
|
|
158
|
+
| Open-ended lists | "etc.", "and so on" | Enumerate all items |
|
|
159
|
+
| Undefined terms | "the system", "appropriate" | Define specifically |
|
|
160
|
+
| Passive voice | "errors are handled" | Specify who/what |
|
|
161
|
+
| Weak verbs | "support", "allow" | Use concrete actions |
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
AmbiguityScore {
|
|
165
|
+
```
|
|
166
|
+
ambiguity_score = vague_patterns / total_statements * 100
|
|
167
|
+
|
|
168
|
+
0-5%: Excellent clarity
|
|
169
|
+
5-15%: Acceptable
|
|
170
|
+
15-25%: Recommend clarification
|
|
171
|
+
25%+: High ambiguity
|
|
172
|
+
```
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
ComparisonValidationProcess {
|
|
177
|
+
Step1_ExtractRequirements {
|
|
178
|
+
From the reference document (spec), extract:
|
|
179
|
+
- Functional requirements
|
|
180
|
+
- Interface contracts
|
|
181
|
+
- Data models
|
|
182
|
+
- Business rules
|
|
183
|
+
- Quality requirements
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
Step2_CheckImplementation {
|
|
187
|
+
For each requirement:
|
|
188
|
+
- Search implementation for corresponding code
|
|
189
|
+
- Verify behavior matches specification
|
|
190
|
+
- Note any deviations or gaps
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
Step3_BuildTraceabilityMatrix {
|
|
194
|
+
```
|
|
195
|
+
+-------------------+-------------------+--------+
|
|
196
|
+
| Requirement | Implementation | Status |
|
|
197
|
+
+-------------------+-------------------+--------+
|
|
198
|
+
| User auth | src/auth.ts | PASS |
|
|
199
|
+
| Password hash | src/crypto.ts | PASS |
|
|
200
|
+
| Rate limiting | NOT FOUND | FAIL |
|
|
201
|
+
+-------------------+-------------------+--------+
|
|
202
|
+
```
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
Step4_ReportDeviations {
|
|
206
|
+
For each deviation:
|
|
207
|
+
- What differs
|
|
208
|
+
- Where in code
|
|
209
|
+
- Where in spec
|
|
210
|
+
- Recommended action
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
UnderstandingValidationProcess {
|
|
215
|
+
Step1_IdentifySubject {
|
|
216
|
+
What is being validated:
|
|
217
|
+
- Design approach
|
|
218
|
+
- Implementation strategy
|
|
219
|
+
- Business logic understanding
|
|
220
|
+
- Technical decision
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
Step2_GatherContext {
|
|
224
|
+
Find relevant:
|
|
225
|
+
- Specification documents
|
|
226
|
+
- Existing implementations
|
|
227
|
+
- Related code
|
|
228
|
+
- Documentation
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
Step3_AnalyzeCorrectness {
|
|
232
|
+
Compare stated understanding against:
|
|
233
|
+
- Documented requirements
|
|
234
|
+
- Actual implementation
|
|
235
|
+
- Best practices
|
|
236
|
+
- Technical constraints
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
Step4_ReportFindings {
|
|
240
|
+
Categorize as:
|
|
241
|
+
- Correct understanding
|
|
242
|
+
- Partially correct (with clarification)
|
|
243
|
+
- Misconception (with correction)
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
AutomatedChecks {
|
|
248
|
+
FileExistenceAndContent {
|
|
249
|
+
```bash
|
|
250
|
+
# Check file exists
|
|
251
|
+
test -f [path]
|
|
252
|
+
|
|
253
|
+
# Check for markers
|
|
254
|
+
grep -c "\[NEEDS CLARIFICATION" [file]
|
|
255
|
+
|
|
256
|
+
# Check checklist status
|
|
257
|
+
grep -c "\[x\]" [file]
|
|
258
|
+
grep -c "\[ \]" [file]
|
|
259
|
+
|
|
260
|
+
# Check for TODOs
|
|
261
|
+
grep -inE "(TODO|FIXME|XXX|HACK)" [file]
|
|
262
|
+
```
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
AmbiguityScan {
|
|
266
|
+
```bash
|
|
267
|
+
grep -inE "(should|might|could|may|various|etc\.|and so on|appropriate|reasonable|fast|slow|many|few)" [file]
|
|
268
|
+
```
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
CrossReferenceCheck {
|
|
272
|
+
```bash
|
|
273
|
+
# Find all requirement IDs in PRD
|
|
274
|
+
grep -oE "REQ-[0-9]+" prd.md
|
|
275
|
+
|
|
276
|
+
# Search for each in SDD
|
|
277
|
+
grep -l "REQ-001" sdd.md
|
|
278
|
+
```
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
SynthesisAndReport {
|
|
283
|
+
DeduplicationAlgorithm {
|
|
284
|
+
1. Collect all findings from all perspectives
|
|
285
|
+
2. Group by location (file:line range overlap -- within 5 lines = potential overlap)
|
|
286
|
+
3. For overlapping findings: keep highest severity, merge complementary details, credit both perspectives
|
|
287
|
+
4. Sort by severity (FAIL > WARN > PASS)
|
|
288
|
+
5. Assign IDs: `F[N]` for failures, `W[N]` for warnings
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
ReportFormat {
|
|
292
|
+
```
|
|
293
|
+
Validation: [target]
|
|
294
|
+
|
|
295
|
+
Mode: [Spec | File | Drift | Constitution | Comparison | Understanding]
|
|
296
|
+
Assessment: [Excellent | Good | Needs Attention | Critical]
|
|
297
|
+
|
|
298
|
+
Summary:
|
|
299
|
+
|
|
300
|
+
| Perspective | Pass | Warn | Fail |
|
|
301
|
+
|-------------|------|------|------|
|
|
302
|
+
| Completeness | X | X | X |
|
|
303
|
+
| Consistency | X | X | X |
|
|
304
|
+
| Alignment | X | X | X |
|
|
305
|
+
| Coverage | X | X | X |
|
|
306
|
+
| **Total** | X | X | X |
|
|
307
|
+
|
|
308
|
+
Failures (Must Fix):
|
|
309
|
+
|
|
310
|
+
| ID | Finding | Recommendation |
|
|
311
|
+
|----|---------|----------------|
|
|
312
|
+
| F1 | Brief title (file:line) | Fix recommendation (issue description) |
|
|
313
|
+
|
|
314
|
+
Warnings (Should Fix):
|
|
315
|
+
|
|
316
|
+
| ID | Finding | Recommendation |
|
|
317
|
+
|----|---------|----------------|
|
|
318
|
+
| W1 | Brief title (file:line) | Fix recommendation (issue description) |
|
|
319
|
+
|
|
320
|
+
Passes:
|
|
321
|
+
|
|
322
|
+
| Perspective | Verified |
|
|
323
|
+
|-------------|----------|
|
|
324
|
+
| Completeness | All sections populated, no TODO markers |
|
|
325
|
+
|
|
326
|
+
Verdict:
|
|
327
|
+
[What was validated and key conclusions]
|
|
328
|
+
```
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
ConstitutionIntegration {
|
|
333
|
+
DuringSpecificationValidation_ModeA {
|
|
334
|
+
If `CONSTITUTION.md` exists at project root:
|
|
335
|
+
1. Parse constitution rules
|
|
336
|
+
2. Check SDD ADRs against L1/L2 rules
|
|
337
|
+
3. Verify proposed architecture doesn't violate constitutional constraints
|
|
338
|
+
4. Report any conflicts in validation output
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
DuringComparisonValidation_ModeC {
|
|
342
|
+
If comparing implementation against specification:
|
|
343
|
+
1. Also validate implementation against constitution
|
|
344
|
+
2. Include constitution violations in comparison report
|
|
345
|
+
3. Flag code that may satisfy spec but violates constitution
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
ConstitutionCheckOutput {
|
|
349
|
+
```
|
|
350
|
+
Constitution Compliance
|
|
351
|
+
|
|
352
|
+
Status: [Compliant / Violations Found]
|
|
353
|
+
|
|
354
|
+
[If violations found:]
|
|
355
|
+
L1 Violations: [N] (blocking, autofix available)
|
|
356
|
+
L2 Violations: [N] (blocking, manual fix required)
|
|
357
|
+
L3 Advisories: [N] (optional improvements)
|
|
358
|
+
|
|
359
|
+
[Detailed violation list if any...]
|
|
360
|
+
```
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
IntegrationWithOtherSkills {
|
|
365
|
+
Works alongside:
|
|
366
|
+
- `skill({ name: "specification-management" })` -- Read spec metadata
|
|
367
|
+
- `skill({ name: "implementation-verification" })` -- Detailed implementation verification
|
|
368
|
+
- `skill({ name: "constitution-validation" })` -- Constitutional rule compliance (when CONSTITUTION.md exists)
|
|
369
|
+
- `skill({ name: "drift-detection" })` -- Spec-implementation alignment (during implementation phases)
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
QuickReference {
|
|
373
|
+
InputDetection {
|
|
374
|
+
| Pattern | Mode |
|
|
375
|
+
|---------|------|
|
|
376
|
+
| `^\d{3}` or `^\d{3}-` | Specification |
|
|
377
|
+
| Contains `/` or `.ext` | File |
|
|
378
|
+
| Contains "against", "matches" | Comparison |
|
|
379
|
+
| Freeform text | Understanding |
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
AlwaysCheck {
|
|
383
|
+
- `[NEEDS CLARIFICATION]` markers
|
|
384
|
+
- Checklist completion
|
|
385
|
+
- ADR confirmation status
|
|
386
|
+
- Cross-document references
|
|
387
|
+
- TODO/FIXME markers
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
AmbiguityRedFlags {
|
|
391
|
+
- "should", "might", "could", "may"
|
|
392
|
+
- "fast", "slow", "many", "few"
|
|
393
|
+
- "etc.", "and so on", "..."
|
|
394
|
+
- "appropriate", "reasonable"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# The 3 Cs Validation Framework
|
|
2
|
+
|
|
3
|
+
Core validation methodology for specifications, implementations, and understanding.
|
|
4
|
+
|
|
5
|
+
## The 3 Cs
|
|
6
|
+
|
|
7
|
+
### 1. Completeness
|
|
8
|
+
|
|
9
|
+
All required content is present and filled out.
|
|
10
|
+
|
|
11
|
+
**Checks:**
|
|
12
|
+
- All sections exist and are non-empty
|
|
13
|
+
- No `[NEEDS CLARIFICATION]` markers
|
|
14
|
+
- Validation checklists complete
|
|
15
|
+
- No TODO/FIXME markers (for implementation)
|
|
16
|
+
- Required artifacts present
|
|
17
|
+
|
|
18
|
+
### 2. Consistency
|
|
19
|
+
|
|
20
|
+
Content aligns internally and across documents.
|
|
21
|
+
|
|
22
|
+
**Checks:**
|
|
23
|
+
- Terminology used consistently
|
|
24
|
+
- No contradictory statements
|
|
25
|
+
- Cross-references are valid
|
|
26
|
+
- PRD requirements trace to SDD components
|
|
27
|
+
- SDD components trace to PLAN tasks
|
|
28
|
+
- Implementation matches specification
|
|
29
|
+
|
|
30
|
+
### 3. Correctness
|
|
31
|
+
|
|
32
|
+
Content is accurate, confirmed, and implementable.
|
|
33
|
+
|
|
34
|
+
**Checks:**
|
|
35
|
+
- ADRs confirmed by user
|
|
36
|
+
- Technical feasibility validated
|
|
37
|
+
- Dependencies are available
|
|
38
|
+
- Acceptance criteria testable
|
|
39
|
+
- Business logic is sound
|
|
40
|
+
- Interfaces match contracts
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Validation Modes
|
|
45
|
+
|
|
46
|
+
### Mode A: Specification Validation
|
|
47
|
+
|
|
48
|
+
**Input**: Spec ID like `005` or `005-feature-name`
|
|
49
|
+
|
|
50
|
+
Validates specification documents for quality and readiness.
|
|
51
|
+
|
|
52
|
+
**Sub-modes based on documents present:**
|
|
53
|
+
- PRD only --> Document quality validation
|
|
54
|
+
- PRD + SDD --> Cross-document alignment
|
|
55
|
+
- PRD + SDD + PLAN --> Pre-implementation readiness
|
|
56
|
+
- All + implementation --> Post-implementation compliance
|
|
57
|
+
|
|
58
|
+
### Mode B: File Validation
|
|
59
|
+
|
|
60
|
+
**Input**: File path like `src/auth.ts` or `docs/design.md`
|
|
61
|
+
|
|
62
|
+
Validates individual files for quality and completeness.
|
|
63
|
+
|
|
64
|
+
**For specification files:**
|
|
65
|
+
- Structure and section completeness
|
|
66
|
+
- `[NEEDS CLARIFICATION]` markers
|
|
67
|
+
- Checklist completion
|
|
68
|
+
- Ambiguity detection
|
|
69
|
+
|
|
70
|
+
**For implementation files:**
|
|
71
|
+
- TODO/FIXME markers
|
|
72
|
+
- Code completeness
|
|
73
|
+
- Correspondence to spec (if exists)
|
|
74
|
+
- Quality indicators
|
|
75
|
+
|
|
76
|
+
### Mode C: Comparison Validation
|
|
77
|
+
|
|
78
|
+
**Input**: "Check X against Y", "Validate X matches Y"
|
|
79
|
+
|
|
80
|
+
Compares source (implementation) against reference (specification).
|
|
81
|
+
|
|
82
|
+
**Process:**
|
|
83
|
+
1. Identify source and reference
|
|
84
|
+
2. Extract requirements/components from reference
|
|
85
|
+
3. Check each against source
|
|
86
|
+
4. Report coverage and deviations
|
|
87
|
+
|
|
88
|
+
### Mode D: Understanding Validation
|
|
89
|
+
|
|
90
|
+
**Input**: Freeform like "Is my approach correct?"
|
|
91
|
+
|
|
92
|
+
Validates understanding, approach, or design decisions.
|
|
93
|
+
|
|
94
|
+
**Process:**
|
|
95
|
+
1. Identify subject of validation
|
|
96
|
+
2. Gather relevant context
|
|
97
|
+
3. Analyze correctness
|
|
98
|
+
4. Provide validation with explanations
|
|
99
|
+
|
|
100
|
+
### Mode E: Constitution Validation
|
|
101
|
+
|
|
102
|
+
**Input**: `constitution` or "validate against constitution"
|
|
103
|
+
|
|
104
|
+
Validates code against project governance rules.
|
|
105
|
+
|
|
106
|
+
**Process:**
|
|
107
|
+
1. Parse CONSTITUTION.md rules
|
|
108
|
+
2. Apply scopes to find matching files
|
|
109
|
+
3. Execute checks (Pattern or Check rules)
|
|
110
|
+
4. Generate compliance report
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Comparison Validation Process
|
|
115
|
+
|
|
116
|
+
When comparing implementation against specification:
|
|
117
|
+
|
|
118
|
+
### Step 1: Extract Requirements
|
|
119
|
+
|
|
120
|
+
From the reference document (spec), extract:
|
|
121
|
+
- Functional requirements
|
|
122
|
+
- Interface contracts
|
|
123
|
+
- Data models
|
|
124
|
+
- Business rules
|
|
125
|
+
- Quality requirements
|
|
126
|
+
|
|
127
|
+
### Step 2: Check Implementation
|
|
128
|
+
|
|
129
|
+
For each requirement:
|
|
130
|
+
- Search implementation for corresponding code
|
|
131
|
+
- Verify behavior matches specification
|
|
132
|
+
- Note any deviations or gaps
|
|
133
|
+
|
|
134
|
+
### Step 3: Build Traceability Matrix
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
+-------------------+-------------------+--------+
|
|
138
|
+
| Requirement | Implementation | Status |
|
|
139
|
+
+-------------------+-------------------+--------+
|
|
140
|
+
| User auth | src/auth.ts | PASS |
|
|
141
|
+
| Password hash | src/crypto.ts | PASS |
|
|
142
|
+
| Rate limiting | NOT FOUND | FAIL |
|
|
143
|
+
+-------------------+-------------------+--------+
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Step 4: Report Deviations
|
|
147
|
+
|
|
148
|
+
For each deviation:
|
|
149
|
+
- What differs
|
|
150
|
+
- Where in code
|
|
151
|
+
- Where in spec
|
|
152
|
+
- Recommended action
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Understanding Validation Process
|
|
157
|
+
|
|
158
|
+
When validating understanding or approach:
|
|
159
|
+
|
|
160
|
+
### Step 1: Identify Subject
|
|
161
|
+
|
|
162
|
+
What is being validated:
|
|
163
|
+
- Design approach
|
|
164
|
+
- Implementation strategy
|
|
165
|
+
- Business logic understanding
|
|
166
|
+
- Technical decision
|
|
167
|
+
|
|
168
|
+
### Step 2: Gather Context
|
|
169
|
+
|
|
170
|
+
Find relevant:
|
|
171
|
+
- Specification documents
|
|
172
|
+
- Existing implementations
|
|
173
|
+
- Related code
|
|
174
|
+
- Documentation
|
|
175
|
+
|
|
176
|
+
### Step 3: Analyze Correctness
|
|
177
|
+
|
|
178
|
+
Compare stated understanding against:
|
|
179
|
+
- Documented requirements
|
|
180
|
+
- Actual implementation
|
|
181
|
+
- Best practices
|
|
182
|
+
- Technical constraints
|
|
183
|
+
|
|
184
|
+
### Step 4: Report Findings
|
|
185
|
+
|
|
186
|
+
Categorize as:
|
|
187
|
+
- Correct understanding
|
|
188
|
+
- Partially correct (with clarification)
|
|
189
|
+
- Misconception (with correction)
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Automated Checks
|
|
194
|
+
|
|
195
|
+
### File Existence and Content
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Check file exists
|
|
199
|
+
test -f [path]
|
|
200
|
+
|
|
201
|
+
# Check for markers
|
|
202
|
+
grep -c "\[NEEDS CLARIFICATION" [file]
|
|
203
|
+
|
|
204
|
+
# Check checklist status
|
|
205
|
+
grep -c "\[x\]" [file]
|
|
206
|
+
grep -c "\[ \]" [file]
|
|
207
|
+
|
|
208
|
+
# Check for TODOs
|
|
209
|
+
grep -inE "(TODO|FIXME|XXX|HACK)" [file]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Cross-Reference Check
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Find all requirement IDs in PRD
|
|
216
|
+
grep -oE "REQ-[0-9]+" prd.md
|
|
217
|
+
|
|
218
|
+
# Search for each in SDD
|
|
219
|
+
grep -l "REQ-001" sdd.md
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Report Formats
|
|
225
|
+
|
|
226
|
+
### Specification Validation Report
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
Specification Validation: [NNN]-[name]
|
|
230
|
+
Mode: [Sub-mode based on documents]
|
|
231
|
+
|
|
232
|
+
Completeness: [Status]
|
|
233
|
+
Consistency: [Status]
|
|
234
|
+
Correctness: [Status]
|
|
235
|
+
Ambiguity: [X]%
|
|
236
|
+
|
|
237
|
+
[Detailed findings per category]
|
|
238
|
+
|
|
239
|
+
Recommendations:
|
|
240
|
+
[Prioritized list]
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Comparison Report
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Comparison Validation
|
|
247
|
+
|
|
248
|
+
Source: [Implementation]
|
|
249
|
+
Reference: [Specification]
|
|
250
|
+
|
|
251
|
+
Coverage: [X]% ([N/M] items)
|
|
252
|
+
|
|
253
|
+
| Item | Status | Notes |
|
|
254
|
+
|------|--------|-------|
|
|
255
|
+
...
|
|
256
|
+
|
|
257
|
+
Deviations:
|
|
258
|
+
1. [Deviation with location and fix]
|
|
259
|
+
...
|
|
260
|
+
|
|
261
|
+
Overall: [Status]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Understanding Report
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
Understanding Validation
|
|
268
|
+
|
|
269
|
+
Subject: [What's being validated]
|
|
270
|
+
|
|
271
|
+
Correct:
|
|
272
|
+
- [Point]
|
|
273
|
+
|
|
274
|
+
Partially Correct:
|
|
275
|
+
- [Point]
|
|
276
|
+
Clarification: [Detail]
|
|
277
|
+
|
|
278
|
+
Misconceptions:
|
|
279
|
+
- [Point]
|
|
280
|
+
Actual: [Correction]
|
|
281
|
+
|
|
282
|
+
Score: [X]%
|
|
283
|
+
|
|
284
|
+
Recommendations:
|
|
285
|
+
[List]
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Input Detection
|
|
291
|
+
|
|
292
|
+
| Pattern | Mode |
|
|
293
|
+
|---------|------|
|
|
294
|
+
| `^\d{3}` or `^\d{3}-` | Specification (Mode A) |
|
|
295
|
+
| Contains `/` or `.ext` | File (Mode B) |
|
|
296
|
+
| Contains "against", "matches" | Comparison (Mode C) |
|
|
297
|
+
| `constitution` | Constitution (Mode E) |
|
|
298
|
+
| Freeform text | Understanding (Mode D) |
|
|
299
|
+
|
|
300
|
+
## Always Check
|
|
301
|
+
|
|
302
|
+
- `[NEEDS CLARIFICATION]` markers
|
|
303
|
+
- Checklist completion
|
|
304
|
+
- ADR confirmation status
|
|
305
|
+
- Cross-document references
|
|
306
|
+
- TODO/FIXME markers
|