agentleFS
RBraga01RBraga01/a-team/skills/architecture-audit/SKILL.md

architecture-audit

Skill24 starsChanged 25 days agoMITView on GitHub

Systematic architecture review workflow. Use before major feature work on an unfamiliar or inherited codebase, before scaling milestones, or as a periodic health check. Maps the system as-built (not as-documented), dispatches parallel specialist reviews, and produces an evidence-backed findings report with severity verdicts.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prototype, review and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before major feature work on an inherited or unfamiliar codebase

    line 19
  2. Distinctive:

    Before a scaling milestone (10× users, new region, new platform)

    line 20
  3. Distinctive:

    After rapid growth phases where structure was sacrificed for speed

    line 21
  4. Distinctive:

    NOT for greenfield design — use the architect agent and brainstorming skill instead

    line 23
  5. Distinctive:

    Document what the code actually does, not what the docs or diagrams claim.

    line 29
  6. Distinctive:

    If the as-built map contradicts existing architecture docs, record every divergence — each one is a finding.

    line 41
  7. Distinctive:

    Use the dispatching-parallel-agents skill.

    line 57
  8. Distinctive:

    Every finding must carry a file reference and a consequence:

    line 71

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Audit

The Law

AN ARCHITECTURE CLAIM WITHOUT A FILE REFERENCE IS AN OPINION.
"The service layer is tightly coupled" is not a finding.
"OrderService imports 14 concrete classes from 6 modules (src/services/order.ts:1-22),
so a payment-provider swap requires touching all 6" is a finding.

When to Use

  • Before major feature work on an inherited or unfamiliar codebase
  • Before a scaling milestone (10× users, new region, new platform)
  • After rapid growth phases where structure was sacrificed for speed
  • As a periodic health check on long-lived systems
  • NOT for greenfield design — use the architect agent and brainstorming skill instead

Audit Workflow

Step 1: Map the System As-Built

Document what the code actually does, not what the docs or diagrams claim. Read entry points, build files, and dependency manifests before any source.

## System Map — YYYY-MM-DD

**Entry points:** (servers, CLIs, cron jobs, queue consumers — with file paths)
**Modules/layers:** (as they exist in the folder structure, not the intended design)
**External dependencies:** (databases, queues, third-party APIs — where each is called from)
**Data flow:** (request → response path for the 2-3 most important operations)
**Trust boundaries:** (where unvalidated input enters, where auth is checked)

If the as-built map contradicts existing architecture docs, record every divergence — each one is a finding.

Step 2: Identify Load-Bearing Decisions

List the architectural decisions the system depends on, whether or not anyone made them deliberately:

DecisionWhere visibleDeliberate or accidental?
Monolith vs servicesrepo layout, deploy config
Sync vs async processingqueue usage, HTTP call chains
Data ownershipwhich modules write which tables
Coupling directionimport graph between layers
State managementsession stores, caches, singletons

Step 3: Dispatch Parallel Specialist Reviews

Use the dispatching-parallel-agents skill. Each specialist gets the Step 1 system map plus a scoped question:

AgentScoped question
architectDo module boundaries and coupling direction support the next 12 months of planned work?
security-reviewerAre trust boundaries enforced at every entry point in the system map?
performance-profilerWhich architectural choices (N+1 patterns, sync chains, missing caches) cap throughput?
database-reviewerDoes data ownership match module boundaries? Any schema shared by unrelated modules?
infra-reviewerDoes the deploy topology match the code topology? Any single points of failure?

Skip a specialist only if their domain is absent (e.g., no database → no database-reviewer).

Step 4: Consolidate Findings with Evidence

Every finding must carry a file reference and a consequence:

## Finding N: <one-line statement>

**Evidence:** `path/to/file.ts:12-40` — <what the code shows>
**Consequence:** <what breaks, slows, or blocks because of this>
**Effort to fix:** S / M / L
**Risk if unfixed:** <concrete scenario, not "tech debt">

Findings without evidence are deleted, not softened.

Step 5: Classify Severity

SeverityCriteriaAction
CRITICALData loss, security boundary bypass, or scaling wall within one milestoneBlock feature work until addressed
HIGHChange amplification — routine features require touching 3+ modulesSchedule before next major feature
MEDIUMCoupling or duplication that slows work but doesn't block itBacklog with owner
LOWStyle-level structure issuesNote only

Step 6: Verdict and Report

## Architecture Audit — YYYY-MM-DD

**Scope:** <what was audited>
**System map:** (Step 1 output)
**Findings:** N critical / N high / N medium / N low
**Verdict:** SOUND | SOUND-WITH-RISKS | INTERVENTION-REQUIRED

**Top 3 actions:** (ordered by risk-to-effort ratio)
VerdictCriteria
SOUNDNo critical or high findings — proceed with planned work
SOUND-WITH-RISKSHigh findings exist with agreed mitigation dates
INTERVENTION-REQUIREDAny critical finding — architecture work precedes feature work

Feed CRITICAL and HIGH findings into the writing-plans skill as remediation plans. Record accepted risks as ADRs via the architect agent so the next audit can check whether the risk materialised.

Rationalization Red Flags

  • "The architecture is fine, the team just needs to be careful" — change amplification is structural, not behavioural
  • "We'll audit after this next feature ships" — the next feature is built on the unaudited structure
  • "The diagram in the wiki shows clean layers" — audit the code, not the diagram

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.