Architecture Documentation Auditor
A systematic audit system that evaluates Architecture Documentation against a comprehensive 188-item viewpoint-based checklist, detecting gaps, classifying severity, identifying technical debt signals, scanning for architecture anti-patterns, and generating actionable remediation roadmaps. Implements the GAP-AUDIT pattern (PATTERN-08) to produce CONTRACT-07 compliant GAP-INVENTORY output with Architecture Health Score extensions.
1. Purpose
This skill provides 12 core capabilities:
| # |
Capability |
Phase |
Description |
| 1 |
Framework Detect |
1 |
Identify architecture framework (TOGAF, C4, arc42, IEEE 42010) |
| 2 |
Document Parse |
1 |
Extract architecture structure, diagrams, and decision records |
| 3 |
Viewpoint Map |
2 |
Apply 14-viewpoint coverage framework to document sections |
| 4 |
Item-by-Item Verify |
3 |
Check each of 188 checklist items against content |
| 5 |
Gap Detect |
3 |
Identify missing, incomplete, or inconsistent elements |
| 6 |
Classify Gap Type |
4 |
Categorize gaps using 6-type taxonomy |
| 7 |
Score Severity |
4 |
Apply RUBRIC-07 (impact, likelihood, detectability) |
| 8 |
Anti-Pattern Scan |
5 |
Detect 25 architecture anti-patterns |
| 9 |
Debt Signal Detect |
5 |
Identify 25+ technical debt indicators |
| 10 |
Quality Attribute Validate |
4 |
Verify ISO 25010 quality attribute coverage |
| 11 |
Remediate Suggest |
5 |
Generate fix recommendations with effort estimates |
| 12 |
Synthesize Report |
6 |
Produce GAP-INVENTORY + Health Score + Debt Roadmap |
2. When to Use
Ideal for:
- Architecture review gates before implementation
- ADR validation before development starts
- C4 diagram completeness verification
- Technical debt assessment and tracking
- Pre-implementation readiness check
- Governance and compliance audits
- Design document handoff to development teams
- Architecture decision board preparation
- System modernization planning
- Security architecture review
Avoid when:
- Document is code, not architecture (use code review)
- Operational runbook review (use operations auditor)
- Early ideation phase (architecture not yet defined)
- Quick clarifying questions (formal audit adds overhead)
- Infrastructure-as-Code review (use IaC auditor)
- API specification only (use API spec auditor)
3. Parameters
| Parameter |
Type |
Required |
Default |
Description |
document |
string |
yes |
— |
Architecture document content or file reference |
document_type |
enum |
no |
design_doc |
adr | design_doc | system_context | container | component | deployment | sequence | data_flow |
framework |
enum |
no |
auto |
togaf | c4 | arc42 | ieee_42010 | custom | auto |
audit_depth |
enum |
no |
standard |
surface | standard | exhaustive |
viewpoints |
list |
no |
core_10 |
List of viewpoint IDs (V1-V14) to validate |
quality_attributes |
list |
no |
all |
ISO 25010 attributes to validate |
include_debt_assessment |
boolean |
no |
true |
Whether to scan for technical debt indicators |
include_anti_patterns |
boolean |
no |
true |
Whether to scan for architecture anti-patterns |
governance_context |
enum |
no |
team |
enterprise | team | project |
output_format |
enum |
no |
full |
full | executive | debt_roadmap_only |
Document Type Effects
| Type |
Primary Viewpoints |
Checklist Focus |
| adr |
V10 |
Decision structure, rationale, consequences |
| design_doc |
V1-V10 |
Full viewpoint coverage |
| system_context |
V1, V6, V7 |
External actors, integrations, boundaries |
| container |
V2, V5, V6 |
Technology choices, communication patterns |
| component |
V3, V6 |
Internal structure, interfaces |
| deployment |
V4, V8 |
Infrastructure, scaling, operations |
| sequence |
V6 |
API flows, interaction patterns |
| data_flow |
V5, V7 |
Data stores, flows, security |
Audit Depth Effects
| Depth |
Behavior |
| surface |
Critical items only (~60 items), structural gaps, no anti-patterns |
| standard |
Full checklist for relevant viewpoints, anti-patterns, standard remediation |
| exhaustive |
All viewpoints including conditional, deep anti-pattern analysis, debt indicators, detailed remediation |
Governance Context Effects
| Context |
Compliance Level |
Output Focus |
| enterprise |
Full compliance frameworks (SOC2, GDPR, PCI-DSS) |
Governance reporting, compliance matrix |
| team |
Standard architecture practices |
Team handoff, implementation readiness |
| project |
Minimal viable documentation |
Quick assessment, critical gaps only |
4. Six-Phase Workflow
Phase 1: Document Intake & Framework Detection
Purpose: Load document and establish audit context.
Steps:
- Receive architecture document (inline or file reference)
- Detect architecture framework:
- C4: Look for Context/Container/Component/Code levels
- arc42: Look for 12-section template structure
- TOGAF: Look for ADM phase artifacts
- IEEE 42010: Look for formal viewpoint definitions
- Load
architecture-checklist.md reference
- Calibrate checklist based on
document_type:
- Filter items by viewpoint applicability
- Adjust severity levels for document type
- Set critical items that must be present
- Parse document to identify structure:
- Extract section headers and hierarchy
- Identify diagram references and types
- Note ADRs (Architecture Decision Records)
- Detect technology stack references
- Load
viewpoint-catalog.md for structural validation
- Initialize gap tracking structure with empty findings
Techniques Used:
document_structure_extraction - Parse document hierarchy
framework_detection - Identify architecture methodology
checklist_calibration - Adjust criteria for context
Quality Gate: Framework identified; checklist calibrated for document type; structure parsed with sections identified
Output: Calibrated checklist (N items) + Document structure map + Detected framework
Phase 2: Viewpoint Mapping & Scope Definition
Purpose: Map document sections to architecture viewpoints and identify structural gaps.
Steps:
Load viewpoint framework from viewpoint-catalog.md:
Core Viewpoints (Always Assess):
- V1: Context & Scope (system boundary, external actors)
- V2: Container Architecture (major components, technology choices)
- V3: Component Design (internal structure, interfaces)
- V4: Deployment Topology (infrastructure, scaling)
- V5: Data Architecture (data stores, flows, ownership)
- V6: Integration & APIs (contracts, protocols, versioning)
- V7: Security Architecture (auth, encryption, compliance)
- V8: Operational Concerns (monitoring, SLOs, runbooks)
- V9: Cross-Cutting Concerns (logging, caching, config)
- V10: Decision Record (ADRs, rationale, consequences)
Conditional Viewpoints (If Applicable):
- V11: Multi-tenancy (SaaS/multi-tenant systems)
- V12: Event Architecture (event-driven systems)
- V13: Migration Path (legacy modernization)
- V14: Compliance Matrix (regulated industries)
Map each document section to viewpoints:
- Assign based on content, not just header
- Flag orphan sections (don't fit any viewpoint)
- Flag missing viewpoints (no sections mapped)
Identify structural gaps:
- Core viewpoint with no coverage = CRITICAL structural gap
- Core viewpoint with partial coverage = HIGH structural gap
- Conditional viewpoint missing when applicable = MEDIUM gap
Check for applicable conditional viewpoints:
- Multi-tenancy: Evidence of tenant-based requirements
- Event architecture: Event-driven patterns mentioned
- Migration: Legacy system references
- Compliance: Regulatory requirements mentioned
Calculate initial coverage score per viewpoint
Techniques Used:
completeness_verification (CAT-PR-GA) - Verify all viewpoints addressed
viewpoint_mapping - Map sections to architectural concerns
Quality Gate: All applicable viewpoints assessed; structural gaps flagged
Output: Viewpoint coverage map with scores and structural gap list
Phase 3: Systematic Coverage Verification
Purpose: Verify each checklist item against document content.
Steps:
For each checklist item (V1-01 through V10-20):
1. LOCATE RELEVANT SECTION
└─ Based on viewpoint mapping from Phase 2
2. ASSESS PRESENCE
├─ PRESENT: Item clearly addressed
├─ PARTIAL: Item mentioned but incomplete
└─ ABSENT: No evidence of item
3. EVALUATE QUALITY (if present)
├─ CLEAR: Unambiguous and actionable
├─ AMBIGUOUS: Multiple interpretations possible
├─ INCONSISTENT: Contradicts other content
├─ INCOMPLETE: Missing key details
└─ OUTDATED: Stale or deprecated references
4. RECORD EVIDENCE
├─ Location: Section/diagram reference
├─ Quote: Supporting text from document
└─ Assessment: Pass/fail with rationale
5. FLAG FOR GAP CLASSIFICATION (if needed)
└─ Any non-PRESENT or non-CLEAR items
Verification Rules by Viewpoint:
| Viewpoint |
Items |
Critical Items |
Verification Approach |
| V1: Context |
V1-01 to V1-15 |
V1-01, V1-02, V1-03 |
Check boundary definition, external actors |
| V2: Container |
V2-01 to V2-25 |
V2-01, V2-02, V2-05 |
Verify technology choices documented |
| V3: Component |
V3-01 to V3-18 |
V3-01, V3-02 |
Check internal structure clarity |
| V4: Deployment |
V4-01 to V4-22 |
V4-01, V4-05, V4-10 |
Verify infrastructure defined |
| V5: Data |
V5-01 to V5-18 |
V5-01, V5-02, V5-05 |
Check data stores and flows |
| V6: Integration |
V6-01 to V6-15 |
V6-01, V6-02, V6-05 |
Verify API contracts exist |
| V7: Security |
V7-01 to V7-25 |
V7-01, V7-02, V7-05, V7-10 |
Check auth, encryption, audit |
| V8: Operations |
V8-01 to V8-18 |
V8-01, V8-05, V8-10 |
Verify monitoring, SLOs defined |
| V9: Cross-Cutting |
V9-01 to V9-12 |
V9-01, V9-05 |
Check logging, config patterns |
| V10: Decisions |
V10-01 to V10-20 |
V10-01, V10-02, V10-05 |
Verify ADR structure and coverage |
Techniques Used:
completeness_verification (CAT-PR-GA) - Check presence of each item
negative_space_analysis (CAT-PR-GA) - Identify what's NOT documented
consistency_check (CAT-PR-ECR) - Cross-reference between viewpoints
Quality Gate: 100% of applicable checklist items evaluated
Output: Verification matrix with item-level results and evidence
Phase 4: Quality Attribute Validation
Purpose: Validate coverage of ISO 25010 quality attributes.
Steps:
4.1 Quality Attribute Mapping
Map document content to quality attributes from quality-attributes.md:
| Quality Attribute |
Primary Viewpoints |
Validation Criteria |
| Performance |
V4, V5 |
Latency targets, throughput requirements, resource limits |
| Scalability |
V4, V2 |
Scaling strategy, elasticity approach, capacity planning |
| Security |
V7, V6 |
Auth mechanisms, encryption, audit logging, compliance |
| Reliability |
V8, V4 |
Availability targets, fault tolerance, DR strategy |
| Maintainability |
V3, V10 |
Modularity, testability, decision rationale |
| Interoperability |
V6, V1 |
API standards, protocol choices, versioning |
| Portability |
V4, V2 |
Platform dependencies, abstraction layers |
| Usability |
V6, V10 |
API ergonomics, developer experience |
4.2 Coverage Assessment
For each quality attribute:
- Identify explicit coverage in primary viewpoints
- Check for implicit coverage in secondary viewpoints
- Assess coverage level: EXPLICIT / IMPLICIT / MISSING
- Note measurement approaches if present
4.3 Gap Identification
Flag quality attribute gaps:
- MISSING in primary viewpoint = HIGH gap
- MISSING in all viewpoints = CRITICAL gap for regulated contexts
Techniques Used:
quality_attribute_validation - Map concerns to ISO 25010
coverage_assessment - Evaluate attribute coverage
Quality Gate: All quality attributes assessed with coverage level
Output: Quality attribute coverage matrix
Phase 5: Technical Debt & Anti-Pattern Detection
Purpose: Identify technical debt signals and architecture anti-patterns.
Steps:
5.1 Gap Classification
For each gap identified in Phases 3-4, apply gap taxonomy (from gap-taxonomy.md):
IS ELEMENT PRESENT?
├─ NO → MISSING
└─ YES
├─ IS IT COMPLETE?
│ ├─ NO → INCOMPLETE
│ └─ YES
│ ├─ DOES IT CONTRADICT OTHER CONTENT?
│ │ ├─ YES → INCONSISTENT
│ │ └─ NO
│ │ ├─ IS IT CLEAR AND UNAMBIGUOUS?
│ │ │ ├─ NO → AMBIGUOUS
│ │ │ └─ YES
│ │ │ ├─ IS IT TECHNICALLY CORRECT?
│ │ │ │ ├─ NO → INCORRECT
│ │ │ │ └─ YES
│ │ │ │ └─ IS IT CURRENT?
│ │ │ │ ├─ NO → OUTDATED
│ │ │ │ └─ YES → No gap
5.2 Severity Scoring
Apply SEVERITY-SCORING (RUBRIC-07) with three dimensions:
| Dimension |
Weight |
Scale |
| Impact |
0.5 |
1=Low, 2=Medium, 3=High, 4=Critical |
| Likelihood |
0.3 |
1=Rare, 2=Possible, 3=Likely, 4=Certain |
| Detectability |
0.2 |
1=Obvious, 2=Moderate, 3=Difficult, 4=Hidden |
Calculation:
severity_score = (impact × 0.5) + (likelihood × 0.3) + (detectability × 0.2)
CRITICAL: score >= 3.5
HIGH: 2.5 <= score < 3.5
MEDIUM: 1.5 <= score < 2.5
LOW: score < 1.5
5.3 Architecture Anti-Pattern Scan
If include_anti_patterns is true, scan for 25 patterns from anti-patterns-catalog.md:
Structural Anti-Patterns:
| ID |
Anti-Pattern |
Severity |
Detection Signal |
| AA-01 |
Big Ball of Mud |
CRITICAL |
No clear component boundaries |
| AA-02 |
Distributed Monolith |
CRITICAL |
Microservices with tight coupling |
| AA-03 |
Database Monolith |
HIGH |
All services sharing single database |
| AA-04 |
God Service |
HIGH |
One service handling everything |
| AA-05 |
Circular Dependencies |
CRITICAL |
A depends on B depends on A |
| AA-06 |
Golden Hammer |
MEDIUM |
Same tech used regardless of fit |
| AA-07 |
Vendor Lock-in Blindness |
HIGH |
No abstraction over proprietary services |
| AA-08 |
Accidental Complexity |
HIGH |
Over-engineering indicators |
Documentation Anti-Patterns:
| ID |
Anti-Pattern |
Severity |
Detection Signal |
| AA-09 |
Diagram Divorce |
CRITICAL |
Diagrams don't match text |
| AA-10 |
ADR Amnesia |
HIGH |
Decisions made without records |
| AA-11 |
Stale Blueprints |
HIGH |
Docs reference deprecated systems |
| AA-12 |
View Vacuum |
CRITICAL |
Missing entire viewpoint |
| AA-13 |
C4 Confusion |
MEDIUM |
Mixed abstraction levels in diagrams |
| AA-14 |
Prose Overload |
MEDIUM |
Walls of text, no diagrams |
| AA-15 |
Technology Tourism |
LOW |
Tech name-dropping without rationale |
| AA-16 |
Abstraction Allergy |
MEDIUM |
Only code-level detail, no conceptual |
Operational Anti-Patterns:
| ID |
Anti-Pattern |
Severity |
Detection Signal |
| AA-17 |
Observability Omission |
HIGH |
No monitoring/alerting strategy |
| AA-18 |
SLO Silence |
HIGH |
No reliability targets |
| AA-19 |
Deployment Darkness |
CRITICAL |
No deployment documentation |
| AA-20 |
Capacity Blindness |
HIGH |
No scaling strategy |
| AA-21 |
Runbook Roulette |
MEDIUM |
No operational procedures |
Security Anti-Patterns:
| ID |
Anti-Pattern |
Severity |
Detection Signal |
| AA-22 |
Trust Assumption |
CRITICAL |
"Internal network is secure" |
| AA-23 |
Auth Afterthought |
HIGH |
Security bolted on later |
| AA-24 |
Secret Scatter |
CRITICAL |
Credentials in configs/code |
| AA-25 |
Compliance Complacency |
HIGH |
No compliance mapping |
5.4 Technical Debt Detection
If include_debt_assessment is true, scan for indicators from technical-debt-indicators.md:
| Category |
Indicators |
Severity Range |
| Architectural Debt |
Shared databases, sync coupling, missing abstractions |
HIGH-CRITICAL |
| Documentation Debt |
Stale diagrams, missing rationale, undocumented interfaces |
MEDIUM-HIGH |
| Infrastructure Debt |
Manual deployments, missing DR, hardcoded config |
MEDIUM-HIGH |
| Security Debt |
Undocumented auth, missing encryption, no audit strategy |
HIGH-CRITICAL |
| API Debt |
Breaking changes, no versioning, inconsistent contracts |
MEDIUM-HIGH |
5.5 Remediation Matching
Match each gap to remediation pattern:
| Gap Type |
Primary Pattern |
Action |
| MISSING |
Add Content |
Write new section using template |
| INCOMPLETE |
Expand Content |
Fill in missing details |
| INCONSISTENT |
Reconcile Content |
Resolve contradictions |
| AMBIGUOUS |
Clarify Content |
Add specificity/metrics |
| INCORRECT |
Correct Content |
Fix technical errors |
| OUTDATED |
Update Content |
Refresh stale information |
Effort Estimation:
| Effort Level |
Definition |
Time Range |
| trivial |
Quick fix, obvious solution |
< 30 min |
| small |
Clear scope, single viewpoint |
30 min - 2 hours |
| medium |
Multiple viewpoints or research needed |
2 - 8 hours |
| large |
Significant rework or stakeholder input |
1+ days |
Techniques Used:
severity_scoring (RUBRIC-07) - Score gaps by impact
full_consistency_matrix (CAT-PR-ECR) - Cross-reference for inconsistencies
anti_pattern_detection - Match known failure patterns
debt_signal_detection - Identify technical debt indicators
Quality Gate: All gaps classified with type and severity; anti-patterns and debt signals detected
Output: Classified gap list + Anti-pattern findings + Debt indicators
Phase 6: Synthesis & Governance Reporting
Purpose: Produce final GAP-INVENTORY artifact with Architecture Health Score.
Steps:
6.1 GAP-INVENTORY Compilation
Compile all findings into CONTRACT-07 compliant structure:
- Populate
source_reference with document identifier
- Set
source_type to "architecture"
- Build
audit_criteria with viewpoint-based checklist
- Compile
gaps array with all classified gaps
- Add
anti_patterns array if detected
- Add
technical_debt section with indicators
- Calculate
summary statistics
6.2 Architecture Health Score
Calculate overall architecture health:
<architecture_health>
<overall_score>[0-100]</overall_score>
<by_viewpoint>
<!-- Score per viewpoint -->
</by_viewpoint>
<by_quality_attribute>
<!-- Coverage per ISO 25010 attribute -->
</by_quality_attribute>
<technical_debt_summary>
<!-- Debt indicator counts by category -->
</technical_debt_summary>
<c4_maturity>
<!-- Completeness of C4 levels if applicable -->
</c4_maturity>
</architecture_health>
Health Score Calculation:
viewpoint_score = (items_passed / items_total) × 100 per viewpoint
overall_score = weighted_average(viewpoint_scores) - severity_penalties
Severity Penalties:
- CRITICAL gap: -10 points
- HIGH gap: -5 points
- Anti-pattern: -3 points
- Debt indicator: -2 points
Health Status Thresholds:
| Status |
Score Range |
Interpretation |
| HEALTHY |
80-100 |
Ready for implementation |
| ADEQUATE |
60-79 |
Minor gaps, proceed with awareness |
| AT_RISK |
40-59 |
Significant gaps, address before proceeding |
| CRITICAL |
0-39 |
Major gaps, not ready for implementation |
6.3 Summary Statistics
Generate:
total_gaps: Count of all gaps
by_severity: {critical: N, high: N, medium: N, low: N}
by_category: {missing: N, incomplete: N, inconsistent: N, ...}
by_viewpoint: Gap count per viewpoint
overall_assessment: Based on health score
blocking_issues: List of gap IDs that must be fixed
coverage_score: Percentage of checklist items passed
Assessment Thresholds:
| Assessment |
Criteria |
| critical_issues |
Any CRITICAL gap OR overall_score < 40 |
| significant_gaps |
No CRITICAL but score 40-59 OR >3 HIGH gaps |
| minor_issues |
Score 60-79, only MEDIUM/LOW gaps |
| acceptable |
Score 80-89, few gaps |
| excellent |
Score 90+, minimal gaps |
6.4 Executive Summary (if requested)
Generate stakeholder-friendly summary:
- At-a-glance metrics table
- Viewpoint coverage spider chart data
- Quality attribute coverage radar chart data
- Top 3 strengths
- Top 3 critical issues
- Risk heat map data
- Recommended next actions
6.5 Debt Remediation Roadmap (if requested)
Generate prioritized technical debt paydown plan:
- Priority 1: Immediate (blocking issues)
- Priority 2: Short-term (before implementation)
- Priority 3: Medium-term (during implementation)
- Priority 4: Long-term (continuous improvement)
- Effort/impact quadrant
- Quick wins identification
- Strategic investments
6.6 Output Selection
Based on output_format parameter:
- full: GAP-INVENTORY + Health Report + Debt Roadmap
- executive: Executive Summary only
- debt_roadmap_only: Technical Debt Roadmap only
Techniques Used:
artifact_synthesis - Compile structured output
health_score_calculation - Compute architecture health
stakeholder_communication - Tailor for audience
Quality Gate: Output validates against CONTRACT-07 schema with architecture extensions
Output: GAP-INVENTORY artifact + Architecture Health Score + requested summaries
5. Gap Taxonomy
The 6 Gap Types
| # |
Type |
Definition |
Architecture Detection Signal |
Remediation |
| 1 |
MISSING |
Required element completely absent |
No viewpoint coverage, no ADRs found, deployment undocumented |
Add content |
| 2 |
INCOMPLETE |
Present but lacking required detail |
TBD in diagrams, partial API specs, rationale missing |
Expand content |
| 3 |
INCONSISTENT |
Contradicts other sections |
Context shows 5 services, container shows 8; ADR contradicts implementation |
Reconcile content |
| 4 |
AMBIGUOUS |
Multiple interpretations possible |
"Scalable architecture" without metrics, "secure by design" without controls |
Clarify content |
| 5 |
INCORRECT |
Technically wrong information |
References deprecated API, shows removed service, wrong technology |
Correct content |
| 6 |
OUTDATED |
Was correct but no longer current |
Shows v1 API when v3 current, references decommissioned database |
Update content |
Reference: See references/architecture-checklist.md for detailed detection heuristics per checklist item.
6. Output Specifications
6.1 GAP-INVENTORY Format
Aligns with CONTRACT-07 from artifact-contracts.yaml with architecture extensions.
<?xml version="1.0" encoding="UTF-8"?>
<gap_inventory contract="CONTRACT-07" version="1.0">
<metadata>
<artifact_id>GI-ARCH-[YYYY-MM-DD]-[5-char-hash]</artifact_id>
<contract_type>GAP-INVENTORY</contract_type>
<created_at>[ISO 8601]</created_at>
<created_by>architecture-doc-auditor</created_by>
<confidence>[0.0-1.0]</confidence>
<provenance>
<source_artifact>[Document identifier]</source_artifact>
<audit_date>[ISO 8601 date]</audit_date>
<audit_depth>[surface|standard|exhaustive]</audit_depth>
<document_type>[adr|design_doc|system_context|...]</document_type>
<framework_detected>[togaf|c4|arc42|ieee_42010|custom]</framework_detected>
<checklist_version>1.0</checklist_version>
<items_checked>[N]</items_checked>
<viewpoints_assessed>[list]</viewpoints_assessed>
</provenance>
</metadata>
<source_reference>[Document identifier]</source_reference>
<source_type>architecture</source_type>
<audit_criteria>
<checklist_reference>architecture-checklist.md v1.0</checklist_reference>
<viewpoint_framework>viewpoint-catalog.md v1.0</viewpoint_framework>
<criteria_list>
<criterion id="[V1-01]" viewpoint="V1">[Item description]</criterion>
<!-- All checked items -->
</criteria_list>
<coverage_scope>[What this audit covered]</coverage_scope>
</audit_criteria>
<gaps>
<gap id="GAP-001">
<category>[missing|incomplete|inconsistent|ambiguous|incorrect|outdated]</category>
<severity>[critical|high|medium|low]</severity>
<severity_score>
<impact>[1-4]</impact>
<likelihood>[1-4]</likelihood>
<detectability>[1-4]</detectability>
<composite>[calculated]</composite>
</severity_score>
<viewpoint>[V1-V14]</viewpoint>
<checklist_ref>[V1-01]</checklist_ref>
<location>[Document section/diagram]</location>
<description>[Gap description]</description>
<evidence>[What indicates this gap]</evidence>
<impact>[Consequence if not addressed]</impact>
<remediation>
<recommendation>[How to fix]</recommendation>
<effort>[trivial|small|medium|large]</effort>
<priority>[immediate|short_term|medium_term|long_term]</priority>
</remediation>
</gap>
</gaps>
<anti_patterns>
<pattern id="AA-02">
<name>Distributed Monolith</name>
<severity>CRITICAL</severity>
<instances>
<instance location="[section]">[Evidence quote]</instance>
</instances>
<remediation>[How to address]</remediation>
</pattern>
</anti_patterns>
<technical_debt>
<indicator id="TD-A01">
<category>architectural</category>
<name>Shared database between services</name>
<severity>HIGH</severity>
<evidence>[Where detected]</evidence>
<remediation_cost>large</remediation_cost>
</indicator>
</technical_debt>
<architecture_health>
<overall_score>[0-100]</overall_score>
<overall_status>[HEALTHY|ADEQUATE|AT_RISK|CRITICAL]</overall_status>
<by_viewpoint>
<viewpoint id="V1" name="Context & Scope" score="[0-100]" status="[status]"/>
<viewpoint id="V2" name="Container" score="[0-100]" status="[status]"/>
<!-- All assessed viewpoints -->
</by_viewpoint>
<by_quality_attribute>
<attribute name="Performance" coverage="[EXPLICIT|IMPLICIT|MISSING]"/>
<attribute name="Security" coverage="[EXPLICIT|IMPLICIT|MISSING]"/>
<!-- All quality attributes -->
</by_quality_attribute>
<technical_debt_summary>
<total_indicators>[N]</total_indicators>
<by_category>
<architectural>[N]</architectural>
<documentation>[N]</documentation>
<infrastructure>[N]</infrastructure>
<security>[N]</security>
<api>[N]</api>
</by_category>
</technical_debt_summary>
<c4_maturity>
<level_1_complete>[true|false]</level_1_complete>
<level_2_complete>[true|false]</level_2_complete>
<level_3_complete>[true|false]</level_3_complete>
<level_4_complete>[true|false]</level_4_complete>
</c4_maturity>
</architecture_health>
<summary>
<total_gaps>[N]</total_gaps>
<by_severity>
<critical>[N]</critical>
<high>[N]</high>
<medium>[N]</medium>
<low>[N]</low>
</by_severity>
<by_category>
<missing>[N]</missing>
<incomplete>[N]</incomplete>
<inconsistent>[N]</inconsistent>
<ambiguous>[N]</ambiguous>
<incorrect>[N]</incorrect>
<outdated>[N]</outdated>
</by_category>
<by_viewpoint>
<v1>[N]</v1>
<v2>[N]</v2>
<!-- Gap count per viewpoint -->
</by_viewpoint>
<anti_patterns_detected>[N]</anti_patterns_detected>
<debt_indicators_detected>[N]</debt_indicators_detected>
<overall_assessment>[critical_issues|significant_gaps|minor_issues|acceptable|excellent]</overall_assessment>
<blocking_issues>
<issue ref="GAP-001">[Brief description]</issue>
</blocking_issues>
<coverage_score>
<items_passed>[N]</items_passed>
<items_total>[N]</items_total>
<percentage>[X%]</percentage>
</coverage_score>
</summary>
</gap_inventory>
6.2 Executive Summary Format
See templates/architecture-health-report.md for complete template.
6.3 Debt Remediation Roadmap Format
See templates/debt-remediation-roadmap.md for complete template.
7. Quality Gates
| # |
Gate |
Criterion |
Phase |
| 1 |
Framework Detected |
Architecture methodology identified or marked as custom |
1 |
| 2 |
Checklist Calibrated |
Checklist adjusted for document type with applicable items |
1 |
| 3 |
Document Parsed |
All sections identified with structure map created |
1 |
| 4 |
Viewpoints Mapped |
All applicable viewpoints assessed with scores |
2 |
| 5 |
Items Verified |
100% of applicable checklist items evaluated |
3 |
| 6 |
Quality Attributes Checked |
All ISO 25010 attributes assessed for coverage |
4 |
| 7 |
Gaps Classified |
All gaps assigned type from 6-type taxonomy |
5 |
| 8 |
Severity Scored |
All gaps scored using 3-dimension RUBRIC-07 |
5 |
| 9 |
Anti-Patterns Scanned |
All 25 anti-patterns checked (if enabled) |
5 |
| 10 |
Debt Indicators Scanned |
All debt categories checked (if enabled) |
5 |
| 11 |
Health Score Calculated |
Overall architecture health score computed |
6 |
| 12 |
Output Validated |
GAP-INVENTORY conforms to CONTRACT-07 schema |
6 |
8. Workflow Integration
This skill serves as a quality gate in the architecture development workflow:
┌─────────────────────────────────────┐
│ ARCHITECTURE DOC AUDITOR │ ◀── THIS SKILL
│ │
└────────────────┬────────────────────┘
│
│ Input: Architecture Document
│
▼
┌─────────────────────────────────────┐
│ Phase 1: Intake & Framework │
│ • Detect framework (C4/arc42/...) │
│ • Load architecture-checklist │
│ • Parse document structure │
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 2: Viewpoint Mapping │
│ • Apply 14-viewpoint framework │
│ • Map sections to viewpoints │
│ • Flag structural gaps │
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 3: Coverage Verification │ ◀── Perfect Recall techniques
│ • Check 188 checklist items │ completeness_verification
│ • Record presence and quality │ consistency_check
│ • Cite evidence locations │ negative_space_analysis
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 4: Quality Attributes │ ◀── ISO 25010 validation
│ • Map to 8 quality attributes │
│ • Assess coverage level │
│ • Flag quality gaps │
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 5: Debt & Anti-Patterns │ ◀── RUBRIC-07 severity scoring
│ • Classify gaps (6 types) │
│ • Score severity (3 dimensions) │
│ • Scan 25 anti-patterns │
│ • Detect 25+ debt indicators │
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Phase 6: Synthesis │ ◀── CONTRACT-07 + Health Score
│ • Compile GAP-INVENTORY │
│ • Calculate Architecture Health │
│ • Generate remediation roadmap │
└────────────────┬────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ OUTPUT: GAP-INVENTORY │
│ + Architecture Health Score │
│ + Technical Debt Roadmap │
└─────────────────────────────────────┘
Artifact Flow
| This Skill Produces |
Consumed By |
| GAP-INVENTORY (CONTRACT-07) |
Architecture review board, governance |
| Architecture Health Score |
Executive reporting, readiness gates |
| Debt Remediation Roadmap |
Technical leadership, sprint planning |
Integration Points
| Upstream |
This Skill |
Downstream |
| Architecture authoring |
Audit |
Implementation |
| ADR creation |
Validate |
Development sprint |
| C4 diagram creation |
Check completeness |
Technical design |
| Design doc drafting |
Quality gate |
Governance approval |
9. Behavioral Guidelines
- Systematic not judgmental: Report gaps objectively, not as criticism
- Evidence-based: Every gap must have cited evidence from the document
- Constructive: Focus on remediation, not just problems
- Calibrated: Severity reflects actual implementation impact
- Complete: Check every applicable item, don't skip viewpoints
- Framework-aware: Respect the architecture methodology being used
- Debt-conscious: Surface technical debt signals for proactive management
- Actionable: Every gap should have a clear path to resolution
10. References
| File |
Purpose |
references/architecture-standards.md |
TOGAF, C4, arc42, IEEE 42010 frameworks |
references/architecture-checklist.md |
188 checklist items organized by viewpoint |
references/viewpoint-catalog.md |
14 viewpoint definitions with concerns |
references/quality-attributes.md |
ISO 25010 quality model with validation |
references/technical-debt-indicators.md |
25+ debt signals with detection |
references/anti-patterns-catalog.md |
25 architecture anti-patterns |
references/compliance-frameworks.md |
SOC2, GDPR, PCI-DSS requirements |
External References
| File |
Purpose |
@core/artifact-contracts.yaml |
CONTRACT-07 (GAP-INVENTORY) schema |
@core/scoring-rubrics.yaml |
RUBRIC-07 (SEVERITY-SCORING) specification |
@core/technique-taxonomy.yaml |
Perfect Recall techniques (CAT-PR-GA) |
@core/skill-patterns.yaml |
GAP-AUDIT pattern (PATTERN-08) |
11. Templates
| File |
Purpose |
templates/gap-inventory-output.md |
CONTRACT-07 compliant XML template with architecture extensions |
templates/architecture-health-report.md |
Executive dashboard with viewpoint scores |
templates/debt-remediation-roadmap.md |
Prioritized technical debt paydown plan |
12. Examples
Example 1: ADR Audit
input:
document: "[ADR-047: Adopt Event-Driven Architecture for Order Processing]"
document_type: adr
framework: auto
audit_depth: standard
include_anti_patterns: true
flow:
phase_1:
- Framework: Custom (MADR-like structure detected)
- Loaded ADR-focused checklist (V10: 20 items)
- Parsed: Title, Status, Context, Decision, Consequences
phase_2:
- Primary viewpoint: V10 (Decision Record)
- Secondary viewpoints assessed: V2 (Container), V6 (Integration)
- Structural gap: No explicit alternatives section
phase_3:
- Verified 20 ADR items + 15 related items
- 28 PRESENT + CLEAR
- 4 PARTIAL
- 3 ABSENT
phase_4:
- Quality attributes: Performance EXPLICIT, Scalability IMPLICIT, Reliability MISSING
phase_5:
- 7 gaps classified
- 0 CRITICAL
- 2 HIGH: Missing rollback strategy (V10-15), No SLO impact assessment (V10-18)
- 3 MEDIUM: Vague consequences (V10-10), Missing stakeholder sign-off (V10-20)
- 2 LOW: No review date (V10-19)
- Anti-patterns: AA-10 (partial - alternatives not documented)
phase_6:
- Architecture Health Score: 72 (ADEQUATE)
- ADR ready with minor gaps
output:
total_gaps: 7
by_severity: { critical: 0, high: 2, medium: 3, low: 2 }
health_score: 72
health_status: ADEQUATE
overall_assessment: minor_issues
recommendation: "Address rollback strategy and SLO impact before implementation."
Example 2: C4 System Context Audit
input:
document: "[System Context Diagram + Description for Payment Gateway]"
document_type: system_context
framework: c4
audit_depth: standard
viewpoints: [V1, V6, V7]
flow:
phase_1:
- Framework: C4 (Level 1 - System Context)
- Loaded Context-focused checklist (52 items)
- Parsed: Diagram, external actors, integrations
phase_2:
- V1 (Context): Full coverage
- V6 (Integration): Partial coverage
- V7 (Security): Minimal coverage
- Structural gap: Trust boundaries not defined
phase_3:
- Verified 52 items
- 38 PRESENT
- 8 PARTIAL
- 6 ABSENT
phase_4:
- Security: MISSING (trust boundaries undefined)
- Interoperability: EXPLICIT
- Reliability: IMPLICIT
phase_5:
- 14 gaps classified
- 2 CRITICAL: No trust boundaries (V1-09), External auth flow missing (V7-01)
- 4 HIGH: SLA dependencies undocumented (V1-13), API versioning unclear (V6-05)
- 5 MEDIUM
- 3 LOW
- Anti-patterns: AA-22 (Trust Assumption)
phase_6:
- Architecture Health Score: 58 (AT_RISK)
- C4 Level 1 incomplete for security context
output:
total_gaps: 14
by_severity: { critical: 2, high: 4, medium: 5, low: 3 }
health_score: 58
health_status: AT_RISK
c4_maturity: { level_1_complete: false }
blocking_issues: 2
overall_assessment: significant_gaps
recommendation: "CRITICAL: Define trust boundaries and external auth flows before container design."
Example 3: Comprehensive Design Document Audit
input:
document: "[Design Doc: Inventory Management Service Redesign - 12,000 words]"
document_type: design_doc
framework: arc42
audit_depth: exhaustive
include_debt_assessment: true
governance_context: enterprise
flow:
phase_1:
- Framework: arc42 (11 of 12 sections present)
- Loaded full checklist (188 items)
- Parsed: 24 sections, 8 diagrams, 5 ADRs inline
phase_2:
- All 10 core viewpoints assessed
- Conditional V11 (Multi-tenancy) applicable
- V8 (Operations) weakest coverage
- V10 (Decisions) strong with 5 ADRs
phase_3:
- Verified 188 items
- 142 PRESENT
- 28 PARTIAL
- 18 ABSENT
phase_4:
- All 8 quality attributes assessed
- Security: EXPLICIT
- Performance: EXPLICIT
- Reliability: IMPLICIT (needs SLOs)
- Operability: MISSING
phase_5:
- 46 gaps classified
- 1 CRITICAL: No disaster recovery strategy (V4-20)
- 8 HIGH: Missing monitoring strategy (V8-01), SLOs undefined (V8-05)
- 22 MEDIUM
- 15 LOW
- Anti-patterns: AA-17 (Observability Omission), AA-18 (SLO Silence)
- Technical debt: 8 indicators detected
- TD-D01: Diagrams >6 months stale
- TD-A03: No bounded contexts defined
- TD-I02: Manual deployment steps
phase_6:
- Architecture Health Score: 64 (ADEQUATE)
- Compliance gap: SOC2 monitoring requirements not met
output:
total_gaps: 46
by_severity: { critical: 1, high: 8, medium: 22, low: 15 }
anti_patterns_detected: 2
debt_indicators_detected: 8
health_score: 64
health_status: ADEQUATE
by_viewpoint:
V1: 2 gaps, V2: 4 gaps, V3: 3 gaps, V4: 6 gaps
V5: 4 gaps, V6: 5 gaps, V7: 3 gaps, V8: 12 gaps
V9: 4 gaps, V10: 2 gaps, V11: 1 gap
blocking_issues: 1
overall_assessment: significant_gaps
recommendation: "Add
…(truncated)
1---
2name: architecture-doc-auditor
3version: "2.0"
4description: >
5 Systematic completeness audit of Architecture Documentation using
6 188-item viewpoint-based checklist, severity-classified gap detection,
7 technical debt indicators, and architecture anti-pattern scanning.
8 Supports TOGAF, C4, arc42, and IEEE 42010 frameworks.
9 PROACTIVELY activate for: (1) Architecture review gates,
10 (2) ADR validation before implementation, (3) C4 diagram completeness check,
11 (4) Technical debt assessment, (5) Pre-implementation validation,
12 (6) Governance compliance audit, (7) Design doc handoff review.
13 Triggers: "audit architecture", "review ADR", "check architecture doc",
14 "validate design doc", "architecture review", "audit C4 diagrams",
15 "check system context", "technical debt assessment", "architecture health check",
16 "governance review", "architecture completeness"
17metadata:
18 source: https://skillmd.com/skills/aibot88/architecture-doc-auditor
19---
20
21# Architecture Documentation Auditor
22
23A systematic audit system that evaluates Architecture Documentation against a comprehensive 188-item viewpoint-based checklist, detecting gaps, classifying severity, identifying technical debt signals, scanning for architecture anti-patterns, and generating actionable remediation roadmaps. Implements the GAP-AUDIT pattern (PATTERN-08) to produce CONTRACT-07 compliant GAP-INVENTORY output with Architecture Health Score extensions.
24
25---
26
27## 1. Purpose
28
29This skill provides 12 core capabilities:
30
31| # | Capability | Phase | Description |
32|---|------------|-------|-------------|
33| 1 | **Framework Detect** | 1 | Identify architecture framework (TOGAF, C4, arc42, IEEE 42010) |
34| 2 | **Document Parse** | 1 | Extract architecture structure, diagrams, and decision records |
35| 3 | **Viewpoint Map** | 2 | Apply 14-viewpoint coverage framework to document sections |
36| 4 | **Item-by-Item Verify** | 3 | Check each of 188 checklist items against content |
37| 5 | **Gap Detect** | 3 | Identify missing, incomplete, or inconsistent elements |
38| 6 | **Classify Gap Type** | 4 | Categorize gaps using 6-type taxonomy |
39| 7 | **Score Severity** | 4 | Apply RUBRIC-07 (impact, likelihood, detectability) |
40| 8 | **Anti-Pattern Scan** | 5 | Detect 25 architecture anti-patterns |
41| 9 | **Debt Signal Detect** | 5 | Identify 25+ technical debt indicators |
42| 10 | **Quality Attribute Validate** | 4 | Verify ISO 25010 quality attribute coverage |
43| 11 | **Remediate Suggest** | 5 | Generate fix recommendations with effort estimates |
44| 12 | **Synthesize Report** | 6 | Produce GAP-INVENTORY + Health Score + Debt Roadmap |
45
46---
47
48## 2. When to Use
49
50**Ideal for:**
51- Architecture review gates before implementation
52- ADR validation before development starts
53- C4 diagram completeness verification
54- Technical debt assessment and tracking
55- Pre-implementation readiness check
56- Governance and compliance audits
57- Design document handoff to development teams
58- Architecture decision board preparation
59- System modernization planning
60- Security architecture review
61
62**Avoid when:**
63- Document is code, not architecture (use code review)
64- Operational runbook review (use operations auditor)
65- Early ideation phase (architecture not yet defined)
66- Quick clarifying questions (formal audit adds overhead)
67- Infrastructure-as-Code review (use IaC auditor)
68- API specification only (use API spec auditor)
69
70---
71
72## 3. Parameters
73
74| Parameter | Type | Required | Default | Description |
75|-----------|------|----------|---------|-------------|
76| `document` | string | **yes** | — | Architecture document content or file reference |
77| `document_type` | enum | no | `design_doc` | adr \| design_doc \| system_context \| container \| component \| deployment \| sequence \| data_flow |
78| `framework` | enum | no | `auto` | togaf \| c4 \| arc42 \| ieee_42010 \| custom \| auto |
79| `audit_depth` | enum | no | `standard` | surface \| standard \| exhaustive |
80| `viewpoints` | list | no | `core_10` | List of viewpoint IDs (V1-V14) to validate |
81| `quality_attributes` | list | no | `all` | ISO 25010 attributes to validate |
82| `include_debt_assessment` | boolean | no | `true` | Whether to scan for technical debt indicators |
83| `include_anti_patterns` | boolean | no | `true` | Whether to scan for architecture anti-patterns |
84| `governance_context` | enum | no | `team` | enterprise \| team \| project |
85| `output_format` | enum | no | `full` | full \| executive \| debt_roadmap_only |
86
87### Document Type Effects
88
89| Type | Primary Viewpoints | Checklist Focus |
90|------|-------------------|-----------------|
91| **adr** | V10 | Decision structure, rationale, consequences |
92| **design_doc** | V1-V10 | Full viewpoint coverage |
93| **system_context** | V1, V6, V7 | External actors, integrations, boundaries |
94| **container** | V2, V5, V6 | Technology choices, communication patterns |
95| **component** | V3, V6 | Internal structure, interfaces |
96| **deployment** | V4, V8 | Infrastructure, scaling, operations |
97| **sequence** | V6 | API flows, interaction patterns |
98| **data_flow** | V5, V7 | Data stores, flows, security |
99
100### Audit Depth Effects
101
102| Depth | Behavior |
103|-------|----------|
104| **surface** | Critical items only (~60 items), structural gaps, no anti-patterns |
105| **standard** | Full checklist for relevant viewpoints, anti-patterns, standard remediation |
106| **exhaustive** | All viewpoints including conditional, deep anti-pattern analysis, debt indicators, detailed remediation |
107
108### Governance Context Effects
109
110| Context | Compliance Level | Output Focus |
111|---------|-----------------|--------------|
112| **enterprise** | Full compliance frameworks (SOC2, GDPR, PCI-DSS) | Governance reporting, compliance matrix |
113| **team** | Standard architecture practices | Team handoff, implementation readiness |
114| **project** | Minimal viable documentation | Quick assessment, critical gaps only |
115
116---
117
118## 4. Six-Phase Workflow
119
120### Phase 1: Document Intake & Framework Detection
121
122**Purpose:** Load document and establish audit context.
123
124**Steps:**
1251. Receive architecture document (inline or file reference)
1262. Detect architecture framework:
127 - C4: Look for Context/Container/Component/Code levels
128 - arc42: Look for 12-section template structure
129 - TOGAF: Look for ADM phase artifacts
130 - IEEE 42010: Look for formal viewpoint definitions
1313. Load `architecture-checklist.md` reference
1324. Calibrate checklist based on `document_type`:
133 - Filter items by viewpoint applicability
134 - Adjust severity levels for document type
135 - Set critical items that must be present
1365. Parse document to identify structure:
137 - Extract section headers and hierarchy
138 - Identify diagram references and types
139 - Note ADRs (Architecture Decision Records)
140 - Detect technology stack references
1416. Load `viewpoint-catalog.md` for structural validation
1427. Initialize gap tracking structure with empty findings
143
144**Techniques Used:**
145- `document_structure_extraction` - Parse document hierarchy
146- `framework_detection` - Identify architecture methodology
147- `checklist_calibration` - Adjust criteria for context
148
149**Quality Gate:** Framework identified; checklist calibrated for document type; structure parsed with sections identified
150
151**Output:** Calibrated checklist (N items) + Document structure map + Detected framework
152
153---
154
155### Phase 2: Viewpoint Mapping & Scope Definition
156
157**Purpose:** Map document sections to architecture viewpoints and identify structural gaps.
158
159**Steps:**
1601. Load viewpoint framework from `viewpoint-catalog.md`:
161
162 **Core Viewpoints (Always Assess):**
163 - V1: Context & Scope (system boundary, external actors)
164 - V2: Container Architecture (major components, technology choices)
165 - V3: Component Design (internal structure, interfaces)
166 - V4: Deployment Topology (infrastructure, scaling)
167 - V5: Data Architecture (data stores, flows, ownership)
168 - V6: Integration & APIs (contracts, protocols, versioning)
169 - V7: Security Architecture (auth, encryption, compliance)
170 - V8: Operational Concerns (monitoring, SLOs, runbooks)
171 - V9: Cross-Cutting Concerns (logging, caching, config)
172 - V10: Decision Record (ADRs, rationale, consequences)
173
174 **Conditional Viewpoints (If Applicable):**
175 - V11: Multi-tenancy (SaaS/multi-tenant systems)
176 - V12: Event Architecture (event-driven systems)
177 - V13: Migration Path (legacy modernization)
178 - V14: Compliance Matrix (regulated industries)
179
1802. Map each document section to viewpoints:
181 - Assign based on content, not just header
182 - Flag orphan sections (don't fit any viewpoint)
183 - Flag missing viewpoints (no sections mapped)
1843. Identify structural gaps:
185 - Core viewpoint with no coverage = CRITICAL structural gap
186 - Core viewpoint with partial coverage = HIGH structural gap
187 - Conditional viewpoint missing when applicable = MEDIUM gap
1884. Check for applicable conditional viewpoints:
189 - Multi-tenancy: Evidence of tenant-based requirements
190 - Event architecture: Event-driven patterns mentioned
191 - Migration: Legacy system references
192 - Compliance: Regulatory requirements mentioned
1935. Calculate initial coverage score per viewpoint
194
195**Techniques Used:**
196- `completeness_verification` (CAT-PR-GA) - Verify all viewpoints addressed
197- `viewpoint_mapping` - Map sections to architectural concerns
198
199**Quality Gate:** All applicable viewpoints assessed; structural gaps flagged
200
201**Output:** Viewpoint coverage map with scores and structural gap list
202
203---
204
205### Phase 3: Systematic Coverage Verification
206
207**Purpose:** Verify each checklist item against document content.
208
209**Steps:**
210
211For each checklist item (V1-01 through V10-20):
212
213```
2141. LOCATE RELEVANT SECTION
215 └─ Based on viewpoint mapping from Phase 2
216
2172. ASSESS PRESENCE
218 ├─ PRESENT: Item clearly addressed
219 ├─ PARTIAL: Item mentioned but incomplete
220 └─ ABSENT: No evidence of item
221
2223. EVALUATE QUALITY (if present)
223 ├─ CLEAR: Unambiguous and actionable
224 ├─ AMBIGUOUS: Multiple interpretations possible
225 ├─ INCONSISTENT: Contradicts other content
226 ├─ INCOMPLETE: Missing key details
227 └─ OUTDATED: Stale or deprecated references
228
2294. RECORD EVIDENCE
230 ├─ Location: Section/diagram reference
231 ├─ Quote: Supporting text from document
232 └─ Assessment: Pass/fail with rationale
233
2345. FLAG FOR GAP CLASSIFICATION (if needed)
235 └─ Any non-PRESENT or non-CLEAR items
236```
237
238**Verification Rules by Viewpoint:**
239
240| Viewpoint | Items | Critical Items | Verification Approach |
241|-----------|-------|----------------|----------------------|
242| V1: Context | V1-01 to V1-15 | V1-01, V1-02, V1-03 | Check boundary definition, external actors |
243| V2: Container | V2-01 to V2-25 | V2-01, V2-02, V2-05 | Verify technology choices documented |
244| V3: Component | V3-01 to V3-18 | V3-01, V3-02 | Check internal structure clarity |
245| V4: Deployment | V4-01 to V4-22 | V4-01, V4-05, V4-10 | Verify infrastructure defined |
246| V5: Data | V5-01 to V5-18 | V5-01, V5-02, V5-05 | Check data stores and flows |
247| V6: Integration | V6-01 to V6-15 | V6-01, V6-02, V6-05 | Verify API contracts exist |
248| V7: Security | V7-01 to V7-25 | V7-01, V7-02, V7-05, V7-10 | Check auth, encryption, audit |
249| V8: Operations | V8-01 to V8-18 | V8-01, V8-05, V8-10 | Verify monitoring, SLOs defined |
250| V9: Cross-Cutting | V9-01 to V9-12 | V9-01, V9-05 | Check logging, config patterns |
251| V10: Decisions | V10-01 to V10-20 | V10-01, V10-02, V10-05 | Verify ADR structure and coverage |
252
253**Techniques Used:**
254- `completeness_verification` (CAT-PR-GA) - Check presence of each item
255- `negative_space_analysis` (CAT-PR-GA) - Identify what's NOT documented
256- `consistency_check` (CAT-PR-ECR) - Cross-reference between viewpoints
257
258**Quality Gate:** 100% of applicable checklist items evaluated
259
260**Output:** Verification matrix with item-level results and evidence
261
262---
263
264### Phase 4: Quality Attribute Validation
265
266**Purpose:** Validate coverage of ISO 25010 quality attributes.
267
268**Steps:**
269
270#### 4.1 Quality Attribute Mapping
271
272Map document content to quality attributes from `quality-attributes.md`:
273
274| Quality Attribute | Primary Viewpoints | Validation Criteria |
275|------------------|-------------------|---------------------|
276| **Performance** | V4, V5 | Latency targets, throughput requirements, resource limits |
277| **Scalability** | V4, V2 | Scaling strategy, elasticity approach, capacity planning |
278| **Security** | V7, V6 | Auth mechanisms, encryption, audit logging, compliance |
279| **Reliability** | V8, V4 | Availability targets, fault tolerance, DR strategy |
280| **Maintainability** | V3, V10 | Modularity, testability, decision rationale |
281| **Interoperability** | V6, V1 | API standards, protocol choices, versioning |
282| **Portability** | V4, V2 | Platform dependencies, abstraction layers |
283| **Usability** | V6, V10 | API ergonomics, developer experience |
284
285#### 4.2 Coverage Assessment
286
287For each quality attribute:
2881. Identify explicit coverage in primary viewpoints
2892. Check for implicit coverage in secondary viewpoints
2903. Assess coverage level: EXPLICIT / IMPLICIT / MISSING
2914. Note measurement approaches if present
292
293#### 4.3 Gap Identification
294
295Flag quality attribute gaps:
296- MISSING in primary viewpoint = HIGH gap
297- MISSING in all viewpoints = CRITICAL gap for regulated contexts
298
299**Techniques Used:**
300- `quality_attribute_validation` - Map concerns to ISO 25010
301- `coverage_assessment` - Evaluate attribute coverage
302
303**Quality Gate:** All quality attributes assessed with coverage level
304
305**Output:** Quality attribute coverage matrix
306
307---
308
309### Phase 5: Technical Debt & Anti-Pattern Detection
310
311**Purpose:** Identify technical debt signals and architecture anti-patterns.
312
313**Steps:**
314
315#### 5.1 Gap Classification
316
317For each gap identified in Phases 3-4, apply gap taxonomy (from `gap-taxonomy.md`):
318
319```
320IS ELEMENT PRESENT?
321├─ NO → MISSING
322└─ YES
323 ├─ IS IT COMPLETE?
324 │ ├─ NO → INCOMPLETE
325 │ └─ YES
326 │ ├─ DOES IT CONTRADICT OTHER CONTENT?
327 │ │ ├─ YES → INCONSISTENT
328 │ │ └─ NO
329 │ │ ├─ IS IT CLEAR AND UNAMBIGUOUS?
330 │ │ │ ├─ NO → AMBIGUOUS
331 │ │ │ └─ YES
332 │ │ │ ├─ IS IT TECHNICALLY CORRECT?
333 │ │ │ │ ├─ NO → INCORRECT
334 │ │ │ │ └─ YES
335 │ │ │ │ └─ IS IT CURRENT?
336 │ │ │ │ ├─ NO → OUTDATED
337 │ │ │ │ └─ YES → No gap
338```
339
340#### 5.2 Severity Scoring
341
342Apply SEVERITY-SCORING (RUBRIC-07) with three dimensions:
343
344| Dimension | Weight | Scale |
345|-----------|--------|-------|
346| **Impact** | 0.5 | 1=Low, 2=Medium, 3=High, 4=Critical |
347| **Likelihood** | 0.3 | 1=Rare, 2=Possible, 3=Likely, 4=Certain |
348| **Detectability** | 0.2 | 1=Obvious, 2=Moderate, 3=Difficult, 4=Hidden |
349
350**Calculation:**
351```
352severity_score = (impact × 0.5) + (likelihood × 0.3) + (detectability × 0.2)
353
354CRITICAL: score >= 3.5
355HIGH: 2.5 <= score < 3.5
356MEDIUM: 1.5 <= score < 2.5
357LOW: score < 1.5
358```
359
360#### 5.3 Architecture Anti-Pattern Scan
361
362If `include_anti_patterns` is true, scan for 25 patterns from `anti-patterns-catalog.md`:
363
364**Structural Anti-Patterns:**
365
366| ID | Anti-Pattern | Severity | Detection Signal |
367|----|--------------|----------|------------------|
368| AA-01 | Big Ball of Mud | CRITICAL | No clear component boundaries |
369| AA-02 | Distributed Monolith | CRITICAL | Microservices with tight coupling |
370| AA-03 | Database Monolith | HIGH | All services sharing single database |
371| AA-04 | God Service | HIGH | One service handling everything |
372| AA-05 | Circular Dependencies | CRITICAL | A depends on B depends on A |
373| AA-06 | Golden Hammer | MEDIUM | Same tech used regardless of fit |
374| AA-07 | Vendor Lock-in Blindness | HIGH | No abstraction over proprietary services |
375| AA-08 | Accidental Complexity | HIGH | Over-engineering indicators |
376
377**Documentation Anti-Patterns:**
378
379| ID | Anti-Pattern | Severity | Detection Signal |
380|----|--------------|----------|------------------|
381| AA-09 | Diagram Divorce | CRITICAL | Diagrams don't match text |
382| AA-10 | ADR Amnesia | HIGH | Decisions made without records |
383| AA-11 | Stale Blueprints | HIGH | Docs reference deprecated systems |
384| AA-12 | View Vacuum | CRITICAL | Missing entire viewpoint |
385| AA-13 | C4 Confusion | MEDIUM | Mixed abstraction levels in diagrams |
386| AA-14 | Prose Overload | MEDIUM | Walls of text, no diagrams |
387| AA-15 | Technology Tourism | LOW | Tech name-dropping without rationale |
388| AA-16 | Abstraction Allergy | MEDIUM | Only code-level detail, no conceptual |
389
390**Operational Anti-Patterns:**
391
392| ID | Anti-Pattern | Severity | Detection Signal |
393|----|--------------|----------|------------------|
394| AA-17 | Observability Omission | HIGH | No monitoring/alerting strategy |
395| AA-18 | SLO Silence | HIGH | No reliability targets |
396| AA-19 | Deployment Darkness | CRITICAL | No deployment documentation |
397| AA-20 | Capacity Blindness | HIGH | No scaling strategy |
398| AA-21 | Runbook Roulette | MEDIUM | No operational procedures |
399
400**Security Anti-Patterns:**
401
402| ID | Anti-Pattern | Severity | Detection Signal |
403|----|--------------|----------|------------------|
404| AA-22 | Trust Assumption | CRITICAL | "Internal network is secure" |
405| AA-23 | Auth Afterthought | HIGH | Security bolted on later |
406| AA-24 | Secret Scatter | CRITICAL | Credentials in configs/code |
407| AA-25 | Compliance Complacency | HIGH | No compliance mapping |
408
409#### 5.4 Technical Debt Detection
410
411If `include_debt_assessment` is true, scan for indicators from `technical-debt-indicators.md`:
412
413| Category | Indicators | Severity Range |
414|----------|------------|----------------|
415| **Architectural Debt** | Shared databases, sync coupling, missing abstractions | HIGH-CRITICAL |
416| **Documentation Debt** | Stale diagrams, missing rationale, undocumented interfaces | MEDIUM-HIGH |
417| **Infrastructure Debt** | Manual deployments, missing DR, hardcoded config | MEDIUM-HIGH |
418| **Security Debt** | Undocumented auth, missing encryption, no audit strategy | HIGH-CRITICAL |
419| **API Debt** | Breaking changes, no versioning, inconsistent contracts | MEDIUM-HIGH |
420
421#### 5.5 Remediation Matching
422
423Match each gap to remediation pattern:
424
425| Gap Type | Primary Pattern | Action |
426|----------|-----------------|--------|
427| MISSING | Add Content | Write new section using template |
428| INCOMPLETE | Expand Content | Fill in missing details |
429| INCONSISTENT | Reconcile Content | Resolve contradictions |
430| AMBIGUOUS | Clarify Content | Add specificity/metrics |
431| INCORRECT | Correct Content | Fix technical errors |
432| OUTDATED | Update Content | Refresh stale information |
433
434**Effort Estimation:**
435
436| Effort Level | Definition | Time Range |
437|--------------|------------|------------|
438| **trivial** | Quick fix, obvious solution | < 30 min |
439| **small** | Clear scope, single viewpoint | 30 min - 2 hours |
440| **medium** | Multiple viewpoints or research needed | 2 - 8 hours |
441| **large** | Significant rework or stakeholder input | 1+ days |
442
443**Techniques Used:**
444- `severity_scoring` (RUBRIC-07) - Score gaps by impact
445- `full_consistency_matrix` (CAT-PR-ECR) - Cross-reference for inconsistencies
446- `anti_pattern_detection` - Match known failure patterns
447- `debt_signal_detection` - Identify technical debt indicators
448
449**Quality Gate:** All gaps classified with type and severity; anti-patterns and debt signals detected
450
451**Output:** Classified gap list + Anti-pattern findings + Debt indicators
452
453---
454
455### Phase 6: Synthesis & Governance Reporting
456
457**Purpose:** Produce final GAP-INVENTORY artifact with Architecture Health Score.
458
459**Steps:**
460
461#### 6.1 GAP-INVENTORY Compilation
462
463Compile all findings into CONTRACT-07 compliant structure:
464- Populate `source_reference` with document identifier
465- Set `source_type` to "architecture"
466- Build `audit_criteria` with viewpoint-based checklist
467- Compile `gaps` array with all classified gaps
468- Add `anti_patterns` array if detected
469- Add `technical_debt` section with indicators
470- Calculate `summary` statistics
471
472#### 6.2 Architecture Health Score
473
474Calculate overall architecture health:
475
476```xml
477<architecture_health>
478 <overall_score>[0-100]</overall_score>
479 <by_viewpoint>
480 <!-- Score per viewpoint -->
481 </by_viewpoint>
482 <by_quality_attribute>
483 <!-- Coverage per ISO 25010 attribute -->
484 </by_quality_attribute>
485 <technical_debt_summary>
486 <!-- Debt indicator counts by category -->
487 </technical_debt_summary>
488 <c4_maturity>
489 <!-- Completeness of C4 levels if applicable -->
490 </c4_maturity>
491</architecture_health>
492```
493
494**Health Score Calculation:**
495```
496viewpoint_score = (items_passed / items_total) × 100 per viewpoint
497overall_score = weighted_average(viewpoint_scores) - severity_penalties
498
499Severity Penalties:
500- CRITICAL gap: -10 points
501- HIGH gap: -5 points
502- Anti-pattern: -3 points
503- Debt indicator: -2 points
504```
505
506**Health Status Thresholds:**
507
508| Status | Score Range | Interpretation |
509|--------|-------------|----------------|
510| **HEALTHY** | 80-100 | Ready for implementation |
511| **ADEQUATE** | 60-79 | Minor gaps, proceed with awareness |
512| **AT_RISK** | 40-59 | Significant gaps, address before proceeding |
513| **CRITICAL** | 0-39 | Major gaps, not ready for implementation |
514
515#### 6.3 Summary Statistics
516
517Generate:
518- `total_gaps`: Count of all gaps
519- `by_severity`: {critical: N, high: N, medium: N, low: N}
520- `by_category`: {missing: N, incomplete: N, inconsistent: N, ...}
521- `by_viewpoint`: Gap count per viewpoint
522- `overall_assessment`: Based on health score
523- `blocking_issues`: List of gap IDs that must be fixed
524- `coverage_score`: Percentage of checklist items passed
525
526**Assessment Thresholds:**
527
528| Assessment | Criteria |
529|------------|----------|
530| **critical_issues** | Any CRITICAL gap OR overall_score < 40 |
531| **significant_gaps** | No CRITICAL but score 40-59 OR >3 HIGH gaps |
532| **minor_issues** | Score 60-79, only MEDIUM/LOW gaps |
533| **acceptable** | Score 80-89, few gaps |
534| **excellent** | Score 90+, minimal gaps |
535
536#### 6.4 Executive Summary (if requested)
537
538Generate stakeholder-friendly summary:
539- At-a-glance metrics table
540- Viewpoint coverage spider chart data
541- Quality attribute coverage radar chart data
542- Top 3 strengths
543- Top 3 critical issues
544- Risk heat map data
545- Recommended next actions
546
547#### 6.5 Debt Remediation Roadmap (if requested)
548
549Generate prioritized technical debt paydown plan:
550- Priority 1: Immediate (blocking issues)
551- Priority 2: Short-term (before implementation)
552- Priority 3: Medium-term (during implementation)
553- Priority 4: Long-term (continuous improvement)
554- Effort/impact quadrant
555- Quick wins identification
556- Strategic investments
557
558#### 6.6 Output Selection
559
560Based on `output_format` parameter:
561- **full**: GAP-INVENTORY + Health Report + Debt Roadmap
562- **executive**: Executive Summary only
563- **debt_roadmap_only**: Technical Debt Roadmap only
564
565**Techniques Used:**
566- `artifact_synthesis` - Compile structured output
567- `health_score_calculation` - Compute architecture health
568- `stakeholder_communication` - Tailor for audience
569
570**Quality Gate:** Output validates against CONTRACT-07 schema with architecture extensions
571
572**Output:** GAP-INVENTORY artifact + Architecture Health Score + requested summaries
573
574---
575
576## 5. Gap Taxonomy
577
578### The 6 Gap Types
579
580| # | Type | Definition | Architecture Detection Signal | Remediation |
581|---|------|------------|------------------------------|-------------|
582| 1 | **MISSING** | Required element completely absent | No viewpoint coverage, no ADRs found, deployment undocumented | Add content |
583| 2 | **INCOMPLETE** | Present but lacking required detail | TBD in diagrams, partial API specs, rationale missing | Expand content |
584| 3 | **INCONSISTENT** | Contradicts other sections | Context shows 5 services, container shows 8; ADR contradicts implementation | Reconcile content |
585| 4 | **AMBIGUOUS** | Multiple interpretations possible | "Scalable architecture" without metrics, "secure by design" without controls | Clarify content |
586| 5 | **INCORRECT** | Technically wrong information | References deprecated API, shows removed service, wrong technology | Correct content |
587| 6 | **OUTDATED** | Was correct but no longer current | Shows v1 API when v3 current, references decommissioned database | Update content |
588
589**Reference:** See `references/architecture-checklist.md` for detailed detection heuristics per checklist item.
590
591---
592
593## 6. Output Specifications
594
595### 6.1 GAP-INVENTORY Format
596
597Aligns with CONTRACT-07 from artifact-contracts.yaml with architecture extensions.
598
599```xml
600<?xml version="1.0" encoding="UTF-8"?>
601<gap_inventory contract="CONTRACT-07" version="1.0">
602
603 <metadata>
604 <artifact_id>GI-ARCH-[YYYY-MM-DD]-[5-char-hash]</artifact_id>
605 <contract_type>GAP-INVENTORY</contract_type>
606 <created_at>[ISO 8601]</created_at>
607 <created_by>architecture-doc-auditor</created_by>
608 <confidence>[0.0-1.0]</confidence>
609 <provenance>
610 <source_artifact>[Document identifier]</source_artifact>
611 <audit_date>[ISO 8601 date]</audit_date>
612 <audit_depth>[surface|standard|exhaustive]</audit_depth>
613 <document_type>[adr|design_doc|system_context|...]</document_type>
614 <framework_detected>[togaf|c4|arc42|ieee_42010|custom]</framework_detected>
615 <checklist_version>1.0</checklist_version>
616 <items_checked>[N]</items_checked>
617 <viewpoints_assessed>[list]</viewpoints_assessed>
618 </provenance>
619 </metadata>
620
621 <source_reference>[Document identifier]</source_reference>
622 <source_type>architecture</source_type>
623
624 <audit_criteria>
625 <checklist_reference>architecture-checklist.md v1.0</checklist_reference>
626 <viewpoint_framework>viewpoint-catalog.md v1.0</viewpoint_framework>
627 <criteria_list>
628 <criterion id="[V1-01]" viewpoint="V1">[Item description]</criterion>
629 <!-- All checked items -->
630 </criteria_list>
631 <coverage_scope>[What this audit covered]</coverage_scope>
632 </audit_criteria>
633
634 <gaps>
635 <gap id="GAP-001">
636 <category>[missing|incomplete|inconsistent|ambiguous|incorrect|outdated]</category>
637 <severity>[critical|high|medium|low]</severity>
638 <severity_score>
639 <impact>[1-4]</impact>
640 <likelihood>[1-4]</likelihood>
641 <detectability>[1-4]</detectability>
642 <composite>[calculated]</composite>
643 </severity_score>
644 <viewpoint>[V1-V14]</viewpoint>
645 <checklist_ref>[V1-01]</checklist_ref>
646 <location>[Document section/diagram]</location>
647 <description>[Gap description]</description>
648 <evidence>[What indicates this gap]</evidence>
649 <impact>[Consequence if not addressed]</impact>
650 <remediation>
651 <recommendation>[How to fix]</recommendation>
652 <effort>[trivial|small|medium|large]</effort>
653 <priority>[immediate|short_term|medium_term|long_term]</priority>
654 </remediation>
655 </gap>
656 </gaps>
657
658 <anti_patterns>
659 <pattern id="AA-02">
660 <name>Distributed Monolith</name>
661 <severity>CRITICAL</severity>
662 <instances>
663 <instance location="[section]">[Evidence quote]</instance>
664 </instances>
665 <remediation>[How to address]</remediation>
666 </pattern>
667 </anti_patterns>
668
669 <technical_debt>
670 <indicator id="TD-A01">
671 <category>architectural</category>
672 <name>Shared database between services</name>
673 <severity>HIGH</severity>
674 <evidence>[Where detected]</evidence>
675 <remediation_cost>large</remediation_cost>
676 </indicator>
677 </technical_debt>
678
679 <architecture_health>
680 <overall_score>[0-100]</overall_score>
681 <overall_status>[HEALTHY|ADEQUATE|AT_RISK|CRITICAL]</overall_status>
682 <by_viewpoint>
683 <viewpoint id="V1" name="Context & Scope" score="[0-100]" status="[status]"/>
684 <viewpoint id="V2" name="Container" score="[0-100]" status="[status]"/>
685 <!-- All assessed viewpoints -->
686 </by_viewpoint>
687 <by_quality_attribute>
688 <attribute name="Performance" coverage="[EXPLICIT|IMPLICIT|MISSING]"/>
689 <attribute name="Security" coverage="[EXPLICIT|IMPLICIT|MISSING]"/>
690 <!-- All quality attributes -->
691 </by_quality_attribute>
692 <technical_debt_summary>
693 <total_indicators>[N]</total_indicators>
694 <by_category>
695 <architectural>[N]</architectural>
696 <documentation>[N]</documentation>
697 <infrastructure>[N]</infrastructure>
698 <security>[N]</security>
699 <api>[N]</api>
700 </by_category>
701 </technical_debt_summary>
702 <c4_maturity>
703 <level_1_complete>[true|false]</level_1_complete>
704 <level_2_complete>[true|false]</level_2_complete>
705 <level_3_complete>[true|false]</level_3_complete>
706 <level_4_complete>[true|false]</level_4_complete>
707 </c4_maturity>
708 </architecture_health>
709
710 <summary>
711 <total_gaps>[N]</total_gaps>
712 <by_severity>
713 <critical>[N]</critical>
714 <high>[N]</high>
715 <medium>[N]</medium>
716 <low>[N]</low>
717 </by_severity>
718 <by_category>
719 <missing>[N]</missing>
720 <incomplete>[N]</incomplete>
721 <inconsistent>[N]</inconsistent>
722 <ambiguous>[N]</ambiguous>
723 <incorrect>[N]</incorrect>
724 <outdated>[N]</outdated>
725 </by_category>
726 <by_viewpoint>
727 <v1>[N]</v1>
728 <v2>[N]</v2>
729 <!-- Gap count per viewpoint -->
730 </by_viewpoint>
731 <anti_patterns_detected>[N]</anti_patterns_detected>
732 <debt_indicators_detected>[N]</debt_indicators_detected>
733 <overall_assessment>[critical_issues|significant_gaps|minor_issues|acceptable|excellent]</overall_assessment>
734 <blocking_issues>
735 <issue ref="GAP-001">[Brief description]</issue>
736 </blocking_issues>
737 <coverage_score>
738 <items_passed>[N]</items_passed>
739 <items_total>[N]</items_total>
740 <percentage>[X%]</percentage>
741 </coverage_score>
742 </summary>
743
744</gap_inventory>
745```
746
747### 6.2 Executive Summary Format
748
749See `templates/architecture-health-report.md` for complete template.
750
751### 6.3 Debt Remediation Roadmap Format
752
753See `templates/debt-remediation-roadmap.md` for complete template.
754
755---
756
757## 7. Quality Gates
758
759| # | Gate | Criterion | Phase |
760|---|------|-----------|-------|
761| 1 | **Framework Detected** | Architecture methodology identified or marked as custom | 1 |
762| 2 | **Checklist Calibrated** | Checklist adjusted for document type with applicable items | 1 |
763| 3 | **Document Parsed** | All sections identified with structure map created | 1 |
764| 4 | **Viewpoints Mapped** | All applicable viewpoints assessed with scores | 2 |
765| 5 | **Items Verified** | 100% of applicable checklist items evaluated | 3 |
766| 6 | **Quality Attributes Checked** | All ISO 25010 attributes assessed for coverage | 4 |
767| 7 | **Gaps Classified** | All gaps assigned type from 6-type taxonomy | 5 |
768| 8 | **Severity Scored** | All gaps scored using 3-dimension RUBRIC-07 | 5 |
769| 9 | **Anti-Patterns Scanned** | All 25 anti-patterns checked (if enabled) | 5 |
770| 10 | **Debt Indicators Scanned** | All debt categories checked (if enabled) | 5 |
771| 11 | **Health Score Calculated** | Overall architecture health score computed | 6 |
772| 12 | **Output Validated** | GAP-INVENTORY conforms to CONTRACT-07 schema | 6 |
773
774---
775
776## 8. Workflow Integration
777
778This skill serves as a quality gate in the architecture development workflow:
779
780```
781┌─────────────────────────────────────┐
782│ ARCHITECTURE DOC AUDITOR │ ◀── THIS SKILL
783│ │
784└────────────────┬────────────────────┘
785 │
786 │ Input: Architecture Document
787 │
788 ▼
789┌─────────────────────────────────────┐
790│ Phase 1: Intake & Framework │
791│ • Detect framework (C4/arc42/...) │
792│ • Load architecture-checklist │
793│ • Parse document structure │
794└────────────────┬────────────────────┘
795 │
796 ▼
797┌─────────────────────────────────────┐
798│ Phase 2: Viewpoint Mapping │
799│ • Apply 14-viewpoint framework │
800│ • Map sections to viewpoints │
801│ • Flag structural gaps │
802└────────────────┬────────────────────┘
803 │
804 ▼
805┌─────────────────────────────────────┐
806│ Phase 3: Coverage Verification │ ◀── Perfect Recall techniques
807│ • Check 188 checklist items │ completeness_verification
808│ • Record presence and quality │ consistency_check
809│ • Cite evidence locations │ negative_space_analysis
810└────────────────┬────────────────────┘
811 │
812 ▼
813┌─────────────────────────────────────┐
814│ Phase 4: Quality Attributes │ ◀── ISO 25010 validation
815│ • Map to 8 quality attributes │
816│ • Assess coverage level │
817│ • Flag quality gaps │
818└────────────────┬────────────────────┘
819 │
820 ▼
821┌─────────────────────────────────────┐
822│ Phase 5: Debt & Anti-Patterns │ ◀── RUBRIC-07 severity scoring
823│ • Classify gaps (6 types) │
824│ • Score severity (3 dimensions) │
825│ • Scan 25 anti-patterns │
826│ • Detect 25+ debt indicators │
827└────────────────┬────────────────────┘
828 │
829 ▼
830┌─────────────────────────────────────┐
831│ Phase 6: Synthesis │ ◀── CONTRACT-07 + Health Score
832│ • Compile GAP-INVENTORY │
833│ • Calculate Architecture Health │
834│ • Generate remediation roadmap │
835└────────────────┬────────────────────┘
836 │
837 ▼
838┌─────────────────────────────────────┐
839│ OUTPUT: GAP-INVENTORY │
840│ + Architecture Health Score │
841│ + Technical Debt Roadmap │
842└─────────────────────────────────────┘
843```
844
845### Artifact Flow
846
847| This Skill Produces | Consumed By |
848|---------------------|-------------|
849| GAP-INVENTORY (CONTRACT-07) | Architecture review board, governance |
850| Architecture Health Score | Executive reporting, readiness gates |
851| Debt Remediation Roadmap | Technical leadership, sprint planning |
852
853### Integration Points
854
855| Upstream | This Skill | Downstream |
856|----------|------------|------------|
857| Architecture authoring | **Audit** | Implementation |
858| ADR creation | **Validate** | Development sprint |
859| C4 diagram creation | **Check completeness** | Technical design |
860| Design doc drafting | **Quality gate** | Governance approval |
861
862---
863
864## 9. Behavioral Guidelines
865
866- **Systematic not judgmental:** Report gaps objectively, not as criticism
867- **Evidence-based:** Every gap must have cited evidence from the document
868- **Constructive:** Focus on remediation, not just problems
869- **Calibrated:** Severity reflects actual implementation impact
870- **Complete:** Check every applicable item, don't skip viewpoints
871- **Framework-aware:** Respect the architecture methodology being used
872- **Debt-conscious:** Surface technical debt signals for proactive management
873- **Actionable:** Every gap should have a clear path to resolution
874
875---
876
877## 10. References
878
879| File | Purpose |
880|------|---------|
881| `references/architecture-standards.md` | TOGAF, C4, arc42, IEEE 42010 frameworks |
882| `references/architecture-checklist.md` | 188 checklist items organized by viewpoint |
883| `references/viewpoint-catalog.md` | 14 viewpoint definitions with concerns |
884| `references/quality-attributes.md` | ISO 25010 quality model with validation |
885| `references/technical-debt-indicators.md` | 25+ debt signals with detection |
886| `references/anti-patterns-catalog.md` | 25 architecture anti-patterns |
887| `references/compliance-frameworks.md` | SOC2, GDPR, PCI-DSS requirements |
888
889### External References
890
891| File | Purpose |
892|------|---------|
893| `@core/artifact-contracts.yaml` | CONTRACT-07 (GAP-INVENTORY) schema |
894| `@core/scoring-rubrics.yaml` | RUBRIC-07 (SEVERITY-SCORING) specification |
895| `@core/technique-taxonomy.yaml` | Perfect Recall techniques (CAT-PR-GA) |
896| `@core/skill-patterns.yaml` | GAP-AUDIT pattern (PATTERN-08) |
897
898---
899
900## 11. Templates
901
902| File | Purpose |
903|------|---------|
904| `templates/gap-inventory-output.md` | CONTRACT-07 compliant XML template with architecture extensions |
905| `templates/architecture-health-report.md` | Executive dashboard with viewpoint scores |
906| `templates/debt-remediation-roadmap.md` | Prioritized technical debt paydown plan |
907
908---
909
910## 12. Examples
911
912### Example 1: ADR Audit
913
914```yaml
915input:
916 document: "[ADR-047: Adopt Event-Driven Architecture for Order Processing]"
917 document_type: adr
918 framework: auto
919 audit_depth: standard
920 include_anti_patterns: true
921
922flow:
923 phase_1:
924 - Framework: Custom (MADR-like structure detected)
925 - Loaded ADR-focused checklist (V10: 20 items)
926 - Parsed: Title, Status, Context, Decision, Consequences
927 phase_2:
928 - Primary viewpoint: V10 (Decision Record)
929 - Secondary viewpoints assessed: V2 (Container), V6 (Integration)
930 - Structural gap: No explicit alternatives section
931 phase_3:
932 - Verified 20 ADR items + 15 related items
933 - 28 PRESENT + CLEAR
934 - 4 PARTIAL
935 - 3 ABSENT
936 phase_4:
937 - Quality attributes: Performance EXPLICIT, Scalability IMPLICIT, Reliability MISSING
938 phase_5:
939 - 7 gaps classified
940 - 0 CRITICAL
941 - 2 HIGH: Missing rollback strategy (V10-15), No SLO impact assessment (V10-18)
942 - 3 MEDIUM: Vague consequences (V10-10), Missing stakeholder sign-off (V10-20)
943 - 2 LOW: No review date (V10-19)
944 - Anti-patterns: AA-10 (partial - alternatives not documented)
945 phase_6:
946 - Architecture Health Score: 72 (ADEQUATE)
947 - ADR ready with minor gaps
948
949output:
950 total_gaps: 7
951 by_severity: { critical: 0, high: 2, medium: 3, low: 2 }
952 health_score: 72
953 health_status: ADEQUATE
954 overall_assessment: minor_issues
955 recommendation: "Address rollback strategy and SLO impact before implementation."
956```
957
958### Example 2: C4 System Context Audit
959
960```yaml
961input:
962 document: "[System Context Diagram + Description for Payment Gateway]"
963 document_type: system_context
964 framework: c4
965 audit_depth: standard
966 viewpoints: [V1, V6, V7]
967
968flow:
969 phase_1:
970 - Framework: C4 (Level 1 - System Context)
971 - Loaded Context-focused checklist (52 items)
972 - Parsed: Diagram, external actors, integrations
973 phase_2:
974 - V1 (Context): Full coverage
975 - V6 (Integration): Partial coverage
976 - V7 (Security): Minimal coverage
977 - Structural gap: Trust boundaries not defined
978 phase_3:
979 - Verified 52 items
980 - 38 PRESENT
981 - 8 PARTIAL
982 - 6 ABSENT
983 phase_4:
984 - Security: MISSING (trust boundaries undefined)
985 - Interoperability: EXPLICIT
986 - Reliability: IMPLICIT
987 phase_5:
988 - 14 gaps classified
989 - 2 CRITICAL: No trust boundaries (V1-09), External auth flow missing (V7-01)
990 - 4 HIGH: SLA dependencies undocumented (V1-13), API versioning unclear (V6-05)
991 - 5 MEDIUM
992 - 3 LOW
993 - Anti-patterns: AA-22 (Trust Assumption)
994 phase_6:
995 - Architecture Health Score: 58 (AT_RISK)
996 - C4 Level 1 incomplete for security context
997
998output:
999 total_gaps: 14
1000 by_severity: { critical: 2, high: 4, medium: 5, low: 3 }
1001 health_score: 58
1002 health_status: AT_RISK
1003 c4_maturity: { level_1_complete: false }
1004 blocking_issues: 2
1005 overall_assessment: significant_gaps
1006 recommendation: "CRITICAL: Define trust boundaries and external auth flows before container design."
1007```
1008
1009### Example 3: Comprehensive Design Document Audit
1010
1011```yaml
1012input:
1013 document: "[Design Doc: Inventory Management Service Redesign - 12,000 words]"
1014 document_type: design_doc
1015 framework: arc42
1016 audit_depth: exhaustive
1017 include_debt_assessment: true
1018 governance_context: enterprise
1019
1020flow:
1021 phase_1:
1022 - Framework: arc42 (11 of 12 sections present)
1023 - Loaded full checklist (188 items)
1024 - Parsed: 24 sections, 8 diagrams, 5 ADRs inline
1025 phase_2:
1026 - All 10 core viewpoints assessed
1027 - Conditional V11 (Multi-tenancy) applicable
1028 - V8 (Operations) weakest coverage
1029 - V10 (Decisions) strong with 5 ADRs
1030 phase_3:
1031 - Verified 188 items
1032 - 142 PRESENT
1033 - 28 PARTIAL
1034 - 18 ABSENT
1035 phase_4:
1036 - All 8 quality attributes assessed
1037 - Security: EXPLICIT
1038 - Performance: EXPLICIT
1039 - Reliability: IMPLICIT (needs SLOs)
1040 - Operability: MISSING
1041 phase_5:
1042 - 46 gaps classified
1043 - 1 CRITICAL: No disaster recovery strategy (V4-20)
1044 - 8 HIGH: Missing monitoring strategy (V8-01), SLOs undefined (V8-05)
1045 - 22 MEDIUM
1046 - 15 LOW
1047 - Anti-patterns: AA-17 (Observability Omission), AA-18 (SLO Silence)
1048 - Technical debt: 8 indicators detected
1049 - TD-D01: Diagrams >6 months stale
1050 - TD-A03: No bounded contexts defined
1051 - TD-I02: Manual deployment steps
1052 phase_6:
1053 - Architecture Health Score: 64 (ADEQUATE)
1054 - Compliance gap: SOC2 monitoring requirements not met
1055
1056output:
1057 total_gaps: 46
1058 by_severity: { critical: 1, high: 8, medium: 22, low: 15 }
1059 anti_patterns_detected: 2
1060 debt_indicators_detected: 8
1061 health_score: 64
1062 health_status: ADEQUATE
1063 by_viewpoint:
1064 V1: 2 gaps, V2: 4 gaps, V3: 3 gaps, V4: 6 gaps
1065 V5: 4 gaps, V6: 5 gaps, V7: 3 gaps, V8: 12 gaps
1066 V9: 4 gaps, V10: 2 gaps, V11: 1 gap
1067 blocking_issues: 1
1068 overall_assessment: significant_gaps
1069 recommendation: "Address DR strategy (CRITICAL) and operability gaps before architecture review board."
1070 debt_remediation:
1071 immediate: ["DR strategy", "Monitoring strategy"]
1072 short_term: ["SLO definition", "Deployment automation"]
1073 medium_term: ["Diagram refresh", "Bounded context documentation"]
1074```
1075
1076---
1077
1078## Quick Start
1079
1080```
1081/architecture-doc-auditor
1082document: "[Paste architecture document or provide file path]"
1083document_type: design_doc
1084audit_depth: standard
1085```