@codyswann/lisa 1.95.0 → 2.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.
Files changed (200) 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-build-intake.md +58 -0
  51. package/plugins/lisa/agents/notion-prd-intake.md +57 -0
  52. package/plugins/lisa/commands/{plan/fix-linter-error.md → fix/linter-error.md} +1 -1
  53. package/plugins/lisa/commands/implement.md +6 -0
  54. package/plugins/{src/base/commands/plan/lower-code-complexity.md → lisa/commands/improve/code-complexity.md} +1 -1
  55. package/plugins/lisa/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +1 -1
  56. package/plugins/lisa/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +1 -1
  57. package/plugins/lisa/commands/{plan/improve-tests.md → improve/tests.md} +1 -1
  58. package/plugins/lisa/commands/plan.md +15 -3
  59. package/plugins/lisa/commands/product-walkthrough.md +7 -0
  60. package/plugins/{src/base/commands/plan/local-code-review.md → lisa/commands/review/local.md} +1 -1
  61. package/plugins/{src/base/skills/plan-fix-linter-error → lisa/skills/fix-linter-error}/SKILL.md +2 -2
  62. package/plugins/lisa/skills/{plan-execute → implement}/SKILL.md +1 -1
  63. package/plugins/lisa/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
  64. package/plugins/lisa/skills/{plan-reduce-max-lines → improve-max-lines}/SKILL.md +2 -2
  65. package/plugins/{src/base/skills/plan-reduce-max-lines-per-function → lisa/skills/improve-max-lines-per-function}/SKILL.md +2 -2
  66. package/plugins/lisa/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
  67. package/plugins/{src/base/skills/plan-improve-tests → lisa/skills/improve-tests}/SKILL.md +2 -2
  68. package/plugins/lisa/skills/jira-build-intake/SKILL.md +134 -0
  69. package/plugins/lisa/skills/jira-create/SKILL.md +53 -30
  70. package/plugins/lisa/skills/jira-source-artifacts/SKILL.md +107 -0
  71. package/plugins/lisa/skills/jira-validate-ticket/SKILL.md +224 -0
  72. package/plugins/lisa/skills/jira-verify/SKILL.md +15 -91
  73. package/plugins/lisa/skills/jira-write-ticket/SKILL.md +20 -15
  74. package/plugins/lisa/skills/notion-prd-intake/SKILL.md +169 -0
  75. package/plugins/lisa/skills/notion-to-jira/SKILL.md +137 -95
  76. package/plugins/lisa/skills/prd-ticket-coverage/SKILL.md +137 -0
  77. package/plugins/lisa/skills/product-walkthrough/SKILL.md +129 -0
  78. package/plugins/lisa/skills/{plan-local-code-review → review-local}/SKILL.md +1 -1
  79. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-expo/skills/jira-create/SKILL.md +60 -28
  82. package/plugins/lisa-expo/skills/jira-verify/SKILL.md +14 -34
  83. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-rails/skills/{plan-fix-linter-error → fix-linter-error}/SKILL.md +2 -2
  86. package/plugins/lisa-rails/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
  87. package/plugins/{src/rails/skills/plan-reduce-max-lines → lisa-rails/skills/improve-max-lines}/SKILL.md +2 -2
  88. package/plugins/{src/rails/skills/plan-reduce-max-lines-per-function → lisa-rails/skills/improve-max-lines-per-function}/SKILL.md +2 -2
  89. package/plugins/lisa-rails/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
  90. package/plugins/lisa-rails/skills/jira-create/SKILL.md +59 -28
  91. package/plugins/lisa-rails/skills/jira-verify/SKILL.md +13 -16
  92. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  93. package/plugins/src/base/agents/jira-build-intake.md +58 -0
  94. package/plugins/src/base/agents/notion-prd-intake.md +57 -0
  95. package/plugins/src/base/commands/{plan/fix-linter-error.md → fix/linter-error.md} +1 -1
  96. package/plugins/src/base/commands/implement.md +6 -0
  97. package/plugins/{lisa/commands/plan/lower-code-complexity.md → src/base/commands/improve/code-complexity.md} +1 -1
  98. package/plugins/src/base/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +1 -1
  99. package/plugins/src/base/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +1 -1
  100. package/plugins/src/base/commands/{plan/improve-tests.md → improve/tests.md} +1 -1
  101. package/plugins/src/base/commands/plan.md +15 -3
  102. package/plugins/src/base/commands/product-walkthrough.md +7 -0
  103. package/plugins/{lisa/commands/plan/local-code-review.md → src/base/commands/review/local.md} +1 -1
  104. package/plugins/{lisa/skills/plan-fix-linter-error → src/base/skills/fix-linter-error}/SKILL.md +2 -2
  105. package/plugins/src/base/skills/{plan-execute → implement}/SKILL.md +1 -1
  106. package/plugins/src/base/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
  107. package/plugins/src/base/skills/{plan-reduce-max-lines → improve-max-lines}/SKILL.md +2 -2
  108. package/plugins/{lisa/skills/plan-reduce-max-lines-per-function → src/base/skills/improve-max-lines-per-function}/SKILL.md +2 -2
  109. package/plugins/src/base/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
  110. package/plugins/{lisa/skills/plan-improve-tests → src/base/skills/improve-tests}/SKILL.md +2 -2
  111. package/plugins/src/base/skills/jira-build-intake/SKILL.md +134 -0
  112. package/plugins/src/base/skills/jira-create/SKILL.md +53 -30
  113. package/plugins/src/base/skills/jira-source-artifacts/SKILL.md +107 -0
  114. package/plugins/src/base/skills/jira-validate-ticket/SKILL.md +224 -0
  115. package/plugins/src/base/skills/jira-verify/SKILL.md +15 -91
  116. package/plugins/src/base/skills/jira-write-ticket/SKILL.md +20 -15
  117. package/plugins/src/base/skills/notion-prd-intake/SKILL.md +169 -0
  118. package/plugins/src/base/skills/notion-to-jira/SKILL.md +137 -95
  119. package/plugins/src/base/skills/prd-ticket-coverage/SKILL.md +137 -0
  120. package/plugins/src/base/skills/product-walkthrough/SKILL.md +129 -0
  121. package/plugins/src/base/skills/{plan-local-code-review → review-local}/SKILL.md +1 -1
  122. package/plugins/src/expo/skills/jira-create/SKILL.md +60 -28
  123. package/plugins/src/expo/skills/jira-verify/SKILL.md +14 -34
  124. package/plugins/src/rails/skills/{plan-fix-linter-error → fix-linter-error}/SKILL.md +2 -2
  125. package/plugins/src/rails/skills/{plan-lower-code-complexity → improve-code-complexity}/SKILL.md +2 -2
  126. package/plugins/{lisa-rails/skills/plan-reduce-max-lines → src/rails/skills/improve-max-lines}/SKILL.md +2 -2
  127. package/plugins/{lisa-rails/skills/plan-reduce-max-lines-per-function → src/rails/skills/improve-max-lines-per-function}/SKILL.md +2 -2
  128. package/plugins/src/rails/skills/{plan-add-test-coverage → improve-test-coverage}/SKILL.md +2 -2
  129. package/plugins/src/rails/skills/jira-create/SKILL.md +59 -28
  130. package/plugins/src/rails/skills/jira-verify/SKILL.md +13 -16
  131. package/plugins/lisa/commands/build.md +0 -12
  132. package/plugins/lisa/commands/fix.md +0 -12
  133. package/plugins/lisa/commands/improve.md +0 -18
  134. package/plugins/lisa/commands/investigate.md +0 -10
  135. package/plugins/lisa/commands/jira/add-journey.md +0 -7
  136. package/plugins/lisa/commands/jira/create.md +0 -7
  137. package/plugins/lisa/commands/jira/evidence.md +0 -7
  138. package/plugins/lisa/commands/jira/journey.md +0 -7
  139. package/plugins/lisa/commands/jira/read-ticket.md +0 -7
  140. package/plugins/lisa/commands/jira/sync.md +0 -7
  141. package/plugins/lisa/commands/jira/triage.md +0 -7
  142. package/plugins/lisa/commands/jira/verify.md +0 -7
  143. package/plugins/lisa/commands/jira/write-ticket.md +0 -7
  144. package/plugins/lisa/commands/plan/create.md +0 -8
  145. package/plugins/lisa/commands/plan/execute.md +0 -6
  146. package/plugins/lisa/commands/review/implementation.md +0 -7
  147. package/plugins/lisa/commands/review.md +0 -10
  148. package/plugins/lisa/commands/ship.md +0 -8
  149. package/plugins/lisa/commands/spec-conformance.md +0 -7
  150. package/plugins/lisa-expo/commands/jira/add-journey.md +0 -7
  151. package/plugins/lisa-expo/commands/jira/create.md +0 -7
  152. package/plugins/lisa-expo/commands/jira/evidence.md +0 -7
  153. package/plugins/lisa-expo/commands/jira/journey.md +0 -7
  154. package/plugins/lisa-expo/commands/jira/verify.md +0 -7
  155. package/plugins/lisa-rails/commands/jira/add-journey.md +0 -7
  156. package/plugins/lisa-rails/commands/jira/create.md +0 -7
  157. package/plugins/lisa-rails/commands/jira/evidence.md +0 -7
  158. package/plugins/lisa-rails/commands/jira/journey.md +0 -7
  159. package/plugins/lisa-rails/commands/jira/verify.md +0 -7
  160. package/plugins/src/base/commands/build.md +0 -12
  161. package/plugins/src/base/commands/fix.md +0 -12
  162. package/plugins/src/base/commands/improve.md +0 -18
  163. package/plugins/src/base/commands/investigate.md +0 -10
  164. package/plugins/src/base/commands/jira/add-journey.md +0 -7
  165. package/plugins/src/base/commands/jira/create.md +0 -7
  166. package/plugins/src/base/commands/jira/evidence.md +0 -7
  167. package/plugins/src/base/commands/jira/journey.md +0 -7
  168. package/plugins/src/base/commands/jira/read-ticket.md +0 -7
  169. package/plugins/src/base/commands/jira/sync.md +0 -7
  170. package/plugins/src/base/commands/jira/triage.md +0 -7
  171. package/plugins/src/base/commands/jira/verify.md +0 -7
  172. package/plugins/src/base/commands/jira/write-ticket.md +0 -7
  173. package/plugins/src/base/commands/plan/create.md +0 -8
  174. package/plugins/src/base/commands/plan/execute.md +0 -6
  175. package/plugins/src/base/commands/review/implementation.md +0 -7
  176. package/plugins/src/base/commands/review.md +0 -10
  177. package/plugins/src/base/commands/ship.md +0 -8
  178. package/plugins/src/base/commands/spec-conformance.md +0 -7
  179. package/plugins/src/expo/commands/jira/add-journey.md +0 -7
  180. package/plugins/src/expo/commands/jira/create.md +0 -7
  181. package/plugins/src/expo/commands/jira/evidence.md +0 -7
  182. package/plugins/src/expo/commands/jira/journey.md +0 -7
  183. package/plugins/src/expo/commands/jira/verify.md +0 -7
  184. package/plugins/src/rails/commands/jira/add-journey.md +0 -7
  185. package/plugins/src/rails/commands/jira/create.md +0 -7
  186. package/plugins/src/rails/commands/jira/evidence.md +0 -7
  187. package/plugins/src/rails/commands/jira/journey.md +0 -7
  188. package/plugins/src/rails/commands/jira/verify.md +0 -7
  189. /package/plugins/lisa/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
  190. /package/plugins/lisa-rails/commands/{plan/fix-linter-error.md → fix/linter-error.md} +0 -0
  191. /package/plugins/lisa-rails/commands/{plan/lower-code-complexity.md → improve/code-complexity.md} +0 -0
  192. /package/plugins/lisa-rails/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +0 -0
  193. /package/plugins/lisa-rails/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
  194. /package/plugins/lisa-rails/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +0 -0
  195. /package/plugins/src/base/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
  196. /package/plugins/src/rails/commands/{plan/fix-linter-error.md → fix/linter-error.md} +0 -0
  197. /package/plugins/src/rails/commands/{plan/lower-code-complexity.md → improve/code-complexity.md} +0 -0
  198. /package/plugins/src/rails/commands/{plan/reduce-max-lines-per-function.md → improve/max-lines-per-function.md} +0 -0
  199. /package/plugins/src/rails/commands/{plan/reduce-max-lines.md → improve/max-lines.md} +0 -0
  200. /package/plugins/src/rails/commands/{plan/add-test-coverage.md → improve/test-coverage.md} +0 -0
