@codyswann/lisa 1.94.0 → 1.96.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.
Files changed (104) hide show
  1. package/dist/cli/index.d.ts.map +1 -1
  2. package/dist/cli/index.js +41 -5
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/codex/agent-installer.d.ts +56 -0
  5. package/dist/codex/agent-installer.d.ts.map +1 -0
  6. package/dist/codex/agent-installer.js +201 -0
  7. package/dist/codex/agent-installer.js.map +1 -0
  8. package/dist/codex/agent-transformer.d.ts +53 -0
  9. package/dist/codex/agent-transformer.d.ts.map +1 -0
  10. package/dist/codex/agent-transformer.js +181 -0
  11. package/dist/codex/agent-transformer.js.map +1 -0
  12. package/dist/codex/agents-md-installer.d.ts +24 -0
  13. package/dist/codex/agents-md-installer.d.ts.map +1 -0
  14. package/dist/codex/agents-md-installer.js +63 -0
  15. package/dist/codex/agents-md-installer.js.map +1 -0
  16. package/dist/codex/hooks-installer.d.ts +24 -0
  17. package/dist/codex/hooks-installer.d.ts.map +1 -0
  18. package/dist/codex/hooks-installer.js +206 -0
  19. package/dist/codex/hooks-installer.js.map +1 -0
  20. package/dist/codex/hooks-merger.d.ts +82 -0
  21. package/dist/codex/hooks-merger.d.ts.map +1 -0
  22. package/dist/codex/hooks-merger.js +127 -0
  23. package/dist/codex/hooks-merger.js.map +1 -0
  24. package/dist/codex/manifest.d.ts +32 -0
  25. package/dist/codex/manifest.d.ts.map +1 -0
  26. package/dist/codex/manifest.js +86 -0
  27. package/dist/codex/manifest.js.map +1 -0
  28. package/dist/codex/settings-installer.d.ts +48 -0
  29. package/dist/codex/settings-installer.d.ts.map +1 -0
  30. package/dist/codex/settings-installer.js +276 -0
  31. package/dist/codex/settings-installer.js.map +1 -0
  32. package/dist/codex/skills-installer.d.ts +46 -0
  33. package/dist/codex/skills-installer.d.ts.map +1 -0
  34. package/dist/codex/skills-installer.js +344 -0
  35. package/dist/codex/skills-installer.js.map +1 -0
  36. package/dist/core/config.d.ts +19 -0
  37. package/dist/core/config.d.ts.map +1 -1
  38. package/dist/core/config.js +13 -0
  39. package/dist/core/config.js.map +1 -1
  40. package/dist/core/lisa.d.ts +12 -0
  41. package/dist/core/lisa.d.ts.map +1 -1
  42. package/dist/core/lisa.js +48 -0
  43. package/dist/core/lisa.js.map +1 -1
  44. package/dist/core/project-config.d.ts +49 -0
  45. package/dist/core/project-config.d.ts.map +1 -0
  46. package/dist/core/project-config.js +119 -0
  47. package/dist/core/project-config.js.map +1 -0
  48. package/package.json +3 -1
  49. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa/agents/jira-agent.md +21 -8
  51. package/plugins/lisa/agents/jira-build-intake.md +58 -0
  52. package/plugins/lisa/agents/notion-prd-intake.md +57 -0
  53. package/plugins/lisa/commands/jira/build-intake.md +7 -0
  54. package/plugins/lisa/commands/jira/source-artifacts.md +6 -0
  55. package/plugins/lisa/commands/jira/validate-ticket.md +7 -0
  56. package/plugins/lisa/commands/notion-prd-intake.md +7 -0
  57. package/plugins/lisa/commands/prd-ticket-coverage.md +7 -0
  58. package/plugins/lisa/commands/product-walkthrough.md +7 -0
  59. package/plugins/lisa/rules/base-rules.md +9 -1
  60. package/plugins/lisa/skills/jira-build-intake/SKILL.md +134 -0
  61. package/plugins/lisa/skills/jira-create/SKILL.md +53 -30
  62. package/plugins/lisa/skills/jira-source-artifacts/SKILL.md +107 -0
  63. package/plugins/lisa/skills/jira-validate-ticket/SKILL.md +224 -0
  64. package/plugins/lisa/skills/jira-verify/SKILL.md +15 -35
  65. package/plugins/lisa/skills/jira-write-ticket/SKILL.md +72 -19
  66. package/plugins/lisa/skills/notion-prd-intake/SKILL.md +169 -0
  67. package/plugins/lisa/skills/notion-to-jira/SKILL.md +137 -95
  68. package/plugins/lisa/skills/prd-ticket-coverage/SKILL.md +137 -0
  69. package/plugins/lisa/skills/product-walkthrough/SKILL.md +129 -0
  70. package/plugins/lisa/skills/ticket-triage/SKILL.md +19 -2
  71. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-expo/skills/jira-create/SKILL.md +60 -28
  74. package/plugins/lisa-expo/skills/jira-verify/SKILL.md +14 -34
  75. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-rails/skills/jira-create/SKILL.md +59 -28
  78. package/plugins/lisa-rails/skills/jira-verify/SKILL.md +13 -16
  79. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  80. package/plugins/src/base/agents/jira-agent.md +21 -8
  81. package/plugins/src/base/agents/jira-build-intake.md +58 -0
  82. package/plugins/src/base/agents/notion-prd-intake.md +57 -0
  83. package/plugins/src/base/commands/jira/build-intake.md +7 -0
  84. package/plugins/src/base/commands/jira/source-artifacts.md +6 -0
  85. package/plugins/src/base/commands/jira/validate-ticket.md +7 -0
  86. package/plugins/src/base/commands/notion-prd-intake.md +7 -0
  87. package/plugins/src/base/commands/prd-ticket-coverage.md +7 -0
  88. package/plugins/src/base/commands/product-walkthrough.md +7 -0
  89. package/plugins/src/base/rules/base-rules.md +9 -1
  90. package/plugins/src/base/skills/jira-build-intake/SKILL.md +134 -0
  91. package/plugins/src/base/skills/jira-create/SKILL.md +53 -30
  92. package/plugins/src/base/skills/jira-source-artifacts/SKILL.md +107 -0
  93. package/plugins/src/base/skills/jira-validate-ticket/SKILL.md +224 -0
  94. package/plugins/src/base/skills/jira-verify/SKILL.md +15 -35
  95. package/plugins/src/base/skills/jira-write-ticket/SKILL.md +72 -19
  96. package/plugins/src/base/skills/notion-prd-intake/SKILL.md +169 -0
  97. package/plugins/src/base/skills/notion-to-jira/SKILL.md +137 -95
  98. package/plugins/src/base/skills/prd-ticket-coverage/SKILL.md +137 -0
  99. package/plugins/src/base/skills/product-walkthrough/SKILL.md +129 -0
  100. package/plugins/src/base/skills/ticket-triage/SKILL.md +19 -2
  101. package/plugins/src/expo/skills/jira-create/SKILL.md +60 -28
  102. package/plugins/src/expo/skills/jira-verify/SKILL.md +14 -34
  103. package/plugins/src/rails/skills/jira-create/SKILL.md +59 -28
  104. package/plugins/src/rails/skills/jira-verify/SKILL.md +13 -16
