@codyswann/lisa 5.12.0 → 5.14.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 (237) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  3. package/dist/core/upstream-evidence-manifest.js +48 -22
  4. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  5. package/dist/strategies/merge.d.ts +1 -1
  6. package/dist/strategies/merge.d.ts.map +1 -1
  7. package/dist/strategies/merge.js +18 -8
  8. package/dist/strategies/merge.js.map +1 -1
  9. package/package.json +4 -4
  10. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa/.codex-plugin/skills/lisa-monitor/SKILL.md +1 -1
  13. package/plugins/lisa/.codex-plugin/skills/lisa-posthog-access/SKILL.md +2 -0
  14. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  15. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/SKILL.md +2 -0
  16. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  17. package/plugins/lisa/.codex-plugin/skills/lisa-ticket-triage/SKILL.md +6 -6
  18. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  19. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-create/SKILL.md +1 -0
  20. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/SKILL.md +1 -0
  21. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-journey/SKILL.md +1 -0
  22. package/plugins/lisa/agents/spec-conformance-specialist.md +1 -1
  23. package/plugins/lisa/agents/verification-specialist.md +1 -1
  24. package/plugins/lisa/hooks/inject-resolved-config.mjs +1 -0
  25. package/plugins/lisa/rules/reference/base-rules.md +10 -8
  26. package/plugins/lisa/rules/reference/config-resolution.md +28 -0
  27. package/plugins/lisa/skills/lisa-monitor/SKILL.md +1 -1
  28. package/plugins/lisa/skills/lisa-posthog-access/SKILL.md +2 -0
  29. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  30. package/plugins/lisa/skills/lisa-setup-remote-env/SKILL.md +2 -0
  31. package/plugins/lisa/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  32. package/plugins/lisa/skills/lisa-ticket-triage/SKILL.md +6 -6
  33. package/plugins/lisa/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  34. package/plugins/lisa/skills/lisa-tracker-create/SKILL.md +1 -0
  35. package/plugins/lisa/skills/lisa-tracker-evidence/SKILL.md +1 -0
  36. package/plugins/lisa/skills/lisa-tracker-journey/SKILL.md +1 -0
  37. package/plugins/lisa-agy/agents/spec-conformance-specialist.md +1 -1
  38. package/plugins/lisa-agy/agents/verification-specialist.md +1 -1
  39. package/plugins/lisa-agy/plugin.json +1 -1
  40. package/plugins/lisa-agy/skills/lisa-monitor/SKILL.md +1 -1
  41. package/plugins/lisa-agy/skills/lisa-posthog-access/SKILL.md +2 -0
  42. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  43. package/plugins/lisa-agy/skills/lisa-setup-remote-env/SKILL.md +2 -0
  44. package/plugins/lisa-agy/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  45. package/plugins/lisa-agy/skills/lisa-ticket-triage/SKILL.md +6 -6
  46. package/plugins/lisa-agy/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  47. package/plugins/lisa-agy/skills/lisa-tracker-create/SKILL.md +1 -0
  48. package/plugins/lisa-agy/skills/lisa-tracker-evidence/SKILL.md +1 -0
  49. package/plugins/lisa-agy/skills/lisa-tracker-journey/SKILL.md +1 -0
  50. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  53. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  57. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-copilot/agents/spec-conformance-specialist.agent.md +1 -1
  59. package/plugins/lisa-copilot/agents/verification-specialist.agent.md +1 -1
  60. package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +1 -0
  61. package/plugins/lisa-copilot/rules/reference/base-rules.md +10 -8
  62. package/plugins/lisa-copilot/rules/reference/config-resolution.md +28 -0
  63. package/plugins/lisa-copilot/skills/lisa-monitor/SKILL.md +1 -1
  64. package/plugins/lisa-copilot/skills/lisa-posthog-access/SKILL.md +2 -0
  65. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  66. package/plugins/lisa-copilot/skills/lisa-setup-remote-env/SKILL.md +2 -0
  67. package/plugins/lisa-copilot/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  68. package/plugins/lisa-copilot/skills/lisa-ticket-triage/SKILL.md +6 -6
  69. package/plugins/lisa-copilot/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  70. package/plugins/lisa-copilot/skills/lisa-tracker-create/SKILL.md +1 -0
  71. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/SKILL.md +1 -0
  72. package/plugins/lisa-copilot/skills/lisa-tracker-journey/SKILL.md +1 -0
  73. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-cursor/agents/spec-conformance-specialist.md +1 -1
  75. package/plugins/lisa-cursor/agents/verification-specialist.md +1 -1
  76. package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +1 -0
  77. package/plugins/lisa-cursor/rules/base-rules-reference.mdc +10 -8
  78. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +28 -0
  79. package/plugins/lisa-cursor/skills/lisa-monitor/SKILL.md +1 -1
  80. package/plugins/lisa-cursor/skills/lisa-posthog-access/SKILL.md +2 -0
  81. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  82. package/plugins/lisa-cursor/skills/lisa-setup-remote-env/SKILL.md +2 -0
  83. package/plugins/lisa-cursor/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  84. package/plugins/lisa-cursor/skills/lisa-ticket-triage/SKILL.md +6 -6
  85. package/plugins/lisa-cursor/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  86. package/plugins/lisa-cursor/skills/lisa-tracker-create/SKILL.md +1 -0
  87. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/SKILL.md +1 -0
  88. package/plugins/lisa-cursor/skills/lisa-tracker-journey/SKILL.md +1 -0
  89. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  91. package/plugins/lisa-devin/agents/spec-conformance-specialist.md +1 -1
  92. package/plugins/lisa-devin/agents/verification-specialist.md +1 -1
  93. package/plugins/lisa-devin/hooks/inject-resolved-config.mjs +1 -0
  94. package/plugins/lisa-devin/rules/reference/base-rules.md +10 -8
  95. package/plugins/lisa-devin/rules/reference/config-resolution.md +28 -0
  96. package/plugins/lisa-devin/skills/lisa-monitor/SKILL.md +1 -1
  97. package/plugins/lisa-devin/skills/lisa-posthog-access/SKILL.md +2 -0
  98. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  99. package/plugins/lisa-devin/skills/lisa-setup-remote-env/SKILL.md +2 -0
  100. package/plugins/lisa-devin/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  101. package/plugins/lisa-devin/skills/lisa-ticket-triage/SKILL.md +6 -6
  102. package/plugins/lisa-devin/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  103. package/plugins/lisa-devin/skills/lisa-tracker-create/SKILL.md +1 -0
  104. package/plugins/lisa-devin/skills/lisa-tracker-evidence/SKILL.md +1 -0
  105. package/plugins/lisa-devin/skills/lisa-tracker-journey/SKILL.md +1 -0
  106. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  108. package/plugins/lisa-expo/.codex-plugin/skills/jira-add-journey/SKILL.md +1 -1
  109. package/plugins/lisa-expo/.codex-plugin/skills/jira-create/SKILL.md +1 -1
  110. package/plugins/lisa-expo/.codex-plugin/skills/journey-guidance/SKILL.md +77 -0
  111. package/plugins/lisa-expo/.codex-plugin/skills/journey-guidance/agents/openai.yaml +4 -0
  112. package/plugins/lisa-expo/.codex-plugin/skills/ops-check-logs/SKILL.md +1 -1
  113. package/plugins/lisa-expo/.codex-plugin/skills/ops-deploy/SKILL.md +1 -1
  114. package/plugins/lisa-expo/.codex-plugin/skills/ops-monitor-errors/SKILL.md +16 -4
  115. package/plugins/lisa-expo/.codex-plugin/skills/ops-monitor-errors/agents/openai.yaml +2 -2
  116. package/plugins/lisa-expo/.codex-plugin/skills/play-store-access/SKILL.md +42 -7
  117. package/plugins/lisa-expo/agents/ops-specialist.md +3 -3
  118. package/plugins/lisa-expo/skills/jira-add-journey/SKILL.md +1 -1
  119. package/plugins/lisa-expo/skills/jira-create/SKILL.md +1 -1
  120. package/plugins/lisa-expo/skills/journey-guidance/SKILL.md +75 -0
  121. package/plugins/lisa-expo/skills/journey-guidance/agents/openai.yaml +4 -0
  122. package/plugins/lisa-expo/skills/ops-check-logs/SKILL.md +1 -1
  123. package/plugins/lisa-expo/skills/ops-deploy/SKILL.md +1 -1
  124. package/plugins/lisa-expo/skills/ops-monitor-errors/SKILL.md +15 -3
  125. package/plugins/lisa-expo/skills/ops-monitor-errors/agents/openai.yaml +2 -2
  126. package/plugins/lisa-expo/skills/play-store-access/SKILL.md +42 -7
  127. package/plugins/lisa-expo-agy/agents/ops-specialist.md +3 -3
  128. package/plugins/lisa-expo-agy/plugin.json +1 -1
  129. package/plugins/lisa-expo-agy/skills/jira-add-journey/SKILL.md +1 -1
  130. package/plugins/lisa-expo-agy/skills/jira-create/SKILL.md +1 -1
  131. package/plugins/lisa-expo-agy/skills/journey-guidance/SKILL.md +75 -0
  132. package/plugins/lisa-expo-agy/skills/ops-check-logs/SKILL.md +1 -1
  133. package/plugins/lisa-expo-agy/skills/ops-deploy/SKILL.md +1 -1
  134. package/plugins/lisa-expo-agy/skills/ops-monitor-errors/SKILL.md +15 -3
  135. package/plugins/lisa-expo-agy/skills/play-store-access/SKILL.md +42 -7
  136. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-expo-copilot/agents/ops-specialist.agent.md +3 -3
  138. package/plugins/lisa-expo-copilot/skills/jira-add-journey/SKILL.md +1 -1
  139. package/plugins/lisa-expo-copilot/skills/jira-create/SKILL.md +1 -1
  140. package/plugins/lisa-expo-copilot/skills/journey-guidance/SKILL.md +75 -0
  141. package/plugins/lisa-expo-copilot/skills/ops-check-logs/SKILL.md +1 -1
  142. package/plugins/lisa-expo-copilot/skills/ops-deploy/SKILL.md +1 -1
  143. package/plugins/lisa-expo-copilot/skills/ops-monitor-errors/SKILL.md +15 -3
  144. package/plugins/lisa-expo-copilot/skills/play-store-access/SKILL.md +42 -7
  145. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  146. package/plugins/lisa-expo-cursor/agents/ops-specialist.md +3 -3
  147. package/plugins/lisa-expo-cursor/skills/jira-add-journey/SKILL.md +1 -1
  148. package/plugins/lisa-expo-cursor/skills/jira-create/SKILL.md +1 -1
  149. package/plugins/lisa-expo-cursor/skills/journey-guidance/SKILL.md +75 -0
  150. package/plugins/lisa-expo-cursor/skills/ops-check-logs/SKILL.md +1 -1
  151. package/plugins/lisa-expo-cursor/skills/ops-deploy/SKILL.md +1 -1
  152. package/plugins/lisa-expo-cursor/skills/ops-monitor-errors/SKILL.md +15 -3
  153. package/plugins/lisa-expo-cursor/skills/play-store-access/SKILL.md +42 -7
  154. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  156. package/plugins/lisa-expo-devin/agents/ops-specialist.md +3 -3
  157. package/plugins/lisa-expo-devin/skills/jira-add-journey/SKILL.md +1 -1
  158. package/plugins/lisa-expo-devin/skills/jira-create/SKILL.md +1 -1
  159. package/plugins/lisa-expo-devin/skills/journey-guidance/SKILL.md +75 -0
  160. package/plugins/lisa-expo-devin/skills/ops-check-logs/SKILL.md +1 -1
  161. package/plugins/lisa-expo-devin/skills/ops-deploy/SKILL.md +1 -1
  162. package/plugins/lisa-expo-devin/skills/ops-monitor-errors/SKILL.md +15 -3
  163. package/plugins/lisa-expo-devin/skills/play-store-access/SKILL.md +42 -7
  164. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  165. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  166. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  167. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  172. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  173. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  174. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  175. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  176. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  178. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  180. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  181. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  185. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  186. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  187. package/plugins/lisa-rails/.codex-plugin/skills/journey-guidance/SKILL.md +39 -0
  188. package/plugins/lisa-rails/.codex-plugin/skills/journey-guidance/agents/openai.yaml +4 -0
  189. package/plugins/lisa-rails/skills/journey-guidance/SKILL.md +37 -0
  190. package/plugins/lisa-rails/skills/journey-guidance/agents/openai.yaml +4 -0
  191. package/plugins/lisa-rails-agy/plugin.json +1 -1
  192. package/plugins/lisa-rails-agy/skills/journey-guidance/SKILL.md +37 -0
  193. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  194. package/plugins/lisa-rails-copilot/skills/journey-guidance/SKILL.md +37 -0
  195. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-rails-cursor/skills/journey-guidance/SKILL.md +37 -0
  197. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  198. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  199. package/plugins/lisa-rails-devin/skills/journey-guidance/SKILL.md +37 -0
  200. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  201. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  202. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  203. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  204. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  205. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  207. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  208. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  209. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  210. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  211. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  212. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  213. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  214. package/plugins/src/base/agents/spec-conformance-specialist.md +1 -1
  215. package/plugins/src/base/agents/verification-specialist.md +1 -1
  216. package/plugins/src/base/hooks/inject-resolved-config.mjs +1 -0
  217. package/plugins/src/base/rules/reference/base-rules.md +10 -8
  218. package/plugins/src/base/rules/reference/config-resolution.md +28 -0
  219. package/plugins/src/base/skills/lisa-monitor/SKILL.md +1 -1
  220. package/plugins/src/base/skills/lisa-posthog-access/SKILL.md +2 -0
  221. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +65 -11
  222. package/plugins/src/base/skills/lisa-setup-remote-env/SKILL.md +2 -0
  223. package/plugins/src/base/skills/lisa-setup-remote-env/scripts/setup-remote-env.mjs +248 -18
  224. package/plugins/src/base/skills/lisa-ticket-triage/SKILL.md +6 -6
  225. package/plugins/src/base/skills/lisa-tracker-add-journey/SKILL.md +1 -0
  226. package/plugins/src/base/skills/lisa-tracker-create/SKILL.md +1 -0
  227. package/plugins/src/base/skills/lisa-tracker-evidence/SKILL.md +1 -0
  228. package/plugins/src/base/skills/lisa-tracker-journey/SKILL.md +1 -0
  229. package/plugins/src/expo/agents/ops-specialist.md +3 -3
  230. package/plugins/src/expo/skills/jira-add-journey/SKILL.md +1 -1
  231. package/plugins/src/expo/skills/jira-create/SKILL.md +1 -1
  232. package/plugins/src/expo/skills/journey-guidance/SKILL.md +75 -0
  233. package/plugins/src/expo/skills/ops-check-logs/SKILL.md +1 -1
  234. package/plugins/src/expo/skills/ops-deploy/SKILL.md +1 -1
  235. package/plugins/src/expo/skills/ops-monitor-errors/SKILL.md +15 -3
  236. package/plugins/src/expo/skills/play-store-access/SKILL.md +42 -7
  237. package/plugins/src/rails/skills/journey-guidance/SKILL.md +37 -0
