@codyswann/lisa 4.37.3 → 4.38.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 (81) hide show
  1. package/all/copy-contents/.gitattributes +9 -0
  2. package/dist/core/learnings-merge-driver.d.ts +8 -0
  3. package/dist/core/learnings-merge-driver.d.ts.map +1 -1
  4. package/dist/core/learnings-merge-driver.js +17 -0
  5. package/dist/core/learnings-merge-driver.js.map +1 -1
  6. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  7. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  8. package/dist/core/upstream-evidence-manifest.js +28 -2
  9. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  10. package/package.json +5 -4
  11. package/plugins/lisa/.claude-plugin/plugin.json +28 -1
  12. package/plugins/lisa/.codex-plugin/hooks.json +27 -0
  13. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa/hooks/withdrawn-rulings.mjs +525 -0
  15. package/plugins/lisa/hooks/withdrawn-rulings.sh +24 -0
  16. package/plugins/lisa/rules/eager/withdrawn-rulings.md +69 -0
  17. package/plugins/lisa/rules/reference/withdrawn-rulings.md +114 -0
  18. package/plugins/lisa-agy/plugin.json +1 -1
  19. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  22. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-copilot/.claude-plugin/plugin.json +19 -1
  25. package/plugins/lisa-copilot/hooks/withdrawn-rulings.mjs +525 -0
  26. package/plugins/lisa-copilot/hooks/withdrawn-rulings.sh +24 -0
  27. package/plugins/lisa-copilot/rules/eager/withdrawn-rulings.md +69 -0
  28. package/plugins/lisa-copilot/rules/reference/withdrawn-rulings.md +114 -0
  29. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cursor/hooks/hooks.json +10 -0
  31. package/plugins/lisa-cursor/hooks/withdrawn-rulings.mjs +525 -0
  32. package/plugins/lisa-cursor/hooks/withdrawn-rulings.sh +24 -0
  33. package/plugins/lisa-cursor/rules/withdrawn-rulings-reference.mdc +119 -0
  34. package/plugins/lisa-cursor/rules/withdrawn-rulings.mdc +74 -0
  35. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo-agy/plugin.json +1 -1
  38. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  53. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  58. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  62. package/plugins/lisa-rails-agy/plugin.json +1 -1
  63. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  68. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  73. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/src/base/.claude-plugin/plugin.json +27 -0
  76. package/plugins/src/base/hooks/withdrawn-rulings.mjs +525 -0
  77. package/plugins/src/base/hooks/withdrawn-rulings.sh +24 -0
  78. package/plugins/src/base/rules/eager/withdrawn-rulings.md +69 -0
  79. package/plugins/src/base/rules/reference/withdrawn-rulings.md +114 -0
  80. package/scripts/lib/hook-registration-audit.mjs +612 -0
  81. package/typescript/copy-contents/.husky/pre-push +98 -26
