Prompt file imported from samkeller/comptes-chateau (
.github/prompts/write-tests.prompt.md). Copyright stays with the author.
agent: 'agent' model: GPT-5.3-Codex tools: ['codebase', 'search', 'findTestFiles'] description: 'Generate or update tests for changed behavior in frontend or backend'
Write Tests
Mission
Generate focused tests that validate changed behavior and prevent regressions.
Inputs
- Target file(s) or feature
- Scope (
unit,integration, or both) - Critical edge cases
If scope is not provided, infer it from the type of change and explain the choice.
Workflow
- Identify existing test conventions and file locations.
- Cover happy path, edge cases, and failure scenarios.
- Keep tests deterministic and independent.
- Avoid implementation-detail assertions when behavior-based assertions are possible.
- Verify the generated tests align with current project scripts and tooling.
Output Expectations
- New or updated test files.
- Short coverage summary.
- Any remaining testing gaps.