@@ -4,4 +4,4 @@ allowed-tools: ["Skill"]
4
4
  argument-hint: "<threshold-percentage>"
5
5
  ---
6
6
 
7
- Use the /lisa:plan-add-test-coverage skill to increase test coverage. $ARGUMENTS
7
+ Use the /lisa:improve-test-coverage skill to increase test coverage. $ARGUMENTS
@@ -4,4 +4,4 @@ allowed-tools: ["Skill"]
4
4
  argument-hint: "<target-description>"
5
5
  ---
6
6
 
7
- Use the /lisa:plan-improve-tests skill to improve test quality. $ARGUMENTS
7
+ Use the /lisa:improve-tests skill to improve test quality. $ARGUMENTS
@@ -1,14 +1,26 @@
1
1
  ---
2
- description: "Plan work. Defines acceptance criteria, researches codebase, maps dependencies, and breaks down into ordered work items."
3
- argument-hint: "<description-or-ticket-id-or-url>"
2
+ description: "Plan work. Vendor-agnostic intake — given a PRD URL/path or description, extracts requirements, walks the live product, validates, and creates work items in the configured tracker."
3
+ argument-hint: "<PRD-url | @file | ticket-id-or-url | description>"
4
4
  ---
5
5
 
6
6
  Apply the `intent-routing` rule (loaded via the lisa plugin) and execute the **Plan** flow.
