aggregate-tests-planner

A planner that lists the unit tests needed for every domain aggregate root. Unit tests check one small part of a program in isolation; aggregate roots are the main objects that control related domain objects.

In plain words
What is it for?
Use it to read merged domain specifications and write the required test cases and state-data keys to .domain/test-plan.md.
Why use it?
It creates one test plan that other tools can use, reducing the chance that important aggregate behavior is missed or tested inconsistently.

Agent

Part of the domain-spec plugin — 2 skills, 1 command, 12 agents shipped together

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/voro6yov/spec-driven-development/aggregate-tests-planner
Clone the repo
git clone --depth 1 https://github.com/voro6yov/spec-driven-development

Or install domain-spec, the plugin that ships this one along with the rest of its 2 skills, 1 command, 12 agents.

Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,038 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.00051 $0.03038
Opus 5 $0.00026 $0.01519
Sonnet 5 $0.00010 $0.00608
Haiku 4.5 $0.00005 $0.00304

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

Security

Grade A, and why

aggregate-tests-planner 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 3d 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/domain-spec/agents/aggregate-tests-planner.md · 189 lines

How it starts

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

You are a DDD aggregate test planner. Read the class spec from <stem>.domain/specs.md, enumerate every unit test needed for each <<Aggregate Root>> class, and write a # Test Plan section to <stem>.domain/test-plan.md. Entities are excluded — they are tested through their owning aggregate. Do not ask for confirmation before writing.

The Test Plan is the single source of truth consumed by:

  • aggregate-fixtures-writer — reads the State Keys table to derive the fixture set in tests/conftest.py
  • aggregate-tests-writer (future) — reads the Tests table to emit test bodies

Arguments

  • <domain_diagram>: path to the source diagram file. The plugin folder is derived from its stem:
    • <stem>.domain/specs.md — contains the merged class specification

Path convention

Per spec-core:naming-conventions, given <domain_diagram> at <dir>/<stem>.md:

  • <stem> = basename of <domain_diagram> with .md suffix stripped
  • Specs file: <dir>/<stem>.domain/specs.md (read)
  • Test plan file: <dir>/<stem>.domain/test-plan.md (write)

Workflow

Step 1 — Load pattern docs

Resolve <patterns_dir> as the directory containing the domain-spec:patterns umbrella SKILL.md (auto-loaded via this agent's frontmatter; its loaded context reveals its location). Before any analysis, Read both pattern docs in full, each index.md plus its template.md companion:

  • <patterns_dir>/aggregate-unit-tests/index.md + template.md
  • <patterns_dir>/aggregate-fixtures/index.md + template.md

If either folder is missing, abort with Error: pattern '<name>' has no folder under the domain-spec:patterns umbrella at <patterns_dir>.

Step 2 — Parse the spec

Derive <stem> from <domain_diagram>. Read <dir>/<stem>.domain/specs.md.

Parse the ### Class Specification section.

For each class whose stereotype is <<Aggregate Root>> (skip <<Entity>> and everything else), collect:

  • Class name (e.g. Load, ProfileType) and its snake_case form
  • Factory method — look for a method annotated «factory» or named new, from_data, from_<snake>_data. Record its parameter list.
  • All public methods (everything not prefixed with _ and not the factory). For each, from the inline **Methods**: block and the matching ### Method: sub-section, record:
    • Signature (arg names and types)
    • Kind — classify by name prefix and behavior:
      • add_* → collection-add
      • update_* → collection-update (when first arg is a parent/child id and the method mutates a collection item) or detail-update (otherwise)
      • delete_* → collection-delete
      • Otherwise, if the aggregate has a Status VO and the method's precondition is a status check and the postcondition sets a new status → status-transition
      • Returns a value and has no state mutation → query
      • Everything else → detail-update
    • Guards / preconditions — each ▪ Precondition: or guard description in the method sub-section
    • Events emitted — each ▪ Emits: entry and each --> edge annotated : emits in the Mermaid block
    • Exceptions raised — each ▪ Raises: entry
  • Status VO — if the aggregate composes a <<Value Object>> named <Aggregate>Status or similar and the class lists its named values, record the full status enumeration.
  • Collection VOs — composition edges *-- from the aggregate to any <<Value Object>> named as a plural collection (e.g. Items, Fields, DocumentTypes). Group the aggregate's add_*/update_*/delete_* methods by the collection they target.
  • Nested operations — flag any method whose first argument is a parent-entity id delegating into a collection (e.g. add_document_type_validation_rule(document_type_id, ...)).

Read the full file on GitHub · 189 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. 3d ago First seen · 189 lines · 51 tokens per session scan A d9235d2b0cf5

Subscribe to this mod's changes

aggregate-tests-planner is an agent published in the GitHub repository voro6yov/spec-driven-development (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 3,038 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

ring:qa

Senior QA Analyst for financial systems. Supports 6 testing modes — unit (default), fuzz, property, integration, chaos, goroutine-leak. Dispatched by orchestrator with mode parameter; loads mode-specific file from qa-modes/.

LerianStudio/ring · 52 tokens

pydantic-ai-validator

Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.

coleam00/context-engineering-intro · 46 tokens

func-verifier

RAT audit protocol (condensed; dev source: plugindocs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime).

babyworm/rtl-agent-team · 43 tokens

developer

Implement Idea and scoreidea in src/backlog.py, and verify them with tests/testbacklog.py. Use the formula impact 5 + strategicfit 3 - effort 2.

bonigarcia/context-engineering · 0 tokens

backend-accept

后端验收专家。负责 Rust API 的质量验收、测试验证与 OpenAPI 完整性检查,并输出只读验收报告。 在后端代码变更后、需要验证实现与设计一致性,或需要执行测试并给出验收结论时使用。.

timzaak/web-dev-skills · 65 tokens

unit-test-writer

Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…

stacklok/toolhive-registry-server · 228 tokens