@pavp/storywright 1.16.0 → 1.18.0
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.
- package/.claude-plugin/plugin.json +3 -2
- package/package.json +1 -1
- package/skills/_components/estimation/SKILL.md +165 -0
- package/skills/_components/storywright-base/SKILL.md +16 -2
- package/skills/story-batch/SKILL.md +20 -0
- package/skills/story-from-figma/SKILL.md +1 -0
- package/skills/story-generate/SKILL.md +1 -0
- package/skills/story-refine/SKILL.md +1 -0
- package/skills/story-split/SKILL.md +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storywright",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "PM skills for Claude Code — turn ambiguous inputs (prompts, screenshots, Figma links) into Jira-ready user stories.",
|
|
5
5
|
"author": "pavp",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"skills/_components/edge-cases",
|
|
22
22
|
"skills/_components/analytics-events",
|
|
23
23
|
"skills/_components/risks-and-dependencies",
|
|
24
|
-
"skills/_components/story-formatter"
|
|
24
|
+
"skills/_components/story-formatter",
|
|
25
|
+
"skills/_components/estimation"
|
|
25
26
|
],
|
|
26
27
|
"commands": [
|
|
27
28
|
"commands/story-generate.md",
|
package/package.json
CHANGED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: estimation
|
|
3
|
+
description: Estimate a user story in Fibonacci story points using a deterministic weighted formula calibrated on real goldens. Output lives in story.dev.md only.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that computes a Fibonacci story-point estimate from six countable signals (ACs, edge cases, dependencies, high-severity risks, business rules, INVEST E verdict). Produces ## Estimate in story.dev.md only — never in PM files.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-context
|
|
9
|
+
outputs:
|
|
10
|
+
- estimate-block (dev.md only)
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Estimation gives the team a planning anchor grounded in story complexity signals — not gut feel or velocity. This component reads six structural signals from the completed story drafts and the INVEST result, runs a deterministic weighted formula, maps the raw score to a Fibonacci bucket, then allows a bounded ±1 LLM adjustment when a named signal justifies it.
|
|
16
|
+
|
|
17
|
+
Output lives **exclusively** in `story.dev.md`. PM files (`story.standard.md`, `backlog-summary.md`) must never contain the full estimation table. `backlog-summary.md` may carry a lightweight `## Backlog Estimate` planning aid (Points + Key Driver only) — that is a batch-skill concern, not this component's output.
|
|
18
|
+
|
|
19
|
+
## When to use
|
|
20
|
+
|
|
21
|
+
Invoked as step 8c of `[[storywright-base]]` — **after step 9 (INVEST)** so the E verdict is available, **before step 10 (render)**. Never run before INVEST; the E verdict is a required input.
|
|
22
|
+
|
|
23
|
+
## Inputs & interpretation
|
|
24
|
+
|
|
25
|
+
- **story-context** — the completed canonical block (PM draft + dev draft) and the step-9 INVEST E verdict.
|
|
26
|
+
- ACs and Business Rules are counted from `story.standard.md` (the PM draft).
|
|
27
|
+
- Edge cases, dependencies, and high-severity risks are counted from `story.dev.md` (the dev draft).
|
|
28
|
+
- The INVEST E verdict comes directly from step 9 output.
|
|
29
|
+
|
|
30
|
+
## Application (step-by-step)
|
|
31
|
+
|
|
32
|
+
### 1. Short-circuit: E = FAIL → Spike
|
|
33
|
+
|
|
34
|
+
If step-9 INVEST yields `E — FAIL` (estimability failure), **do not run the formula**. Emit the Spike block and stop:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
## Estimate
|
|
38
|
+
|
|
39
|
+
**Story Points: Spike — estimate after spike completes**
|
|
40
|
+
|
|
41
|
+
> ⚠️ This story has unresolved unknowns (INVEST E = FAIL). Run a technical spike first, then re-estimate once the unknowns are resolved.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Extract the six signals
|
|
45
|
+
|
|
46
|
+
Read across both files:
|
|
47
|
+
|
|
48
|
+
| Signal | Source file | Extraction rule |
|
|
49
|
+
|--------|-------------|-----------------|
|
|
50
|
+
| `ac_count` | `story.standard.md` | Count `**AC-\d+` pattern occurrences |
|
|
51
|
+
| `rule_count` | `story.standard.md` | Count `^\d+\.` numbered rules; multi-variant rule (sub-bullets or `> ⚠️ Confirm:`) = 2 units; plain/inline-clause = 1 unit |
|
|
52
|
+
| `edge_count` | `story.dev.md` | Count `^- \*\*` bullets under `^#{2,3} Edge Cases` section |
|
|
53
|
+
| `dep_count` | `story.dev.md` | Count body rows under `^#{2,3} Dependencias` section |
|
|
54
|
+
| `risk_hh_count` | `story.dev.md` | Count rows with 🚨 glyph under `^#{2,3} Riesgos` section (flagged high-severity only) |
|
|
55
|
+
| `e_fail` | INVEST step-9 output | 1 if `E — FAIL`, else 0 (already handled in step 1) |
|
|
56
|
+
|
|
57
|
+
**Section anchors are H2 by default** (`## Edge Cases`, `## Dependencias`, `## Riesgos`). Use the depth-agnostic pattern `^#{2,3}` as a fallback to tolerate H3 headings in non-standard goldens.
|
|
58
|
+
|
|
59
|
+
**Source split is mandatory.** ACs and business rules live only in the PM draft, not the dev draft. Edge cases, deps, and risks live only in the dev draft. Counting from the wrong file produces zero for those signals.
|
|
60
|
+
|
|
61
|
+
### 3. Compute raw score
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
raw = ac_count×1.0 + edge_count×0.6 + dep_count×1.5 + risk_hh_count×2.0 + rule_count×0.5
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 4. Map to Fibonacci bucket
|
|
68
|
+
|
|
69
|
+
| Condition | Points |
|
|
70
|
+
|-----------|--------|
|
|
71
|
+
| raw ≤ 1.5 | 1 |
|
|
72
|
+
| raw ≤ 3.5 | 2 |
|
|
73
|
+
| raw ≤ 7.0 | 3 |
|
|
74
|
+
| raw ≤ 12.5 | 5 |
|
|
75
|
+
| raw ≤ 18.0 | 8 |
|
|
76
|
+
| raw > 18.0 | 13 |
|
|
77
|
+
|
|
78
|
+
### 5. Apply ±1 LLM adjustment (optional, bounded)
|
|
79
|
+
|
|
80
|
+
You may adjust the deterministic bucket by exactly ±1 Fibonacci step **only if** you can cite one of the six named signals as the reason. A generic statement ("this feels complex") is not a valid citation.
|
|
81
|
+
|
|
82
|
+
Format for the adjustment row:
|
|
83
|
+
- With adjustment: `±1 → <new_points>: <signal_name> — <one-sentence reason>`
|
|
84
|
+
- Without adjustment: `none — deterministic bucket retained`
|
|
85
|
+
|
|
86
|
+
No citation means no adjustment. Use the bucket as-is.
|
|
87
|
+
|
|
88
|
+
### 6. Split advisory for 13-point stories
|
|
89
|
+
|
|
90
|
+
If the final point value is 13, append this advisory after the `## Estimate` section:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
> ⚠️ Consider splitting: a 13-point story signals high complexity. Run `/storywright-story-split` to explore children — approval required before splitting.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This is advisory only. Never auto-split. Never change the point value.
|
|
97
|
+
|
|
98
|
+
### 7. Emit ## Estimate in story.dev.md
|
|
99
|
+
|
|
100
|
+
Place after the Definition of Done section, before the generation log.
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## Estimate
|
|
104
|
+
|
|
105
|
+
**Story Points: N** (Fibonacci)
|
|
106
|
+
|
|
107
|
+
| Signal | Value | Weight | Contribution |
|
|
108
|
+
|--------|-------|--------|--------------|
|
|
109
|
+
| Acceptance Criteria | <ac_count> | ×1.0 | <ac_count × 1.0> |
|
|
110
|
+
| Edge Cases | <edge_count> | ×0.6 | <edge_count × 0.6> |
|
|
111
|
+
| Dependencies | <dep_count> | ×1.5 | <dep_count × 1.5> |
|
|
112
|
+
| High-severity Risks 🚨 | <risk_hh_count> | ×2.0 | <risk_hh_count × 2.0> |
|
|
113
|
+
| Business Rules | <rule_count> | ×0.5 | <rule_count × 0.5> |
|
|
114
|
+
| **Raw score** | | | **<raw>** → bucket <det_points> |
|
|
115
|
+
| LLM adjustment | | | <adjustment row> |
|
|
116
|
+
|
|
117
|
+
> Planning note: story points reflect relative complexity, not time, commitment, or velocity. Use them to compare stories against the calibration anchors below — not to forecast hours.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Calibration anchors
|
|
121
|
+
|
|
122
|
+
These real fixtures ground the scale. Use them to sanity-check your estimates before emitting:
|
|
123
|
+
|
|
124
|
+
| Anchor | AC | Edge | Dep | 🚨 | Rules | Raw | Points | Notes |
|
|
125
|
+
|--------|----|------|-----|----|-------|-----|--------|-------|
|
|
126
|
+
| Synthetic simple | 1 | 0 | 0 | 0 | 0 | 1.0 | 1 | Single AC, no risk |
|
|
127
|
+
| Synthetic small | 1 | 1 | 1 | 0 | 1 | 2.6 | 2 | Minimal enrichment |
|
|
128
|
+
| Synthetic medium | 2 | 2 | 1 | 0 | 2 | 5.7 | 3 | Moderate AC/edge |
|
|
129
|
+
| google-login | 1 | 5 | 3 | 1 | 3 | 12.0 | 5 | Auth flow, real golden |
|
|
130
|
+
| backlog story-1 | 3 | 5 | 3 | 0 | 2 | 11.5 | 5 | Cart summary, real golden |
|
|
131
|
+
| backlog story-2 (pre-adj) | 3 | 5 | 4 | 0 | 3 | 13.5 | 8 | Discount code, real golden |
|
|
132
|
+
| Synthetic large | >9 | >5 | >5 | >1 | >3 | >18.0 | 13 | Split advisory fires |
|
|
133
|
+
|
|
134
|
+
## Worked example: story-2 ±1 adjustment
|
|
135
|
+
|
|
136
|
+
Story-2 (discount code) raw = 13.5 → deterministic bucket 8.
|
|
137
|
+
|
|
138
|
+
LLM adjustment: −1 → 5. Citation: dependency "Resumen del carrito (Story 1 — AC-1)" — this is an intra-batch sibling already in-progress (Story 1), reducing uncertainty compared to a net-new external dep.
|
|
139
|
+
|
|
140
|
+
Adjustment row: `−1 → 5: dep "Resumen del carrito (Story 1 — AC-1)" — intra-batch sibling already in-progress reduces implementation uncertainty`
|
|
141
|
+
|
|
142
|
+
Final: **Story Points: 5**
|
|
143
|
+
|
|
144
|
+
## Common Pitfalls
|
|
145
|
+
|
|
146
|
+
- **Running step 8c before step 9 INVEST** — E verdict not yet available; do not skip INVEST ordering.
|
|
147
|
+
- **Matching bare `###` headings in dev.md** — use the depth-agnostic `^#{2,3}` pattern; real goldens use `## H2` sections.
|
|
148
|
+
- **Counting ACs or rules from dev.md** — they are PM-file signals only; dev.md has none.
|
|
149
|
+
- **Counting edge/dep/risk from standard.md** — they are dev-file signals only; standard.md has none.
|
|
150
|
+
- **Applying ±1 without a named signal citation** — if you cannot cite a specific signal, retain the deterministic bucket.
|
|
151
|
+
- **Auto-splitting a 13-point story** — the advisory is informational; splitting requires user approval via `[[story-split]]`.
|
|
152
|
+
- **Emitting ## Estimate in story.standard.md** — estimation lives in dev.md only; Rule H bans it from PM files.
|
|
153
|
+
|
|
154
|
+
## References
|
|
155
|
+
|
|
156
|
+
- [[storywright-base]]
|
|
157
|
+
- [[invest-checklist]]
|
|
158
|
+
- [[edge-cases]]
|
|
159
|
+
- [[risks-and-dependencies]]
|
|
160
|
+
- [[business-rules]]
|
|
161
|
+
- [[acceptance-criteria]]
|
|
162
|
+
|
|
163
|
+
<claude-specific>
|
|
164
|
+
Respond in the user's detected language (auto-detected per storywright-base rule 4). The computation and table structure are language-neutral; translate labels (Signal, Value, Weight, Contribution, Planning note) to match.
|
|
165
|
+
</claude-specific>
|
|
@@ -3,7 +3,7 @@ name: storywright-base
|
|
|
3
3
|
description: Shared base behavior for all storywright top-level skills. Hard rules, canonical output, terminal-only Q, context schema, mechanical deps, V audit, language detect.
|
|
4
4
|
trigger: "internal use by story-* skills"
|
|
5
5
|
intent: Component skill that holds the v2.2 baseline. Top-level skills (story-generate, story-refine, story-split, story-from-figma) compose this and add only their source-specific behavior on top.
|
|
6
|
-
version: 2.
|
|
6
|
+
version: 2.6.0
|
|
7
7
|
inputs:
|
|
8
8
|
- none
|
|
9
9
|
outputs:
|
|
@@ -100,10 +100,12 @@ If you are reading this through a top-level skill, treat every rule below as non
|
|
|
100
100
|
|
|
101
101
|
**ALLOWED:** User Story, Acceptance Criteria, Definition of Done, Contexto, Business Goal, Scope, Out of Scope, Business Rules. (`**Summary:**` is inline text, not a section heading — it is not subject to this list.)
|
|
102
102
|
|
|
103
|
-
**BANNED** (move content to `story.dev.md`, never emit in PM files): Edge Cases, Non-Functional Requirements, NFR, Performance, Security, Accessibility, Technical Considerations, Analytics, Risks, Dependencies, Dependencias, Riesgos — and any section whose name does not appear in the ALLOWED list above.
|
|
103
|
+
**BANNED** (move content to `story.dev.md`, never emit in PM files): Edge Cases, Non-Functional Requirements, NFR, Performance, Security, Accessibility, Technical Considerations, Analytics, Risks, Dependencies, Dependencias, Riesgos, Estimate, Story Points — and any section whose name does not appear in the ALLOWED list above.
|
|
104
104
|
|
|
105
105
|
If you find yourself writing a banned section into a PM file, stop. Move its content to `story.dev.md` instead (use `## Technical Considerations` as the target heading for Accessibility, Performance, and Security content). Do not silently drop it.
|
|
106
106
|
|
|
107
|
+
14. **Project-less by design — never ground in the open repo.** storywright generates a forward contract for work that often does not exist yet; it is NOT a code-analysis tool. Do NOT read, scan, or infer from the files of any repository open in the session, even if they appear relevant. All technical detail in `story.dev.md` (endpoints, components, file paths, library choices) is **inferred from domain knowledge**, not read from a codebase. Mark any non-obvious technical inference with `⚠️ Assumed:` so the developer treats it as a starting point, not verified fact. Grounding silently against an open repo makes output non-deterministic (the same prompt yields different stories depending on what files happen to be open) and gives false confidence that inferred specifics were verified — neither is acceptable. If the user explicitly wants the story grounded in real code, that is out of scope: tell them to confirm the specifics against the codebase themselves.
|
|
108
|
+
|
|
107
109
|
### 4a. Language auto-detect — expanded signals (rule E)
|
|
108
110
|
|
|
109
111
|
Run cheap detection before asking. Multi-signal weighted decision:
|
|
@@ -261,6 +263,16 @@ NOTHING else. No NFR block. No Edge Cases enumeration. No Dependencies prose. No
|
|
|
261
263
|
- `NEEDS REFINEMENT` → iterate failing dimension, max 1 cycle, then STOP.
|
|
262
264
|
- `NOT A STORY` → tell user it's a tech task and stop.
|
|
263
265
|
|
|
266
|
+
8c. **Estimate** via `[[estimation]]`. (Runs AFTER step 9 — requires the INVEST E verdict.)
|
|
267
|
+
1. Read the step-9 INVEST E verdict.
|
|
268
|
+
2. If `E — FAIL` → emit Spike block in `story.dev.md`; skip formula.
|
|
269
|
+
3. Else: read 6 signals across both drafts (`ac_count` + `rule_count` from `story.standard.md`; `edge_count` + `dep_count` + `risk_hh_count` from `story.dev.md`).
|
|
270
|
+
4. Run formula: `raw = AC×1.0 + edge×0.6 + dep×1.5 + 🚨×2.0 + rules×0.5`.
|
|
271
|
+
5. Map raw to Fibonacci bucket (≤1.5→1, ≤3.5→2, ≤7→3, ≤12.5→5, ≤18→8, >18→13).
|
|
272
|
+
6. Apply ±1 LLM adjustment only with a named signal citation; no citation → deterministic bucket retained.
|
|
273
|
+
7. Emit `## Estimate` section in `story.dev.md` only (after DoD, before generation log).
|
|
274
|
+
8. If points = 13 → append `> ⚠️ Consider splitting:` advisory (advisory only; never auto-split).
|
|
275
|
+
|
|
264
276
|
10. **Render** via `[[story-formatter]]`.
|
|
265
277
|
- Derive the output folder: `docs/storywright/YYYY-MM-DD-HHmm-<title-slug>/` where `YYYY-MM-DD-HHmm` is the current local date+time and `<title-slug>` is the story title in kebab-case (max 5 words, drop articles/prepositions).
|
|
266
278
|
- Use the `Write` tool to persist both files to that folder (create it if it does not exist):
|
|
@@ -287,6 +299,8 @@ Everything else is identical and lives in this base.
|
|
|
287
299
|
|
|
288
300
|
## Common Pitfalls (all skills)
|
|
289
301
|
|
|
302
|
+
- Running step 8c (Estimate) before step 9 INVEST — E verdict not yet available; always run INVEST first.
|
|
303
|
+
- Matching bare `###` headings in dev.md for estimation signal extraction — use depth-agnostic `^#{2,3}` pattern; rendered goldens use H2 sections.
|
|
290
304
|
- Writing any sidecar question file (clarifications.md, questions.md, etc).
|
|
291
305
|
- Announcing "Clarification resolved" or "no clarifications.md needed" instead of proceeding silently.
|
|
292
306
|
- Offering to save a clarifications file to disk after resolving gaps.
|
|
@@ -22,6 +22,7 @@ composes:
|
|
|
22
22
|
- _components/definition-of-done
|
|
23
23
|
- _components/invest-checklist
|
|
24
24
|
- _components/story-formatter
|
|
25
|
+
- _components/estimation
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
## Purpose
|
|
@@ -159,6 +160,25 @@ Story pairs are already written by Phase 3 step 10. Emit:
|
|
|
159
160
|
|
|
160
161
|
**GUARD — banned sections:** do not use headings that start with "Dependencies", "Dependencias", "Risks", or "Riesgos" — use "Dependency matrix" and "Notes" instead (base rule H).
|
|
161
162
|
|
|
163
|
+
After `## Stories` and before `## Dependency matrix`, include a `## Backlog Estimate` section as a planning aid:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
## Backlog Estimate
|
|
167
|
+
|
|
168
|
+
| # | Title | Points | Key Driver |
|
|
169
|
+
|---|-------|--------|------------|
|
|
170
|
+
| 1 | ... | 5 | 3 deps |
|
|
171
|
+
| 2 | ... | — (split first) | SPLIT RECOMMENDED |
|
|
172
|
+
| 3 | ... | Spike | E = FAIL |
|
|
173
|
+
| | **Total drafted** | **10 SP** | sum of numeric values only |
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Rules:
|
|
177
|
+
- SPLIT RECOMMENDED items → `— (split first)` in Points column; `SPLIT RECOMMENDED` in Key Driver.
|
|
178
|
+
- Spike items (INVEST E = FAIL) → `Spike` in Points; `E = FAIL` in Key Driver.
|
|
179
|
+
- Total row sums only numeric point values; excludes `—` and `Spike` rows.
|
|
180
|
+
- Full justification table stays in `story-N.dev.md`; only Points + Key Driver appear here.
|
|
181
|
+
|
|
162
182
|
2. **`.storywright-context.json`** updated per base rule 9 (one file per batch folder). No `clarifications.md`.
|
|
163
183
|
|
|
164
184
|
3. **Flat folder structure:** all files in `docs/storywright/YYYY-MM-DD-HHmm-batch-<slug>/` with no subdirectories. Slug derived per Phase 0 rule (first item's feature area, ≤30 chars, lowercase, hyphens).
|