7
7
 
8
8
  **Orchestration: agent team.** Plan is a multi-specialist flow feeding a shared decomposition. After echoing the flow and orchestration mode, your FIRST tool call MUST be `TeamCreate`. Do not call `TaskCreate`, `Agent`, or implementation tools before the team exists.
9
9
 
10
+ ## Source dispatch
11
+
12
+ Detect the source type from `$ARGUMENTS` and route accordingly. The Plan flow is vendor-agnostic — the public interface speaks "PRD" and "work items", not "Notion" or "JIRA".
13
+
14
+ | If `$ARGUMENTS` is... | Hand off to |
15
+ |------------------------|-------------|
16
+ | A Notion URL (`notion.so/...` or a Notion database/page ID) | The `notion-prd-intake` skill (single-PRD mode if one page; database-scan mode if a database URL). It runs the full pipeline: extract artifacts, walk live product, dry-run validate, create tickets in the configured tracker, run the coverage audit, transition Notion `Status`. |
17
+ | A JIRA ticket ID or URL (e.g. `SE-123` or `*.atlassian.net/browse/SE-123`) | The `jira-agent`, which reads the ticket and extracts context. (Used when an existing JIRA epic *is* the spec — Plan decomposes it into stories/sub-tasks.) |
18
+ | A Linear / GitHub Issues URL or key | *Not yet implemented.* Stop and tell the user the adapter doesn't exist yet — the architecture supports it, but no `linear-prd-intake` / `github-prd-intake` skill has been built. Don't fall back. |
19
+ | A file path (`@plan.md`, `./spec.md`) | Read the file as the spec; run the Plan flow's core decomposition with the file content as input. |
20
+ | A plain-text description | Use the description as the spec; run the Plan flow's core decomposition. |
21
+
10
22
  If no PRD or specification exists, suggest running the **Research** flow first to produce one.
11
23
 
12
- If the argument is a JIRA ticket ID or URL, hand off to the `jira-agent` which will read the ticket and extract context.
24
+ The underlying intake skills (e.g. `notion-prd-intake`) are internal developers don't invoke them directly. They speak in vendor-agnostic terms (`/plan <PRD>`); the source/tracker choice is config.
13
25
 
14
26
  $ARGUMENTS
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: "Walk through the live product via a real browser (Playwright MCP) to ground PRD evaluation or ticket creation in what exists today. Captures current behavior, design-vs-product divergence, reuse candidates, and behavioral surprises."
3
+ allowed-tools: ["Skill"]
4
+ argument-hint: "<route or feature area to walk>"
5
+ ---
6
+
7
+ Use the /lisa:product-walkthrough skill to walk through the live product, capture current state, and produce findings that ground PRD/ticket reasoning. $ARGUMENTS
@@ -3,4 +3,4 @@ description: "Review local branch changes compared to main"
3
3
  allowed-tools: ["Skill"]
4
4
  ---
5
5
 
6
- Use the /lisa:plan-local-code-review skill to review local changes.
6
+ Use the /lisa:review-local skill to review local changes.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-fix-linter-error
2
+ name: fix-linter-error
3
3
  description: This skill should be used when fixing all violations of one or more ESLint rules across the codebase. It runs the linter, groups violations by rule and file, generates a brief with fix strategies, and creates a plan with tasks to implement the fixes.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
 
@@ -42,4 +42,4 @@ Fix strategies: extract functions, early returns, apply formatting, add types
42
42
  Verification: `bun run lint 2>&1 | grep -E "($ARGUMENTS)" | wc -l` → Expected: 0
43
43
  ```
44
44
 
45
- Invoke `/plan-execute` with this brief to create the implementation plan.
45
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-execute
2
+ name: implement
3
3
  description: This skill should be used for any non-trivial request — features, bugs, stories, epics, spikes, or multi-step tasks. It accepts a ticket URL (Jira, Linear, GitHub), a file path containing a spec, or a plain-text prompt. It assembles an agent team, breaks the work into structured tasks, and manages the full lifecycle from research through implementation, code review, deploy, and empirical verification.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-lower-code-complexity
2
+ name: improve-code-complexity
3
3
  description: This skill should be used when reducing the cognitive complexity threshold of the codebase. It lowers the threshold by 2, identifies functions that exceed the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to fix all violations.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
  ---
@@ -41,4 +41,4 @@ Refactoring strategies: extract functions, early returns, extract conditions, us
41
41
  Verification: `bun run lint 2>&1 | grep "cognitive-complexity" | wc -l` → Expected: 0
42
42
  ```
43
43
 
44
- Invoke `/plan-execute` with this brief to create the implementation plan.
44
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-reduce-max-lines
2
+ name: improve-max-lines
3
3
  description: This skill should be used when reducing the maximum file lines threshold and fixing all violations. It updates the eslint threshold configuration, identifies files exceeding the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to split oversized files.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
 
