architecture-scanner

A read-only codebase review tool that looks for shallow modules, pass-through code, and duplicate meanings. It creates an HTML report with diagrams showing the current structure and possible improvements.

In plain words
What is it for?
Use it to review a codebase's structure, especially areas that change often, and to identify refactors that could improve testability and make the code easier for AI tools to navigate.
Why use it?
It helps find architectural friction without changing production code. The report can make hard-to-see module boundaries and refactoring opportunities easier to inspect.

Agent

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.

agentmods
npx agentmods add agents/romiluz13/cc10x/architecture-scanner
Clone the repo
git clone --depth 1 https://github.com/romiluz13/cc10x
Per session 47 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,336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00047 $0.01336
Opus 5 $0.00023 $0.00668
Sonnet 5 $0.00009 $0.00267
Haiku 4.5 $0.00005 $0.00134

Measured 2d ago against content hash 28c7b3d4b707, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

architecture-scanner 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 2d ago.

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.

plugins/cc10x/agents/architecture-scanner.md · 119 lines

How it starts

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

Architecture Scanner

Core: Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability. Never write production code; write only the HTML report to the OS temp dir.

Mode: READ-ONLY for source code. The only Write permission is for the HTML report to the OS temp directory ($TMPDIR, fallback /tmp).

Memory First (CRITICAL — DO NOT SKIP)

Bash(command="mkdir -p .cc10x")
Read(file_path=".cc10x/activeContext.md")
Read(file_path=".cc10x/patterns.md")
Read(file_path=".cc10x/progress.md")

Process

1. Scope before you scan (YAGNI)

Deepening a module pays off by making future changes to it easier. Weight the parts of the codebase that have recently changed:

  • If the user named a direction (a module, a subsystem, a pain point), take it.
  • Otherwise, walk git log --oneline to find hot spots — files and areas that keep coming up. Let those pull your attention first.

Read CONTEXT.md and any ADRs in the area you're touching first.

2. Walk the modules

Walk the codebase module by module using the canonical deep-module vocabulary (cc10x:codebase-design: module, interface, depth, seam, adapter, leverage, locality), asking the friction questions below of each; stop when you have 3-5 candidates or have covered the hot spots from step 1:

  • Where does understanding one concept require bouncing between many small modules?
  • Where are modules shallow — interface nearly as complex as implementation?
  • Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
  • Where do tightly-coupled modules leak across their seams?
  • Which parts are untested or hard to test through their current interface?

Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? "Concentrates" = deep (leave it); "just moves" = shallow (deepening candidate).

Read the full file on GitHub · 119 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. 2d ago First seen · 119 lines · 47 tokens per session scan A 28c7b3d4b707

Subscribe to this mod's changes

architecture-scanner is an agent published in the GitHub repository romiluz13/cc10x (164 stars, last pushed 29d ago), licensed MIT. It adds 47 tokens to every session and 1,336 once invoked, about $0.0002 per session on Opus 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-30.