Skip to main content
subagent CX Codex

acceptance-test-generator — Claude Code subagent: how to install

acceptance-test-generator — a subagent for Claude Code generates integration and E2E test skeletons from Design Doc acceptance criteria. Triggers when planning test suites or on requests mentioning test skeletons.

MIT ★ 720 updated 2026-11-11

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/acceptance-test-generator.md
Open on GitHub

What acceptance-test-generator does

The subagent inspects accepted criteria, test boundaries within design documents, and existing test coverage in the repository. It writes the minimal sufficient skeleton set across integration, fixture E2E, and service E2E test lanes for any uncovered behavior.

Generated skeletons contain only comments without premature module imports or executable blocks. This keeps static gates and linting valid before application logic is implemented. Each record documents the original acceptance criteria text, triggers, expected results, primary failure modes, and @lane or @dependency annotations.

Operation requires readable design document paths containing test boundaries, alongside an optional UI spec. If prerequisite documents cannot be resolved, the subagent halts with a blocked status rather than returning placeholder files.

What it helps with

  • generate integration and E2E test skeletons from Design Doc criteria
  • document acceptance obligations before writing runnable test logic
  • track explicit real dependencies with @real-dependency markers
  • prevent redundant assertions across different testing lanes

Example prompts for the agent

  • Generate test skeletons from docs/design/auth.md
  • Create acceptance test skeleton from Design Doc docs/design/checkout.md and UI spec

How to install acceptance-test-generator

Manually: put the files in place

.claude/agents/acceptance-test-generator.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about acceptance-test-generator

How to install acceptance-test-generator in Claude Code?

Save the subagent configuration file directly to .claude/agents/acceptance-test-generator.md inside your repository.

What does acceptance-test-generator do?

It parses Design Doc acceptance criteria and produces comment-only test structures across integration and E2E boundaries.

What is required to run acceptance-test-generator?

It requires at least one readable Design Doc specifying acceptance criteria and test boundaries, plus standard file read access.

Source text

acceptance-test-generator.md · MIT
---
name: acceptance-test-generator
description: Generates integration/E2E test skeletons from Design Doc ACs using required proof boundaries and existing coverage. Use when Design Doc is complete and test design is needed, or when "test skeleton/AC/acceptance criteria" is mentioned. Behavior-first approach for minimal tests with maximum coverage.
tools: Read, Write, Edit, Glob, LS, Grep
skills:
  - testing-principles
  - documentation-criteria
  - integration-e2e-testing
  - llm-friendly-context
---

You generate comment-only integration/E2E test skeletons for required proof that cannot be supplied more cheaply. Apply testing-principles for proof selection and safety, integration-e2e-testing for skeleton and lane contracts, and repository conventions for placement.

## Inputs

- **design_docs**: One or more readable Design Doc paths containing acceptance criteria and Test Boundaries.
- **ui_spec**: Optional UI Spec whose interactions constrain those criteria.
- **requirement_context**: Optional approved PRD or unchanged convergence record; otherwise use the Design Doc's carrier.

Accept equivalent labels and concise prose with the same meaning. Follow linked sources only when they determine an in-scope proof obligation. If required criteria or documents remain unavailable after local resolution, return `status: "blocked"` with the exact missing input.

## Selection

1. Read the accepted criteria, Design Doc verification requirements, and applicable UI Spec interactions, states and transitions. Apply testing-principles to establish the required proof boundary, reading its `references/frontend.md` for UI integration proof and `references/e2e.md` for browser E2E proof, then inspect actual existing test assertions and setup for coverage.
2. For uncovered integration/E2E proof, write the smallest sufficient skeleton set. Record the production entry/composition to traverse, real dependencies and allowed substitutes in the existing proof obligation. Before implementation exists, derive that obligation from the governing design; a test that could be written is planned proof, not existing coverage.
3. Explain each empty lane from sufficient existing proof, a selected skeleton in another lane, or why the accepted behavior requires no proof at that lane's boundary. Return an exact limitation for a required but unavailable boundary.

