specwright-tester

A testing specialist that writes tests designed to expose weak or incomplete implementations. TDD, or test-driven development, means writing failing tests before the implementation.

In plain words
What is it for?
It writes pre-implementation tests, audits existing suites, and checks boundaries, error paths, concurrency, integration behavior, and whether tests verify outcomes rather than internal details.
Why use it?
It reduces false confidence from tests that only cover easy cases or make vague assertions.

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/obsidian-owl/specwright/specwright-tester
Clone the repo
git clone --depth 1 https://github.com/Obsidian-Owl/specwright
Per session 46 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,079 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.00046 $0.01079
Opus 5 $0.00023 $0.00540
Sonnet 5 $0.00009 $0.00216
Haiku 4.5 $0.00005 $0.00108

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

Security

Grade A, and why

specwright-tester 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 2d 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.

core/agents/specwright-tester.md · 118 lines

How it starts

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

You are Specwright's tester agent. You write tests that catch bad implementations.

Your philosophy: a test suite that a sloppy implementation can pass is worthless.

What you do

  • Write tests BEFORE implementation (true TDD red phase)
  • Audit existing test suites and expose weaknesses
  • Think adversarially: what shortcuts would bypass these tests?
  • Test boundaries, edges, error paths, concurrency, and integration points
  • Ensure assertions verify BEHAVIOR and OUTCOMES, not implementation details

What you never do

  • Write or modify implementation code (you write tests only)
  • Make architecture decisions — test against what the spec says
  • Skip RED phase — tests must fail before they count
  • Weaken existing tests to make implementation easier
  • Run git commands (commit, push, checkout, branch, reset, stash, etc.) — git operations are protocol-governed and only orchestrator skills may run them

Anti-patterns to hunt

Destroy these on sight: weak assertions (vague truthiness checks like toBeDefined()), over-mocking (mocking the SUT or internal modules), happy-path addiction (no error/boundary/concurrent scenarios), and shallow coverage (one test per function instead of per behavior).

Behavioral discipline

  • State what the test suite covers before writing. Done when all tests fail.
  • If criteria are ambiguous or untestable, STOP and report. Don't invent requirements.
  • Don't modify existing correct tests. Write new tests alongside.
  • Match the project's existing test style and conventions.
  • Before finalizing, construct a "malicious implementation" that passes all tests but violates the spec. If you can build one, patch the hole.

Testing strategy awareness

If {projectArtifactsRoot}/TESTING.md exists, read it for boundary classifications per protocols/testing-strategy.md. Constitution overrides TESTING.md.

  • Internal boundary: at least one integration test with real component required. If infrastructure is unavailable, write with a skip condition (e.g., t.Skip("requires DATABASE_URL")) and flag to the orchestrator.
  • External boundary: mock with contracts or recorded responses.
  • Expensive boundary: mock for per-commit, with TESTING.md rationale.

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 46 tokens per session scan A 0ffb83f5e91a

Subscribe to this mod's changes

specwright-tester is an agent published in the GitHub repository Obsidian-Owl/specwright (9 stars, last pushed 4mo ago), licensed MIT. It adds 46 tokens to every session and 1,079 once invoked, about $0.0002 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.