@@ -51,21 +51,23 @@ Testing Discipline:
51
51
  - Never lower thresholds to pass a pre-push hook. Increase test coverage to make it pass.
52
52
  - Never duplicate test helper functions without appropriate lint suppression when duplication is intentional for test isolation.
53
53
 
54
- JIRA Discipline:
55
- - If working on a JIRA issue, make sure the branch you're working on references and is added to the JIRA issue.
56
- - If working on a JIRA issue, update the issue as you work through it. For example, if working on a Bug Triage, update the issue with your questions/feedback/suggestions.
57
- - When reading a JIRA issue, always read ALL comments on the ticket — not just the description. Comments contain critical context: stakeholder decisions, scope changes, blockers, triage findings from other repos, and implementation notes. Use the Atlassian MCP or first resolve the project root from `$CLAUDE_PROJECT_DIR` or `git rev-parse --show-toplevel`. When `$PROJECT_ROOT/.lisa/jira-cli/.config.yml` exists, run both `jira --config "$PROJECT_ROOT/.lisa/jira-cli/.config.yml" issue view <TICKET_ID>` and `jira --config "$PROJECT_ROOT/.lisa/jira-cli/.config.yml" issue comment list <TICKET_ID>`; the dedicated comment-list command returns the complete comment collection instead of a fixed recent-comment window. If that project config is absent, omit `--config` from both commands to use the machine's own `~/.config/.jira/.config.yml`.
58
- - When requesting clarification on a JIRA issue, post the question as a comment using ADF (Atlassian Document Format) and @mention the Reporter so they receive a notification.
59
- - When creating JIRA tickets, establish issue link relationships (e.g. "is blocked by", "blocks", "relates to", "is duplicated by") between tickets that have dependencies or logical connections. Do not leave related tickets unlinked. Relationship discovery is mandatory on every create and update — search BOTH the local git history (`git log --all --grep=<keyword>`, `git log -- <path>`) AND Jira (JQL by component, keyword, label, epic siblings) before declaring "no related work." Record the searches you ran and their outcomes in the description (or a comment) so a reviewer can see the search was real.
54
+ Tracker Discipline:
55
+ These rules apply whichever tracker the project uses — the `tracker` in `.lisa.config.json` (`jira`, `github`, or `linear`). Route the vendor mechanics through the tracker dispatch skills — `lisa-tracker-read` to read, `lisa-tracker-write` to create or edit, `lisa-tracker-sync` to post progress — rather than calling one vendor's tools from generic work. The Jira-specific commands below are the Jira case only.
56
+ - If working on a ticket, make sure the branch you're working on references it and is attached to it (`lisa-tracker-sync` posts the branch and PR links).
57
+ - If working on a ticket, update it as you work through it. For example, if working on a Bug Triage, update the ticket with your questions/feedback/suggestions.
58
+ - When reading a ticket, always read ALL comments — not just the description. Comments contain critical context: stakeholder decisions, scope changes, blockers, triage findings from other repos, and implementation notes. `lisa-tracker-read` fetches the complete comment collection for every tracker (GitHub through the paginated comments endpoint, Linear by paging `list-comments` to exhaustion) and reports when it could not read them all.
59
+ - Jira case: use the Atlassian MCP, or first resolve the project root from `$CLAUDE_PROJECT_DIR` or `git rev-parse --show-toplevel`. When `$PROJECT_ROOT/.lisa/jira-cli/.config.yml` exists, run both `jira --config "$PROJECT_ROOT/.lisa/jira-cli/.config.yml" issue view <TICKET_ID>` and `jira --config "$PROJECT_ROOT/.lisa/jira-cli/.config.yml" issue comment list <TICKET_ID>`; the dedicated comment-list command returns the complete comment collection instead of a fixed recent-comment window. If that project config is absent, omit `--config` from both commands to use the machine's own `~/.config/.jira/.config.yml`.
60
+ - When requesting clarification on a ticket, post the question as a comment and @mention the reporter (the GitHub issue author, the Linear creator, the Jira Reporter) so they receive a notification. Jira case: write the comment in ADF (Atlassian Document Format) so the mention resolves.
61
+ - When creating tickets, establish relationship links (e.g. "is blocked by", "blocks", "relates to", "is duplicated by") between tickets that have dependencies or logical connections, using the tracker's native relations — Jira issue links, GitHub sub-issues and issue references, Linear relations. Do not leave related tickets unlinked. Relationship discovery is mandatory on every create and update — search BOTH the local git history (`git log --all --grep=<keyword>`, `git log -- <path>`) AND the tracker (Jira: JQL by component, keyword, label, epic siblings; GitHub: `gh issue list --search`; Linear: issue search by keyword, label, project) before declaring "no related work." Record the searches you ran and their outcomes in the description (or a comment) so a reviewer can see the search was real.
60
62
  - Ticket scope by type: Bug, Task, and Sub-task tickets MUST be single-repo (one work unit, one repo). Epic, Spike, and Story tickets MAY span multiple repos. If a Bug/Task/Sub-task crosses repos, split it per the `repo-scope-split` rule — at PRD-decomposition time via `task-decomposition` step 1.5 (parent Story + per-repo children); at work-time (an existing ticket an agent is about to implement) via the work-time split procedure (narrow the original to one repo, spin off a sibling per additional repo cloning its metadata, link the producer→consumer dependency, then proceed). A cross-repo work unit is a decomposition error the agent fixes by splitting, not a reason to bounce the ticket to the reporter.
