@codyswann/lisa 2.222.2 → 2.223.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 (121) hide show
  1. package/dist/opencode/hooks-installer.d.ts.map +1 -1
  2. package/dist/opencode/hooks-installer.js +23 -2
  3. package/dist/opencode/hooks-installer.js.map +1 -1
  4. package/dist/opencode/plugin-templates/lisa-parity-safety-net.ts +43 -0
  5. package/dist/opencode/plugin-templates/parity-safety-net-heredoc.py +417 -0
  6. package/dist/opencode/plugin-templates/parity-safety-net.sh +155 -0
  7. package/dist/opencode/support-file-resolver.d.ts +8 -0
  8. package/dist/opencode/support-file-resolver.d.ts.map +1 -0
  9. package/dist/opencode/support-file-resolver.js +16 -0
  10. package/dist/opencode/support-file-resolver.js.map +1 -0
  11. package/package.json +1 -1
  12. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa/.codex-plugin/skills/lisa-github-add-journey/SKILL.md +4 -3
  15. package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +3 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-jira-add-journey/SKILL.md +4 -3
  17. package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  18. package/plugins/lisa/.codex-plugin/skills/lisa-linear-add-journey/SKILL.md +4 -3
  19. package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  20. package/plugins/lisa/hooks/parity-safety-net-heredoc.py +417 -0
  21. package/plugins/lisa/hooks/parity-safety-net.agy.sh +50 -0
  22. package/plugins/lisa/hooks/parity-safety-net.sh +33 -51
  23. package/plugins/lisa/rules/eager/verification.md +1 -1
  24. package/plugins/lisa/rules/reference/verification.md +8 -0
  25. package/plugins/lisa/skills/lisa-github-add-journey/SKILL.md +4 -3
  26. package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +3 -1
  27. package/plugins/lisa/skills/lisa-jira-add-journey/SKILL.md +4 -3
  28. package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  29. package/plugins/lisa/skills/lisa-linear-add-journey/SKILL.md +4 -3
  30. package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  31. package/plugins/lisa-agy/hooks/parity-safety-net-heredoc.py +417 -0
  32. package/plugins/lisa-agy/hooks/parity-safety-net.agy.sh +50 -0
  33. package/plugins/lisa-agy/hooks/parity-safety-net.sh +155 -0
  34. package/plugins/lisa-agy/hooks.json +13 -0
  35. package/plugins/lisa-agy/plugin.json +1 -1
  36. package/plugins/lisa-agy/skills/lisa-github-add-journey/SKILL.md +4 -3
  37. package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +3 -1
  38. package/plugins/lisa-agy/skills/lisa-jira-add-journey/SKILL.md +4 -3
  39. package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  40. package/plugins/lisa-agy/skills/lisa-linear-add-journey/SKILL.md +4 -3
  41. package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  42. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  45. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-copilot/hooks/parity-safety-net-heredoc.py +417 -0
  49. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +33 -51
  50. package/plugins/lisa-copilot/rules/eager/verification.md +1 -1
  51. package/plugins/lisa-copilot/rules/reference/verification.md +8 -0
  52. package/plugins/lisa-copilot/skills/lisa-github-add-journey/SKILL.md +4 -3
  53. package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +3 -1
  54. package/plugins/lisa-copilot/skills/lisa-jira-add-journey/SKILL.md +4 -3
  55. package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  56. package/plugins/lisa-copilot/skills/lisa-linear-add-journey/SKILL.md +4 -3
  57. package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  58. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-cursor/hooks/parity-safety-net-heredoc.py +417 -0
  60. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +33 -51
  61. package/plugins/lisa-cursor/rules/verification-reference.mdc +8 -0
  62. package/plugins/lisa-cursor/rules/verification.mdc +1 -1
  63. package/plugins/lisa-cursor/skills/lisa-github-add-journey/SKILL.md +4 -3
  64. package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +3 -1
  65. package/plugins/lisa-cursor/skills/lisa-jira-add-journey/SKILL.md +4 -3
  66. package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  67. package/plugins/lisa-cursor/skills/lisa-linear-add-journey/SKILL.md +4 -3
  68. package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  69. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-expo-agy/plugin.json +1 -1
  72. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  76. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  77. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  82. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  86. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  87. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  91. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  92. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  96. package/plugins/lisa-rails-agy/plugin.json +1 -1
  97. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  101. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  102. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  106. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  107. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  109. package/plugins/src/base/hooks/parity-safety-net-heredoc.py +417 -0
  110. package/plugins/src/base/hooks/parity-safety-net.agy.sh +50 -0
  111. package/plugins/src/base/hooks/parity-safety-net.sh +33 -51
  112. package/plugins/src/base/rules/eager/verification.md +1 -1
  113. package/plugins/src/base/rules/reference/verification.md +8 -0
  114. package/plugins/src/base/skills/lisa-github-add-journey/SKILL.md +4 -3
  115. package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +3 -1
  116. package/plugins/src/base/skills/lisa-jira-add-journey/SKILL.md +4 -3
  117. package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +3 -1
  118. package/plugins/src/base/skills/lisa-linear-add-journey/SKILL.md +4 -3
  119. package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +3 -1
  120. package/scripts/copy-opencode-plugin-templates.mjs +12 -0
  121. package/scripts/generate-agy-plugin-artifacts.mjs +24 -10
