@codyswann/lisa 2.7.0 → 2.8.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 (111) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/agents/confluence-prd-intake.md +5 -5
  4. package/plugins/lisa/agents/github-agent.md +141 -0
  5. package/plugins/lisa/agents/github-build-intake.md +62 -0
  6. package/plugins/lisa/agents/github-prd-intake.md +64 -0
  7. package/plugins/lisa/agents/linear-prd-intake.md +5 -5
  8. package/plugins/lisa/agents/notion-prd-intake.md +5 -5
  9. package/plugins/lisa/commands/intake.md +2 -2
  10. package/plugins/lisa/commands/plan.md +2 -2
  11. package/plugins/lisa/rules/intent-routing.md +16 -11
  12. package/plugins/lisa/rules/tracker-resolution.md +76 -0
  13. package/plugins/lisa/skills/confluence-prd-intake/SKILL.md +11 -11
  14. package/plugins/lisa/skills/{confluence-to-jira → confluence-to-tracker}/SKILL.md +31 -31
  15. package/plugins/lisa/skills/github-add-journey/SKILL.md +114 -0
  16. package/plugins/lisa/skills/github-build-intake/SKILL.md +188 -0
  17. package/plugins/lisa/skills/github-create/SKILL.md +101 -0
  18. package/plugins/lisa/skills/github-evidence/SKILL.md +116 -0
  19. package/plugins/lisa/skills/github-journey/SKILL.md +121 -0
  20. package/plugins/lisa/skills/github-prd-intake/SKILL.md +286 -0
  21. package/plugins/lisa/skills/github-read-issue/SKILL.md +248 -0
  22. package/plugins/lisa/skills/github-sync/SKILL.md +73 -0
  23. package/plugins/lisa/skills/github-to-tracker/SKILL.md +312 -0
  24. package/plugins/lisa/skills/github-validate-issue/SKILL.md +288 -0
  25. package/plugins/lisa/skills/github-verify/SKILL.md +29 -0
  26. package/plugins/lisa/skills/github-write-issue/SKILL.md +304 -0
  27. package/plugins/lisa/skills/implement/SKILL.md +4 -4
  28. package/plugins/lisa/skills/intake/SKILL.md +14 -4
  29. package/plugins/lisa/skills/jira-source-artifacts/SKILL.md +1 -1
  30. package/plugins/lisa/skills/jira-validate-ticket/SKILL.md +3 -3
  31. package/plugins/lisa/skills/jira-verify/SKILL.md +1 -1
  32. package/plugins/lisa/skills/jira-write-ticket/SKILL.md +3 -3
  33. package/plugins/lisa/skills/linear-prd-intake/SKILL.md +10 -10
  34. package/plugins/lisa/skills/{linear-to-jira → linear-to-tracker}/SKILL.md +30 -31
  35. package/plugins/lisa/skills/notion-prd-intake/SKILL.md +11 -11
  36. package/plugins/{src/base/skills/notion-to-jira → lisa/skills/notion-to-tracker}/SKILL.md +34 -34
  37. package/plugins/lisa/skills/plan/SKILL.md +8 -6
  38. package/plugins/lisa/skills/prd-ticket-coverage/SKILL.md +22 -12
  39. package/plugins/lisa/skills/product-walkthrough/SKILL.md +1 -1
  40. package/plugins/lisa/skills/spec-conformance/SKILL.md +2 -3
  41. package/plugins/lisa/skills/ticket-triage/SKILL.md +7 -7
  42. package/plugins/lisa/skills/tracker-add-journey/SKILL.md +24 -0
  43. package/plugins/lisa/skills/tracker-build-intake/SKILL.md +25 -0
  44. package/plugins/lisa/skills/tracker-create/SKILL.md +24 -0
  45. package/plugins/lisa/skills/tracker-evidence/SKILL.md +24 -0
  46. package/plugins/lisa/skills/tracker-journey/SKILL.md +24 -0
  47. package/plugins/lisa/skills/tracker-read/SKILL.md +25 -0
  48. package/plugins/lisa/skills/tracker-sync/SKILL.md +26 -0
  49. package/plugins/lisa/skills/tracker-validate/SKILL.md +35 -0
  50. package/plugins/lisa/skills/tracker-verify/SKILL.md +25 -0
  51. package/plugins/lisa/skills/tracker-write/SKILL.md +43 -0
  52. package/plugins/lisa/skills/verify/SKILL.md +1 -1
  53. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-expo/skills/jira-verify/SKILL.md +1 -1
  56. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails/skills/jira-verify/SKILL.md +1 -1
  59. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  60. package/plugins/src/base/agents/confluence-prd-intake.md +5 -5
  61. package/plugins/src/base/agents/github-agent.md +141 -0
  62. package/plugins/src/base/agents/github-build-intake.md +62 -0
  63. package/plugins/src/base/agents/github-prd-intake.md +64 -0
  64. package/plugins/src/base/agents/linear-prd-intake.md +5 -5
  65. package/plugins/src/base/agents/notion-prd-intake.md +5 -5
  66. package/plugins/src/base/commands/intake.md +2 -2
  67. package/plugins/src/base/commands/plan.md +2 -2
  68. package/plugins/src/base/rules/intent-routing.md +16 -11
  69. package/plugins/src/base/rules/tracker-resolution.md +76 -0
  70. package/plugins/src/base/skills/confluence-prd-intake/SKILL.md +11 -11
  71. package/plugins/src/base/skills/{confluence-to-jira → confluence-to-tracker}/SKILL.md +31 -31
  72. package/plugins/src/base/skills/github-add-journey/SKILL.md +114 -0
  73. package/plugins/src/base/skills/github-build-intake/SKILL.md +188 -0
  74. package/plugins/src/base/skills/github-create/SKILL.md +101 -0
  75. package/plugins/src/base/skills/github-evidence/SKILL.md +116 -0
  76. package/plugins/src/base/skills/github-journey/SKILL.md +121 -0
  77. package/plugins/src/base/skills/github-prd-intake/SKILL.md +286 -0
  78. package/plugins/src/base/skills/github-read-issue/SKILL.md +248 -0
  79. package/plugins/src/base/skills/github-sync/SKILL.md +73 -0
  80. package/plugins/src/base/skills/github-to-tracker/SKILL.md +312 -0
  81. package/plugins/src/base/skills/github-validate-issue/SKILL.md +288 -0
  82. package/plugins/src/base/skills/github-verify/SKILL.md +29 -0
  83. package/plugins/src/base/skills/github-write-issue/SKILL.md +304 -0
  84. package/plugins/src/base/skills/implement/SKILL.md +4 -4
  85. package/plugins/src/base/skills/intake/SKILL.md +14 -4
  86. package/plugins/src/base/skills/jira-source-artifacts/SKILL.md +1 -1
  87. package/plugins/src/base/skills/jira-validate-ticket/SKILL.md +3 -3
  88. package/plugins/src/base/skills/jira-verify/SKILL.md +1 -1
  89. package/plugins/src/base/skills/jira-write-ticket/SKILL.md +3 -3
  90. package/plugins/src/base/skills/linear-prd-intake/SKILL.md +10 -10
  91. package/plugins/src/base/skills/{linear-to-jira → linear-to-tracker}/SKILL.md +30 -31
  92. package/plugins/src/base/skills/notion-prd-intake/SKILL.md +11 -11
  93. package/plugins/{lisa/skills/notion-to-jira → src/base/skills/notion-to-tracker}/SKILL.md +34 -34
  94. package/plugins/src/base/skills/plan/SKILL.md +8 -6
  95. package/plugins/src/base/skills/prd-ticket-coverage/SKILL.md +22 -12
  96. package/plugins/src/base/skills/product-walkthrough/SKILL.md +1 -1
  97. package/plugins/src/base/skills/spec-conformance/SKILL.md +2 -3
  98. package/plugins/src/base/skills/ticket-triage/SKILL.md +7 -7
  99. package/plugins/src/base/skills/tracker-add-journey/SKILL.md +24 -0
  100. package/plugins/src/base/skills/tracker-build-intake/SKILL.md +25 -0
  101. package/plugins/src/base/skills/tracker-create/SKILL.md +24 -0
  102. package/plugins/src/base/skills/tracker-evidence/SKILL.md +24 -0
  103. package/plugins/src/base/skills/tracker-journey/SKILL.md +24 -0
  104. package/plugins/src/base/skills/tracker-read/SKILL.md +25 -0
  105. package/plugins/src/base/skills/tracker-sync/SKILL.md +26 -0
  106. package/plugins/src/base/skills/tracker-validate/SKILL.md +35 -0
  107. package/plugins/src/base/skills/tracker-verify/SKILL.md +25 -0
  108. package/plugins/src/base/skills/tracker-write/SKILL.md +43 -0
  109. package/plugins/src/base/skills/verify/SKILL.md +1 -1
  110. package/plugins/src/expo/skills/jira-verify/SKILL.md +1 -1
  111. package/plugins/src/rails/skills/jira-verify/SKILL.md +1 -1
@@ -0,0 +1,248 @@
1
+ ---
2
+ name: github-read-issue
3
+ description: "Fetches the full scope of a GitHub Issue — metadata, body sections, all comments, native sub-issue parent and children, linked PRs, related issues parsed from `Blocks/Blocked by/Relates to/Duplicates/Cloned from` lines, and any cross-repo references. Produces a consolidated context bundle that downstream agents consume so they never act on an issue in isolation. The GitHub counterpart of lisa:jira-read-ticket."
4
+ allowed-tools: ["Bash", "Skill"]
5
+ ---
6
+
7
+ # Read GitHub Issue: $ARGUMENTS
8
+
9
+ Fetch the full scope of the issue AND its related graph. Downstream agents must never act on an issue in isolation — always call this skill first so they see blockers, sibling sub-issues, linked PRs, and historical comments.
10
+
11
+ This skill is the GitHub counterpart of `lisa:jira-read-ticket`. The output bundle structure mirrors the JIRA bundle so vendor-neutral consumers can parse either with minimal branching.
12
+
13
+ Repository name for scoped comments and logs: `basename $(git rev-parse --show-toplevel)`.
14
+
15
+ ## Phase 1 — Resolve Context
16
+
17
+ 1. Confirm `gh auth status` succeeds.
18
+ 2. Parse `$ARGUMENTS`. Accept either:
19
+ - `<org>/<repo>#<number>` token, OR
20
+ - `https://github.com/<org>/<repo>/issues/<number>` URL.
21
+
22
+ If `$ARGUMENTS` is just `#<number>` or `<number>`, resolve `<org>/<repo>` from `.lisa.config.json` (`github.org` / `github.repo`).
23
+ 3. If the input doesn't parse cleanly, stop and report. Do NOT guess.
24
+
25
+ ## Phase 2 — Fetch Primary Issue
26
+
27
+ ```bash
28
+ gh issue view <number> --repo <org>/<repo> --json number,title,body,state,stateReason,author,assignees,labels,milestone,createdAt,updatedAt,closedAt,url,comments,reactionGroups,projectItems
29
+ ```
30
+
31
+ Extract and preserve:
32
+
33
+ ### Metadata
34
+
35
+ - `number`, `title`, `state` (open/closed), `stateReason` (completed/not_planned/reopened/null)
36
+ - `author` (immutable original reporter), `assignees`
37
+ - All labels — partition by namespace: `type:<...>` (issue type), `status:<...>` (workflow status), `priority:<...>`, `component:<...>`, `points:<...>`, `fix-version:<...>`, `claude-triaged-<repo>`, plus any free-form labels
38
+ - `milestone` (name + url)
39
+ - `createdAt`, `updatedAt`, `closedAt`
40
+ - `url` (canonical issue URL)
41
+
42
+ ### Body — parse markdown sections
43
+
44
+ Walk the markdown body and capture each top-level `## ` section by name. Standard sections (per `lisa:github-write-issue` Phase 3):
45
+
46
+ - `Context / Business Value`
47
+ - `Technical Approach`
48
+ - `Acceptance Criteria` (preserve the Gherkin code-fence verbatim)
49
+ - `Out of Scope`
50
+ - `Target Backend Environment`
51
+ - `Sign-in Required`
52
+ - `Repository`
53
+ - `Source Artifacts`
54
+ - `Source Precedence`
55
+ - `Links`
56
+ - `Relationship Search`
57
+ - `Validation Journey` (preserve verbatim — pass through to verifier agents)
58
+ - `Open Questions`
59
+ - `Current Product`
60
+
61
+ Any other `##` section: capture under `extra_sections` so callers can see PRDs that adopt non-standard sections.
62
+
63
+ ### Comments
64
+
65
+ Fetch ALL comments. Do not truncate. The `comments` field from `gh issue view --json comments` includes author, body, createdAt for each. Flag comments that contain:
66
+ - Credentials, reproduction steps
67
+ - Status updates from stakeholders
68
+ - Decisions
69
+ - Triage headers like `[<repo>]`
70
+
71
+ If pagination matters (issues with hundreds of comments), use `gh api repos/<org>/<repo>/issues/<number>/comments --paginate` to get the full set.
72
+
73
+ ## Phase 3 — Fetch Sub-issue Graph (Parent + Children)
74
+
75
+ GitHub native sub-issues are exposed via GraphQL:
76
+
77
+ ```graphql
78
+ query($org:String!,$repo:String!,$number:Int!){
79
+ repository(owner:$org,name:$repo){
80
+ issue(number:$number){
81
+ id
82
+ parent { number title state url repository { nameWithOwner } }
83
+ subIssues(first: 100) {
84
+ nodes {
85
+ number title state url
86
+ repository { nameWithOwner }
87
+ labels(first: 50) { nodes { name } }
88
+ assignees(first: 5) { nodes { login } }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ```bash
97
+ gh api graphql -f query='<above>' -F org=<org> -F repo=<repo> -F number=<number>
98
+ ```
99
+
100
+ Capture:
101
+ - **Parent sub-issue**: number, title, state, url, repo.
102
+ - **Child sub-issues**: list with number, title, state, url, repo, labels (especially `type:` and `status:`), assignees.
103
+
104
+ If the GraphQL `parent` / `subIssues` fields aren't available (older GHES), fall back to parsing `Parent: #<n>` text in the body and recording sub-issue text references — note "GraphQL sub-issues unavailable" in the bundle so callers know parent-link is text-based.
105
+
106
+ ## Phase 4 — Parse Issue Links from Body
107
+
108
+ The body's `## Links` section encodes typed relationships. Parse:
109
+
110
+ | Pattern (case-insensitive) | Link type |
111
+ |----------------------------|-----------|
112
+ | `Blocks #<n>` or `Blocks <org>/<repo>#<n>` | `blocks` |
113
+ | `Blocked by #<n>` or `Blocked by <org>/<repo>#<n>` | `is blocked by` |
114
+ | `Relates to #<n>` or `Relates to <org>/<repo>#<n>` | `relates to` |
115
+ | `Duplicates #<n>` or `Duplicates <org>/<repo>#<n>` | `duplicates` |
116
+ | `Cloned from #<n>` or `Cloned from <org>/<repo>#<n>` | `clones` |
117
+ | `Resolves #<n>` or `Closes #<n>` or `Fixes #<n>` (PR refs) | remote-link to PR |
118
+
119
+ For each parsed reference, fetch the linked issue/PR:
120
+
121
+ ```bash
122
+ gh issue view <link-number> --repo <link-org>/<link-repo> --json number,title,state,labels,assignees,url
123
+ gh pr view <link-number> --repo <link-org>/<link-repo> --json number,title,state,reviewDecision,merged,mergedAt,url,reviewRequests,reviews,comments
124
+ ```
125
+
126
+ For each linked **issue**, capture: number, title, state, type (from labels), status (from labels), assignees, url.
127
+
128
+ For each linked **PR**, capture: number, title, state, mergedAt, reviewDecision, unresolved review comments, url.
129
+
130
+ **Special handling for `is blocked by`:** include the linked issue's PR refs (parse `Resolves` lines in its body) and fetch each PR's state, so the agent knows whether the blocker is actually shipped.
131
+
132
+ ## Phase 5 — Fetch Sibling Sub-issues (Epic Context)
133
+
134
+ If the primary issue has a parent sub-issue (i.e., is a Story / Task / Sub-task / Improvement under an Epic):
135
+
136
+ 1. Fetch the parent Epic in full via Phase 2 logic — full body, all comments, Validation Journey if present.
137
+ 2. Fetch the parent Epic's other sub-issues (siblings) via the same GraphQL `subIssues` query against the parent. Filter out the primary issue itself.
138
+ 3. For each sibling, capture: number, title, type label, status label, assignee, url. Read the first paragraph of each sibling's body for context. If a sibling has `status:in-progress` with an assignee different from the primary issue's assignee, **flag prominently** so the caller can avoid duplicate work.
139
+
140
+ If the primary issue IS an Epic, capture all children via Phase 3's `subIssues` traversal (already done).
141
+
142
+ ## Phase 6 — Fetch Linked PRs (Native `Resolves` / Cross-references)
143
+
144
+ GitHub's native `closingIssuesReferences` and timeline give the canonical PR↔Issue relationship:
145
+
146
+ ```bash
147
+ gh api graphql -f query='query($org:String!,$repo:String!,$number:Int!){repository(owner:$org,name:$repo){issue(number:$number){closedByPullRequestsReferences(first:50){nodes{number title state merged mergedAt url repository{nameWithOwner}}}timelineItems(first:100,itemTypes:[CROSS_REFERENCED_EVENT]){nodes{...on CrossReferencedEvent{source{...on PullRequest{number title state url repository{nameWithOwner}}}}}}}}}' -F org=<org> -F repo=<repo> -F number=<number>
148
+ ```
149
+
150
+ Capture: PR number, title, state, mergedAt, repo, url. Dedupe with PRs found in Phase 4.
151
+
152
+ For each PR, fetch unresolved review comments via `gh pr view <num> --repo <org>/<repo> --json reviews,reviewThreads`.
153
+
154
+ ## Phase 7 — Assemble Context Bundle
155
+
156
+ Produce a single structured output that the caller can pass verbatim to downstream agents. Use this format:
157
+
158
+ ```text
159
+ # Issue Context: <org>/<repo>#<number>
160
+
161
+ ## Primary Issue
162
+ - Ref: <org>/<repo>#<number>
163
+ - URL: <url>
164
+ - Type: <type from `type:` label>
165
+ - Status: <status from `status:` label>
166
+ - State: <open|closed> (<stateReason>)
167
+ - Priority: <priority from `priority:` label>
168
+ - Author: <login>
169
+ - Assignees: <list>
170
+ - Parent: <parent-ref> — <parent-title> (or "None")
171
+ - Milestone: <name> (or "None")
172
+ - Labels: <comma-separated raw labels>
173
+ - Components: <list from `component:` labels>
174
+ - Story points: <n from `points:` label> (or "None")
175
+ - Fix version: <from `fix-version:` label or milestone>
176
+ - Created: <ISO> | Updated: <ISO> | Closed: <ISO or "—">
177
+
178
+ ### Body sections
179
+ #### Context / Business Value
180
+ <verbatim>
181
+
182
+ #### Technical Approach
183
+ <verbatim>
184
+
185
+ #### Acceptance Criteria
186
+ <verbatim, including the gherkin fence>
187
+
188
+ #### Validation Journey
189
+ <verbatim or "None">
190
+
191
+ #### Out of Scope
192
+ <verbatim>
193
+
194
+ #### Source Artifacts / Source Precedence / Links / Relationship Search / Repository / Sign-in Required / Target Backend Environment / Open Questions / Current Product
195
+ <each verbatim, omit those not present>
196
+
197
+ ### Comments (<count>)
198
+ <chronological comments with author + ISO timestamp + body. Flagged items called out.>
199
+
200
+ ## Sub-issue graph
201
+ ### Parent
202
+ <parent block: ref, title, state, url, type label> (or "None — this is an Epic / unparented")
203
+
204
+ ### Sub-issues (children, <count>)
205
+ - <ref> — <type> — <status> — <state> — <title>
206
+ - <one-paragraph body summary>
207
+ - <FLAG: in progress by other assignee> if applicable
208
+
209
+ ## Linked Issues (parsed from body `## Links`)
210
+ ### Blocks (<count>)
211
+ <per-issue block>
212
+
213
+ ### Is Blocked By (<count>)
214
+ <per-issue block; include shipped/not-shipped state of any linked PRs>
215
+
216
+ ### Relates To (<count>)
217
+ <per-issue block>
218
+
219
+ ### Duplicates / Clones
220
+ <per-issue block>
221
+
222
+ ## Linked Pull Requests
223
+ ### Native (closedByPullRequestsReferences + cross-references)
224
+ - <pr-ref> — <state> — <title> — <reviewDecision>
225
+ <body summary + unresolved review comments>
226
+
227
+ ### Body-referenced (`Resolves #<n>`)
228
+ <per-PR block>
229
+
230
+ ## Sibling Sub-issues (other children of the same parent, <count>)
231
+ - <ref> — <type> — <status> — <assignee> — <title> **[FLAG: in progress by other assignee]**
232
+
233
+ ## Summary for Downstream
234
+ - Full graph fetched: <issue-count>
235
+ - Blockers still open: <list>
236
+ - Related in-flight work: <list>
237
+ - Relevant PRs: <list with state>
238
+ ```
239
+
240
+ ## Rules
241
+
242
+ - Never summarize or truncate the primary issue's body or Validation Journey section.
243
+ - Never skip a link type, even if it seems unrelated — the agent downstream decides relevance.
244
+ - If a linked issue / PR returns an access error (private repo, deleted, etc.), capture the error and continue. Do not abort the read.
245
+ - Flag in-flight sibling work prominently so the caller can avoid duplicate implementation.
246
+ - If the issue has no parent sub-issue, state this explicitly — do not silently skip Phase 5.
247
+ - Output is pure context. This skill never modifies the issue.
248
+ - The body parser must be tolerant of small format variations (different `##` casings, missing optional sections) but strict enough that downstream skills can rely on the named sections being present when they exist.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: github-sync
3
+ description: "Syncs plan progress to a linked GitHub Issue. Posts plan contents, progress updates, branch links, and PR links at key milestones. Use this skill throughout the plan lifecycle to keep issues in sync. The GitHub counterpart of lisa:jira-sync."
4
+ allowed-tools: ["Bash", "Read", "Glob", "Grep"]
5
+ ---
6
+
7
+ # GitHub Issue Sync
8
+
9
+ Sync current plan progress to a GitHub Issue: `$ARGUMENTS`
10
+
11
+ If no argument is provided, search for an issue ref (`org/repo#<number>` or `https://github.com/<org>/<repo>/issues/<n>` URL) in the active plan file (most recently modified `.md` in `plans/`).
12
+
13
+ ## Workflow
14
+
15
+ ### Step 1: Identify Issue and Context
16
+
17
+ 1. **Parse issue ref** from `$ARGUMENTS` or extract from the active plan file.
18
+ 2. **Fetch current issue state**:
19
+
20
+ ```bash
21
+ gh issue view <number> --repo <org>/<repo> --json number,title,state,labels,milestone,assignees,comments,url
22
+ ```
23
+
24
+ 3. **Determine current milestone** by checking:
25
+ - Does a plan file exist? → Plan created
26
+ - Is there a working branch? → Implementation started
27
+ - Are tasks in progress? → Active implementation
28
+ - Is there an open PR? → PR ready for review
29
+ - Is the PR merged? → Complete
30
+
31
+ ### Step 2: Gather Update Content
32
+
33
+ | Milestone | Content to post |
34
+ |-----------|-----------------|
35
+ | **Plan created** | Plan summary, branch name, link to PR (if draft exists) |
36
+ | **Implementation in progress** | Task completion summary (X of Y tasks done), any blockers |
37
+ | **PR ready** | PR link, summary of changes, test results |
38
+ | **PR merged** | Final summary, suggest moving issue to `status:done` |
39
+
40
+ ### Step 3: Post Update
41
+
42
+ 1. **Idempotency check** — read the issue's recent comments. If the most recent comment with the prefix `[claude-sync] <milestone>` matches the current milestone AND the body content is unchanged, skip the post (no duplicate).
43
+ 2. **Add the comment**:
44
+
45
+ ```bash
46
+ gh issue comment <number> --repo <org>/<repo> --body-file /tmp/sync-comment.md
47
+ ```
48
+
49
+ The body must start with `[claude-sync] <milestone>` so the next sync run can dedupe.
50
+
51
+ 3. **Report** to the user what was synced.
52
+
53
+ ### Step 4: Suggest Status Transition
54
+
55
+ Based on the milestone, suggest (but do NOT automatically perform) a label transition:
56
+
57
+ | Milestone | Suggested label |
58
+ |-----------|-----------------|
59
+ | Plan created | `status:in-progress` |
60
+ | PR ready | `status:code-review` |
61
+ | PR merged | `status:done` |
62
+
63
+ The actual `status:in-progress` flip is owned by `lisa:github-build-intake` (claim) and `lisa:github-agent`. The `status:code-review` flip is owned by `lisa:github-evidence`. The `status:done` flip is typically owned by merge automation or PM. This skill never relabels.
64
+
65
+ ## Important Notes
66
+
67
+ - **Never auto-transition labels** — always suggest and let the user / pipeline confirm.
68
+ - **Idempotent updates** — the `[claude-sync] <milestone>` prefix on the most-recent comment is the dedupe key.
69
+ - **Comment format** — use GitHub-flavored markdown (`##` headings, fenced code blocks). The same template is used for the JIRA path (rendered as wiki markup there); keep the markdown source canonical.
70
+
71
+ ## Execution
72
+
73
+ Sync the issue now.
@@ -0,0 +1,312 @@
1
+ ---
2
+ name: github-to-tracker
3
+ description: >
4
+ Break down a GitHub Issue PRD into Epics, Stories, and Sub-tasks in the configured destination tracker
5
+ (JIRA via lisa:tracker-write → lisa:jira-write-ticket, or GitHub Issues itself via lisa:tracker-write
6
+ → lisa:github-write-issue). Use this skill whenever the user shares a GitHub issue URL and wants it
7
+ converted into tickets, or asks to "break down this GitHub PRD", "create tickets from a GitHub issue",
8
+ or similar. This skill mirrors lisa:notion-to-tracker / lisa:confluence-to-tracker /
9
+ lisa:linear-to-tracker for projects whose PRDs live in GitHub Issues — the workflow, gates, dry-run
10
+ mode, and validation rules are identical; only the source-of-truth tool surface differs (the `gh` CLI
11
+ instead of Notion / Confluence / Linear MCP).
12
+ allowed-tools: ["Skill", "Bash", "Read"]
13
+ ---
14
+
15
+ # GitHub PRD to Tracker Breakdown
16
+
17
+ Convert a GitHub Issue PRD into a structured ticket hierarchy in the configured destination tracker: Epics > Stories > Sub-tasks. Each Sub-task is scoped to exactly one repo and includes an empirical verification plan.
18
+
19
+ This skill is the GitHub counterpart of `lisa:notion-to-tracker` / `lisa:confluence-to-tracker` / `lisa:linear-to-tracker`. The four 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 FOUR skills together so the PRD vendors stay behaviorally identical.
20
+
21
+ ## What "PRD" means in GitHub Issues
22
+
23
+ GitHub Issues has no native "PRD" entity. This skill treats a single GitHub Issue (carrying the `prd-ready` label) as the PRD container:
24
+
25
+ - **Issue body** (markdown) is the PRD body — equivalent to a Notion page body, a Confluence page body, or a Linear project description.
26
+ - **Sub-issues** (native GitHub sub-issues, traversable via `gh api graphql`) act as the candidate set for Epics or User Stories — the same role child Epic pages play in a Notion/Confluence PRD.
27
+ - **Issue comments** capture decisions, engineering notes, product clarifications.
28
+ - **Linked PRs** (parsed from `Resolves #<n>` lines and from native cross-references) provide implementation context.
29
+
30
+ A multi-Epic PRD is encoded as a parent Issue with several child sub-issues. A simple PRD is a single Issue with body content only.
31
+
32
+ ## Modes
33
+
34
+ This skill supports two modes, controlled by a `dry_run` flag in `$ARGUMENTS`:
35
+
36
+ - **`dry_run: false`** (default — full mode): run all phases, write tickets via `lisa:tracker-write`, run the preservation gate, report.
37
+ - **`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:tracker-validate` (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:github-prd-intake`) can decide whether to proceed.
38
+
39
+ Dry-run output format is identical to `lisa:notion-to-tracker` / `lisa:confluence-to-tracker` / `lisa:linear-to-tracker`. Reuse the same fields, including `prd_anchor` and `prd_section`. For GitHub, `prd_anchor` is a section heading from the PRD body when the failure traces to a specific section; otherwise `null` (the caller posts unanchored failures as a rollup comment on the PRD issue).
40
+
41
+ ```text
42
+ ## github-to-tracker dry-run: <PRD title>
43
+
44
+ ### Planned hierarchy
45
+ - Epic: <summary>
46
+ prd_section: "<heading text from the PRD body or sub-issue title that produced this epic>"
47
+ prd_anchor: "<heading text or sub-issue ref or null>"
48
+ - Story 1.1: <summary>
49
+ prd_section: "<heading or user-story line>"
50
+ prd_anchor: "<heading or sub-issue ref or null>"
51
+ - Sub-task [<repo>]: <summary>
52
+ prd_section: "<heading or AC bullet>"
53
+ prd_anchor: "<heading or sub-issue ref or null>"
54
+ - ...
55
+ - Story 1.2: ...
56
+
57
+ ### Per-ticket validation
58
+ - <ticket-ref>: PASS | FAIL — <count> failures
59
+ prd_section: "<heading text>"
60
+ prd_anchor: "<heading or sub-issue ref or null>"
61
+ failures:
62
+ - gate: <gate-id>
63
+ category: <category from validator>
64
+ product_relevant: <true|false>
65
+ what: <plain-language description from validator>
66
+ recommendation: <1–3 candidate resolutions from validator>
67
+
68
+ ### Verdict: PASS | FAIL
69
+ ### Total failures: <n>
70
+ ```
71
+
72
+ The dry-run mode never writes to the destination tracker. It also never modifies the source PRD issue, never adds/removes labels, never edits sub-issues, and never posts comments — that is the orchestrating skill's responsibility (`lisa:github-prd-intake`).
73
+
74
+ ## Hard Rule: All Writes Go Through `lisa:tracker-write`
75
+
76
+ **Every ticket created by this skill — every Epic, Story, and Sub-task — MUST be created by invoking the `lisa:tracker-write` shim. Never call `lisa:jira-write-ticket`, `lisa:github-write-issue`, `mcp__atlassian__createJiraIssue`, or `gh issue create` directly from this skill or from any sub-agent it spawns.**
77
+
78
+ `lisa:tracker-write` enforces:
79
+ - Vendor-agnostic dispatch (so a project's destination is one config edit away).
80
+ - The vendor writer's pre-write gate (`lisa:tracker-validate` Phase 5.5).
81
+ - Post-write verify (`lisa:tracker-verify`).
82
+ - 3-audience description, Gherkin acceptance criteria, parent / Epic validation, link discovery, single-repo scope, sign-in / target environment fields, source-artifact preservation.
83
+
84
+ Bypassing the shim layer produces tickets that the rest of the lifecycle (triage, verify, journey, evidence) treats as broken.
85
+
86
+ The `gh` reads in this skill are limited to reading the source PRD issue, its sub-issues, and its comments. They never write.
87
+
88
+ ## Input
89
+
90
+ A GitHub issue ref. The PRD is expected to have:
91
+
92
+ - An issue body containing context, problems, and (optionally) a list of user stories.
93
+ - One or more sub-issues that act as candidate Epics or user stories (optional — single-issue PRDs are valid).
94
+ - Issue comments capturing engineering notes and product decisions.
95
+ - The `prd-ready` label (if invoked from `lisa:github-prd-intake`; for ad-hoc / direct invocation the label is informational, not gating).
96
+
97
+ URL parsing — accept either:
98
+
99
+ - `org/repo#<number>`
100
+ - `https://github.com/<org>/<repo>/issues/<number>`
101
+
102
+ Resolve `<org>/<repo>` from `.lisa.config.json` if `$ARGUMENTS` is just `#<n>` or a bare number.
103
+
104
+ ## Configuration
105
+
106
+ This skill reads project-specific configuration from environment variables and from `.lisa.config.json`. If these are not set, ask the user before proceeding — never invent values.
107
+
108
+ | Variable / config | Purpose | Example |
109
+ |-------------------|---------|---------|
110
+ | `.lisa.config.json` `tracker` | Destination tracker (jira / github) | `github` |
111
+ | `.lisa.config.json` `github.org` / `github.repo` | GitHub org/repo when tracker=github (and the source repo) | `acme` / `frontend-v2` |
112
+ | `JIRA_PROJECT` | Destination JIRA project key when tracker=jira | `SE` |
113
+ | `JIRA_SERVER` | Atlassian instance URL | `mycompany.atlassian.net` |
114
+ | `E2E_TEST_PHONE` | Test user phone for verification plans | `0000000099` |
115
+ | `E2E_TEST_OTP` | Test user OTP code | `555555` |
116
+ | `E2E_TEST_ORG` | Test organization name | `Arsenal` |
117
+ | `E2E_BASE_URL` | Frontend base URL for Playwright tests | `https://dev.example.io/` |
118
+ | `E2E_GRAPHQL_URL` | GraphQL API URL for curl verification | `https://gql.dev.example.io/graphql` |
119
+
120
+ ## Workflow
121
+
122
+ ### Phase 1: Fetch & Analyze the PRD
123
+
124
+ 1. **Confirm `gh auth status` succeeds.**
125
+ 2. **Fetch the PRD issue** via `gh issue view <num> --repo <org>/<repo> --json number,title,body,labels,milestone,assignees,author,createdAt,comments,url`. Capture title, body, labels, author, assignees, dates, comments.
126
+ 3. **Fetch native sub-issues** via the GraphQL `subIssues` traversal (see `lisa:github-read-issue` Phase 3). Each sub-issue's `{number, title, body, labels, state, url}` becomes a candidate epic / story node.
127
+ 4. **Recursively fetch grandchild sub-issues** (one more level — typical PRD depth is 2: PRD → Epic candidate → maybe a Story candidate). Stop after depth 3 unless the user explicitly requested deeper.
128
+ 5. **Fetch full comments per sub-issue** via `gh issue view <num> --repo <org>/<repo> --json comments` for every sub-issue surfaced in step 3. Capture body, author, timestamp.
129
+ 6. **Synthesize decisions and blockers** from the PRD body + every sub-issue body + every comment thread:
130
+ - Decisions already confirmed by the team (look for agreement in comments).
131
+ - Open questions that need product/engineering input.
132
+ - Engineering comments (prefixed with "Engineering:" or 🔧) that identify technical constraints.
133
+ - Cross-PRD dependencies (references to other GitHub issues, Notion / Confluence / Linear PRDs, shared infrastructure).
134
+
135
+ ### Phase 1.5: Extract Source Artifacts
136
+
137
+ PRDs typically reference external design, UX, and data artifacts (Figma files, Lovable prototypes, Loom walkthroughs, screenshots, example payloads, peer Notion / Confluence / Linear 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.
138
+
139
+ 1. **Scan the PRD body, every sub-issue body, and every comment** for:
140
+ - URLs to design/prototype tools (Figma, FigJam, Figma Make, Lovable, Framer, Penpot)
141
+ - URLs to recording/walkthrough tools (Loom, YouTube, Vimeo, Descript)
142
+ - URLs to collaborative docs (Google Docs/Slides/Sheets, peer Confluence pages, Notion peer pages, peer Linear documents)
143
+ - URLs to code sandboxes (CodeSandbox, StackBlitz, Replit, GitHub permalinks/gists)
144
+ - URLs to diagramming tools (Miro, Mural, Excalidraw, Mermaid Live, draw.io, Lucid)
145
+ - URLs to data/observability tools (Grafana, Datadog, Sentry, Metabase, Looker)
146
+ - Embedded images and file attachments referenced in the body
147
+ - Fenced code blocks with example data (JSON, SQL, GraphQL, cURL request/response)
148
+
149
+ 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, and coverage smells.
150
+
151
+ 3. **Build an `artifacts` map** keyed by domain. Each entry: `{ url, title, domain, source_page, source_page_url, classification_reason }`. `source_page` lets you trace each reference back to where it appeared (PRD body vs a specific sub-issue vs a specific comment).
152
+
153
+ 4. **Surface coverage smells** as defined in `lisa:jira-source-artifacts` §5. Record on the Epic.
154
+
155
+ ### Phase 1.6: Source Precedence & Conflict Resolution
156
+
157
+ 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.
158
+
159
+ The existing-component reuse expectation is defined in `lisa:jira-source-artifacts` §7. Encode it on every UI-touching story.
160
+
161
+ ### Phase 2: Codebase + Live Product Research
162
+
163
+ Identical to `lisa:notion-to-tracker` Phase 2 / `lisa:confluence-to-tracker` / `lisa:linear-to-tracker`. Two complementary inputs ground PRD analysis: the **code** and the **live product**.
164
+
165
+ **2a. Codebase research.** If the session doesn't already have codebase context, explore the repos. Use Explore agents for repos not yet examined.
166
+
167
+ **2b. Live product walkthrough.** If the PRD touches existing user-facing surfaces, invoke `lisa:product-walkthrough` against `E2E_BASE_URL` using the test user from config.
168
+
169
+ Skip 2b only when the work is purely backend with no user-visible surface, or affects a screen that does not yet exist.
170
+
171
+ Walkthrough findings are surfaced back to product via the orchestrating intake skill (`lisa:github-prd-intake`), which posts them as a comment on the PRD issue. This skill itself does NOT post to GitHub — it only reads. The walkthrough section is also inherited onto the resulting Epic / Stories under a `## Current Product` subsection.
172
+
173
+ ### Phase 3: Create Epics
174
+
175
+ > **Mode guard**: In `dry_run: true` mode, do not invoke `lisa:tracker-write` in this phase. Instead, draft the epic spec (summary, body, artifacts) and validate it with `lisa:tracker-validate --spec-only`. Record the drafted spec (with a placeholder ref like `DRY-RUN-EPIC-1`) for Phase 4 to use as parent references. In `dry_run: false` mode, proceed as described below.
176
+
177
+ For each epic identified in Phase 1, **invoke the `lisa:tracker-write` shim** (do not call `lisa:jira-write-ticket` or `lisa:github-write-issue` directly). Pass it everything it needs to enforce its quality gates:
178
+
179
+ - `issue_type`: `Epic`
180
+ - `summary`: epic title from the PRD
181
+ - `body`: a draft of the multi-section description containing:
182
+ - **Context / Business Value**: epic summary from the PRD, originating GitHub PRD 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.
190
+ - `priority`, `labels`, `components`, `fix_version`: as appropriate
191
+
192
+ Capture the returned epic ref — 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:tracker-write`. Draft each story spec and validate it with `lisa:tracker-validate --spec-only`. Use placeholder refs (e.g. `DRY-RUN-STORY-1.1`).
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 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:tracker-write`** with:
205
+
206
+ - `issue_type`: `Story`
207
+ - `parent_ref` / `epic_parent`: the Epic ref captured in Phase 3 (mandatory)
208
+ - `summary`: prefixed per the naming convention above
209
+ - `body`: multi-section description as in `lisa:notion-to-tracker` Phase 4
210
+ - `artifacts`: the Phase 1.5 artifacts filtered by domain per the inheritance table:
211
+
212
+ | Story type | Inherits domains |
213
+ |------------|------------------|
214
+ | Frontend / UI | `ui-design`, `ux-flow`, `reference` |
215
+ | Backend / API / data model | `data`, `reference` |
216
+ | Infrastructure | `ops`, `reference` |
217
+ | Mixed / setup ("X.0") | All domains |
218
+
219
+ Capture each returned story ref — Phase 5 needs it.
220
+
221
+ ### Phase 5: Create Sub-tasks
222
+
223
+ Delegate sub-task creation to **parallel agents** (one per epic or batch of stories) for efficiency. **Every spawned agent must invoke `lisa:tracker-write` for each sub-task — no agent may call `lisa:jira-write-ticket` / `lisa:github-write-issue` / `gh issue create` directly.**
224
+
225
+ Each sub-task MUST:
226
+ 1. **Be scoped to exactly ONE repo** — indicated in brackets in the summary: `[repo-name]`.
227
+ 2. **Include an Empirical Verification Plan** — real user-like verification, NOT unit tests, linting, or typechecking.
228
+
229
+ Sub-tasks inherit their parent Story's artifacts by reference (the parent link). Do not pass the same artifact list to every sub-task.
230
+
231
+ ### Phase 5.5: Artifact Preservation Gate (mandatory)
232
+
233
+ 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`.
234
+
235
+ To run the gate, this skill must:
236
+
237
+ 1. Pull the remote links / `## Source Artifacts` section / `## Links` section of every Epic and Story created in this run via `lisa:tracker-read`.
238
+ 2. Apply the §8 preservation matrix and verdict rules.
239
+ 3. If the gate fails: list each dropped/misrouted artifact and either re-attach via `lisa:tracker-write` (UPDATE mode) or stop and ask the human.
240
+ 4. If the gate passes: print the matrix compactly and proceed to Phase 6.
241
+
242
+ This gate is not optional.
243
+
244
+ ### Phase 6: Report Results
245
+
246
+ After all tickets are created, present a summary table to the user:
247
+ - All Epics with refs and URLs
248
+ - All Stories grouped by Epic
249
+ - All Sub-tasks grouped by Story with repo tags
250
+ - Repo distribution
251
+ - **Artifact Preservation Matrix**
252
+ - Blockers list with recommendations and alternatives
253
+ - Cross-PRD dependencies
254
+
255
+ ## Handling Ambiguities and Blockers
256
+
257
+ When you encounter something the PRD + comments + codebase can't resolve:
258
+
259
+ 1. **Don't guess** — mark the ticket with a BLOCKER section.
260
+ 2. **Include your recommendation** with rationale.
261
+ 3. **List 2-3 alternatives** so the user/product can choose.
262
+ 4. **State what's needed to unblock.**
263
+
264
+ ## Agent Prompt Template for Sub-task Creation
265
+
266
+ When delegating to agents, provide this context. **The "MUST invoke tracker-write" instruction is load-bearing — do not edit it out when adapting this template.**
267
+
268
+ ```text
269
+ Create Sub-tasks via the configured destination tracker.
270
+
271
+ CRITICAL: For each sub-task, invoke the `lisa:tracker-write` skill via the Skill tool.
272
+ Do NOT call `lisa:jira-write-ticket`, `lisa:github-write-issue`, or `gh issue create` directly.
273
+ The `lisa:tracker-write` shim dispatches to the configured destination AND enforces required
274
+ quality gates (Gherkin acceptance criteria, multi-section description, single-repo scope,
275
+ sign-in/environment fields, post-create verification). Bypassing it produces broken tickets
276
+ that downstream skills (triage, journey, evidence) cannot use.
277
+
278
+ For each sub-task, invoke `lisa:tracker-write` with:
279
+ - issue_type: "Sub-task"
280
+ - parent_ref: the parent story ref
281
+ - summary: prefixed with the repo in brackets, e.g. "[backend-api] Add audit log table"
282
+ - body: a multi-section draft (Context / Technical Approach / Acceptance Criteria / etc.)
283
+ - gherkin_acceptance_criteria: derived from the story's functional requirements
284
+ - sign_in_account: [test user credentials from config]
285
+ - target_environment: "dev"
286
+ - empirical_verification_plan: real user-like verification (curl + auth token, Playwright
287
+ browser flow, CLI check after deploy) using the test credentials. NOT unit tests.
288
+
289
+ Each sub-task must:
290
+ 1. Be scoped to ONE repo only — repo named in brackets in the summary.
291
+ 2. Include the Empirical Verification Plan in the body.
292
+ 3. Be created via `lisa:tracker-write`, not via direct calls.
293
+
294
+ If `lisa:tracker-write` rejects a sub-task, fix the input and re-invoke. Do NOT fall back
295
+ to a direct vendor-write call to bypass the gate.
296
+
297
+ Test user info: [credentials from config]
298
+
299
+ [Then list all sub-tasks grouped by parent story with details]
300
+ ```
301
+
302
+ ## Cross-PRD Shared Infrastructure
303
+
304
+ 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. Use `lisa:tracker-read` to search the destination for existing tickets in the same area before creating new ones for shared infrastructure.
305
+
306
+ ## GitHub-specific notes
307
+
308
+ - **Body format**: GitHub Issues bodies are markdown. Treat headings (`#`, `##`, `###`) as section markers for `prd_section`.
309
+ - **Native sub-issues**: GitHub native sub-issues (the `addSubIssue` GraphQL mutation) are how Epic→Story→Sub-task is encoded when the destination is also GitHub Issues. The PRD-side reads them via the `subIssues` GraphQL field.
310
+ - **Comment threading**: GitHub Issues comments are flat — there's no `parentId` (unlike Linear). Decision context is captured by chronological position; quote the comment author + timestamp when surfacing it.
311
+ - **Anchoring on PRD comments**: GitHub Issues do not have a Confluence-style selection-anchored inline-comment primitive. The orchestrating skill (`lisa:github-prd-intake`) approximates by quoting the relevant body excerpt at the top of each comment. The dry-run report's `prd_anchor` is the section heading the failure traces to (or `null` for body-wide failures).
312
+ - **Self-host edge case**: when `tracker = "github"` AND the source PRD repo is the same as the destination repo, both reads and writes hit one place. The PRD carries `prd-*` labels; built tickets carry `type:*` + `status:*` labels. The two namespaces never overlap. `lisa:prd-ticket-coverage` filters out the source PRD itself when listing destination tickets.