@codyswann/lisa 2.4.0 → 2.5.1

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 (38) hide show
  1. package/cdk/copy-overwrite/tsconfig.json +1 -4
  2. package/dist/configs/eslint/base.d.ts.map +1 -1
  3. package/dist/configs/jest/base.d.ts.map +1 -1
  4. package/dist/configs/jest/cdk.d.ts.map +1 -1
  5. package/dist/configs/jest/expo.d.ts.map +1 -1
  6. package/dist/configs/jest/nestjs.d.ts.map +1 -1
  7. package/dist/configs/jest/typescript.d.ts.map +1 -1
  8. package/dist/configs/vitest/base.d.ts.map +1 -1
  9. package/dist/configs/vitest/cdk.d.ts.map +1 -1
  10. package/dist/configs/vitest/nestjs.d.ts.map +1 -1
  11. package/dist/configs/vitest/typescript.d.ts.map +1 -1
  12. package/dist/utils/fibonacci.d.ts.map +1 -1
  13. package/expo/copy-overwrite/tsconfig.expo.json +0 -1
  14. package/expo/copy-overwrite/tsconfig.json +1 -4
  15. package/nestjs/copy-overwrite/tsconfig.json +1 -4
  16. package/nestjs/copy-overwrite/tsconfig.nestjs.json +0 -1
  17. package/package.json +3 -3
  18. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa/agents/linear-prd-intake.md +64 -0
  20. package/plugins/lisa/commands/intake.md +2 -2
  21. package/plugins/lisa/skills/intake/SKILL.md +13 -5
  22. package/plugins/lisa/skills/linear-prd-intake/SKILL.md +275 -0
  23. package/plugins/lisa/skills/linear-to-jira/SKILL.md +314 -0
  24. package/plugins/lisa/skills/plan/SKILL.md +5 -3
  25. package/plugins/lisa/skills/prd-ticket-coverage/SKILL.md +12 -9
  26. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  31. package/plugins/src/base/agents/linear-prd-intake.md +64 -0
  32. package/plugins/src/base/commands/intake.md +2 -2
  33. package/plugins/src/base/skills/intake/SKILL.md +13 -5
  34. package/plugins/src/base/skills/linear-prd-intake/SKILL.md +275 -0
  35. package/plugins/src/base/skills/linear-to-jira/SKILL.md +314 -0
  36. package/plugins/src/base/skills/plan/SKILL.md +5 -3
  37. package/plugins/src/base/skills/prd-ticket-coverage/SKILL.md +12 -9
  38. package/typescript/copy-overwrite/tsconfig.json +1 -4