61
63
  - Ticket descriptions MUST contain everything an implementer needs to start work without asking the reporter. In particular:
62
64
  - **Target backend environment** (`dev` / `staging` / `prod`) when the ticket has runtime behavior. QA/product report against a deployed env; the implementer verifies locally first against that backend before CI/CD. Skip only for doc-only, config-only, type-only, test-only, or Epic tickets (the closed no-runtime reason set shared with `NO_RUNTIME_REASONS` in `scripts/lib/completion-proof-shape.mjs`).
63
65
  - **Sign-in account / credentials** when the work requires being signed in. Name the account (or the source — 1Password item, env var, seeded fixture) and the role. Omit entirely when sign-in is not required.
64
66
  - **Gherkin acceptance criteria** (Given/When/Then) so the implementer can verify behavior without guessing.
65
- - **Relationship discovery evidence** — either an issue link to a related ticket, or a documented search showing none was found (see Relationship Discovery in jira-verify).
67
+ - **Relationship discovery evidence** — either an issue link to a related ticket, or a documented search showing none was found (see Relationship Discovery in the vendor write skill `lisa-tracker-write` dispatches to).
66
68
  - Ticket metadata MUST include an **epic parent** for non-bug, non-epic tickets so every Story/Task/Sub-task is traceable to a strategic goal.
67
69
  - Pre-flight gate before starting work on any ticket: if the description is missing target backend environment (when applicable), sign-in credentials (when applicable), Gherkin acceptance criteria, epic parent (non-bug/non-epic), or relationship discovery evidence, first **draft** the authorable missing sections into the ticket as clearly-labeled assumptions (the `pre-flight-autofill` draft-then-block procedure — the agent writes spec, never code, here), then transition the ticket to Blocked, reassign to the **Reporter**, and post a **confirmation** comment asking them to confirm the drafted assumptions (not a bare "go write all this" checklist). Do not start work. This is the one place where auto-transitioning status is allowed.
68
- - When checking for associated pull requests on a JIRA issue, check the **Development panel** — not just comments or description text. The Development panel shows PRs, commits, branches, and builds linked via the GitHub-Jira integration. Query it via the dev-status API:
70
+ - When checking for associated pull requests on a ticket, check the tracker's own record of linked development work — not just comments or description text. `lisa-tracker-read` returns the linked PRs for every tracker (GitHub: PRs referenced from the issue and its `Resolves`/`Closes`/`Fixes` links; Linear: PR attachments on the issue). Jira case: check the **Development panel**, which shows PRs, commits, branches, and builds linked via the GitHub-Jira integration. Query it via the dev-status API:
69
71
  ```bash
70
72
  ISSUE_ID=$(curl -s -u "${JIRA_LOGIN}:${JIRA_API_TOKEN}" \
71
73
  "${JIRA_SERVER}/rest/api/2/issue/${TICKET_ID}?fields=id" | jq -r '.id')
@@ -270,6 +270,11 @@ fi
270
270
  "p95LatencyMs": 1000,
271
271
  "faultRatePct": 5
272
272
  }
273
+ },
274
+
275
+ "observability": {
276
+ "errorTracking": { "provider": "sentry" },
277
+ "analytics": { "provider": "posthog" }
273
278
  }
274
279
  }
275
280
  ```
@@ -652,6 +657,29 @@ Resolution order matches every other key: `$ARGUMENTS` override → `.lisa.confi
652
657
  rubric + `repo:<name>` single-repo leaves); it never fixes — the `intake` cron implements what it
653
658
  files.
654
659
 
660
+ ### Observability providers (`observability`)
661
+
662
+ Names the project's error tracker and product-analytics provider, so stack guidance follows the
663
+ project instead of assuming one. Both keys are **optional** and default to what Lisa assumed
664
+ before they existed, so existing projects need no config change. `lisa-secrets-access`'s
665
+ `validate-config.mjs` rejects any other value (local file merged over committed, as at runtime).
666
+
667
+ | Key | Required | Default | Notes |
668
+ |-----|----------|---------|-------|
669
+ | `observability.errorTracking.provider` | no | `sentry` | `sentry` \| `none` \| `other`. `sentry`: the Sentry path (`lisa-sentry-access`, the Expo `ops-monitor-errors` Sentry commands). `none`: no error tracker — error-monitoring steps report "no error tracker configured" and skip; nothing calls Sentry. `other`: a tracker Lisa has no dedicated path for — guidance discovers what the project wires and queries that, never Sentry. |
670
+ | `observability.analytics.provider` | no | `posthog` | `posthog` \| `none` \| `other`. `posthog`: product-analytics work goes through `lisa-posthog-access`. `none` / `other`: do not reach for PostHog; `other` discovers what the project wires. |
671
+
672
+ **Known gap — tool enablement is not conditional.** These keys steer guidance, not installation.
673
+ The base plugin still declares the Sentry MCP server (`plugins/src/base/.mcp.json`), and the Expo
674
+ settings template still enables the `posthog@claude-plugins-official` plugin. Plugin MCP servers
675
+ are static per plugin and the settings template is a static merge, and Lisa has no per-project
676
+ conditional for either; building one would be new apply machinery for little gain. Both are inert
677
+ when the configured provider is not theirs: guidance never calls them. To turn the Claude plugin
678
+ off, set `sentry@claude-plugins-official` or `posthog@claude-plugins-official` to `false` under
679
+ `enabledPlugins` in the project's `.claude/settings.json`; the merge keeps an explicit boolean
680
+ for these two plugins instead of re-applying the template default.
681
+ Tracked by CodySwannGT/lisa#4912.
682
+
655
683
  ### Intake assignee filter (`intake.assignee`)
656
684
 
657
685
  The optional intake assignee filter narrows **ready-item selection only**. It never assigns or
@@ -96,7 +96,7 @@ Execute the **Monitor** sub-flow as defined in the `intent-routing` reference ru
96
96
 
97
97
  - `ops-verify-health` — health endpoints
98
98
  - `ops-check-logs` — CloudWatch / browser console / device / Serverless logs
99
- - `ops-monitor-errors` — Sentry issues, error-rate spikes, regressions
99
+ - `ops-monitor-errors` — issues in the configured error tracker (`observability.errorTracking.provider`, default Sentry), error-rate spikes, regressions
100
100
  - `ops-performance` — slow queries, p99 latency, hotspots
101
101
  - `ops-browser-uat` — Playwright smoke flows against the deployed env
102
102
  - `ops-db-ops` — pending migrations, replication lag
@@ -6,6 +6,8 @@ allowed-tools: ["Bash", "Read", "Skill"]
6
6
 
7
7
  # PostHog Access: $ARGUMENTS
8
8
 
9
+ First read `observability.analytics.provider` from the `<lisa-resolved-config>` block (absent means `posthog`). When it is `none` or `other`, the project does not use PostHog: stop and say so instead of resolving a PostHog key.
10
+
9
11
  Single chokepoint for PostHog operations. Caller skills and rules MUST NOT call
10
12
  `mcp__posthog__*` tools or PostHog REST directly.
11
13
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Validate the `secrets`, `remoteEnv`, `automations`, and `sessionManager`
4
- * blocks.
3
+ * Validate the `secrets`, `remoteEnv`, `automations`, `sessionManager`, and
4
+ * `observability` blocks.
5
5
  *
6
6
  * These blocks are read by shell, by Node, and by generated workflows, so a
7
7
  * malformed one surfaces late and somewhere unhelpful — a container that fails
@@ -29,6 +29,15 @@ const IMPLEMENTED_PROVIDERS = new Set(["bitwarden", "doppler", "env"]);
29
29
  /** Providers named in the dispatch table but not yet implemented. */
30
30
  const DECLARED_PROVIDERS = new Set(["1password", "aws", "vault"]);
31
31
 
32
+ /**
33
+ * Every provider name the secrets contract recognises, implemented or declared.
34
+ * Exported so a caller that prints the name into shell can refuse anything else.
35
+ */
36
+ export const KNOWN_SECRETS_PROVIDERS = Object.freeze([
37
+ ...IMPLEMENTED_PROVIDERS,
38
+ ...DECLARED_PROVIDERS,
39
+ ]);
40
+
32
41
  /**
33
42
  * Surfaces the resolver knows.
34
43
  *
@@ -1113,6 +1122,44 @@ function validateBacklogPickup(value, operatorIds) {
1113
1122
  : [];
1114
1123
  }
1115
1124
 
1125
+ /**
1126
+ * Providers each `observability` role may name. The first entry is the
1127
+ * built-in default an absent key resolves to, which is what Lisa assumed
1128
+ * before the key existed, so an existing project changes nothing. `other`
1129
+ * means "a provider Lisa has no dedicated path for": guidance discovers what
1130
+ * the project wires instead of reaching for Sentry or PostHog.
1131
+ */
1132
+ export const OBSERVABILITY_PROVIDERS = {
1133
+ errorTracking: ["sentry", "none", "other"],
1134
+ analytics: ["posthog", "none", "other"],
1135
+ };
1136
+
1137
+ /**
1138
+ * Validate the `observability` block.
1139
+ *
1140
+ * A closed vocabulary because a typo must not silently resolve to the default
1141
+ * and send an agent to a tool the project does not have.
1142
+ * @param {unknown} block The `observability` block, possibly absent.
1143
+ * @returns {string[]} Problems found.
1144
+ */
1145
+ export function validateObservability(block) {
1146
+ if (block === undefined) return [];
1147
+ if (!isPlainObject(block)) return ["observability must be an object"];
1148
+ return Object.entries(OBSERVABILITY_PROVIDERS).flatMap(([role, allowed]) => {
1149
+ const entry = block[role];
1150
+ if (entry === undefined) return [];
1151
+ if (!isPlainObject(entry)) {
1152
+ return [`observability.${role} must be an object`];
1153
+ }
1154
+ const provider = entry.provider;
1155
+ if (provider === undefined || allowed.includes(provider)) return [];
1156
+ return [
1157
+ `observability.${role}.provider is ${JSON.stringify(provider)}; ` +
1158
+ `expected one of ${allowed.map(v => `"${v}"`).join(" | ")}`,
1159
+ ];
1160
+ });
1161
+ }
1162
+
1116
1163
  /**
1117
1164
  * Validate every block this plan introduced.
1118
1165
  * @param {object} cfg Parsed `.lisa.config.json`.
@@ -1124,6 +1171,7 @@ export function validateConfig(cfg) {
1124
1171
  ...validateRemoteEnv(cfg.remoteEnv),
1125
1172
  ...validateAutomations(cfg.automations, cfg.remoteEnv),
1126
1173
  ...validateSessionManager(cfg.sessionManager),
1174
+ ...validateObservability(cfg.observability),
1127
1175
  ];
1128
1176
  }
1129
1177
 
@@ -1173,13 +1221,17 @@ function readJsonIfPresent(file) {
1173
1221
  return existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : undefined;
1174
1222
  }
1175
1223
 
1224
+ /** Blocks the runtime reads local over committed, so validation must too. */
1225
+ const LOCAL_MERGED_BLOCKS = ["sessionManager", "observability"];
1226
+
1176
1227
  /**
1177
1228
  * Read the config this CLI validates from a project root.
1178
1229
  *
1179
- * `sessionManager` is merged local over committed (deep, per key), because
1180
- * that is how the runtime resolves it and a bad local override must fail here,
1181
- * not at runtime. Every other block is read from `.lisa.config.json` alone,
1182
- * exactly as before, so their validation is unchanged.
1230
+ * `sessionManager` and `observability` are merged local over committed (deep,
1231
+ * per key), because that is how the runtime resolves them and a bad local
1232
+ * override must fail here, not at runtime. Every other block is read from
1233
+ * `.lisa.config.json` alone, exactly as before, so their validation is
1234
+ * unchanged.
1183
1235
  * @param {string} root Project root.
1184
1236
  * @returns {Record<string, unknown> | null} Config to validate, or null when
1185
1237
  * neither file exists.
@@ -1189,11 +1241,13 @@ export function readValidationConfig(root) {
1189
1241
  const local = readJsonIfPresent(join(root, ".lisa.config.local.json"));
1190
1242
  if (committed === undefined && local === undefined) return null;
1191
1243
  const base = isPlainObject(committed) ? committed : {};
1192
- const blocks = [base.sessionManager, local?.sessionManager].filter(
1193
- isPlainObject
1244
+ const merged = Object.fromEntries(
1245
+ LOCAL_MERGED_BLOCKS.flatMap(name => {
1246
+ const blocks = [base[name], local?.[name]].filter(isPlainObject);
1247
+ return blocks.length === 0 ? [] : [[name, mergeConfigLayers(...blocks)]];
1248
+ })
1194
1249
  );
1195
- if (blocks.length === 0) return base;
1196
- return { ...base, sessionManager: mergeConfigLayers(...blocks) };
1250
+ return { ...base, ...merged };
1197
1251
  }
1198
1252
 
1199
1253
  function main() {
@@ -1209,7 +1263,7 @@ function main() {
1209
1263
  }
1210
1264
  if (!problems.length) {
1211
1265
  console.log(
1212
- "config: secrets, remoteEnv, automations and sessionManager blocks are well-formed"
1266
+ "config: secrets, remoteEnv, automations, sessionManager and observability blocks are well-formed"
1213
1267
  );
1214
1268
  return;
1215
1269
  }
@@ -92,6 +92,8 @@ A project with no lockfile is not fatal on its own — a checkout may carry the
92
92
 
93
93
  Order matters. The toolchain comes first because the secrets step needs the provider CLI it installs. The hook comes last because it is the only part that may assume everything else is ready.
94
94
 
95
+ **Which provider CLI the toolchain verifies.** Setup picks the same provider the `lisa-secrets-access` runtime will use, so it never installs a CLI the runtime ignores. An explicit `--provider=<name>` wins (operator intent); otherwise the runtime's own resolution applies: `secrets.provider` from the committed `.lisa.config.json` when a config exists (`.lisa.config.local.json` and `LISA_PROVIDER` are ignored then, as the runtime ignores them), `env` — no CLI — for a config that names none, and `LISA_PROVIDER` / `LISA_SECRETS_PROVIDER` only for a repo-less tenant with no config. Every source is checked against the known provider list (`bitwarden`, `doppler`, `env`, `1password`, `aws`, `vault`) and anything else is refused, because the name is printed into shell you paste. The repo-less setup field translates `env` to the workstation catalogue's `none`. After the `remoteEnv.tools` manifest is applied, that provider's CLI is probed and, with consent, installed through the workstation catalogue; a remote container that still lacks it fails the toolchain phase with the provider named. The emitted guidance (`--emit=…`) uses the same resolution, so it exports the configured provider rather than assuming one.
96
+
95
97
  #### Which phases run depends on the surface
96
98
 
97
99
  Not every surface runs all three here, and the reason is worth understanding before changing it.
@@ -724,6 +724,13 @@ export const SETUP_FIELD =
724
724
  'if [ -n "$ten" ]; then ' +
725
725
  'echo "No checkout; preparing tools and credentials for $ten."; ' +
726
726
  "tw=0; tt=0; ts=0; tp=0; " +
727
+ // The secrets contract calls "the environment is the provider" `env`; the
728
+ // workstation catalogue calls it `none` and rejects `env` as unknown. The
729
+ // emitted guidance exports `LISA_PROVIDER=env` for a project that names no
730
+ // provider, so the field translates it here — the shell twin of
731
+ // `workstationProviderFor`.
732
+ 'wp="${LISA_PROVIDER:-${LISA_SECRETS_PROVIDER:-bitwarden}}"; ' +
733
+ 'case "$wp" in env) wp=none;; esac; ' +
727
734
  // `--agents=none` is load-bearing, not tidiness.
728
735
  //
729
736
  // The bootstrap's default is every coding agent it knows: claude, codex,
@@ -741,8 +748,13 @@ export const SETUP_FIELD =
741
748
  //
742
749
  // The first pass installs only the provider CLI (`--tools=none`, the same
743
750
  // idiom as `--agents=none`), because that is all materialization requires.
751
+ //
752
+ // The Bitwarden fallback is NOT a vendor preference: this branch runs with no
753
+ // checkout, so no `secrets.provider` is readable, and it mirrors the
754
+ // repo-less tenant convention `lisa-secrets-access` applies at runtime. The
755
+ // emitted guidance exports LISA_PROVIDER from the operator's own config.
744
756
  `npx -y ${SELF_SPEC} workstation --install --agents=none --tools=none ` +
745
- '--provider="${LISA_PROVIDER:-${LISA_SECRETS_PROVIDER:-bitwarden}}" || tw=$?; ' +
757
+ '--provider="$wp" || tw=$?; ' +
746
758
  // Exported BEFORE the secrets phase, not after: the toolchain installs into
747
759
  // ~/.local/bin, and materialization spawns the provider CLI by name. Ordered
748
760
  // the other way it gets ENOENT on a binary that is sitting right there.
@@ -766,7 +778,7 @@ export const SETUP_FIELD =
766
778
  '[ "$tp" -eq 0 ] || echo "SETUP INCOMPLETE: could not read the tool list ' +
767
779
  'from the vault (exit $tp). Installing the full catalogue." >&2; ' +
768
780
  `npx -y ${SELF_SPEC} workstation --install --agents=none --tools="$w" ` +
769
- '--provider="${LISA_PROVIDER:-${LISA_SECRETS_PROVIDER:-bitwarden}}" || tt=$?; ' +
781
+ '--provider="$wp" || tt=$?; ' +
770
782
  '[ "$tw" -eq 0 ] && [ "$tt" -eq 0 ] || echo "SETUP INCOMPLETE: tool install ' +
771
783
  'failed (exit $tw/$tt). The session will start WITHOUT the pinned tools." >&2; ' +
772
784
  '[ "$ts" -eq 0 ] || echo "SETUP INCOMPLETE: secrets did not materialize ' +
@@ -975,8 +987,11 @@ export function pinEnvironment(environmentId, cwd = process.cwd()) {
975
987
  * placeholder — a line that would be a syntax error if pasted.
976
988
  *
977
989
  * `LISA_PROVIDER` is exported even though the field defaults it, because the
978
- * field's default is Bitwarden. A Doppler tenant that omits it gets `bws`
979
- * installed and its own CLI missing, having configured everything correctly.
990
+ * field runs with no checkout and so cannot read `secrets.provider`; its
991
+ * fallback mirrors the `lisa-secrets-access` repo-less tenant convention
992
+ * (Bitwarden). The provider printed here comes from `resolveSecretsProvider`,
993
+ * which DOES read the operator's config, so exporting it carries the
994
+ * configured choice into a session that has none.
980
995
  * @param {object} options Resolved identity and display strings.
981
996
  * @returns {string[]} Lines to include in the emitted guidance.
982
997
  */
@@ -1212,7 +1227,7 @@ export function emitContainer({
1212
1227
  " machine install the identical set:",
1213
1228
  "",
1214
1229
  " npx -y @codyswann/lisa@latest workstation --print-dockerfile \\",
1215
- ` --provider=${provider ?? "bitwarden"} > Dockerfile.lisa`,
1230
+ ` --provider=${workstationProviderFor(provider)} > Dockerfile.lisa`,
1216
1231
  " docker build -f Dockerfile.lisa -t lisa-workstation .",
1217
1232
  "",
1218
1233
  " Nothing secret belongs in it. An image layer is readable by anyone who",
@@ -1352,13 +1367,211 @@ async function detectSurface() {
1352
1367
 
1353
1368
  /**
1354
1369
  * Read the bootstrap key name, which is the one value the operator must paste.
1355
- * @param {string} [cwd] Repository root.
1356
- * @returns {string|null} The configured key name, when there is one.
1370
+ *
1371
+ * Located by the secrets runtime's own `readConfig` walk — the same file the
1372
+ * provider is resolved from — so a run from a subdirectory, or one anchored by
1373
+ * `LISA_PROJECT_DIR` / `CLAUDE_PROJECT_DIR`, cannot pair one config's provider
1374
+ * with another directory's key.
1375
+ *
1376
+ * The name is printed unquoted as `export <key>='…'` in a block the operator
1377
+ * pastes, so it must be a shell variable name and nothing else. The grammar is
1378
+ * the secrets runtime's own `ENV_KEY`, the rule it applies to every name it
1379
+ * exports. (`bootstrap-store` accepts a looser path segment, `.` and `-`
1380
+ * included; neither is a variable name, so the stricter rule is the one that
1381
+ * fits a line of shell.)
1382
+ * @param {string} [cwd] Directory to resolve the config from.
1383
+ * @param {Record<string, string|undefined>} [env] Environment, for the config anchors.
1384
+ * @returns {Promise<string|null>} The configured key name, when there is one.
1357
1385
  */
1358
- function readBootstrapKey(cwd = process.cwd()) {
1359
- const path = join(cwd, ".lisa.config.json");
1360
- if (!existsSync(path)) return null;
1361
- return JSON.parse(readFileSync(path, "utf8")).secrets?.bootstrap?.key ?? null;
1386
+ async function readBootstrapKey(cwd = process.cwd(), env = process.env) {
1387
+ const { readConfig } = await import(
1388
+ pathToFileURL(siblingScript("lisa-secrets-access", "surfaces.mjs")).href
1389
+ );
1390
+ const { configPath } = readConfig(cwd, env);
1391
+ if (!configPath) return null;
1392
+ const key = readLayer(configPath)?.secrets?.bootstrap?.key ?? null;
1393
+ if (key === null) return null;
1394
+ const { ENV_KEY } = await import(
1395
+ pathToFileURL(siblingScript("lisa-secrets-access", "providers.mjs")).href
1396
+ );
1397
+ if (typeof key === "string" && ENV_KEY.test(key)) return key;
1398
+ throw new Error(
1399
+ `secrets.bootstrap.key ${JSON.stringify(key)} in ${configPath} is not a ` +
1400
+ "valid environment variable name. Use letters, digits and underscores " +
1401
+ "only, not starting with a digit (for example BWS_ACCESS_TOKEN_acme)."
1402
+ );
1403
+ }
1404
+
1405
+ /**
1406
+ * Refuse a provider name the secrets contract does not know.
1407
+ *
1408
+ * The resolved name is printed into shell the operator pastes verbatim
1409
+ * (`export LISA_PROVIDER=…`, `-e LISA_PROVIDER=…`, `--provider=…`), so an
1410
+ * unchecked value such as `bitwarden;touch /tmp/pwn` would become a command.
1411
+ * Every source — flag, environment and config — passes through here.
1412
+ * @param {string} provider Candidate provider name.
1413
+ * @param {string} source Where it came from, for the message.
1414
+ * @param {readonly string[]} known The secrets contract's provider names.
1415
+ * @returns {string} The same name, once known to be safe.
1416
+ */
1417
+ function assertKnownProvider(provider, source, known) {
1418
+ if (known.includes(provider)) return provider;
1419
+ throw new Error(
1420
+ `"${provider}" (from the ${source}) is not a secrets provider Lisa knows. ` +
1421
+ `Set it to one of: ${known.join(", ")}.`
1422
+ );
1423
+ }
1424
+
1425
+ /**
1426
+ * Decide which secrets provider this setup run is provisioning for.
1427
+ *
1428
+ * The provider used to come from environment variables alone, falling back to
1429
+ * Bitwarden, so a project that had correctly configured `secrets.provider` was
1430
+ * still handed `bws` and told to export a Bitwarden variable. Setup now picks
1431
+ * exactly the provider the `lisa-secrets-access` runtime will use, so it never
1432
+ * installs a CLI the runtime ignores:
1433
+ *
1434
+ * 1. `--provider=<name>` on this command — explicit operator intent, the one
1435
+ * deliberate exception to "match the runtime";
1436
+ * 2. otherwise the runtime's own `readConfig`: the committed
1437
+ * `.lisa.config.json` `secrets.provider` when a config exists (the runtime
1438
+ * reads neither `.lisa.config.local.json` nor `LISA_PROVIDER` then, and
1439
+ * neither does this), `env` for a config that names none, and the
1440
+ * repo-less tenant convention (`LISA_PROVIDER` / `LISA_SECRETS_PROVIDER`
1441
+ * with a tenant set) when there is no config at all.
1442
+ *
1443
+ * Whatever the source, the name is checked against the known provider list,
1444
+ * because it is printed into shell the operator pastes.
1445
+ * @param {{argv?: string[], env?: Record<string, string|undefined>, cwd?: string}} [options] Inputs.
1446
+ * @returns {Promise<{provider: string, source: "flag"|"environment"|"config"|"default"}>} Provider and where it came from.
1447
+ */
1448
+ export async function resolveSecretsProvider({
1449
+ argv = [],
1450
+ env = process.env,
1451
+ cwd = process.cwd(),
1452
+ } = {}) {
1453
+ const { KNOWN_SECRETS_PROVIDERS: known } = await import(
1454
+ pathToFileURL(siblingScript("lisa-secrets-access", "validate-config.mjs"))
1455
+ .href
1456
+ );
1457
+ const flagged = (
1458
+ argv.find(a => a.startsWith("--provider="))?.slice("--provider=".length) ??
1459
+ ""
1460
+ ).trim();
1461
+ if (flagged) {
1462
+ return {
1463
+ provider: assertKnownProvider(flagged, "--provider flag", known),
1464
+ source: "flag",
1465
+ };
1466
+ }
1467
+
1468
+ const { readConfig } = await import(
1469
+ pathToFileURL(siblingScript("lisa-secrets-access", "surfaces.mjs")).href
1470
+ );
1471
+ const runtime = readConfig(cwd, env);
1472
+ const named = runtime.configPath
1473
+ ? readLayer(runtime.configPath)?.secrets?.provider !== undefined
1474
+ : Boolean(
1475
+ (env.LISA_PROVIDER ?? env.LISA_SECRETS_PROVIDER ?? "").trim() &&
1476
+ (env.LISA_TENANT ?? env.LISA_SECRETS_NAMESPACE ?? "").trim()
1477
+ );
1478
+ const source = !named
1479
+ ? "default"
1480
+ : runtime.configPath
1481
+ ? "config"
1482
+ : "environment";
1483
+ const label = {
1484
+ config: "secrets.provider setting in .lisa.config.json",
1485
+ environment: "LISA_PROVIDER environment variable",
1486
+ default: "runtime default",
1487
+ }[source];
1488
+ return {
1489
+ provider: assertKnownProvider(String(runtime.provider), label, known),
1490
+ source,
1491
+ };
1492
+ }
1493
+
1494
+ /**
1495
+ * Read a JSON config layer, or undefined when the file does not exist.
1496
+ * @param {string} file Absolute path.
1497
+ * @returns {unknown} Parsed contents, or undefined.
1498
+ */
1499
+ function readLayer(file) {
1500
+ return existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : undefined;
1501
+ }
1502
+
1503
+ /**
1504
+ * Translate a secrets provider name into the workstation catalogue's name.
1505
+ *
1506
+ * The two vocabularies agree on every vendor and differ on one word: the
1507
+ * secrets contract calls "the environment is the provider" `env`, and the
1508
+ * workstation catalogue calls "install no credential manager" `none`. Passing
1509
+ * `env` through made the bootstrap reject a supported configuration as an
1510
+ * unknown credential manager. A missing provider means none, never a vendor.
1511
+ * @param {string|null|undefined} provider Secrets provider name.
1512
+ * @returns {string} Workstation catalogue name.
1513
+ */
1514
+ export function workstationProviderFor(provider) {
1515
+ if (!provider || provider === "env") return "none";
1516
+ return provider;
1517
+ }
1518
+
1519
+ /**
1520
+ * Verify — and, with consent, install — the configured provider's CLI.
1521
+ *
1522
+ * The toolchain phase used to install only what `remoteEnv.tools` listed, so a
1523
+ * project whose manifest did not happen to name its provider's CLI reached the
1524
+ * secrets phase without it. The catalogue entry, probe and installer are the
1525
+ * workstation skill's own, borrowed rather than duplicated so the pins and the
1526
+ * vendor install routes cannot drift between the two.
1527
+ * @param {string} provider Secrets provider name.
1528
+ * @param {{dryRun?: boolean, consent?: boolean, deps?: object}} [options] Run mode and injected probes.
1529
+ * @returns {Promise<object>} The plan row, updated with the install outcome.
1530
+ */
1531
+ export async function ensureProviderCli(provider, options = {}) {
1532
+ // Consent defaults to NO: a caller that says nothing must not install. `main`
1533
+ // passes it explicitly — always on a remote surface, `--install-tools` locally.
1534
+ const { dryRun = false, consent = false, deps = {} } = options;
1535
+ const workstation = await import(
1536
+ pathToFileURL(siblingScript("lisa-setup-workstation", "workstation.mjs"))
1537
+ .href
1538
+ );
1539
+ const entry = workstation.resolveProvider(workstationProviderFor(provider));
1540
+ const row = workstation.planProvider(entry, deps);
1541
+ if (row.action !== "install" || dryRun || !consent) return row;
1542
+
1543
+ const installPinned =
1544
+ deps.installPinned ??
1545
+ (await (
1546
+ await import(
1547
+ pathToFileURL(siblingScript("lisa-setup-workstation", "cli.mjs")).href
1548
+ )
1549
+ ).loadPinnedInstaller()) ??
1550
+ undefined;
1551
+ return workstation.installEntry({ ...entry, name: entry.binary }, row, {
1552
+ ...deps,
1553
+ installPinned,
1554
+ });
1555
+ }
1556
+
1557
+ /**
1558
+ * Fail a remote toolchain run whose provider CLI is still missing.
1559
+ *
1560
+ * A remote container with no provider CLI cannot materialize anything, so it
1561
+ * fails here, naming the cause, rather than one phase later as a
1562
+ * missing-binary error from inside the secrets step. Locally and on a dry run
1563
+ * the plan row is only reported.
1564
+ * @param {{name: string, action: string, reason?: string}} row The provider plan row.
1565
+ * @param {{provider: string, remote: boolean, dryRun: boolean}} context Run mode.
1566
+ * @returns {void}
1567
+ */
1568
+ export function assertProviderCliReady(row, { provider, remote, dryRun }) {
1569
+ if (!remote || dryRun) return;
1570
+ if (["present", "installed"].includes(row.action)) return;
1571
+ throw new Error(
1572
+ `the configured secrets provider "${provider}" needs ${row.name}, ` +
1573
+ `which is not available: ${row.reason}`
1574
+ );
1362
1575
  }
1363
1576
 
1364
1577
  /**
@@ -1391,11 +1604,6 @@ export async function resolveEmitTarget(
1391
1604
  flag("tenant") ||
1392
1605
  (env.LISA_TENANT ?? env.LISA_SECRETS_NAMESPACE ?? "").trim() ||
1393
1606
  null;
1394
- const provider =
1395
- flag("provider") ||
1396
- (env.LISA_PROVIDER ?? env.LISA_SECRETS_PROVIDER ?? "").trim() ||
1397
- "bitwarden";
1398
-
1399
1607
  // Validated before it can reach the output, by the same rule the runtime path
1400
1608
  // applies. This one becomes `export LISA_TENANT=<value>` in a block an
1401
1609
  // operator pastes verbatim, so `my tenant` or `has$var` would emit shell that
@@ -1408,10 +1616,18 @@ export async function resolveEmitTarget(
1408
1616
  assertNamespace(tenant);
1409
1617
  }
1410
1618
 
1619
+ // The tenant is handed on as the session will see it — exported — so a run
1620
+ // with no config resolves the same default the repo-less runtime will.
1621
+ const { provider } = await resolveSecretsProvider({
1622
+ argv,
1623
+ env: tenant ? { ...env, LISA_TENANT: tenant } : env,
1624
+ cwd,
1625
+ });
1626
+
1411
1627
  // A configured key outranks the convention: a project may legitimately use a
1412
1628
  // name that is not derivable, and this command must not tell its operator to
1413
1629
  // set a different one from the one their sessions actually read.
1414
- const configured = readBootstrapKey(cwd);
1630
+ const configured = await readBootstrapKey(cwd, env);
1415
1631
  if (configured) return { tenant, provider, bootstrapKey: configured };
1416
1632
  if (!tenant) return { tenant, provider, bootstrapKey: null };
1417
1633
 
@@ -1521,10 +1737,24 @@ async function main() {
1521
1737
  // watching, and provisioning it is why the script exists. Locally the
1522
1738
  // operator opts in per run.
1523
1739
  const remote = Boolean(materializeAt);
1740
+ const consent = remote || process.argv.includes("--install-tools");
1524
1741
  applyToolchain(cfg.tools, dryRun, {
1525
1742
  surface: remote ? "remote" : "local",
1526
- consent: remote || process.argv.includes("--install-tools"),
1743
+ consent,
1527
1744
  });
1745
+ // After the manifest, so a provider CLI the project pins itself is found
1746
+ // present rather than installed twice by two different routes.
1747
+ const { provider, source } = await resolveSecretsProvider({
1748
+ argv: process.argv,
1749
+ });
1750
+ const row = await ensureProviderCli(provider, { dryRun, consent });
1751
+ console.log(
1752
+ ` provider ${provider} (from ${source}): ${row.action} — ${row.reason}`
1753
+ );
1754
+ // A remote container with no provider CLI cannot materialize anything, so
1755
+ // it fails here, naming the cause, rather than one phase later as a
1756
+ // missing-binary error from inside the secrets step.
1757
+ assertProviderCliReady(row, { provider, remote, dryRun });
1528
1758
  }
1529
1759
 
1530
1760
  if (phases.includes("secrets")) {
@@ -6,7 +6,7 @@ allowed-tools: ["Read", "Glob", "Grep", "Bash"]
6
6
 
7
7
  # Ticket Triage: $ARGUMENTS
8
8
 
9
- Perform analytical triage on the ticket. The caller MUST have run `lisa-tracker-read` (or its vendor-specific underlying skill — `lisa-jira-read-ticket` for JIRA, `lisa-github-read-issue` for GitHub) first and provided the resulting context bundle — which includes the primary ticket, all linked tickets (blocks / is blocked by / relates to / duplicates), parent (Epic in JIRA, parent sub-issue in GitHub), siblings, sub-tasks / sub-issues, and remote PR state. Do not triage from a bare ticket summary — if the bundle is missing link or parent context, stop and instruct the caller to run `/tracker-read` first.
9
+ Perform analytical triage on the ticket. The caller MUST have run `lisa-tracker-read` (or its vendor-specific underlying skill — `lisa-jira-read-ticket` for JIRA, `lisa-github-read-issue` for GitHub, `lisa-linear-read-issue` for Linear) first and provided the resulting context bundle — which includes the primary ticket, all linked tickets (blocks / is blocked by / relates to / duplicates), parent (Epic in JIRA, parent sub-issue in GitHub, parent Project or parent Issue in Linear), siblings, sub-tasks / sub-issues, and remote PR state. Do not triage from a bare ticket summary — if the bundle is missing link or parent context, stop and instruct the caller to run `/tracker-read` first.
10
10
 
11
11
  Repository name for scoped labels and comment headers: determine via `basename $(git rev-parse --show-toplevel)`.
12
12
 
@@ -14,7 +14,7 @@ Repository name for scoped labels and comment headers: determine via `basename $
14
14
 
15
15
  Before any analytical work, confirm the ticket carries the content an implementer needs to start. The caller should already have run `lisa-tracker-verify`; this phase consumes its output. If `lisa-tracker-verify` returned `FAIL` for any of the following, emit `BLOCKED` immediately with the missing-requirements list and skip to Phase 6:
16
16
 
17
- - Parent missing (Epic parent for JIRA non-bug-non-epic; parent sub-issue for GitHub non-bug-non-epic)
17
+ - Parent missing (Epic parent for JIRA non-bug-non-epic; parent sub-issue for GitHub non-bug-non-epic; parent Project — or parent Issue for a sub-Issue — for Linear non-bug-non-epic)
18
18
  - Description quality failures (no Gherkin acceptance criteria, missing audience sections)
19
19
  - Validation Journey missing on a runtime-behavior ticket
20
20
  - Target backend environment missing on a runtime-behavior ticket
@@ -23,7 +23,7 @@ Before any analytical work, confirm the ticket carries the content an implemente
23
23
 
24
24
  Single-repo scope is handled separately — see below.
25
25
 
26
- The caller (jira-agent or github-agent) is responsible for transitioning the ticket to `Blocked` (JIRA status) or relabeling to `status:blocked` (GitHub), reassigning to the **Reporter / original author**, and posting a comment listing the missing requirements. This skill only emits the verdict and the missing-requirements list.
26
+ The caller (jira-agent, github-agent, or linear-agent) is responsible for moving the ticket to the configured `blocked` lifecycle role — the `Blocked` status in JIRA, the `status:blocked` label in GitHub, the configured `blocked` workflow state in Linear — reassigning to the **Reporter / original author**, and posting a comment listing the missing requirements. This skill only emits the verdict and the missing-requirements list.
27
27
 
