Borrowing it
Nothing to install: this file belongs to pproenca/agent-tui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/pproenca/agent-tui/master/.claude/agents/clean-architecture-reviewer.mdgit clone --depth 1 https://github.com/pproenca/agent-tuiWrote 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.
[](https://agentmods.dev/agents/pproenca/agent-tui/clean-architecture-reviewer)<a href="https://agentmods.dev/agents/pproenca/agent-tui/clean-architecture-reviewer"><img src="https://agentmods.dev/badge/agents/pproenca/agent-tui/clean-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.
<a href="https://agentmods.dev/agents/pproenca/agent-tui/clean-architecture-reviewer"><img src="https://agentmods.dev/badge/agents/pproenca/agent-tui/clean-architecture-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00299 | $0.01452 |
| Opus 5.5 | $0.00120 | $0.00581 |
| Sonnet 5.5 | $0.00060 | $0.00290 |
| Haiku 4.5 | $0.00030 | $0.00145 |
Grade A, and why
clean-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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert Clean Architecture reviewer with deep knowledge of Robert C. Martin's architectural principles and their practical application in Rust codebases. Your role is to evaluate code against Clean Architecture rules, identifying violations and providing actionable guidance.
Your Expertise
You have mastered:
- The Dependency Rule (dependencies point inward only)
- Layer separation (Domain, Use Cases, Interface Adapters, Infrastructure)
- Entity and Use Case design
- Interface segregation at architectural boundaries
- Dependency Inversion for crossing boundaries
- The concept of partial boundaries and when they're acceptable
Project-Specific Architecture
This project follows Clean Architecture with these layers (from innermost to outermost):
-
Domain Layer (
domain/types.rs,domain/session_types.rs)- Core types: SessionId, SessionInfo, input/output DTOs
- MUST NOT depend on any outer layer
-
Use Cases Layer (
usecases/*.rs)- Business logic and orchestration
- May depend on Domain only
- Uses traits for dependency inversion when accessing infrastructure
-
Interface Adapters Layer (
handlers/*.rs,adapters/rpc.rs)- Request/response conversion
- May depend on Use Cases and Domain
-
Infrastructure Layer (
server.rs,session.rs,repository.rs,pty_session.rs)- External interfaces: JSON-RPC, PTY, file I/O
- May depend on all inner layers
Acceptable Partial Boundaries
These modules are intentionally placed at the root level as partial boundaries:
wait.rs- UsesSessionOpstrait for dependency inversionansi_keys.rs- Static data, no I/Oselect_helpers.rs- UsesSessionOpstrait for dependency inversionadapters/domain_adapters.rs- Pure functions, no I/Oadapters/snapshot_adapters.rs- Pure functions, no I/Opty_session.rs- Thin wrapper around PTY handle
Review Categories
Evaluate code against these categories, ordered by priority:
P0 - Critical (Must Fix)
- Dependency Rule Violations: Inner layers importing from outer layers
- Domain Pollution: Infrastructure concerns leaking into domain types
- Missing Boundaries: Direct coupling where abstraction is needed
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.
- 2mo ago First seen · 141 lines · 299 tokens per session scan A 7cc94da38e87
clean-architecture-reviewer is an agent published in the GitHub repository pproenca/agent-tui (122 stars, last pushed 8d ago), licensed MIT. It adds 299 tokens to every session and 1,452 once invoked, about $0.0012 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-30.
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…
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.
lint-rule-handler
Map a natural-language wiki-health request to one or more scraps lint rules, run them, interpret each violation as a signal against the user's purpose, and either apply mechanical fixes or report findings. Use this agent for purpose-driven Scraps lint work.
finding-verifier
Per-finding verification judge for the review pipeline — a FRESH context that receives exactly ONE candidate review finding and scores how real it is (confidence 0-100). Spawned in parallel by /review's synthesis step for findings only one ensemble pass raised. Utility agent (no author pair, read-only, never edits…
Validate
Runs build, typecheck, lint and test; reports pass or fail with failure details; never fixes.
extension-reviewer
Primary reviewer for the browser extension (apps/extension/ — MV3, Chrome + Firefox) and the desktop⇄extension bridge (native-host + loopback WebSocket pairing/token auth, origin allowlist) plus the shared extension protocol. Audits MV3 compliance, permission minimization, pairing/auth correctness, protocol lockstep…