architecture-audit

architecture-audit is a command for Claude Code from akholod/consensus-review. It costs 15 tokens per session (1,466 once invoked), scanned A, original, MIT.

A one-pass review of a whole codebase's architecture, meaning the way its major parts, responsibilities, and connections are organized. It examines layers, features, interfaces, design approaches, and complexity.

In plain words
What is it for?
Use it to assess the full project, trace user workflows to the business operations behind them, and identify design or complexity issues.
Why use it?
It helps reveal structural problems that a line-by-line code review may miss, such as responsibilities crossing boundaries or a system becoming hard to understand and change.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents.

Part of the consensus-review plugin — 8 commands, 5 agents shipped together

Good fit Use it to assess the full project, trace user workflows to the business operations behind them, and identify design or complexity issues.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/akholod/consensus-review/architecture-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/akholod/consensus-review

Made for: Claude Code.

Or install consensus-review, the plugin that ships this one along with the rest of its 8 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/akholod/consensus-review/architecture-audit/github.svg)](https://agentmods.dev/commands/akholod/consensus-review/architecture-audit)
Your own site
<a href="https://agentmods.dev/commands/akholod/consensus-review/architecture-audit"><img src="https://agentmods.dev/badge/commands/akholod/consensus-review/architecture-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for architecture-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/akholod/consensus-review/architecture-audit"><img src="https://agentmods.dev/badge/commands/akholod/consensus-review/architecture-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.01466
Opus 5.5 $0.00006 $0.00586
Sonnet 5.5 $0.00003 $0.00293
Haiku 4.5 $0.00002 $0.00147

Measured yesterday against content hash 74ca87435244, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

architecture-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/architecture-audit.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architecture Audit

One-shot architecture audit of the entire codebase (not a line-by-line code review). Stack-agnostic. Scope — always the whole project.

Role and Lens

Role: architecture reviewer.

Lens:

  • Horizontal layers (server / DB / network / business logic / UI) and vertical slices (capability) that cut across all layers.
  • Analysis entry point: User workflow → Use case → Business capability. NOT screens, NOT tables, NOT endpoints.
  • Look for abstraction leakage between layers and modules.
  • Treat complexity as manageability of the system: can the team understand, estimate, and safely change the code without losing control over AI-generated or overengineered complexity.

Operating Mode

  • Single pass, single context, no delegation to sub-agents.
  • Scope — always the whole project ($ARGUMENTS is ignored).
  • Output — to chat, free-form; structure it however best conveys the essence of what was found.
  • Diagrams (mermaid / C4-lite / ASCII) — at your discretion, when the architectural complexity warrants it.
  • Ask clarifying questions during the analysis, as soon as facts from the code are insufficient. Do not accumulate them to the end.
  • Output language: English by default. If the caller passes lang=<language> (any language, as a code or a name), write in that language. Identifiers, paths, and technical terms stay in their original form.

Severity Scale (for the findings block in Phase 5)

  • P0 — invariant violation, abstraction leakage that blocks further development, or an architectural choice that will be expensive to untangle in the near term.
  • P1 — structural problem: blurred module boundaries, implicit contracts, paradigm mismatch with the nature of the task.
  • P2 — localized layer misalignment or minor architectural drift.

Phase 1. Inventory

Answer from facts in the code. If a fact is missing — explicitly mark it as hypothesis or ask a clarifying question.

  1. What business entities exist?
  2. What roles work with them?
  3. What actions do the roles perform?
  4. What states (lifecycle) do the entities go through?
  5. What invariants must not be violated?
  6. Where are the transaction boundaries?
  7. Where is async behavior, queues, background processes?
  8. Where are access permissions?
  9. Where is audit, history, versioning?
  10. Where are external integrations?

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 74ca87435244
  2. 1mo ago First seen · 168 lines · 15 tokens per session scan A e556af786a7a

Subscribe to this mod's changes

architecture-audit is a command published in the GitHub repository akholod/consensus-review (3 stars, last pushed 2d ago), licensed MIT. It adds 15 tokens to every session and 1,466 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.