AgentSkillsCN

spec-validation

对规格和文档进行自我评估和质量验证。使用结构化检查清单识别差距、矛盾和缺失细节。在起草规格、PRD或功能文档后使用。

SKILL.md
--- frontmatter
name: spec-validation
description: Self-evaluation and quality validation for specifications and documents. Identifies gaps, contradictions, and missing details using structured checklists. Use after drafting specs, PRDs, or feature documents.

Spec Validation

Systematic quality validation for specifications using structured checklists and self-evaluation patterns.

When to Use

  • After drafting *_FEATURE.md specifications
  • Reviewing PRDs for completeness
  • Validating requirements before handoff
  • Self-checking document quality

Core Principle

The best form of feedback is clearly defined rules, then explaining which rules failed and why.


Validation Framework

1. Completeness Check

SectionRequired ElementsValidation Question
ProblemSpecific pain pointIs the problem measurable, not vague?
UsersPrimary + secondaryAre personas defined with proficiency?
ScopeIn-scope + non-goalsAre explicit exclusions documented?
SuccessQuantified metricsCan we measure success after 30 days?
RisksScenarios + mitigationsIs worst-case documented with exit strategy?

2. Clarity Check

CriterionTestFix
No TBD/TODOSearch for "TBD", "TODO", "??", "TBC"Resolve or escalate
Acronyms definedAll acronyms in glossaryAdd definitions
Edge cases coveredEach use case has edge casesDocument behavior
Error messages actionableUser can self-resolve at 3 AMAdd context/guidance

3. Consistency Check

CheckMethodResolution
Policy contradictionsCompare rules pairwiseDocument precedence
Trade-off conflictsMap priority vs constraintMake explicit choice
Priority ambiguityCount must-have itemsLimit to 3-5 MVP items

4. Feasibility Check

AspectValidationOwner
Technical constraintsEngineering reviewTech Lead
DependenciesIdentify external blockersPM
TimelineScope vs deadline matchPM + Eng
RisksMitigation plans existPM

Self-Evaluation Pattern

Use mcp__sequential-thinking__sequentialthinking for systematic review:

python
# Structured self-evaluation
mcp__sequential-thinking__sequentialthinking(
    thought="Reviewing spec for completeness: checking problem statement",
    thoughtNumber=1,
    totalThoughts=5,
    nextThoughtNeeded=True
)

Sequential Review Steps

  1. Problem Clarity: Is the root problem specific and measurable?
  2. User Definition: Are primary users and stakeholders identified?
  3. Scope Boundaries: Are in-scope and non-goals explicit?
  4. Success Criteria: Can we objectively measure success?
  5. Risk Coverage: Are failure scenarios and rollback documented?

Validation Report Template

markdown
## Spec Validation Report: {FEATURE_NAME}

### Summary
- **Overall Status**: PASS / NEEDS REVISION
- **Critical Issues**: {count}
- **Warnings**: {count}

### Completeness (X/5 sections)
| Section | Status | Issue |
|---------|--------|-------|
| Problem | PASS/FAIL | {detail if fail} |
| Users | PASS/FAIL | {detail if fail} |
| Scope | PASS/FAIL | {detail if fail} |
| Success | PASS/FAIL | {detail if fail} |
| Risks | PASS/FAIL | {detail if fail} |

### Clarity Issues
- [ ] {Issue 1}
- [ ] {Issue 2}

### Consistency Issues
- [ ] {Contradiction 1}

### Open Questions (Require Stakeholder Input)
1. {Question needing clarification}

### Recommendations
1. {Specific fix recommendation}

Common Validation Failures

FailureDetectionResolution
Vague success metric"Improve", "faster", "better"Quantify with numbers
Missing non-goalsNo explicit exclusionsAsk "What are we NOT doing?"
Undefined edge casesHappy path onlyApply "3 AM Test"
Policy contradictionRule A conflicts with Rule BDocument precedence
Stakeholder conflictUser A vs User B needsExplicit prioritization

Integration Points

After requirements-discovery

code
Discovery Interview Complete
    -> Draft *_FEATURE.md
    -> spec-validation (this skill)
    -> Identify gaps
    -> Follow-up questions
    -> Final draft

Before implementation

code
*_FEATURE.md Finalized
    -> spec-validation final check
    -> Engineering review
    -> Implementation begins

Quick Checklist (Copy/Paste)

markdown
### Pre-Finalization Checklist
- [ ] Problem is specific, not vague
- [ ] Success metrics are quantified
- [ ] Non-goals are explicitly stated
- [ ] No TBD/TODO items remain
- [ ] Acronyms defined
- [ ] Edge cases documented
- [ ] Error messages are user-actionable
- [ ] No policy contradictions
- [ ] Trade-offs explicitly documented
- [ ] Priorities clear (must-have vs nice-to-have)
- [ ] Technical constraints validated
- [ ] Dependencies identified
- [ ] Risks have mitigation plans