Validate cross-artifact consistency between constitution, spec, plan, and tasks
Validates consistency between constitution, specs, plans, and tasks to catch gaps and conflicts before implementation. Use after clarify, plan, or tasks commands to verify artifacts align properly.
/plugin marketplace add retsohuang/retso-marketplace/plugin install spec-kit@retso-marketplaceclaude-sonnet-4-5Perform read-only validation of consistency across all spec-kit artifacts: constitution, specifications, plans, and tasks. Identify gaps, conflicts, and misalignments without making any changes.
/spec-kit:analyze
Can be run from any branch. Analyzes all features or current feature depending on context.
Check if on a feature branch:
CURRENT_BRANCH=$(git branch --show-current)
spec-kit/{NNN}-{feature-name}: Analyze that feature onlyFor the feature(s) being analyzed, read:
# Constitution (if exists)
cat .claude/spec-kit/memory/constitution.md
# For each feature
cat .claude/spec-kit/specs/{NNN}-{feature}/spec.md
cat .claude/spec-kit/specs/{NNN}-{feature}/plan.md
cat .claude/spec-kit/specs/{NNN}-{feature}/tasks.md
If constitution exists, check if specs align with:
Core Principles:
Technical Standards:
Decision-Making Guidelines:
Report issues like:
⚠️ Constitution Misalignment: Feature 001-user-auth
Principle Conflict:
- Constitution states: "Quality over speed - thorough testing first"
- Spec has: No testing requirements in success criteria
- Suggestion: Add testing requirements to spec and plan
Standard Violation:
- Constitution requires: "80% test coverage minimum"
- Plan has: "Unit tests for core logic" (no coverage target)
- Suggestion: Add coverage target to plan testing strategy
Check if the plan addresses all spec requirements:
Requirements Coverage:
User Stories Coverage:
Data Requirements:
Integration Points:
Success Metrics:
Report issues like:
❌ Missing Requirements: Feature 002-payment
Spec Requirements Not Addressed in Plan:
- FR-3: Support for international currencies
→ Plan only mentions USD
→ Action: Update plan to include multi-currency support
- NFR-2: 99.9% uptime requirement
→ Plan has no redundancy or failover strategy
→ Action: Add high-availability design to plan
User Story Not Covered:
- "As a user, I want to save payment methods"
→ No data model for saved payments in plan
→ Action: Add SavedPaymentMethod to data models
Check if tasks implement the entire plan:
File Coverage:
Phase Coverage:
Architectural Decisions:
Testing Coverage:
Deployment Coverage:
Report issues like:
⚠️ Incomplete Task Breakdown: Feature 003-admin-dashboard
Missing Files:
- Plan mentions: src/components/Dashboard/AdminPanel.tsx
→ No task creates this file
→ Action: Add task to create AdminPanel component
Missing Tests:
- Plan requires: E2E tests for admin workflows
→ No E2E test tasks in Phase 3
→ Action: Add E2E testing task
Architectural Decision Not Implemented:
- Plan decides: Use Redis for session caching
→ No task adds Redis dependency or configuration
→ Action: Add Redis setup task to Phase 1
If analyzing multiple features, check:
Naming Conflicts:
Integration Points:
Dependency Order:
Report issues like:
🔗 Cross-Feature Issues:
Naming Inconsistency:
- Feature 001 uses: "Customer" model
- Feature 002 uses: "User" model
→ Appears to be same entity
→ Suggestion: Standardize on one name
Missing Dependency:
- Feature 003 (Admin Dashboard) requires auth
- Feature 001 (User Auth) is still in progress
→ Feature 003 should reference or depend on 001
→ Suggestion: Update Feature 003 spec to note dependency
Look for typical problems:
Vague Requirements:
Missing Error Handling:
Incomplete Acceptance Criteria:
Orphaned Sections:
Scope Creep:
Create a comprehensive report with:
Summary:
Critical Issues (must fix before implementation):
Warnings (should address):
Suggestions (nice to have):
✅ Consistency Analysis Complete!
Scope: {all features | Feature NNN-name}
Artifacts Analyzed: {count} specs, {count} plans, {count} task lists
Results:
- 🔴 Critical Issues: {count}
- 🟡 Warnings: {count}
- 🟢 Suggestions: {count}
- ✅ Consistency Score: {score}%
{If issues found:}
Critical Issues Require Attention:
1. Feature 001: Missing NFR-1 implementation in plan
2. Feature 002: Tasks don't cover error handling from plan
3. Constitution conflict: Feature 003 violates testing standard
{Show top 3-5 issues with file references}
Detailed Report Sections:
- Constitution Alignment
- Spec → Plan Consistency
- Plan → Tasks Consistency
- Cross-Feature Issues
- Common Issues
Next Steps:
1. Address critical issues before implementation
2. Update relevant artifacts (spec, plan, or tasks)
3. Run /spec-kit:analyze again to verify fixes
Tip: Analyze regularly - after clarify, after plan, and before implement.
Never modify files during analysis:
Run /spec-kit:analyze:
/spec-kit:clarify - Check spec completeness/spec-kit:plan - Validate plan covers spec/spec-kit:tasks - Ensure tasks implement plan/spec-kit:implement - Final check100% Consistency - Ideal:
80-99% Consistency - Good:
60-79% Consistency - Needs Work:
<60% Consistency - Needs Rework:
/spec-kit:specify