@@ -83,9 +83,10 @@ Compose the journey with typed `[EVIDENCE: <artifact-type>: <name>]` markers at
83
83
  2. **Concrete, runnable steps** — `Run \`curl -s localhost:3000/health | jq .status\`` not "Check the endpoint".
84
84
  3. **Include environment setup** — Database connection, running services, env vars.
85
85
  4. **Markers are typed artifacts, not assertion labels** — `[EVIDENCE: <artifact-type>: <kebab-name>]`. `[EVIDENCE: load-failure-handled-gracefully]` names a claim with nothing to capture; write `[EVIDENCE: screenshot: load-failure-error-state]` or `[EVIDENCE: perf-trace: pipeline-load-tti]`. Names are kebab-case and unique within the ticket.
86
- 5. **Assertions are measurable** — "Returns 200 with `{status: ok}`" not "API works correctly".
87
- 6. **Cover happy path and error path** — At minimum, one success and one failure evidence marker.
88
- 7. **On a leaf work unit, the markers are binding** — For a Bug / Task / Sub-task / Improvement, every typed `[EVIDENCE: <artifact-type>: <name>]` here is the item's evidence manifest: validation gate S14 requires at least one, and the item cannot be closed until each named artifact is captured **in its declared type** and attached (see the "Per-Work-Unit Evidence Contract" in the `verification` rule). Name only evidence you intend to capture — and name all of it.
86
+ 5. **Cross-item references are non-binding** — If the journey needs to mention another item's artifact, use `[EVIDENCE-REF: <tracker-ref>: <artifact-type>: <kebab-name>]` (for example, `[EVIDENCE-REF: ENG-123: cli-output: upstream-contract-pass]`). Do not paste a sibling item's `[EVIDENCE: ...]` marker into this item; S14 treats `[EVIDENCE: ...]` as this item's own manifest and ignores `EVIDENCE-REF`.
87
+ 6. **Assertions are measurable** — "Returns 200 with `{status: ok}`" not "API works correctly".
88
+ 7. **Cover happy path and error path** — At minimum, one success and one failure evidence marker.
89
+ 8. **On a leaf work unit, the markers are binding** — For a Bug / Task / Sub-task / Improvement, every typed `[EVIDENCE: <artifact-type>: <name>]` here is the item's evidence manifest: validation gate S14 requires at least one, and the item cannot be closed until each named artifact is captured **in its declared type** and attached (see the "Per-Work-Unit Evidence Contract" in the `verification` rule). Name only evidence you intend to capture — and name all of it; `EVIDENCE-REF` never satisfies or extends the manifest.
89
90
 
