@codyswann/lisa 4.103.7 → 4.103.9

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 (184) hide show
  1. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +12 -13
  2. package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +4 -5
  3. package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +16 -30
  4. package/all/copy-overwrite/scripts/lisa-postinstall.mjs +4 -15
  5. package/all/deletions.json +92 -2
  6. package/dist/cli/apply.d.ts.map +1 -1
  7. package/dist/cli/apply.js +1 -22
  8. package/dist/cli/apply.js.map +1 -1
  9. package/dist/cli/refresh-hooks-cmd.d.ts.map +1 -1
  10. package/dist/cli/refresh-hooks-cmd.js +3 -8
  11. package/dist/cli/refresh-hooks-cmd.js.map +1 -1
  12. package/dist/cli/worktree-prune.d.ts.map +1 -1
  13. package/dist/cli/worktree-prune.js +2 -4
  14. package/dist/cli/worktree-prune.js.map +1 -1
  15. package/dist/codex/scripts/block-no-verify.sh +4 -5
  16. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  17. package/dist/core/lisa-owned-hash-ledger.js +8 -0
  18. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  19. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  20. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  21. package/dist/core/upstream-evidence-manifest.js +24 -71
  22. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  23. package/dist/migrations/index.d.ts +0 -1
  24. package/dist/migrations/index.d.ts.map +1 -1
  25. package/dist/migrations/index.js +0 -3
  26. package/dist/migrations/index.js.map +1 -1
  27. package/dist/migrations/prune-retired-third-party-plugins.d.ts +2 -2
  28. package/dist/migrations/prune-retired-third-party-plugins.js +2 -2
  29. package/dist/opencode/hooks-installer.d.ts.map +1 -1
  30. package/dist/opencode/hooks-installer.js +17 -4
  31. package/dist/opencode/hooks-installer.js.map +1 -1
  32. package/dist/opencode/plugin-catalog.d.ts.map +1 -1
  33. package/dist/opencode/plugin-catalog.js +0 -6
  34. package/dist/opencode/plugin-catalog.js.map +1 -1
  35. package/dist/opencode/plugin-templates/block-no-verify.sh +4 -5
  36. package/dist/opencode/plugin-templates/lisa-block-no-verify.ts +1 -1
  37. package/package.json +6 -8
  38. package/plugins/lisa/.claude-plugin/plugin.json +1 -5
  39. package/plugins/lisa/.codex-plugin/hooks.json +0 -4
  40. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa/hooks/block-direct-issue-create.sh +12 -13
  42. package/plugins/lisa/hooks/block-no-verify.agy.sh +4 -5
  43. package/plugins/lisa/hooks/block-no-verify.sh +4 -5
  44. package/plugins/lisa/hooks/block-shell-json-parsing.agy.sh +3 -3
  45. package/plugins/lisa/hooks/failure-signature-index.mjs +2 -2
  46. package/plugins/lisa/hooks/worktree-binding-guard.mjs +16 -30
  47. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +12 -13
  48. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +4 -5
  49. package/plugins/lisa-agy/hooks/block-shell-json-parsing.agy.sh +3 -3
  50. package/plugins/lisa-agy/hooks.json +0 -13
  51. package/plugins/lisa-agy/plugin.json +1 -1
  52. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  55. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  59. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -5
  60. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +12 -13
  61. package/plugins/lisa-copilot/hooks/block-no-verify.sh +4 -5
  62. package/plugins/lisa-copilot/hooks/failure-signature-index.mjs +2 -2
  63. package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +16 -30
  64. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +12 -13
  66. package/plugins/lisa-cursor/hooks/block-no-verify.sh +4 -5
  67. package/plugins/lisa-cursor/hooks/failure-signature-index.mjs +2 -2
  68. package/plugins/lisa-cursor/hooks/hooks.json +0 -4
  69. package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +16 -30
  70. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  72. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +12 -13
  73. package/plugins/lisa-devin/hooks/block-no-verify.sh +4 -5
  74. package/plugins/lisa-devin/hooks/failure-signature-index.mjs +2 -2
  75. package/plugins/lisa-devin/hooks/worktree-binding-guard.mjs +16 -30
  76. package/plugins/lisa-devin/hooks.json +0 -4
  77. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  79. package/plugins/lisa-expo-agy/plugin.json +1 -1
  80. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  84. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  86. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  87. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  91. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  93. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  94. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  98. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  100. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  101. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  105. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  107. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  108. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  112. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  114. package/plugins/lisa-rails-agy/plugin.json +1 -1
  115. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  119. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  121. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  122. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  126. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  128. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  129. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  133. package/plugins/materialized-artifacts.json +0 -2
  134. package/plugins/src/base/.claude-plugin/plugin.json +0 -4
  135. package/plugins/src/base/hooks/block-direct-issue-create.sh +12 -13
  136. package/plugins/src/base/hooks/block-no-verify.agy.sh +4 -5
  137. package/plugins/src/base/hooks/block-no-verify.sh +4 -5
  138. package/plugins/src/base/hooks/block-shell-json-parsing.agy.sh +3 -3
  139. package/plugins/src/base/hooks/failure-signature-index.mjs +2 -2
  140. package/plugins/src/base/hooks/worktree-binding-guard.mjs +16 -30
  141. package/scripts/build-plugins.sh +10 -15
  142. package/scripts/check-cwd-resolution-corpus.mjs +4 -5
  143. package/scripts/check-generated-artifact-merge-coverage.mjs +0 -7
  144. package/scripts/copy-opencode-plugin-templates.mjs +0 -1
  145. package/scripts/generate-agy-plugin-artifacts.mjs +8 -13
  146. package/scripts/install-claude-plugins.sh +7 -11
  147. package/scripts/lib/packaged-apply-driver.mjs +4 -22
  148. package/scripts/lib/shell-guard-refusal-coverage.mjs +3 -3
  149. package/scripts/materialize-copy-overwrite.mjs +2 -2
  150. package/scripts/merge-generated-artifact.mjs +3 -3
  151. package/scripts/remedy-conformance.mjs +12 -13
  152. package/scripts/two-channel-couplings.json +1 -1
  153. package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +0 -16
  154. package/dist/core/native-safety-net-retirement.d.ts +0 -13
  155. package/dist/core/native-safety-net-retirement.d.ts.map +0 -1
  156. package/dist/core/native-safety-net-retirement.js +0 -23
  157. package/dist/core/native-safety-net-retirement.js.map +0 -1
  158. package/dist/migrations/retire-native-safety-net.d.ts +0 -18
  159. package/dist/migrations/retire-native-safety-net.d.ts.map +0 -1
  160. package/dist/migrations/retire-native-safety-net.js +0 -36
  161. package/dist/migrations/retire-native-safety-net.js.map +0 -1
  162. package/dist/opencode/plugin-templates/lisa-parity-safety-net.ts +0 -4
  163. package/dist/opencode/plugin-templates/parity-safety-net.sh +0 -16
  164. package/plugins/lisa/hooks/parity-safety-net.agy.sh +0 -6
  165. package/plugins/lisa/hooks/parity-safety-net.sh +0 -16
  166. package/plugins/lisa-agy/hooks/parity-safety-net.agy.sh +0 -6
  167. package/plugins/lisa-agy/hooks/parity-safety-net.sh +0 -16
  168. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +0 -16
  169. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +0 -16
  170. package/plugins/lisa-devin/hooks/parity-safety-net.sh +0 -16
  171. package/plugins/src/base/hooks/parity-safety-net.agy.sh +0 -6
  172. package/plugins/src/base/hooks/parity-safety-net.sh +0 -13
  173. package/scripts/deployed-guard-advice.mjs +0 -637
  174. package/scripts/fixtures/native-safety-net-retirement/Dockerfile +0 -5
  175. package/scripts/fixtures/native-safety-net-retirement/invoke-opencode.mjs +0 -13
  176. package/scripts/fixtures/native-safety-net-retirement/isolated-linker.mjs +0 -101
  177. package/scripts/fixtures/native-safety-net-retirement/journey.mjs +0 -381
  178. package/scripts/fixtures/native-safety-net-retirement/probes.mjs +0 -208
  179. package/scripts/fixtures/native-safety-net-retirement/reduced-core.mjs +0 -93
  180. package/scripts/generate-retired-safety-net-manifest.mjs +0 -56
  181. package/scripts/generate-scratch-supervisor-profile.mjs +0 -75
  182. package/scripts/lib/retired-safety-net-manifest.json +0 -150
  183. package/scripts/retire-native-safety-net.mjs +0 -237
  184. package/scripts/verify-native-safety-net-retirement.mjs +0 -287
@@ -5,9 +5,9 @@
5
5
  # expects an allow/deny JSON object on stdout. The canonical hook consumes the
6
6
  # Claude Bash-hook envelope and communicates denial with exit status 2. This
7
7
  # adapter only translates protocols; all classification stays in the canonical
8
- # block-shell-json-parsing.sh beside it (same delegation pattern as
9
- # parity-safety-net.agy.sh). Fail-open on missing runtimes: unlike the
10
- # safety net, a missed nudge here risks a fragile script, not data loss.
8
+ # block-shell-json-parsing.sh beside it (same delegation pattern as the other
9
+ # *.agy.sh adapters). Fail-open on missing runtimes: a missed nudge here risks
10
+ # a fragile script, not data loss.
11
11
  set -uo pipefail
12
12
 
13
13
  allow() {
@@ -12,19 +12,6 @@
12
12
  }
13
13
  ]
14
14
  },
15
- "lisa-parity-safety-net": {
16
- "PreToolUse": [
17
- {
18
- "matcher": "run_command",
19
- "hooks": [
20
- {
21
- "type": "command",
22
- "command": "bash \"$HOME/.gemini/config/plugins/lisa/hooks/parity-safety-net.agy.sh\""
23
- }
24
- ]
25
- }
26
- ]
27
- },
28
15
  "lisa-block-shell-json-parsing": {
29
16
  "PreToolUse": [
30
17
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
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-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -90,10 +90,6 @@
90
90
  "type": "command",
91
91
  "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-no-verify.sh"
92
92
  },
93
- {
94
- "type": "command",
95
- "command": "${CLAUDE_PLUGIN_ROOT}/hooks/parity-safety-net.sh"
96
- },
97
93
  {
98
94
  "type": "command",
99
95
  "command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-shell-json-parsing.sh"
@@ -44,9 +44,9 @@
44
44
  # over stdin from the same pipeline), and the contents of any file the command
45
45
  # names. The last of those is what CodySwannGT/lisa#3484 was: the guard
46
46
  # inspected argv and nothing else, so `bash /path/create.sh` showed it two
47
- # tokens and the creation was one file away. Lisa's own `parity-safety-net.sh`
48
- # tells agents to write payloads to a file and execute the file, so complying
49
- # with Lisa's guidance produced the bypass.
47
+ # tokens and the creation was one file away. Lisa's own guidance told agents to
48
+ # write payloads to a file and execute the file, so complying with Lisa's
49
+ # guidance produced the bypass.
50
50
  #
51
51
  # That is exactly the machine-checkable content of `ready-role-filing`, and it
52
52
  # lets `lisa-github-write-issue` / `lisa-jira-write-ticket` /
@@ -854,10 +854,10 @@ GRAPHQL_CREATE = re.compile(r"createIssue|issueCreate")
854
854
  # classifier two tokens, neither of which is a tracker CLI.
855
855
  #
856
856
  # It is not an oversight that an operator had to be clever to find. Lisa's OWN
857
- # guards instruct agents into this shape: `parity-safety-net.sh` refuses
858
- # heredocs and says "write the payload to a file with the Write tool, then
859
- # execute that file directly", and `block-shell-json-parsing.sh` pushes JSON
860
- # construction into `jq` scripts. An agent complying perfectly with Lisa's
857
+ # guards instruct agents into this shape: a guard that refuses heredocs says
858
+ # "write the payload to a file with the Write tool, then execute that file
859
+ # directly", and `block-shell-json-parsing.sh` pushes JSON construction into
860
+ # `jq` scripts. An agent complying perfectly with Lisa's
861
861
  # guidance lands in the uninspected path BY DEFAULT. The guards were
862
862
  # individually reasonable and jointly self-defeating.
863
863
  #
@@ -2138,12 +2138,11 @@ def executed_operand(argv):
2138
2138
  `wc -l`, a `git grep` PATHSPEC and a test run — every one of them read-only,
2139
2139
  and one of them blocked running the tests that would have proved a fix.
2140
2140
 
2141
- `parity-safety-net.sh` already states the rule this restores, and names the
2142
- opposite as the known-wrong fix (`origin/main`, lines 337-346 and 704-705):
2143
- "Only a COMMAND POSITION can execute something. A path anywhere else is an
2144
- argument, and an argument is data." `block-no-verify.sh:495-513`
2145
- (`strip_command_prefix`) implements the same split with a fail-closed third
2146
- state. Both live in this directory; this guard was the one that declined.
2141
+ The rule this restores: "Only a COMMAND POSITION can execute something. A
2142
+ path anywhere else is an argument, and an argument is data." Following
2143
+ data is the known-wrong fix. `block-no-verify.sh` (`strip_command_prefix`)
2144
+ implements the same split with a fail-closed third state, in this same
2145
+ directory; this guard was the one that declined.
2147
2146
 
2148
2147
  NOT narrowed to shells, and NOT narrowed to an enumerated interpreter list.
2149
2148
  `file_creation` recognises a creation in any language, so `node wrapper.mjs`
@@ -804,11 +804,10 @@ def nested_shell_payload(tokens, index):
804
804
  # file away ALLOW — on bash, sh, zsh, `source`, `.`, an absolute interpreter
805
805
  # path, and behind every wrapper.
806
806
  #
807
- # THE RULE IS TAKEN FROM parity-safety-net.sh RATHER THAN INVENTED HERE: a path
808
- # is followed ONLY when the command EXECUTES it. `grep -n x nv.sh`,
809
- # `git commit -F msg.txt` and `gh pr create --body-file body.md` name a file as
810
- # DATA, and following those is the known-wrong fix that guard names by number —
811
- # it refuses ordinary reads and attributes a file's capability to a command that
807
+ # THE RULE: a path is followed ONLY when the command EXECUTES it.
808
+ # `grep -n x nv.sh`, `git commit -F msg.txt` and `gh pr create --body-file
809
+ # body.md` name a file as DATA, and following those is a known-wrong fix — it
810
+ # refuses ordinary reads and attributes a file's capability to a command that
812
811
  # merely mentions it. So COMMAND POSITION decides, never the presence of a path.
813
812
  #
814
813
  # Non-shell interpreters (`python3 x.py`, `node x.mjs`) are deliberately NOT
@@ -78,8 +78,8 @@
78
78
  * rotted, which is exactly what happened to the reference that named
79
79
  * `src/cli/doctor-learnings-merge-driver.ts` before it was renamed;
80
80
  * - an entry whose `signature` does not match its own recorded `sample` — a
81
- * regex typo silently disables an entry, the same way a malformed ERE
82
- * silently disabled a project safety rule in `parity-safety-net.sh`;
81
+ * regex typo silently disables an entry, the same way a malformed ERE can
82
+ * silently disable a shell guard's project rule;
83
83
  * - an index that resolves ZERO entries — an empty routing table is a broken
84
84
  * one, never a clean one;
85
85
  * - an entry whose `excludes` has no `counterSample` proving it excludes
@@ -379,8 +379,8 @@ function foreignTreeIn(text, bound, cwd) {
379
379
  /**
380
380
  * A `cd` target this guard cannot turn into a literal directory.
381
381
  *
382
- * Mirrors `parity-safety-net.sh`'s `follow_cd` test exactly, and the mirror is
383
- * the point: two spellings of one rule are how the guards drift.
382
+ * Contract point 3 of `tests/unit/hooks/support/cwd-resolution-corpus.json`
383
+ * spells out the same rule; keep the two in step.
384
384
  */
385
385
  const UNLITERAL_CD_TARGET = /[$`*?[{]/u;
386
386
 
@@ -471,33 +471,21 @@ function applyCd(current, target) {
471
471
  * copy of every script at the same relative path, and they differ by whatever
472
472
  * each lane is doing.
473
473
  *
474
- * ## One contract, two implementations, and why that is the honest answer
474
+ * ## A written contract, driven by a corpus
475
475
  *
476
- * `parity-safety-net.sh` answers this same question — "which file will this
477
- * command actually execute?" — in POSIX shell, where `follow_cd` mutates
478
- * file-scope state that `follow_locate` reads. This guard is Node. **There is
479
- * no call that reaches from here into a shell function's file-scope state**, so
480
- * the duplication is not a factoring somebody skipped; it is one idea that
481
- * cannot cross a language boundary as a function call.
476
+ * The resolution rule is a written contract with a corpus of adversarial rows
477
+ * this guard is driven over in CI, so a change to the resolver fails a test on
478
+ * the commit that causes it rather than surfacing later as a wrong verdict.
479
+ * Contract and corpus live in `tests/unit/hooks/support/cwd-resolution-corpus.json`
480
+ * (CodySwannGT/lisa#3952). **A behaviour with no row in the corpus is
481
+ * unpinned — add a row when you add a branch.**
482
482
  *
483
- * What binds the two is a written contract and a corpus of rows that BOTH
484
- * guards are driven over in CI, so a divergence fails a test on the commit that
485
- * causes it rather than surfacing later as a wrong verdict. Contract and corpus
486
- * live in `tests/unit/hooks/support/cwd-resolution-corpus.json`.
483
+ * ## The corpus pins the RESOLUTION, not the verdict
487
484
  *
488
- * This is explicitly NOT unification, and CodySwannGT/lisa#3952 records it as
489
- * such: two implementations remain. **A behaviour with no row in the corpus is
490
- * free to diverge — add a row when you add a branch.**
491
- *
492
- * ## The two guards agree on the RESOLUTION, not on the verdict
493
- *
494
- * When the effective directory cannot be known, both guards decline to resolve
495
- * the token. What they then do differs, and that difference is deliberate:
496
- * `parity-safety-net.sh` refuses, because a destructive command it cannot see
497
- * is the thing it exists to stop. This guard fails open, which is the doctrine
498
- * every other undecidable case in this file follows. The corpus asserts the
499
- * resolved path, not the exit code, precisely so that one contract can bind two
500
- * guards whose fail directions are correctly different.
485
+ * When the effective directory cannot be known, this guard declines to resolve
486
+ * the token and fails open, which is the doctrine every other undecidable case
487
+ * in this file follows. The corpus asserts the resolved path rather than the
488
+ * exit code, so the contract stays about resolution.
501
489
  *
502
490
  * Fails OPEN and says so, like every other undecidable case in this file.
503
491
  */
@@ -516,10 +504,8 @@ function scriptReachingForeignTree(payload, bound) {
516
504
  if (!isAbsolute(named) && cwd === null) {
517
505
  // Contract point 3: the effective directory is unknown, so WHICH copy of
518
506
  // a same-named script would run is unknown too. Declining to resolve is
519
- // the half shared with parity-safety-net.sh; failing open rather than
520
- // refusing is this guard's own doctrine, and the corpus binds the two
521
- // guards on the resolution precisely so it does not have to bind them
522
- // on a verdict one of them would be wrong to reach.
507
+ // the contract; failing open rather than refusing is this guard's own
508
+ // doctrine, and the corpus pins the resolution rather than the verdict.
523
509
  say(
524
510
  `cannot tell which directory ${named} would run from; NOT enforcing on it`
525
511
  );
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -44,9 +44,9 @@
44
44
  # over stdin from the same pipeline), and the contents of any file the command
45
45
  # names. The last of those is what CodySwannGT/lisa#3484 was: the guard
46
46
  # inspected argv and nothing else, so `bash /path/create.sh` showed it two
47
- # tokens and the creation was one file away. Lisa's own `parity-safety-net.sh`
48
- # tells agents to write payloads to a file and execute the file, so complying
49
- # with Lisa's guidance produced the bypass.
47
+ # tokens and the creation was one file away. Lisa's own guidance told agents to
48
+ # write payloads to a file and execute the file, so complying with Lisa's
49
+ # guidance produced the bypass.
50
50
  #
51
51
  # That is exactly the machine-checkable content of `ready-role-filing`, and it
52
52
  # lets `lisa-github-write-issue` / `lisa-jira-write-ticket` /
@@ -854,10 +854,10 @@ GRAPHQL_CREATE = re.compile(r"createIssue|issueCreate")
854
854
  # classifier two tokens, neither of which is a tracker CLI.
855
855
  #
856
856
  # It is not an oversight that an operator had to be clever to find. Lisa's OWN
857
- # guards instruct agents into this shape: `parity-safety-net.sh` refuses
858
- # heredocs and says "write the payload to a file with the Write tool, then
859
- # execute that file directly", and `block-shell-json-parsing.sh` pushes JSON
860
- # construction into `jq` scripts. An agent complying perfectly with Lisa's
857
+ # guards instruct agents into this shape: a guard that refuses heredocs says
858
+ # "write the payload to a file with the Write tool, then execute that file
859
+ # directly", and `block-shell-json-parsing.sh` pushes JSON construction into
860
+ # `jq` scripts. An agent complying perfectly with Lisa's
861
861
  # guidance lands in the uninspected path BY DEFAULT. The guards were
862
862
  # individually reasonable and jointly self-defeating.
863
863
  #
@@ -2138,12 +2138,11 @@ def executed_operand(argv):
2138
2138
  `wc -l`, a `git grep` PATHSPEC and a test run — every one of them read-only,
2139
2139
  and one of them blocked running the tests that would have proved a fix.
2140
2140
 
2141
- `parity-safety-net.sh` already states the rule this restores, and names the
2142
- opposite as the known-wrong fix (`origin/main`, lines 337-346 and 704-705):
2143
- "Only a COMMAND POSITION can execute something. A path anywhere else is an
2144
- argument, and an argument is data." `block-no-verify.sh:495-513`
2145
- (`strip_command_prefix`) implements the same split with a fail-closed third
2146
- state. Both live in this directory; this guard was the one that declined.
2141
+ The rule this restores: "Only a COMMAND POSITION can execute something. A
2142
+ path anywhere else is an argument, and an argument is data." Following
2143
+ data is the known-wrong fix. `block-no-verify.sh` (`strip_command_prefix`)
2144
+ implements the same split with a fail-closed third state, in this same
2145
+ directory; this guard was the one that declined.
2147
2146
 
2148
2147
  NOT narrowed to shells, and NOT narrowed to an enumerated interpreter list.
2149
2148
  `file_creation` recognises a creation in any language, so `node wrapper.mjs`
@@ -804,11 +804,10 @@ def nested_shell_payload(tokens, index):
804
804
  # file away ALLOW — on bash, sh, zsh, `source`, `.`, an absolute interpreter
805
805
  # path, and behind every wrapper.
806
806
  #
807
- # THE RULE IS TAKEN FROM parity-safety-net.sh RATHER THAN INVENTED HERE: a path
808
- # is followed ONLY when the command EXECUTES it. `grep -n x nv.sh`,
809
- # `git commit -F msg.txt` and `gh pr create --body-file body.md` name a file as
810
- # DATA, and following those is the known-wrong fix that guard names by number —
811
- # it refuses ordinary reads and attributes a file's capability to a command that
807
+ # THE RULE: a path is followed ONLY when the command EXECUTES it.
808
+ # `grep -n x nv.sh`, `git commit -F msg.txt` and `gh pr create --body-file
809
+ # body.md` name a file as DATA, and following those is a known-wrong fix — it
810
+ # refuses ordinary reads and attributes a file's capability to a command that
812
811
  # merely mentions it. So COMMAND POSITION decides, never the presence of a path.
813
812
  #
814
813
  # Non-shell interpreters (`python3 x.py`, `node x.mjs`) are deliberately NOT
@@ -78,8 +78,8 @@
78
78
  * rotted, which is exactly what happened to the reference that named
79
79
  * `src/cli/doctor-learnings-merge-driver.ts` before it was renamed;
80
80
  * - an entry whose `signature` does not match its own recorded `sample` — a
81
- * regex typo silently disables an entry, the same way a malformed ERE
82
- * silently disabled a project safety rule in `parity-safety-net.sh`;
81
+ * regex typo silently disables an entry, the same way a malformed ERE can
82
+ * silently disable a shell guard's project rule;
83
83
  * - an index that resolves ZERO entries — an empty routing table is a broken
84
84
  * one, never a clean one;
85
85
  * - an entry whose `excludes` has no `counterSample` proving it excludes
@@ -41,10 +41,6 @@
41
41
  "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-no-verify.sh",
42
42
  "matcher": "Bash"
43
43
  },
44
- {
45
- "command": "${CURSOR_PLUGIN_ROOT}/hooks/parity-safety-net.sh",
46
- "matcher": "Bash"
47
- },
48
44
  {
49
45
  "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-shell-json-parsing.sh",
50
46
  "matcher": "Bash"
@@ -379,8 +379,8 @@ function foreignTreeIn(text, bound, cwd) {
379
379
  /**
380
380
  * A `cd` target this guard cannot turn into a literal directory.
381
381
  *
382
- * Mirrors `parity-safety-net.sh`'s `follow_cd` test exactly, and the mirror is
383
- * the point: two spellings of one rule are how the guards drift.
382
+ * Contract point 3 of `tests/unit/hooks/support/cwd-resolution-corpus.json`
383
+ * spells out the same rule; keep the two in step.
384
384
  */
385
385
  const UNLITERAL_CD_TARGET = /[$`*?[{]/u;
386
386
 
@@ -471,33 +471,21 @@ function applyCd(current, target) {
471
471
  * copy of every script at the same relative path, and they differ by whatever
472
472
  * each lane is doing.
473
473
  *
474
- * ## One contract, two implementations, and why that is the honest answer
474
+ * ## A written contract, driven by a corpus
475
475
  *
476
- * `parity-safety-net.sh` answers this same question — "which file will this
477
- * command actually execute?" — in POSIX shell, where `follow_cd` mutates
478
- * file-scope state that `follow_locate` reads. This guard is Node. **There is
479
- * no call that reaches from here into a shell function's file-scope state**, so
480
- * the duplication is not a factoring somebody skipped; it is one idea that
481
- * cannot cross a language boundary as a function call.
476
+ * The resolution rule is a written contract with a corpus of adversarial rows
477
+ * this guard is driven over in CI, so a change to the resolver fails a test on
478
+ * the commit that causes it rather than surfacing later as a wrong verdict.
479
+ * Contract and corpus live in `tests/unit/hooks/support/cwd-resolution-corpus.json`
480
+ * (CodySwannGT/lisa#3952). **A behaviour with no row in the corpus is
481
+ * unpinned — add a row when you add a branch.**
482
482
  *
483
- * What binds the two is a written contract and a corpus of rows that BOTH
484
- * guards are driven over in CI, so a divergence fails a test on the commit that
485
- * causes it rather than surfacing later as a wrong verdict. Contract and corpus
486
- * live in `tests/unit/hooks/support/cwd-resolution-corpus.json`.
483
+ * ## The corpus pins the RESOLUTION, not the verdict
487
484
  *
488
- * This is explicitly NOT unification, and CodySwannGT/lisa#3952 records it as
489
- * such: two implementations remain. **A behaviour with no row in the corpus is
490
- * free to diverge — add a row when you add a branch.**
491
- *
492
- * ## The two guards agree on the RESOLUTION, not on the verdict
493
- *
494
- * When the effective directory cannot be known, both guards decline to resolve
495
- * the token. What they then do differs, and that difference is deliberate:
496
- * `parity-safety-net.sh` refuses, because a destructive command it cannot see
497
- * is the thing it exists to stop. This guard fails open, which is the doctrine
498
- * every other undecidable case in this file follows. The corpus asserts the
499
- * resolved path, not the exit code, precisely so that one contract can bind two
500
- * guards whose fail directions are correctly different.
485
+ * When the effective directory cannot be known, this guard declines to resolve
486
+ * the token and fails open, which is the doctrine every other undecidable case
487
+ * in this file follows. The corpus asserts the resolved path rather than the
488
+ * exit code, so the contract stays about resolution.
501
489
  *
502
490
  * Fails OPEN and says so, like every other undecidable case in this file.
503
491
  */
@@ -516,10 +504,8 @@ function scriptReachingForeignTree(payload, bound) {
516
504
  if (!isAbsolute(named) && cwd === null) {
517
505
  // Contract point 3: the effective directory is unknown, so WHICH copy of
518
506
  // a same-named script would run is unknown too. Declining to resolve is
519
- // the half shared with parity-safety-net.sh; failing open rather than
520
- // refusing is this guard's own doctrine, and the corpus binds the two
521
- // guards on the resolution precisely so it does not have to bind them
522
- // on a verdict one of them would be wrong to reach.
507
+ // the contract; failing open rather than refusing is this guard's own
508
+ // doctrine, and the corpus pins the resolution rather than the verdict.
523
509
  say(
524
510
  `cannot tell which directory ${named} would run from; NOT enforcing on it`
525
511
  );
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.103.7",
3
+ "version": "4.103.9",
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": "4.103.7",
3
+ "version": "4.103.9",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -44,9 +44,9 @@
44
44
  # over stdin from the same pipeline), and the contents of any file the command
45
45
  # names. The last of those is what CodySwannGT/lisa#3484 was: the guard
46
46
  # inspected argv and nothing else, so `bash /path/create.sh` showed it two
47
- # tokens and the creation was one file away. Lisa's own `parity-safety-net.sh`
48
- # tells agents to write payloads to a file and execute the file, so complying
49
- # with Lisa's guidance produced the bypass.
47
+ # tokens and the creation was one file away. Lisa's own guidance told agents to
48
+ # write payloads to a file and execute the file, so complying with Lisa's
49
+ # guidance produced the bypass.
50
50
  #
51
51
  # That is exactly the machine-checkable content of `ready-role-filing`, and it
52
52
  # lets `lisa-github-write-issue` / `lisa-jira-write-ticket` /
@@ -854,10 +854,10 @@ GRAPHQL_CREATE = re.compile(r"createIssue|issueCreate")
854
854
  # classifier two tokens, neither of which is a tracker CLI.
855
855
  #
856
856
  # It is not an oversight that an operator had to be clever to find. Lisa's OWN
857
- # guards instruct agents into this shape: `parity-safety-net.sh` refuses
858
- # heredocs and says "write the payload to a file with the Write tool, then
859
- # execute that file directly", and `block-shell-json-parsing.sh` pushes JSON
860
- # construction into `jq` scripts. An agent complying perfectly with Lisa's
857
+ # guards instruct agents into this shape: a guard that refuses heredocs says
858
+ # "write the payload to a file with the Write tool, then execute that file
859
+ # directly", and `block-shell-json-parsing.sh` pushes JSON construction into
860
+ # `jq` scripts. An agent complying perfectly with Lisa's
861
861
  # guidance lands in the uninspected path BY DEFAULT. The guards were
862
862
  # individually reasonable and jointly self-defeating.
863
863
  #
@@ -2138,12 +2138,11 @@ def executed_operand(argv):
2138
2138
  `wc -l`, a `git grep` PATHSPEC and a test run — every one of them read-only,
2139
2139
  and one of them blocked running the tests that would have proved a fix.
2140
2140
 
2141
- `parity-safety-net.sh` already states the rule this restores, and names the
2142
- opposite as the known-wrong fix (`origin/main`, lines 337-346 and 704-705):
2143
- "Only a COMMAND POSITION can execute something. A path anywhere else is an
2144
- argument, and an argument is data." `block-no-verify.sh:495-513`
2145
- (`strip_command_prefix`) implements the same split with a fail-closed third
2146
- state. Both live in this directory; this guard was the one that declined.
2141
+ The rule this restores: "Only a COMMAND POSITION can execute something. A
2142
+ path anywhere else is an argument, and an argument is data." Following
2143
+ data is the known-wrong fix. `block-no-verify.sh` (`strip_command_prefix`)
2144
+ implements the same split with a fail-closed third state, in this same
2145
+ directory; this guard was the one that declined.
2147
2146
 
2148
2147
  NOT narrowed to shells, and NOT narrowed to an enumerated interpreter list.
2149
2148
  `file_creation` recognises a creation in any language, so `node wrapper.mjs`
@@ -804,11 +804,10 @@ def nested_shell_payload(tokens, index):
804
804
  # file away ALLOW — on bash, sh, zsh, `source`, `.`, an absolute interpreter
805
805
  # path, and behind every wrapper.
806
806
  #
807
- # THE RULE IS TAKEN FROM parity-safety-net.sh RATHER THAN INVENTED HERE: a path
808
- # is followed ONLY when the command EXECUTES it. `grep -n x nv.sh`,
809
- # `git commit -F msg.txt` and `gh pr create --body-file body.md` name a file as
810
- # DATA, and following those is the known-wrong fix that guard names by number —
811
- # it refuses ordinary reads and attributes a file's capability to a command that
807
+ # THE RULE: a path is followed ONLY when the command EXECUTES it.
808
+ # `grep -n x nv.sh`, `git commit -F msg.txt` and `gh pr create --body-file
809
+ # body.md` name a file as DATA, and following those is a known-wrong fix — it
810
+ # refuses ordinary reads and attributes a file's capability to a command that
812
811
  # merely mentions it. So COMMAND POSITION decides, never the presence of a path.
813
812
  #
814
813
  # Non-shell interpreters (`python3 x.py`, `node x.mjs`) are deliberately NOT
@@ -78,8 +78,8 @@
78
78
  * rotted, which is exactly what happened to the reference that named
79
79
  * `src/cli/doctor-learnings-merge-driver.ts` before it was renamed;
80
80
  * - an entry whose `signature` does not match its own recorded `sample` — a
81
- * regex typo silently disables an entry, the same way a malformed ERE
82
- * silently disabled a project safety rule in `parity-safety-net.sh`;
81
+ * regex typo silently disables an entry, the same way a malformed ERE can
82
+ * silently disable a shell guard's project rule;
83
83
  * - an index that resolves ZERO entries — an empty routing table is a broken
84
84
  * one, never a clean one;
85
85
  * - an entry whose `excludes` has no `counterSample` proving it excludes