@codyswann/lisa 4.37.2 → 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/all/copy-contents/gitignore +6 -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/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +4 -0
- package/dist/core/lisa-owned-hash-ledger.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 +64 -11
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +6 -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/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +30 -2
- package/plugins/lisa/hooks/inject-resolved-config.mjs +26 -7
- package/plugins/lisa/hooks/withdrawn-rulings.mjs +525 -0
- package/plugins/lisa/hooks/withdrawn-rulings.sh +24 -0
- package/plugins/lisa/rules/eager/config-resolution.md +3 -1
- package/plugins/lisa/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/lisa/rules/reference/config-resolution.md +1 -1
- package/plugins/lisa/rules/reference/withdrawn-rulings.md +114 -0
- package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +120 -3
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +30 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +120 -3
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +30 -2
- 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/inject-resolved-config.mjs +26 -7
- 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/config-resolution.md +3 -1
- package/plugins/lisa-copilot/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -1
- package/plugins/lisa-copilot/rules/reference/withdrawn-rulings.md +114 -0
- package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +120 -3
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +30 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/hooks.json +10 -0
- package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +26 -7
- 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/config-resolution-reference.mdc +1 -1
- package/plugins/lisa-cursor/rules/config-resolution.mdc +3 -1
- package/plugins/lisa-cursor/rules/withdrawn-rulings-reference.mdc +119 -0
- package/plugins/lisa-cursor/rules/withdrawn-rulings.mdc +74 -0
- package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +120 -3
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +30 -2
- 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/inject-resolved-config.mjs +26 -7
- 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/config-resolution.md +3 -1
- package/plugins/src/base/rules/eager/withdrawn-rulings.md +69 -0
- package/plugins/src/base/rules/reference/config-resolution.md +1 -1
- package/plugins/src/base/rules/reference/withdrawn-rulings.md +114 -0
- package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +120 -3
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +30 -2
- package/scripts/lib/hook-registration-audit.mjs +612 -0
- package/scripts/measure-tmpdir-growth.mjs +925 -0
- package/typescript/copy-contents/.husky/pre-push +98 -26
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Config Resolution (load-bearing)
|
|
2
2
|
|
|
3
|
-
**The resolved configuration is already in your context.** `inject-resolved-config.sh` runs at every session and subagent start and injects the EFFECTIVE values — `.lisa.config.local.json` already merged over `.lisa.config.json` — inside a `<lisa-resolved-config>` block,
|
|
3
|
+
**The resolved configuration is already in your context.** `inject-resolved-config.sh` runs at every session and subagent start and injects the EFFECTIVE values — `.lisa.config.local.json` already merged over `.lisa.config.json` — inside a `<lisa-resolved-config>` block, which **names the directory it resolved for** and marks anything that is a Lisa built-in rather than something that directory declared. Read the values there and act on them, and do not act against them.
|
|
4
|
+
|
|
5
|
+
They are resolved for **that working directory only**. For work in it, do not re-derive them from the files — that is the saving this block exists for. If your work targets a **different** repository, the block does not describe it: read that repository's config instead. A block with no name on it is how six agent cycles acted on one repository's settings while doing another's work.
|
|
4
6
|
|
|
5
7
|
That block replaces the paragraph that used to sit here saying where configuration lives and which file wins. Restating it is what nine eager rules were already doing while agents acted against a config they never opened; if the block is ever missing, the two files are the source and the local one wins where they overlap.
|
|
6
8
|
|
|
@@ -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).
|
|
@@ -505,7 +505,7 @@ Resolution keys:
|
|
|
505
505
|
- Linear: `linear.labels.build.human_needed` (default `human-needed`). Applied as a Linear **label**, for the same reason as JIRA — an Issue holds exactly one workflow state but any number of labels, so an additive marker cannot be a state. The `blocked` **state** still drives the lifecycle; `human_needed` is the marker on top of it. This is the only build-lane key left in `linear.labels`.
|
|
506
506
|
- `spec_defect` resolves the same way on each vendor — `jira.labels.spec_defect` (default `Spec Defect`), `github.labels.build.spec_defect` and `linear.labels.build.spec_defect` (default `blocked:spec-defect`).
|
|
507
507
|
|
|
508
|
-
**When to apply it.**
|
|
508
|
+
**When to apply it.** There are two application sites. The first is **at filing**: a leaf filed with a `human_gate` reason under `ready-role-filing` carries the `[lisa-human-gate]` body marker *and* this label, so the hold is legible to a path that reads bodies and to a path that reads labels alike. Such an item sits in no lifecycle role at all rather than in `blocked`, which is the one case where this marker stands beside no role — and it is deliberate: a hold recorded on only one surface is a half-armed gate, and the label-keyed sweeps promoted exactly that population into the build queue (#3805). The second site is a **block a human must clear**: apply `human_needed` only when a human must act before the item can move — the pre-flight gate failures that bounce a ticket back to its reporter are exactly this case, but **only after** the agent has run the `pre-flight-autofill` draft-then-block procedure (drafting the authorable gaps — acceptance criteria, validation journey, repository, relationship search, etc. — into the ticket as labeled assumptions). What then remains for the human is to **confirm those assumptions** or supply a genuinely human-only input (real missing credentials, an irreducible product/scoping decision). The marker means "a human must confirm or decide," not "a human must author from scratch."
|
|
509
509
|
|
|
510
510
|
**Why `spec_defect` is separate from `human_needed`.** Both name a hold a person must clear, but they are different asks and the rollup must not merge them. `human_needed` waits on an input from *outside* the item — a credential, an access grant, a product decision — and the item's own text is fine. `spec_defect` waits on the item's text being *rewritten*, and no external event will ever supply that. An item carrying `spec_defect` will sit forever until somebody edits it; that is exactly the class that accumulated silently when the rollup rendered both as plain `blocked` (issue #3045: 32 identical hold comments over six weeks on one Epic). Where both markers are present, `spec_defect` wins — it is the more specific record, and the only one carrying a judgment nothing else can supply.
|
|
511
511
|
|
|
@@ -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.
|
|
@@ -38,10 +38,20 @@ function normalizeLabels(labels) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* Whether an item is held for a person, on either surface.
|
|
42
|
+
*
|
|
43
|
+
* Exported deliberately, and it is the ONLY answer to that question anywhere in
|
|
44
|
+
* the intake machinery. Every selection and promotion path calls this rather
|
|
45
|
+
* than inspecting labels itself, because the label surface alone is a partial
|
|
46
|
+
* answer: the vendor writers stamp the body marker on a deliberate hold, so an
|
|
47
|
+
* item held exactly as the filing contract instructs carries no label at all.
|
|
48
|
+
* A path that read labels alone judged such an item unheld and promoted it —
|
|
49
|
+
* which is #3805, and is why this is a shared function rather than a shared
|
|
50
|
+
* convention.
|
|
51
|
+
* @param {{ labels?: unknown, body?: unknown, humanNeededLabel?: unknown }} input - Candidate surfaces
|
|
52
|
+
* @returns {boolean} True when a person is holding this item
|
|
43
53
|
*/
|
|
44
|
-
function isHumanGated(input) {
|
|
54
|
+
export function isHumanGated(input) {
|
|
45
55
|
const configured = String(
|
|
46
56
|
input.humanNeededLabel ?? DEFAULT_HUMAN_NEEDED_LABEL
|
|
47
57
|
)
|
|
@@ -282,6 +292,113 @@ export function planHumanGateReconciliation(input = {}) {
|
|
|
282
292
|
};
|
|
283
293
|
}
|
|
284
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Marker on the note the normalization sweep leaves, so a later cycle
|
|
297
|
+
* recognises its own work instead of commenting again.
|
|
298
|
+
*
|
|
299
|
+
* Deliberately NOT the hold marker and deliberately not a superstring of it:
|
|
300
|
+
* `HUMAN_GATE_MARKER` closes with `]`, so neither this nor
|
|
301
|
+
* `HUMAN_GATE_NOTE_MARKER` matches it. A note that read as a hold declaration
|
|
302
|
+
* would make every reported item look held to the next body-reading sweep,
|
|
303
|
+
* including items the report merely names.
|
|
304
|
+
*/
|
|
305
|
+
export const NORMALIZATION_HOLD_NOTE_MARKER =
|
|
306
|
+
"<!-- [lisa-human-gate-normalization-held] -->";
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Decide whether an item carrying NO configured lifecycle label may be
|
|
310
|
+
* normalized into a ready lane.
|
|
311
|
+
*
|
|
312
|
+
* This is the promotion path, and it was keyed on labels alone. The configured
|
|
313
|
+
* `human_needed` label is one of the lifecycle labels whose *absence* the sweep
|
|
314
|
+
* enumerates on, so an item held only by the body marker was a member of the
|
|
315
|
+
* swept population by definition and got the build-ready label applied to it.
|
|
316
|
+
* The `[lisa-human-gate]` exclusion existed, in a different and read-only sweep
|
|
317
|
+
* further down the same contract: the one sweep that writes was the one that
|
|
318
|
+
* could not see the marker.
|
|
319
|
+
*
|
|
320
|
+
* Order is load-bearing for the same reason it is in `classifyPreWorkCandidate`:
|
|
321
|
+
* the hold is checked before lane membership and before any classification, so
|
|
322
|
+
* nothing downstream — however confident — can promote an item a person parked.
|
|
323
|
+
*
|
|
324
|
+
* On a match this plans NO write of its own. `planHumanGateReconciliation`
|
|
325
|
+
* turns a match into durable state, so a false positive there latches and every
|
|
326
|
+
* later cycle agrees with the first. The gate test is a plain substring match
|
|
327
|
+
* whose imprecision is tracked separately, so this path refuses and reports
|
|
328
|
+
* read-only instead — the same treatment the ungated-filing sweep already gives
|
|
329
|
+
* a hold it finds.
|
|
330
|
+
* @param {{
|
|
331
|
+
* labels?: unknown
|
|
332
|
+
* body?: unknown
|
|
333
|
+
* humanNeededLabel?: unknown
|
|
334
|
+
* lifecycleLabels?: unknown
|
|
335
|
+
* readyLabel?: unknown
|
|
336
|
+
* }} input - Candidate surfaces plus the configured lifecycle vocabulary
|
|
337
|
+
* @returns {{ normalize: boolean, reason: string, humanGated: boolean, actions: { addReadyLabel: string | null, reportHold: boolean } }} Normalization plan
|
|
338
|
+
*/
|
|
339
|
+
export function planLabelNormalization(input = {}) {
|
|
340
|
+
const idle = Object.freeze({ addReadyLabel: null, reportHold: false });
|
|
341
|
+
if (isHumanGated(input)) {
|
|
342
|
+
return {
|
|
343
|
+
normalize: false,
|
|
344
|
+
reason: "human-gate",
|
|
345
|
+
humanGated: true,
|
|
346
|
+
actions: Object.freeze({ addReadyLabel: null, reportHold: true }),
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const labels = normalizeLabels(input.labels);
|
|
351
|
+
if (normalizeLabels(input.lifecycleLabels).some(l => labels.includes(l))) {
|
|
352
|
+
return {
|
|
353
|
+
normalize: false,
|
|
354
|
+
reason: "already-in-lifecycle",
|
|
355
|
+
humanGated: false,
|
|
356
|
+
actions: idle,
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const ready = trimmedString(input.readyLabel);
|
|
361
|
+
if (ready.length === 0) {
|
|
362
|
+
return {
|
|
363
|
+
normalize: false,
|
|
364
|
+
reason: "no-ready-label",
|
|
365
|
+
humanGated: false,
|
|
366
|
+
actions: idle,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return {
|
|
371
|
+
normalize: true,
|
|
372
|
+
reason: "normalize",
|
|
373
|
+
humanGated: false,
|
|
374
|
+
actions: Object.freeze({ addReadyLabel: ready, reportHold: false }),
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Render the notice for an item the normalization sweep left alone.
|
|
380
|
+
*
|
|
381
|
+
* Distinct from `formatHumanGateNote` because the two say opposite things
|
|
382
|
+
* about what happened: that one reports a lane that WAS changed, this one
|
|
383
|
+
* reports a promotion that was declined and nothing else. Reusing it would tell
|
|
384
|
+
* an operator their item had been moved when it had not.
|
|
385
|
+
* @returns {string} Comment body, carrying the marker that keeps a re-run quiet
|
|
386
|
+
*/
|
|
387
|
+
export function formatNormalizationHoldNote() {
|
|
388
|
+
return [
|
|
389
|
+
"**Left alone: a person is holding this**",
|
|
390
|
+
"",
|
|
391
|
+
"- What was found: the description says a person is holding this one, so " +
|
|
392
|
+
"it was not put into the queue that agents work from.",
|
|
393
|
+
"- What changed: nothing at all. It was left exactly as it is, and " +
|
|
394
|
+
"nothing will pick it up on its own.",
|
|
395
|
+
"- To resume it: remove the hold note from the description, then put it " +
|
|
396
|
+
"into the build queue.",
|
|
397
|
+
"",
|
|
398
|
+
NORMALIZATION_HOLD_NOTE_MARKER,
|
|
399
|
+
].join("\n");
|
|
400
|
+
}
|
|
401
|
+
|
|
285
402
|
/**
|
|
286
403
|
* Render the hold notice for a reader who does not know this subsystem.
|
|
287
404
|
*
|
|
@@ -276,6 +276,17 @@ Held for a human product call: <reason>.
|
|
|
276
276
|
<!-- [lisa-human-gate] reason=<short-slug> -->
|
|
277
277
|
```
|
|
278
278
|
|
|
279
|
+
**Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
|
|
280
|
+
label (`github.labels.build.human_needed`, default `human-needed`) to the issue, via `gh issue edit`/`gh issue create --label`. The marker in the body and the label say the same thing,
|
|
281
|
+
and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
|
|
282
|
+
honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
|
|
283
|
+
normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
|
|
284
|
+
marker-only hold was its population by construction and got promoted into the build queue (#3805).
|
|
285
|
+
The marker remains the authoritative declaration; the label is what makes the hold visible to a
|
|
286
|
+
person scanning a board and to any path that has not yet been routed through the shared reader.
|
|
287
|
+
If the label does not exist in the tracker, create it, or record that it could not be applied and
|
|
288
|
+
proceed — the marker still holds. Never file the label *instead of* the marker.
|
|
289
|
+
|
|
279
290
|
If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their state rolls up from children, so they need neither.
|
|
280
291
|
|
|
281
292
|
## Phase 5.5 — Validate (Pre-write Gate)
|
|
@@ -261,6 +261,17 @@ Held for a human product call: <reason>.
|
|
|
261
261
|
<!-- [lisa-human-gate] reason=<short-slug> -->
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
+
**Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
|
|
265
|
+
label (`jira.labels.human_needed`, default `Human Needed`) to the ticket, via the ticket's `labels` field. The marker in the body and the label say the same thing,
|
|
266
|
+
and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
|
|
267
|
+
honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
|
|
268
|
+
normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
|
|
269
|
+
marker-only hold was its population by construction and got promoted into the build queue (#3805).
|
|
270
|
+
The marker remains the authoritative declaration; the label is what makes the hold visible to a
|
|
271
|
+
person scanning a board and to any path that has not yet been routed through the shared reader.
|
|
272
|
+
If the label does not exist in the tracker, create it, or record that it could not be applied and
|
|
273
|
+
proceed — the marker still holds. Never file the label *instead of* the marker.
|
|
274
|
+
|
|
264
275
|
If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their status rolls up from children, so they need neither.
|
|
265
276
|
|
|
266
277
|
## Phase 5.5 — Validate (Pre-write Gate)
|
|
@@ -280,6 +280,17 @@ Held for a human product call: <reason>.
|
|
|
280
280
|
<!-- [lisa-human-gate] reason=<short-slug> -->
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
+
**Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
|
|
284
|
+
label (`linear.labels.build.human_needed`, default `human-needed`) to the Issue, via the Issue's labels (create it via `create_issue_label` if absent). The marker in the body and the label say the same thing,
|
|
285
|
+
and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
|
|
286
|
+
honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
|
|
287
|
+
normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
|
|
288
|
+
marker-only hold was its population by construction and got promoted into the build queue (#3805).
|
|
289
|
+
The marker remains the authoritative declaration; the label is what makes the hold visible to a
|
|
290
|
+
person scanning a board and to any path that has not yet been routed through the shared reader.
|
|
291
|
+
If the label does not exist in the tracker, create it, or record that it could not be applied and
|
|
292
|
+
proceed — the marker still holds. Never file the label *instead of* the marker.
|
|
293
|
+
|
|
283
294
|
If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their state rolls up from children, so they need neither.
|
|
284
295
|
|
|
285
296
|
## Phase 5.5 — Validate (Pre-write Gate)
|
|
@@ -951,6 +951,23 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
|
|
|
951
951
|
selected by `intake_mode`. If `intake_mode=prd`, only PRD-classified issues are normalized. If
|
|
952
952
|
`intake_mode=build`, every non-PRD issue is normalized as a build ticket. If `intake_mode=both`,
|
|
953
953
|
classify PRDs first and normalize all remaining issues as build tickets.
|
|
954
|
+
2a. **Ask whether a person is holding it, before anything else.** Call
|
|
955
|
+
`planLabelNormalization({ labels, body, humanNeededLabel, lifecycleLabels, readyLabel })` from
|
|
956
|
+
`scripts/intake-blocker-reprobe.mjs` for every candidate and apply exactly the verdict it
|
|
957
|
+
returns. Do **not** re-implement the test here and do **not** decide held-ness from labels
|
|
958
|
+
alone: the vendor writers stamp the `[lisa-human-gate]` marker into the body of a deliberate
|
|
959
|
+
hold, and `human_needed` is one of the lifecycle labels this sweep keys on the **absence** of —
|
|
960
|
+
so an item held exactly as the filing contract instructs is a member of this swept population by
|
|
961
|
+
construction, and a label-only read promoted it into the build queue (#3805). The
|
|
962
|
+
`[lisa-human-gate]` exclusion already existed in the read-only "Ungated non-ready filing" sweep
|
|
963
|
+
below; the one sweep that writes was the one that could not see it.
|
|
964
|
+
|
|
965
|
+
On `normalize: false` with reason `human-gate`, **stop for that item**: apply no label, do not
|
|
966
|
+
classify it, and report it read-only per step 5. Writing a label here — even the human-needed
|
|
967
|
+
marker — would turn a match into durable state on a second path, and the gate test is a plain
|
|
968
|
+
substring match whose precision is a separate open defect (#3815). Refusing and reporting is
|
|
969
|
+
the safe failure direction without the latch. Count these under `held_for_person`, never under
|
|
970
|
+
`normalized_ready`.
|
|
954
971
|
3. Classify the issue:
|
|
955
972
|
- **PRD** if it has PRD labels/markers (`prd`, `type:PRD`, `kind:prd`), PRD structure
|
|
956
973
|
(`## Problem`, `## Goals`, `## Validation Journey`, generated-work/backlink sections), or
|
|
@@ -964,7 +981,8 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
|
|
|
964
981
|
- **Ambiguous PRD/build** if strong PRD and build classifications both match. In `intake_mode=prd`
|
|
965
982
|
normalize as PRD; in `intake_mode=build` normalize as build; in `intake_mode=both`, prefer PRD
|
|
966
983
|
only when the body has PRD structure, otherwise build.
|
|
967
|
-
4. Apply exactly one configured ready label for the classified lifecycle
|
|
984
|
+
4. Apply exactly one configured ready label for the classified lifecycle — and only when step
|
|
985
|
+
2a returned `normalize: true`; its `actions.addReadyLabel` is the label to apply, verbatim:
|
|
968
986
|
- PRD → add the configured PRD `ready` label (default `prd-ready`).
|
|
969
987
|
- Build ticket → add the configured build `ready` label (default `status:ready`).
|
|
970
988
|
Keep any unofficial labels for auditability unless the project has explicitly configured one as a
|
|
@@ -972,7 +990,11 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
|
|
|
972
990
|
normalization makes the next normal `lisa-intake` run pick it up.
|
|
973
991
|
5. Post one idempotent `[lisa-repair-intake]` note naming the classification and the configured label
|
|
974
992
|
applied. Include the normalization result in the loop-prevention fingerprint so repeated repair
|
|
975
|
-
cycles do not spam comments.
|
|
993
|
+
cycles do not spam comments. For an item step 2a held, post `formatNormalizationHoldNote()`
|
|
994
|
+
instead — it says that nothing was changed and how a person resumes the item, which is the
|
|
995
|
+
opposite of what the reconciliation note says and must not be substituted for it. A promotion
|
|
996
|
+
declined silently is invisible, which is the quieter version of the failure this step exists to
|
|
997
|
+
prevent, so name every held item in the cycle summary via `summarizeHumanGateHolds([...])`.
|
|
976
998
|
|
|
977
999
|
### Ungated non-ready filing → surface as an incomplete handoff (read-only)
|
|
978
1000
|
|
|
@@ -1223,6 +1245,8 @@ It MAY:
|
|
|
1223
1245
|
Epic/Story container** from its hierarchy/body-parentage children — so rollup and the GitHub UI can
|
|
1224
1246
|
rely on the native graph. This repairs structure only; it does not ship, transition, or verify the
|
|
1225
1247
|
parent.
|
|
1248
|
+
- Leave a normalization candidate untouched and report it when it is held for a person — the
|
|
1249
|
+
human gate is consulted before classification and its refusal is absolute.
|
|
1226
1250
|
- Normalize a GitHub issue with no configured lifecycle label by adding the configured PRD or build
|
|
1227
1251
|
`ready` label after classifying the issue. This is a visibility repair, not a claim; the item
|
|
1228
1252
|
remains open and unclaimed for normal intake.
|
|
@@ -1305,6 +1329,10 @@ Report outcomes in these buckets:
|
|
|
1305
1329
|
from hierarchy/body-parentage) whose missing native sub-issue links were attached.
|
|
1306
1330
|
- `normalized_ready` — GitHub issues missing official lifecycle labels that were classified and
|
|
1307
1331
|
given the configured PRD/build `ready` label so normal intake can claim them.
|
|
1332
|
+
- `held_for_person` — normalization candidates left exactly as they were because a person is
|
|
1333
|
+
holding them, per the human gate in step 2a of that repair. Nothing was written to them. This
|
|
1334
|
+
bucket is never merged into `normalized_ready` or `errors`: "a person parked this and I honoured
|
|
1335
|
+
it" is a repair outcome, not a failure and not a promotion.
|
|
1308
1336
|
- `still_blocked` — examined and intentionally left `blocked`, with the active reason.
|
|
1309
1337
|
- `reversal_suppressed` — a repair this skill previously made was reversed by a human, so the
|
|
1310
1338
|
classification was **not** re-applied. Name the **reversed transition** (role, direction, and
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
{
|
|
19
19
|
"command": "${CURSOR_PLUGIN_ROOT}/hooks/threshold-ratchet.sh",
|
|
20
20
|
"matcher": "Edit|Write|NotebookEdit|Bash"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"command": "${CURSOR_PLUGIN_ROOT}/hooks/withdrawn-rulings.sh --hook",
|
|
24
|
+
"matcher": "Bash|Edit|Write|Read|Task|Grep|Glob"
|
|
21
25
|
}
|
|
22
26
|
],
|
|
23
27
|
"preToolUse": [
|
|
@@ -67,6 +71,9 @@
|
|
|
67
71
|
"command": "${CURSOR_PLUGIN_ROOT}/hooks/install-pkgs.sh",
|
|
68
72
|
"matcher": "startup"
|
|
69
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"command": "${CURSOR_PLUGIN_ROOT}/hooks/withdrawn-rulings.sh --session-start"
|
|
76
|
+
},
|
|
70
77
|
{
|
|
71
78
|
"command": "${CURSOR_PLUGIN_ROOT}/hooks/inject-resolved-config.sh"
|
|
72
79
|
},
|
|
@@ -78,6 +85,9 @@
|
|
|
78
85
|
}
|
|
79
86
|
],
|
|
80
87
|
"subagentStart": [
|
|
88
|
+
{
|
|
89
|
+
"command": "${CURSOR_PLUGIN_ROOT}/hooks/withdrawn-rulings.sh --session-start"
|
|
90
|
+
},
|
|
81
91
|
{
|
|
82
92
|
"command": "${CURSOR_PLUGIN_ROOT}/hooks/inject-resolved-config.sh"
|
|
83
93
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
* @module inject-resolved-config
|
|
52
52
|
*/
|
|
53
53
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
54
|
-
import { join } from "node:path";
|
|
54
|
+
import { basename, join } from "node:path";
|
|
55
55
|
import { fileURLToPath } from "node:url";
|
|
56
56
|
|
|
57
57
|
/** Committed, project-wide configuration. */
|
|
@@ -799,13 +799,32 @@ export function buildContext(projectDir) {
|
|
|
799
799
|
? `${MAIN_CONFIG} + ${LOCAL_CONFIG} (local wins where they overlap)`
|
|
800
800
|
: `${MAIN_CONFIG} (no local override file)`;
|
|
801
801
|
|
|
802
|
+
// The block used to say "this project's" — a possessive with no referent
|
|
803
|
+
// anywhere in its text, so two repositories emitted blocks that were
|
|
804
|
+
// character-identical except for the values. An agent standing in one
|
|
805
|
+
// directory while doing work governed by another read something perfectly
|
|
806
|
+
// true about the directory and wrong about the work, and the next sentence
|
|
807
|
+
// told it not to open the files that would have shown the difference. Six
|
|
808
|
+
// independent agent cycles reached the same false conclusion from one such
|
|
809
|
+
// block (CodySwannGT/lisa#3765).
|
|
810
|
+
//
|
|
811
|
+
// `basename` rather than the git remote: naming the subject must not cost a
|
|
812
|
+
// subprocess on a hook that runs at every session and subagent start, and it
|
|
813
|
+
// must not fail in a directory that is not a git checkout. The absolute path
|
|
814
|
+
// beside it is the unambiguous identifier; the basename is the short name a
|
|
815
|
+
// reader actually compares against the work in front of them.
|
|
816
|
+
const subject = basename(projectDir) || projectDir;
|
|
817
|
+
|
|
802
818
|
return block(
|
|
803
|
-
`These are
|
|
804
|
-
`
|
|
805
|
-
`
|
|
806
|
-
`
|
|
807
|
-
`
|
|
808
|
-
`
|
|
819
|
+
`These are the EFFECTIVE Lisa configuration values for ${subject}, resolved from ${sources} ` +
|
|
820
|
+
`at ${projectDir}.\n` +
|
|
821
|
+
`Act on them directly and do not act against them. They describe THAT directory: if your ` +
|
|
822
|
+
`work targets a different repository, read that repository's config rather than these. For ` +
|
|
823
|
+
`work in ${subject}, do not re-read the config files to learn these values. A line marked ` +
|
|
824
|
+
`[Lisa built-in default] is NOT something ${subject} declared. A key whose NAME is identity- ` +
|
|
825
|
+
`or credential-shaped is withheld and counted, and a VALUE matching a known credential shape ` +
|
|
826
|
+
`is replaced with ${REDACTED}: a best-effort filter, not proof that anything it left alone ` +
|
|
827
|
+
`is safe to repeat.\n\n` +
|
|
809
828
|
renderBody(resolved)
|
|
810
829
|
);
|
|
811
830
|
}
|