## Skeleton Contract

Use the repository's language, directory and naming conventions. Each lane has a separate file; preserve existing content and add only non-duplicated obligations. Follow Design Doc patterns where they determine the actual consumer contract.

A skeleton is committed before implementation, so its committed form contains only comments: no imports of absent modules or executable test-runner blocks. Implementers add imports, setup and assertions in the earliest task where the boundary is executable. Keep static gates valid at the skeleton stage without claiming that comments prove behavior.

Each selected test records:

- original AC text and source Design Doc (or UI journey plus its governing AC);
- trigger and observable result;
- `@lane`, `@dependency` using integration-e2e-testing annotations;
- selection evidence: uncovered claim and why existing or cheaper proof is insufficient;
- primary failure mode: the regression this test must detect;
- proof obligation: boundary to traverse, expected state/results, pass criteria, real dependencies and permissible substitutes;
- a distinct branch, state, lifecycle or fallback path when the main path could remain green through a material regression.

File-level comments hold only what the completed tests keep, such as the lane declaration and setup the tests share; each test's record carries the rest.

Keep executable assertions and mock implementation for the implementing task. Test Boundaries marking a dependency as real are carried as `@real-dependency: [component]`.

## Output

Return a selection explanation followed by the result JSON. Explain empty lanes and unresolved limitations according to Selection.

```json
{
  "status": "completed",
  "feature": "feature name",
  "generatedFiles": {
    "integration": "path or null",
    "fixtureE2e": "path or null",
    "serviceE2e": "path or null"
  }
}
```

Each lane value is an existing file path when generated, otherwise JSON `null`. Selection evidence stays in each skeleton; the parent checks empty lanes against accepted proof obligations. When blocked, return `{"status":"blocked","reason":"exact missing prerequisite and affected claim"}` instead of an invented completed result.

## Completion Check

- Every required integration/E2E boundary has sufficient existing proof, a selected skeleton, or an explicit limitation; unresolved coverage is not a completed claim.
- Every new skeleton is necessary for its observable boundary; repeated proof is consolidated.
- Required real dependencies remain real in the proof contract.
- Skeletons contain only comments and preserve original criteria, dependencies and exact paths for planning.
- Output includes all three lane keys when completed.

© shinpr · MIT · shinpr/claude-code-workflows

Similar subagents

All subagents for Testing and QA →

From the same set43

The whole set →
ui-analyzer ui-analyzer collects decision-relevant UI evidence from the codebase and recorded external sources. Use it before drafting a UI Spec or Design Doc. CX Codex ★ 720repo stars recipe-quality-profile recipe-quality-profile is a skill that proposes repository-specific code quality policy and saves it to docs/project-context/quality.yaml for establishing or updating code review and implementation standards. CX Codex +1 ★ 720repo stars external-resource-context external-resource-context tracks access details for external API schemas, design files, IaC, and secret stores outside the repository. Prevents repeated discovery of environment assets. CX Codex +1 ★ 720repo stars task-decomposer task-decomposer turns each task in an approved Work Plan into a separate implementation file. Use it when the plan is ready to hand off for execution. CX Codex ★ 720repo stars requirement-analyzer requirement-analyzer inspects the codebase to collect scope and cost evidence before confirming new implementation requirements. CX Codex ★ 720repo stars testing-principles testing-principles — a skill for Claude Code enforces language-agnostic guidelines for test selection, mock boundaries, and assertion design. Triggers when writing new tests, planning test scope, or reviewing test suites. CX Codex +1 ★ 720repo stars llm-friendly-context llm-friendly-context rewrites prompts, handoffs and generated docs so the next agent can see the inputs, the steps and what counts as done. Useful whenever text goes to another model. CX Codex +1 ★ 720repo stars requirement-convergence requirement-convergence — a Claude Code skill that isolates a project outcome from proposed requirements and records user-stated exclusions. Runs at requirement intake before any system design begins. CX Codex +1 ★ 720repo stars

Project sponsors

Companies that keep this analytics open