@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.
- package/all/copy-contents/.gitattributes +9 -0
- package/dist/core/learnings-merge-driver.d.ts +8 -0
- package/dist/core/learnings-merge-driver.d.ts.map +1 -1
- package/dist/core/learnings-merge-driver.js +17 -0
- package/dist/core/learnings-merge-driver.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +28 -2
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +5 -4
- package/plugins/lisa/.claude-plugin/plugin.json +28 -1
- package/plugins/lisa/.codex-plugin/hooks.json +27 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/withdrawn-rulings.mjs +525 -0
- package/plugins/lisa/hooks/withdrawn-rulings.sh +24 -0
- package/plugins/lisa/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/lisa/rules/reference/withdrawn-rulings.md +114 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +19 -1
- package/plugins/lisa-copilot/hooks/withdrawn-rulings.mjs +525 -0
- package/plugins/lisa-copilot/hooks/withdrawn-rulings.sh +24 -0
- package/plugins/lisa-copilot/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/lisa-copilot/rules/reference/withdrawn-rulings.md +114 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/hooks.json +10 -0
- package/plugins/lisa-cursor/hooks/withdrawn-rulings.mjs +525 -0
- package/plugins/lisa-cursor/hooks/withdrawn-rulings.sh +24 -0
- package/plugins/lisa-cursor/rules/withdrawn-rulings-reference.mdc +119 -0
- package/plugins/lisa-cursor/rules/withdrawn-rulings.mdc +74 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +27 -0
- package/plugins/src/base/hooks/withdrawn-rulings.mjs +525 -0
- package/plugins/src/base/hooks/withdrawn-rulings.sh +24 -0
- package/plugins/src/base/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/src/base/rules/reference/withdrawn-rulings.md +114 -0
- package/scripts/lib/hook-registration-audit.mjs +612 -0
- package/typescript/copy-contents/.husky/pre-push +98 -26
|
@@ -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.
|