Test Plan
FreeAdd the smallest test that would have caught the bug, or a checklist if the change is visual.
Purpose
Avoid giant generated test suites that do not assert the behavior.
Procedure
--- name: test-plan description: Add the smallest test that would have caught the bug, or a checklist if the change is visual. ---
Test Plan
Purpose
Avoid giant generated test suites that do not assert the behavior.
Procedure
State the behavior in one sentence before writing the test.
Choose the lowest layer that can see the bug:
- Pure rule: a unit test with no browser and no database.
- Query or permission: a test against the database if the project already has one. Do not spin a new harness for a single task.
- Layout or interaction: a short manual checklist (viewport, empty, error) if there is no browser harness. Do not pretend a component render test checked contrast.
Write the assertion on the outcome (locked content is null, a second save is rejected), not on intermediate call counts.
Do not snapshot large markup. Do not disable a failing test. If a test is flaky, fix the cause or do not add it.
Name the test after the behavior: "premium skills stay locked until the subscription is active".
Do not add tests for code you did not change.
Example requests
1. Lock a rule
Request: Add a test for the premium read rule using Test Plan. One behavior per test. Expected: Tests for locked, unlocked, and free content. No snapshot of the whole page.
Dependencies
None. Work in the repository that is already open. Do not add packages unless the procedure names one.
Compatibility
This document follows the Agent Skills layout (a folder named test-plan containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.
Example prompts
Lock a rule
Add a test for the premium read rule using Test Plan. One behavior per test.
Expected: Tests for locked, unlocked, and free content. No snapshot of the whole page.
Choose the agent
This skill is installed for one agent at a time. Pick the section you are using.
Related
- Repro Debugging
Reproduce a bug with the smallest input, then change one thing and show the before and after.
- Strict TypeScript
Tighten types at the boundary you are editing: no any, no fake optionals, names that match the runtime.
- Schema Contracts
Validate input at the server boundary and return a stable error shape.
Reviews
No reviews yet.
Sign in to review.
Report a problem
Inaccurate steps, an unsafe instruction, or a licensing concern.
Sign in to report.