Create and manage Architecture Decision Records (ADRs) and Architecture Descriptions (AD.md) using Rozanski & Woods methodology.
The Architect extension provides a complete workflow for documenting and maintaining software architecture:
- ADRs (Architecture Decision Records) - Track why decisions were made
- AD.md (Architecture Description) - Document what the system looks like
| Command | Purpose |
|---|---|
/architect.init |
Reverse-engineer ADRs from existing codebase (brownfield) |
/architect.specify |
Interactive PRD exploration to create ADRs (greenfield) |
/architect.clarify |
Refine and validate ADRs through questions |
/architect.implement |
Generate AD.md from ADRs (Rozanski & Woods) |
/architect.analyze |
Validate ADR to AD consistency and quality |
/architect.validate --for-plan |
Validate plan alignment with architecture (READ-ONLY) |
/architect.init # Discover ADRs from code
/architect.clarify # Validate discovered ADRs
/architect.implement # Generate AD.md (uses DAG orchestration)
/architect.analyze # Verify consistency/architect.specify # Create ADRs from PRD
/architect.clarify # Refine ADRs
/architect.implement # Generate AD.md (uses DAG orchestration)
/architect.analyze # Verify consistencyThe /architect.implement command uses a three-phase DAG orchestration approach:
- Analyzes ADRs and detects sub-systems from the ADR index table
- Generates customized DAG per sub-system based on characteristics
- Presents execution plan for user approval
- Saves approved plan to
.specify/architect/state.json
- Generates views per sub-system following the DAG order
- Passes dependency context between views (e.g., Context → Functional → Information)
- Writes per-view outputs to
.specify/architect/views/{subsystem}/{view}.md - Updates progress in state.json for resumability
- Reads all view files from all sub-systems
- Detects and resolves cross-subsystem conflicts using ADRs as source of truth
- Aggregates into unified AD.md
- Applies Security and Performance perspectives
- Moves Accepted ADRs to canonical location
| Sub-system Pattern | DAG Modification |
|---|---|
| Serverless | Deployment view first |
| Event-driven | Include Concurrency view |
| Data-intensive | Information view priority |
| Microservices | Expanded Functional view |
| Monolith | Simplified Functional, skip Concurrency |
The DAG workflow persists state to .specify/architect/state.json, enabling:
- Resumability: Continue from any interruption
- Multi-agent compatibility: Works with Claude, Copilot, Cursor, etc.
- Progress tracking: View-level granularity
Located in templates/views/ and templates/perspectives/:
- 7 view templates (context, functional, information, concurrency, development, deployment, operational)
- 2 perspective templates (security, performance)
Brownfield: /architect.init --> /architect.clarify --> /architect.implement --> /architect.analyze
^ | |
+------------------------+------------------------+
(iterate on findings)
Greenfield: /architect.specify --> /architect.clarify --> /architect.implement --> /architect.analyze
| File | Location | Purpose |
|---|---|---|
| System ADRs | .specify/memory/adr.md |
Architecture Decision Records |
| System AD | AD.md (root) |
Full Architecture Description |
| Feature ADRs | specs/{feature}/adr.md |
Feature-level decisions |
| Feature AD | specs/{feature}/AD.md |
Feature-level architecture |
| Level | Location | ADR File | Architecture Description | Hook Timing |
|---|---|---|---|---|
| System | Main branch | memory/adr.md |
AD.md (root) |
N/A |
| Feature | Feature branch | specs/{feature}/adr.md |
specs/{feature}/AD.md |
before_plan hook |
| Validation | Plan level | READ-ONLY via architect.validate | Validates plan alignment | after_plan hook |
Feature-level ADRs and AD.md are created automatically via extension hooks during /spec.plan execution (if system architecture exists).
The architect extension is bundled by default during project initialization:
specify init my-projectFor manual installation:
specify extension add architectThe analyze command validates consistency between ADRs and AD.md:
| Pass | What it Checks |
|---|---|
| A | ADR quality (completeness, clarity) |
| B | Inter-ADR consistency (conflicts, terminology) |
| C | ADR to AD drift (decisions not in AD) |
| D | AD to ADR drift (components without ADRs) |
| E | AD internal consistency (views align) |
| F | Staleness (placeholders, deprecated refs) |
| G | Feature-system alignment |
- CRITICAL - Constitution violations, security gaps
- HIGH - ADR to AD drift, conflicting decisions
- MEDIUM - Incomplete documentation, staleness
- LOW - Style improvements, minor gaps
## Architecture Analysis Report
### Findings
| ID | Pass | Severity | Location | Summary |
|----|------|----------|----------|---------|
| C1 | ADR->AD Drift | HIGH | ADR-005 | Caching not in Info View |
| D1 | AD->ADR Drift | HIGH | AD.md:3.2 | Redis has no ADR |
### Next Actions
- Run /architect.clarify for ADR quality issues
- Run /architect.implement to sync AD.mdOptional configuration in .specify/extensions/architect/architect-config.yml:
adr:
heuristic: "surprising" # surprising | all | minimal
location: ".specify/memory/adr.md"
views:
default: "core" # core | all | concurrency,operational
analysis:
max_findings: 50
block_on_critical: truecore(default) - Generate the essential 5 views: Context, Functional, Information, Development, Deploymentall- Include all 7 views including Concurrency and Operationalconcurrency,operational- Custom selection (comma-separated), always includes core views
# Default core views
/architect.init "E-commerce platform"
# All views including concurrency and operational
/architect.init --views all "High-throughput trading system"
# Custom selection
/architect.init --views concurrency "Real-time data processing pipeline"surprising(default) - Only document decisions that deviate from obvious ecosystem defaultsall- Document every architectural decisionminimal- Document only high-risk or non-obvious decisions
# Skip documenting obvious choices (PostgreSQL for relational data, React for SPA)
/architect.specify --adr-heuristic surprising "Standard web application"
# Document every decision
/architect.specify --adr-heuristic all "Complex multi-tenant system"
# Minimal documentation
/architect.specify --adr-heuristic minimal "Internal tool with simple requirements"Architecture Decision Records follow the MADR format:
### ADR-001: [Decision Title]
#### Status
Proposed | Accepted | Deprecated | Superseded by ADR-XXX | Discovered
#### Date
YYYY-MM-DD
#### Context
What is the issue we're addressing?
#### Decision
What did we decide?
#### Consequences
##### Positive
- Benefits
##### Negative
- Trade-offs
#### Common Alternatives
##### Option A: [Name]
**Description**: Brief description
**Trade-offs**: Neutral comparisonThe Architecture Description follows Rozanski & Woods with 7 viewpoints:
- Context View (3.1) - System scope and external interactions
- Functional View (3.2) - Internal components and responsibilities
- Information View (3.3) - Data storage and management
- Development View (3.5) - Code organization and CI/CD
- Deployment View (3.6) - Physical environment and infrastructure
- Concurrency View (3.4) - Runtime processes and threads
- Operational View (3.7) - Operations and maintenance
- Security Perspective (4.1) - Security considerations
- Performance Perspective (4.2) - Performance and scalability
Architecture works with specification commands via extension hooks:
/architect.specify --> /architect.clarify --> /architect.implement
|
v
architect extension hooks (before_plan / after_plan)
|
v
/spec.specify --> /spec.plan --> /spec.tasks --> /spec.implement
Hooks only execute when .specify/memory/adr.md exists (architecture detection)
| Hook | When it Runs | Command | Purpose |
|---|---|---|---|
before_plan |
Before plan generation | adlc.architect.specify |
Create feature-level ADRs and AD.md |
after_plan |
After plan generation | adlc.architect.validate |
Validate plan alignment (READ-ONLY) |
The validate command checks plan alignment with architecture:
- Flags:
--for-plan,--json,--system-only,--check-only [check] - Returned Findings:
blocking- Critical issues that must be fixedhigh_severity- Issues that should be fixedwarnings- Recommendations
- 7 PILLAR Checks:
- PILLAR_1: Component ADR alignment
- PILLAR_2: Interface contracts
- PILLAR_3: Data model consistency
- PILLAR_4: System context alignment
- PILLAR_5: Functional consistency
- PILLAR_6: Information view alignment
- PILLAR_7: Development view alignment
- Diagram Consistency: System boundaries and data flows
The command is READ-ONLY and skips gracefully if no architecture exists.
- Rozanski & Woods - Architecture methodology
- MADR - Markdown ADR format
- Issue #36 - Original feature request
MIT