@@ -42,4 +42,4 @@ Refactoring strategies: extract modules, remove duplication, delete dead code, s
42
42
  Verification: `bun run lint 2>&1 | grep "max-lines" | wc -l` → Expected: 0
43
43
  ```
44
44
 
45
- Invoke `/plan-execute` with this brief to create the implementation plan.
45
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-reduce-max-lines-per-function
2
+ name: improve-max-lines-per-function
3
3
  description: This skill should be used when reducing the maximum lines per function threshold and fixing all violations. It updates the eslint threshold configuration, identifies functions exceeding the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to split oversized functions.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
 
@@ -43,4 +43,4 @@ Refactoring strategies: extract functions, early returns, extract conditions, us
43
43
  Verification: `bun run lint 2>&1 | grep "max-lines-per-function" | wc -l` → Expected: 0
44
44
  ```
45
45
 
46
- Invoke `/plan-execute` with this brief to create the implementation plan.
46
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-add-test-coverage
2
+ name: improve-test-coverage
3
3
  description: This skill should be used when increasing test coverage to a specified threshold percentage. It runs the coverage report, identifies files with the lowest coverage, generates a brief with coverage gaps, and creates a plan with tasks to add the missing tests.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
 
@@ -41,4 +41,4 @@ Configuration: [config file path], update thresholds to $ARGUMENTS%
41
41
  Verification: `bun run test:cov` → Expected: All thresholds pass at $ARGUMENTS%
42
42
  ```
43
43
 
44
- Invoke `/plan-execute` with this brief to create the implementation plan.
44
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plan-improve-tests
2
+ name: improve-tests
3
3
  description: This skill should be used when improving test quality. It scans the test suite for weak, brittle, or poorly-written tests, generates a brief with improvement opportunities, and creates a plan with tasks to strengthen the tests.
4
4
  allowed-tools: ["Read", "Bash", "Glob", "Grep"]
5
5
  ---
@@ -44,4 +44,4 @@ Test files needing improvement (ordered by impact):
44
44
  Verification: `bun run test` -> Expected: All tests pass, improved assertions and coverage
45
45
  ```
46
46
 
