$npx -y skills add levnikolaevich/claude-code-skills --skill ln-24-architecture-auditorAudits implemented architecture fitness, boundaries, contracts, dependency topology, structure, and configuration ownership. Use for system structure; not implementation-plan review.
| 1 | # Architecture Auditor |
| 2 | |
| 3 | **Goal:** Perform a read-only audit of the architecture the system actually executes. Evaluate whether structure, dependencies, contracts, and cross-component ownership fit current product needs without rewarding pattern names or speculative modernization. Judge where atomicity and resource ownership belong; leave local query, transaction, and data-resource correctness to a persistence-focused review. |
| 4 | |
| 5 | **Execution contract:** Treat the ordered checkbox workflow below as this skill's Definition of Done. Work through every item in order, and mark it complete only when its action and required evidence are complete. `N/A`, skipped, unavailable, or delegated items remain incomplete. |
| 6 | Before returning, apply this skill's verdict, decision, and approval rules to every incomplete item and prepend **Checklist: X/Y complete**<br>**Incomplete: None | section/item — reason; outcome impact; exact next action**; list every incomplete item. |
| 7 | |
| 8 | ## Tool Routing |
| 9 | |
| 10 | | Need | Preferred tool | Use it when | Fallback | |
| 11 | |---|---|---|---| |
| 12 | | Physical and declared architecture | Native file listing, manifests, build files, configuration, and architecture documents | Establishing modules, packages, domains, layers, entrypoints, and deployment units | Targeted repository map from known entrypoints | |
| 13 | | Symbols and dependency topology | Language server, compiler metadata, or host-native code intelligence | Tracing imports, calls, implementations, routes, events, and cycles | Narrow search plus direct inspection of definitions and consumers | |
| 14 | | Runtime wiring | Registration code, dependency injection, routing, startup configuration, and safe runtime diagnostics | A component may exist but not be discoverable or connected | Static trace with explicit uncertainty | |
| 15 | | Historical intent | Git history, blame, and decision records | A current exception or parallel mechanism may have a still-valid reason | Current behavior and documented constraints remain authoritative | |
| 16 | | Architectural fitness | Current official framework and platform documentation | A finding depends on supported extension, lifecycle, configuration, or boundary behavior | Primary-source web research; otherwise mark `UNVERIFIED` | |
| 17 | | Quantitative structure | Existing dependency, cycle, complexity, or package-analysis commands | The repository already defines reliable structural analysis | Reproducible static inventory and call-path evidence | |
| 18 | |
| 19 | Use diagrams only when they clarify a relationship that prose cannot. Do not generate a diagram as a substitute for evidence, and do not modify code or architecture documents during the audit. |
| 20 | |
| 21 | ## Evidence Rules |
| 22 | |
| 23 | - Executable dependencies, runtime wiring, and public contracts outweigh intended diagrams or folder names. |
| 24 | - A cycle or cross-layer call is a finding only when it creates a concrete change, ownership, testing, deployment, or failure cost. |
| 25 | - Pattern compliance is not a goal by itself; evaluate fitness against product complexity, team workflow, and operational constraints. |
| 26 | - Framework convention and generated wiring require framework-aware verification before being labeled leakage or dead code. |
| 27 | - Modernization is justified only by a present defect or measurable simplification, not novelty. |
| 28 | - Explicit repository boundary rules define intended constraints; documentation explains them; inference from folder names is low-confidence evidence and must not create a violation by itself. |
| 29 | - A recorded baseline separates new, resolved, and accepted debt. It does not make an active correctness or security risk disappear. |
| 30 | |
| 31 | ## Checklist |
| 32 | |
| 33 | ### 1. Discover the Actual Architecture |
| 34 | |
| 35 | - [ ] Read repository instructions, architecture documents, manifests, entrypoints, deployment definitions, and configuration ownership rules. |
| 36 | - [ ] Map packages, modules, domains, layers, processes, data stores, queues, external systems, and public interfaces in scope. |
| 37 | - [ ] Record ownership and independent build, deploy, scale, and failure boundaries; do not infer a service boundary from a directory or process name alone. |
| 38 | - [ ] Identify the dominant organizing model and any competing models: layer-first, domain-first, service boundaries, plugin boundaries, or framework conventions. |
| 39 | - [ ] Trace representative critical flows from entrypoint through orchestration, domain behavior, persistence or integration, and observable outcome. |
| 40 | - [ ] Compare documented intent with executable structure and record divergences without assuming either side is automatically correct. |
| 41 | - [ ] Inspect Git state so current work and unrelated user changes are not misclassified as established architecture. |
| 42 | - [ ] Keep the audit read-only and disclose any permitted diagnostic caches or generated analysis artifacts. |
| 43 | |
| 44 | ### 2. Audit Pattern Fitness |