28
28
  **Single-repo scope is split, not blocked.** A cross-repo leaf work unit (Bug / Task / Sub-task / Improvement spanning repos) is a decomposition error the agent owns, not a terminal BLOCKED. Do not emit BLOCKED for it. The caller runs the **work-time split procedure** in the `repo-scope-split` rule (narrow the original to one repo, spin off a sibling per additional repo, link the producer→consumer dependency), then re-runs `tracker-verify` and re-enters triage on the now single-repo ticket. Only fall back to BLOCKED if the split is ambiguous (see "When to block instead of split" in that rule).
29
29
 
@@ -170,7 +170,7 @@ Evaluate the findings and produce exactly one verdict:
170
170
 
171
171
  - **`NOT_RELEVANT`** -- No relevant code was found in this repository (Phase 1). The caller should add the triage label and skip implementation in this repo.
172
172
  - **`DUPLICATE_ALREADY_FIXED`** -- This ticket duplicates canonical work whose fix is already merged/deployed and empirically confirmed present on the relevant base branch. Work MUST NOT proceed. The caller must post the triage finding, ensure the native `duplicates <canonical>` link exists when the tracker supports one, and return the structured canonical reference/evidence to build intake for terminal duplicate closeout.
173
- - **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent) MUST transition the ticket to `Blocked` and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
173
+ - **`BLOCKED`** -- Blocking conditions were found in Phase 0 (missing required description content), Phase 1.5 (open blockers, duplicate-of-open), and/or Phase 3 (ambiguities). Work MUST NOT proceed until resolved by a human. When the block is from Phase 0, the caller (jira-agent, github-agent, or linear-agent) MUST move the ticket to the configured `blocked` lifecycle role and reassign to the Reporter — not just leave it in place. For Phase 1.5 / Phase 3 blocks, post findings, add the triage label, and STOP.
174
174
  - **`PASSED_WITH_FINDINGS`** -- No ambiguities, but edge cases or verification findings were identified. Work can proceed. The caller should post findings and add the triage label.
