| name | write-tests |
| description | Write meaningful tests from acceptance criteria, risk, security invariants, module boundaries, and regression history. Use when adding or updating tests, writing a test plan, or covering a new feature or bug fix. |
Skill: Write Tests
Purpose
Create professional tests that prove important behavior, not random happy paths.
Inputs
- Feature PRD or task.
- Acceptance criteria.
- Changed files or planned modules.
- Known risks.
Required Reading
docs/50-quality/TESTING_STRATEGY.md
docs/50-quality/QUALITY_GATES.md
docs/20-security/SECURITY_MODEL.md
docs/60-engineering/ENGINEERING_STANDARDS.md
- Relevant feature
TEST_PLAN.md
- Relevant module
TEST_PLAN.md
Output Files
- Test files under the appropriate
tests/ area.
- Updated
TEST_PLAN.md when test strategy changes.
- Completion evidence listing commands and results.
Process
- Map acceptance criteria to test cases.
- Add risk-based tests for unsafe paths, overwrites, symlinks, config validation, generated output,
and CLI behavior as relevant.
- Prefer unit tests for pure logic and integration tests for command behavior.
- Add golden tests for generated docs and templates.
- Name tests by behavior.
- Document skipped tests and remaining risk.
Stop Conditions
Stop and request human decision if:
- Requirements are not testable.
- The requested test would require runtime network, telemetry, cloud, MCP, or AI API behavior
without review.
- Security-sensitive behavior lacks a documented expected result.
- The test approach conflicts with engineering standards.
Quality Bar
- Tests derive from requirements and risk.
- Security invariants are covered.
- Test names describe behavior.
- Engineering standards for evidence and skipped checks are followed.
- The completion report includes commands and results.