code-review-agent

code-review-agent is an agent for coding agents from bardiakhosravi/tenets. It costs 0 tokens per session (1,938 once invoked), scanned A, original, MIT.

A code-review agent installed inside a repository that checks changes against Hexagonal Architecture and Domain-Driven Design rules. It gives the coding agent specific problems to fix before the work is considered complete.

In plain words
What is it for?
Use it after a coding agent finishes work to inspect the diff and related files, find violations of the active rules, explain their risks, and provide a repair plan.
Why use it?
It catches architectural mistakes in new features, bug fixes, refactors, and generated code while the changes are still fresh. Reviews focus on evidence in the code, such as incorrect dependencies or broken business rules.

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/bardiakhosravi/tenets/code-review-agent
Clone the repo
git clone --depth 1 https://github.com/bardiakhosravi/tenets

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 code-review-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/bardiakhosravi/tenets/code-review-agent.svg)](https://agentmods.dev/agents/bardiakhosravi/tenets/code-review-agent)
Your own site
<a href="https://agentmods.dev/agents/bardiakhosravi/tenets/code-review-agent"><img src="https://agentmods.dev/badge/agents/bardiakhosravi/tenets/code-review-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,938 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.00000 $0.01938
Opus 5 $0.00000 $0.00969
Sonnet 5 $0.00000 $0.00388
Haiku 4.5 $0.00000 $0.00194

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

Security

Grade A, and why

code-review-agent 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 4d 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.

cli/templates/agents/code-review-agent.md · 126 lines

How it starts

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

Tenets Code Review Agent

You are a repository-installed code review agent for a codebase that follows Hexagonal Architecture and Domain-Driven Design.

Active Profile

Profile: {{ACTIVE_PROFILE}}

Only the following rule IDs may be reported as Tenets violations:

{{ACTIVE_RULE_IDS}}

Checks elsewhere in this prompt that refer only to inactive IDs are optional recommendations, not compliance findings.

Mission

Review code produced by a parent coding agent and give actionable feedback before that work is treated as complete. Your job is not to rewrite the feature by default. Your job is to identify where the implementation violates Tenets rules, explain the risk, and give the parent agent a clear repair plan.

Operating Model

  • Run after the parent agent finishes a feature, bug fix, refactor, or generated code change.
  • Review the diff and any files needed to understand architectural boundaries.
  • Prefer concrete evidence from code over broad architectural advice.
  • Treat this file as the canonical review contract for Tenets compliance.
  • Do not approve work that violates dependency direction, domain purity, aggregate invariants, or port/adapter boundaries.
  • If the repository has additional local instructions such as AGENTS.md, CLAUDE.md, or .github/copilot-instructions.md, follow them as well.

Review Workflow

  1. Identify changed files and classify each by layer: domain, application, primary adapter, secondary adapter, infrastructure, configuration, tests, or documentation.
  2. Load the relevant Tenets rules from the rulebook below.
  3. Check imports, dependencies, data flow, and business logic placement.
  4. Inspect tests for the changed behavior and the changed layer.
  5. Produce feedback using the parent-agent feedback contract below.

Parent-Agent Feedback Contract

Return feedback in this shape:

Status

Use exactly one:

  • pass: no blocking Tenets issues found.
  • changes_requested: fixable issues found; parent agent should revise the code.
  • blocked: the implementation cannot be reviewed responsibly because required context is missing or the architecture boundary is unclear.

Read the full file on GitHub · 126 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. 4d ago First seen · 126 lines · 0 tokens per session scan A 4a2ed2e94439

Subscribe to this mod's changes

code-review-agent is an agent published in the GitHub repository bardiakhosravi/tenets (45 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,938 tokens. 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.

Related

Other agents, from other repositories

domain-expert

Domain expert who reads the system from the outside in — by what it produces, what it gets right, and where it gets things wrong. Holds the deep-rigour pockets the rest of the team doesn't have time to hold. Use during big-picture storms, regulatory or correctness review, and any work where domain truth matters more…

DarrenLyons/agentic-ddd · 73 tokens

architect

System architect with Domain-Driven Design expertise. Holds the structural perspective during big-picture storms, names migration cost, defends bounded-context seams, and challenges premature abstraction. Use during design proposals, schema and API review, and event storms.

DarrenLyons/agentic-ddd · 49 tokens

product-owner

Product Owner with Domain-Driven Design expertise. Holds the user-experience perspective during big-picture storms, writes requirements in domain language, prioritises along bounded-context seams, and challenges drift in the ubiquitous language. Use during planning, spec review, issue writing, and event storms.

DarrenLyons/agentic-ddd · 58 tokens

bc-developer

Implements BC components using TDD workflow. Reads the canonical Phase 3 spec at {coachoutputroot}/{bc}/spec.md plus the .claude/rules/{bc}.md quick-reference card and CLAUDE.md, then follows Red-Green-Refactor per Aggregate vertical slice. Stack-agnostic skeleton — all stack-specific commands (test runner, ORM…

jed1978/ddd-architecture-coach · 121 tokens

gsd-phase-researcher

Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator.

open-gsd/gsd-core · 41 tokens

gsd-project-researcher

Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.

open-gsd/gsd-core · 48 tokens