Architectural Analysis

pedronauck/skills/skills/mine/architectural-analysis

by pedronauck0422940cea5d9960b3697016d1cb28c8ed02b030No licenseListed Oct 9, 2026Updated Oct 9, 2026

Audit architecture, dead code, duplication, type confusion, and code smells across a codebase. Excludes formatting, performance profiling, security audits, and feature-level reviews.

Instructions onlySoftware Development
AI-generated overview

Audits a codebase for architectural design problems such as dead code, duplication, cycles, and type confusion.

What it does
Guides an agent through a read-only architectural audit of a requested scope: mapping entry points and dependencies, prioritizing signals like dead exports, duplicated responsibilities, cycles, and confused ownership or types, and tracing usage before declaring code dead. Each material finding is confirmed in source, explained in terms of behavior or maintenance cost, cited with paths and lines, and paired with the smallest useful change. Output is a report sized to the request, optionally following the bundled report or summary templates and saved under .audits/.
When to use it
Use when someone asks for an architecture review or design-quality audit of a codebase or a portion of it. It fits broad audits that need a structured report as well as narrow questions that only need a concise finding list. It is not intended for formatting, performance profiling, security audits, or feature-level reviews.
Requirements
Runs as instructions only, with no scripts. It expects the agent to have file-reading and search tooling, such as ripgrep (rg --files and scoped rg searches), plus any available static-analysis output; the bundled reference catalog and report/summary templates are read by the model.

Architectural Analysis

Audit the requested scope and report concrete design problems. An audit alone is read-only; existing explicit authorization to apply findings can include remediation. Use the project's boundaries and public compatibility policy when judging a design.

  1. Resolve scope from the request/context. Map entry points and relevant dependencies with rg --files, scoped rg searches, and available static-analysis output. Do not create one todo per source file or assume a TypeScript stack.
  2. Prioritize signals: dead exports, duplicated responsibilities, cycles, confused ownership/types, and expensive change patterns. Read the matching section of references/detection-catalog.md when classifying a candidate; thresholds are clues, not automatic defects.
  3. Trace usage before declaring code dead, including dynamic loading, reflection, framework hooks, tests, and published APIs. An unreferenced public export is not safe to delete solely because this checkout has no consumer.
  4. Confirm each material finding in source. Explain the behavior or maintenance cost, cite paths/lines, state uncertainty, and propose the smallest useful change. Avoid a separate generic smell sweep when it adds no evidence.
  5. Match report size to the request. For a broad audit, use assets/report-template.md as an adaptable outline and save .audits/architectural-analysis-<timestamp>.md; distinguish inspected and uninspected areas. For a narrow answer, a concise finding list is enough. Missing coverage must never be reported as None found.
  6. Summarize the important findings and evidence. Existing source and summary templates are optional presentation aids, not two required reports.

Source and attribution

Source:pedronauck/skillsinskills/mine/architectural-analysisat commit0422940

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal