@codyswann/lisa 2.9.1 → 2.10.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 (35) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/agents/learnings-synthesizer.md +135 -0
  4. package/plugins/lisa/agents/pr-mining-specialist.md +85 -0
  5. package/plugins/lisa/agents/tracker-mining-specialist.md +85 -0
  6. package/plugins/lisa/commands/debrief/apply.md +6 -0
  7. package/plugins/lisa/commands/debrief.md +6 -0
  8. package/plugins/lisa/hooks/enforce-team-first.sh +9 -3
  9. package/plugins/lisa/rules/intent-routing.md +97 -17
  10. package/plugins/lisa/skills/confluence-to-tracker/SKILL.md +14 -0
  11. package/plugins/lisa/skills/debrief/SKILL.md +79 -0
  12. package/plugins/lisa/skills/debrief-apply/SKILL.md +63 -0
  13. package/plugins/lisa/skills/github-to-tracker/SKILL.md +14 -0
  14. package/plugins/lisa/skills/linear-to-tracker/SKILL.md +14 -0
  15. package/plugins/lisa/skills/notion-to-tracker/SKILL.md +14 -0
  16. package/plugins/lisa/skills/prd-backlink/SKILL.md +89 -0
  17. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  22. package/plugins/src/base/agents/learnings-synthesizer.md +135 -0
  23. package/plugins/src/base/agents/pr-mining-specialist.md +85 -0
  24. package/plugins/src/base/agents/tracker-mining-specialist.md +85 -0
  25. package/plugins/src/base/commands/debrief/apply.md +6 -0
  26. package/plugins/src/base/commands/debrief.md +6 -0
  27. package/plugins/src/base/hooks/enforce-team-first.sh +9 -3
  28. package/plugins/src/base/rules/intent-routing.md +97 -17
  29. package/plugins/src/base/skills/confluence-to-tracker/SKILL.md +14 -0
  30. package/plugins/src/base/skills/debrief/SKILL.md +79 -0
  31. package/plugins/src/base/skills/debrief-apply/SKILL.md +63 -0
  32. package/plugins/src/base/skills/github-to-tracker/SKILL.md +14 -0
  33. package/plugins/src/base/skills/linear-to-tracker/SKILL.md +14 -0
  34. package/plugins/src/base/skills/notion-to-tracker/SKILL.md +14 -0
  35. package/plugins/src/base/skills/prd-backlink/SKILL.md +89 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: prd-backlink
3
+ description: "Update a source PRD with a `## Tickets` section linking back to every work item created from it. Vendor-aware on the source side (Notion / Confluence / Linear / GitHub Issue / file) and tracker-agnostic on the ticket side. Idempotent — regenerates the section on each run rather than appending, so re-planning never accumulates stale links. Invoked by the *-to-tracker skills at the end of their pipeline and standalone if a PRD's Tickets section needs to be refreshed."
4
+ allowed-tools: ["Skill", "Bash", "Read", "Edit", "Write", "Glob", "Grep"]
5
+ ---
6
+
7
+ # PRD Back-link
8
+
9
+ Write or update the `## Tickets` section of a source PRD so it links to every work item created from that PRD. The Debrief flow (and a human reading the PRD months later) uses this section as the canonical work-item set for the initiative.
10
+
11
+ ## Input
12
+
13
+ Pass `$ARGUMENTS` as a single JSON-style block:
14
+
15
+ ```json
16
+ {
17
+ "source_type": "notion" | "confluence" | "linear" | "github" | "file",
18
+ "source_ref": "<URL, page id, project id, issue ref, or absolute file path>",
19
+ "tickets": [
20
+ { "key": "<tracker-key>", "title": "<summary>", "type": "Epic|Story|Task|Sub-task|Bug|Spike", "url": "<link>", "parent_key": "<key or null>" }
21
+ ],
22
+ "section_heading": "## Tickets" // optional override; default "## Tickets"
23
+ }
24
+ ```
25
+
26
+ ## Behaviour
27
+
28
+ 1. **Fetch the current PRD content** using the source's native read tool:
29
+ - `notion` → `notion-fetch`
30
+ - `confluence` → `getConfluencePage`
31
+ - `linear` → Linear MCP project / issue read
32
+ - `github` → `gh issue view`
33
+ - `file` → `Read` tool on the absolute path
34
+ 2. **Locate the existing section.** Search for `section_heading` (default `## Tickets`). If present, you will replace it. If not, you will append a new section just before any closing footer / sign-off / signature block, otherwise at the end.
35
+ 3. **Render the section.** Use the format below. Group by Epic. Within an Epic, group by Story. Sub-tasks nest under their Story. Bugs and Spikes that are not under a Story go in a flat list at the bottom.
36
+ 4. **Write the updated PRD back** using the source's native write tool:
37
+ - `notion` → `notion-update-page`
38
+ - `confluence` → `updateConfluencePage`
39
+ - `linear` → Linear MCP update
40
+ - `github` → `gh issue edit --body`
41
+ - `file` → `Edit` (preferred) or `Write` (full rewrite if needed)
42
+ 5. **Return** the rendered section (so the caller can include it in its own report) and the source URL of the updated PRD.
43
+
44
+ ## Format
45
+
46
+ The rendered section must be deterministic — same inputs produce identical output bytes. This is what makes idempotency reliable.
47
+
48
+ ```markdown
49
+ ## Tickets
50
+
51
+ _Generated by `lisa:prd-backlink`. Regenerated on every Plan run; do not edit by hand._
52
+
53
+ ### <Epic key>: <Epic title>
54
+
55
+ - [<Epic key>](<url>) — Epic
56
+ - [<Story key>](<url>) — Story: <title>
57
+ - [<Sub-task key>](<url>) — Sub-task: <title>
58
+ - [<Sub-task key>](<url>) — Sub-task: <title>
59
+ - [<Story key>](<url>) — Story: <title>
60
+
61
+ ### <Epic key>: <Epic title>
62
+ ...
63
+
64
+ ### Unparented items
65
+
66
+ - [<Bug key>](<url>) — Bug: <title>
67
+ - [<Spike key>](<url>) — Spike: <title>
68
+ ```
69
+
70
+ If the input contains zero items, write the section header with a single line: `_No tickets created — Plan flow may not have completed._` Do not omit the section; presence-of-section is itself a signal to Debrief.
71
+
72
+ ## Idempotency
73
+
74
+ Rendering rules:
75
+ - Sort epics by key (lexical). Sort stories within an epic by key. Sort sub-tasks within a story by key. Sort the unparented list by `(type, key)`.
76
+ - The line `_Generated by ..._` is fixed text — does not include a timestamp. A timestamp would defeat the diff-equality check Debrief relies on.
77
+
78
+ ## Failures
79
+
80
+ - **Source unreachable / permission denied.** Stop and report. Do not silently swallow.
81
+ - **Section already present but in a non-standard format** (e.g., user hand-edited it). Replace it anyway — the warning line `_do not edit by hand_` is the contract. Note in the run output that an existing section was overwritten.
82
+ - **Source is a Notion database URL, a Confluence space URL, or any other non-page input.** Stop — back-linking only makes sense against a single PRD page, not a queue. Direct the caller to pass the specific page.
83
+
84
+ ## Output
85
+
86
+ ```text
87
+ PRD back-link updated: <source_url>
88
+ Section: ## Tickets — <n> epics, <n> stories, <n> sub-tasks, <n> unparented (<bugs/spikes>)
89
+ ```