@@ -14,6 +14,50 @@ description: >
14
14
  Convert a Notion PRD into a structured JIRA ticket hierarchy: Epics > Stories > Sub-tasks.
15
15
  Each sub-task is scoped to exactly one repo and includes an empirical verification plan.
16
16
 
17
+ ## Modes
18
+
19
+ This skill supports two modes, controlled by a `dry_run` flag in `$ARGUMENTS`:
20
+
21
+ - **`dry_run: false`** (default — full mode): run all phases, write tickets via `jira-write-ticket`, run the preservation gate, report.
22
+ - **`dry_run: true`** (planning + validation only — no writes): run Phases 1, 1.5, 1.6, 2, 3, 4 to plan the hierarchy and draft each ticket spec, then call `jira-validate-ticket` (with `--spec-only`) on every drafted ticket. Aggregate the per-ticket validator reports into a single dry-run report. **Skip Phase 5 (sub-task creation), Phase 5.5 (preservation gate), and Phase 6 (results report)** — none of those make sense without writes. Return the dry-run report so the caller (e.g. `notion-prd-intake`) can decide whether to proceed.
23
+
24
+ Dry-run output format:
25
+
26
+ ```text
27
+ ## notion-to-jira dry-run: <PRD title>
28
+
29
+ ### Planned hierarchy
30
+ - Epic: <summary>
31
+ - Story 1.1: <summary>
32
+ - Sub-task [<repo>]: <summary>
33
+ - ...
34
+ - Story 1.2: ...
35
+
36
+ ### Per-ticket validation
37
+ - <ticket-id>: PASS | FAIL — <count> failures
38
+ - <gate-id>: <one-line reason and remediation>
39
+
40
+ ### Verdict: PASS | FAIL
41
+ ### Total failures: <n>
42
+ ```
43
+
44
+ The dry-run mode never writes to JIRA and never calls `mcp__atlassian__createJiraIssue`. It also never sets a Notion status — that is the orchestrating skill's responsibility.
45
+
46
+ ## Hard Rule: All Writes Go Through `jira-write-ticket`
47
+
48
+ **Every JIRA ticket created by this skill — every epic, story, and sub-task — MUST be created by invoking the `jira-write-ticket` skill. Never call `mcp__atlassian__createJiraIssue`, `mcp__atlassian__editJiraIssue`, `mcp__atlassian__createIssueLink`, or any other Atlassian write tool directly from this skill or from any sub-agent it spawns.**
49
+
50
+ `jira-write-ticket` enforces gates this skill does not:
51
+ - 3-audience description (Context / Technical Approach / Acceptance Criteria)
52
+ - Gherkin acceptance criteria
53
+ - Epic parent validation
54
+ - Explicit issue-link discovery (`blocks` / `is blocked by` / `relates to` / `duplicates` / `clones`)
55
+ - Single-repo scope check on Bug / Task / Sub-task
56
+ - Sign-in account and target environment recorded in description
57
+ - Post-create verification
58
+
59
+ Bypassing `jira-write-ticket` produces thin tickets that the rest of the lifecycle (triage, ticket-verify, journey, evidence) treats as broken. This is the most common failure mode this skill has had — calling `createJiraIssue` directly is a regression, not an optimization. The Atlassian read tools (`getJiraIssue`, `searchJiraIssuesUsingJql`, `getJiraIssueRemoteIssueLinks`, `getAccessibleAtlassianResources`, `getJiraProjectIssueTypesMetadata`, `getVisibleJiraProjects`) ARE allowed for context gathering and the Phase 5.5 preservation gate.
60
+
17
61
  ## Input
18
62
 
19
63
  A Notion PRD URL. The PRD is expected to have:
