@pavp/storywright 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,196 +1,186 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story-split
|
|
3
|
-
description:
|
|
3
|
+
description: Split an oversize story into an epic plus Cohn+Gherkin children. Mechanical NxN dep matrix and per-child V audit. Inherits all hard rules from storywright-base.
|
|
4
4
|
trigger: "/story-split | split this story | divide this story | dividir historia | this is too big"
|
|
5
|
-
intent: Splitting skill
|
|
6
|
-
version:
|
|
5
|
+
intent: Splitting skill driven by INVEST failure reasons. Behavior 100% identical to siblings except for source (oversize story) and split-behavior (ALWAYS produces epic + N children, never a single story).
|
|
6
|
+
version: 2.3.0
|
|
7
7
|
inputs:
|
|
8
8
|
- text
|
|
9
9
|
- image
|
|
10
10
|
- figma-link
|
|
11
11
|
outputs:
|
|
12
|
-
- split-plan.md
|
|
13
12
|
- epic.md
|
|
14
|
-
- story-1.md
|
|
13
|
+
- story-1.md
|
|
14
|
+
- story-2.md
|
|
15
|
+
- .storywright-context.json
|
|
15
16
|
composes:
|
|
17
|
+
- _components/storywright-base
|
|
16
18
|
- _components/invest-checklist
|
|
17
19
|
- _components/clarification-questions
|
|
20
|
+
- _components/acceptance-criteria
|
|
21
|
+
- _components/jira-wiki-formatter
|
|
18
22
|
---
|
|
19
23
|
|
|
20
24
|
## Purpose
|
|
21
25
|
|
|
22
|
-
When a story is an epic in disguise, splitting badly is worse than not splitting. This skill uses
|
|
26
|
+
When a story is an epic in disguise, splitting badly is worse than not splitting. This skill uses established INVEST-compatible patterns to propose a clean decomposition, then mechanically verifies each child's independence and value before saving.
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
**All hard rules, canonical output shape, language detection, terminal-only Q, mechanical NxN dep matrix, per-child V audit, context persistence, and INVEST handling live in `[[storywright-base]]`. Read that first. Anything in this file is a SOURCE-SPECIFIC or SPLIT-BEHAVIOR delta only.**
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
- User explicitly asks: "this story is too big, split it".
|
|
28
|
-
- Input visibly mixes ≥2 flows.
|
|
30
|
+
## Source-specific differential
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
- **Source:** an oversize story (any prior source — generate / refine / from-figma may all hand off here). The story has failed INVEST on I, E, or S — OR the deterministic pre-split count is ≥2.
|
|
33
|
+
- **What changes vs base:** the skill does NOT produce a single story. It ALWAYS produces an epic + N children. Each child obeys the base canonical block. The user must approve the split plan before children are written.
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
- **image (optional)** — companion mockup. Use to validate scope and reveal hidden sub-flows the text doesn't mention.
|
|
34
|
-
- **figma-link (optional)** — companion design. Often makes splitting easier: prototype links and frame structure reveal natural flow boundaries that map to children.
|
|
35
|
+
## Split behavior differential
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
This skill IS the split behavior. It always emits multiple files:
|
|
38
|
+
- `epic.md` — title, why-split, INVEST failure reasons, mechanical NxN matrix, build order, V audit per child, list of children.
|
|
39
|
+
- `story-1.md`, `story-2.md`, … — one canonical story per child (per base shape).
|
|
40
|
+
- `.storywright-context.json` — persisted answers.
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
- **Text is canonical for User Story / Scope / Business Goal** of the epic.
|
|
40
|
-
- **Figma / image is canonical for flow structure** — use prototype links to enumerate candidate sub-flows. Each flow is a candidate child story.
|
|
41
|
-
- **Conflict handling:** if Figma shows N flows but text only mentions K (K < N), surface this in the gap-check via `[[clarification-questions]]` BEFORE drafting the split plan. Ask: "Figma includes flows for X, Y, Z — include in this epic, or scope out?" Never silently expand or shrink scope.
|
|
42
|
-
- See `[[story-generate]]` "Mixed inputs" for the full source-priority matrix.
|
|
42
|
+
NO `split-plan.md`. The plan lives inside `epic.md`.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### Pre-split gate (STOP conditions) — run BEFORE pattern selection
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Run `[[invest-checklist]]` first:
|
|
47
|
+
- **V FAILS** → STOP. Not a story. Combine with related user-facing work.
|
|
48
|
+
- **T FAILS** → fix in place via `[[story-refine]]`.
|
|
49
|
+
- **N FAILS** → fix in place. Story is over-prescriptive, not too big.
|
|
50
|
+
- **E FAILS due to unknowns** → recommend a spike, not a split.
|
|
51
|
+
- **I / E (size) / S FAIL** → proceed to pattern selection.
|
|
47
52
|
|
|
48
|
-
|
|
53
|
+
### Pattern catalog (apply in order; stop at first that fits)
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
- **Testable FAILS** → **fix in place** via `[[story-refine]]` first. Splitting an untestable story produces untestable children.
|
|
52
|
-
- **Negotiable FAILS** → fix in place; the story is over-prescriptive, not too big.
|
|
53
|
-
- **Estimable FAILS due to unknowns** → run a **spike** (Pattern 9 below), not a split.
|
|
54
|
-
- **Independent / Estimable / Small FAIL** → continue to pattern selection.
|
|
55
|
+
Humanizing Work methodology (Lawrence & Green).
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
1. **Workflow steps — thin end-to-end slices.** Each child delivers the FULL workflow with increasing sophistication. NOT step1/step2 of the journey.
|
|
58
|
+
- ❌ Wrong: editorial / legal / publish.
|
|
59
|
+
- ✅ Right: publish immediately. Story 2 adds editorial. Story 3 adds legal.
|
|
60
|
+
2. **CRUD operations.** "Manage" / "handle" / "maintain" → C/R/U/D.
|
|
61
|
+
3. **Business rule variations.** Same feature, different rules (members / VIP / first-time).
|
|
62
|
+
4. **Data type variations.** One story per data shape (jpg / pdf / mp4).
|
|
63
|
+
5. **Data entry / UI complexity.** Basic input first; fancy UI as follow-ups.
|
|
64
|
+
6. **Major effort.** First implementation does the heavy infrastructure lift.
|
|
65
|
+
7. **Simple / complex.** Strip variations from the core. Story 1 = simplest case that still delivers value.
|
|
66
|
+
8. **Defer performance.** Make-it-work before make-it-fast.
|
|
67
|
+
9. **Spike (last resort).** Time-boxed investigation. Not a story.
|
|
57
68
|
|
|
58
|
-
|
|
69
|
+
**Anti-patterns (NOT splits):** horizontal slicing (FE/BE), task decomposition, meaningless halves.
|
|
59
70
|
|
|
60
|
-
|
|
61
|
-
**Critical:** this is NOT "step 1 / step 2 / step 3" of the journey. Each child must deliver the **full** workflow with increasing sophistication.
|
|
62
|
-
- ❌ Wrong: Story 1 = editorial review, Story 2 = legal approval, Story 3 = publish. (Story 1 alone delivers nothing observable to the user.)
|
|
63
|
-
- ✅ Right: Story 1 = publish post immediately, no reviews. Story 2 = add editorial review step. Story 3 = add legal step. Each story produces visible behavior.
|
|
71
|
+
### Cynefin domain calibration
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
- **Obvious / Complicated** — enumerate all children, prioritize by value/risk.
|
|
74
|
+
- **Complex** — produce 1–2 learning stories; let usage teach the rest.
|
|
75
|
+
- **Chaotic** — defer splitting; stabilize first.
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
### Meta-pattern (every pattern)
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
1. Name the **core complexity** that makes the story big.
|
|
80
|
+
2. List **all variations** of that complexity.
|
|
81
|
+
3. Pick **one variation** as the simplest complete vertical slice.
|
|
82
|
+
4. Each other variation becomes its own story.
|
|
70
83
|
|
|
71
|
-
|
|
84
|
+
## Application (step-by-step)
|
|
72
85
|
|
|
73
|
-
|
|
86
|
+
Follow the **base Application** skeleton for the front-end behaviors (context load, language, persona, passive-goal, gap-check, siblings). Split-specific steps inserted after:
|
|
74
87
|
|
|
75
|
-
|
|
88
|
+
1. **Pre-split gate.** Run `[[invest-checklist]]`. Honor STOP conditions above.
|
|
76
89
|
|
|
77
|
-
|
|
90
|
+
2. **Pattern selection.** Apply catalog in order. Name first fit + core complexity + Cynefin domain.
|
|
78
91
|
|
|
79
|
-
|
|
92
|
+
3. **Draft split plan** as a terminal table (no file yet):
|
|
93
|
+
```
|
|
94
|
+
### Split Plan
|
|
95
|
+
Rationale: <INVEST failure reasons>
|
|
96
|
+
Core complexity: <meta-pattern>
|
|
97
|
+
Pattern(s): <names>
|
|
98
|
+
Cynefin: <domain>
|
|
80
99
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- Meaningless halves ("first half of feature" / "second half").
|
|
100
|
+
| # | Proposed child | Pattern | V audit (base rule 11) |
|
|
101
|
+
|---|---|---|---|
|
|
102
|
+
```
|
|
85
103
|
|
|
86
|
-
|
|
104
|
+
4. **Strategic check before approval:**
|
|
105
|
+
- Does the split reveal low-value work we can deprioritize?
|
|
106
|
+
- Are children roughly equal in size?
|
|
87
107
|
|
|
88
|
-
|
|
108
|
+
5. **STOP and ask the user to approve via `AskUserQuestion`.**
|
|
89
109
|
|
|
90
|
-
|
|
91
|
-
- **Complex** — unclear what users want or what will work. Don't enumerate exhaustively; produce **1–2 learning stories** that ship something observable, then let real usage teach what to write next.
|
|
92
|
-
- **Chaotic** — priorities shifting daily, fires burning. **Defer splitting** until stability returns. Stabilize first.
|
|
110
|
+
6. **For each approved child, write the base canonical block.** Each child is its own file (`story-<N>.md`).
|
|
93
111
|
|
|
94
|
-
|
|
112
|
+
7. **Build dependency matrix mechanically (base rule 10).** Render in `epic.md`.
|
|
95
113
|
|
|
96
|
-
|
|
97
|
-
1. Name the **core complexity** that makes the story big.
|
|
98
|
-
2. List **all variations** of that complexity.
|
|
99
|
-
3. Pick **one variation** as the simplest complete vertical slice.
|
|
100
|
-
4. Each other variation becomes its own story.
|
|
114
|
+
8. **V audit per child (base rule 11).** Flag merge-upstream candidates in `epic.md`.
|
|
101
115
|
|
|
102
|
-
|
|
116
|
+
9. **Recursive re-split check.** For each child, run the base deterministic counter. If count ≥2 → recursive split of that child. Surface the tree in `epic.md`.
|
|
103
117
|
|
|
104
|
-
|
|
105
|
-
2. Apply the pattern catalog in order. Name the first pattern that fits and the meta-pattern's "core complexity".
|
|
106
|
-
3. **Draft a split plan** as a Markdown table:
|
|
107
|
-
```
|
|
108
|
-
### Split Plan
|
|
118
|
+
10. **Coherence check** — children together cover the original scope. Flag gaps or overlaps.
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
- S — FAIL: covers web + mobile + account-linking
|
|
112
|
-
- E — FAIL: account-linking edge cases not scoped
|
|
120
|
+
11. **Write `epic.md`** with: why-split, Cynefin, matrix, build order, V audit, list of children.
|
|
113
121
|
|
|
114
|
-
|
|
115
|
-
**Pattern(s) applied:** Workflow steps (thin end-to-end) + Simple→Complex
|
|
116
|
-
**Cynefin domain:** Complicated (known problem, just engineering)
|
|
122
|
+
12. **Persist context** to `.storywright-context.json` (`extra.split_pattern`, `extra.core_complexity`).
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|---|---|---|---|
|
|
120
|
-
| 1 | Login Google — simplest path (new account, web) | Workflow / Simple | Smallest complete vertical slice |
|
|
121
|
-
| 2 | Login Google — mobile | Data variation (surface) | Small, depends on #1 |
|
|
122
|
-
| 3 | Account linking — Google ↔ existing email/password | Major effort | Independent flow |
|
|
123
|
-
| 4 | Workspace domain restriction | Business rule variation | Independent |
|
|
124
|
+
## Validate every child (must pass all 6)
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
5. **STOP and ask the user to approve the plan.** Options:
|
|
132
|
-
- "Approve plan" → proceed to step 6
|
|
133
|
-
- "Adjust" → user edits the table or merges/splits rows
|
|
134
|
-
- "Cancel" → leave the story unsplit (mark it as `NEEDS REFINEMENT` for the team to negotiate)
|
|
135
|
-
6. **After approval:**
|
|
136
|
-
- Write `epic.md` — title, description, child story list, business goal, dependencies between children
|
|
137
|
-
- Write one stub per child: title + 1-line user story + open clarifications. **Do not run the full story-generate flow yet** — stubs are placeholders; user invokes `[[story-generate]]` per child when ready.
|
|
138
|
-
7. **Coherence check** — verify the children together cover the original scope. If any child overlaps another or the union has gaps, flag it before saving.
|
|
139
|
-
8. **Recursive re-split check.** For each child, ask: still >1 sprint? If yes, restart at the pattern catalog **for that child**. Keep splitting until every leaf is sprint-shippable. Surface the tree visually in the plan.
|
|
140
|
-
9. **Save all artifacts** under `./stories/<epic-slug>/`:
|
|
141
|
-
- `epic.md`
|
|
142
|
-
- `story-1.md`, `story-2.md`, …
|
|
143
|
-
- `split-plan.md` (the decision trail)
|
|
126
|
+
1. Delivers user value independently (V audit PASS).
|
|
127
|
+
2. Developable with explicit build order from the matrix.
|
|
128
|
+
3. Testable: single Given/When/Then with observable outcome.
|
|
129
|
+
4. Sprintable (1–5 days).
|
|
130
|
+
5. Union equals original scope.
|
|
131
|
+
6. ≤60 lines per child story (anti-PRD via base rule 8).
|
|
144
132
|
|
|
145
133
|
## Examples
|
|
146
134
|
|
|
147
135
|
### Good
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Split:
|
|
136
|
+
Original: "Permitir login con Google" — INVEST Small + Estimable FAIL.
|
|
137
|
+
Children:
|
|
152
138
|
1. Web — new accounts only (Simple)
|
|
153
139
|
2. Mobile — new accounts only (Simple)
|
|
154
|
-
3. Account linking with existing email/password (
|
|
155
|
-
4. Workspace domain restriction (
|
|
140
|
+
3. Account linking with existing email/password (Major effort)
|
|
141
|
+
4. Workspace domain restriction (Business rule variation)
|
|
156
142
|
|
|
157
|
-
|
|
143
|
+
Matrix mechanical:
|
|
144
|
+
- C2.Given mentions "Google sign-in handshake" owned by C1 → DEP(C2 → C1)
|
|
145
|
+
- C3.Given mentions "Google account exists" owned by C1 → DEP(C3 → C1)
|
|
146
|
+
- C4 independent.
|
|
158
147
|
|
|
159
|
-
|
|
148
|
+
V audit: all PASS. Build order: C1 → {C2, C3} → C4.
|
|
160
149
|
|
|
161
|
-
|
|
150
|
+
### Good — merge recommendation
|
|
151
|
+
"Results counter" child V audit:
|
|
152
|
+
- "If only counter ships, no grid, does a user complete a task?" → no.
|
|
153
|
+
- V = WEAK · merge-upstream-candidate. Recommend merging into the grid child.
|
|
162
154
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
1. **Delivers user value** independently? (not just "frontend done")
|
|
166
|
-
2. **Developable in isolation** with no hard ordering dependency?
|
|
167
|
-
3. **Testable** with concrete ACs?
|
|
168
|
-
4. **Sprintable** (1–5 days of work, single sprint)?
|
|
169
|
-
5. **Union equals original** — together do they cover the original scope?
|
|
155
|
+
### Bad
|
|
156
|
+
Splitting into "Backend auth endpoint" + "Frontend login button". Task split, no user value per child. Fails base rule 11.
|
|
170
157
|
|
|
171
|
-
|
|
158
|
+
### Bad
|
|
159
|
+
Claiming children Independent without running the mechanical matrix (base rule 10).
|
|
172
160
|
|
|
173
|
-
## Common Pitfalls
|
|
161
|
+
## Common Pitfalls (split-specific)
|
|
174
162
|
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
- **Letting the tree go >5 children** — that's an initiative, not an epic.
|
|
185
|
-
- **Splitting in chaos.** Stabilize first; splitting amid shifting priorities just multiplies churn.
|
|
163
|
+
- Skipping the pre-split INVEST gate.
|
|
164
|
+
- Workflow split done step-by-step instead of thin end-to-end.
|
|
165
|
+
- Horizontal slicing (FE/BE/DB).
|
|
166
|
+
- Task splits.
|
|
167
|
+
- Splitting on size alone without naming a pattern or core complexity.
|
|
168
|
+
- Auto-splitting without user approval.
|
|
169
|
+
- Letting the tree go >5 children — that's an initiative, not an epic.
|
|
170
|
+
- Splitting in Chaotic Cynefin — stabilize first.
|
|
171
|
+
- All other pitfalls in `[[storywright-base]]` apply equally.
|
|
186
172
|
|
|
187
173
|
## References
|
|
188
174
|
|
|
175
|
+
- [[storywright-base]] — the rulebook
|
|
189
176
|
- [[invest-checklist]]
|
|
190
177
|
- [[story-generate]]
|
|
191
|
-
- [[
|
|
178
|
+
- [[story-refine]]
|
|
179
|
+
- [[story-from-figma]]
|
|
192
180
|
|
|
193
181
|
<claude-specific>
|
|
194
|
-
-
|
|
195
|
-
-
|
|
182
|
+
- Read `[[storywright-base]]` before applying. Do not duplicate its rules in your reasoning.
|
|
183
|
+
- Use extended thinking for pattern selection (compare options explicitly).
|
|
184
|
+
- Cache the 9-pattern catalog.
|
|
185
|
+
- Build the dependency matrix from Given-text parsing (base rule 10), not intuition.
|
|
196
186
|
</claude-specific>
|