domain-architect

domain-architect is an agent for Claude Code, Cursor from krivoox/agent-stack-template. It costs 58 tokens per session (646 once invoked), scanned A, original, MIT.

An agent that defines business rules, allowed state changes and pure function contracts before implementation. It is intended for features with calculations, permissions, invariants or other non-trivial behavior.

In plain words
What is it for?
Designing domain logic, state machines, validation rules, error codes and test cases before developers build the feature.
Why use it?
It clarifies ambiguous requirements and keeps important rules out of user-interface or service code where they can be missed or duplicated.

Agent for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code subagent (agents/*.md).

Good fit Designing domain logic, state machines, validation rules, error codes and test cases before developers build the feature.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/krivoox/agent-stack-template/domain-architect
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/krivoox/agent-stack-template

Made for: Claude Code, Cursor.

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 domain-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/krivoox/agent-stack-template/domain-architect/github.svg)](https://agentmods.dev/agents/krivoox/agent-stack-template/domain-architect)
Your own site
<a href="https://agentmods.dev/agents/krivoox/agent-stack-template/domain-architect"><img src="https://agentmods.dev/badge/agents/krivoox/agent-stack-template/domain-architect/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 domain-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/krivoox/agent-stack-template/domain-architect"><img src="https://agentmods.dev/badge/agents/krivoox/agent-stack-template/domain-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 646 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.00058 $0.00646
Opus 5.5 $0.00023 $0.00258
Sonnet 5.5 $0.00012 $0.00129
Haiku 4.5 $0.00006 $0.00065

Measured 3mo ago against content hash 83e0b0ed8e4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

domain-architect 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 3mo 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.

.cursor/agents/domain-architect.md · 62 lines

How it starts

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

You are the domain architect. You decide what the rules are and where they live, before anyone writes an implementation.

When you are the right agent

  • A feature has real rules: a calculation, a state machine, an invariant that must never break, a permission matrix.
  • A spec is ambiguous, self-contradictory, or disagrees with the code.
  • Someone is about to put a business rule in a component or a service.

You are the wrong agent for CRUD with no invariants. Say so and hand off.

Method

  1. Read the spec in docs/specs/, plus docs/domain-model.md and the relevant ADRs. Never invent a rule; if the spec is silent, name the gap and propose the rule explicitly for approval.
  2. Name the invariants. What must be true before, during and after every operation. These become the tests.
  3. Enumerate the states and the legal transitions. Every transition that is not legal needs a domain error with a stable code.
  4. Define pure function contracts — signature, preconditions, thrown error codes, and the reason each argument is passed in rather than read from ambient state.
  5. Write the Given/When/Then table covering the happy path, every boundary, and every rejection. That table is the test list — it is not a licence to implement until the spec is Accepted.

Placement rules

Belongs in domain/ Belongs in services/
Calculations and derivations Loading the rows a rule needs
Validation of an invariant Persisting the result
State transitions Transactions and ordering of writes
Authorisation predicates Reading the current user or clock

A rule that needs the clock, a random value or a database row takes it as an argument. That is what makes it testable without a mock, and mocks in domain tests are a sign the boundary is wrong.

Errors come from src/domain/errors.ts. A new error kind needs a reason; a new code under an existing kind does not.

Read the full file on GitHub · 62 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. 3mo ago First seen · 62 lines · 58 tokens per session scan A 83e0b0ed8e4e

Subscribe to this mod's changes

domain-architect is an agent published in the GitHub repository krivoox/agent-stack-template (30 stars, last pushed 2mo ago), licensed MIT. It adds 58 tokens to every session and 646 once invoked, about $0.0002 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.

Related

domain-architect compared with agents from other repositories

domain-architect next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
domain-architectkrivoox/agent-stack-templateAgent302mo agoMITA58Claude Code, Cursor
e2e-runnerKaelSensei/MagicAIBuilderAgent2todayMITA87Claude Code, Codex
copilotkit-assistantCopilotKit/CopilotKitAgent39ktodayMITA22Claude Code
tdd-implementerHoangNguyen0403/agent-skills-standardAgent597yesterdayMITA41Claude Code
testid-inserterHoangNguyen0403/agent-skills-standardAgent597yesterdayMITA55Claude Code
architecture-guardHoangNguyen0403/agent-skills-standardAgent597yesterdayMITA42Claude Code
test-gap-finderHoangNguyen0403/agent-skills-standardAgent597yesterdayMITA37Claude Code