Recipe: Add Integration Tests

Utleder integrasjons-/E2E-tester fra ditt Design Doc i stedet for fra koden

av shinpr · shinpr/codex-workflows

Krever oppsett ★ 8.0/10

Recipe: Add Integration Tests — Utleder integrasjons-/E2E-tester fra ditt Design Doc i stedet for fra koden

Hva den gjør

En orchestrator recipe that turns an existing Design Doc into integration and E2E test skeletons, implements them one layer at a time, and runs a review-and-quality loop before committing. Utløses når du ber om to add integration or E2E coverage to code that already has a design document. Skrevet for OpenAI Codex CLI, so its five named subagents do not exist in Claude Code.

Testrapport

Kjørte it against a small in-memory HTTP API with a design doc whose contract table said repeat completion must be idempotent, while the implementation returned 409. The no-skill baseline read the source first and wrote seven tests that all passed — including one that asserted the 409, permanently locking the bug in. Following the recipe, the skeleton came from the design doc rather than the code, and the resulting suite failed exactly on that row (409 !== 200), pluss it asserted a machine-readable error.code on five failure paths where the baseline asserted none. The cost is real setup: it needs a Design Doc already sitting in docs/design with a backend/frontend filename, four sibling skills copied alongside it, and it calls five Codex CLI subagents (acceptance-test-generator, task-executor, integration-test-reviewer, quality-fixer) that a Claude Code user does not have.

Testet på: 2026-07-28 · Claude Code 2.x (agent harness)

Installer

git clone --depth 1 https://github.com/shinpr/codex-workflows.git
mkdir -p ~/.claude/skills
cd codex-workflows && for s in recipe-add-integration-tests testing integration-e2e-testing documentation-criteria llm-friendly-context; do cp -r .agents/skills/$s ~/.claude/skills/$s; done

Kommandoer og eksempelprompter

  • /recipe-add-integration-testsUtleder integrasjons-/E2E-tester fra ditt Design Doc i stedet for fra koden

Skills utløses av vanlige forespørsler — ingen kommandoer å huske. Etter installasjonen aktiverer prompter som disse skillen (på engelsk):

  • Add integration tests to this API using our existing design doc
  • Generate E2E tests from docs/design/auth-design.md for the auth service
  • We have no integration coverage, build it from the tasks API design doc