@@ -67,66 +111,23 @@ PRDs typically reference external design, UX, and data artifacts (Figma files, L
67
111
  - Embedded images and file attachments on the page itself
68
112
  - Fenced code blocks with example data (JSON, SQL, GraphQL, cURL request/response)
69
113
 
70
- 2. **Classify each artifact by domain**. The split matters each domain is the source of truth for different implementation decisions:
71
-
72
- | Domain | What it defines | Examples |
73
- |--------|-----------------|----------|
74
- | `ui-design` (mocks) | **Visual treatment only** — layout, spacing, typography, color, iconography | Figma design frames, Framer static frames, bare screenshots, mockup PNGs |
75
- | `ux-flow` (prototypes) | **Interaction and flow only** — navigation, transitions, state changes, timing, empty/error/loading states | Lovable output, Loom walkthroughs, Figma prototype links, annotated screenshots, Miro/Mural flow diagrams, user journey maps |
76
- | `data` | Request/response shape, schema constraints | Example JSON, SQL schemas, GraphQL snippets, API contracts |
77
- | `ops` | Deployment/runtime context | Runbooks, dashboards, Terraform refs, deployment diagrams |
78
- | `reference` | Cross-cutting context | Confluence, Notion peer pages, Google Docs, related PRDs |
79
-
80
- 3. **Apply disambiguation rules** when an artifact could fit multiple domains. These rules exist because agents consistently misclassify Figma and Lovable artifacts, which are the two most common sources of dropped context.
81
-
82
- - **Figma URL**: classify as `ux-flow` if the URL is a prototype share link — it contains `/proto/`, or has `starting-point-node-id=` in the query, or the sharing context labels it "prototype" / "play mode". Otherwise classify as `ui-design`. Never assume.
83
- - **Lovable output**: always `ux-flow`. Lovable ships working code, but its code, styling, and any embedded business rules are NOT authoritative. Treat Lovable strictly as a UX/flow reference. Implementation uses existing project components; business rules come from the PRD description, not from Lovable.
84
- - **Screenshot with annotations** (arrows between frames, flow labels, numbered steps): `ux-flow`. A bare unannotated screenshot: `ui-design`. A side-by-side gallery of state variants (empty/error/loading): `ui-design` with state variants noted.
85
- - **Loom / video walkthrough**: `ux-flow` in the vast majority of cases. The rare exception — a video that's only a static-frame design review with no interaction — is still `ux-flow` for routing purposes (both UX and UI stories benefit from it).
86
- - **Figma file with both design frames and a prototype**: emit two entries — one `ui-design` for the file, one `ux-flow` for the prototype URL — so both propagate correctly.
114
+ 2. **Classify each artifact and apply taxonomy rules** by invoking the `jira-source-artifacts` skill. That skill is the single source of truth for: domains (`ui-design` / `ux-flow` / `data` / `ops` / `reference`), per-tool classification rules (Figma `/proto/` vs design, Lovable as `ux-flow`, Loom, screenshots), and coverage smells. Do not restate the rules here — invoke the skill so any drift in the rules propagates uniformly.
87
115
 
88
- 4. **Build an `artifacts` map** keyed by domain. Each entry: `{ url, title, domain, source_page, source_page_url, classification_reason }`. The `classification_reason` makes disambiguation auditable ("Figma URL contains `/proto/` → ux-flow"). The `source_page` lets you trace each reference back to where it appeared in the PRD.
116
+ 3. **Build an `artifacts` map** keyed by domain. Each entry: `{ url, title, domain, source_page, source_page_url, classification_reason }`. The `classification_reason` makes disambiguation auditable ("Figma URL contains `/proto/` → ux-flow"). The `source_page` lets you trace each reference back to where it appeared in the PRD.
89
117
 
90
- 5. **Surface coverage smells** incomplete artifact sets are a common root cause of implementation drift:
91
- - **Zero artifacts** on a non-trivial PRD: almost always an extraction bug, not a design decision. Say so explicitly.
92
- - **Prototype but no mock** (`ux-flow` present, `ui-design` absent): flag "missing UI mocks". UI will have to be inferred from prototype frames — note that prototype styling is typically placeholder and must NOT be treated as visual source of truth. Record the smell on the epic.
93
- - **Mocks but no prototype** (`ui-design` present, `ux-flow` absent): flag "missing UX prototype". UX will have to be inferred from static mock states (empty/error/loading/hover) — any flow that isn't explicitly depicted in the mocks must be raised as a BLOCKER with recommendation + alternatives, not silently invented.
94
- - **Lovable output without a description covering business rules**: flag "business rules missing". Lovable's embedded logic is not authoritative; the PRD description must explicitly state required fields, validation, permissions, and edge cases.
118
+ 4. **Surface coverage smells** as defined in `jira-source-artifacts` §5 (zero artifacts, prototype-without-mock, mock-without-prototype, Lovable-without-business-rules). Record any detected smells on the epic.
95
119
 
96
120
  ### Phase 1.6: Source Precedence & Conflict Resolution
97
121
 
98
- Different artifact domains answer different questions. When they disagree, silent reconciliation is a known failure mode these rules must be encoded on the tickets and respected during implementation.
122
+ Source precedence rules and cross-axis conflict handling are defined in `jira-source-artifacts` §3 and §4. Apply them during ticket synthesis: every conflict between artifacts must be recorded under `## Open Questions` on the affected ticket, never silently reconciled.
99
123
 
100
- **Authoritative source by question**:
124
+ The existing-component reuse expectation (mocks define visual intent, not implementation shortcut) is defined in `jira-source-artifacts` §7. Encode it on every UI-touching story.
101
125
 
102
- | Question | Authoritative source |
103
- |----------|---------------------|
104
- | Does this field exist? Is it required? Who can see/edit it? What validation applies? What are the edge cases, permission rules, data constraints? | **Description / PRD body** (business rules) |
105
- | What does it look like — layout, spacing, typography, color, iconography? | **Mocks (`ui-design`)** |
106
- | How does it flow — navigation, transitions, state changes, timing, empty/error/loading states? | **Prototypes (`ux-flow`)** |
107
- | Where does the data come from, what shape is it, what are the API contracts? | **`data` artifacts** |
126
+ ### Phase 2: Codebase + Live Product Research
108
127
 
109
- **Cross-axis conflicts must be surfaced, not reconciled silently**:
128
+ Two complementary inputs ground PRD analysis: the **code** (what's there to reuse / extend) and the **live product** (what users see today). Skipping either produces tickets that misjudge the change.
110
129
 
111
- - Mock shows a field the description doesn't mention BLOCKER on the story: "Figma shows field `X` not in PRD; confirm it exists, and if so add business rules (required/optional, validation)."
112
- - Description mandates behavior the prototype contradicts → BLOCKER: "PRD says Y, prototype shows Z; which is correct?"
113
- - Prototype shows a flow the mocks don't cover (e.g., an error state) → Note on the story: "Error state flow from prototype; no mock exists for the error UI. Use existing error component or request mock."
114
- - Multiple artifacts of the same domain disagree (e.g., two Figma links showing different layouts) → BLOCKER: list both, ask which is current.
115
-
116
- Record every conflict on the ticket description under a `## Open Questions` subsection so the developer picking up the ticket sees it before writing code.
117
-
118
- **Existing-component reuse (applies to `ui-design` consumers)**:
119
-
120
- Mocks define *visual intent*, not *implementation shortcut*. Before a developer builds UI from a mock, they must search the codebase for the closest-matching existing component. Encode this expectation on every UI-touching story:
121
-
122
- - Story description includes: "Before implementing, identify the closest existing component in the codebase. Prefer reuse even if the Figma mock specifies different styling — flag the design-vs-code divergence as a discussion point on this ticket rather than pixel-matching Figma from scratch."
123
- - If no existing component fits, building a new one is an explicit decision that must be recorded in the ticket (with rationale) before implementation.
124
- - Lovable-generated components are never the reuse target — always use the project's own components.
125
-
126
- ### Phase 2: Codebase Research (if needed)
127
-
128
- If the session doesn't already have codebase context, explore the repos to understand what exists.
129
- Use Explore agents for repos not yet examined. Skip repos already explored in the current session.
130
+ **2a. Codebase research.** If the session doesn't already have codebase context, explore the repos to understand what exists. Use Explore agents for repos not yet examined. Skip repos already explored in the current session.
130
131
 
131
132
  Key things to look for:
132
133
  - Existing entities/modules that overlap with the PRD
@@ -134,41 +135,65 @@ Key things to look for:
134
135
  - Data model gaps the PRD requires (new fields, new entities)
135
136
  - The tech stack per repo (framework, ORM, UI library, deployment)
136
137
 
138
+ **2b. Live product walkthrough.** If the PRD touches existing user-facing surfaces (modifies a screen, adds something next to existing functionality, fixes current behavior, re-styles an existing flow), invoke the `product-walkthrough` skill against `E2E_BASE_URL` using the test user from config. This grounds the ticket plan in what's actually shipped — design-vs-current-product divergence, reuse candidates, and behavioral surprises that the PRD didn't anticipate become inputs to ticket creation rather than discoveries during implementation.
139
+
140
+ Skip 2b only when the work is purely backend with no user-visible surface, or affects a screen that does not yet exist in dev/prod.
141
+
142
+ Walkthrough findings are attached to the originating Notion PRD as a comment ("Current product walkthrough — `<route>`") and inherited onto the resulting epic / stories under a `## Current Product` subsection.
143
+
137
144
  ### Phase 3: Create Epics
138
145
 
139
- Create one Epic per PRD epic using the JIRA project key from config. Each Epic description should include:
140
- - Summary of the epic from the PRD
141
- - List of user stories it contains
142
- - Key decisions from comments (with attribution)
143
- - Blockers and open questions
144
- - Dependencies on other epics or PRDs
145
- - A **Source Artifacts** section listing every artifact extracted in Phase 1.5 (grouped by domain)
146
+ > **Mode guard**: In `dry_run: true` mode, do not invoke `jira-write-ticket` in this phase. Instead, draft the epic spec (summary, description_body, artifacts) and validate it with `jira-validate-ticket --spec-only`. Record the drafted spec (including a placeholder epic key like `DRY-RUN-EPIC-1`) for Phase 4 to use as parent references. In `dry_run: false` mode (default), proceed as described below.
146
147
 
147
- Use `contentFormat: "markdown"` for all descriptions.
148
+ For each PRD epic, **invoke the `jira-write-ticket` skill** (do not call `createJiraIssue` directly). Pass it everything it needs to enforce its quality gates:
148
149
 
149
- **Attach every artifact from Phase 1.5 as an Epic remote link** — regardless of domain. The epic is the canonical hub, and anyone working on the epic or its descendants must be able to reach the full set from one place. No filtering at the epic level.
150
+ - `project_key`: from `JIRA_PROJECT` config
151
+ - `issue_type`: `Epic`
152
+ - `summary`: epic title from the PRD
153
+ - `description_body`: a draft of the 3-audience description containing:
154
+ - **Context / Business Value**: epic summary from the PRD, originating Notion URL, business outcome
155
+ - **Technical Approach**: cross-cutting integration points and constraints surfaced in Phase 2 codebase research
156
+ - List of user stories the epic contains
157
+ - Key decisions from comments (with attribution)
158
+ - Blockers and open questions
159
+ - Dependencies on other epics or PRDs
160
+ - A **Source Artifacts** section listing every artifact extracted in Phase 1.5 (grouped by domain)
161
+ - `artifacts`: the full Phase 1.5 artifact list — every artifact, regardless of domain. The epic is the canonical hub, and anyone working on the epic or its descendants must be able to reach the full set from one place. No filtering at the epic level. `jira-write-ticket` Phase 4c attaches them as remote links.
162
+ - `priority`, `labels`, `components`, `fix_version`: as appropriate
163
+
164
+ Capture the returned epic key — Phase 4 needs it as the parent for stories.
150
165
 
151
166
  ### Phase 4: Create Stories
152
167
 
153
- For each Epic, create Stories:
168
+ > **Mode guard**: In `dry_run: true` mode, do not invoke `jira-write-ticket` in this phase. Instead, draft each story spec and validate it with `jira-validate-ticket --spec-only`. Use placeholder keys (e.g. `DRY-RUN-STORY-1.1`) for any downstream references. In `dry_run: false` mode (default), proceed as described below.
169
+
170
+ For each Epic, plan two kinds of stories:
154
171
  - **One "X.0 Setup" story** for data model and infrastructure prerequisites (new entities, migrations, new fields, infrastructure like S3 buckets or SQS queues)
155
172
  - **One story per user story** from the PRD (numbered to match the PRD)
156
173
 
157
- **Story naming convention**: Prefix with a short code derived from the PRD title:
174
+ **Story naming convention**: Prefix the summary with a short code derived from the PRD title:
158
175
  - "Contract Upload" -> `[CU-1.1]`
159
176
  - "Squad Planning" -> `[SP-1.1]`
160
177
  - Use your judgment for other PRDs
161
178
 
162
- Each story description should include:
163
- - The user story statement from the PRD
164
- - Acceptance criteria (from functional requirements)
165
- - Technical notes from engineering comments
166
- - Blockers with recommendation + alternatives (if any)
167
- - A **Source Artifacts** section listing the artifacts inherited from the epic that match this story's scope (see propagation rules below)
179
+ For each story, **invoke `jira-write-ticket`** with:
168
180
 
169
- Set `parent` to the Epic key to link stories to their epic.
181
+ - `project_key`: from `JIRA_PROJECT` config
182
+ - `issue_type`: `Story`
183
+ - `epic_parent`: the Epic key captured in Phase 3 (mandatory — `jira-write-ticket` rejects non-bug, non-epic tickets without an epic parent)
184
+ - `summary`: prefixed per the naming convention above
185
+ - `description_body`: a draft of the 3-audience description containing:
186
+ - **Context / Business Value**: the user story statement from the PRD
187
+ - **Technical Approach**: notes from engineering comments and Phase 2 codebase research
188
+ - **Acceptance Criteria** (Gherkin) derived from the functional requirements — `jira-write-ticket` will reject prose-only acceptance criteria
189
+ - Blockers with recommendation + alternatives (if any), under `## Open Questions`
190
+ - A **Source Artifacts** section listing the artifacts inherited from the epic that match this story's scope (see propagation rules below)
191
+ - `artifacts`: the Phase 1.5 artifacts filtered by domain per the inheritance table below — `jira-write-ticket` Phase 4c attaches them as remote links
192
+ - `priority`, `labels`, `components`, `fix_version`: as appropriate
170
193
 
171
- **Inherit domain-matching artifacts as story remote links**. For each story, attach the Phase 1.5 artifacts whose domain matches the story's scope:
194
+ Capture each returned story key Phase 5 needs it as the parent for sub-tasks.
195
+
196
+ **Inherit domain-matching artifacts as story remote links**. For each story, the artifact set passed to `jira-write-ticket` should be the Phase 1.5 artifacts whose domain matches the story's scope:
172
197
 
173
198
  | Story type | Inherits domains |
174
199
  |------------|------------------|
@@ -181,10 +206,10 @@ When classification is ambiguous, err on the side of inclusion — a developer c
181
206
 
182
207
  ### Phase 5: Create Sub-tasks
183
208
 
184
- Delegate sub-task creation to **parallel agents** (one per epic or batch of stories) for efficiency.
209
+ Delegate sub-task creation to **parallel agents** (one per epic or batch of stories) for efficiency. **Every spawned agent must invoke `jira-write-ticket` for each sub-task — no agent may call `createJiraIssue` directly.** This is non-negotiable; see the Agent Prompt Template at the bottom of this skill for the exact instructions to pass.
185
210
 
186
211
  Each sub-task MUST:
187
- 1. **Be scoped to exactly ONE repo** — indicated in brackets in the summary: `[repo-name]`
212
+ 1. **Be scoped to exactly ONE repo** — indicated in brackets in the summary: `[repo-name]`. `jira-write-ticket` enforces single-repo scope on Sub-task; cross-repo sub-tasks will be rejected and must be split before delegation.
188
213
  2. **Include an Empirical Verification Plan** — real user-like verification, NOT unit tests, linting, or typechecking
189
214
 
190
215
  **Verification plan examples by stack:**
@@ -192,28 +217,24 @@ Each sub-task MUST:
192
217
  - **Frontend web**: Playwright browser tests (login with test user, navigate, interact, screenshot)
193
218
  - **Infrastructure**: `cdk synth` / `terraform plan` verification, CLI checks after deploy
194
219
 
195
- Use the test user credentials from config for all verification plans.
220
+ Use the test user credentials from config for all verification plans. The credentials are passed to `jira-write-ticket` as the sign-in account so it can record them in the description per its own rules.
221
+
222
+ For each sub-task, the spawned agent invokes `jira-write-ticket` with `issue_type: "Sub-task"` and `parent` set to the Story key. The Story key is the parent — the epic relationship is inherited transitively.
196
223
 
197
- Set `parent` to the Story key. Use `issueTypeName: "Sub-task"`.
224
+ Sub-tasks inherit their parent story's artifacts by reference (the parent link). Do not pass the same artifact list to every sub-task — that creates noise. The only exception is when a sub-task depends on an artifact that the parent story doesn't (e.g., a sub-task spec'd from a specific Figma frame that the broader story doesn't cite) — in that case, pass the specific artifact in the `artifacts` parameter to `jira-write-ticket`.
198
225
 
199
- Sub-tasks inherit their parent story's artifacts by reference (the parent link). Do not re-attach the same remote links on every sub-task — that creates noise. The only exception is when a sub-task depends on an artifact that the parent story doesn't (e.g., a sub-task spec'd from a specific Figma frame that the broader story doesn't cite) — in that case, attach the specific artifact directly.
226
+ ### Phase 5.5: Artifact Preservation Gate (mandatory)
200
227
 
201
- ### Phase 5.5: Artifact Preservation Gate
228
+ Run the preservation gate defined in `jira-source-artifacts` §8 against the artifacts extracted in Phase 1.5 and the tickets just created. Do NOT restate or modify the gate logic here — invoke the rules from `jira-source-artifacts` so any rule change propagates uniformly.
202
229
 
203
- Before reporting, verify that every artifact extracted in Phase 1.5 is reachable from the created tickets. This gate exists because silent artifact loss is the failure mode this skill is designed to prevent.
230
+ To run the gate, this skill must:
204
231
 
205
- 1. Pull the remote links of every epic and story created in this run (via the JIRA API).
206
- 2. Build a preservation matrix: `artifact URL → [ticket keys that reference it]`.
207
- 3. For every artifact from Phase 1.5:
208
- - It MUST appear on the epic it belongs to (no exceptions).
209
- - It SHOULD appear on at least one story whose scope matches its domain (except `reference`-domain artifacts, which may be epic-only if no story is domain-matched).
210
- 4. If any artifact has zero references anywhere, or is missing from its epic, FAIL LOUDLY:
211
- - List each dropped artifact with its domain, title, and source page.
212
- - State why it was dropped (domain classification error, propagation skipped, attach failure).
213
- - Ask the human to confirm the drop or point at the right epic/story, then re-attach before continuing.
214
- 5. If classification seems misrouted (e.g., a Figma link ended up on a backend story and nowhere else), surface the misroute and offer to re-propagate.
232
+ 1. Pull the remote links of every epic and story created in this run via `mcp__atlassian__getJiraIssueRemoteIssueLinks`.
233
+ 2. Apply the §8 preservation matrix and verdict rules.
234
+ 3. If the gate fails: list each dropped/misrouted artifact (domain, title, source page, why it was dropped) and either re-attach via `jira-write-ticket` (UPDATE mode) or stop and ask the human. Never silently proceed past a gate failure.
235
+ 4. If the gate passes: print the matrix compactly and proceed to Phase 6.
215
236
 
216
- Do NOT skip this gate. If every artifact is preserved, print the matrix compactly and proceed to Phase 6.
237
+ This gate is not optional. Skipping it is the failure mode the architecture exists to prevent.
217
238
 
218
239
  ### Phase 6: Report Results
219
240
 
@@ -244,19 +265,40 @@ Common blocker categories:
244
265
 
245
266
  ## Agent Prompt Template for Sub-task Creation
246
267
 
247
- When delegating to agents, provide this context:
268
+ When delegating to agents, provide this context. **The "MUST invoke jira-write-ticket" instruction is load-bearing — do not edit it out when adapting this template.**
248
269
 
249
270
  ```text
250
271
  Create JIRA sub-tasks in the [PROJECT] project at [CLOUD_ID].
251
- Use issueTypeName "Sub-task" and set parent to the story key.
252
- Use contentFormat "markdown".
253
272
 
254
- Test user info: [credentials from config]
273
+ CRITICAL: For each sub-task, invoke the `jira-write-ticket` skill via the Skill tool.
274
+ Do NOT call `mcp__atlassian__createJiraIssue` directly. The `jira-write-ticket` skill
275
+ enforces required quality gates (Gherkin acceptance criteria, 3-audience description,
276
+ single-repo scope, sign-in/environment fields, post-create verification). Bypassing it
277
+ produces broken tickets that downstream skills (triage, journey, evidence) cannot use.
278
+
279
+ For each sub-task, invoke `jira-write-ticket` with:
280
+ - issue_type: "Sub-task"
281
+ - parent: the parent story key
282
+ - project_key: [PROJECT]
283
+ - summary: prefixed with the repo in brackets, e.g. "[backend-api] Add audit log table"
284
+ - description_body: a 3-section draft (Context / Technical Approach / Acceptance Criteria)
285
+ - gherkin_acceptance_criteria: derived from the story's functional requirements
286
+ - sign_in_account: [test user credentials from config — name + role + how to obtain]
287
+ - target_environment: "dev"
288
+ - empirical_verification_plan: real user-like verification (curl + auth token,
289
+ Playwright browser flow, CLI check after deploy) using the test credentials.
290
+ NOT unit tests, linting, or typechecking.
255
291
 
256
292
  Each sub-task must:
257
- 1. Be scoped to ONE repo only
258
- 2. Include an **Empirical Verification Plan** section
259
- 3. Include the repo in brackets in the summary
293
+ 1. Be scoped to ONE repo only — repo named in brackets in the summary
294
+ 2. Include the Empirical Verification Plan in the description
295
+ 3. Be created via `jira-write-ticket`, not via direct MCP calls
296
+
297
+ If `jira-write-ticket` rejects a sub-task (cross-repo scope, missing Gherkin, missing
298
+ sign-in, etc.), fix the input and re-invoke. Do NOT fall back to a direct
299
+ `createJiraIssue` call to bypass the gate.
300
+
301
+ Test user info: [credentials from config]
260
302
 
261
303
  [Then list all sub-tasks grouped by parent story with details]
262
304
  ```
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: prd-ticket-coverage
3
+ description: "Verifies that every requirement in a Notion PRD is covered by at least one created JIRA ticket — no silent drops. Parses the PRD into atomic items (goals, user stories, functional/non-functional requirements, acceptance criteria, important notes), maps each to the created tickets, and produces a coverage matrix and verdict (COMPLETE / COMPLETE_WITH_SCOPE_CREEP / GAPS_FOUND / NO_TICKETS_FOUND). Used by notion-prd-intake post-write to gate the Status=Ticketed transition; can also be invoked standalone for after-the-fact audits."
4
+ allowed-tools: ["Skill", "mcp__claude_ai_Notion__notion-fetch", "mcp__claude_ai_Notion__notion-get-comments", "mcp__atlassian__getJiraIssue", "mcp__atlassian__searchJiraIssuesUsingJql", "mcp__atlassian__getAccessibleAtlassianResources"]
5
+ ---
6
+
7
+ # PRD Ticket Coverage Audit: $ARGUMENTS
8
+
9
+ `$ARGUMENTS` is one of:
10
+
11
+ 1. A PRD URL alone — auto-discover created tickets via the PRD's epic remote link.
12
+ 2. A PRD URL plus an explicit list of ticket keys — `<PRD URL> tickets=[KEY-1,KEY-2,...]`. Use this when called from `notion-prd-intake` (which knows the keys it just created).
13
+
14
+ Verify that every atomic item in the PRD is covered by at least one of the listed/discovered JIRA tickets. The output gates whether the PRD's `Status` should remain `Ticketed` or revert to `Blocked`.
15
+
16
+ ## Why this exists
17
+
18
+ Per-ticket gates (`jira-validate-ticket`) prove each created ticket is well-formed in isolation. They do NOT prove the *set* of created tickets is complete relative to the source PRD. Silent drops happen — an agent generates 8 tickets when the PRD called for 9, and nothing notices. This skill is the catch.
19
+
20
+ ## Phases
21
+
22
+ ### Phase 1 — Resolve inputs
23
+
24
+ 1. Parse `$ARGUMENTS`:
25
+ - PRD URL → extract page ID.
26
+ - Optional `tickets=[...]` → list of explicit ticket keys.
27
+ 2. Fetch the PRD via `notion-fetch` with `include_discussions: true`. Capture: title, body, child Epic pages, all comment threads.
28
+ 3. If the PRD has child Epic sub-pages (a multi-epic PRD like Home revamp), fetch each in parallel with `include_discussions: true`. The audit walks the full PRD tree.
29
+ 4. If `tickets=[...]` not provided, locate the JIRA epic by:
30
+ - Looking for a JIRA URL in the PRD body, comments, or the PRD's most recent "Ticketed by Claude" comment posted by `notion-prd-intake`.
31
+ - Searching JIRA via `searchJiraIssuesUsingJql` for an epic whose summary or description references the PRD title or page ID.
32
+ - If no epic found, return verdict `NO_TICKETS_FOUND` with a clear remediation — coverage cannot be assessed without the ticket set.
33
+ 5. Once the epic is known, fetch all child stories and sub-tasks via JQL: `"Epic Link" = <EPIC-KEY>` and recursively for sub-tasks.
34
+
35
+ ### Phase 2 — Extract atomic PRD items
36
+
37
+ Walk the PRD content and produce a list of **atomic items** — testable, ticketable units of work. Each item gets a stable identifier so the matrix is auditable.
38
+
39
+ The item types to extract:
40
+
41
+ | Type | Where it appears in the PRD | Example identifier |
42
+ |------|----------------------------|--------------------|
43
+ | `goal` | `## Goals` section bullets | `goal:1`, `goal:2`, ... |
44
+ | `non-goal` | `## Non-goals` (for scope-creep detection) | `non-goal:1` |
45
+ | `user-story` | Per-Epic page, "User Story" sub-headings | `epic-1.story-1.1` |
46
+ | `functional-req` | "Functional Requirements" sub-section | `epic-1.story-1.1.fr-1` |
47
+ | `non-functional-req` | "Non-functional Requirements" sub-section | `epic-1.story-1.1.nfr-1` |
48
+ | `acceptance-criterion` | Inline AC under a user story | `epic-1.story-1.1.ac-1` |
49
+ | `important-note` | Bold "Important note:" callouts | `note:1` |
50
+ | `mobile-spec` | Mobile-specific behavior callouts | `epic-1.story-1.1.mobile-1` |
51
+ | `state` | Empty / error / loading state notes | `epic-2.story-2.1.state:empty` |
52
+ | `permission` | Role-scoped permission notes | `epic-2.story-2.1.perm:admin` |
53
+ | `decision` | Confirmed decisions in comments (e.g. "Engineering: ...") | `comment:42` |
54
+
55
+ **Items NOT to extract** (these are not coverage gaps if missing):
56
+ - Open Questions / `[Needs validation]` items — these are PRD-side blockers, not ticket scope.
57
+ - Original concept thesis or annex/historical content — context, not requirements.
58
+ - "Out of scope" items in the PRD — explicitly excluded by product.
59
+
60
+ For each extracted item, capture: `{ id, type, source (PRD section / line), text (concise summary), keywords (3-5 terms for matching) }`.
61
+
62
+ ### Phase 3 — Map items to tickets
63
+
64
+ For each created ticket (epic + each story + each sub-task), capture: `{ key, summary, description, acceptance_criteria, scope_signals (keywords from summary + AC) }`.
65
+
66
+ Build a coverage matrix:
67
+
68
+ ```text
69
+ PRD item id → [ticket keys that cover it]
70
+ ```
71
+
72
+ Matching rules (in priority order):
73
+
74
+ 1. **Direct quote / strong keyword overlap**: the ticket's summary or AC explicitly names the PRD item's keywords. High confidence.
75
+ 2. **Domain match**: PRD item describes a UI affordance ("Tasks widget") and a ticket scopes that affordance (`[CU-2.1] Tasks widget — empty state`). Medium-high confidence.
76
+ 3. **Scope inheritance**: PRD item is a sub-detail of a parent (e.g. an AC under a user story); the ticket covers the parent user story. Medium confidence — flag for review if no more specific ticket exists.
77
+ 4. **Cross-ticket coverage**: PRD item spans multiple tickets (e.g. a permission rule that applies to several widgets). Each contributing ticket is recorded.
78
+
79
+ Items with **zero** matching tickets are coverage gaps.
80
+
81
+ ### Phase 4 — Detect scope creep (informational)
82
+
83
+ For each created ticket, identify any tickets whose scope_signals do NOT trace back to a PRD item, AND are not justifiable as standard infrastructure tasks (e.g. `X.0 Setup` stories for data model / migrations are typically infrastructure scaffolding, not scope creep).
84
+
85
+ Scope creep is informational, not blocking — but worth surfacing because it usually indicates the agent invented work.
86
+
87
+ ### Phase 5 — Determine verdict
88
+
89
+ | Condition | Verdict |
90
+ |-----------|---------|
91
+ | All extracted PRD items have ≥1 matching ticket; no scope creep | `COMPLETE` |
92
+ | All extracted PRD items have ≥1 matching ticket; one or more scope-creep tickets | `COMPLETE_WITH_SCOPE_CREEP` |
93
+ | One or more PRD items have zero matching tickets | `GAPS_FOUND` |
94
+ | The created-tickets list is empty or unfetchable | `NO_TICKETS_FOUND` |
95
+
96
+ `GAPS_FOUND` is the only verdict that should gate the PRD's `Status`. Scope creep is advisory — surface it, but do not block.
97
+
98
+ ### Phase 6 — Emit report
99
+
100
+ Output a single fenced text block. Callers parse it; do not add free-form prose around it.
101
+
102
+ ```text
103
+ ## prd-ticket-coverage: <PRD title>
104
+
105
+ PRD page: <URL>
106
+ Tickets audited: <epic-key> + <story-count> stories + <subtask-count> sub-tasks
107
+ Atomic PRD items extracted: <n>
108
+
109
+ ### Coverage matrix
110
+ | PRD item | Tickets |
111
+ |----------|---------|
112
+ | <id> (<type>) — <text> | <ticket-key>, <ticket-key> |
113
+ | <id> (<type>) — <text> | <ticket-key> |
114
+ | <id> (<type>) — <text> | **(none)** |
115
+ | ... | ... |
116
+
117
+ ### Gaps (PRD items with zero ticket coverage — blocks Ticketed status)
118
+ - <item-id> (<type>) — <text>
119
+ - *Source:* <PRD section reference>
120
+ - *Suggested fix:* <add a ticket scoped to X / extend ticket Y to cover this / clarify whether this is in scope>
121
+
122
+ ### Scope creep (tickets without PRD trace — informational, does not block)
123
+ - <ticket-key> — <summary>
124
+ - *Why flagged:* <reason — e.g. "no matching item in PRD; not an infra task">
125
+
126
+ ### Verdict: COMPLETE | COMPLETE_WITH_SCOPE_CREEP | GAPS_FOUND | NO_TICKETS_FOUND
127
+ ### Gap count: <n>
128
+ ### Scope-creep count: <n>
129
+ ```
130
+
131
+ ## Rules
132
+
133
+ - Read-only — never write to JIRA, never write to Notion (callers do that based on the verdict).
134
+ - Never silently drop a PRD item from extraction. If an item is ambiguous about whether it's scope, include it in extraction with type `ambiguous` and let the matching phase resolve it. The point of the audit is to catch silent drops; the audit can't have its own.
135
+ - Be explicit about confidence in matches — the matrix is for humans to skim; vague matches help no one. If a match is rule-3 ("scope inheritance"), say so.
136
+ - Scope creep is INFORMATIONAL. It is normal for an agent to add infra tickets (`X.0 Setup`) the PRD doesn't explicitly enumerate. Only flag scope creep when the ticket genuinely doesn't trace to PRD content AND isn't standard scaffolding.
137
+ - The `GAPS_FOUND` verdict is the gate. The caller (e.g. `notion-prd-intake`) uses it to decide whether to revert `Status` from `Ticketed` to `Blocked`.
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: product-walkthrough
3
+ description: "Methodology for evaluating the live product via a real browser (Playwright MCP) when planning work or evaluating a PRD. Reading a PRD or a mock without seeing the current product produces tickets that misjudge the change — this skill grounds the analysis in what actually exists today. Invoke this skill from notion-to-jira (Phase 2b live-product walkthrough), jira-create, and any PRD intake flow whose work touches existing user-facing surfaces."
4
+ allowed-tools: ["Skill", "Bash", "Read", "mcp__plugin_playwright_playwright__browser_navigate", "mcp__plugin_playwright_playwright__browser_snapshot", "mcp__plugin_playwright_playwright__browser_take_screenshot", "mcp__plugin_playwright_playwright__browser_click", "mcp__plugin_playwright_playwright__browser_type", "mcp__plugin_playwright_playwright__browser_select_option", "mcp__plugin_playwright_playwright__browser_fill_form", "mcp__plugin_playwright_playwright__browser_press_key", "mcp__plugin_playwright_playwright__browser_hover", "mcp__plugin_playwright_playwright__browser_navigate_back", "mcp__plugin_playwright_playwright__browser_resize", "mcp__plugin_playwright_playwright__browser_tabs", "mcp__plugin_playwright_playwright__browser_console_messages", "mcp__plugin_playwright_playwright__browser_network_requests", "mcp__plugin_playwright_playwright__browser_wait_for", "mcp__plugin_playwright_playwright__browser_close"]
5
+ ---
6
+
7
+ # Live Product Walkthrough
8
+
9
+ Reading a PRD or a mock without seeing the current product produces tickets that misjudge the change. This skill defines how to use a real browser (via Playwright MCP) to evaluate the live product *before* planning tickets, so the work is grounded in what actually exists today.
10
+
11
+ ## When to invoke
12
+
13
+ Always run a walkthrough when the work touches user-facing surfaces:
14
+
15
+ - The PRD describes a change to an existing screen, flow, or interaction
16
+ - The PRD adds something *next to* existing functionality (entry points, navigation, related screens)
17
+ - A mock or prototype implies a re-style or re-flow of something currently shipped
18
+ - The change is a "bug" framed as a fix to current behavior — you must see the current behavior before reasoning about the fix
19
+
20
+ Skip when the work is purely backend with no user-visible surface, type-only, doc-only, or affects a screen that does not yet exist in production / dev.
21
+
22
+ ## Configuration
23
+
24
+ Required inputs (ask if not set):
25
+
26
+ | Variable | Purpose | Example |
27
+ |----------|---------|---------|
28
+ | `E2E_BASE_URL` | Frontend base URL to walk through | `https://dev.example.io/` |
29
+ | Sign-in account | Test user to sign in as for the affected flows | from PRD config / 1Password / env |
30
+ | Sign-in credentials | How to obtain (1Password item, env vars) | `E2E_TEST_PHONE`, `E2E_TEST_OTP` |
31
+
32
+ Walk through `dev` (or the env named in the PRD) — never `prod` for exploratory walkthroughs unless explicitly asked.
33
+
34
+ ## Process
35
+
36
+ ### 1. Plan the walkthrough
37
+
38
+ Before opening the browser, list the surfaces the change will touch:
39
+
40
+ - Which screens/routes are involved (current and new)?
41
+ - Which user roles need to be exercised (admin / customer / etc.)?
42
+ - Which states matter (signed-out, signed-in, empty, populated, error, loading)?
43
+ - Which viewports matter (desktop always; mobile when responsive; tablet rarely)?
44
+
45
+ Write this list down. If you can't, the PRD is too vague — note this as a coverage smell and surface it as an Open Question on the resulting ticket.
46
+
47
+ ### 2. Open the browser and sign in
48
+
49
+ 1. `browser_navigate` to `E2E_BASE_URL`.
50
+ 2. `browser_resize` to the primary viewport (default desktop 1512×768).
51
+ 3. Sign in via the test account. Use `browser_fill_form` and `browser_click`. Capture the post-login screen with `browser_snapshot` or `browser_take_screenshot`.
52
+
53
+ ### 3. Walk the affected surfaces
54
+
55
+ For each surface from step 1:
56
+
57
+ 1. Navigate to it. Capture a `browser_snapshot` (accessibility tree — better for reasoning) and a `browser_take_screenshot` (visual evidence).
58
+ 2. Exercise the relevant interactions. Capture state transitions.
59
+ 3. Capture each state that matters (empty, populated, error, loading) — explicitly trigger them where possible.
60
+ 4. For responsive changes, `browser_resize` to the secondary viewport (mobile 375×812) and re-capture.
61
+ 5. `browser_console_messages` and `browser_network_requests` after each interaction — surface any errors, 4xx/5xx, or unexpected calls.
62
+
63
+ ### 4. Record findings
64
+
65
+ For every walkthrough, record:
66
+
67
+ - **What exists today**: a short prose description of the current flow, the components in use (if you can identify them from the DOM via `browser_snapshot`), and the states observed.
68
+ - **What the PRD changes**: explicit delta — added screens, removed screens, modified components, new states, removed states.
69
+ - **Existing-component reuse candidates**: components in the current product that could absorb the new behavior. The PRD-vs-current-product comparison drives which existing components a developer should reuse instead of building new (see `jira-source-artifacts` §7).
70
+ - **Design-vs-current-product divergence**: places where the mock/prototype materially diverges from what's shipped. Each divergence is a discussion item, not an automatic "rebuild from scratch" — see `jira-source-artifacts` §3 (mocks define visual intent, not implementation shortcut).
71
+ - **Coverage smells**: states the PRD doesn't address that exist today (e.g., the mock shows the empty state but ignores the populated state that has 90% of users).
72
+ - **Behavioral surprises**: anything that doesn't match the PRD's assumptions about current behavior — these are usually the most valuable findings, because they invalidate parts of the PRD.
73
+
74
+ ### 5. Attach evidence to the originating context
75
+
76
+ Capture screenshots/snapshots in a way that the originating ticket / Notion comment / PRD review can reference them.
77
+
78
+ - For **PRD intake**: include a "Current Product" comment on the Notion PRD with the findings prose and inline screenshots of the current state alongside each affected screen mentioned in the PRD.
79
+ - For **ticket creation**: include the findings under `## Current Product` in the ticket description (Story or Epic). Reference the screenshots as remote links if hosted, or inline them as attachments.
80
+ - For **change-impact analysis**: produce a short report; the consuming skill decides where it lands.
81
+
82
+ ### 6. Close the browser
83
+
84
+ `browser_close` when done. Walkthroughs are short, focused, and one-shot — do not leave a session open across phases.
85
+
86
+ ## Findings format
87
+
88
+ Use this structure when emitting walkthrough findings, so consuming skills can splice them into tickets / comments unchanged. The `## Current Product` heading matches what `jira-write-ticket` Phase 4e expects to inherit — keep the heading exact.
89
+
90
+ ```text
91
+ ## Current Product
92
+
93
+ **Environment**: <E2E_BASE_URL> as <account/role>
94
+ **Viewports exercised**: Desktop 1512×768, Mobile 375×812
95
+
96
+ ### Surfaces walked
97
+ 1. <route> — <one-line current behavior>
98
+ 2. <route> — <one-line current behavior>
99
+
100
+ ### What exists today
101
+ <2-4 sentence prose summary of the current flow and components in use>
102
+
103
+ ### Delta vs. PRD
104
+ - ADDED: <new surface/state from PRD>
105
+ - MODIFIED: <existing surface, with the change>
106
+ - REMOVED: <existing surface PRD removes>
107
+ - UNCHANGED-BUT-IMPACTED: <existing surface PRD doesn't mention but will be affected>
108
+
109
+ ### Existing-component reuse candidates
110
+ - <component or screen> — could absorb <new behavior>
111
+
112
+ ### Design-vs-current-product divergence
113
+ - <mock or prototype reference> diverges from <current screen> in: <specific dimension>
114
+ - Recommendation: <reuse / new build / discussion>
115
+
116
+ ### Coverage smells & behavioral surprises
117
+ - <smell or surprise>
118
+
119
+ ### Evidence
120
+ - <list of screenshots/snapshots, with captions>
121
+ ```
122
+
123
+ ## Rules
124
+
125
+ - Walk before you write. If the work touches existing user-facing surfaces and the walkthrough wasn't done, the resulting ticket is missing context — don't ship it.
126
+ - Never walk `prod` for exploratory analysis. `dev` (or the env named in the PRD) only.
127
+ - Treat console errors and unexpected network calls as findings — they often reveal undocumented behavior the PRD assumes is fine.
128
+ - Findings drive `## Open Questions` on tickets, not silent assumptions. If the current product contradicts the PRD, surface it as a BLOCKER.
129
+ - This skill captures observations; it does not edit JIRA or the PRD. Consuming skills decide where findings land (ticket description, Notion comment, validator input).
@@ -10,6 +10,22 @@ Perform analytical triage on the JIRA ticket. The caller MUST have run `jira-rea
10
10
 
11
11
  Repository name for scoped labels and comment headers: determine via `basename $(git rev-parse --show-toplevel)`.
12
12
 
13
+ ## Phase 0 -- Pre-flight Description Gate
14
+
15
+ Before any analytical work, confirm the ticket carries the content an implementer needs to start. The caller should already have run `jira-verify`; this phase consumes its output. If `jira-verify` returned `FAIL` for any of the following, emit `BLOCKED` immediately with the missing-requirements list and skip to Phase 6:
16
+
17
+ - Epic parent missing (non-bug, non-epic)
18
+ - Description quality failures (no Gherkin acceptance criteria, missing audience sections)
19
+ - Validation Journey missing on a runtime-behavior ticket
20
+ - Target backend environment missing on a runtime-behavior ticket
21
+ - Sign-in credentials missing on a ticket that touches authenticated surfaces
22
+ - Single-repo scope violated (Bug / Task / Sub-task spanning repos)
23
+ - Relationship discovery missing (no links AND no documented git+JQL search)
24
+
25
+ The caller (jira-agent) is responsible for transitioning the ticket to `Blocked`, reassigning to the **Reporter**, and posting a comment listing the missing requirements. This skill only emits the verdict and the missing-requirements list.
26
+
27
+ If `jira-verify` returned `PASS` for all the above, proceed to Phase 1.
28
+
13
29
  ## Phase 1 -- Relevance Check
14
30
 
15
31
  Search the local codebase using Glob and Grep for code related to the ticket's subject matter:
@@ -123,7 +139,7 @@ Every verification method must be specific enough that an automated agent could
123
139
  Evaluate the findings and produce exactly one verdict:
124
140
 
125
141
  - **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
126
- - **`BLOCKED`** -- Blocking conditions were found in Phase 1.5 (open blockers, duplicate-of-open) and/or ambiguities were found in Phase 3. Work MUST NOT proceed until resolved by a human. The caller should post findings, add the triage label, and STOP.
142
+ - **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent) MUST transition the ticket to `Blocked` and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
127
143
  - **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
128
144
  - **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
129
145
 
@@ -159,4 +175,5 @@ Structure all output with clear section headers so the caller can parse and post
159
175
  The caller is responsible for:
160
176
  1. Posting the findings as comments on the ticket (using whatever Jira mechanism is available)
161
177
  2. Adding the `claude-triaged-{repo}` label to the ticket
162
- 3. If `BLOCKED`: stopping all work and reporting the ambiguities to the human
178
+ 3. If `BLOCKED` due to Phase 0 (missing required description content): transitioning the ticket to `Blocked`, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
179
+ 4. If `BLOCKED` due to Phase 1.5 (open blockers, duplicate-of-open) or Phase 3 (ambiguities): stopping all work and reporting to the human; do NOT auto-transition status in these cases.