agentsclimarketplace

Story decomposition

Skill thesyntaxninja/syntaxninja-dojo/skills/story-decomposition

Use when a large task needs to be broken into independent, verifiable stories with pass/fail acceptance criteriaFrom its SKILL.md

Install
npx -y skills add thesyntaxninja/syntaxninja-dojo --skill story-decomposition

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.4 KB, as published. Nobody here has run it

Story Decomposition

Quick Reference

Break a large task into independent stories. Each story must be completable in one context window, have pass/fail acceptance criteria, and be verifiable in isolation.

When to Use

  • Task is too large for one context window
  • writing-plans identified the need for decomposition
  • Ralph loop escalation is being prepared
  • User asks to break work into stories or chunks

When NOT to Use

  • Task fits in one session (just use executing-plans)
  • Task can't be decomposed into independent pieces
  • Exploratory work with no clear deliverables

Core Process

Step 1: Understand the Full Scope

Before decomposing:

  1. Read the plan or requirements thoroughly
  2. Identify all deliverables
  3. Map dependencies between pieces of work
  4. Identify the critical path

Step 2: Identify Story Boundaries

Good stories have these properties:

  • Independent: Can be implemented without other stories being done first (or with minimal, explicit dependencies)
  • Verifiable: Has a concrete test or check that proves it works
  • Small enough: Completable in one context window (~one focused session)
  • Valuable alone: Delivers something useful even if other stories aren't done yet

Step 3: Write Stories

Each story follows this format:

## Story N: <Title>

**Goal**: [One sentence — what this delivers]

**Dependencies**: [Story numbers that must complete first, or "none"]

**Files**:
- `path/to/file.ts` — [what changes]

**Acceptance Criteria**:
- [ ] [Concrete, verifiable condition]
- [ ] [Another condition]

**Verification Command**:
```bash
# The exact command(s) to prove this story passes
npm test -- --grep "story-related-tests"

### Step 4: Order Stories

1. Foundation stories first (types, interfaces, schemas)
2. Core logic second (business rules, data layer)
3. Integration third (wiring pieces together)
4. Polish last (error handling, edge cases, UI refinement)

Stories with no dependencies can run in any order.

### Step 5: Validate the Decomposition

Check:
- [ ] Every deliverable from the original plan is covered by at least one story
- [ ] No story is too large (>200 lines of changes is a red flag)
- [ ] Dependencies form a DAG (no circular dependencies)
- [ ] Each story's acceptance criteria are objectively pass/fail
- [ ] The verification command actually tests what the story claims

## Anti-Patterns

| Anti-Pattern | Why It's Wrong |
|--------------|----------------|
| Stories that depend on everything | Not independent. Reorder or merge. |
| "And then do the rest" as a story | Not decomposed. Break it down further. |
| Acceptance criteria like "works correctly" | Not verifiable. What does "correctly" mean? |
| Stories without verification commands | How does the loop know it passed? |
| 20+ stories for a medium task | Over-decomposed. Merge related work. |
| Stories that touch the same files | Will cause conflicts in parallel execution. |

## Chaining

REQUIRED: syntaxninja-dojo:ralph-loop (when stories feed into a training loop)
OPTIONAL: syntaxninja-dojo:prd-generator (to produce the formal PRD document)

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.