run-testplan
Skill0 starsChanged 6 months agoMITView on GitHub
Run every test case in a TESTPLAN. Use when the user asks to run a testplan, verify a story against its paired testplan, or work with a testplan file under the project's testplans folder. Runs each TC's Command verbatim, marks PASS/FAIL, and auto-files BUG-YYYYMMDD-NN files for every failure before reporting in chat.
In this repository32 other files it gives its agents.
- _00-Project-Management/CLAUDE.mdCLAUDE.md
- autopilotSkill
- close-out-storySkill
- close-phaseSkill
- coreSkill
- critiqueSkill
- curate-toolkitSkill
- documentSkill
- draft-epicSkill
- draft-okrsSkill
- draft-prdSkill
- execute-batch-parallelSkill
- execute-batchSkill
- execute-storySkill
- execution-strategistSkill
- fill-claude-mdSkill
- installSkill
- modeSkill
- monthly-retroSkill
- path-scope-exampleSkill
- peer-reviewSkill
- plan-driftSkill
- refine-backlogSkill
- reflectSkill
- session-startSkill
- split-into-featuresSkill
- split-into-storiesSkill
- start-phaseSkill
- triage-backlogSkill
- updateSkill
- weekly-monitorSkill
- write-outcomesSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
If the user didn't supply it, infer from a recently-completed story or ask.
- Very specific: line 32
Use Read / Glob to detect existence rather than assuming.
- Very specific: line 47
Update the TC's Result: line:
- Very specific: line 53
Update the failed TC's Result: line to reference the bug.
- Distinctive: line 54
If the failure is critical and blocks the rest of the run, STOP further TC execution.
- Distinctive: line 58
After all TCs run, update the testplan's "Sign-off" section.
- Distinctive: line 66
Run TCs serially, not in parallel — easier to attribute failures.
- Distinctive: line 93
When every TC PASSes, close the story through the Definition of Done gate.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tandem: run-testplan (QA hat)
Operate as QA hat. A story has flipped to in-review and its paired testplan needs verification.
Pre-flight — refuse loudly if the kit isn't wired
Before running any TC, run the cheap wiring gate: node _00-Project-Management/93-Scripts/doctor.js --gate (npm: npm run pm:doctor -- --gate). It is silent on success; on an unwired project it exits non-zero and prints one line — kit not wired — run npm run pm:install. If it fails, refuse and surface that message verbatim rather than proceeding — a mis-wired kit must fail loudly, not silently no-op. (STORY-12.2.03)
Inputs needed
- Testplan file path — resolve the
testplansfolder via the path map (node _00-Project-Management/93-Scripts/lib/pm-paths.js resolve testplans; the config is90-Standards/pm-paths.json), then glob forEPIC-NN/FEAT-NN.M/TESTPLAN-NN.M.PP-*.mdunder it. (E.g., it resolves to05-Testin a flattened layout.) - If the user didn't supply it, infer from a recently-completed story or ask.
Load into context
Folder locations are resolved through the path map (pm-paths.js / pm-paths.json) rather than hardcoded, ensuring consistent references across all skills. Use the resolver script to determine physical folders for logical roles such as stories, testplans, bugs, and templates. If NONE of the candidates exist for a given role, note it in the output (don't fabricate scaffolding) and degrade gracefully.
- Testplan file — at the resolved path from "Inputs needed".
- Paired story — resolve the
storiesfolder via the path map and read the corresponding STORY file. - SOP / DoD reference —
_00-Project-Management/90-Standards/SOP.mdif present. If absent, fall back to project-rootCLAUDE.md. - Stack quirks —
_00-Project-Management/90-Standards/PROJECT-CONTEXT.mdif present. If absent, infer frompackage.json+ project-rootCLAUDE.md. - BUG template — resolve the
templatesfolder via the path map and readBUG.template.mdif present. If absent, redraft from a sibling BUG in the same FEAT folder. - BUGs folder (for filing new ones) — resolve the
bugsfolder via the path map. - Project root
CLAUDE.md— always loaded. - Prior HTML context (
html_context:) — if the testplan (or its paired story) frontmatter carries a non-emptyhtml_context:array,Readevery repo-relative path it lists (explorations, annotated diffs, options-comparisons) into context before executing the test cases, so test interpretation is grounded in the same architectural reasoning the human reviewer had. Skip entries that don't resolve (validator R16 already flags missing/traversal paths atpm:lint— don't double-report, just note the skip). Treat the SOP §11 50 KB guideline as advisory: summarise very large files rather than reading them whole.
Use Read / Glob to detect existence rather than assuming; treat missing files as "not present" rather than throwing.
Task
- Flip the testplan's status:
not-started→in-progress. Setstarted_atto now. (Testplans don't usein-review— that's the story's status. If you find the testplan already atin-reviewfrom a prior skill misuse, flip it back toin-progressfor this run, then on todoneif all PASS.) Verify all Preconditions in the testplan are met. If not, STOP and report.
Ingest prior HTML context first. If the testplan (or its paired story) carries a non-empty
html_context:,Readevery listed prior HTML artefact into context now — before any TC runs (see "Load into context" above) — so the expected behaviour is interpreted against the same architectural reasoning the human reviewer had.- Run every TC in order:
- Execute the
Command:exactly as written. No improvisation. No "I'll try a slightly different command."- Runtime-on-PATH exception: if a command fails only because its runtime isn't on the shell PATH (
exit 127/ "command not found" fornode/npm/etc.), that's an environment gap, not a bad command — resolve it perPROJECT-CONTEXT.md"Known stack gotchas" (put the runtime on PATH or invoke its absolute binary), then re-run the same command verbatim. Resolving the runtime ≠ rewriting theCommand:.
- Runtime-on-PATH exception: if a command fails only because its runtime isn't on the shell PATH (
- Compare actual output to
Expected:.- Confound caution (dashboard TCs): if a TC asserts via a bare
grep <substring> DASHBOARD.html(nowindow.__DATA/element qualifier), treat a PASS/FAIL with suspicion — the generator embeds every artefact body intowindow.__DATA, so the substring may match indexed prose, not the rendered feature (precedents: BUG-20260606-02, TESTPLAN-15.2.02/04). Still run theCommand:verbatim, but if the result looks confounded, file a BUG against the testplan (not the product) and flag the TC for re-authoring to a payload-/element-scoped assertion (seesplit-into-storiestestplan-authoring rule).
- Confound caution (dashboard TCs): if a TC asserts via a bare
- Update the TC's
Result:line:PASS — YYYY-MM-DDon success.FAIL — see BUG-YYYYMMDD-NNon failure (link the bug you file).
- Execute the
- If a TC fails — IMMEDIATELY:
- File a BUG at
<resolved-bugs-folder>/EPIC-NN/FEAT-NN.M/BUG-YYYYMMDD-NN-<slug>.mdusingBUG.template.md. Include full repro, environment snapshot, first analysis hypothesis, suggested fix direction. A junior dev should be able to act on it without asking questions. - Update the failed TC's
Result:line to reference the bug. - If the failure is critical and blocks the rest of the run, STOP further TC execution. Otherwise continue.
- A bug filed in chat-only is a process violation — the BUG file must exist on disk before you report the failure in your summary.
- Spec-error exception: if the failure indicates the AC / Expected line is wrong (budget set without measurement, expected vocabulary that contradicts shipped code, etc.) rather than a code defect, file an ADR documenting the spec correction in place of a BUG. The ADR linked from the TC's
Result:line IS the resolution. Don't file both for the same root cause.
- File a BUG at
- After all TCs run, update the testplan's "Sign-off" section.
- If ALL TCs PASS — flip testplan status to
done. Setcompleted_atto now. Recommend/tandem:close-out-storynext. - If ANY TC FAILed — leave testplan as
in-progress. Story staysin-review. The dev needs to fix the bugs and re-run the failed TCs.
Output rules
- Run TCs serially, not in parallel — easier to attribute failures.
- Batched-pattern invocation is OK when commands share a runner (e.g. running multiple jest TCs in one
--testPathPatterninvocation), AS LONG AS the runner's per-file PASS/FAIL output keeps each TC'sResult:line independently attributable. Don't batch across runners (jest + Playwright + bash scripts in one call); those run separately. - For UI test commands: capture screenshot artifacts to the ledger folder under the resolved reports root (
41-Reports/screenshots/canonical or_Reports/screenshots/flattened) if helpful. - Trim log output in BUG evidence sections to ≤30 lines, key frames preserved.
- For long-running test suites that produce noisy logs: spawn a fresh agent (SOP §18) and get back the PASS/FAIL summary — don't paste 500 lines of stdout into the main thread.
Non-negotiable rules from CLAUDE.md
- Frontmatter timestamps.
- Status enum.
- Bug auto-raise on failure — MANDATORY, in the same response as the failure observation.
- Templates rule.
End-of-run summary (always emit)
- TCs PASSED: X / Y
- TCs FAILED: Y - X
- BUGs filed:
<list of paths> - Testplan status:
done|in-progress - Recommended next step:
- All PASS →
/tandem:close-out-story - Any FAIL → assign bugs to Dev hat; re-run testplan after fixes
- All PASS →
Next command
Next: /tandem:close-out-story
When every TC PASSes, close the story through the Definition of Done gate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

