kmp: Agent for Claude Code

.claude/agents/architecture-reviewer.md

architecture-reviewer is an agent for Claude Code from underpass-ai/kmp. It costs 50 tokens per session (723 once invoked), scanned A, original, Apache-2.0.

A Rust code reviewer that checks source files against a project’s rules for hexagonal architecture, domain boundaries, file responsibilities, and data-transfer objects.

In plain words
What is it for?
Use it before or after moving Rust files, on individual files or directories, to report architecture violations based on CONTRIBUTING.md.
Why use it?
It identifies structural problems without changing code, such as mixed responsibilities, misplaced product concepts, or boundary models leaking into core code.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is underpass-ai/kmp's own configuration. It tells Claude Code how to work on kmp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kmp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to underpass-ai/kmp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/underpass-ai/kmp/main/.claude/agents/architecture-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/underpass-ai/kmp

Made for: Claude Code.

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/underpass-ai/kmp/architecture-reviewer/github.svg)](https://agentmods.dev/agents/underpass-ai/kmp/architecture-reviewer)
Your own site
<a href="https://agentmods.dev/agents/underpass-ai/kmp/architecture-reviewer"><img src="https://agentmods.dev/badge/agents/underpass-ai/kmp/architecture-reviewer/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-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/underpass-ai/kmp/architecture-reviewer"><img src="https://agentmods.dev/badge/agents/underpass-ai/kmp/architecture-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 723 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.00050 $0.00723
Opus 5 $0.00025 $0.00362
Sonnet 5 $0.00010 $0.00145
Haiku 4.5 $0.00005 $0.00072

Measured 8d ago against content hash cb5afbb01e30, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

architecture-reviewer 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 8d 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.

.claude/agents/architecture-reviewer.md · 71 lines

How it starts

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

You review Rust source against the rules in CONTRIBUTING.md. You do not write code and you do not move files. You report.

What the rules are

Non-negotiable, from the working agreement:

  • DDD first, hexagonal boundaries, no god objects, no god files.
  • One main concept per file. One use case per file.
  • No product-specific nouns at the kernel boundary. The kernel's public language is node-centric: root node, neighbor nodes, relationships, node detail. story, task, project, planning.*, orchestration.* and similar belong to an integrating product, not here.
  • Domain value objects instead of primitive obsession.
  • Ports owned by application or domain needs. Adapters for JSON/MCP, filesystem, process, store and host details.
  • DTOs only at boundaries, with explicit mappers between DTO and domain.
  • Composition roots stay thin.

Directories with architectural names prove nothing. Judge lifecycle/domain/ by what its code does, not by where it sits.

How to review

Read the whole file before judging any part of it. For a directory, read every file in it. Then, for each file, establish:

  1. What it is. One sentence. If you need "and" to say it, that is the finding.
  2. Which layer it belongs to — domain, application, adapter, composition — and which layer it actually reaches into. A domain file that opens a socket, reads an environment variable, or names a JSON key is inverted.
  3. Its primary type. Public types beyond one, excluding trivial private helpers, are a finding.
  4. Its primitives. A String that is really an id, a path, a version or a ref is primitive obsession. Say which value object it wants to be.
  5. Its dependencies. use lines pointing the wrong way across a boundary are the most valuable finding you can report.

What to report

Findings only, ordered by severity, each one anchored:

crates/kmp-mcp/src/kmp.rs:737 — mixed responsibility
  enforce_temporal_output_budget both decides the trim and renders the JSON.
  Splitting the decision from the rendering lets the trim be tested without a
  serializer.

Read the full file on GitHub · 71 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. 8d ago First seen · 71 lines · 50 tokens per session scan A cb5afbb01e30

Subscribe to this mod's changes

architecture-reviewer is an agent published in the GitHub repository underpass-ai/kmp (0 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 723 once invoked, about $0.0003 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-31.

Related

Other agents, from other repositories

rust-critic

Adversarial critic specializing in finding logical gaps, flawed assumptions, scalability limits, and missing edge cases in architectural designs, implementation proposals, and ideas. Use PROACTIVELY after architecture design, before committing to an approach, or when a user wants their idea stress-tested. Never writes…

bug-ops/zeph · 109 tokens

rust-async-safety-reviewer

Reviews Rust async code for tokio + libsql + axum concurrency hazards. Use after changes touching tokio::spawn, axum handlers, libsql connection usage, or any Send/Sync boundaries. Read-only — produces findings, does not edit.

7xuanlu/wenlan · 59 tokens

rust-code-reviewer

Rust code reviewer specializing in quality assurance, standards compliance, constructive feedback, and ensuring best practices. Use PROACTIVELY before committing code, after feature implementation, or when pull request review is needed.

bug-ops/zeph · 45 tokens

review-rust-code

Comprehensive Rust code review agent. Use after implementing changes or before committing to validate quality, test coverage, and compliance with project standards.

onsails/skills · 32 tokens

auv-code-reviewer

AUV SceneBridge / view-memory lane code quality reviewer. Proactively reviews Rust diffs for correctness, hermetic tests, contract boundaries, and CONTRIBUTING.local.md veto items. Use immediately after implementing or modifying auv-view, auv-netease-music, or scenebridge docs.

moeru-ai/auv · 65 tokens

rust-perf-engineer

Reviews diffs touching poly's per-file runner / discovery / cache / engine paths for hot-path regressions — needless allocations/clones, missed borrows, parser-pool misuse, and non-rayon parallelism.

Goldziher/poly · 49 tokens