@pavp/storywright 1.0.3 → 1.2.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/package.json
CHANGED
|
@@ -37,6 +37,7 @@ Invoked by `story-generate`, `story-refine`, `story-split`, and `story-from-figm
|
|
|
37
37
|
- **Data inputs** (auth scope, identifiers, format)
|
|
38
38
|
- **Constraints** (platform, accessibility, locale, SLA)
|
|
39
39
|
- **Out-of-scope assumptions**
|
|
40
|
+
- **Multi-source conflicts** (when text + image + Figma are all provided): explicit disagreement between sources MUST be surfaced. Examples: text says "Google only" but Figma shows multiple providers; text mentions 1 flow but Figma shows 3; image shows error state not mentioned in text. Never silently pick a winner.
|
|
40
41
|
2. For each axis, mark one of: ANSWERED · INFERRABLE · BLOCKING.
|
|
41
42
|
3. Drop `ANSWERED`. For `INFERRABLE`, do NOT ask — mark assumption in the story output with `> ⚠️ Assumed:`.
|
|
42
43
|
4. For `BLOCKING`, draft questions. Limit to **3 questions max per round**. Prefer multiple-choice or yes/no.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story-from-figma
|
|
3
3
|
description: Generate user stories from a Figma file or frame URL. Uses an MCP Figma server to enumerate frames, components, navigation, and states; falls back to asking for screenshots if MCP is unavailable.
|
|
4
|
-
trigger: "story from figma | generate from figma | analizar figma | https://www.figma.com/"
|
|
4
|
+
trigger: "/story-from-figma | story from figma | generate from figma | analizar figma | https://www.figma.com/"
|
|
5
5
|
intent: Multimodal entrypoint skill. Inspects a Figma design, infers user flows and screens, and produces one or more stories via story-generate.
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
inputs:
|
|
@@ -47,6 +47,14 @@ A Figma file usually represents N screens / N flows. This skill maps that visual
|
|
|
47
47
|
- Ask the user to either (a) install an MCP Figma server, (b) export the relevant frames as PNGs and drop them in chat, or (c) paste a textual description of the flows.
|
|
48
48
|
- Continue under the chosen fallback. The rest of the skill works with screenshots via Claude vision.
|
|
49
49
|
|
|
50
|
+
### Phase 0.5 — Detect companion inputs
|
|
51
|
+
|
|
52
|
+
Before extracting from Figma, check whether the user attached:
|
|
53
|
+
- **Accompanying text** (goal, story draft, constraints) — treat as canonical for `User Story / Scope / Business Goal`. Figma is canonical for `Components / States / Flows`.
|
|
54
|
+
- **Reference screenshots** — usually redundant when Figma is available; use only if Figma frames are missing states the screenshots show.
|
|
55
|
+
|
|
56
|
+
If text + Figma both describe the same flow but disagree (e.g., text says "single page form", Figma shows multi-step wizard), **surface the conflict** in clarifications and ask before drafting. Do NOT silently pick a winner. See `[[story-generate]]` "Mixed inputs" section for source priority.
|
|
57
|
+
|
|
50
58
|
### Phase 1 — Inventory
|
|
51
59
|
|
|
52
60
|
1. List pages in the file (if MCP allows).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story-generate
|
|
3
3
|
description: Transform an ambiguous prompt, half-baked story, screenshot, or Figma link into a Jira-ready user story with acceptance criteria, DoD, edge cases, and risks. Ask only critical clarifying questions.
|
|
4
|
-
trigger: "generate a user story | write a user story | turn this into a story | crear historia de usuario"
|
|
4
|
+
trigger: "/story-generate | generate a user story | write a user story | turn this into a story | crear historia de usuario"
|
|
5
5
|
intent: Top-level orchestrator skill that drives the full story generation flow by composing component skills.
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
inputs:
|
|
@@ -49,9 +49,37 @@ Use vision. Extract:
|
|
|
49
49
|
### Figma links
|
|
50
50
|
If MCP Figma is available (see `[[story-from-figma]]`), use it to enumerate frames, components, navigation. If not, fall back to asking the user to drop screenshots.
|
|
51
51
|
|
|
52
|
+
### Mixed inputs (text + image + Figma)
|
|
53
|
+
|
|
54
|
+
The skill is designed to **fuse multiple sources** in a single invocation. Common pairings:
|
|
55
|
+
|
|
56
|
+
- **Text + screenshot** — text states the goal, image shows the proposed UI. Use text for `User Story / Goal / Scope`, image for `Components / States / Edge cases / UX flow`.
|
|
57
|
+
- **Text + Figma link** — text gives intent, Figma gives implementation surface. Use text for `User Story / Business goal`, Figma for `Technical considerations / Edge cases / Components / Multi-screen flows`.
|
|
58
|
+
- **Text + image + Figma** — full triangulation. Highest fidelity; also highest chance of conflict.
|
|
59
|
+
|
|
60
|
+
**Source priority (when sources disagree):**
|
|
61
|
+
|
|
62
|
+
| Section | Primary | Secondary | Tertiary |
|
|
63
|
+
|---|---|---|---|
|
|
64
|
+
| User Story / Goal | Text | Figma (frame titles, callouts) | Image |
|
|
65
|
+
| Business Rules / Scope | Text | Figma | Image |
|
|
66
|
+
| UI Components / States | Figma | Image | Text |
|
|
67
|
+
| Edge Cases | Figma + Image (states shown) | Text | — |
|
|
68
|
+
| Technical Considerations | Figma (component naming, design system refs) | Text | Image |
|
|
69
|
+
| Acceptance Criteria | Triangulate all three | — | — |
|
|
70
|
+
|
|
71
|
+
**Conflict handling:**
|
|
72
|
+
|
|
73
|
+
1. **Detect the conflict explicitly.** Example: text says "Google only" but Figma shows Google + Facebook buttons.
|
|
74
|
+
2. **Do NOT silently pick a winner.** Surface the conflict in `clarifications.md` as a BLOCKING question: *"Text says X but design shows Y — which is canonical?"*
|
|
75
|
+
3. **If the user is in-session, ask immediately** before drafting. If running batch, mark the story `DRAFT` and write both options in scope/out-of-scope with `> ⚠️ Conflict:` annotation.
|
|
76
|
+
4. **Scope coverage check:** if Figma shows N flows but text describes 1, ask whether to (a) generate 1 story bounded to text, (b) generate N stories from Figma, or (c) generate 1 story + flag remaining flows as roadmap.
|
|
77
|
+
|
|
52
78
|
## Application (step-by-step)
|
|
53
79
|
|
|
54
|
-
1. **Detect input
|
|
80
|
+
1. **Detect input types present** — text, image, figma-link, or any combination. Branch accordingly:
|
|
81
|
+
- **Single source** → process as before.
|
|
82
|
+
- **Mixed sources** → run the "Mixed inputs" protocol above, including source-priority lookup and explicit conflict detection BEFORE drafting.
|
|
55
83
|
2. **Intake gap check** — invoke `[[clarification-questions]]`. If it returns BLOCKING questions, **ask first** before drafting.
|
|
56
84
|
3. **Detect language** of input (es | en | other). Output in the input language.
|
|
57
85
|
4. **Draft skeleton** of the structured story (all 15 sections from the template).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story-refine
|
|
3
3
|
description: Audit an existing user story for gaps and fill them in place. Surfaces missing AC, DoD, edge cases, risks; asks clarifications only for blocking unknowns. Returns dual-format refined story.
|
|
4
|
-
trigger: "refine this story | improve this story | refinar historia | this story is incomplete"
|
|
4
|
+
trigger: "/story-refine | refine this story | improve this story | refinar historia | this story is incomplete"
|
|
5
5
|
intent: Refinement skill for stories that already exist but are incomplete or weakly specified. Composes the same component skills as story-generate but skips the drafting step.
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
inputs:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story-split
|
|
3
3
|
description: Detect when a story is too big to ship in one sprint and propose an INVEST-driven split into an epic with sub-stories. Never auto-splits — always proposes, then waits for user confirmation.
|
|
4
|
-
trigger: "split this story | divide this story | dividir historia | this is too big"
|
|
4
|
+
trigger: "/story-split | split this story | divide this story | dividir historia | this is too big"
|
|
5
5
|
intent: Splitting skill that uses the INVEST failure reasons (from invest-checklist) as the rationale for decomposition. Produces an epic skeleton plus N child story stubs, ready to feed back into story-generate.
|
|
6
6
|
version: 1.0.0
|
|
7
7
|
inputs:
|