@@ -0,0 +1,275 @@
1
+ ---
2
+ name: linear-prd-intake
3
+ description: "Scans a Linear workspace (or a specific team) for projects labelled `prd-ready` and runs each one through the dry-run validation pipeline. Projects that pass every gate get tickets written and the label flipped to `prd-ticketed`; projects that fail get clarifying-question comments (on a sentinel feedback issue under the project) and the label flipped to `prd-blocked`. Linear counterpart of `lisa:notion-prd-intake` and `lisa:confluence-prd-intake` — the workflow is identical; only the source-of-truth tools differ. Composes existing skills (linear-to-jira, jira-validate-ticket, jira-source-artifacts, product-walkthrough)."
4
+ allowed-tools: ["Skill", "Bash", "mcp__linear-server__list_projects", "mcp__linear-server__get_project", "mcp__linear-server__save_project", "mcp__linear-server__list_project_labels", "mcp__linear-server__list_issues", "mcp__linear-server__get_issue", "mcp__linear-server__save_issue", "mcp__linear-server__list_comments", "mcp__linear-server__save_comment", "mcp__linear-server__list_issue_labels", "mcp__linear-server__create_issue_label", "mcp__linear-server__list_documents", "mcp__linear-server__get_document", "mcp__linear-server__list_teams"]
5
+ ---
6
+
7
+ # Linear PRD Intake: $ARGUMENTS
8
+
9
+ `$ARGUMENTS` is one of:
10
+
11
+ - A Linear **workspace** URL — scans every project in the workspace whose labels include `prd-ready`. Example: `https://linear.app/acme`.
12
+ - A Linear **team** URL or team key — scans every project on the team whose labels include `prd-ready`. Example: `https://linear.app/acme/team/ENG/projects` or bare `ENG`.
13
+ - The literal token `linear` — equivalent to "the default Linear workspace"; only valid if `LINEAR_WORKSPACE` is configured.
14
+
15
+ Run one intake cycle against that scope. Each project with the `prd-ready` label is claimed, validated, and routed to either `prd-blocked` (with clarifying comments on a sentinel feedback issue) or `prd-ticketed` (with JIRA tickets created).
16
+
17
+ This skill is the Linear counterpart of `lisa:notion-prd-intake` and `lisa:confluence-prd-intake`. The phases, gates, comment templates, and rules are identical — the only differences are (1) the lifecycle is encoded as **project labels** instead of a Status property, (2) the fetch / update tools are Linear MCP, and (3) clarifying-question comments land on a sentinel feedback Issue under the project (because Linear's MCP does not expose project-level comments). Keep all three skills behaviorally aligned: when changing intake logic, change them together.
18
+
19
+ ## Confirmation policy
20
+
21
+ Do NOT ask the caller whether to proceed. Once invoked with a workspace/team scope, run the cycle to completion — claim, validate, branch to `prd-blocked` or `prd-ticketed`, write the summary. The caller (a human or a cron) has already authorized the run by invoking the skill; re-prompting defeats the purpose of a background batch.
22
+
23
+ Specifically forbidden:
24
+
25
+ - Previewing projected scope (epic count, story count, write count) and asking whether to continue.
26
+ - Offering A/B/C-style choices like "proceed / skip / dry-run only" — the documented behavior IS the default.
27
+ - Pausing because a PRD looks large, has many open questions, or is likely to end in `prd-blocked`. `prd-blocked` is a valid terminal state of this lifecycle, not a failure mode — routing a PRD to `prd-blocked` with gate-failure comments is exactly how this skill communicates "the PRD needs more work before it can be ticketed." That outcome is success.
28
+ - Pausing because the dry-run validation looks expensive. The cost of one cycle is bounded; the cost of stalling a scheduled cron waiting on a human is unbounded.
29
+
30
+ The only legitimate reasons to stop early:
31
+
32
+ - Missing scope argument or required configuration (`JIRA_PROJECT`, `JIRA_SERVER`, `LINEAR_WORKSPACE`, `E2E_BASE_URL`, etc.). Surface the missing key(s) and exit this cycle — never invent values.
33
+ - Workspace/team unreachable, or the labelling convention not yet adopted (no projects carry any of `prd-ready` / `prd-in-review` / `prd-blocked` / `prd-ticketed`). Surface and exit.
34
+ - Empty `prd-ready` set. Exit cleanly with `"No Linear projects labelled prd-ready. Nothing to do."`
35
+
36
+ ## Lifecycle assumed
37
+
38
+ The Linear PRD lifecycle is encoded as **project labels** (we deliberately do NOT key off Linear's native project state, since project state is product's day-to-day signal and we don't want to fight it). Exactly one of these labels is expected on a project at any time:
39
+
40
+ ```text
41
+ prd-draft → prd-ready → prd-in-review → prd-blocked | prd-ticketed → prd-shipped
42
+ (product) (us) (us) (product)
43
+ ```
44
+
45
+ This skill ONLY transitions:
46
+
47
+ - `prd-ready` → `prd-in-review` (claim)
48
+ - `prd-in-review` → `prd-blocked` (gate failures or coverage gaps)
49
+ - `prd-in-review` → `prd-ticketed` (success)
50
+ - `prd-ticketed` → `prd-blocked` (post-write coverage gaps from Phase 3e)
51
+
52
+ It never adds, removes, or touches `prd-draft` or `prd-shipped`. Those labels are owned by product.
53
+
54
+ A "transition" means: remove the old lifecycle label and add the new one in a single `save_project` call (passing the full new label set in the `labels` array). The skill MUST verify that exactly one lifecycle label exists on the project after the update — having two simultaneously breaks idempotency.
55
+
56
+ If the project does not yet use `prd-*` labels, this skill cannot run. Adopting the convention is a one-time setup the project owner does (see "Adoption" at the bottom of this file).
57
+
58
+ ## Phases
59
+
60
+ ### Phase 1 — Resolve the scope
61
+
62
+ 1. Parse `$ARGUMENTS`:
63
+ - Workspace URL (`https://linear.app/<workspace>`) → extract workspace slug; the scope is the entire workspace.
64
+ - Team URL containing `/team/<KEY>/...` → extract team key; the scope is that team.
65
+ - Bare team key → use as-is; the scope is that team.
66
+ - The literal `linear` → fall back to `LINEAR_WORKSPACE` env var; error if not set.
67
+ 2. Verify the scope is reachable:
68
+ - For a workspace: call `mcp__linear-server__list_teams` and confirm at least one team is returned (non-empty workspaces are readable; empty results indicate auth or workspace-mismatch).
69
+ - For a team: call `mcp__linear-server__list_teams({query: <KEY>})` and confirm the team resolves.
70
+ 3. Resolve the project-label IDs for `prd-ready`, `prd-in-review`, `prd-blocked`, `prd-ticketed` via `mcp__linear-server__list_project_labels`. Cache them — every transition uses these IDs. If any of the four are missing, surface a label-convention error and exit (see "Adoption").
71
+
72
+ ### Phase 2 — Find Ready PRDs
73
+
74
+ Call `mcp__linear-server__list_projects({label: "prd-ready", ...scope-filter})`:
75
+
76
+ - For a workspace scope: pass `label: "prd-ready"` only.
77
+ - For a team scope: pass `label: "prd-ready"` AND `team: "<KEY>"`.
78
+
79
+ The query returns the list of candidate projects with IDs, names, and label sets. For each candidate, confirm that exactly one lifecycle label is present (the API filter is `prd-ready`, but a project could have ended up with two labels by hand — that's a misconfiguration, not a normal queue entry).
80
+
81
+ If the result set is empty, run a secondary query to distinguish between a genuinely empty queue and a workspace/team that has not yet adopted the label convention:
82
+
83
+ - Secondary query: `list_projects({...scope-filter})` with no label filter, then in-process check whether any returned project carries any of `prd-ready` / `prd-in-review` / `prd-blocked` / `prd-ticketed`.
84
+
85
+ If the secondary query shows zero projects carrying any `prd-*` label → the convention has not been adopted. Surface a misconfiguration message: `"No Linear projects in this scope carry prd-* labels. If this is a new project, apply the prd-ready label to projects that are ready for ticketing (see Adoption section)."` Exit with an error — this is a setup issue, not a normal idle cycle.
86
+
87
+ If the secondary query shows projects with other `prd-*` labels but none with `prd-ready` → the queue is genuinely empty (all PRDs are already in-review, blocked, ticketed, or shipped). Exit cleanly with `"No Linear projects labelled prd-ready. Nothing to do."`
88
+
89
+ ### Phase 3 — Process each Ready PRD
90
+
91
+ For each project (process serially to keep label transitions auditable):
92
+
93
+ #### 3a. Claim
94
+
95
+ Transition labels via `mcp__linear-server__save_project({id, labels})`: pass the full new label set with `prd-ready` removed and `prd-in-review` added. This is the idempotency lock — a re-entrant cycle running concurrently won't see this project because its query filters on `label: "prd-ready"`.
96
+
97
+ If the update fails (permission error, race condition), log it and skip this project. Do not proceed to validation on a project you didn't successfully claim.
98
+
99
+ The `save_project` call must preserve all other project fields (description, state, priority, lead, dates, teams, initiatives) untouched — pass only `id` and the new `labels` array. This skill never edits PRD body content.
100
+
101
+ #### 3b. Dry-run validation
102
+
103
+ Invoke the `lisa:linear-to-jira` skill with `dry_run: true` and the project's URL. The skill returns a structured report containing:
104
+ - The planned ticket hierarchy
105
+ - Per-ticket validation verdicts and remediation
106
+ - An overall PASS / FAIL verdict
107
+ - A failure count
108
+
109
+ This call also indirectly invokes `lisa:jira-source-artifacts` (artifact extraction + classification) and `lisa:product-walkthrough` (when the PRD touches existing user-facing surfaces). All gate logic lives in `lisa:jira-validate-ticket`, which `lisa:linear-to-jira` calls per ticket.
110
+
111
+ #### 3c. Branch on the verdict
112
+
113
+ **If `PASS`** (every planned ticket passed every applicable gate):
114
+
115
+ 1. Re-invoke `lisa:linear-to-jira` with `dry_run: false` to actually write the tickets. This re-runs Phases 1-5 and runs the preservation gate (Phase 5.5).
116
+ 2. Capture the created ticket keys from the skill's output.
117
+ 3. Ensure the project has a sentinel feedback issue (see "Sentinel feedback issue" below for the helper). Post a comment on it via `mcp__linear-server__save_comment` listing the created tickets (epic, stories, sub-tasks) with their JIRA URLs. Lead with: `"Ticketed by Claude. Created N JIRA issues — see below. Add the prd-shipped label to the Linear project after the work is delivered."`
118
+ 4. Transition labels: remove `prd-in-review`, add `prd-ticketed` via `save_project`.
119
+ 5. **Run Phase 3e (coverage audit)** before considering this PRD done.
120
+
121
+ **If `FAIL`** (one or more planned tickets failed one or more gates):
122
+
123
+ The audience for these comments is the **product team**, not engineers. They are not familiar with JIRA gate IDs, validator vocabulary, or skill internals. Follow the rules below strictly — the goal is for a non-engineer product owner to read a comment, understand what is unclear, and know what to do next.
124
+
125
+ ##### 3c.1 Partition failures
126
+
127
+ 1. Drop every failure where `product_relevant = false`. Those are internal data-quality problems — the agent should fix its own spec rather than ask product to clarify a missing core field. Record the dropped failures under `Errors` in the cycle summary so engineers can see them; never surface them on the PRD.
128
+ 2. Group the remaining product-relevant failures by `prd_anchor` (which, for Linear, is a sub-issue identifier when the failure traces to a specific issue, or `null` otherwise). Failures that share an anchor become one comment thread on that issue. Failures with `prd_anchor: null` are batched into one comment on the sentinel feedback issue, since they have no source sub-issue to attach to.
129
+
130
+ ##### 3c.2 Render each comment
131
+
132
+ Ensure the project has a sentinel feedback issue (see helper below). For each anchored group (`prd_anchor` is a sub-issue identifier), post a comment on THAT sub-issue via `mcp__linear-server__save_comment({issueId: <prd_anchor>, body: <template>})`. For the unanchored group, post a single comment on the sentinel feedback issue using the same template, prefixed with `Issues without a specific sub-issue anchor:` and one block per failure.
133
+
134
+ If `save_comment` fails for a specific anchored sub-issue (the issue was deleted between fetch and post, or the agent lacks comment permission), fall back to the sentinel feedback issue for that group. Do not silently drop the failure.
135
+
136
+ ##### 3c.3 Comment template
137
+
138
+ Each comment body MUST contain these four parts, in this order, no exceptions:
139
+
140
+ ```text
141
+ [<Category badge>] <prd_section heading text>
142
+
143
+ **What's unclear:** <validator's `what` field, verbatim — already product-readable>
144
+
145
+ **Recommendation:** <validator's `recommendation` field, verbatim — must contain 1–3 concrete options, never a generic "please clarify">
146
+
147
+ **Action:** Update this section in the PRD, then replace the `prd-blocked` label with `prd-ready` on the Linear project and Claude will re-run intake.
148
+ ```
149
+
150
+ If multiple failures share an anchor, render each as its own `**What's unclear:** ... **Recommendation:** ...` block within the same comment, separated by horizontal lines (`---`). Keep the single `[Category badge]` heading at the top using the most-severe / most-blocking category from the group.
151
+
152
+ ##### 3c.4 Category badges
153
+
154
+ Use these exact badge labels — they are the validator's category values translated for product readers:
155
+
156
+ | Validator category | Badge label |
157
+ |---------------------|-------------|
158
+ | `product-clarity` | `[Product clarity]` |
159
+ | `acceptance-criteria` | `[Acceptance criteria]` |
160
+ | `design-ux` | `[Design / UX]` |
161
+ | `scope` | `[Scope]` |
162
+ | `dependency` | `[Dependency]` |
163
+ | `data` | `[Data]` |
164
+ | `technical` | `[Technical]` |
165
+
166
+ `structural` failures must never reach this step (filtered in 3c.1). If you see one here, treat it as an Error and surface internally.
167
+
168
+ ##### 3c.5 Forbidden in product comments
169
+
170
+ - Gate IDs (`S4`, `F2`, etc.). Never appear in a comment body.
171
+ - JIRA terminology that has no product meaning (e.g. "Gherkin", "epic parent", "issue link", "validation journey", "sub-task hierarchy"). Paraphrase before posting.
172
+ - Internal skill names (`lisa:jira-validate-ticket`, `linear-to-jira`).
173
+ - Engineering shorthand (`AC`, `OOS`, `repo`, `env var`).
174
+ - "Clarify this" / "Please specify" without candidate resolutions. The validator is required to provide candidates; if `recommendation` is empty or vague, treat the failure as an Error and surface internally rather than posting a useless comment.
175
+
176
+ ##### 3c.6 Label transition
177
+
178
+ After all comments are posted (anchored groups + the optional sentinel-issue summary), transition labels: remove `prd-in-review`, add `prd-blocked` via `save_project`. Do NOT write any JIRA tickets.
179
+
180
+ #### 3d. Continue
181
+
182
+ Move to the next Ready PRD. One PRD failing does not affect others.
183
+
184
+ #### 3e. Coverage audit (mandatory after prd-ticketed)
185
+
186
+ Per-ticket gates prove each ticket is well-formed; they do NOT prove the *set* of created tickets covers the *whole* PRD. Silent drops happen — invoke the `lisa:prd-ticket-coverage` skill to catch them.
187
+
188
+ 1. Invoke `lisa:prd-ticket-coverage` with `<PRD URL> tickets=[<created ticket keys from 3c step 2>]`. The coverage skill auto-detects the PRD vendor from the URL.
189
+ 2. Read the verdict:
190
+
191
+ | Verdict | Action |
192
+ |---------|--------|
193
+ | `COMPLETE` | Done. Leave label as `prd-ticketed`. Move to next PRD. |
194
+ | `COMPLETE_WITH_SCOPE_CREEP` | Post an advisory comment on the sentinel feedback issue naming the scope-creep tickets (so product can decide whether to close them as out-of-scope). Leave label as `prd-ticketed`. |
195
+ | `GAPS_FOUND` | The created ticket set is incomplete. (a) For each gap, post a comment using the same product-facing template as Phase 3c.3 — anchored on the relevant sub-issue when `prd_anchor` is non-null, on the sentinel feedback issue otherwise; category badge from the gap's `category` field; `What's unclear` and `Recommendation` from the audit report's `what` and `recommendation` fields. Apply the same forbidden-language rules from Phase 3c.5. (b) Post one summary comment on the sentinel feedback issue listing the tickets that *were* successfully created (so product knows what to keep vs. what to extend). (c) Transition labels from `prd-ticketed` back to `prd-blocked` via `save_project`. |
196
+ | `NO_TICKETS_FOUND` | Should not happen if step 2 succeeded. If it does, log it as an Error in the cycle summary and leave label as `prd-ticketed` with a comment flagging the audit failure for human review. |
197
+
198
+ 3. The created tickets remain in JIRA regardless of the verdict — they are valid in their own right. The audit only tells us whether *more* are needed.
199
+
200
+ ### Phase 4 — Summary report
201
+
202
+ After processing every Ready PRD, emit a summary:
203
+
204
+ ```text
205
+ ## linear-prd-intake summary
206
+
207
+ Scope: <workspace-slug | team-key> (<URL>)
208
+ Cycle started: <ISO timestamp>
209
+ Cycle completed: <ISO timestamp>
210
+
211
+ PRDs processed: <n>
212
+ - prd-ticketed: <n>
213
+ - <project name> → <epic-key> + <story-count> stories + <subtask-count> sub-tasks (coverage: COMPLETE | COMPLETE_WITH_SCOPE_CREEP)
214
+ - prd-blocked: <n>
215
+ - <project name> → <gate-failure-count> gate failures (pre-write) OR <gap-count> coverage gaps (post-write)
216
+ - Errors (claim failed, etc): <n>
217
+ - <project name> — <reason>
218
+
219
+ Total JIRA tickets created: <n>
220
+ Coverage audit summary: <n> COMPLETE / <n> COMPLETE_WITH_SCOPE_CREEP / <n> GAPS_FOUND
221
+ ```
222
+
223
+ Print to the agent's output. Do not write this summary to Linear or JIRA — it's an operational record for the human.
224
+
225
+ ## Sentinel feedback issue
226
+
227
+ Linear's MCP does not expose project-level comments. To preserve the comment-based feedback channel that Notion and Confluence intake have natively, this skill maintains a single sentinel **feedback Issue** under each project. All clarifying-question comments that don't anchor to a specific sub-issue land here.
228
+
229
+ The sentinel issue is identified by:
230
+
231
+ - A stable title: `"PRD intake: clarifying questions"`
232
+ - A stable label: `prd-intake-feedback` (issue-level label, distinct from the project-level `prd-*` labels)
233
+ - Membership in the project being processed
234
+
235
+ Helper behavior — call this **before** posting any clarifying-question comment in Phase 3c or 3e:
236
+
237
+ 1. Search for an existing feedback issue: `list_issues({project: <id>, label: "prd-intake-feedback"})`. If multiple match (shouldn't happen, but defensive), use the oldest by `createdAt`.
238
+ 2. If none exists: ensure the `prd-intake-feedback` label exists on the project's team via `list_issue_labels` then `create_issue_label` if needed; then create the sentinel via `save_issue({team: <team-id>, project: <id>, title: "PRD intake: clarifying questions", description: "Auto-created by lisa:linear-prd-intake. This issue collects clarifying-question comments that don't anchor to a specific sub-issue. Do not close manually — it is reused across intake cycles.", labels: ["prd-intake-feedback"]})`. Capture the new issue identifier.
239
+ 3. Return the issue identifier to the caller for use in `save_comment({issueId: <id>, body: ...})`.
240
+
241
+ Idempotency: the helper finds-or-creates. Re-runs of the cycle reuse the same sentinel issue. Comments accumulate; product reads top-down to see the latest cycle's findings. Do not delete or repurpose old comments — history is the audit trail.
242
+
243
+ ## Idempotency & safety
244
+
245
+ - **Single-cycle scope**: this skill processes the `prd-ready` set as it exists at the start of Phase 2. New `prd-ready` projects added mid-cycle are picked up next run.
246
+ - **No writes outside the lifecycle**: this skill only ever writes to JIRA via `lisa:linear-to-jira` (which delegates to `lisa:jira-write-ticket`), only ever changes Linear project labels among `prd-in-review`, `prd-blocked`, `prd-ticketed`, only ever creates/comments on the sentinel feedback issue (never any other Linear issue). It never edits project descriptions, never edits Linear documents, never touches `prd-draft` or `prd-shipped`, never archives or deletes projects.
247
+ - **Claim-first ordering**: the label flip to `prd-in-review` happens BEFORE validation runs, so a re-entrant call won't double-process.
248
+ - **Failure isolation**: an exception processing one project must not stop the cycle. Catch, record under "Errors" in the summary, continue to the next project. The project that errored is left labelled `prd-in-review` — the human investigates from there.
249
+ - **Single-label invariant**: after every transition, verify exactly one lifecycle label is present on the project. If two are present (rare race), surface as an Error and skip — do NOT auto-resolve, the human decides.
250
+
251
+ ## Configuration
252
+
253
+ Same env vars as `lisa:linear-to-jira` — `JIRA_PROJECT`, `JIRA_SERVER`, `LINEAR_WORKSPACE`, `E2E_BASE_URL`, `E2E_TEST_PHONE`, `E2E_TEST_OTP`, `E2E_TEST_ORG`, `E2E_GRAPHQL_URL`. If any required value is missing, surface the missing key(s) and exit this cycle — never invent values.
254
+
255
+ ## Rules
256
+
257
+ - Never write to JIRA outside of `lisa:linear-to-jira` → `lisa:jira-write-ticket`. The validator's verdict gates progress; bypassing it produces broken tickets.
258
+ - Never add or remove a label this skill doesn't own (`prd-in-review`, `prd-blocked`, `prd-ticketed`). Product owns `prd-draft`, `prd-ready`, `prd-shipped`. The issue-level `prd-intake-feedback` label is owned by this skill but is not a lifecycle label.
259
+ - Never edit a project's description or any attached Linear document. Communication with product happens only through comments on sub-issues or on the sentinel feedback issue.
260
+ - Never post a single dump of all gate failures on one comment. One comment per `prd_anchor` group on the relevant sub-issue (or one comment on the sentinel feedback issue for unanchored failures only). Comments must be sub-issue-anchored where possible, categorized, plain-language, and contain a concrete recommendation.
261
+ - Never include a gate ID, internal skill name, or engineering shorthand in a comment body.
262
+ - Never run more than one intake cycle concurrently against the same scope. This skill assumes serial execution.
263
+ - Never close, archive, or otherwise modify the sentinel feedback issue except to post comments on it. Its longevity is the audit trail.
264
+ - If `lisa:linear-to-jira` returns errors, treat them as gate failures: comment + `prd-blocked`. Don't silently fail.
265
+
266
+ ## Adoption (one-time per project)
267
+
268
+ Before this skill can run against a Linear workspace or team, the team must adopt the `prd-*` project-label convention:
269
+
270
+ 1. Apply `prd-ready` to projects that are ready for ticketing (replaces the Notion `Status = Ready` flip and the Confluence `prd-ready` page label).
271
+ 2. Reserve `prd-in-review`, `prd-blocked`, `prd-ticketed` for this skill — humans should not set them manually except to recover from an error.
272
+ 3. (Optional but recommended) Add `prd-draft` for in-progress PRDs and `prd-shipped` for delivered work, so the full lifecycle is visible at a glance.
273
+ 4. The labels must exist as **project labels** in Linear (`list_project_labels` should return them). Issue-level labels with the same names won't work; Linear keeps the two label kinds separate.
274
+
275
+ If the workspace hasn't adopted these labels, the first run exits with a label-convention error (not the idle empty-set message) — this distinguishes a setup issue from a genuinely empty queue so operators know to apply the convention rather than assuming the queue is drained. See Phase 2 for how the skill detects this case.
@@ -0,0 +1,314 @@
1
+ ---
2
+ name: linear-to-jira
3
+ description: >
4
+ Break down a Linear PRD (a Linear Project) into JIRA epics, stories, and sub-tasks. Use this skill
5
+ whenever the user shares a Linear project URL and wants it converted into JIRA tickets, or asks to
6
+ "break down this Linear project", "create tickets from a Linear project", "turn this Linear PRD into
7
+ JIRA", or similar. This skill mirrors `lisa:notion-to-jira` and `lisa:confluence-to-jira` for projects
8
+ whose PRDs live in Linear — the workflow, gates, dry-run mode, and validation rules are identical;
9
+ only the source-of-truth tool surface differs (Linear MCP instead of Notion / Confluence MCP).
10
+ allowed-tools: ["Skill", "Bash", "mcp__linear-server__get_project", "mcp__linear-server__list_projects", "mcp__linear-server__list_issues", "mcp__linear-server__get_issue", "mcp__linear-server__list_comments", "mcp__linear-server__list_documents", "mcp__linear-server__get_document", "mcp__linear-server__list_project_labels", "mcp__linear-server__list_teams", "mcp__atlassian__getJiraIssueRemoteIssueLinks"]
11
+ ---
12
+
13
+ # Linear PRD to JIRA Breakdown
14
+
15
+ Convert a Linear PRD (a Linear **Project**) into a structured JIRA ticket hierarchy: Epics > Stories > Sub-tasks.
16
+ Each sub-task is scoped to exactly one repo and includes an empirical verification plan.
17
+
18
+ This skill is the Linear counterpart of `lisa:notion-to-jira` and `lisa:confluence-to-jira`. The three skills share the same phases, gates, dry-run contract, and per-ticket validation logic. Only the PRD-side fetch tools differ. When changing workflow logic, change ALL THREE skills together so the source vendors stay behaviorally identical.
19
+
20
+ ## What "PRD" means in Linear
21
+
22
+ Linear has no native "PRD" entity. This skill treats a **Linear Project** as the PRD container:
23
+
24
+ - **Project description** (markdown) is the PRD body — equivalent to a Notion page body or a Confluence page body.
25
+ - **Project documents** (Linear's long-form markdown docs attached to projects, fetched via `list_documents({projectId})` / `get_document`) are treated as additional spec content and merged into the analysis. A multi-document Linear PRD is the analog of a multi-page Confluence PRD.
26
+ - **Project sub-issues** (`list_issues({project})`) act as the candidate set for epics and user stories — the same role child Epic pages play in a Notion/Confluence PRD.
27
+ - **Linear comments live on Issues, not on Projects.** This skill aggregates comments from every issue under the project to capture decisions and engineering notes. Project-level discussion that isn't reflected on an issue is invisible to this skill.
28
+
29
+ ## Modes
30
+
31
+ This skill supports two modes, controlled by a `dry_run` flag in `$ARGUMENTS`:
32
+
33
+ - **`dry_run: false`** (default — full mode): run all phases, write tickets via `lisa:jira-write-ticket`, run the preservation gate, report.
34
+ - **`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 `lisa: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. `lisa:linear-prd-intake`) can decide whether to proceed.
35
+
36
+ Dry-run output format is identical to `lisa:notion-to-jira`'s and `lisa:confluence-to-jira`'s. Reuse the same fields, including `prd_anchor` and `prd_section`. The only difference: Linear has no inline-comment selection-anchor primitive at the project level — `prd_anchor` is the anchor a downstream caller would use to *post a comment on the related sub-issue* (typically the issue identifier, e.g. `LIN-123`, scoped to a section heading). When the failure does not map to any single sub-issue, set `prd_anchor: null` and the caller falls back to its sentinel feedback channel.
37
+
38
+ ```text
39
+ ## linear-to-jira dry-run: <PRD title>
40
+
41
+ ### Planned hierarchy
42
+ - Epic: <summary>
43
+ prd_section: "<heading text from the project description / document that produced this epic>"
44
+ prd_anchor: "<linear issue identifier or null>"
45
+ - Story 1.1: <summary>
46
+ prd_section: "<heading or user-story line>"
47
+ prd_anchor: "<linear issue identifier or null>"
48
+ - Sub-task [<repo>]: <summary>
49
+ prd_section: "<heading or AC bullet>"
50
+ prd_anchor: "<linear issue identifier or null>"
51
+ - ...
52
+ - Story 1.2: ...
53
+
54
+ ### Per-ticket validation
55
+ - <ticket-id>: PASS | FAIL — <count> failures
56
+ prd_section: "<heading text>"
57
+ prd_anchor: "<linear issue identifier or null>"
58
+ failures:
59
+ - gate: <gate-id>
60
+ category: <category from validator>
61
+ product_relevant: <true|false>
62
+ what: <plain-language description from validator>
63
+ recommendation: <1–3 candidate resolutions from validator>
64
+
65
+ ### Verdict: PASS | FAIL
66
+ ### Total failures: <n>
67
+ ```
68
+
69
+ The dry-run mode never writes to JIRA and never calls `mcp__atlassian__createJiraIssue`. It also never modifies the source Linear project, never adds/removes labels, never edits sub-issues, and never posts comments — that is the orchestrating skill's responsibility (`lisa:linear-prd-intake`).
70
+
71
+ ## Hard Rule: All Writes Go Through `lisa:jira-write-ticket`
72
+
73
+ **Every JIRA ticket created by this skill — every epic, story, and sub-task — MUST be created by invoking the `lisa: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.**
74
+
75
+ `lisa:jira-write-ticket` enforces gates this skill does not:
76
+ - 3-audience description (Context / Technical Approach / Acceptance Criteria)
77
+ - Gherkin acceptance criteria
78
+ - Epic parent validation
79
+ - Explicit issue-link discovery (`blocks` / `is blocked by` / `relates to` / `duplicates` / `clones`)
80
+ - Single-repo scope check on Bug / Task / Sub-task
81
+ - Sign-in account and target environment recorded in description
82
+ - Post-create verification
83
+
84
+ Bypassing `lisa:jira-write-ticket` produces thin tickets that the rest of the lifecycle (triage, ticket-verify, journey, evidence) treats as broken. Atlassian reads in this skill are limited to the tools listed in `allowed-tools` (currently `getJiraIssueRemoteIssueLinks`) for the Phase 5.5 preservation gate. The Linear read tools listed in `allowed-tools` above are PRD-side only and never write.
85
+
86
+ ## Input
87
+
88
+ A Linear project URL, slug, or ID. The PRD is expected to have:
89
+ - A project with a description containing context, problems, and (optionally) a list of user stories
90
+ - One or more sub-issues that act as candidate epics or user stories
91
+ - Optionally one or more Linear documents attached to the project, with deeper spec content
92
+ - Issue comments capturing engineering notes and product decisions
93
+
94
+ URL parsing — Linear project URLs come in this shape:
95
+
96
+ ```text
97
+ https://linear.app/<workspace>/project/<slug>-<short-id>
98
+ https://linear.app/<workspace>/project/<slug>-<short-id>/<view>
99
+ ```
100
+
101
+ Extract the trailing `<short-id>` (the alphanumeric segment after the last `-` in the slug). If only a workspace or team URL is provided (no `/project/<slug>-<id>` segment), stop and report — single-PRD mode requires a specific project. The caller wanted `lisa:linear-prd-intake` (batch mode).
102
+
103
+ ## Configuration
104
+
105
+ This skill reads project-specific configuration from environment variables. If these are not set, ask the user for the values before proceeding.
106
+
107
+ | Variable | Purpose | Example |
108
+ |----------|---------|---------|
109
+ | `JIRA_PROJECT` | JIRA project key for ticket creation | `SE` |
110
+ | `JIRA_SERVER` | Atlassian instance URL (site host) | `mycompany.atlassian.net` |
111
+ | `LINEAR_WORKSPACE` | Linear workspace slug (used for URL synthesis on JIRA remote links) | `acme` |
112
+ | `E2E_TEST_PHONE` | Test user phone number for verification plans | `0000000099` |
113
+ | `E2E_TEST_OTP` | Test user OTP code | `555555` |
114
+ | `E2E_TEST_ORG` | Test organization name | `Arsenal` |
115
+ | `E2E_BASE_URL` | Frontend base URL for Playwright tests | `https://dev.example.io/` |
116
+ | `E2E_GRAPHQL_URL` | GraphQL API URL for curl verification | `https://gql.dev.example.io/graphql` |
117
+
118
+ If env vars are not available, ask the user to provide them explicitly before proceeding. Do not retrieve credentials from repository files or local agent settings.
119
+
120
+ ## Workflow
121
+
122
+ ### Phase 1: Fetch & Analyze the PRD
123
+
124
+ 1. **Resolve the project** via `mcp__linear-server__get_project` with the slug or ID, including milestones and resources (`includeMilestones: true`, `includeResources: true`). Capture the project title, description, state, labels, lead, dates, attached documents, attached links.
125
+ 2. **Fetch attached Linear documents** via `mcp__linear-server__list_documents({projectId})` then `get_document` per result. Treat each as additional PRD content. (A Linear PRD with a single rich project description and no attached documents is the common case; multi-document PRDs are valid too.)
126
+ 3. **Identify candidate epics and user stories** from project sub-issues via `mcp__linear-server__list_issues({project: <id>})`. Capture identifier, title, description, labels, state, parent issue, and `parentId` chain so the issue hierarchy is reproducible.
127
+ 4. **Fetch full comments per sub-issue** via `mcp__linear-server__list_comments({issueId})` for every issue surfaced in step 3. Walk thread parents/children — comments are threaded via `parentId` references on the comment object.
128
+ 5. **Synthesize decisions and blockers** from the project description + every document + every issue comment:
129
+ - Decisions already confirmed by the team (look for agreement in comment threads)
130
+ - Open questions that need product/engineering input
131
+ - Engineering comments (prefixed with "Engineering:" or wrench emoji) that identify technical constraints
132
+ - Cross-PRD dependencies (references to other Linear projects, documents, or shared infrastructure)
133
+
134
+ ### Phase 1.5: Extract Source Artifacts
135
+
136
+ PRDs typically reference external design, UX, and data artifacts (Figma files, Lovable prototypes, Loom walkthroughs, screenshots, example payloads, peer Linear or Confluence pages). These MUST be preserved onto the resulting tickets — otherwise developers picking up a ticket lose the source of truth. This is the failure mode this step exists to prevent.
137
+
138
+ 1. **Scan the project description, every attached document body, every sub-issue description, and every fetched comment thread** for:
139
+ - URLs to design/prototype tools (Figma, FigJam, Figma Make, Lovable, Framer, Penpot)
140
+ - URLs to recording/walkthrough tools (Loom, YouTube, Vimeo, Descript)
141
+ - URLs to collaborative docs (Google Docs/Slides/Sheets, peer Confluence pages, Notion peer pages, peer Linear documents)
142
+ - URLs to code sandboxes (CodeSandbox, StackBlitz, Replit, GitHub permalinks/gists)
143
+ - URLs to diagramming tools (Miro, Mural, Excalidraw, Mermaid Live, draw.io, Lucid)
144
+ - URLs to data/observability tools (Grafana, Datadog, Sentry, Metabase, Looker)
145
+ - Embedded images and file attachments referenced in the project / documents
146
+ - Fenced code blocks with example data (JSON, SQL, GraphQL, cURL request/response)
147
+
148
+ 2. **Classify each artifact and apply taxonomy rules** by invoking the `lisa: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.
149
+
150
+ 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. The `source_page` lets you trace each reference back to where it appeared (project description vs a specific document title vs a specific sub-issue comment).
151
+
152
+ 4. **Surface coverage smells** as defined in `lisa:jira-source-artifacts` §5. Record any detected smells on the epic.
153
+
154
+ ### Phase 1.6: Source Precedence & Conflict Resolution
155
+
156
+ Source precedence rules and cross-axis conflict handling are defined in `lisa: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.
157
+
158
+ The existing-component reuse expectation is defined in `lisa:jira-source-artifacts` §7. Encode it on every UI-touching story.
159
+
160
+ ### Phase 2: Codebase + Live Product Research
161
+
162
+ Identical to `lisa:notion-to-jira` Phase 2 and `lisa:confluence-to-jira` Phase 2. 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.
163
+
164
+ **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.
165
+
166
+ **2b. Live product walkthrough.** If the PRD touches existing user-facing surfaces, invoke the `lisa:product-walkthrough` skill against `E2E_BASE_URL` using the test user from config.
167
+
168
+ 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.
169
+
170
+ Walkthrough findings are surfaced back to product via the orchestrating intake skill (`lisa:linear-prd-intake`), which posts them on the project's sentinel feedback issue. This skill itself does NOT post to Linear — it only reads. The walkthrough section is also inherited onto the resulting epic / stories under a `## Current Product` subsection in the JIRA description.
171
+
172
+ ### Phase 3: Create Epics
173
+
174
+ > **Mode guard**: In `dry_run: true` mode, do not invoke `lisa:jira-write-ticket` in this phase. Instead, draft the epic spec (summary, description_body, artifacts) and validate it with `lisa: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.
175
+
176
+ For each epic identified in Phase 1, **invoke the `lisa:jira-write-ticket` skill** (do not call `createJiraIssue` directly). Pass it everything it needs to enforce its quality gates:
177
+
178
+ - `project_key`: from `JIRA_PROJECT` config
179
+ - `issue_type`: `Epic`
180
+ - `summary`: epic title from the PRD
181
+ - `description_body`: a draft of the 3-audience description containing:
182
+ - **Context / Business Value**: epic summary from the PRD, originating Linear project URL, business outcome
183
+ - **Technical Approach**: cross-cutting integration points and constraints surfaced in Phase 2 codebase research
184
+ - List of user stories the epic contains
185
+ - Key decisions from comments (with attribution)
186
+ - Blockers and open questions
187
+ - Dependencies on other epics or PRDs
188
+ - A **Source Artifacts** section listing every artifact extracted in Phase 1.5 (grouped by domain)
189
+ - `artifacts`: the full Phase 1.5 artifact list — every artifact, regardless of domain. The epic is the canonical hub. No filtering at the epic level.
190
+ - `priority`, `labels`, `components`, `fix_version`: as appropriate
191
+
192
+ Capture the returned epic key — Phase 4 needs it as the parent for stories.
193
+
194
+ ### Phase 4: Create Stories
195
+
196
+ > **Mode guard**: In `dry_run: true` mode, do not invoke `lisa:jira-write-ticket` in this phase. Instead, draft each story spec and validate it with `lisa: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.
197
+
198
+ For each Epic, plan two kinds of stories:
199
+ - **One "X.0 Setup" story** for data model and infrastructure prerequisites
200
+ - **One story per user story** from the PRD (numbered to match the PRD's structure or the source Linear sub-issues)
201
+
202
+ **Story naming convention**: Prefix the summary with a short code derived from the PRD title (e.g., `[CU-1.1]` for "Contract Upload").
203
+
204
+ For each story, **invoke `lisa:jira-write-ticket`** with:
205
+
206
+ - `project_key`: from `JIRA_PROJECT` config
207
+ - `issue_type`: `Story`
208
+ - `epic_parent`: the Epic key captured in Phase 3 (mandatory)
209
+ - `summary`: prefixed per the naming convention above
210
+ - `description_body`: 3-audience description as in `lisa:notion-to-jira` Phase 4
211
+ - `artifacts`: the Phase 1.5 artifacts filtered by domain per the inheritance table below
212
+
213
+ | Story type | Inherits domains |
214
+ |------------|------------------|
215
+ | Frontend / UI | `ui-design`, `ux-flow`, `reference` |
216
+ | Backend / API / data model | `data`, `reference` |
217
+ | Infrastructure | `ops`, `reference` |
218
+ | Mixed / setup ("X.0") | All domains |
219
+
220
+ Capture each returned story key — Phase 5 needs it as the parent for sub-tasks.
221
+
222
+ ### Phase 5: Create Sub-tasks
223
+
224
+ Delegate sub-task creation to **parallel agents** (one per epic or batch of stories) for efficiency. **Every spawned agent must invoke `lisa:jira-write-ticket` for each sub-task — no agent may call `createJiraIssue` directly.**
225
+
226
+ Each sub-task MUST:
227
+ 1. **Be scoped to exactly ONE repo** — indicated in brackets in the summary: `[repo-name]`
228
+ 2. **Include an Empirical Verification Plan** — real user-like verification, NOT unit tests, linting, or typechecking
229
+
230
+ Sub-tasks inherit their parent story's artifacts by reference (the parent link). Do not pass the same artifact list to every sub-task.
231
+
232
+ ### Phase 5.5: Artifact Preservation Gate (mandatory)
233
+
234
+ Run the preservation gate defined in `lisa: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 `lisa:jira-source-artifacts`.
235
+
236
+ To run the gate, this skill must:
237
+
238
+ 1. Pull the remote links of every epic and story created in this run via `mcp__atlassian__getJiraIssueRemoteIssueLinks`.
239
+ 2. Apply the §8 preservation matrix and verdict rules.
240
+ 3. If the gate fails: list each dropped/misrouted artifact and either re-attach via `lisa:jira-write-ticket` (UPDATE mode) or stop and ask the human.
241
+ 4. If the gate passes: print the matrix compactly and proceed to Phase 6.
242
+
243
+ This gate is not optional.
244
+
245
+ ### Phase 6: Report Results
246
+
247
+ After all tickets are created, present a summary table to the user:
248
+ - All Epics with keys and URLs
249
+ - All Stories grouped by Epic
250
+ - All Sub-tasks grouped by Story with repo tags
251
+ - Repo distribution
252
+ - **Artifact Preservation Matrix**
253
+ - Blockers list with recommendations and alternatives
254
+ - Cross-PRD dependencies
255
+
256
+ ## Handling Ambiguities and Blockers
257
+
258
+ When you encounter something the PRD + comments + codebase can't resolve:
259
+
260
+ 1. **Don't guess** — mark the ticket with a BLOCKER section
261
+ 2. **Include your recommendation** with rationale
262
+ 3. **List 2-3 alternatives** so the user/product can choose
263
+ 4. **State what's needed to unblock**
264
+
265
+ ## Agent Prompt Template for Sub-task Creation
266
+
267
+ 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.**
268
+
269
+ ```text
270
+ Create JIRA sub-tasks in the [PROJECT] project at [CLOUD_ID].
271
+
272
+ CRITICAL: For each sub-task, invoke the `lisa:jira-write-ticket` skill via the Skill tool.
273
+ Do NOT call `mcp__atlassian__createJiraIssue` directly. The `lisa:jira-write-ticket` skill
274
+ enforces required quality gates (Gherkin acceptance criteria, 3-audience description,
275
+ single-repo scope, sign-in/environment fields, post-create verification). Bypassing it
276
+ produces broken tickets that downstream skills (triage, journey, evidence) cannot use.
277
+
278
+ For each sub-task, invoke `lisa:jira-write-ticket` with:
279
+ - issue_type: "Sub-task"
280
+ - parent: the parent story key
281
+ - project_key: [PROJECT]
282
+ - summary: prefixed with the repo in brackets, e.g. "[backend-api] Add audit log table"
283
+ - description_body: a 3-section draft (Context / Technical Approach / Acceptance Criteria)
284
+ - gherkin_acceptance_criteria: derived from the story's functional requirements
285
+ - sign_in_account: [test user credentials from config — name + role + how to obtain]
286
+ - target_environment: "dev"
287
+ - empirical_verification_plan: real user-like verification (curl + auth token,
288
+ Playwright browser flow, CLI check after deploy) using the test credentials.
289
+ NOT unit tests, linting, or typechecking.
290
+
291
+ Each sub-task must:
292
+ 1. Be scoped to ONE repo only — repo named in brackets in the summary
293
+ 2. Include the Empirical Verification Plan in the description
294
+ 3. Be created via `lisa:jira-write-ticket`, not via direct MCP calls
295
+
296
+ If `lisa:jira-write-ticket` rejects a sub-task, fix the input and re-invoke. Do NOT fall back
297
+ to a direct `createJiraIssue` call to bypass the gate.
298
+
299
+ Test user info: [credentials from config]
300
+
301
+ [Then list all sub-tasks grouped by parent story with details]
302
+ ```
303
+
304
+ ## Cross-PRD Shared Infrastructure
305
+
306
+ Track tickets that are shared across PRDs to avoid duplication. When a sub-task overlaps with an existing ticket, reference it instead of creating a duplicate. Search JIRA for existing tickets in the project before creating new ones for shared infrastructure.
307
+
308
+ ## Linear-specific notes
309
+
310
+ - **Project description format**: Linear project descriptions are markdown. Treat headings (`#`, `##`, `###`) as section markers for `prd_section`.
311
+ - **Document parents**: Linear documents are attached to either a Project or an Issue (exactly one). For PRD intake, only documents attached to the project being processed are in scope. Documents attached to a child Issue are picked up via that issue's content surface.
312
+ - **Comment threading**: Linear comments are threaded via a `parentId` field on each comment. When fetching comments via `list_comments`, capture the full reply tree — replies often hold the actual decision while the root comment was the question.
313
+ - **No project-level comments via MCP**: clarifying-question comments cannot land directly on the project itself. The orchestrating skill (`lisa:linear-prd-intake`) handles this by maintaining a sentinel feedback issue under the project. This skill does not write to Linear at all — it only reads.
314
+ - **Issue identifiers** (`LIN-123`, `ENG-456`, etc.) are the closest analog to a Confluence inline-comment anchor. When dry-run output sets `prd_anchor` to an issue identifier, the caller knows it can post a clarifying-question comment on that specific issue if it wants block-level anchoring.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plan
3
- description: "Decompose a single PRD or specification into ordered work items in the configured tracker. Vendor-agnostic — the source can be a Notion PRD URL, a Confluence PRD URL, an existing JIRA epic key, a markdown file, or a free-form description; the destination tracker is whatever the project is configured to use (JIRA today; Linear/GitHub Issues are pluggable). Single-PRD mode only — for batch scanning of all Ready PRDs in a queue, use the lisa:intake skill."
3
+ description: "Decompose a single PRD or specification into ordered work items in the configured tracker. Vendor-agnostic — the source can be a Notion PRD URL, a Confluence PRD URL, a Linear project URL, an existing JIRA epic key, a markdown file, or a free-form description; the destination tracker is whatever the project is configured to use (JIRA today; GitHub Issues is pluggable). Single-PRD mode only — for batch scanning of all Ready PRDs in a queue, use the lisa:intake skill."
4
4
  allowed-tools: ["Skill", "Bash", "Read", "Glob", "Grep"]
5
5
  ---
6
6
 
@@ -24,8 +24,10 @@ Detect the input type from `$ARGUMENTS` and route to the appropriate source skil
24
24
  | A Notion **database** URL or database ID | Stop and report — single-PRD mode only. Direct the caller to `lisa:intake` for batch scanning of a database. |
25
25
  | A Confluence **page** URL containing `/wiki/spaces/<KEY>/pages/<ID>/...` (single PRD) | `lisa:confluence-to-jira` (with the PRD URL; same full pipeline as the Notion path) |
26
26
  | A Confluence **space** URL (`/wiki/spaces/<KEY>` with no `/pages/...`) | Stop and report — single-PRD mode only. Direct the caller to `lisa:intake` for batch scanning of a space. |
27
+ | A Linear **project** URL (`https://linear.app/<workspace>/project/<slug>-<id>`) | `lisa:linear-to-jira` (with the project URL; same full pipeline as the Notion / Confluence paths). The Linear project's description, attached documents, and sub-issues form the PRD body. |
28
+ | A Linear **workspace** URL (`https://linear.app/<workspace>` with no `/project/...`) or **team** URL | Stop and report — single-PRD mode only. Direct the caller to `lisa:intake` for batch scanning of a workspace or team. |
27
29
  | A JIRA ticket ID/URL of an Epic (existing epic *is* the spec) | `lisa:jira-agent` (read epic, decompose into stories/sub-tasks) |
28
- | 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-source` / `github-prd-source` skill has been built. Don't fall back. |
30
+ | A 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 `github-prd-source` skill has been built. Don't fall back. |
29
31
  | 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. |
30
32
  | A plain-text description | Use the description as the spec; run the Plan flow's core decomposition. |
31
33
 
@@ -37,4 +39,4 @@ Execute the **Plan** flow as defined in the `intent-routing` rule (loaded via th
37
39
 
38
40
  ## Output
39
41
 
40
- Work items in the configured tracker (JIRA today; Linear/GitHub Issues when adapters exist) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. If the specification cannot be decomposed without further clarification, stop and report what is missing.
42
+ Work items in the configured tracker (JIRA today; GitHub Issues when the adapter exists) with acceptance criteria, dependencies, and recommended skills/agents per item. Ordered by dependency. If the specification cannot be decomposed without further clarification, stop and report what is missing.