@codyswann/lisa 2.61.1 → 2.62.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 (125) hide show
  1. package/package.json +2 -2
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  4. package/plugins/lisa/agents/confluence-prd-intake.md +1 -1
  5. package/plugins/lisa/agents/github-prd-intake.md +1 -1
  6. package/plugins/lisa/agents/linear-prd-intake.md +1 -1
  7. package/plugins/lisa/agents/notion-prd-intake.md +1 -1
  8. package/plugins/lisa/commands/intake.md +1 -1
  9. package/plugins/lisa/commands/project-ideation.md +3 -3
  10. package/plugins/lisa/commands/repair-intake.md +6 -0
  11. package/plugins/lisa/commands/research.md +3 -3
  12. package/plugins/lisa/commands/setup-automations.md +6 -0
  13. package/plugins/lisa/commands/tear-down-automations.md +6 -0
  14. package/plugins/lisa/commands/verify-prd.md +2 -2
  15. package/plugins/lisa/rules/config-resolution.md +60 -0
  16. package/plugins/lisa/rules/intent-routing.md +4 -3
  17. package/plugins/lisa/rules/prd-lifecycle-rollup.md +10 -2
  18. package/plugins/lisa/rules/repo-scope-split.md +18 -1
  19. package/plugins/lisa/skills/confluence-prd-intake/SKILL.md +11 -1
  20. package/plugins/lisa/skills/confluence-write-prd/SKILL.md +103 -0
  21. package/plugins/lisa/skills/confluence-write-prd/agents/openai.yaml +4 -0
  22. package/plugins/lisa/skills/github-build-intake/SKILL.md +13 -0
  23. package/plugins/lisa/skills/github-prd-intake/SKILL.md +15 -1
  24. package/plugins/lisa/skills/github-write-issue/SKILL.md +13 -4
  25. package/plugins/lisa/skills/github-write-prd/SKILL.md +100 -0
  26. package/plugins/lisa/skills/github-write-prd/agents/openai.yaml +4 -0
  27. package/plugins/lisa/skills/implement/SKILL.md +13 -6
  28. package/plugins/lisa/skills/intake/SKILL.md +3 -2
  29. package/plugins/lisa/skills/jira-build-intake/SKILL.md +13 -0
  30. package/plugins/lisa/skills/jira-write-ticket/SKILL.md +8 -0
  31. package/plugins/lisa/skills/linear-build-intake/SKILL.md +13 -0
  32. package/plugins/lisa/skills/linear-prd-intake/SKILL.md +11 -1
  33. package/plugins/lisa/skills/linear-write-issue/SKILL.md +10 -2
  34. package/plugins/lisa/skills/linear-write-prd/SKILL.md +90 -0
  35. package/plugins/lisa/skills/linear-write-prd/agents/openai.yaml +4 -0
  36. package/plugins/lisa/skills/notion-access/SKILL.md +2 -0
  37. package/plugins/lisa/skills/notion-prd-intake/SKILL.md +11 -1
  38. package/plugins/lisa/skills/notion-write-prd/SKILL.md +107 -0
  39. package/plugins/lisa/skills/notion-write-prd/agents/openai.yaml +4 -0
  40. package/plugins/lisa/skills/prd-source-write/SKILL.md +80 -0
  41. package/plugins/lisa/skills/prd-source-write/agents/openai.yaml +4 -0
  42. package/plugins/lisa/skills/project-ideation/SKILL.md +183 -80
  43. package/plugins/lisa/skills/repair-intake/SKILL.md +403 -0
  44. package/plugins/lisa/skills/repair-intake/agents/openai.yaml +4 -0
  45. package/plugins/lisa/skills/research/SKILL.md +19 -3
  46. package/plugins/lisa/skills/research/agents/openai.yaml +2 -2
  47. package/plugins/lisa/skills/setup-automations/SKILL.md +78 -0
  48. package/plugins/lisa/skills/setup-automations/agents/openai.yaml +4 -0
  49. package/plugins/lisa/skills/tear-down-automations/SKILL.md +34 -0
  50. package/plugins/lisa/skills/tear-down-automations/agents/openai.yaml +4 -0
  51. package/plugins/lisa/skills/tracker-build-intake/SKILL.md +4 -0
  52. package/plugins/lisa/skills/verify-prd/SKILL.md +41 -38
  53. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-expo/commands/exploratory-qa.md +3 -3
  58. package/plugins/lisa-expo/skills/exploratory-qa/SKILL.md +48 -18
  59. package/plugins/lisa-expo/skills/exploratory-qa/agents/openai.yaml +2 -2
  60. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  62. package/plugins/lisa-harper-fabric/commands/exploratory-qa.md +3 -3
  63. package/plugins/lisa-harper-fabric/skills/exploratory-qa/SKILL.md +48 -18
  64. package/plugins/lisa-harper-fabric/skills/exploratory-qa/agents/openai.yaml +2 -2
  65. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails/commands/exploratory-qa.md +3 -3
  72. package/plugins/lisa-rails/skills/exploratory-qa/SKILL.md +48 -18
  73. package/plugins/lisa-rails/skills/exploratory-qa/agents/openai.yaml +2 -2
  74. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  76. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki/skills/lisa-wiki-ingest/SKILL.md +30 -1
  79. package/plugins/src/base/agents/confluence-prd-intake.md +1 -1
  80. package/plugins/src/base/agents/github-prd-intake.md +1 -1
  81. package/plugins/src/base/agents/linear-prd-intake.md +1 -1
  82. package/plugins/src/base/agents/notion-prd-intake.md +1 -1
  83. package/plugins/src/base/commands/intake.md +1 -1
  84. package/plugins/src/base/commands/project-ideation.md +3 -3
  85. package/plugins/src/base/commands/repair-intake.md +6 -0
  86. package/plugins/src/base/commands/research.md +3 -3
  87. package/plugins/src/base/commands/setup-automations.md +6 -0
  88. package/plugins/src/base/commands/tear-down-automations.md +6 -0
  89. package/plugins/src/base/commands/verify-prd.md +2 -2
  90. package/plugins/src/base/rules/config-resolution.md +60 -0
  91. package/plugins/src/base/rules/intent-routing.md +4 -3
  92. package/plugins/src/base/rules/prd-lifecycle-rollup.md +10 -2
  93. package/plugins/src/base/rules/repo-scope-split.md +18 -1
  94. package/plugins/src/base/skills/confluence-prd-intake/SKILL.md +11 -1
  95. package/plugins/src/base/skills/confluence-write-prd/SKILL.md +103 -0
  96. package/plugins/src/base/skills/github-build-intake/SKILL.md +13 -0
  97. package/plugins/src/base/skills/github-prd-intake/SKILL.md +15 -1
  98. package/plugins/src/base/skills/github-write-issue/SKILL.md +13 -4
  99. package/plugins/src/base/skills/github-write-prd/SKILL.md +100 -0
  100. package/plugins/src/base/skills/implement/SKILL.md +13 -6
  101. package/plugins/src/base/skills/intake/SKILL.md +3 -2
  102. package/plugins/src/base/skills/jira-build-intake/SKILL.md +13 -0
  103. package/plugins/src/base/skills/jira-write-ticket/SKILL.md +8 -0
  104. package/plugins/src/base/skills/linear-build-intake/SKILL.md +13 -0
  105. package/plugins/src/base/skills/linear-prd-intake/SKILL.md +11 -1
  106. package/plugins/src/base/skills/linear-write-issue/SKILL.md +10 -2
  107. package/plugins/src/base/skills/linear-write-prd/SKILL.md +90 -0
  108. package/plugins/src/base/skills/notion-access/SKILL.md +2 -0
  109. package/plugins/src/base/skills/notion-prd-intake/SKILL.md +11 -1
  110. package/plugins/src/base/skills/notion-write-prd/SKILL.md +107 -0
  111. package/plugins/src/base/skills/prd-source-write/SKILL.md +80 -0
  112. package/plugins/src/base/skills/project-ideation/SKILL.md +183 -80
  113. package/plugins/src/base/skills/repair-intake/SKILL.md +403 -0
  114. package/plugins/src/base/skills/research/SKILL.md +19 -3
  115. package/plugins/src/base/skills/setup-automations/SKILL.md +78 -0
  116. package/plugins/src/base/skills/tear-down-automations/SKILL.md +34 -0
  117. package/plugins/src/base/skills/tracker-build-intake/SKILL.md +4 -0
  118. package/plugins/src/base/skills/verify-prd/SKILL.md +41 -38
  119. package/plugins/src/expo/commands/exploratory-qa.md +3 -3
  120. package/plugins/src/expo/skills/exploratory-qa/SKILL.md +48 -18
  121. package/plugins/src/harper-fabric/commands/exploratory-qa.md +3 -3
  122. package/plugins/src/harper-fabric/skills/exploratory-qa/SKILL.md +48 -18
  123. package/plugins/src/rails/commands/exploratory-qa.md +3 -3
  124. package/plugins/src/rails/skills/exploratory-qa/SKILL.md +48 -18
  125. package/plugins/src/wiki/skills/lisa-wiki-ingest/SKILL.md +30 -1
package/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.61.1",
85
+ "version": "2.62.1",
86
86
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
87
87
  "main": "dist/index.js",
88
88
  "exports": {
@@ -199,7 +199,7 @@
199
199
  "vitest": "^4.1.0"
200
200
  },
201
201
  "devDependencies": {
202
- "@codyswann/lisa": "^2.59.0",
202
+ "@codyswann/lisa": "^2.62.0",
203
203
  "@types/js-yaml": "^4.0.9",
204
204
  "eslint-plugin-oxlint": "^1.62.0",
205
205
  "js-yaml": "^4.1.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.61.1",
3
+ "version": "2.62.1",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.61.1",
3
+ "version": "2.62.1",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -53,7 +53,7 @@ After a successful cycle, if any PRDs ended in the `blocked` label, mention to t
53
53
 
54
54
  When reporting `blocked` outcomes, distinguish the cause: **pre-write gate failure** (per-ticket validator caught a problem before any tickets were created) vs **post-write coverage gap** (tickets were created and remain in the destination tracker, but the PRD has uncovered requirements that the next intake cycle will address). Both result in the `blocked` label, but the implication for product is different — coverage gaps mean some tickets are already real and product should not re-author the PRD from scratch.
55
55
 
56
- If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or back to `blocked` with linked fix issues on failure). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
56
+ If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or, on failure, re-open it to `ticketed` with build-ready fix tickets that auto-build and re-verify — never `blocked`). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
57
57
 
58
58
  ## Rules
59
59
 
@@ -53,7 +53,7 @@ After a successful cycle, if any PRDs ended in the `blocked` label, mention to t
53
53
 
54
54
  When reporting `blocked` outcomes, distinguish the cause: **pre-write gate failure** (per-ticket validator caught a problem before any tickets were created) vs **post-write coverage gap** (tickets were created and remain in the destination tracker, but the PRD has uncovered requirements that the next intake cycle will address). Both result in the `blocked` label, but the implication for product is different — coverage gaps mean some tickets are already real and product should not re-author the PRD from scratch.
55
55
 
56
- If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or back to `blocked` with linked fix issues on failure). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
56
+ If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or, on failure, re-open it to `ticketed` with build-ready fix tickets that auto-build and re-verify — never `blocked`). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
57
57
 
58
58
  ## Rules
59
59
 
@@ -53,7 +53,7 @@ After a successful cycle, if any PRDs ended in the `blocked` label, mention to t
53
53
 
54
54
  When reporting `blocked` outcomes, distinguish the cause: **pre-write gate failure** (per-ticket validator caught a problem before any tickets were created) vs **post-write coverage gap** (tickets were created and remain in the destination tracker, but the PRD has uncovered requirements that the next intake cycle will address). Both result in the `blocked` label, but the implication for product is different — coverage gaps mean some tickets are already real and product should not re-author the PRD from scratch.
55
55
 
56
- If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or back to `blocked` with linked fix issues on failure). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
56
+ If all PRDs ended in the `ticketed` label with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and apply the configured `shipped` label after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or, on failure, re-open it to `ticketed` with build-ready fix tickets that auto-build and re-verify — never `blocked`). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
57
57
 
58
58
  ## Rules
59
59
 
@@ -51,7 +51,7 @@ After a successful cycle, if any PRDs ended in the `blocked` status, mention to
51
51
 
52
52
  When reporting `blocked` outcomes, distinguish the cause: **pre-write gate failure** (per-ticket validator caught a problem before any tickets were created) vs **post-write coverage gap** (tickets were created and remain in the destination tracker, but the PRD has uncovered requirements that the next intake cycle will address). Both result in the `blocked` status, but the implication for product is different — coverage gaps mean some tickets are already real and product should not re-author the PRD from scratch.
53
53
 
54
- If all PRDs ended in the `ticketed` status with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and flip the PRDs to the configured `shipped` status after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or back to `blocked` with linked fix issues on failure). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
54
+ If all PRDs ended in the `ticketed` status with coverage `COMPLETE`, mention that the next step is for product to monitor the created tickets and flip the PRDs to the configured `shipped` status after delivery, then run `/lisa:verify-prd` to empirically verify the shipped product against the PRD and move it to `verified` (or, on failure, re-open it to `ticketed` with build-ready fix tickets that auto-build and re-verify — never `blocked`). If any are `COMPLETE_WITH_SCOPE_CREEP`, point that out so product can review the flagged tickets.
55
55
 
56
56
  ## Rules
57
57
 
@@ -3,4 +3,4 @@ description: "Vendor-agnostic batch scanner for Ready queues. Notion PRD databas
3
3
  argument-hint: "<Notion-PRD-database-URL | Confluence-space-URL | Confluence-parent-page-URL | Linear-workspace-URL | Linear-team-URL | GitHub-repo-URL | org/repo | JIRA-project-key | JQL-filter>"
4
4
  ---
5
5
 
6
- Use the /lisa:intake skill to scan the queue for Ready items and dispatch each one through the appropriate single-item lifecycle skill. $ARGUMENTS
6
+ Use the /lisa:intake skill to scan the queue for Ready items and dispatch one eligible Ready item per invocation through the appropriate single-item lifecycle skill — and, on the PRD side, close the loop by dispatching /lisa:verify-prd for one shipped PRD per cycle (shipped → verified on pass, or re-opened to ticketed with build-ready fix tickets that auto-build and re-verify on fail — never blocked). $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Generate practical, verifiable product or workflow ideas for the current host project. Inspects code, docs, data sources, and current surfaces (and optionally an external public product), then returns a prioritized report separating build-ready ideas from discovery spikes and rejected ones. Every build-ready idea must have an obtainable data/source path and an empirical verification plan."
3
- argument-hint: "[target project path or external product to compare against]"
2
+ description: "Generate persona-grounded, verifiable product ideas for the host project, then create PRDs for the selected build-ready ideas via lisa:research. First derives the personas the project actually serves (from its docs, code, data model, and releases never invented), ideates per persona, and gates each idea on an obtainable data/source path and an empirical verification plan. Creates one PRD by default (top-ranked idea); max_prds widens the batch. prd_ready=true creates them prd-ready for auto-pickup by lisa:intake; default is draft for human review."
3
+ argument-hint: "[target path | external product] [prd_ready=true|false] [max_prds=<n>|all]"
4
4
  ---
5
5
 