175
175
  - **`PASSED`** -- No ambiguities, edge cases, or verification gaps found. Work can proceed. The caller should add the triage label.
176
176
 
@@ -207,8 +207,8 @@ Structure all output with clear section headers so the caller can parse and post
207
207
  ```
208
208
 
209
209
  The caller is responsible for:
210
- 1. Posting the findings as comments on the ticket (using whatever Jira mechanism is available)
210
+ 1. Posting the findings as comments on the ticket with the configured tracker's comment mechanism — the vendor agent's triage step owns it: jira-agent for JIRA, github-agent (`gh issue comment`) for GitHub, linear-agent (`lisa-linear-access`) for Linear
211
211
  2. Adding the `claude-triaged-{repo}` label to the ticket
212
- 3. If `BLOCKED` due to Phase 0 (missing required description content): transitioning the ticket to `Blocked`, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
212
+ 3. If `BLOCKED` due to Phase 0 (missing required description content): moving the ticket to the configured `blocked` lifecycle role, reassigning to the **Reporter**, posting a comment listing the missing requirements, and stopping all work.
213
213
  4. If `DUPLICATE_ALREADY_FIXED`: return the canonical ticket reference and empirical base-branch evidence to build intake so it can close the ticket as a terminal duplicate without opening a PR.
214
214
  5. If `BLOCKED` due to Phase 1.5 (open blockers, duplicate-of-open) or Phase 3 (ambiguities): stopping all work and reporting to the human; do NOT auto-transition status in these cases.