47
- Invoke `/plan-execute` with this brief to create the implementation plan.
47
+ Invoke `/implement` with this brief to create the implementation plan.
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: jira-build-intake
3
+ description: "Symmetric counterpart to notion-prd-intake on the JIRA side. Scans a JIRA project (or JQL filter) for tickets in Status=Ready, claims each by transitioning to In Progress, runs the implementation/build flow via jira-agent, and transitions to On Dev on completion. The Ready status is the human-flipped signal that a TODO ticket is truly ready for development — mirroring how Notion PRDs work product Draft → Ready → (us) In Review → Blocked|Ticketed."
4
+ allowed-tools: ["Skill", "Bash", "mcp__atlassian__getAccessibleAtlassianResources", "mcp__atlassian__searchJiraIssuesUsingJql", "mcp__atlassian__getJiraIssue", "mcp__atlassian__getTransitionsForJiraIssue", "mcp__atlassian__transitionJiraIssue", "mcp__atlassian__addCommentToJiraIssue"]
5
+ ---
6
+
7
+ # JIRA Build Intake: $ARGUMENTS
8
+
9
+ `$ARGUMENTS` is one of:
10
+
11
+ 1. A JIRA project key (e.g. `SE`) — scans that project for `Status = Ready` tickets.
12
+ 2. A full JQL filter (e.g. `project = SE AND component = "frontend" AND Status = Ready`) — used as-is. The skill will not append a `Status = Ready` clause if the JQL already names a status, so callers can intentionally widen.
13
+
14
+ Run one build-intake cycle. Each Ready ticket is claimed, built via the `jira-agent` flow, and transitioned to `On Dev` (or the equivalent next-status for that project). The cycle is the symmetric mirror of `notion-prd-intake`: humans flip `Ready`, agents pick up and progress.
15
+
16
+ ## Lifecycle assumed
17
+
18
+ The JIRA workflow has these statuses (or equivalents — see Configuration for renaming):
19
+
20
+ ```text
21
+ TODO → Ready → In Progress → On Dev → On QA → Done
22
+ (PM/ (us claim) (us done; (downstream)
23
+ human) PR ready)
24
+ ```
25
+
26
+ This skill ONLY transitions `Ready → In Progress` on claim, and `In Progress → On Dev` on completion. It never touches `TODO`, `On QA`, `Done`, or any blocked/closed states.
27
+
28
+ **Pre-flight check**: at start of each cycle, call `getTransitionsForJiraIssue` against a sample Ready ticket to confirm `In Progress` and `On Dev` are reachable transitions. If not, stop and report the workflow misconfiguration to the caller — do not invent transitions.
29
+
30
+ ## Phases
31
+
32
+ ### Phase 1 — Resolve the query
33
+
34
+ 1. Parse `$ARGUMENTS`:
35
+ - Project key: build JQL `project = <KEY> AND Status = "Ready" ORDER BY priority DESC, created ASC`.
36
+ - Full JQL: use as-is. If it does not include a `Status` clause, append `AND Status = "Ready"`.
37
+ 2. Resolve Atlassian cloud ID via `getAccessibleAtlassianResources`.
38
+
39
+ ### Phase 2 — Find Ready tickets
40
+
41
+ Run the JQL via `searchJiraIssuesUsingJql`. Capture each ticket's: key, summary, issue type, priority, assignee, parent (epic), labels, components.
42
+
43
+ If empty, report `"No tickets with Status=Ready. Nothing to do."` and exit. This is the common idle case.
44
+
45
+ ### Phase 3 — Process each Ready ticket (serial)
46
+
47
+ #### 3a. Claim
48
+
49
+ Transition the ticket from `Ready` to `In Progress` via `transitionJiraIssue`.
50
+ - Use `getTransitionsForJiraIssue` to find the transition ID for `In Progress`.
51
+ - Post a `[claude-build-intake]` comment via `addCommentToJiraIssue`: `"Claimed by Claude. Starting build."`
52
+ - This is the idempotency lock — a re-entrant cycle's `Status = Ready` filter will not see this ticket again.
53
+
54
+ If the transition fails (permission, missing transition, race), log under "Errors" in the cycle summary and skip this ticket. **Do not invoke the build flow on a ticket you didn't successfully claim.**
55
+
56
+ #### 3b. Run the build flow
57
+
58
+ Invoke the `jira-agent` (existing per-ticket lifecycle agent) with the ticket key. `jira-agent` owns:
59
+ - Reading the full ticket graph (`jira-read-ticket`)
60
+ - Running its own pre-flight quality gate (`jira-verify`)
61
+ - Running ticket triage (`ticket-triage`)
62
+ - Routing to the appropriate flow (Build / Fix / Investigate / Improve based on type)
63
+ - Posting progress comments via `jira-sync`
64
+ - Posting evidence via `jira-evidence`
65
+
66
+ Wait for `jira-agent` to return. Capture its outcome:
67
+ - **Success** — PR is ready (open or merged); evidence posted; ready for next status.
68
+ - **Blocked by jira-verify pre-flight gate** — `jira-agent` itself transitions the ticket to `Blocked` and reassigns to Reporter. This is correct and expected — let it stand. Record the outcome and move on.
69
+ - **Blocked by ticket-triage ambiguities** — `jira-agent` posts findings and stops. The ticket stays in `In Progress`. Surface to human; do not auto-transition. Record under "Errors" with reason `"Triage found ambiguities — see comments on <ticket-key>"`.
70
+ - **Errored** — exception, missing config, etc. Leave the ticket in `In Progress` for human investigation. Record under "Errors" with the exception summary.
71
+
72
+ #### 3c. Transition to On Dev (only on Success)
73
+
74
+ If `jira-agent` returned Success:
75
+ 1. Use `getTransitionsForJiraIssue` to find the transition ID for `On Dev` (or the configured next-after-build status).
76
+ 2. Transition via `transitionJiraIssue`.
77
+ 3. Post a `[claude-build-intake]` comment: `"Build complete. PR <URL>. Transitioned to On Dev."`
78
+
79
+ For any non-Success outcome, do NOT transition. The ticket sits in `In Progress` (or wherever `jira-agent` left it for the Blocked case) — the cycle's job is done; humans take it from there.
80
+
81
+ #### 3d. Continue
82
+
83
+ Move to the next Ready ticket. One ticket failing does not stop others.
84
+
85
+ ### Phase 4 — Summary report
86
+
87
+ ```text
88
+ ## jira-build-intake summary
89
+
90
+ Query: <JQL or project key>
91
+ Cycle started: <ISO timestamp>
92
+ Cycle completed: <ISO timestamp>
93
+
94
+ Tickets processed: <n>
95
+ - On Dev (build complete, PR ready): <n>
96
+ - <ticket-key> <summary> → PR <URL>
97
+ - Blocked (pre-flight verify failed): <n>
98
+ - <ticket-key> <summary> — see ticket comments
99
+ - Held (triage found ambiguities): <n>
100
+ - <ticket-key> <summary> — see ticket comments
101
+ - Errors: <n>
102
+ - <ticket-key> <summary> — <reason>
103
+
104
+ Total PRs opened: <n>
105
+ ```
106
+
107
+ ## Idempotency & safety
108
+
109
+ - **Claim-first ordering**: `In Progress` set BEFORE `jira-agent` invocation — no double-pickup.
110
+ - **No writes outside the lifecycle**: this skill only transitions `Ready → In Progress` and `In Progress → On Dev`. Every other status change is owned by `jira-agent` (which suggests transitions but only auto-transitions on the verify-FAIL path).
111
+ - **Failure isolation**: per-ticket exceptions caught and recorded; the cycle continues.
112
+ - **Single cycle per query**: do not run two `jira-build-intake` cycles in parallel against overlapping queries — concurrent claims could race. The scheduling layer (when added) is responsible for serialization.
113
+ - **Never invent a transition**: if `In Progress` or `On Dev` aren't valid transitions in the project's workflow, stop and report rather than guessing alternative names.
114
+
115
+ ## Configuration
116
+
117
+ Status names default to `Ready`, `In Progress`, `On Dev`. If a project uses different names (`Open` instead of `TODO`, `In Development` instead of `In Progress`, `Code Review` instead of `On Dev`), pass overrides in `$ARGUMENTS` as `claim_status="In Development" done_status="Code Review"`.
118
+
119
+ If a `Ready` status does not exist in the JIRA project's workflow, this skill cannot run. The remediation is to add `Ready` to the project workflow scheme — JIRA admin task, not something this skill can do.
120
+
121
+ | Variable | Default | Purpose |
122
+ |----------|---------|---------|
123
+ | `JIRA_PROJECT` | (from `$ARGUMENTS`) | Project key for the default JQL |
124
+ | Status: queue | `Ready` | The status that signals "human says this is buildable" |
125
+ | Status: claim | `In Progress` | The intermediate status the agent sets on pickup |
126
+ | Status: done | `On Dev` | The status set after a successful build |
127
+
128
+ ## Rules
129
+
130
+ - Never transition a ticket the cycle didn't claim. The `In Progress` transition is the signature of cycle ownership.
131
+ - Never bypass `jira-agent` to do build work directly. `jira-agent` owns the per-ticket lifecycle (read, verify, triage, route, sync, evidence). This skill is the dispatcher, not the builder.
132
+ - Never auto-transition past `On Dev`. Downstream statuses (`On QA`, `Done`) are owned by QA / product / a future verification-intake skill — not this one.
133
+ - If the ticket has no Validation Journey or no sign-in credentials in its description, `jira-agent`'s pre-flight verify will catch it and transition to `Blocked` — **don't try to fix the ticket from here**. Pre-flight gating is `jira-agent`'s job; running build work on a thin ticket produces broken work.
134
+ - On any unexpected response from `jira-agent` (status it doesn't claim, missing PR URL on success, etc.), record as Error and surface — never assume.
@@ -6,18 +6,22 @@ allowed-tools: ["Read", "Glob", "LS", "Skill", "mcp__atlassian__getVisibleJiraPr
6
6
 
7
7
  # Create JIRA Issues from $ARGUMENTS
8
8
 
9
- Analyze the provided file(s) and create a comprehensive JIRA hierarchy with all mandatory quality gates.
9
+ Analyze the provided file(s) and plan a JIRA hierarchy. **This skill plans structure only — every individual ticket write is delegated to `jira-write-ticket`.** Do not call `mcp__atlassian__createJiraIssue` from this skill; the necessary write tools are intentionally not in `allowed-tools`.
10
10
 
11
11
  ## Process
12
12
 
13
- 1. **Analyze**: Read $ARGUMENTS to understand scope
14
- 2. **Determine Structure**:
13
+ 1. **Analyze**: Read $ARGUMENTS to understand scope.
14
+ 2. **Extract source artifacts**: invoke the `jira-source-artifacts` skill, then enumerate every external URL, embed, attachment, or example payload in the input and classify each by domain per its rules. Build the `artifacts` map (one entry per artifact: url, title, domain, source page, classification reason). See "Source Artifacts" below.
15
+ 3. **Walk the live product** (when applicable): if the work touches existing user-facing surfaces, invoke the `product-walkthrough` skill to capture current behavior, design-vs-product divergence, and reuse candidates. Skip when the work is purely backend or affects a screen that does not yet exist. See "Live Product Walkthrough" below.
16
+ 4. **Determine structure**:
15
17
  - Epic needed if: multiple features, major changes, >3 related files
16
18
  - Direct tasks if: bug fix, single file, minor change
17
- 3. **Create Issues** with hierarchy:
18
- ```
19
+ 5. **Plan hierarchy**:
20
+ ```text
19
21
  Epic → User Story → Tasks (test, implement, document, cleanup)
20
22
  ```
23
+ 6. **Delegate every write to `jira-write-ticket`** in dependency order (epic first, then stories with the epic as parent, then sub-tasks with their story as parent). Pass the artifacts (filtered by domain per `jira-source-artifacts` inheritance rules) and the walkthrough findings (under `## Current Product`). See "Delegation to jira-write-ticket" below.
24
+ 7. **Run the artifact preservation gate** (`jira-source-artifacts` §8): after all writes complete, build the preservation matrix and verify every extracted artifact is reachable from the created tickets. Fail loudly if anything was dropped.
21
25
 
22
26
  ## Mandatory for Every Code Issue
23
27
 
@@ -81,33 +85,17 @@ h3. Assertions
81
85
  4. **Assertions are testable statements** — "Health check returns 200 with status ok" not "API works"
82
86
  5. **Prerequisites include environment setup** — Database connection, env vars, running services
83
87
 
84
- ## Source Artifact Preservation
85
-
86
- If $ARGUMENTS includes a PRD, design doc, Figma URL, Lovable prototype, or similar external artifact — or if a referenced file links out to one — those references MUST be preserved as remote links on the created tickets. Dropping source artifacts during ticket creation is the single most common quality failure in this pipeline, because developers picking up a ticket then lose the design/UX source of truth.
88
+ ## Source Artifacts
87
89
 
88
- Rules:
90
+ If $ARGUMENTS includes (or references) any external artifact — PRD, design doc, Figma URL, Lovable prototype, Loom walkthrough, screenshot, example payload — those references MUST be preserved as remote links on the created tickets. Silent artifact loss is the single most common quality failure in this pipeline.
89
91
 
90
- 1. **Extract before creating**: enumerate every external URL, embed, attachment, or example payload in the input. Classify by domain (`ui-design`, `ux-flow`, `data`, `ops`, `reference`) see `notion-to-jira` Phase 1.5 for the canonical taxonomy.
91
- 2. **Epic gets everything**: attach all extracted artifacts as remote links on the epic, regardless of domain.
92
- 3. **Stories inherit by domain**: frontend stories get `ui-design` + `ux-flow` + `reference`; backend gets `data` + `reference`; infra gets `ops` + `reference`. When ambiguous, err on the side of inclusion.
93
- 4. **Sub-tasks inherit via parent**: do not re-attach on every sub-task unless a specific artifact applies only to that sub-task.
94
- 5. **Verify before reporting**: before declaring done, confirm every extracted artifact is reachable from the tickets. If any are missing, fail loudly and surface the dropped list to the human — do not silently drop.
92
+ **Invoke the `jira-source-artifacts` skill** for the canonical rules: domains, per-tool classification (Figma `/proto/` vs design, Lovable, Loom, screenshots), source precedence, conflict handling under `## Open Questions`, inheritance from epic story sub-task, and the existing-component reuse expectation. Do not restate the rules here — invoke the skill so any rule change propagates uniformly.
95
93
 
96
94
  When delegating actual writes to `jira-write-ticket`, pass the extracted artifact list so its Phase 4c (Remote Links) step can attach them.
97
95
 
98
- **Classification disambiguation** (applied during extraction):
99
- - Figma URL with `/proto/` or `starting-point-node-id=` → `ux-flow`; plain design frame URL → `ui-design`.
100
- - Lovable output → always `ux-flow` (its code/styling/logic is NOT authoritative).
101
- - Loom / annotated screenshot with flow arrows → `ux-flow`; bare screenshot → `ui-design`.
102
-
103
- **Source precedence** (must be recorded on every ticket carrying design artifacts):
104
- - Business rules (fields, validation, permissions, constraints) come from the **description / PRD body**.
105
- - Visual treatment (layout, spacing, typography, color) comes from **mocks** (`ui-design`).
106
- - Flow and interaction (navigation, transitions, state changes) come from **prototypes** (`ux-flow`).
107
- - API / data shape comes from **`data` artifacts**.
108
- - Cross-axis conflicts are surfaced as `## Open Questions` BLOCKERs, never silently reconciled.
96
+ ## Live Product Walkthrough
109
97
 
110
- **Existing-component reuse** (applies to every UI-touching ticket): the story description must instruct the implementer to locate the closest existing component in the codebase and prefer reuse over pixel-matching a mock. Design-vs-code divergence is raised on the ticket, not resolved by the implementer alone.
98
+ When the work touches existing user-facing surfaces, invoke the `product-walkthrough` skill before drafting tickets. The walkthrough findings (current behavior, design-vs-product divergence, reuse candidates, behavioral surprises) become inputs to the ticket plan and surface under `## Current Product` on the resulting tickets. Skip only when the work is purely backend or affects a screen that does not yet exist.
111
99
 
112
100
  ## Issue Requirements
113
101
 
@@ -120,10 +108,45 @@ Each issue must clearly communicate to:
120
108
  Default project: from jira-cli config (override via arguments)
121
109
  Exclude unless requested: migration plans, performance tests
122
110
 
123
- Execute the analysis and create the complete JIRA structure with proper parent-child relationships.
124
-
125
111
  ## Delegation to jira-write-ticket
126
112
 
127
- For every individual ticket that will be created, delegate to the `jira-write-ticket` skill rather than calling `mcp__atlassian__createJiraIssue` directly. `jira-write-ticket` enforces description quality (Gherkin acceptance criteria, stakeholder/developer/assistant sections), relationship discovery (`blocks`, `is blocked by`, `relates to`, remote PR/Confluence/dashboard links), epic parent validation, and post-create verification.
113
+ **Mandatory.** Every ticket created by this skill MUST go through `jira-write-ticket`. This skill never calls `mcp__atlassian__createJiraIssue` itself that tool is intentionally excluded from `allowed-tools` so the gate cannot be bypassed.
114
+
115
+ `jira-write-ticket` enforces things this skill does not, and which determine ticket quality:
116
+ - 3-audience description (Context / Technical Approach / Acceptance Criteria)
117
+ - Gherkin acceptance criteria
118
+ - Epic parent validation (non-bug, non-epic types)
119
+ - Explicit link discovery (`blocks` / `is blocked by` / `relates to` / `duplicates` / `clones`)
120
+ - Remote links (PRs, Confluence, dashboards)
121
+ - Single-repo scope check for Bug / Task / Sub-task
122
+ - Sign-in account and target environment recorded in description
123
+ - Post-create verification
124
+
125
+ ### Invocation order
126
+
127
+ Tickets must be created in parent-before-child order so each child can be passed its parent key:
128
+
129
+ 1. Invoke `jira-write-ticket` for the epic. Capture the returned key.
130
+ 2. For each story, invoke `jira-write-ticket` with the epic key as the epic parent. Capture each story key.
131
+ 3. For each sub-task, invoke `jira-write-ticket` with the parent story key.
132
+
133
+ ### What to pass to each invocation
134
+
135
+ For every delegated write, pass:
136
+ - The summary, issue type, project key, and priority you decided
137
+ - The 3-section description body you drafted (Context / Technical Approach / Acceptance Criteria)
138
+ - Gherkin acceptance criteria
139
+ - Parent key (epic key for stories; story key for sub-tasks)
140
+ - The artifact list extracted in "Source Artifacts", filtered by domain per the inheritance rules — `jira-write-ticket` Phase 4c attaches them as remote links
141
+ - For tickets that change runtime behavior: the Validation Journey draft (or instruct it to call `jira-add-journey` after create)
142
+
143
+ ### What this skill is responsible for
144
+
145
+ This skill owns:
146
+ - Deciding the *shape* of the hierarchy (what's an epic vs. story vs. sub-task)
147
+ - Drafting the description body and acceptance criteria from the input
148
+ - Extracting and classifying source artifacts
149
+ - Threading parent keys through subsequent writes
150
+ - Running the Phase 5.5-style preservation check after all writes complete
128
151
 
129
- This skill's role is to analyze the input and decide the hierarchy (which epics, which stories, which tasks, in what parent-child structure). `jira-write-ticket` handles the actual write with full quality gates.
152
+ It does not own the actual JIRA write that's `jira-write-ticket`'s job.
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: jira-source-artifacts
3
+ description: "Canonical taxonomy and rules for handling source artifacts (Figma, Lovable, Loom, screenshots, design docs, data samples) when generating or evaluating JIRA tickets. Defines: (1) artifact domains, (2) classification rules per tool, (3) source precedence (which artifact is authoritative for which question), (4) inheritance from epic to story to sub-task, (5) cross-axis conflict handling. Invoke this skill from any flow that extracts, attaches, or reasons about external design/UX/data artifacts so the rules don't drift across skills."
4
+ allowed-tools: []
5
+ ---
6
+
7
+ # JIRA Source Artifact Taxonomy and Rules
8
+
9
+ This skill is doctrine, not action — it defines the rules. Skills that need to extract, classify, attach, or reason about external artifacts (design files, prototypes, recordings, data samples) invoke this skill to load the taxonomy and apply it.
10
+
11
+ The reason this lives in one place: silent drift across skills is the failure mode this body of rules exists to prevent. If the rules differ between `notion-to-jira`, `jira-create`, and `jira-write-ticket`, agents will silently route artifacts wrong and developers will lose source of truth. Edit here, propagate everywhere.
12
+
13
+ ## 1. Domains
14
+
15
+ Every artifact is classified into exactly one domain. The domain determines what the artifact is the source of truth for, and which tickets inherit it.
16
+
17
+ | Domain | What it defines | Examples |
18
+ |--------|-----------------|----------|
19
+ | `ui-design` (mocks) | **Visual treatment only** — layout, spacing, typography, color, iconography | Figma design frames, Framer static frames, bare screenshots, mockup PNGs |
20
+ | `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 |
21
+ | `data` | Request/response shape, schema constraints, contracts | Example JSON, SQL schemas, GraphQL snippets, API contracts, sample payloads |
22
+ | `ops` | Deployment / runtime context | Runbooks, dashboards, Terraform refs, deployment diagrams |
23
+ | `reference` | Cross-cutting context | Confluence, Notion peer pages, Google Docs, related PRDs, RFCs |
24
+
25
+ ## 2. Classification rules per tool
26
+
27
+ These rules exist because agents consistently misclassify Figma and Lovable artifacts, which are the two most common sources of dropped or misrouted context.
28
+
29
+ - **Figma**: classify as `ux-flow` if the URL is a prototype share link — it contains `/proto/`, has `starting-point-node-id=` in the query, or the sharing context labels it "prototype" / "play mode". Otherwise classify as `ui-design`. Never assume; inspect the URL.
30
+ - **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.
31
+ - **Lovable output**: always `ux-flow`. Lovable ships working code, but its code, styling, and any embedded business rules are NOT authoritative. Treat strictly as a UX/flow reference. Implementation uses existing project components; business rules come from the PRD body, not from Lovable.
32
+ - **Loom / video walkthrough**: `ux-flow` in the vast majority of cases. The rare exception — a video that's purely a static-frame design review with no interaction — is still `ux-flow` for routing purposes (both UX and UI stories benefit).
33
+ - **Screenshot**: bare unannotated screenshot → `ui-design`. Screenshot with arrows between frames, flow labels, or numbered steps → `ux-flow`. Side-by-side gallery of state variants (empty/error/loading) → `ui-design` with the state variants noted.
34
+ - **Confluence / Notion peer / Google Doc**: `reference` unless it is specifically a runbook (`ops`) or contains canonical API contracts (`data`).
35
+ - **Grafana / Datadog / Sentry**: `ops`.
36
+ - **Code blocks with example payloads** (JSON, SQL, GraphQL, cURL): `data`.
37
+
38
+ When an artifact could plausibly fit multiple domains and the rules above don't disambiguate, err on the side of inclusion — emit it under both, or use the broader domain. Misclassification is caught downstream by the preservation gate; underclassification is silent drop.
39
+
40
+ ## 3. Source precedence
41
+
42
+ When artifacts disagree, silent reconciliation is a known failure mode. The rules below define which source wins which question. **Record this precedence on every ticket that carries design artifacts** (under Technical Approach or a dedicated `## Source Precedence` subsection) so the implementer doesn't reconcile silently.
43
+
44
+ | Question | Authoritative source |
45
+ |----------|---------------------|
46
+ | Does this field exist? Is it required? Who can see/edit it? What validation applies? Permission rules, edge cases, data constraints? | **Description / PRD body** (business rules) |
47
+ | What does it look like — layout, spacing, typography, color, iconography? | **Mocks (`ui-design`)** |
48
+ | How does it flow — navigation, transitions, state changes, timing, empty/error/loading states? | **Prototypes (`ux-flow`)** |
49
+ | Where does the data come from, what shape is it, what are the API contracts? | **`data` artifacts** |
50
+ | Where does it run, who's on call, what's the dashboard? | **`ops` artifacts** |
51
+
52
+ ## 4. Cross-axis conflict handling
53
+
54
+ Conflicts MUST be surfaced under `## Open Questions` on the affected ticket — never silently reconciled.
55
+
56
+ - Mock shows a field the description doesn't mention → BLOCKER: "Figma shows field `X` not in PRD; confirm it exists, and if so add business rules (required/optional, validation, permissions)."
57
+ - Description mandates behavior the prototype contradicts → BLOCKER: "PRD says Y, prototype shows Z; which is correct?"
58
+ - Prototype shows a flow the mocks don't cover (e.g., an error state) → Note: "Error state flow from prototype; no mock exists. Use existing error component or request mock."
59
+ - Multiple artifacts of the same domain disagree (two Figma links showing different layouts) → BLOCKER: list both, ask which is current.
60
+ - Lovable output without a description covering business rules → BLOCKER: "Business rules missing. Lovable's embedded logic is not authoritative; PRD must explicitly state required fields, validation, permissions, and edge cases."
61
+
62
+ ## 5. Coverage smells
63
+
64
+ Incomplete artifact sets are a common root cause of implementation drift. Surface these on the epic when extracting:
65
+
66
+ - **Zero artifacts on a non-trivial PRD**: almost always an extraction bug, not a design decision. Say so explicitly.
67
+ - **`ux-flow` present, `ui-design` absent**: flag "missing UI mocks". UI will be inferred from prototype frames — note that prototype styling is typically placeholder and must NOT be treated as visual source of truth.
68
+ - **`ui-design` present, `ux-flow` absent**: flag "missing UX prototype". UX will be inferred from static mock states (empty/error/loading/hover) — any flow not explicitly depicted must be raised as a BLOCKER with recommendation + alternatives, not silently invented.
69
+
70
+ ## 6. Inheritance: epic → story → sub-task
71
+
72
+ Artifacts attach as Jira remote links and propagate down the hierarchy.
73
+
74
+ - **Epic**: gets EVERY artifact, regardless of domain. The epic is the canonical hub — anyone working on the epic or its descendants must reach the full set from one place. No filtering.
75
+ - **Story**: inherits the artifacts whose domain matches its scope:
76
+
77
+ | Story type | Inherits domains |
78
+ |------------|------------------|
79
+ | Frontend / UI | `ui-design`, `ux-flow`, `reference` |
80
+ | Backend / API / data model | `data`, `reference` |
81
+ | Infrastructure | `ops`, `reference` |
82
+ | Mixed / setup ("X.0") | All domains |
83
+
84
+ When classification is ambiguous, err on the side of inclusion — a developer can ignore an extra link, but they can't follow one that wasn't attached.
85
+
86
+ - **Sub-task**: inherits via the parent story link. Do NOT re-attach the same artifacts on every sub-task — that creates noise. Only attach an artifact directly on a sub-task when the sub-task depends on something the parent story doesn't (e.g., a sub-task spec'd from a specific Figma frame the broader story doesn't cite).
87
+
88
+ ## 7. Existing-component reuse (UI-touching tickets)
89
+
90
+ Mocks define visual *intent*, not implementation shortcut. Every UI-touching ticket description must include:
91
+
92
+ > Before implementing, identify the closest existing component in the codebase. Prefer reuse even if the mock specifies different styling — flag the design-vs-code divergence as a discussion item on this ticket rather than pixel-matching from scratch.
93
+
94
+ If no existing component fits, building a new one is an explicit decision that must be recorded in the ticket (with rationale) before implementation. Lovable-generated components are never the reuse target — always use the project's own components.
95
+
96
+ ## 8. Preservation gate (run after creating tickets)
97
+
98
+ Before declaring done, verify every extracted artifact is reachable from the created tickets.
99
+
100
+ 1. Build a preservation matrix: `artifact URL → [ticket keys that reference it]`.
101
+ 2. For every artifact:
102
+ - It MUST appear on the epic it belongs to (no exceptions).
103
+ - 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).
104
+ 3. Any artifact with zero references anywhere, or missing from its epic: FAIL LOUDLY — list the dropped artifacts with domain, title, and source page; surface to the human; re-attach before continuing.
105
+ 4. If classification looks misrouted (e.g., a Figma link landed on a backend story and nowhere else), surface the misroute and offer to re-propagate.
106
+
107
+ Skipping this gate is the most common cause of silent artifact loss. Do not skip it.