6
- Use the /lisa:project-ideation skill to generate a decision-ready idea report for the host project. $ARGUMENTS
6
+ Use the /lisa:project-ideation skill to derive evidence-grounded personas, ideate per persona, gate the ideas, and create PRDs for the selected build-ready ideas via lisa:research — in draft state by default, or prd-ready when prd_ready=true; one PRD by default, more with max_prds. $ARGUMENTS
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Repair counterpart to /lisa:intake. Vendor-agnostic batch scanner that finds stuck work — items left in `blocked` or stalled in an in-progress role (build `claimed`, PRD `in_review`) — across the same queues /lisa:intake serves (Notion / Confluence / Linear / GitHub PRDs; JIRA / GitHub / Linear build issues), and attempts to repair the first materially actionable one per cycle: resumes stalled in-progress work in place, re-validates blocked PRDs, and re-dispatches blocked build items whose blockers have cleared. One actionable repair per invocation; cron-safe. Designed as a /schedule target alongside /lisa:intake."
3
+ argument-hint: "<Notion-PRD-database-URL | Confluence-space-URL | Confluence-parent-page-URL | Linear-workspace-URL | Linear-team-URL | GitHub-repo-URL | org/repo | JIRA-project-key | JQL-filter> [intake_mode=prd|build|both] [stale_after=24h] [max_candidates=100] [force=true]"
4
+ ---
5
+
6
+ Use the /lisa:repair-intake skill to scan the queue for stuck items (blocked, or stalled in an in-progress role) and repair the first materially actionable one. $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Research a problem space and produce a PRD. Investigates the codebase, defines user flows, assesses technical feasibility, and outputs a specification ready for the Plan flow."
3
- argument-hint: "<problem-statement-or-feature-idea>"
2
+ description: "Research a problem space and create a PRD in the configured PRD source. Investigates the codebase, defines user flows, assesses technical feasibility, synthesizes the spec, then creates it in the source (Notion / Confluence / GitHub / Linear) via lisa:prd-source-write — no loose document. prd_ready=true creates it prd-ready for auto-pickup by lisa:intake; default is draft for the Plan flow / human review."
3
+ argument-hint: "<problem-statement-or-feature-idea> [prd_ready=true|false]"
4
4
  ---
5
5
 
6
- Use the /lisa:research skill to research the problem and produce a PRD. $ARGUMENTS
6
+ Use the /lisa:research skill to research the problem and create a PRD in the configured source — in draft state by default, or prd-ready when prd_ready=true. $ARGUMENTS
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Set up the recurring Lisa automations on the local workstation using the runtime's native scheduler (Codex automations / Claude /schedule): intake-repair (60 min), intake PRD (60 min), intake tickets (10 min), exploratory-bugs (daily), exploratory-prds (daily). A declarative spec — it states what to schedule and how often; the runtime's native automation mechanism does the creating. auto-start-prds / auto-start-tickets control whether ideated PRDs / filed bug tickets are created auto-pickup-ready (default: left for human review)."
3
+ argument-hint: "[auto-start-prds=true|false] [auto-start-tickets=true|false]"
4
+ ---
5
+
6
+ Use the /lisa:setup-automations skill to create the five recurring Lisa automations via this runtime's native scheduler (Codex automations / Claude /schedule), passing the auto-start-prds / auto-start-tickets flags through to the exploratory automations. $ARGUMENTS
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Remove the recurring Lisa automations /setup-automations created for this project (the lisa-auto-<project>-* set) using the runtime's native scheduler (Codex automations / Claude /schedule). A declarative spec — it states which automations to remove; the runtime's native mechanism does the removing. Removes only this project's Lisa automations, never others."
3
+ argument-hint: ""
4
+ ---
5
+
6
+ Use the /lisa:tear-down-automations skill to remove this project's lisa-auto-<project>-* automations via this runtime's native scheduler (Codex automations / Claude /schedule), leaving other projects' and non-Lisa automations untouched. $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Initiative-level PRD acceptance gate. Reads a shipped PRD and its generated child work, confirms all generated top-level work is terminal, then runs spec-conformance against the PRD plus empirical verification of the shipped surface and, on a CONFORMS verdict with all checks passing, transitions the PRD shipped → verified with evidence (the shipped → blocked FAIL path is sibling work)."
2
+ description: "Initiative-level PRD acceptance gate. Reads a shipped PRD and its generated child work, confirms all generated top-level work is terminal, then runs spec-conformance against the PRD plus empirical verification of the shipped surface. On a CONFORMS verdict with all checks passing it transitions the PRD shipped → verified with evidence; on a conformance miss (PARTIAL/DIVERGES) or any failing empirical check it re-opens the PRD shipped → ticketed (never blocked), creates build-ready fix tickets for the gaps, and posts a failure report — the fix tickets auto-build, the PRD re-ships, and it re-verifies (a self-healing loop). Idempotent across re-runs."
3
3
  argument-hint: "<prd>"
4
4
  ---
5
5
 
6
- Use the /lisa:verify-prd skill to read the PRD, confirm its generated top-level work is terminal, run spec-conformance against the PRD and empirical verification of the shipped surface, and on a passing result transition the PRD shipped → verified with evidence. $ARGUMENTS
6
+ Use the /lisa:verify-prd skill to read the PRD, confirm its generated top-level work is terminal, run spec-conformance against the PRD and empirical verification of the shipped surface, then transition the PRD shipped → verified with evidence on a pass, or on a fail — re-open it shipped → ticketed (never blocked) and create build-ready fix tickets that auto-build and trigger a re-verify. $ARGUMENTS
@@ -120,6 +120,13 @@ fi
120
120
  "staging": "staging",
121
121
  "production": "main"
122
122
  }
123
+ },
124
+
125
+ "intake": {
126
+ "repair": {
127
+ "staleAfterHours": 24,
128
+ "maxCandidates": 100
129
+ }
123
130
  }
124
131
  }
125
132
  ```
@@ -226,6 +233,22 @@ The `rollup` object lives in each PRD-source vendor section (`github.labels.prd.
226
233
 
227
234
  Like every other vocabulary key, `prd.rollup` is **optional** — a missing block inherits `closeOnShipped: false`. The `shipped` transition itself is unconditional on the all-terminal condition; only the close/archive step is gated by this flag.
228
235
 
236
+ ### Repair intake config (`intake.repair`)
237
+
238
+ `lisa:repair-intake` (the recovery counterpart to `lisa:intake`) reads two optional tuning keys
239
+ from the top-level `intake.repair` block. Both are **optional** — a missing block inherits the
240
+ documented defaults, so existing projects need no config change.
241
+
242
+ | Key | Required | Default | Notes |
243
+ |-----|----------|---------|-------|
244
+ | `intake.repair.staleAfterHours` | no | `24` | How long an in-progress item (build `claimed`, PRD `in_review`) may show no observable activity before repair-intake treats it as stalled and resumes it. `blocked` items are judged on blocker/answer state, not this threshold. Overridable per-run via `stale_after=<dur>` in `$ARGUMENTS` (which always wins). The same value is the default backoff window for loop-prevention notes. |
245
+ | `intake.repair.maxCandidates` | no | `100` | Upper bound on how many stuck items repair-intake enumerates while searching for the first actionable one. Bounds scan cost. Overridable per-run via `max_candidates=<n>`. |
246
+
247
+ Resolution order matches every other key: `$ARGUMENTS` override → `.lisa.config.local.json` →
248
+ `.lisa.config.json` → built-in default. The role SEMANTICS repair-intake operates on (which
249
+ roles count as "stuck", what each repair does) are fixed like every other lifecycle transition;
250
+ only these thresholds are tunable.
251
+
229
252
  ### Env-keyed `done`
230
253
 
231
254
  The `done` role is special: the terminal status/label depends on which environment a PR was merged into. A hotfix to staging ends at `On Stg`; a production hotfix ends at `Done`. So `done` is a **map** keyed by env name (`dev`, `staging`, `production`).
@@ -238,6 +261,16 @@ Skills that transition to `done` MUST resolve the env first:
238
261
 
239
262
  If a project's terminal state is the same regardless of env, set `done` to a string instead of a map (lifecycle skills accept either shape).
240
263
 
264
+ ### Env → base branch (forward: the build base and PR base)
265
+
266
+ `deploy.branches` is also read in the **forward** direction by the build flow (`lisa:implement`): the environment a work item targets determines the branch the work is built on and the branch the PR opens against.
267
+
268
+ 1. **Resolve the work item's target environment** — its `## Target Backend Environment` field. If the item names no environment, use the **remote default branch** (`gh repo view --json defaultBranchRef`, or `origin/HEAD`).
269
+ 2. **Map env → base branch** via `deploy.branches` (e.g. `staging → staging`, `production → main`). Absent env or missing branch → stop and report; never guess.
270
+ 3. **Before any code is written**, `lisa:implement` fetches and **rebases the working branch onto `origin/<base>`, resolving conflicts**, so implementation builds on the latest target-environment code. **The PR then opens against that same base branch** (`target_branch=<base>` to `lisa:git-submit-pr`).
271
+
272
+ This is the exact inverse of the env-keyed `done` "Branch inference" above: `done` derives the env *from* the PR base branch (reverse); the build flow derives the base branch *from* the env (forward). Both use the one `deploy.branches` map, so the branch a PR targets and the `done` status it earns always agree.
273
+
241
274
  The true terminal `done` value is also the only value that triggers provider-native closure / resolution per `leaf-only-lifecycle`:
242
275
 
243
276
  - If `done` is a string, that value is terminal.
@@ -437,6 +470,33 @@ GitHub and Linear PRD lifecycles use labels (`prd-ready` / `prd-in-review` / etc
437
470
 
438
471
  **Why curl is still needed**: acli's Confluence surface only covers `space` and `page view`. v1 page-write endpoints accept scoped tokens but return 410 Gone (deprecated); v2 endpoints require granular OAuth scopes acli doesn't request. API tokens via Basic auth bypass this with full user scope, so curl is the headless-friendly path for ops neither acli nor MCP can do.
439
472
 
473
+ ## Repo scoping (multi-repo trackers)
474
+
475
+ A ticketing system can oversee **multiple repos** — e.g. one JIRA project (or Linear team) for `frontend`, `backend`, and `infrastructure`. When build-intake runs inside one repo, it must claim only the tickets that belong to **that** repo and skip the rest. Two pieces make this work; the claim-time enforcement lives in the `repo-scope-split` rule.
476
+
477
+ ### The `repo:<name>` label (the repo marker)
478
+
479
+ A work item's target repo is recorded as a **label** `repo:<name>`, where `<name>` is the repo's short name (e.g. `repo:frontend`). The convention is uniform across trackers (JIRA / GitHub / Linear), consistent with the other namespaced labels (`status:`, `type:`, `component:`). On JIRA a **component** equal to the repo name is accepted as an alias (matches the legacy `component = "frontend"` JQL pattern). A leaf work unit carries **exactly one** `repo:<name>` (leaves are single-repo per `repo-scope-split`); a container (Epic/Story/Spike) may carry several or none.
480
+
481
+ The label is not required to exist up front: build-intake **determines** the target repo from the ticket's content + code surfaces when the label is absent and **stamps** `repo:<name>` so later cycles filter cheaply (see `repo-scope-split` "claim-time repo scoping").
482
+
483
+ ### Current-repo resolution (which repo am I?)
484
+
485
+ Resolve the name of the repo intake is running in, highest priority first:
486
+
487
+ 1. `.lisa.config.local.json` then `.lisa.config.json` `repo` (an explicit override, e.g. `"repo": "frontend"`).
488
+ 2. `.lisa.config.json` `github.repo` when set (the repo's own identity).
489
+ 3. The git remote basename: `basename -s .git "$(git remote get-url origin)"` (e.g. `git@github.com:acme/frontend.git` → `frontend`).
490
+
491
+ ```bash
492
+ read_g() { local lv gv; lv=$(jq -r "$1 // empty" .lisa.config.local.json 2>/dev/null); gv=$(jq -r "$1 // empty" .lisa.config.json 2>/dev/null); echo "${lv:-${gv}}"; }
493
+ CURRENT_REPO=$(read_g '.repo')
494
+ [ -z "$CURRENT_REPO" ] && CURRENT_REPO=$(read_g '.github.repo')
495
+ [ -z "$CURRENT_REPO" ] && CURRENT_REPO=$(basename -s .git "$(git remote get-url origin 2>/dev/null)" 2>/dev/null)
496
+ ```
497
+
498
+ If the current repo cannot be resolved by any tier, build-intake stops with a clear error rather than claiming tickets it cannot scope. The match is by repo short name (`repo:<CURRENT_REPO>`), case-insensitive.
499
+
440
500
  ## Invariants
441
501
 
442
502
  - Project tracker selection is **persistent** within a project — always read from config, never infer from the shape of `$ARGUMENTS`. If a developer wants a different destination for one run, they edit `.lisa.config.local.json`.
@@ -67,11 +67,12 @@ Sequence:
67
67
  2. `product-specialist` -- define user goals, user flows (Gherkin), acceptance criteria, error states, UX concerns, and out-of-scope items
68
68
  3. **Edge Case Brainstorm sub-flow** -- run the PRD candidate through the edge-case checklist; fold accepted cases into acceptance criteria, out-of-scope, or open questions
69
69
  4. `architecture-specialist` -- assess technical feasibility, identify constraints, map existing system boundaries
70
- 5. Synthesize findings into a PRD document containing: problem statement, user stories, acceptance criteria, technical constraints, open questions, and proposed scope
70
+ 5. Synthesize findings into a PRD containing: problem statement, user stories, acceptance criteria, technical constraints, open questions, and proposed scope
71
71
  6. **Plan Phase Tooling** -- review all available skills and agents (project-defined, plugin-provided, and built-in) and determine which ones the Plan phase will need. For each recommended skill or agent, state why it is needed. If no skills or agents beyond the defaults are identified, explicitly justify why the standard set is sufficient. Include this as a "Recommended Tooling for Plan Phase" section in the PRD.
72
- 7. `learner` -- capture discoveries for future sessions
72
+ 7. **Create the PRD in the configured source** -- invoke `lisa:prd-source-write` with the synthesized PRD (`title`, `body`, `initial_role` resolved from the caller's `prd_ready` flag — `draft` by default, `ready` when `prd_ready=true`, plus any `dedupe_key`/`marker`/`source_ref` the caller passed). The PRD **lives in the source** (Notion page / Confluence page / GitHub issue / Linear project per `.lisa.config.json` `source`); there is no separate document artifact. A `source` must be configured — if it is not, stop and report it. `prd-source-write` dedupes by marker, so re-running against the same idea references the existing PRD instead of creating a duplicate.
73
+ 8. `learner` -- capture discoveries for future sessions
73
74
 
74
- Output: A PRD document that includes a "Recommended Tooling for Plan Phase" section listing the skills and agents the Plan phase should use. If there is not enough context to produce a complete PRD, stop and report what is missing rather than producing an incomplete one.
75
+ Output: A PRD created in the configured source, carrying a "Recommended Tooling for Plan Phase" section, in the `draft` role by default (or `ready` when `prd_ready=true`, so `lisa:intake` auto-claims it). If there is not enough context to produce a complete PRD, stop and report what is missing rather than creating an incomplete one. If no `source` is configured, stop and report it rather than emitting a loose document.
75
76
 
76
77
  ### Plan
77
78
 
@@ -108,9 +108,17 @@ The PRD never advances to `shipped` on its own authority — it is **derived** f
108
108
  **`/lisa:verify` (one work item) vs `/lisa:verify-prd` (the whole initiative).** These are deliberately separate scopes:
109
109
 
110
110
  - **`/lisa:verify`** empirically verifies a **single work item** (a ticket / story / sub-task) in its target environment as part of that item's Build/Fix/Improve flow. It is what drives a build ticket to its `done` state; it operates at the *leaf/build* level (see `leaf-only-lifecycle`). It does **not** read the PRD or judge initiative-level acceptance, and it is **not** replaced by PRD verification.
111
- - **`/lisa:verify-prd`** is the **initiative-level acceptance gate**. It runs *after* the PRD is `shipped` (all generated top-level work terminal), reads the PRD and its generated child set, confirms the children are terminal, then runs spec-conformance against the original PRD requirements plus empirical verification of the shipped surface. On pass it transitions the PRD `shipped → verified` and posts evidence; on fail it transitions the PRD `shipped → blocked`, posts a product-readable failure report, and creates linked fix issues for the missing or incorrect behavior. Re-runs are idempotent (no duplicate evidence, fix issues, or lifecycle transitions).
111
+ - **`/lisa:verify-prd`** is the **initiative-level acceptance gate**. It runs *after* the PRD is `shipped` (all generated top-level work terminal), reads the PRD and its generated child set, confirms the children are terminal, then runs spec-conformance against the original PRD requirements plus empirical verification of the shipped surface. On pass it transitions the PRD `shipped → verified` and posts evidence; on fail it **re-opens the PRD `shipped → ticketed`** (never `blocked`), creates **build-ready fix tickets** for the missing or incorrect behavior (registered as the PRD's generated work) and posts a product-readable failure report — the fix tickets auto-build, rollup re-ships the PRD once they are terminal, and a later cycle re-verifies (self-healing; see "Closing the loop" below). Re-runs are idempotent (no duplicate evidence, fix tickets, or lifecycle transitions).
112
112
 
113
- **No extra failure states.** A failed PRD verification reuses the existing `blocked` role (`shipped → blocked`) rather than introducing a `prd-verifying` or `prd-verification-failed` state — the lifecycle stays intentionally small. `verified` is terminal and product-owned (like `draft` and `shipped`); a PRD is never moved to `verified` solely because its tickets are closed, and a PRD is never closed/archived before verification has passed. The vendor maps for the `verified` role (`prd-verified` label for GitHub/Linear, `Verified` status for Notion, the verified parent page for Confluence) live in the `config-resolution` rule.
113
+ **No extra failure states, and verification never uses `blocked`.** A failed PRD verification does **not** move the PRD to `blocked`; it re-opens the PRD `shipped → ticketed` and creates build-ready fix tickets (see "Closing the loop"), forming a self-healing loop rather than parking the PRD for a human. It introduces no `prd-verifying` or `prd-verification-failed` state — the lifecycle stays intentionally small, and `blocked` remains the *intake* (ready-stage validation) failure state, not the verification one. `verified` is terminal and product-owned (like `draft` and `shipped`); a PRD is never moved to `verified` solely because its tickets are closed, and a PRD is never closed/archived before verification has passed. The vendor maps for the `verified` role (`prd-verified` label for GitHub/Linear, `Verified` status for Notion, the verified parent page for Confluence) live in the `config-resolution` rule.
114
+
115
+ ### Closing the loop: PRD intake dispatches `/lisa:verify-prd` for shipped PRDs
116
+
117
+ `shipped → verified` does not happen on its own — something has to run the acceptance gate. The PRD-intake scanners close that loop: in addition to the `ticketed → shipped` rollup, each PRD-intake cycle **dispatches `/lisa:verify-prd` for a shipped PRD** so a shipped PRD does not sit unverified forever. This is a **dispatch**, not a transition — the intake scanner still never *sets* the verification outcome itself; `/lisa:verify-prd` (which it invokes) performs the `shipped → verified` (pass) or, on fail, the `shipped → ticketed` re-open (it **never** uses `blocked`), with its own guard, evidence, and build-ready fix-ticket creation.
118
+
119
+ **The self-healing FAIL loop.** When verify-prd fails it re-opens the PRD `shipped → ticketed` and creates **build-ready** fix tickets (registered as the PRD's generated work). Because the fix tickets are build-ready they are auto-claimed by the build queue with no human promotion; once they reach terminal, the `ticketed → shipped` rollup (Phase 3f) re-ships the PRD, and the next cycle's verify dispatch (Phase 3g) re-verifies. PASS ends at `verified`; FAIL starts another round. The loop **never auto-halts** (the failure report carries a verification-round count for human visibility) and **never** parks the PRD in `blocked`.
120
+
121
+ Bounded, like the ready claim: `/lisa:verify-prd` is a heavy full flow (spec-conformance + empirical verification + fix-ticket creation), so a scanner verifies **one shipped PRD per cycle** and lets the scheduler drain the rest — the same one-item-per-cycle discipline the `ready` claim uses. After verify-prd runs, the PRD leaves `shipped` (to `verified` on pass, or `ticketed` on fail), so it is not re-picked by the shipped query that cycle; a PRD whose generated work is not actually terminal is guard-stopped by verify-prd and left `shipped` (verify-prd's gate, not the scanner's). A PRD that the project chose to close on ship (`*.rollup.closeOnShipped = true`) is out of the open verification queue — closing on ship is an explicit opt-out of the open loop. This dispatch is **behaviorally identical across all four PRD-intake skills** (the `github` / `linear` / `notion` / `confluence` `*-prd-intake` Phase 3g); only the `shipped`-role query surface differs.
114
122
 
115
123
  ## Idempotency dedupe key
116
124
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Leaf work units are single-repo. A **leaf work unit** is an individually implementable ticket with no child tickets — issue types **Bug, Task, Sub-task, Improvement**. Each must name exactly one repository. **Epic, Story, Spike** are coordination containers and may span repos.
4
4
 
5
- This invariant is enforced at three points: gate **S10** in the `*-validate-*` skills (write time), `task-decomposition` step 1.5 (PRD-decomposition time), and the work-time split procedure below (when an agent picks up an existing ticket to implement it).
5
+ This invariant is enforced at four points: gate **S10** in the `*-validate-*` skills (write time), `task-decomposition` step 1.5 (PRD-decomposition time), **claim-time repo scoping** in the build-intake skills (when intake decides whether to claim a ready ticket for the current repo — see below), and the work-time split procedure below (when an agent picks up an existing ticket to implement it).
6
6
 
7
7
  ## Two splitting strategies, by phase
8
8
 
@@ -32,6 +32,23 @@ Auto-split only when the split is unambiguous. Fall back to the standard BLOCK +
32
32
  - Splitting would strand stakeholder context that only the reporter can re-scope (e.g. the acceptance criteria describe a single indivisible cross-repo behavior with no clean per-repo boundary).
33
33
  - The metadata required to clone (parent, environment, credentials) is itself missing — block on the missing metadata first; do not propagate gaps into the siblings.
34
34
 
35
+ ## Claim-time repo scoping (build-intake)
36
+
37
+ A ticketing system can oversee multiple repos (one JIRA project / Linear team for `frontend`, `backend`, `infrastructure`). When `lisa:*-build-intake` runs inside one repo, it claims only tickets for **that** repo — it never pulls a ready ticket meant for a sibling repo. This is the fourth enforcement point of the single-repo-leaf invariant; it runs in each vendor build-intake's claim gate (Phase 3a), **before** the leaf-only container gate and the claim.
38
+
39
+ Resolve the current repo per the `config-resolution` "Repo scoping" section (config `repo` → `github.repo` → git remote basename; stop with a clear error if unresolvable). Then walk the ready candidates in priority order and apply the **repo-scope decision** to each before claiming:
40
+
41
+ 1. **Read the candidate's repo marker** — the `repo:<name>` label (JIRA: also a component equal to a repo name).
42
+ - **Labeled for another repo** → **skip** cheaply (do not claim, do not re-determine); it stays `ready` for that repo's own intake. Move to the next candidate.
43
+ - **Labeled for the current repo** → proceed to the leaf-only gate + claim (the cheap, common path once labels exist).
44
+ - **Unlabeled** → **determine** the target repo(s) from the ticket (description, acceptance criteria, technical approach) confirmed against the actual code surfaces the change requires — the same detection as step 1 of the work-time split. Then **stamp** the resolved `repo:<name>` label(s) so future cycles filter cheaply, and re-apply this decision with the now-known repo.
45
+ 2. **Multi-repo leaf → split, never claim.** If determination finds the leaf touches more than one repo, run the **work-time split procedure** below to break it into single-repo siblings — each created **build-ready** (`build_ready: true`, so the build queue auto-claims it) and stamped with its own `repo:<name>`. After the split, the current repo's sibling (if any) becomes a normal current-repo candidate; the others are separate single-repo `ready` leaves for their repos. A multi-repo leaf is never claimed as-is.
46
+ 3. **Wrong repo → skip.** A single-repo leaf whose `repo:<name>` ≠ the current repo is left `ready` (and labeled) and skipped; intake moves on until it finds a claimable current-repo leaf, then stops (one item per cycle).
47
+
48
+ **Cost.** Only **unlabeled** candidates need content determination; once stamped, wrong-repo candidates are skipped by label alone. Prefer candidates already labeled `repo:<current>` first (cheap claim), falling through to unlabeled candidates (determine + stamp) only when no pre-labeled current-repo leaf is ready.
49
+
50
+ A container (Epic/Story/Spike) is handled by the leaf-only gate, not here — containers may span repos and are never claimed/built directly.
51
+
35
52
  ## Vendor mechanics
36
53
 
37
54
  The procedure is vendor-neutral; the create + link + edit mechanics differ:
@@ -108,7 +108,7 @@ draft → ready → in_review → blocked | ticketed → shipped → verified
108
108
 
109
109
  (Each role corresponds to a dedicated parent page; the `verified` parent is resolved from `confluence.parents.verified`.)
110
110
 
111
- `verified` is the terminal state after `shipped`: it means the shipped product has been empirically checked against the PRD (set by `/lisa:verify-prd`, not by this intake skill). A failed post-ship verification re-parents back under `blocked` rather than introducing a separate `verifying` / `verification-failed` parent. Like `draft` and `shipped`, `verified` is **product-owned** — this intake skill never re-parents a PRD into or out of the `verified` parent. See the "PRD-level verification vs ticket verification" section of the `prd-lifecycle-rollup` rule.
111
+ `verified` is the terminal state after `shipped`: it means the shipped product has been empirically checked against the PRD (set by `/lisa:verify-prd`, not by this intake skill). A failed post-ship verification does **not** use `blocked`; `/lisa:verify-prd` re-parents the PRD `shipped → ticketed` and creates build-ready fix tickets that auto-build and trigger a re-verify (the self-healing loop), introducing no `verifying` / `verification-failed` parent. Like `draft` and `shipped`, `verified` is **product-owned** — this intake skill never re-parents a PRD into or out of the `verified` parent. See the "PRD-level verification vs ticket verification" section of the `prd-lifecycle-rollup` rule.
112
112
 
113
113
  A PRD's current state is determined entirely by which lifecycle parent it sits under. Re-parenting is the transition.
114
114
 
@@ -352,6 +352,16 @@ The set of **required** children for the all-terminal check is the top-level chi
352
352
 
353
353
  This phase implements exactly one PRD-lifecycle hop — `ticketed → shipped` — and the optional config-gated archive that follows it. All terminal-state semantics, the generated-top-level-work boundary, and the dedupe-by-child-ref idempotency come from the `prd-lifecycle-rollup` rule; this skill is its Confluence implementation, not a second source of truth.
354
354
 
355
+ #### 3g. PRD verification dispatch (close the loop on shipped PRDs)
356
+
357
+ `shipped` and `verified` are distinct facts about a PRD (see the `prd-lifecycle-rollup` rule's "PRD-level verification vs ticket verification" and "Closing the loop" sections). Rollup (3f) only reaches the shipped parent; the `shipped → verified` (pass) / `shipped → ticketed` (fail) hops are owned by `/lisa:verify-prd`. This phase **closes that loop** by dispatching the initiative-level acceptance gate for shipped PRDs. It never performs the verification transition itself — the "never sets the verification outcome" invariant holds: `lisa:verify-prd`, not this skill, sets `verified` (or, on failure, re-opens the PRD to `ticketed`).
358
+
359
+ Re-query the PRDs currently parented under the shipped lifecycle parent via `lisa:atlassian-access` `operation: read-page-descendants id: <confluence.parents.shipped>`. Pick the **first** one and invoke `lisa:verify-prd <page-url>`. Process **one shipped PRD per cycle** — `lisa:verify-prd` is a heavy full flow (spec-conformance + empirical verification + fix-issue creation), so it is bounded exactly like the single-ready-PRD claim in Phase 3; the scheduler drains the rest.
360
+
361
+ **Per-cycle combined bound:** each scheduler cycle dispatches at most one ready PRD (the Phase 3 single-ready-PRD claim) **and** at most one shipped PRD for verification (this Phase 3g dispatch), for a maximum of two PRD operations per cycle. Ready intake runs first (Phase 3), then shipped verify (Phase 3g).
362
+
363
+ `lisa:verify-prd` owns the outcome: on a CONFORMS verdict with all empirical checks passing it transitions the PRD to the verified parent and posts evidence; on a conformance miss or a failing/unavailable check it **re-parents the PRD shipped → ticketed** (never the blocked parent) and creates **build-ready** fix tickets registered as the PRD's generated work, then posts a failure report — the fix tickets auto-build, rollup (3f) re-ships the PRD once they are terminal, and a later cycle re-verifies (the self-healing loop). Either branch moves the PRD out of the shipped parent, so it is not re-picked this cycle; a PRD whose generated work is not actually terminal is guard-stopped by `lisa:verify-prd` (left under shipped) — that is verify-prd's gate, not this skill's. A PRD archived on ship (`confluence.rollup.closeOnShipped = true`) is out of the open verification queue. This phase, like 3f, is **behaviorally identical across all four intake skills** (`github-prd-intake`, `linear-prd-intake`, `notion-prd-intake`, `confluence-prd-intake`) — only the `$SHIPPED` query surface differs; keep them aligned. Record the dispatched PRD + verify-prd's verdict in the summary.
364
+
355
365
  ### Phase 4 — Summary report
356
366
 
357
367
  After processing the single selected PRD, emit a summary:
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: confluence-write-prd
3
+ description: "Creates or idempotently updates a PRD as a Confluence page parented under the configured lifecycle parent page (the draft parent by default, or the ready parent when initial_role is ready so lisa:confluence-prd-intake auto-claims it). The Confluence PRD-source writer behind lisa:prd-source-write. Confluence models PRD state by PARENT PAGE (not labels), per config-resolution. Dedupes by a stable marker embedded in the page body, found via CQL (matched by marker, never by title). All Atlassian access goes through lisa:atlassian-access."
4
+ allowed-tools: ["Skill", "Bash"]
5
+ ---
6
+
7
+ # Write Confluence PRD: $ARGUMENTS
8
+
9
+ Create (or update) a PRD page in Confluence. Invoked by `lisa:prd-source-write` when
10
+ `source = confluence`; do not call directly from a vendor-neutral caller. **All Confluence
11
+ operations go through `lisa:atlassian-access`** — never call the Atlassian API/MCP or `acli` directly.
12
+
13
+ Confluence's PRD lifecycle uses **parent pages**, not labels (scoped API tokens can't write
14
+ Confluence labels — see `config-resolution` "Confluence PRD lifecycle uses parent pages"). A PRD's
15
+ state is which lifecycle parent it lives under; "promote to ready" = re-parent to the ready parent.
16
+
17
+ `$ARGUMENTS` carries the `lisa:prd-source-write` spec: `title`, `body` (full PRD markdown),
18
+ `initial_role` (`draft` | `ready`, default `draft`), `dedupe_key`, `marker`, optional `source_ref`.
19
+
20
+ ## Phase 1 — Resolve lifecycle parents
21
+
22
+ ```bash
23
+ read_g() { local lv gv; lv=$(jq -r "$1 // empty" .lisa.config.local.json 2>/dev/null); gv=$(jq -r "$1 // empty" .lisa.config.json 2>/dev/null); echo "${lv:-${gv:-$2}}"; }
24
+ SPACE=$(read_g '.confluence.spaceKey' '')
25
+ CLOUDID=$(read_g '.atlassian.cloudId' '')
26
+ [ -z "$CLOUDID" ] && { echo "Error: atlassian.cloudId not set in .lisa.config.json."; exit 1; }
27
+ # Resolve the FULL set of lifecycle parents from config (never hard-code) — needed for the target
28
+ # parent, the past-ready reverse-lookup, and to derive the space when spaceKey is absent.
29
+ DRAFT_PARENT=$(read_g '.confluence.parents.draft' '')
30
+ READY_PARENT=$(read_g '.confluence.parents.ready' '')
31
+ IN_REVIEW_PARENT=$(read_g '.confluence.parents.in_review' '')
32
+ BLOCKED_PARENT=$(read_g '.confluence.parents.blocked' '')
33
+ TICKETED_PARENT=$(read_g '.confluence.parents.ticketed' '')
34
+ SHIPPED_PARENT=$(read_g '.confluence.parents.shipped' '')
35
+ VERIFIED_PARENT=$(read_g '.confluence.parents.verified' '')
36
+ # "Progressed past ready" parents (never re-parent a PRD down from these):
37
+ PROGRESSED_PARENTS=("$IN_REVIEW_PARENT" "$BLOCKED_PARENT" "$TICKETED_PARENT" "$SHIPPED_PARENT" "$VERIFIED_PARENT")
38
+ ```
39
+
40
+ Resolve the target parent from `initial_role`: `ready` → `$READY_PARENT`, otherwise `$DRAFT_PARENT`.
41
+ If the needed parent id is unset, stop and report that `/lisa:setup:confluence` must provision the
42
+ lifecycle parent pages — do not create a PRD outside the lifecycle scaffolding.
43
+
44
+ **Resolve the space (config allows parent-page-only setups with no `spaceKey`).** If `$SPACE` is
45
+ empty, derive it from the target lifecycle parent: `lisa:atlassian-access` `operation: read-page id:
46
+ <target parent>` and read its space key from the response. If neither `confluence.spaceKey` is set nor
47
+ a space can be derived from the parent, **stop and report** that a space could not be established —
48
+ do not attempt a CQL search or create without it.
49
+
50
+ ## Phase 2 — Dedupe by marker (CQL search before create)
51
+
52
+ The `marker` is embedded in the page body. Find an existing PRD page carrying it — match the marker,
53
+ **never** the title:
54
+
55
+ ```text
56
+ lisa:atlassian-access operation: search-pages cql: 'space = "<SPACE>" AND text ~ "<marker>"'
57
+ ```
58
+
59
+ If `source_ref` was passed, target that page directly. If a page with the marker exists → **update**;
60
+ else → **create**.
61
+
62
+ ## Phase 3 — Create or update
63
+
64
+ **Storage-format body + marker (both paths).** Convert the PRD markdown to Confluence **storage
65
+ format** (XHTML): `#`/`##`/`###` → `<h1>/<h2>/<h3>`, paragraphs → `<p>`, lists → `<ul>/<ol><li>`,
66
+ fenced code → `<ac:structured-macro ac:name="code">`. Embed the marker as a storage comment
67
+ (`<!-- $MARKER -->`) or a small `<p>` so future CQL dedupe finds it. The body must always contain
68
+ **exactly one** marker; never write a markerless page (CREATE or UPDATE).
69
+
70
+ **CREATE:** `lisa:atlassian-access` `operation: write-page` (create form) with a payload that sets:
71
+ - `title`: `$TITLE`
72
+ - `space`: `$SPACE` (resolved in Phase 1)
73
+ - `ancestors`/`parentId`: the resolved lifecycle parent (`$DRAFT_PARENT` or `$READY_PARENT`)
74
+ - `body`: the storage-format, marker-normalized body above.
75
+
76
+ **UPDATE** (existing page or `source_ref`):
77
+ 1. **GET-then-PUT** (load-bearing, as `confluence-prd-intake` documents): first `operation: read-page
78
+ id: <page-id>` to read the current `version.number`, then `operation: write-page` (edit form) with
79
+ the marker-normalized storage body and `version.number` bumped to current+1. A PUT without the
80
+ current version is rejected; never drop the marker on the edit.
81
+ 2. Re-parent to the target lifecycle parent if the role changed — **unless** the page's current
82
+ parent is in the resolved `${PROGRESSED_PARENTS[@]}` set (already past `ready`). If so, leave it
83
+ and report `reused (already past ready)`. Reverse-lookup the current parent in
84
+ `confluence.parents.*` to determine its role before re-parenting.
85
+
86
+ ## Phase 4 — Return
87
+
88
+ ```yaml
89
+ ref: "<confluence-page-id>"
90
+ url: "<page url>"
91
+ role: draft | ready # derived from the lifecycle parent the page now lives under (or its current role when reused past ready)
92
+ marker: "<MARKER>"
93
+ outcome: created | reused
94
+ ```
95
+
96
+ ## Rules
97
+
98
+ - All access via `lisa:atlassian-access`; never call Atlassian directly.
99
+ - State is the parent page, not a label — never attempt Confluence label writes (they 401 on scoped
100
+ tokens; see `config-resolution`).
101
+ - Match dedupe by marker, never by title.
102
+ - Never re-parent a PRD already past `ready` down to draft/ready.
103
+ - Resolve parents from config (`confluence.parents.{draft,ready}`) — never hardcode page ids.
@@ -0,0 +1,4 @@
1
+ display_name: "Confluence Write PRD"
2
+ short_description: "Creates or idempotently updates a PRD as a Confluence page parented under the configured lifecycle parent page (the draft parent by…"
3
+ default_prompt:
4
+ - "Use $confluence-write-prd: Creates or idempotently updates a PRD as a Confluence page parented under the configured lifecycle parent page (the draft parent by…."
@@ -135,6 +135,19 @@ If none of the configured role labels exist on the repo → label convention not
135
135
 
136
136
  ### Phase 3 — Process the first eligible ready issue
137
137
 
138
+ #### 3a.0 Repo-scope gate (claim only current-repo issues)
139
+
140
+ GitHub Issues live in one repo by definition, so the scanned repo's issues are usually inherently current-repo. But a planning/umbrella repo's issues can target sibling repos, so this skill still claims only issues for the repo it is running in. Run this gate **before** the leaf-only gate (3a) and the claim (3b), per the `repo-scope-split` rule's "Claim-time repo scoping" section (cite it by slug; do not restate its decision table).
141
+
142
+ 1. **Resolve the current repo** per `config-resolution` "Repo scoping" (`.repo` → `.github.repo` → `git remote get-url origin` basename). If unresolvable, stop and report.
143
+ 2. **Cheap path first.** Prefer candidates already carrying the `repo:<current>` label. Keep the Phase 2 scan broad so unlabeled issues are still seen, determined, and stamped.
144
+ 3. **Per candidate, apply the repo-scope decision (`repo-scope-split`):**
145
+ - Carries `repo:<other>` → **skip** (leave it `ready` for that repo's own intake); next candidate.
146
+ - **Unlabeled** → determine the target repo(s) from the issue + code surfaces, then **stamp** `repo:<name>` via `gh issue edit <n> --add-label "repo:<name>"` (create the label lazily) so later cycles filter cheaply; re-apply with the now-known repo. (An issue whose work is entirely in the scanned repo is simply labeled `repo:<current>`.)
147
+ - **Multi-repo leaf → split, never claim.** Run the `repo-scope-split` work-time procedure into single-repo siblings, each created **build-ready** (`build_ready: true`) and stamped with its own `repo:<name>`; the current repo's sibling becomes a normal candidate.
148
+ - **Single-repo leaf for the current repo** → fall through to 3a (leaf-only gate) and 3b (claim).
149
+ 4. Continue until a claimable current-repo leaf is found (claim it; one per cycle) or the ready set is exhausted — exit cleanly with `"No ready issues for repo <current>. Nothing to do."`.
150
+
138
151
  #### 3a. Leaf-only claim gate (repair containers)
139
152
 
140
153
  Build intake dispatches **only independently implementable leaf work units** to the build agent. This enforces the claim-time arm of the vendor-neutral `leaf-only-lifecycle` rule: a parent/container that still carries a stale build-ready role (e.g. `status:ready` applied before this rule existed, or hand-applied to an Epic/Story) is **never dispatched** — intake moves it out of the pickup queue by replacing `$READY` with `$CLAIMED`, then posts a clear lifecycle-repair message. It is the claim-time complement to the write-time labeling in `lisa:github-write-issue` and the validate-time S15 gate in `lisa:github-validate-issue`; all three cite the same rule so the classification never drifts. **Never silently implement a container.**
@@ -69,7 +69,7 @@ draft → ready → in_review → blocked | ticketed → shipped → verified
69
69
 
70
70
  (Defaults: `prd-draft` / `prd-ready` / `prd-in-review` / `prd-blocked` / `prd-ticketed` / `prd-shipped` / `prd-verified`.)
71
71
 
72
- `verified` is the terminal state after `shipped`: it means the shipped product has been empirically checked against the PRD (set by `/lisa:verify-prd`, not by this intake skill). A failed post-ship verification reuses `blocked` rather than introducing a separate `verifying` / `verification-failed` state. Like `draft` and `shipped`, `verified` is **product-owned** — this intake skill never sets, clears, or otherwise touches it. See the "PRD-level verification vs ticket verification" section of the `prd-lifecycle-rollup` rule.
72
+ `verified` is the terminal state after `shipped`: it means the shipped product has been empirically checked against the PRD (set by `/lisa:verify-prd`, not by this intake skill). A failed post-ship verification does **not** use `blocked`; `/lisa:verify-prd` re-opens the PRD `shipped → ticketed` and creates build-ready fix tickets that auto-build and trigger a re-verify (the self-healing loop), introducing no `verifying` / `verification-failed` state. Like `draft` and `shipped`, `verified` is **product-owned** — this intake skill never sets, clears, or otherwise touches it. See the "PRD-level verification vs ticket verification" section of the `prd-lifecycle-rollup` rule.
73
73
 
74
74
  Exactly one of these labels is expected on a PRD issue at any time.
75
75
 
@@ -338,6 +338,20 @@ The set of **required** children for the all-terminal check is the top-level chi
338
338
 
339
339
  This phase only touches GitHub PRD issues. It implements exactly one PRD-lifecycle hop — `$TICKETED → $SHIPPED` — and the optional config-gated close that follows it. All terminal-state semantics, the generated-top-level-work boundary, the env-keyed `done` resolution, and the dedupe-by-child-ref idempotency come from the `prd-lifecycle-rollup` rule; this skill is its GitHub implementation, not a second source of truth.
340
340
 
341
+ #### 3g. PRD verification dispatch (close the loop on shipped PRDs)
342
+
343
+ `shipped` and `verified` are distinct facts about a PRD (see the `prd-lifecycle-rollup` rule's "PRD-level verification vs ticket verification" and "Closing the loop" sections). Rollup (3f) only reaches `$SHIPPED`; the `shipped → verified` (pass) / `shipped → ticketed` (fail) hops are owned by `/lisa:verify-prd`. This phase **closes that loop** by dispatching the initiative-level acceptance gate for shipped PRDs. It never performs the verification transition itself — the "never sets the verification outcome" invariant holds: `lisa:verify-prd`, not this skill, sets `verified` (or, on failure, re-opens the PRD to `ticketed`).
344
+
345
+ Re-query the PRDs currently carrying `$SHIPPED` via `gh issue list --repo <org>/<repo> --label "$SHIPPED" --state open`. Pick the **first** one and invoke `lisa:verify-prd <issue-url>`. Process **one shipped PRD per cycle** — `lisa:verify-prd` is a heavy full flow (spec-conformance + empirical verification + fix-issue creation), so it is bounded exactly like the single-ready-PRD claim in Phase 3; the scheduler drains the rest.
346
+
347
+ **Per-cycle combined bound:** each scheduler cycle dispatches at most one ready PRD (the Phase 3 single-ready-PRD claim) **and** at most one shipped PRD for verification (this Phase 3g dispatch), for a maximum of two PRD operations per cycle. Ready intake runs first (Phase 3), then shipped verify (Phase 3g).
348
+
349
+ `lisa:verify-prd` owns the outcome: on a CONFORMS verdict with all empirical checks passing it transitions `$SHIPPED → verified` and posts evidence; on a conformance miss or a failing/unavailable check it **re-opens the PRD `$SHIPPED → ticketed`** (never `blocked`) and creates **build-ready** fix tickets registered as the PRD's generated work, then posts a failure report — the fix tickets auto-build, rollup (3f) re-ships the PRD once they are terminal, and a later cycle re-verifies (the self-healing loop). Either branch moves the PRD out of `$SHIPPED`, so it is not re-picked this cycle; a PRD whose generated work is not actually terminal is guard-stopped by `lisa:verify-prd` (left `$SHIPPED`) — that is verify-prd's gate, not this skill's.
350
+
351
+ **`closeOnShipped` constraint:** when `github.labels.prd.rollup.closeOnShipped = true`, issues are closed immediately after reaching `$SHIPPED`. This Phase 3g query (`--state open`) will not find them, so those PRDs are permanently excluded from `lisa:verify-prd` dispatch. If PRD verification is required, set `github.labels.prd.rollup.closeOnShipped = false` (or omit it); closing on ship is an explicit opt-out of the shipped→verified verification loop.
352
+
353
+ This phase, like 3f, is **behaviorally identical across all four intake skills** (`github-prd-intake`, `linear-prd-intake`, `notion-prd-intake`, `confluence-prd-intake`) — only the `$SHIPPED` query surface differs; keep them aligned. Record the dispatched PRD + verify-prd's verdict in the summary.
354
+
341
355
  ### Phase 4 — Summary report
342
356
 
343
357
  ```text
@@ -212,6 +212,14 @@ The build-ready status label (`status:ready`) is governed by the `leaf-only-life
212
212
 
213
213
  For non-build-ready issues created fresh (Epics, Stories, and other containers), omit the status label entirely; the container's rollup state is derived, not set directly.
214
214
 
215
+ ### Build-ready control input (`build_ready`)
216
+
217
+ `build_ready` is an optional write-control input (default: **omitted**). It governs whether a **leaf** work unit is stamped with the build-ready role on create. It never overrides `leaf-only-lifecycle` — a container is never stamped build-ready regardless of `build_ready`. "Not build-ready" is not a special status: it simply means the issue is created in its natural default (a plain open issue with **no `status:ready` label**), which a human can promote later.
218
+
219
+ - **Omitted** → current behavior: a leaf work unit receives `status:ready`. Preserves what every existing caller (`lisa:plan`, the `*-to-tracker` skills) relies on.
220
+ - **`build_ready: false`** → create the leaf **without** `status:ready`, so it sits in the backlog for a human to review and promote into the queue.
221
+ - **`build_ready: true`** → ensure the leaf carries `status:ready` so `lisa:intake` / `lisa:github-build-intake` auto-picks it up.
222
+
215
223
  ## Phase 5.5 — Validate (Pre-write Gate)
216
224
 
217
225
  Before any write, invoke `lisa:github-validate-issue` with the full proposed spec assembled from Phases 2 / 3 / 4 / 5. Pass it as a YAML block per the `lisa:github-validate-issue` schema, including `runtime_behavior_change`, `authenticated_surface`, and `artifacts_attached` flags so the right gates run.
@@ -224,9 +232,9 @@ If the validator reports `FAIL`, do NOT proceed to Phase 6. Fix the spec and re-
224
232
 
225
233
  ### CREATE
226
234
 
227
- 1. Compose the body markdown from Phases 2/3/4 in a temp file (avoid quoting hell). Apply `status:ready` **only for a leaf work unit** per the Phase 5 leaf-only rule (`leaf-only-lifecycle`) — omit it for `Epic` / `Story` / `Spike` and any issue that has child work:
235
+ 1. Compose the body markdown from Phases 2/3/4 in a temp file (avoid quoting hell). Apply `status:ready` **only for a leaf work unit** per the Phase 5 leaf-only rule (`leaf-only-lifecycle`) — omit it for `Epic` / `Story` / `Spike` and any issue that has child work, **and** only when `build_ready` is not `false` (a leaf with `build_ready: false` is created without `status:ready`; see the Build-ready control input):
228
236
  ```bash
229
- # Leaf work unit (Bug / Task / Sub-task / Improvement with no children):
237
+ # Leaf work unit (Bug / Task / Sub-task / Improvement with no children), build_ready not false:
230
238
  gh issue create \
231
239
  --repo <org>/<repo> \
232
240
  --title "<summary>" \
@@ -235,8 +243,9 @@ If the validator reports `FAIL`, do NOT proceed to Phase 6. Fix the spec and re-
235
243
  [--label "component:<name>" ...] [--milestone "<milestone>"] \
236
244
  [--assignee "<login>"]
237
245
 
238
- # Container (Epic / Story / Spike / any issue with child work):
239
- # identical, but WITHOUT --label "status:ready" — its state rolls up from children.
246
+ # Container (Epic / Story / Spike / any issue with child work), OR a leaf with build_ready: false:
247
+ # identical, but WITHOUT --label "status:ready" — a container's state rolls up from children;
248
+ # a build_ready: false leaf waits in the backlog for a human to promote it.
240
249
  gh issue create \
241
250
  --repo <org>/<repo> \
242
251
  --title "<summary>" \