Validate plan alignment with architecture (READ-ONLY)
Validate that the plan aligns with the architecture and identify any blocking issues.
/architect.validate --for-plan
/architect.validate --json
/architect.validate --system-only
/architect.validate --check-only PILLAR_3
| Flag | Description |
|---|---|
--for-plan | Validate against the generated plan (default behavior) |
--json | Output findings in JSON format for easier parsing |
--system-only | Check only system-level ADRs, ignore feature-level |
--check-only [check] | Run only specific checks: PILLAR_1, PILLAR_2, PILLAR_3, or DIAGRAMS |
This is a READ-ONLY validation command. It does not modify any files.
If ADRs exist in any location (check all three):
{REPO_ROOT}/.specify/memory/adr.md (canonical - Accepted ADRs){TEAM_DIRECTIVES}/context_modules/adr.md (team canonical - if configured){REPO_ROOT}/.specify/drafts/adr.md (working copy - Proposed/Discovered)AD.md (if present){REPO_ROOT}/.specify/memory/plan.mdIf no ADRs exist in any location:
{"status":"skipped","reason":"architecture_not_found"} if --json flag usedThis command also detects when architectural decisions in the plan require new ADRs that don't exist:
Escalation Output:
⚠️ Escalation Required
New architectural decisions detected without ADR backing:
- "Caching layer (Redis)" - No ADR covers caching decisions
- "Message queue (RabbitMQ)" - No ADR covers async communication
Run /architect.clarify to document these decisions before proceeding.
{
"escalation": {
"needed": true,
"reason": "new_architectural_decision",
"decisions": [
{
"topic": "Caching layer",
"evidence": "Plan references Redis but no ADR covers caching",
"suggested_action": "Run /architect.clarify to create ADR"
},
{
"topic": "Async communication",
"evidence": "Plan references RabbitMQ but no ADR covers message queuing",
"suggested_action": "Run /architect.clarify to create ADR"
}
]
}
}
This enables the before_plan hook to signal when new architectural decisions are needed.
Example output:
⏭️ Architecture not found (no ADRs in drafts/memory/team)
Skipping validation gracefully
🔍 Architecture Validation Mode (READ-ONLY)
📋 ADR files found: N
- memory: X ADR(s)
- team: Y ADR(s) [if configured]
- drafts: Z ADR(s)
Executing validation checks...
✓ PILLAR_1: Component alignment (0 issues)
✗ PILLAR_2: Interface contracts (2 high-severity)
✓ PILLAR_3: Data model consistency (0 issues)
✓ PILLAR_4: System context (0 issues)
⚠️ PILLAR_5: Functional consistency (3 warnings)
✓ PILLAR_6: Information view (0 issues)
✓ PILLAR_7: Development view (0 issues)
⚠️ Diagram consistency (2 warnings)
Blockers: 0
High-severity: 2
Warnings: 5
--json){
"status": "success",
"action": "validate",
"adr_locations": {
"memory": "{REPO_ROOT}/.specify/memory/adr.md",
"team": "{TEAM_DIRECTIVES}/context_modules/adr.md",
"drafts": "{REPO_ROOT}/.specify/drafts/adr.md"
},
"adr_count": 12,
"findings": {
"blocking": [],
"high_severity": [
{
"check": "PILLAR_2",
"component": "UserAuthService",
"issue": "Interface contract missing from plan",
"description": "Plan references UserAuthService.login() but ADR doesn't define this method"
},
{
"check": "PILLAR_2",
"component": "OrderService",
"issue": "Parameters don't match ADR specification",
"description": "ADR expects createOrder(userId, items) but plan uses createOrder(items) without userId"
}
],
"warnings": [
{
"check": "PILLAR_5",
"component": "Functional view",
"issue": "Missing interaction in AD.md",
"description": "Plan describes user registration flow but AD.md Functional View doesn't include AuthService.register()"
}
],
"diagrams": {
"consistency": "warning",
"issues": [
{
"diagram": "Context View",
"issue": "External system not shown",
"description": "Plan references PaymentGateway but Context View doesn't include this external system"
}
]
}
},
"summary": {
"total_checks": 8,
"passed": 5,
"warnings": 3
}
}
This command is automatically called by the after_plan hook:
{"status":"skipped","reason":"architecture_not_found"} if no architecture exists| Code | Meaning |
|---|---|
| 0 | Success or skipped gracefully |
| 1 | Validation failed with blocking issues |