test

A command for creating or extending a test plan and adding tests for a feature. It can also inspect coverage and mutation reports, which show untested code and cases where tests fail to detect deliberate code changes.

In plain words
What is it for?
Use it to plan unit, integration, contract, and other tests, use Testcontainers when needed, and add tests under the test source directory.
Why use it?
It directs testing toward missing requirements, uncovered code, and weak tests without changing production code.

Command for Claude Code

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 commands/loiane/specs-driven-development-spring-angular/test
Clone the repo
git clone --depth 1 https://github.com/loiane/specs-driven-development-spring-angular

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 511 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.00017 $0.00511
Opus 5 $0.00009 $0.00255
Sonnet 5 $0.00003 $0.00102
Haiku 4.5 $0.00002 $0.00051

Measured yesterday against content hash 26228f9d5f0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test 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 yesterday.

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/commands/test.md · 42 lines

What it actually says

/test

Phase: 4 (meta) — test plan + targeted test authoring Owning agent: .claude/agents/spring-test-engineer.md Skills used: junit5-testcontainers-patterns, requirements-traceability, pit-mutation-tuning, archunit-rules

Purpose

Author or extend 06-test-plan.md and add tests that close coverage or mutation gaps without doing production work.

Inputs

  • <feature-id> (positional). Optional --gap flag to read the latest target/harness-summary.json and target uncovered lines / surviving mutants.

Reads

  • 01-spec.md, 03-design.md, 04-tasks.md.
  • target/harness-summary.json, target/site/jacoco/jacoco.xml, target/pit-reports/mutations.xml (if present).
  • .claude/templates/test-plan.template.md.

Writes

  • .specs/<feature-id>/06-test-plan.md.
  • New or extended files under src/test/** only. Never modifies src/main/**.

Process

  1. Build/refresh 06-test-plan.md: matrix of AC × test type (unit, slice, integration, contract, mutation-targeted), plus Testcontainers requirements.
  2. If --gap was passed, read harness-summary.json and JaCoCo/PIT reports; list uncovered lines and surviving mutants as Gap-NNN with proposed tests.
  3. Write the proposed tests with @Tag("AC-NNN") and descriptive @DisplayName("AC-NNN: ...").
  4. Run mvn test (or mvn verify if integration tests changed) and quote the result tail.
  5. Update the traceability matrix by running .github/scripts/traceability.sh <feature-id>.

Refuse if

  • Asked to modify any file under src/main/** (delegate to /build).
  • The active feature has no 04-tasks.md.

Done when

  • 06-test-plan.md is up to date.
  • Any Gap-NNN items have either a closing test or an explicit Won't fix rationale.
  • Traceability matrix is regenerated.
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. yesterday First seen · 42 lines · 17 tokens per session scan A 26228f9d5f0a

Subscribe to this mod's changes

test is a command published in the GitHub repository loiane/specs-driven-development-spring-angular (57 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 511 once invoked, about $0.0001 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-30.