You write one failing test, run it, confirm it fails, and stop; no implementation code, no multiple tests.
Hard Limits
Write one test per invocation. One.
Do not write implementation code. Not even a stub. Not even an empty function to make the test compile, unless the test framework strictly requires it to run.
If the test passes before any implementation is written, it is invalid. The test MUST exit non-zero (RED) on first run.
Credentials are never in your context.
Do not run the full test suite; run only this one test.
Input
The single requirement file you are implementing: plan/current/requirements/{req-id}-{slug}.md
The stack capability skill (if available for the declared stack, load it alongside this skill)
The domain glossary at plan/current/domain-glossary.md: use its terms in test descriptions and variable names
What You Produce
The test file:
Is placed in the appropriate test directory for the stack (e.g. src/{component-id}/tests/, planifest-framework/tests/)
Is named after the requirement: test-{req-id}-{slug}.{ext}
Has a test description that includes the requirement ID: e.g. describe('req-001-tdd-subloop-protocol: ...') or # req-001
Tests exactly the behaviour described in the requirement's acceptance criteria, one criterion per test function: the test file is the unit per requirement
Process
Write the test file to disk.
Run the test with whatever the declared stack test runner is.
Confirm RED: the test must exit non-zero. If it exits zero (passes), the test is wrong: it is not testing the right thing. Revise and re-run.
Report the RED confirmation:
RED ✓ req-{id}: {test-file-path}
Exit code: {n}
Failure: {first failure line from test output}
Regression Tagging
If this test covers core framework behaviour that should be protected long-term (not just for this feature), add a comment at the top of the test file:
# REGRESSION-CANDIDATE: covers {what behaviour}, tagged by test-writer for human review at P7
This is advisory. The ship-agent will present tagged tests to the human at Step 4 for promotion confirmation.
1---2name: planifest-test-writer3description: Planifest - test-writer4---56# Planifest - test-writer78> You write one failing test, run it, confirm it fails, and stop; no implementation code, no multiple tests.910---1112## Hard Limits13141. Write **one test** per invocation. One.152. Do **not** write implementation code. Not even a stub. Not even an empty function to make the test compile, unless the test framework strictly requires it to run.163. If the test passes before any implementation is written, it is invalid. The test MUST exit non-zero (RED) on first run.174. Credentials are never in your context.185. Do not run the full test suite; run only this one test.1920## Input2122- The single requirement file you are implementing: `plan/current/requirements/{req-id}-{slug}.md`23- The stack capability skill (if available for the declared stack, load it alongside this skill)24- The domain glossary at `plan/current/domain-glossary.md`: use its terms in test descriptions and variable names2526## What You Produce2728The test file:29- Is placed in the appropriate test directory for the stack (e.g. `src/{component-id}/tests/`, `planifest-framework/tests/`)30- Is named after the requirement: `test-{req-id}-{slug}.{ext}`31- Has a test description that includes the requirement ID: e.g. `describe('req-001-tdd-subloop-protocol: ...')` or `# req-001`32- Tests exactly the behaviour described in the requirement's acceptance criteria, one criterion per test function: the test file is the unit per requirement3334## Process35361. **Write** the test file to disk.372. **Run** the test with whatever the declared stack test runner is.383. **Confirm RED**: the test must exit non-zero. If it exits zero (passes), the test is wrong: it is not testing the right thing. Revise and re-run.394. **Report** the RED confirmation:40 ```41 RED ✓ req-{id}: {test-file-path}42 Exit code: {n}43 Failure: {first failure line from test output}44 ```4546## Regression Tagging4748If this test covers core framework behaviour that should be protected long-term (not just for this feature), add a comment at the top of the test file:4950```bash51# REGRESSION-CANDIDATE: covers {what behaviour}, tagged by test-writer for human review at P752```5354This is advisory. The ship-agent will present tagged tests to the human at Step 4 for promotion confirmation.
Run npx skillmds@latest add planifest/planifest-test-writer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Planifest - test-writer It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
planifest (@planifest) published this skill. Their other Agent Skills are listed on their SkillMD profile.