@pavp/storywright 1.0.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 +25 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/bin/storywright.mjs +41 -0
- package/package.json +62 -0
- package/scripts/install-skills.mjs +23 -0
- package/scripts/lib/skills.mjs +94 -0
- package/scripts/list-skills.mjs +38 -0
- package/scripts/postinstall-hint.mjs +12 -0
- package/scripts/uninstall-skills.mjs +21 -0
- package/scripts/validate-skills.mjs +82 -0
- package/scripts/zip-skill.mjs +40 -0
- package/skills/_components/acceptance-criteria/SKILL.md +99 -0
- package/skills/_components/analytics-events/SKILL.md +90 -0
- package/skills/_components/business-rules/SKILL.md +77 -0
- package/skills/_components/clarification-questions/SKILL.md +79 -0
- package/skills/_components/definition-of-done/SKILL.md +76 -0
- package/skills/_components/edge-cases/SKILL.md +74 -0
- package/skills/_components/invest-checklist/SKILL.md +111 -0
- package/skills/_components/jira-wiki-formatter/SKILL.md +129 -0
- package/skills/_components/risks-and-dependencies/SKILL.md +87 -0
- package/skills/story-from-figma/SKILL.md +117 -0
- package/skills/story-from-figma/mcp-figma-notes.md +54 -0
- package/skills/story-generate/SKILL.md +144 -0
- package/skills/story-generate/templates/story.jira-wiki.md +54 -0
- package/skills/story-generate/templates/story.standard.md +59 -0
- package/skills/story-refine/SKILL.md +102 -0
- package/skills/story-split/SKILL.md +184 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analytics-events
|
|
3
|
+
description: Propose analytics/event tracking for a story. Names events, payloads, and trigger points. Returns only the analytics block, ready for ProductOps to map.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that drafts a small, opinionated set of analytics events using a consistent naming convention.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-context
|
|
9
|
+
- acceptance-criteria
|
|
10
|
+
outputs:
|
|
11
|
+
- analytics-events-block
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Stories without analytics are stories without feedback. Propose the minimum set of events to measure adoption, funnel, and failure rate of the new behavior.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
After acceptance criteria are drafted; events should align to observable AC outcomes.
|
|
21
|
+
|
|
22
|
+
## Inputs & interpretation
|
|
23
|
+
|
|
24
|
+
- **story-context** — feature surface, user role
|
|
25
|
+
- **acceptance-criteria** — each happy-path AC suggests one funnel step
|
|
26
|
+
|
|
27
|
+
## Application (step-by-step)
|
|
28
|
+
|
|
29
|
+
1. Identify the funnel: entry → action → success / failure outcomes.
|
|
30
|
+
2. For each step, define one event using `feature_action_state` snake_case naming:
|
|
31
|
+
- `login_google_started`
|
|
32
|
+
- `login_google_consent_granted`
|
|
33
|
+
- `login_google_completed`
|
|
34
|
+
- `login_google_failed`
|
|
35
|
+
3. For each event, define payload fields. Always include:
|
|
36
|
+
- `user_id` (when known)
|
|
37
|
+
- `surface` (web | mobile-ios | mobile-android)
|
|
38
|
+
- `correlation_id` (links events of one attempt)
|
|
39
|
+
- `error_code` (only on failure events)
|
|
40
|
+
4. Mark each event:
|
|
41
|
+
- `📊 product` — feeds dashboards / funnels
|
|
42
|
+
- `🔧 ops` — feeds error monitoring
|
|
43
|
+
- `💰 revenue` — feeds growth metrics
|
|
44
|
+
5. Note retention/PII boundaries explicitly when sensitive (e.g., emails hashed).
|
|
45
|
+
6. Emit under `### Analytics / Eventos`.
|
|
46
|
+
|
|
47
|
+
Example block:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
### Analytics / Eventos
|
|
51
|
+
| Event | Trigger | Payload | Tag |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `login_google_started` | tap "Continue with Google" | `surface`, `correlation_id` | 📊 |
|
|
54
|
+
| `login_google_completed` | session created | `user_id`, `surface`, `correlation_id` | 📊 |
|
|
55
|
+
| `login_google_failed` | error in callback | `surface`, `correlation_id`, `error_code` | 🔧 |
|
|
56
|
+
| `account_link_prompted` | linking screen shown | `user_id`, `surface` | 📊 |
|
|
57
|
+
|
|
58
|
+
> PII: email hashes only. No raw emails in event payload.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
### Good
|
|
64
|
+
|
|
65
|
+
See above — minimal funnel, clear taxonomy, PII note included.
|
|
66
|
+
|
|
67
|
+
### Bad
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
- Track login button click.
|
|
71
|
+
- Track error.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
(no payload, no taxonomy, no PII boundary)
|
|
75
|
+
|
|
76
|
+
## Common Pitfalls
|
|
77
|
+
|
|
78
|
+
- Over-instrumenting (12 events per story). Aim for ≤6.
|
|
79
|
+
- Inconsistent naming (`googleLogin`, `g_login`, `loginGoogle` in same story).
|
|
80
|
+
- Forgetting `correlation_id` — without it you cannot join events into a funnel.
|
|
81
|
+
- Putting raw PII in payloads.
|
|
82
|
+
|
|
83
|
+
## References
|
|
84
|
+
|
|
85
|
+
- [[acceptance-criteria]]
|
|
86
|
+
- [[definition-of-done]]
|
|
87
|
+
|
|
88
|
+
<claude-specific>
|
|
89
|
+
Cache the 4 required payload fields and the 3 tag emojis.
|
|
90
|
+
</claude-specific>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: business-rules
|
|
3
|
+
description: Extract and articulate business rules a story must honor. Distinguish rules (always true) from acceptance criteria (testable on this story). Returns only the rules block.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that surfaces invariants, policies, and constraints that bound a story without being acceptance criteria themselves.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-context
|
|
9
|
+
- domain-hints
|
|
10
|
+
outputs:
|
|
11
|
+
- business-rules-block
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Business rules are **policy invariants** the story must respect. They survive across stories; they bound the design space.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
After the story body is drafted, before ACs are finalized — so ACs can reference relevant rules.
|
|
21
|
+
|
|
22
|
+
## Inputs & interpretation
|
|
23
|
+
|
|
24
|
+
- **story-context** — domain (auth, billing, content, etc.)
|
|
25
|
+
- **domain-hints** — explicit references in the prompt to limits, eligibility, permissions
|
|
26
|
+
|
|
27
|
+
## Application (step-by-step)
|
|
28
|
+
|
|
29
|
+
1. Enumerate candidate rules across these categories:
|
|
30
|
+
- **Eligibility** (who can perform the action)
|
|
31
|
+
- **Limits** (rate, quota, size, duration)
|
|
32
|
+
- **Permissions / roles**
|
|
33
|
+
- **Data validity** (format, ranges, required combinations)
|
|
34
|
+
- **Compliance** (GDPR, PCI, accessibility legal floor)
|
|
35
|
+
- **Lifecycle** (creation, expiration, deletion rules)
|
|
36
|
+
2. For each candidate, write as an imperative statement: `Only X can Y`, `Y must be Z`, `Y expires after N`.
|
|
37
|
+
3. Drop rules already implied by Acceptance Criteria — rules state the *why* AC exist.
|
|
38
|
+
4. Mark unresolved rules with `> ⚠️ Confirm:` and bubble them up to `[[clarification-questions]]`.
|
|
39
|
+
5. Emit as numbered list under `### Reglas de Negocio` (or English equivalent based on input language).
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
### Good
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
### Reglas de Negocio
|
|
47
|
+
1. Solo usuarios con cuentas Google verificadas pueden usar el login social.
|
|
48
|
+
2. El email del IdP debe coincidir con un dominio permitido si la cuenta es Workspace.
|
|
49
|
+
3. La sesión expira tras 30 días de inactividad.
|
|
50
|
+
4. Un usuario no puede tener simultáneamente login social y password sin haber pasado por flujo de account-linking.
|
|
51
|
+
> ⚠️ Confirm: ¿Se permite descrear el vínculo Google una vez establecido?
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Bad
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
- Login should be secure.
|
|
58
|
+
- Users should be happy.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
(not invariants, not actionable)
|
|
62
|
+
|
|
63
|
+
## Common Pitfalls
|
|
64
|
+
|
|
65
|
+
- Conflating rules with ACs. AC = testable on this story. Rule = always true.
|
|
66
|
+
- Stating implementation ("use OAuth 2.0 with PKCE"). That belongs in technical considerations.
|
|
67
|
+
- Inventing rules. If you can't source the rule, mark it `⚠️ Confirm:`.
|
|
68
|
+
|
|
69
|
+
## References
|
|
70
|
+
|
|
71
|
+
- [[acceptance-criteria]]
|
|
72
|
+
- [[clarification-questions]]
|
|
73
|
+
- [[risks-and-dependencies]]
|
|
74
|
+
|
|
75
|
+
<claude-specific>
|
|
76
|
+
Cache the 6 category list. Use extended thinking when domain is high-stakes (auth, payments, PII).
|
|
77
|
+
</claude-specific>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clarification-questions
|
|
3
|
+
description: Surface only the critical questions blocking a complete user story. Ask the minimum needed; never quiz the user. Used by every top-level story skill.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that runs a gap analysis on an input and emits ordered, high-leverage clarifying questions. Asks zero questions when the input is already complete.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- text
|
|
9
|
+
- image
|
|
10
|
+
- figma-context
|
|
11
|
+
outputs:
|
|
12
|
+
- clarifying-questions-block
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Turn vague inputs into a short, prioritized question list. The goal is **minimal friction**: ask only what blocks writing a usable story. Many prompts are answerable with reasonable assumptions — favor making the assumption (and marking it) over asking.
|
|
18
|
+
|
|
19
|
+
## When to use
|
|
20
|
+
|
|
21
|
+
Invoked by `story-generate`, `story-refine`, `story-split`, and `story-from-figma` after intake.
|
|
22
|
+
|
|
23
|
+
## Inputs & interpretation
|
|
24
|
+
|
|
25
|
+
- **text** — raw prompt, half-baked story, or paragraph
|
|
26
|
+
- **image** — Claude vision interprets a screenshot/mockup; pass the inferred description
|
|
27
|
+
- **figma-context** — frame names, navigation hints, components, states
|
|
28
|
+
|
|
29
|
+
## Application (step-by-step)
|
|
30
|
+
|
|
31
|
+
1. Run a gap check across these axes:
|
|
32
|
+
- **Who** (user/persona)
|
|
33
|
+
- **What outcome** (business value)
|
|
34
|
+
- **Trigger / entry point**
|
|
35
|
+
- **Success state**
|
|
36
|
+
- **Failure / error states**
|
|
37
|
+
- **Data inputs** (auth scope, identifiers, format)
|
|
38
|
+
- **Constraints** (platform, accessibility, locale, SLA)
|
|
39
|
+
- **Out-of-scope assumptions**
|
|
40
|
+
2. For each axis, mark one of: ANSWERED · INFERRABLE · BLOCKING.
|
|
41
|
+
3. Drop `ANSWERED`. For `INFERRABLE`, do NOT ask — mark assumption in the story output with `> ⚠️ Assumed:`.
|
|
42
|
+
4. For `BLOCKING`, draft questions. Limit to **3 questions max per round**. Prefer multiple-choice or yes/no.
|
|
43
|
+
5. Order by impact: scope > behavior > data > UX detail.
|
|
44
|
+
6. Emit as a Markdown block titled `### Clarifying Questions` with numbered list.
|
|
45
|
+
7. If no questions remain, emit nothing.
|
|
46
|
+
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
### Good
|
|
50
|
+
|
|
51
|
+
Input: *"Permitir login con Google"*
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
### Clarifying Questions
|
|
55
|
+
1. **Scope of accounts** — debe aceptar cualquier cuenta Google, solo Workspace del dominio X, o ambos?
|
|
56
|
+
2. **Account linking** — qué pasa si el email ya existe con login email/password? merge automático, error, o pantalla de claim?
|
|
57
|
+
3. **Mobile vs web** — el flujo cubre solo web ahora, o también mobile en este ticket?
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Bad
|
|
61
|
+
|
|
62
|
+
Asking 8 questions including UX color, button copy, and analytics naming. That's pollution — most are inferrable or trivially defaultable.
|
|
63
|
+
|
|
64
|
+
## Common Pitfalls
|
|
65
|
+
|
|
66
|
+
- Asking instead of inferring. If a sensible default exists, take it and mark `⚠️ Assumed`.
|
|
67
|
+
- Stacking questions in one bullet. One ask per bullet.
|
|
68
|
+
- Open-ended questions ("¿qué te parece…?"). Make them concrete and answerable in <1 sentence.
|
|
69
|
+
- More than 3 questions per round. Iteration is fine; interrogation is not.
|
|
70
|
+
|
|
71
|
+
## References
|
|
72
|
+
|
|
73
|
+
- [[story-generate]]
|
|
74
|
+
- [[story-refine]]
|
|
75
|
+
- [[clarification-questions-output-format]] (in story-generate templates)
|
|
76
|
+
|
|
77
|
+
<claude-specific>
|
|
78
|
+
Use a structured-thinking pass to enumerate the 8 axes before deciding which are BLOCKING. Cache the axes list across invocations within the same session.
|
|
79
|
+
</claude-specific>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: definition-of-done
|
|
3
|
+
description: Produce a Definition of Done block for a user story. Covers code, tests, analytics, docs, accessibility, and release gates. Returns only the DoD block.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that emits a baseline DoD aligned to common product/eng standards. Customizable via project-level overrides documented in the story.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-context
|
|
9
|
+
- technical-considerations
|
|
10
|
+
outputs:
|
|
11
|
+
- definition-of-done-block
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
A Definition of Done is the contract for "shippable". It must be **checkable, observable, and binary** — never aspirational.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
Invoked by `story-generate` after acceptance criteria and technical considerations are drafted.
|
|
21
|
+
|
|
22
|
+
## Inputs & interpretation
|
|
23
|
+
|
|
24
|
+
- **story-context** — what's being built
|
|
25
|
+
- **technical-considerations** — surface (frontend, backend, mobile) drives which DoD lines apply
|
|
26
|
+
|
|
27
|
+
## Application (step-by-step)
|
|
28
|
+
|
|
29
|
+
1. Start from the baseline list below.
|
|
30
|
+
2. Drop lines that don't apply (e.g., no analytics if the story is purely internal).
|
|
31
|
+
3. Add story-specific lines from technical considerations (e.g., "Database migration runs cleanly on staging").
|
|
32
|
+
4. Use checkbox markdown (`- [ ]`) so reviewers can tick during review.
|
|
33
|
+
|
|
34
|
+
### Baseline DoD
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
### Definition of Done
|
|
38
|
+
- [ ] Code merged to main behind feature flag (if applicable)
|
|
39
|
+
- [ ] All acceptance criteria pass in QA environment
|
|
40
|
+
- [ ] Unit tests added/updated; coverage not decreased
|
|
41
|
+
- [ ] Integration / E2E test added for the happy path and at least one failure mode
|
|
42
|
+
- [ ] Accessibility: keyboard navigable, screen-reader labels, color contrast ≥ WCAG AA
|
|
43
|
+
- [ ] Analytics events implemented and verified in dashboard
|
|
44
|
+
- [ ] Error states surfaced to user with actionable copy
|
|
45
|
+
- [ ] Translations added for all user-facing strings (per project locale list)
|
|
46
|
+
- [ ] Documentation updated (README / runbook / API docs as relevant)
|
|
47
|
+
- [ ] Reviewed by ≥1 engineer; PM signoff after acceptance walkthrough
|
|
48
|
+
- [ ] No regressions in critical-path E2E suite
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
5. Emit only the block. Do NOT add prose around it.
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
### Good
|
|
56
|
+
|
|
57
|
+
A backend-only story drops the WCAG line, keeps unit/integration tests, adds a migration line.
|
|
58
|
+
|
|
59
|
+
### Bad
|
|
60
|
+
|
|
61
|
+
`- [ ] Quality is good` — not checkable.
|
|
62
|
+
|
|
63
|
+
## Common Pitfalls
|
|
64
|
+
|
|
65
|
+
- Treating DoD as aspirational. Every box must be objectively tickable.
|
|
66
|
+
- Copy-pasting a generic DoD onto every story. Trim what doesn't apply.
|
|
67
|
+
- Confusing DoD with AC. AC = "what does this story do?". DoD = "what does shippable mean for any story in this team?".
|
|
68
|
+
|
|
69
|
+
## References
|
|
70
|
+
|
|
71
|
+
- [[acceptance-criteria]]
|
|
72
|
+
- [[analytics-events]]
|
|
73
|
+
|
|
74
|
+
<claude-specific>
|
|
75
|
+
Cache the baseline DoD block across calls in the session.
|
|
76
|
+
</claude-specific>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: edge-cases
|
|
3
|
+
description: Enumerate edge cases for a story. Covers boundary, concurrency, network, data, permission, and UX-state failures. Returns only the edge-cases block.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that systematically generates edge cases across known failure axes so acceptance criteria can cover them.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-context
|
|
9
|
+
outputs:
|
|
10
|
+
- edge-cases-block
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Edge cases are how engineers find latent risk. Generate them **before** acceptance criteria so each one pairs to an AC.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
Invoked by `story-generate` after the story body and business rules are drafted; output feeds `[[acceptance-criteria]]`.
|
|
20
|
+
|
|
21
|
+
## Inputs & interpretation
|
|
22
|
+
|
|
23
|
+
- **story-context** — surface, primary flow, data shape
|
|
24
|
+
|
|
25
|
+
## Application (step-by-step)
|
|
26
|
+
|
|
27
|
+
Walk these axes and pick the ones that apply:
|
|
28
|
+
|
|
29
|
+
1. **Boundary** — empty input, single item, max length, max collection size
|
|
30
|
+
2. **Network** — offline, timeout, slow connection, intermittent
|
|
31
|
+
3. **Concurrency** — two devices simultaneously, race conditions, stale state
|
|
32
|
+
4. **Permission** — unauthenticated, expired session, insufficient role, revoked access
|
|
33
|
+
5. **Data integrity** — duplicate, conflicting, corrupted, partial
|
|
34
|
+
6. **State** — already in target state, transition from unexpected source state
|
|
35
|
+
7. **External** — third-party down, rate limit hit, response shape change
|
|
36
|
+
8. **UX** — back/forward navigation mid-flow, deep-link entry, modal interrupt, accessibility tooling
|
|
37
|
+
|
|
38
|
+
For each applicable axis, write 1–2 concrete cases. Keep each ≤1 sentence.
|
|
39
|
+
|
|
40
|
+
Emit under `### Edge Cases`:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
### Edge Cases
|
|
44
|
+
- **Network — timeout during OAuth callback**: user sees a retry prompt; no orphan session created.
|
|
45
|
+
- **Concurrency — same Google account in two tabs**: second tab inherits the same session.
|
|
46
|
+
- **Permission — Workspace domain not allowed**: error toast with admin contact.
|
|
47
|
+
- **State — already logged in with email/password**: route through account-linking flow.
|
|
48
|
+
- **UX — back button during consent**: returns to login screen, no partial state.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Examples
|
|
52
|
+
|
|
53
|
+
### Good
|
|
54
|
+
|
|
55
|
+
See above — concrete, observable, mappable to ACs.
|
|
56
|
+
|
|
57
|
+
### Bad
|
|
58
|
+
|
|
59
|
+
`- Lots of weird stuff might happen.` (no axis, no observable outcome)
|
|
60
|
+
|
|
61
|
+
## Common Pitfalls
|
|
62
|
+
|
|
63
|
+
- Listing "what if user does something dumb" — not actionable. Tie to an axis.
|
|
64
|
+
- Over-enumerating. 5–10 edge cases is healthier than 30. Pick the high-impact ones.
|
|
65
|
+
- Forgetting non-functional edges (offline, slow network).
|
|
66
|
+
|
|
67
|
+
## References
|
|
68
|
+
|
|
69
|
+
- [[acceptance-criteria]]
|
|
70
|
+
- [[risks-and-dependencies]]
|
|
71
|
+
|
|
72
|
+
<claude-specific>
|
|
73
|
+
Cache the 8 axes. Use extended thinking when surface is novel.
|
|
74
|
+
</claude-specific>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: invest-checklist
|
|
3
|
+
description: Run an INVEST self-check on a drafted user story. Flag failures with concrete diagnosis. Used by story-generate after drafting and by story-split as the split trigger.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that scores a story across the six INVEST dimensions and emits a pass/fail diagnosis with reasons. Never auto-splits.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- story-draft
|
|
9
|
+
outputs:
|
|
10
|
+
- invest-report-block
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
INVEST is the gate that separates ready stories from epics in disguise. Score honestly. Failures here are signals, not opinions.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- After `story-generate` drafts a story → run to confirm readiness.
|
|
20
|
+
- At the start of `story-split` → use the failure reasons as the split rationale.
|
|
21
|
+
|
|
22
|
+
## Inputs & interpretation
|
|
23
|
+
|
|
24
|
+
- **story-draft** — full story content (title + sections)
|
|
25
|
+
|
|
26
|
+
## Application (step-by-step)
|
|
27
|
+
|
|
28
|
+
For each dimension, mark PASS / FAIL and write one sentence of evidence.
|
|
29
|
+
|
|
30
|
+
1. **I — Independent**
|
|
31
|
+
PASS if the story can be delivered without waiting on another story.
|
|
32
|
+
FAIL if it explicitly depends on uncommitted work or requires a parallel change in another team's surface.
|
|
33
|
+
|
|
34
|
+
2. **N — Negotiable**
|
|
35
|
+
PASS if scope can shift without breaking the story (the user/team retains flexibility on HOW).
|
|
36
|
+
FAIL if the story over-specifies implementation (specific endpoints, exact pixel values mandated, locked tech).
|
|
37
|
+
|
|
38
|
+
3. **V — Valuable**
|
|
39
|
+
PASS if the value statement names a user or business outcome.
|
|
40
|
+
FAIL if the only beneficiary is "the system" or it's purely technical with no surfaced value.
|
|
41
|
+
|
|
42
|
+
4. **E — Estimable**
|
|
43
|
+
PASS if the team can confidently size it within their tolerance band (e.g., ≤8 SP).
|
|
44
|
+
FAIL if unknowns dominate (spike-shaped) or the surface is too broad.
|
|
45
|
+
|
|
46
|
+
5. **S — Small**
|
|
47
|
+
PASS if it fits one sprint and one developer-week is plausible.
|
|
48
|
+
FAIL if it visibly mixes ≥2 distinct flows or touches ≥3 unrelated surfaces.
|
|
49
|
+
|
|
50
|
+
6. **T — Testable**
|
|
51
|
+
PASS if every AC has an observable outcome.
|
|
52
|
+
FAIL if ACs hand-wave behavior or rely on subjective judgment.
|
|
53
|
+
|
|
54
|
+
7. Emit the report block:
|
|
55
|
+
```
|
|
56
|
+
### INVEST Check
|
|
57
|
+
- I — PASS · <evidence>
|
|
58
|
+
- N — PASS · <evidence>
|
|
59
|
+
- V — FAIL · <evidence>
|
|
60
|
+
- E — PASS · <evidence>
|
|
61
|
+
- S — FAIL · <evidence>
|
|
62
|
+
- T — PASS · <evidence>
|
|
63
|
+
|
|
64
|
+
**Verdict:** READY | NEEDS REFINEMENT | SPLIT RECOMMENDED
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
8. **Verdict logic:**
|
|
68
|
+
- All PASS → `READY`
|
|
69
|
+
- **V FAILS → `NOT A STORY`**. Hard stop. This is a tech task or infrastructure work, not a user story. Do not refine, do not split — reframe with user-visible value or combine with related user-facing work.
|
|
70
|
+
- **T FAILS → `NEEDS REFINEMENT`**. Fix ACs in place via `[[story-refine]]`. Do NOT split — splitting untestable input produces untestable children.
|
|
71
|
+
- **N FAILS → `NEEDS REFINEMENT`**. The story over-prescribes implementation; rewrite to focus on outcome, not solution.
|
|
72
|
+
- **E FAILS due to unknowns → `RUN A SPIKE`**. Recommend a 1–2 day time-boxed investigation before splitting.
|
|
73
|
+
- **I, E (size-driven), or S FAIL → `SPLIT RECOMMENDED`**. Hand off to `[[story-split]]`.
|
|
74
|
+
|
|
75
|
+
9. Never auto-split here. Output is advisory only.
|
|
76
|
+
|
|
77
|
+
## Examples
|
|
78
|
+
|
|
79
|
+
### Good
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
### INVEST Check
|
|
83
|
+
- I — PASS · No upstream dependencies; auth provider is already integrated.
|
|
84
|
+
- N — PASS · Implementation is open beyond "use existing GoogleSignIn SDK".
|
|
85
|
+
- V — PASS · Reduces signup friction for users without an account.
|
|
86
|
+
- E — FAIL · Account-linking edge case requires backend schema research (spike-shaped).
|
|
87
|
+
- S — FAIL · Covers web AND mobile AND account-linking in one story.
|
|
88
|
+
- T — PASS · Each AC has observable outcomes.
|
|
89
|
+
|
|
90
|
+
**Verdict:** SPLIT RECOMMENDED
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Bad
|
|
94
|
+
|
|
95
|
+
`Verdict: READY` with no per-dimension evidence — review can't audit it.
|
|
96
|
+
|
|
97
|
+
## Common Pitfalls
|
|
98
|
+
|
|
99
|
+
- Calling a story `Small` because it's described in few sentences. Size is about scope, not word count.
|
|
100
|
+
- Calling a story `Testable` when ACs only exist for the happy path.
|
|
101
|
+
- Lumping `Independent` and `Negotiable` into one check.
|
|
102
|
+
|
|
103
|
+
## References
|
|
104
|
+
|
|
105
|
+
- [[story-split]]
|
|
106
|
+
- [[acceptance-criteria]]
|
|
107
|
+
- [[definition-of-done]]
|
|
108
|
+
|
|
109
|
+
<claude-specific>
|
|
110
|
+
Use extended thinking. The dimensions interact (small often forces independent). Resolve all six before emitting verdict.
|
|
111
|
+
</claude-specific>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-wiki-formatter
|
|
3
|
+
description: Render a story into both Jira wiki markup and standard CommonMark Markdown. Outputs two artifacts so the same story is copy-pasteable into Jira and into any MD-aware tool.
|
|
4
|
+
trigger: "internal use by story-* skills"
|
|
5
|
+
intent: Component skill that takes a structured story (all sections drafted) and produces two output files following the templates in story-generate/templates.
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
inputs:
|
|
8
|
+
- structured-story
|
|
9
|
+
outputs:
|
|
10
|
+
- story.jira-wiki.md
|
|
11
|
+
- story.standard.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Stories need to live in Jira AND in any other markdown surface (Notion, Linear, GitHub Issues, internal wikis). Generate both representations from the same source.
|
|
17
|
+
|
|
18
|
+
## When to use
|
|
19
|
+
|
|
20
|
+
Final step in `story-generate` and `story-refine`. Always last.
|
|
21
|
+
|
|
22
|
+
## Inputs & interpretation
|
|
23
|
+
|
|
24
|
+
- **structured-story** — an object/dict with every section: title, description, user_story, contexto, objetivo, alcance, fuera_de_alcance, reglas_de_negocio, consideraciones_tecnicas, dependencias, riesgos, analytics, edge_cases, criterios_de_aceptacion, definition_of_done
|
|
25
|
+
|
|
26
|
+
## Application (step-by-step)
|
|
27
|
+
|
|
28
|
+
1. Render `story.jira-wiki.md` using Jira's wiki markup:
|
|
29
|
+
- Headings: `h1. `, `h2. `, `h3. `
|
|
30
|
+
- Bold: `*text*`
|
|
31
|
+
- Italic: `_text_`
|
|
32
|
+
- Code: `{{code}}` inline, `{code}…{code}` block
|
|
33
|
+
- Lists: `* item`, `# item` (numbered)
|
|
34
|
+
- Tables: `||header||header||` then `|cell|cell|`
|
|
35
|
+
- Panels for callouts: `{panel:title=⚠️ Assumed}…{panel}`
|
|
36
|
+
2. Render `story.standard.md` using CommonMark:
|
|
37
|
+
- Headings: `##`, `###`
|
|
38
|
+
- Bold: `**text**`
|
|
39
|
+
- Italic: `*text*`
|
|
40
|
+
- Code: `` `inline` ``, ```` ``` ```` blocks
|
|
41
|
+
- Lists: `- item`, `1. item`
|
|
42
|
+
- Tables: standard pipe tables
|
|
43
|
+
- Callouts: `> ⚠️ **Assumed:** …`
|
|
44
|
+
3. Section model = **core + optional**.
|
|
45
|
+
|
|
46
|
+
**Core (always emit, in this order):**
|
|
47
|
+
1. Title
|
|
48
|
+
2. Summary
|
|
49
|
+
3. User Story (As a / I want to / so that)
|
|
50
|
+
4. Acceptance Criteria
|
|
51
|
+
5. Definition of Done
|
|
52
|
+
|
|
53
|
+
**Optional (emit only if non-empty, in this order, after a separator):**
|
|
54
|
+
6. Contexto
|
|
55
|
+
7. Business Goal
|
|
56
|
+
8. Scope
|
|
57
|
+
9. Out of Scope
|
|
58
|
+
10. Business Rules
|
|
59
|
+
11. Technical Considerations
|
|
60
|
+
12. Dependencies
|
|
61
|
+
13. Risks
|
|
62
|
+
14. Analytics
|
|
63
|
+
15. Edge Cases
|
|
64
|
+
|
|
65
|
+
4. **Drop any section with no real content.** An empty heading is noise. A story with only the 5 core sections is a valid output.
|
|
66
|
+
5. Emit both as fenced code blocks in the chat (so user can copy), and offer to save to disk when running from CLI.
|
|
67
|
+
|
|
68
|
+
## Examples
|
|
69
|
+
|
|
70
|
+
### Good — Jira wiki
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
h2. Login con Google
|
|
74
|
+
|
|
75
|
+
Permitir a usuarios autenticarse mediante OAuth con Google.
|
|
76
|
+
|
|
77
|
+
h3. User Story
|
|
78
|
+
*As a* visitante nuevo
|
|
79
|
+
*I want* iniciar sesión con mi cuenta de Google
|
|
80
|
+
*So that* puedo evitar crear una nueva contraseña.
|
|
81
|
+
|
|
82
|
+
h3. Criterios de Aceptación
|
|
83
|
+
*AC-1: Login exitoso*
|
|
84
|
+
* Given el usuario está en la pantalla de login
|
|
85
|
+
* When toca "Continuar con Google" y autoriza una cuenta válida
|
|
86
|
+
* Then es redirigido al dashboard en <3s
|
|
87
|
+
|
|
88
|
+
h3. Definition of Done
|
|
89
|
+
* (/) Code merged behind feature flag
|
|
90
|
+
* (/) ACs pass in QA
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Good — CommonMark
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
## Login con Google
|
|
97
|
+
|
|
98
|
+
Permitir a usuarios autenticarse mediante OAuth con Google.
|
|
99
|
+
|
|
100
|
+
### User Story
|
|
101
|
+
**As a** visitante nuevo
|
|
102
|
+
**I want** iniciar sesión con mi cuenta de Google
|
|
103
|
+
**So that** puedo evitar crear una nueva contraseña.
|
|
104
|
+
|
|
105
|
+
### Criterios de Aceptación
|
|
106
|
+
**AC-1: Login exitoso**
|
|
107
|
+
- Given el usuario está en la pantalla de login
|
|
108
|
+
- When toca "Continuar con Google" y autoriza una cuenta válida
|
|
109
|
+
- Then es redirigido al dashboard en <3s
|
|
110
|
+
|
|
111
|
+
### Definition of Done
|
|
112
|
+
- [ ] Code merged behind feature flag
|
|
113
|
+
- [ ] ACs pass in QA
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Common Pitfalls
|
|
117
|
+
|
|
118
|
+
- Mixing Jira and CommonMark in the same file. Pick one per file.
|
|
119
|
+
- Forgetting that Jira's `{code}` block doesn't support all languages — fall back to `{noformat}` for plain text.
|
|
120
|
+
- Emoji in Jira: works in cloud, often mangled in older self-hosted. Keep emojis to non-critical decoration.
|
|
121
|
+
- Empty headings. Drop.
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
|
|
125
|
+
- [[story-generate]] (templates live under `story-generate/templates/`)
|
|
126
|
+
|
|
127
|
+
<claude-specific>
|
|
128
|
+
Cache both syntax tables (Jira wiki and CommonMark) — they're stable.
|
|
129
|
+
</claude-specific>
|