Analyze architecture for consistency between ADRs and AD, completeness, and quality issues. Use when validating generated or refined architecture artifacts, before feature development, during architecture review, or periodically to detect drift.
npx skills add https://github.com/tikalk/adlc-team-skills --skill architect-analyze
Performs a read-only architecture consistency analysis between ADRs (Architecture Decision Records) and AD (Architecture Description). It identifies discrepancies, quality issues, and gaps without modifying any files.
Key analysis dimensions:
This skill validates architecture artifacts for consistency, completeness, and quality.
/architect-implement — Validate generated AD.md/architect-clarify — Verify ADR refinementsDo not use when no architecture artifacts exist; use /architect-init or /architect-specify first. Do not use to create architecture — this is analysis-only.
Consider the user input before proceeding (if not empty):
$ARGUMENTS
Examples:
"system" — Focus on root-level AD.md and adr/ directory only"feature auth" — Focus on specific feature architecture"adrs" — Focus on ADR quality and inter-ADR consistency"views" — Focus on AD.md view completeness and internal consistencyPerform read-only architecture consistency analysis. Identify discrepancies, quality issues, and gaps without modifying any files.
STRICTLY READ-ONLY: Do not modify any files. Output a structured analysis report. Offer remediation suggestions (user must explicitly approve before any follow-up editing commands would be invoked manually).
Constitution Authority: The project constitution (memory/constitution.md) is non-negotiable within this analysis scope. Constitution conflicts are automatically CRITICAL.
Act as an Architecture Analyst validating architecture documentation quality:
Architecture document hierarchy:
| Document | Location | Purpose |
|----------|----------|---------|
| AD.md | Project root | Full Architecture Description (Rozanski & Woods) |
| adr/ | {REPO_ROOT}/.adlc/memory/ | System-level ADRs (individual files) |
| constitution.md | {REPO_ROOT}/.adlc/memory/ | Governance principles and constraints |
Objective: Load all architecture artifacts for analysis
scripts/bash/setup-architect.sh from repo rootAD.md (project root) if exists{REPO_ROOT}/.adlc/memory/adr.md (canonical — Accepted ADRs){REPO_ROOT}/.adlc/drafts/adr/ (working copy — Proposed/Discovered, individual file format){REPO_ROOT}/.adlc/memory/constitution.md if existsspecs/*/AD.md for feature architecturesspecs/*/adr/ADR-*.md for feature ADRs| Artifact | Path | Status |
|----------|------|--------|
| System AD | AD.md | Found/Missing |
| System ADRs (canonical) | {REPO_ROOT}/.adlc/memory/adr.md | Found/Missing |
| System ADRs (drafts) | {REPO_ROOT}/.adlc/drafts/adr/ | Found/Missing |
| Constitution | {REPO_ROOT}/.adlc/memory/constitution.md | Found/Missing |
| Feature ADs | specs/*/AD.md | Count: N |
| Feature ADRs | specs/*/adr/ | Count: N |
Objective: Focus analysis based on user input
| User Input | Scope | Artifacts Analyzed |
|------------|-------|-------------------|
| (empty) | Full | All system artifacts |
| "system" | System only | AD.md, system ADR locations |
| "adrs" | ADR quality | All ADR files |
| "views" | AD completeness | AD.md |
Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
Objective: Validate each ADR against MADR standards
Quality Dimensions:
| Dimension | Check | Severity if Missing |
|-----------|-------|---------------------|
| Context | Problem clearly stated, forces documented | MEDIUM |
| Decision | Actionable, testable decision statement | HIGH |
| Positive Consequences | Benefits documented | MEDIUM |
| Negative Consequences | Trade-offs acknowledged | HIGH |
| Risks | Identified with mitigations | MEDIUM |
| Alternatives | At least 2 options with neutral trade-offs | HIGH |
| Status | Valid status (Proposed/Accepted/Deprecated/Superseded/Discovered) | LOW |
| Constitution Alignment | MUST principles complied with | CRITICAL |
ADR Quality Checklist:
For each ADR, verify:
Objective: Detect conflicts and inconsistencies between ADRs
Checks:
Objective: Detect ADR decisions not reflected in AD.md
Checks:
| ADR Element | Expected in AD.md | View/Section |
|-------------|-------------------|--------------|
| System architecture style | Context View | 3.1 |
| Database choice | Information View | 3.3 |
| API style | Functional View | 3.2 |
| Authentication approach | Security Perspective | 4.1 |
| Deployment platform | Deployment View | 3.6 |
| CI/CD approach | Development View | 3.5 |
| Scaling strategy | Performance Perspective | 4.2 |
| Caching strategy | Information View | 3.3 |
Detection Logic:
For each ADR:
Objective: Detect AD.md elements without supporting ADRs
Checks:
Objective: Validate AD.md coherence across views
Checks:
.adlc/architect/state.json exists and reports views as "completed".adlc/architect/views/ directory exists DAG State Inconsistency Detected:
- State reports: [N] views completed
- Files on disk: [M] view files found
- Missing files: [list of missing views]
- Recommendation: Regenerate views or reset state.json
Objective: Identify outdated references and placeholders
Checks:
[TODO], [TBD], [PLACEHOLDER] markers[SYSTEM_NAME], [STAKEHOLDER_*] unfilled???, ..., <placeholder> patternsObjective: Validate feature architecture fits within system boundaries
Checks:
Severity Criteria:
| Severity | Criteria | Examples |
|----------|----------|----------|
| CRITICAL | Constitution violation, security/data integrity gap, missing core ADR | ADR violates MUST principle, major component undocumented |
| HIGH | ADR to AD drift affecting implementation, conflicting ADRs, missing alternatives | Database choice in ADR but wrong DB in AD, two ADRs conflict |
| MEDIUM | Incomplete consequences, staleness, terminology drift, missing optional views | ADR lacks negative consequences, TODO placeholders |
| LOW | Style improvements, minor documentation gaps, optional details | Inconsistent formatting, minor wording issues |
Output Format:
## Architecture Analysis Report
### Analysis Summary
| Attribute | Value |
|-----------|-------|
| **Mode** | [Full/System/Feature/ADRs/Views] |
| **Scope** | [Description of what was analyzed] |
| **Files Analyzed** | [List of files] |
| **Analysis Date** | [Current date] |
### Findings
| ID | Pass | Severity | Location | Summary | Recommendation |
|----|------|----------|----------|---------|----------------|
| A1 | ADR Quality | MEDIUM | ADR-003 | Missing negative consequences | Add trade-offs section |
| B1 | Inter-ADR | HIGH | ADR-002, ADR-005 | Conflicting database choices | Resolve PostgreSQL vs MongoDB conflict |
| C1 | ADR->AD Drift | HIGH | ADR-005 | Caching decision not in Information View | Update AD.md 3.3 |
| D1 | AD->ADR Drift | HIGH | AD.md:3.2 | Redis component has no ADR | Create ADR for cache choice |
| E1 | AD Consistency | MEDIUM | AD.md:3.2/3.6 | Component naming mismatch | Standardize "AuthService" naming |
| F1 | Staleness | LOW | AD.md:3.1 | [SYSTEM_NAME] placeholder | Fill in system name |
| G1 | Feature Align | HIGH | specs/auth/adr.md | VIOLATION flag unresolved | Document override justification |
### Coverage Metrics
| Metric | System | Feature: auth | Feature: payments |
|--------|--------|---------------|-------------------|
| ADR Count | 13 | 3 | 2 |
| AD Views Complete | 5/7 | 3/5 | 3/5 |
| ADR->AD Coverage | 85% | 100% | 67% |
| AD->ADR Coverage | 92% | 100% | 100% |
| Quality Score | 78% | 85% | 72% |
### Constitution Alignment
| Status | Count | Details |
|--------|-------|---------|
| Compliant | [N] | ADRs following MUST principles |
| Violations | [N] | ADRs violating MUST principles (CRITICAL) |
| Deviations | [N] | Justified SHOULD principle deviations |
### Issue Distribution
| Severity | Count |
|----------|-------|
| CRITICAL | [N] |
| HIGH | [N] |
| MEDIUM | [N] |
| LOW | [N] |
### Next Actions
Based on findings, recommended actions:
**If CRITICAL issues exist:**
- **Immediate**: Resolve constitution violations before proceeding
- Command: `/architect-clarify` to address ADR compliance
**If HIGH ADR quality issues:**
- **Refine**: Address missing alternatives and consequences
- Command: `/architect-clarify` to improve ADR quality
**If ADR->AD drift detected:**
- **Sync AD**: Update AD.md to reflect ADR decisions
- Command: `/architect-implement` to regenerate views
**If AD->ADR drift detected:**
- **Document**: Create missing ADRs for undocumented decisions
- Command: `/architect-specify` or `/architect-init` to add ADRs
**If feature alignment issues:**
- **Align**: Resolve feature-system boundary violations
- Command: Run `/architect-specify` or `/architect-init` to create missing ADRs
After presenting the report, ask:
> "Would you like me to suggest specific remediation steps for the top [N] issues? I can provide detailed guidance for each finding, though I will not make any changes automatically."
If issues are found:
/architect-clarify to refine ADRs (quality issues, missing consequences/alternatives, constitution violations)./architect-implement to regenerate AD.md when ADR-to-AD drift is detected.For missing ADRs or feature boundary issues, use /architect-specify or /architect-init as appropriate.
Concrete outputs of this skill:
Take tikalk/architect-analyze from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.