90
91
  ### Step 6: Present to User for Approval
91
92
 
@@ -209,9 +209,11 @@ Each marker must satisfy ALL of:
209
209
  - `<artifact-type>` is one of the fixed taxonomy: `screenshot`, `recording`, `http-transcript`, `cli-output`, `log-snippet`, `db-query-output`, `perf-trace`, `test-run-log`, `deploy-log`, `state-dump`. (The legacy `[SCREENSHOT: name]` form is accepted as `screenshot`.)
210
210
  - `<name>` is kebab-case and unique within the item.
211
211
 
212
+ Non-binding cross-references use `[EVIDENCE-REF: <tracker-ref>: <artifact-type>: <name>]`, where `<tracker-ref>` is the owning item or issue (`ENG-123`, `PROJ-123`, `#123`, `owner/repo#123`, or a tracker URL). S14 MUST ignore `EVIDENCE-REF` markers when deriving this item's manifest, and a valid `EVIDENCE-REF` does not satisfy the "at least one marker" requirement. Agents must use `EVIDENCE-REF` instead of quoting a sibling item's `[EVIDENCE: ...]` marker in prose.
213
+
212
214
  **A marker names an artifact, not an assertion.** An untyped marker (`[EVIDENCE: load-failure-handled-gracefully]`) is an assertion label with nothing to capture and must FAIL, with a remediation that shows the typed transformation (e.g. → `[EVIDENCE: screenshot: load-failure-error-state]`, `[EVIDENCE: perf-trace: pipeline-load-tti]`).
213
215
 
214
- FAIL when the Validation Journey is present but declares zero markers, when any marker is untyped or uses a type outside the taxonomy, or when any name is empty, duplicated, or not kebab-case. A behavior-changing work unit SHOULD declare both a success marker and an error/edge marker; a journey with only one marker passes but the remediation should recommend adding the error/edge case.
216
+ FAIL when the Validation Journey is present but declares zero binding `[EVIDENCE: ...]` markers, when any binding marker is untyped or uses a type outside the taxonomy, or when any binding name is empty, duplicated, or not kebab-case. A behavior-changing work unit SHOULD declare both a success marker and an error/edge marker; a journey with only one binding marker passes but the remediation should recommend adding the error/edge case.
215
217
 
216
218
  This gate depends on S11. It is `N/A` for containers — a **Project** (the Epic equivalent), or any item with open child work (coordination containers, not work units) — and for leaf units with `runtime_behavior_change = false` (doc-only / config-only / type-only). If S11 fails because the Validation Journey is absent, S14 also FAILs (there is no manifest to bind) with remediation pointing back to `lisa-linear-add-journey`.
217
219
 
@@ -15,6 +15,11 @@ import path from "node:path";
15
15
  const repoRoot = path.resolve(import.meta.dirname, "..");
16
16
  const sourceDir = path.join(repoRoot, "src", "opencode", "plugin-templates");
17
17
  const destDir = path.join(repoRoot, "dist", "opencode", "plugin-templates");
18
+ const canonicalHookDir = path.join(repoRoot, "plugins", "src", "base", "hooks");
19
+ const canonicalSupportFiles = [
20
+ "parity-safety-net.sh",
21
+ "parity-safety-net-heredoc.py",
22
+ ];
18
23
 
19
24
  fs.rmSync(destDir, { recursive: true, force: true });
20
25
  fs.mkdirSync(destDir, { recursive: true });
@@ -27,3 +32,10 @@ for (const entry of fs.readdirSync(sourceDir, { withFileTypes: true })) {
27
32
  const destPath = path.join(destDir, entry.name);
28
33
  fs.copyFileSync(sourcePath, destPath);
29
34
  }