@@ -0,0 +1,69 @@
1
+ # Withdrawn Rulings — a Retraction Travels by the Same Mechanism as the Finding (load-bearing)
2
+
3
+ **A session is a snapshot, and nothing reaches back into it.** Rules are injected once at session
4
+ start. The plugin version a session executes is resolved once at startup. A fix merged to the
5
+ default branch is not in effect for anything already running. So guidance that is **added** after a
6
+ session starts can at least be found on disk — `settled-decisions` sends you to re-read the
7
+ instruction file at the escalation boundary. Guidance that is **withdrawn** cannot be found at all:
8
+ deleting the source is a push, and a push reaches no existing reader.
9
+
10
+ The result is one-directional propagation. **New guidance travels; corrections do not.**
11
+
12
+ ## The test for any correction
13
+
14
+ > Through which channel did the original claim reach its audience, and has the withdrawal gone
15
+ > through that same channel?
16
+
17
+ - Written to a durable file → the retraction is written to that file.
18
+ - Posted as a work-item comment → edit the original comment, do not only append. A reader who
19
+ arrives later and forms a conclusion never scrolls to the reply.
20
+ - Relayed in a message → it reaches the same recipients, which requires knowing who they were.
21
+ You usually do not, which is why the ledger below exists.
22
+
23
+ ## Mandatory
24
+
25
+ - **Record every withdrawal in the ledger, with one command.** Retracting a claim you circulated,
26
+ wrote down, or published is not done until this has run:
27
+
28
+ ```
29
+ node "$CLAUDE_PLUGIN_ROOT/hooks/withdrawn-rulings.mjs" --withdraw <id> \
30
+ --claim "<the withdrawn claim, verbatim>" \
31
+ --because "<what disproved it>" \
32
+ [--superseded-by <id>] [--reached <channel> ...]
33
+ ```
34
+
35
+ The verbatim claim is required and the command refuses without it: **a tombstone the holder of the
36
+ claim cannot recognise reaches them without reaching them.**
37
+
38
+ - **The ledger is the retraction path, precisely because it is cheap.** Writing a finding feels
39
+ productive; writing a retraction is a chore produced mid-task, after being corrected, when
40
+ attention has moved on. A rule saying "always record retractions durably" is a discipline, and
41
+ disciplines do not reach that moment. One command does.
42
+
43
+ - **Check it at the escalation boundary**, alongside the instruction-file re-read
44
+ `settled-decisions` already requires: `node "$CLAUDE_PLUGIN_ROOT/hooks/withdrawn-rulings.mjs"
45
+ --list`. This is what harnesses with no PostToolUse hook rely on.
46
+
47
+ - **Verify before propagating.** Every retraction is a claim that was relayed before it was checked.
48
+ Relaying a finding makes you a publisher of it, and a publisher owes the correction.
49
+
50
+ ## What arrives on its own
51
+
52
+ On Claude Code the ledger is read for you: it is stamped at session start and re-checked after every
53
+ tool call, so a ruling withdrawn **while you are running** arrives attached to your next tool result
54
+ — naming the claim, why it fell, and what replaced it. Two `stat` calls when nothing changed.
55
+
56
+ It announces only what was withdrawn **since this session started**, and only once each. An
57
+ un-withdrawn ruling is never flagged; a mechanism that made you distrust everything would be worse
58
+ than the gap it closes.
59
+
60
+ ## The failure mode that makes this urgent
61
+
62
+ **A technique that never works can still look like it worked**, because the condition it was
63
+ supposed to create arrives later on its own. That is worse than intermittency: an intermittent
64
+ technique has a success rate an observer can become suspicious of; this has none, only a delayed
65
+ coincidence that reads as confirmation. Such a claim will not retract itself, and everyone holding
66
+ it believes they have seen it succeed.
67
+
68
+ Full prose, the two measured instances, and the ledger's two tiers:
69
+ [reference/withdrawn-rulings.md](../reference/withdrawn-rulings.md).
@@ -0,0 +1,114 @@
1
+ # Withdrawn Rulings — reference
2
+
3
+ Long-form body for the eager rule `withdrawn-rulings`. Origin: CodySwannGT/lisa#3752.
4
+
5
+ ## The general property
6
+
7
+ A session is a snapshot. Three independent instances of it were measured on one day:
8
+
9
+ 1. **Plugin version.** A session executes the plugin cache directory resolved *when the session
10
+ started*. A session roughly eleven hours old was running one version while the default branch and
11
+ the marketplace clone were two releases ahead — with the newer version already sitting in that
12
+ cache. Not a distribution failure: updating the cache does not help a running session, only a
13
+ restart re-resolves. That session reported an already-fixed defect as live, persuasively, because
14
+ it really had observed the behaviour. It was reporting the truth about a stale binary.
15
+ 2. **Rules injection.** The rule injector reads `rules/eager/*.md` and concatenates them into
16
+ context at SessionStart and SubagentStart. No metadata, no expiry, no filter — a rule withdrawn
17
+ upstream stays in the context of every session that started before the withdrawal, for that
18
+ session's whole life.
19
+ 3. **Shipped versus in effect.** A fix merged to the default branch is not in effect for any session
20
+ already running.
21
+
22
+ **A fix has two facts behind it: that it exists, and that it is in effect.** Testing either one and
23
+ reporting "fixed" is the error. Two agents made opposite halves of that mistake in a single evening,
24
+ neither carelessly, each holding a real measurement.
25
+
26
+ ## The two instances that produced this rule
27
+
28
+ **A correction that was itself wrong, published.** A claim was refuted with specific file-and-line
29
+ evidence. The refutation was propagated to two agents and into a public work-item comment before a
30
+ third agent, reading the source directly, established that the original claim was right and the
31
+ refutation had been produced by grepping a stale checkout. The wrong correction stood for roughly
32
+ forty minutes. Anyone who read that item in the interval holds the wrong version and has no signal
33
+ it changed — the retraction is a later comment, which a reader who has already formed a conclusion
34
+ will not necessarily see.
35
+
36
+ **A workaround circulated, then retracted.** A technique was recommended to three agents, then
37
+ disproved by measurement and withdrawn. The three had no mechanism to learn it was withdrawn.
38
+
39
+ And the technique had **zero observed successes but still read as having worked**: the agent
40
+ performed it, the very next operation was refused, it worked around the failure by other means, and
41
+ later the condition the technique was supposed to create arrived on its own for unrelated reasons.
42
+ Nothing about that sequence looks like a failure from outside.
43
+
44
+ ## Why durable memory is the worst case
45
+
46
+ A superseded finding survives longest exactly where it was best recorded. A claim made in passing
47
+ decays with the conversation; a claim written to a memory file persists and is re-read
48
+ authoritatively by future sessions. **The more responsibly a finding was captured, the more durable
49
+ its error becomes** — and the retraction, being conversational, decays while the claim does not.
50
+
51
+ ## What makes this hard
52
+
53
+ - **A session cannot detect that its own context is stale.** Context completeness is not observable
54
+ from inside. Any fix that asks an agent to assess its own context is the trap, not the remedy.
55
+ - **A retraction is usually not written to any canonical surface.** It is a reply, produced under
56
+ exactly the conditions least likely to bear a chore.
57
+ - **The audience is not enumerable.** Whoever received the original may have relayed it onward, and
58
+ a session that has gone quiet is unreachable by any message.
59
+
60
+ The third point is why the mechanism is a **re-check by the reader**, not a broadcast by the
61
+ publisher. The publisher records once; every live session re-checks on its own.
62
+
63
+ ## The ledger's two tiers
64
+
65
+ | tier | path | who it reaches |
66
+ |---|---|---|
67
+ | repository | `.lisa/WITHDRAWN.jsonl` (committed, union-merged) | every future reader of this project, forever |
68
+ | machine | `${LISA_STATE_HOME:-~/.lisa}/withdrawn-rulings.jsonl` | sibling sessions in **other worktrees on this machine, now** |
69
+
70
+ A withdrawal is written to both by one command; reads are the union, de-duplicated by id. The
71
+ machine tier exists because a committed file cannot reach a sibling agent until it is merged and
72
+ pulled, and the audience that needs the retraction soonest is the one working beside you.
73
+
74
+ JSONL rather than prose: each line is independent, so concurrent appends from many agents do not
75
+ collide and `merge=union` reconstructs the union exactly. A prose ledger would need a bespoke merge
76
+ driver to survive the same traffic.
77
+
78
+ ## How a running session is reached
79
+
80
+ `--session-start` stamps a per-session mark recording the ids the session was born already knowing.
81
+ `--hook` runs after every tool result and announces exactly the entries that appeared **since**,
82
+ once each.
83
+
84
+ The common case is the cheap case: when neither ledger's `size:mtime` has moved, `--hook` returns
85
+ after two `stat` calls without parsing anything. It fires on every tool call in every session and
86
+ every subagent, so anything expensive multiplies.
87
+
88
+ A **missing mark is deliberately silent**. A session with no mark is one whose starting knowledge is
89
+ unknown; announcing every historical withdrawal to it would degrade the mechanism into distrusting
90
+ everything, which is the failure the control case in #3752 exists to prevent.
91
+
92
+ ## Surface parity
93
+
94
+ | surface | session stamp | mid-session announcement | `--list` at the escalation boundary |
95
+ |---|---|---|---|
96
+ | Claude Code | yes — SessionStart and SubagentStart | yes — PostToolUse | yes |
97
+ | Codex | yes, interactive only | yes, interactive only | yes |
98
+ | Cursor | yes — both start events | yes | yes |
99
+ | Copilot | main sessions only — it has no subagent-start event, so a Copilot subagent is stamp-less and therefore silent | yes — `postToolUse` | yes |
100
+ | Antigravity | no — its plugin ships blocking `PreToolUse` guards only, and headless hooks do not fire | no | yes |
101
+ | OpenCode | no — it has no plugin hook runtime, only rules and skills | no | yes |
102
+
103
+ Where a surface cannot carry the automatic half, the eager rule's `--list` instruction is the
104
+ carried half: it is the same pointer shape #3592 shipped, which survives precisely because it does
105
+ not travel inside the thing it points at. `codex exec` runs no plugin hooks at all, so on that
106
+ surface the ledger is a read the agent performs, not one performed for it. Antigravity and OpenCode
107
+ are the same shape, permanently rather than per-invocation: neither carries a session-lifecycle hook
108
+ today, which is the identical accommodation `failure-signature-index` makes on those two surfaces.
109
+
110
+ ## What deliberately does not belong here
111
+
112
+ A disagreement that has not been settled. The ledger is for a claim its own author has **withdrawn**
113
+ — not for a claim someone doubts. A tombstone for a live dispute converts the ledger into an
114
+ argument, and an argument is not something a session can act on in one line.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
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.37.3",
3
+ "version": "4.38.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -44,6 +44,15 @@
44
44
  "command": "${CLAUDE_PLUGIN_ROOT}/hooks/threshold-ratchet.sh"
45
45
  }
46
46
  ]
47
+ },
48
+ {
49
+ "matcher": "Bash|Edit|Write|Read|Task|Grep|Glob",
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/withdrawn-rulings.sh --hook"
54
+ }
55
+ ]
47
56
  }
48
57
  ],
49
58
  "preToolUse": [
@@ -129,6 +138,15 @@
129
138
  }
130
139
  ]
131
140
  },
141
+ {
142
+ "matcher": "",
143
+ "hooks": [
144
+ {
145
+ "type": "command",
146
+ "command": "${CLAUDE_PLUGIN_ROOT}/hooks/withdrawn-rulings.sh --session-start"
147
+ }
148
+ ]
149
+ },
132
150
  {
133
151
  "matcher": "",
134
152
  "hooks": [