home / skills / makfly / superpowers-symfony / tdd-with-pest
This skill helps you drive Symfony development with deterministic tests using pest, enabling regression protection and efficient TDD workflows.
npx playbooks add skill makfly/superpowers-symfony --skill tdd-with-pestReview the files below or copy the command above to add this skill to your agents.
---
name: symfony:tdd-with-pest
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
description: Drive Symfony delivery with deterministic tests and strong regression protection. Use for tdd with pest tasks.
---
# Tdd With Pest (Symfony)
## Use when
- Building regression-safe behavior with TDD/functional/e2e tests.
- Converting bug reports into executable failing tests.
## Default workflow
1. Write failing test for target behavior and one boundary case.
2. Implement minimal code to pass.
2. Refactor while preserving green suite.
2. Broaden coverage for invalid/unauthorized/not-found paths.
## Guardrails
- Prefer deterministic fixtures/builders.
- Assert observable behavior, not internal implementation.
- Keep tests isolated and stable in CI.
## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
## Output contract
- RED/GREEN/REFACTOR trace.
- Test files changed and executed commands.
- Coverage and confidence notes.
## References
- `reference.md`
- `docs/complexity-tiers.md`
This skill drives Symfony delivery through deterministic tests and strong regression protection using Pest. It codifies a RED/GREEN/REFACTOR workflow tailored to TDD, functional, and end-to-end scenarios. The focus is on turning bug reports into executable failing tests and delivering minimal, safe changes to production.
You write a failing Pest test that captures the target behavior and at least one boundary case, then implement the smallest change to make the test pass. The skill records the RED/GREEN/REFACTOR trace, lists changed test files and executed commands, and reports coverage and confidence notes. It enforces deterministic fixtures and isolated tests to keep CI stability high.
What output should I expect after a TDD session?
You get a RED/GREEN/REFACTOR trace, a list of changed test files, the exact commands executed, and notes about coverage and confidence.
How do I keep tests deterministic?
Use fixture builders, fixed timestamps or time fakes, seeded data, and avoid reliance on external flaky services; prefer in-memory doubles for slow or unstable dependencies.
When should I broaden coverage beyond the initial passing tests?
After the first green cycle and any refactor, add tests for invalid inputs, authorization checks, and not-found cases to protect the behavior surface from regressions.