35
+
36
+ for (const filename of canonicalSupportFiles) {
37
+ fs.copyFileSync(
38
+ path.join(canonicalHookDir, filename),
39
+ path.join(destDir, filename)
40
+ );
41
+ }
@@ -18,8 +18,8 @@
18
18
  * hooks.json must be at root; the command points at the absolute installed path
19
19
  * via `$HOME`). Only events agy supports map: PreToolUse / PostToolUse /
20
20
  * PreInvocation / PostInvocation / Stop. SessionStart is NOT supported, so
21
- * install-pkgs / setup-jira-cli CANNOT ship as agy hooks only block-no-verify
22
- * (PreToolUse) maps. Only the BASE plugin manifest carries the universal hooks,
21
+ * install-pkgs / setup-jira-cli CANNOT ship as agy hooks. Portable PreToolUse
22
+ * guards map through thin agy-protocol adapters. Only the BASE plugin manifest carries the universal hooks,
23
23
  * so only `lisa-agy` gets a hooks.json; stack variants emit none.
24
24
  *
25
25
  * MCP (user-global, NOT plugin-bundled): agy ignores plugin-bundled MCP and only
@@ -216,6 +216,15 @@ const AGY_PLUGIN_HOOKS = [
216
216
  event: "PreToolUse",
217
217
  matcher: "run_command",
218
218
  agyScript: "block-no-verify.agy.sh",
219
+ supportScripts: [],
220
+ },
221
+ {
222
+ sourceScript: "parity-safety-net.sh",
223
+ hookName: "lisa-parity-safety-net",
224
+ event: "PreToolUse",
225
+ matcher: "run_command",
226
+ agyScript: "parity-safety-net.agy.sh",
227
+ supportScripts: ["parity-safety-net.sh", "parity-safety-net-heredoc.py"],
219
228
  },
220
229
  ];
221
230
 
@@ -257,11 +266,13 @@ function sourceReferencesScript(sourceHooks, scriptName) {
257
266
  function emitAgyPluginHooks(srcDir, outDir, sourceHooks, installDirName) {
258
267
  const applicable = AGY_PLUGIN_HOOKS.filter(h => {
259
268
  if (!sourceReferencesScript(sourceHooks, h.sourceScript)) return false;
260
- const scriptSource = path.join(srcDir, "hooks", h.agyScript);
261
- if (!fs.existsSync(scriptSource)) {
262
- throw new Error(
263
- `Missing agy hook script for ${h.sourceScript}: ${scriptSource}`
264
- );
269
+ for (const script of [h.agyScript, ...(h.supportScripts ?? [])]) {
270
+ const scriptSource = path.join(srcDir, "hooks", script);
271
+ if (!fs.existsSync(scriptSource)) {
272
+ throw new Error(
273
+ `Missing agy hook script for ${h.sourceScript}: ${scriptSource}`
274
+ );
275
+ }
265
276
  }
266
277
  return true;
267
278
  });
@@ -293,9 +304,12 @@ function emitAgyPluginHooks(srcDir, outDir, sourceHooks, installDirName) {
293
304
  // Copy the agy-protocol scripts into the variant's hooks/ subdir.
294
305
  const hooksDir = path.join(outDir, "hooks");
295
306
  fs.mkdirSync(hooksDir, { recursive: true });
296
- for (const h of applicable) {
297
- const scriptSource = path.join(srcDir, "hooks", h.agyScript);
298
- const scriptDest = path.join(hooksDir, h.agyScript);
307
+ const scripts = new Set(
308
+ applicable.flatMap(h => [h.agyScript, ...(h.supportScripts ?? [])])
309
+ );
310
+ for (const script of scripts) {
311
+ const scriptSource = path.join(srcDir, "hooks", script);
312
+ const scriptDest = path.join(hooksDir, script);
299
313
  fs.copyFileSync(scriptSource, scriptDest);
300
314
  fs.chmodSync(scriptDest, 0o755);
301
315
  }