nw-test-optimizer

An AI agent that reduces the number of automated tests while keeping their important behavior coverage. TDD, or test-driven development, is a practice of using tests to guide code changes.

In plain words
What is it for?
Use it after a feature is added, during scheduled maintenance, or when reviewing tests for duplicates, unnecessary parameter combinations, and opportunities to combine coverage.
Why use it?
It helps when a test suite is slow, repetitive, or filled with tests that check the programming language or internal code shape instead of user behavior.

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/nwave-ai/nwave/nw-test-optimizer
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave
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 227 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.00227
Opus 5 $0.00000 $0.00113
Sonnet 5 $0.00000 $0.00045
Haiku 4.5 $0.00000 $0.00023

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

Security

Grade A, and why

nw-test-optimizer 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.

docs/reference/agents/nw-test-optimizer.md · 18 lines

What it actually says

nw-test-optimizer

Use to minimize test count while preserving coverage. Invoke after a feature lands, when a suite feels slow or noisy, on a scheduled audit, or whenever the maintainer suspects overtesting. Detects byte-identical pairs, parametrize-inflation, language-guarantee tests, AST-shape tests, and migration-collapse opportunities. Never modifies production code.

Wave: Other Model: sonnet Max turns: 40 Tools: Read, Edit, Write, Bash, Glob, Grep, Task

Commands

Skills

  • nw-tdd-methodology — Deep knowledge for Outside-In TDD - double-loop architecture, ATDD integration, port-to-port testing, walking skeletons, and test doubles policy
  • nw-test-optimization — Methodology for minimizing test count while maximizing behavioral coverage - behavior definition, anti-pattern catalog, consolidation patterns, stopping criterion, coverage-preserving validation
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 · 18 lines · 0 tokens per session scan A b686d3d56440

Subscribe to this mod's changes

nw-test-optimizer is an agent published in the GitHub repository nWave-ai/nWave (602 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 227 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

product-manager

Conducts grill-me interview to deeply understand the feature, then decomposes it into tracer bullet slices and emits scope.json. Runs as the sole Plan phase agent. Use for /sdlc-plan to kick off any feature.

saitarrun/Devforge-ai · 48 tokens

devops-engineer

Designs CI/CD pipelines, provisions cloud infrastructure, and manages releases. Absorbed cloud-engineer and release-manager responsibilities. Runs as the sole Ship phase agent. Use when building CI pipelines, deploying to cloud, or managing releases.

saitarrun/Devforge-ai · 52 tokens

performance-engineer

Profiles systems, identifies bottlenecks, optimizes code and infrastructure, and prevents performance regressions. Uses flame graphs, benchmarking, and data-driven analysis. Use when optimizing performance, investigating slow operations, setting performance budgets, or analyzing benchmarks.

saitarrun/Devforge-ai · 52 tokens

technical-writer

Writes API documentation, SDK guides, tutorials, developer guides, and external communication. Makes technical concepts accessible to diverse audiences. Maintains docs-as-code philosophy with examples and runnable code. Use when creating API docs, writing developer guides, documenting SDKs, or creating tutorials.

saitarrun/Devforge-ai · 58 tokens

ux-designer

Conducts user research, defines personas, creates wireframes, and produces design tokens and component specs. Runs once at the start of the Build phase when hasui is true. Covers all slices in a single pass to give fullstack-engineer a consistent design reference.

saitarrun/Devforge-ai · 57 tokens

qa-engineer

Writes cross-slice E2E tests covering flows that span multiple slices. Runs once after all feature slices complete in the Build phase. Reads implementation-log.md to understand the full shape of what was built. Flags which slices caused any E2E failures for targeted retry.

saitarrun/Devforge-ai · 58 tokens