split-into-stories
Skill0 starsChanged 6 months agoMITView on GitHub
Split a Feature into Stories AND paired Testplans in the same response. Use when the user asks to split / decompose a feature into stories, asks to write stories for a feature, asks to create stories + testplans, or invokes /tandem:split-into-stories. Operates as PM hat. Enforces the kit's MANDATORY Story → Testplan pairing rule — aborts (writes nothing) if it cannot produce both story and matching testplan in the same response.
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
- run-testplanSkill
- session-startSkill
- split-into-featuresSkill
- start-phaseSkill
- triage-backlogSkill
- updateSkill
- weekly-monitorSkill
- write-outcomesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Follow that prompt verbatim.
- Distinctive: line 25
Only when both drafts are complete and consistent (every AC maps to ≥1 TC, every TC has a real runnable command), commit both files to disk …
- Distinctive: line 34
If the user didn't supply one, ask: "Which Feature file should I decompose?
- Very specific: line 38
Use Read / Glob to detect existence.
- Very specific: line 50
Read the source Feature's ## Acceptance criteria.
- Very specific: line 61
Every TC has a runnable Command: (no manual steps, no "have a human verify").
- Very specific: line 64
Validate before writing: every AC in the draft Story is covered by ≥1 TC in the draft Testplan.
- Distinctive: line 65
Commit both files to disk in the same response.
- Very specific: line 68
Update the Feature's ## Stories section with relative links to the new Story files.
- Distinctive: line 69
Show the file tree of what you'll create before writing: Wait for user approval.
- Very specific: line 73
Every story this skill writes leaves carrying a usage_estimate:.
- Very specific: line 84
No number comes back when estimate: is missing or XL.
- Distinctive: line 93
If any AC is not machine-testable, stop and flag: "AC-3 'looks good' is not testable.
- Distinctive: line 94
If a Story estimates to XL, propose splitting before writing.
- Distinctive: line 95
If a Story has > 5 ACs, propose splitting (AC explosion → TC bloat).
- Very specific: line 96
Do not mark any Story ready — that requires DoR gate via a separate refine step.
≈ “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: split-into-stories (PM hat)
Operate as PM hat. The user has an approved Feature and needs to decompose it into work-sized Stories. Each Story ships with its paired Testplan in the same response — this is the kit's most load-bearing rule.
This skill is the slash-command wrapper for the kit's canonical story-decomposition prompt. The prompt is the source of truth; this file is the entry point.
Source of truth
@_00-Project-Management/92-Prompts/04-split-feature-into-stories.md
Follow that prompt verbatim. The sections below add only the slash-command-specific glue + the paired-testplan enforcement contract — do not re-declare the prompt's content here.
Paired-testplan enforcement (MANDATORY)
Per SOP §11 — "Story → Testplan pairing — MANDATORY" — every Story file under the resolved stories folder (via node _00-Project-Management/93-Scripts/lib/pm-paths.js resolve stories), organized as EPIC-NN/FEAT-NN.M/STORY-NN.M.PP-*.md, requires a paired Testplan in the resolved testplans folder, organized as EPIC-NN/FEAT-NN.M/TESTPLAN-NN.M.PP-<slug>.md, written in the same response. Folder locations are resolved through the path map (pm-paths.json) rather than hardcoded.
This skill enforces the rule structurally, not as an honour-system convention:
- Draft both the Story and its Testplan in memory first — every AC, every TC, every runnable
Command:. - Only when both drafts are complete and consistent (every AC maps to ≥1 TC, every TC has a real runnable command), commit both files to disk in the same response.
- If for ANY reason the paired Testplan cannot be drafted (AC is not machine-testable, command convention unknown, etc.), abort — do not write the Story file. Tell the user which AC blocked the pairing and ask them to either rewrite the AC to be testable or accept dropping it. Do not silently leave an orphan Story.
- Story + Testplan numbering is lockstep:
STORY-NN.M.PP↔TESTPLAN-NN.M.PPfor the samePP. The skill picksPPonce and uses it for both files.
This contract IS the differentiator vs. the plain paste-prompt. The prompt advises pairing; this skill rejects the violation.
Inputs needed
- Path to the source Feature file under the
featuresfolder (resolve via the path map:node _00-Project-Management/93-Scripts/lib/pm-paths.js resolve features; e.g._00-Project-Management/31-Features/EPIC-NN/FEAT-NN.M-<slug>.md). - If the user didn't supply one, ask: "Which Feature file should I decompose? Paste the path or the FEAT-NN.M id."
Load into context
Use Read / Glob to detect existence. Treat missing files as "not present" rather than throwing. Folder locations are resolved through the path map (pm-paths.js / pm-paths.json) rather than hardcoded.
- Source Feature — at the resolved path above. Read fully — especially the
## Acceptance criteriachecklist (each criterion ~ 1 story). - Parent Epic — resolve the
epicsfolder via the path map and readEPIC-NN-*.mdfor upstream context. - SOP —
_00-Project-Management/90-Standards/SOP.mdfor DoR, estimation, status enum, frontmatter contract. - Project context —
_00-Project-Management/90-Standards/PROJECT-CONTEXT.mdfor runnable test command conventions (which test runner, what ports, how to invoke). - Story + Testplan templates — resolve the
templatesfolder via the path map and readSTORY.template.md+TESTPLAN.template.md. Use both verbatim — do not redraft section headings from memory. - Existing Stories under this Feature — resolve the
storiesfolder via the path map and globEPIC-NN/FEAT-NN.M/STORY-NN.M.PP-*.mdto find next-freePP(zero-padded to 2 digits). SamePPis used for the paired Testplan. Create both subfolders if missing. - Project root
CLAUDE.md— for project-specific overrides.
Task
- Read the source Feature's
## Acceptance criteria. Each criterion is typically one Story. If a criterion implies > L work, split into multiple Stories.- Split gate (artefact economy —
90-Standards/ARTEFACT-ECONOMY.md): produce the fewest Stories that carry the Feature's testable claims. An AC without a falsifiable claim of its own folds into a sibling Story — it never becomes a thin Story. When unsure whether to split, don't.
- Split gate (artefact economy —
- For each derived story, draft both files in memory first (Story + Testplan). Do not write to disk until both drafts are complete and consistent.
- Story file content:
- Use
STORY.template.mdverbatim. - Fill
As / I want / So that, AC checkboxes, technical notes, dependencies, references. - Frontmatter:
status: not-started,created_at: <ISO 8601 now>, other timestamps empty,epic: EPIC-NN,feature: FEAT-NN.M,id: STORY-NN.M.PP,ai_review: pending. - Set
type_of_work:to a concrete discipline (frontend/backend/infra/data/docs) — never leave the template placeholder (it's a DoR gate per SOP §6 and fuels sub-agent assignment). Addsuggested_agents: [agent, …]only when a specific specialist clearly fits — it overrides the PROJECT-CONTEXTtype_of_work → sub-agentmap (SOP §11.3 / FEAT-03.1). Most stories need onlytype_of_work.
- Use
- Paired Testplan file content:
- Use
TESTPLAN.template.mdverbatim. - One row in the AC→TC map per Story AC, ≥1 TC per AC.
- Every TC has a runnable
Command:(no manual steps, no "have a human verify"). Use commands appropriate to the stack (see PROJECT-CONTEXT.md). - Never assert by grepping the whole
DASHBOARD.htmlfor a substring that could appear in indexed artefact prose. The generator embeds every artefact'sbodyHtmlinto thewindow.__DATApayload, so a baregrep <substring> DASHBOARD.htmlis confounded — the substring almost always also appears in some artefact's prose (including the very story/testplan that discusses the feature under test). This produced three false results (BUG-20260606-02, TESTPLAN-15.2.02, TESTPLAN-15.2.04). Instead: (a) parse thewindow.__DATApayload and assert the relevant array/field, (b) assert a specific rendered element (e.g.grep '<h1 class="app-title">'), or (c) use a sentinel that cannot appear in any artefact body. Extraction one-liner for (a):node -e 'const D=JSON.parse(require("fs").readFileSync("…/DASHBOARD.html","utf8").match(/window\.__DATA = (\{[\s\S]*?\});<\/script>/)[1]); /* assert on D */'. - Frontmatter:
id: TESTPLAN-NN.M.PP,story: STORY-NN.M.PP,feature: FEAT-NN.M,epic: EPIC-NN,status: not-started,created_at: <ISO 8601 now>.
- Use
- Validate before writing: every AC in the draft Story is covered by ≥1 TC in the draft Testplan; every TC has a real
Command:. If validation fails, abort per the enforcement contract above. - Commit both files to disk in the same response. Number stories sequentially within the Feature (.01, .02, .03 …).
- As each Story file is written, run the usage-estimate producer step (below) so the story leaves this skill carrying a
usage_estimate:and its basis line. - As each Story file is written, apply the
write-outcomesrules inline to the story's title, acceptance criteria, and technical content to produce the outcome line; dispatch a sub-agent only under ADR-0105 — write-outcomes runs inline first, rather than dispatching a sub-agent per artefact's named conditions (this producer's own context is near its limit, or an isolation-worthy batch run). Write the single-line outcome (verbatim, no markdown) into that Story'soutcome:frontmatter field — in the same response.
- As each Story file is written, run the usage-estimate producer step (below) so the story leaves this skill carrying a
- Update the Feature's
## Storiessection with relative links to the new Story files. - Show the file tree of what you'll create before writing. Wait for user approval.
Usage-estimate producer step (MANDATORY at authoring)
Every story this skill writes leaves carrying a usage_estimate:. Run it once per story file,
immediately after the file is written:
node _00-Project-Management/93-Scripts/usage-estimate.js --story <story-path>- Fill-if-missing, never overwrite — a populated estimate is preserved verbatim and the file is left byte-identical.
- It writes the number and a one-line basis into
## Technical notes. Do not hand-write either. - No number comes back when
estimate:is missing orXL. Both are already blockers here (this skill proposes splitting an XL before writing it), so fix the band rather than the estimate. - List the produced figures in the end-of-session summary.
The derivation itself is written in exactly one place — do not restate it here or in any
skill: _00-Project-Management/90-Standards/USAGE-ESTIMATE-HEURISTIC.md.
Output rules
- If any AC is not machine-testable, stop and flag: "AC-3 'looks good' is not testable. Rewrite as e.g. 'matches mockup screenshot within 5% pixel delta', or accept dropping it." Do not invent a fake TC to hide the gap.
- If a Story estimates to XL, propose splitting before writing.
- If a Story has > 5 ACs, propose splitting (AC explosion → TC bloat).
- Do not mark any Story
ready— that requires DoR gate via a separate refine step.
Non-negotiable rules from CLAUDE.md
- Frontmatter timestamps (quoted ISO 8601 with offset, from system clock).
- Status enum (
not-startedon creation). - Story → Testplan pairing — MANDATORY (enforced above; reject violations, don't bend).
- Templates rule — use
STORY.template.mdandTESTPLAN.template.mdverbatim. - Project-specific test conventions from
PROJECT-CONTEXT.md(ports, commands, etc.).
End-of-session summary (always emit)
- Stories created: N (list paths)
- Testplans created: N (list paths)
usage_estimateproduced per story: list ofSTORY-NN.M.PP = <tokens>(or the stated reason none was produced)- Pairing verified: yes / no (must be yes — otherwise the writes shouldn't have happened)
- ACs flagged as not machine-testable: list, or "none"
- Estimated total: <days/weeks>
- Suggested first story to pull: STORY-NN.M.PP (lowest dependency, smallest)
Next command
Next: /tandem:refine-backlog — promote selected stories not-started → ready after DoR gate.
Or, if a story is obviously DoR-clean already: /tandem:execute-story <story-path> — start work directly.
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.

