@codyswann/lisa 5.2.0 → 5.2.2

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 (83) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  3. package/dist/core/upstream-evidence-manifest.js +31 -60
  4. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  5. package/package.json +4 -5
  6. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/skills/lisa-learnings-audit/SKILL.md +53 -10
  9. package/plugins/lisa/skills/lisa-learnings-audit/SKILL.md +53 -10
  10. package/plugins/lisa-agy/plugin.json +1 -1
  11. package/plugins/lisa-agy/skills/lisa-learnings-audit/SKILL.md +53 -10
  12. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  15. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  19. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-copilot/skills/lisa-learnings-audit/SKILL.md +53 -10
  21. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cursor/skills/lisa-learnings-audit/SKILL.md +53 -10
  23. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  25. package/plugins/lisa-devin/skills/lisa-learnings-audit/SKILL.md +53 -10
  26. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo-agy/plugin.json +1 -1
  29. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  47. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  50. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  54. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails-agy/plugin.json +1 -1
  57. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  64. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  71. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  75. package/plugins/src/base/skills/lisa-learnings-audit/SKILL.md +53 -10
  76. package/scripts/check-phrase-manifest-parity.mjs +6 -3
  77. package/scripts/classify-phrase-tests.mjs +109 -20
  78. package/scripts/fix-namespace-test-assertions.mjs +3 -20
  79. package/scripts/lib/phrase-tests/doc-taint.mjs +708 -0
  80. package/scripts/lib/phrase-tests/inventory.mjs +381 -0
  81. package/scripts/lib/phrase-tests/manifest.mjs +14 -2
  82. package/scripts/lib/phrase-tests/marker-classes.mjs +323 -0
  83. package/scripts/lib/phrase-tests/redact.mjs +88 -0
package/package.json CHANGED
@@ -66,7 +66,6 @@
66
66
  "check:whole-output-guards": "node scripts/check-whole-output-guards.mjs",
67
67
  "check:empty-subject-guards": "node scripts/check-empty-subject-guards.mjs",
68
68
  "check:cwd-resolution-corpus": "node scripts/check-cwd-resolution-corpus.mjs",
69
- "check:phrase-manifest-parity": "node scripts/check-phrase-manifest-parity.mjs --base 02b59a6297 --head 5207036771 --exact",
70
69
  "check:probe-absence-direction": "node scripts/check-probe-absence-direction.mjs",
71
70
  "check:guard-parity-notes": "node scripts/check-guard-parity-notes.mjs",
72
71
  "check:shell-guard-refusals": "node scripts/lib/worktree-dependencies.mjs && bun run build && $npm_execpath run lisa-test-run -- --adapter direct -- node scripts/check-shell-guard-refusal-coverage.mjs --trace-out .lisa/shell-guard-trace.jsonl",
@@ -188,7 +187,7 @@
188
187
  "qs": "^6.16.0"
189
188
  },
190
189
  "name": "@codyswann/lisa",
191
- "version": "5.2.0",
190
+ "version": "5.2.2",
192
191
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
193
192
  "main": "dist/index.js",
194
193
  "exports": {
@@ -351,7 +350,7 @@
351
350
  "test": "tests"
352
351
  },
353
352
  "types": "./dist/index.d.ts",
354
- "lisaReleaseCommit": "7bd523a3904314f204e4d1e1ea3ce8eedc00e2e0",
355
- "gitHead": "7bd523a3904314f204e4d1e1ea3ce8eedc00e2e0",
356
- "lisaReleaseTag": "v5.2.0"
353
+ "lisaReleaseCommit": "cc4d89dc879b34263b81c1877deeb8e5743233e0",
354
+ "gitHead": "cc4d89dc879b34263b81c1877deeb8e5743233e0",
355
+ "lisaReleaseTag": "v5.2.2"
357
356
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -98,11 +98,49 @@ results stays green whatever the code does. For every RETIRE whose proof is
98
98
  "owned by a test" (or any other mechanical owner that runs as a check), run
99
99
  the mutation proof before filing the row: break the rule the named test
100
100
  supposedly guards, run that named test and observe it **fail**, then revert
101
- the mutation and see it pass again. Record the result in the row — the
102
- mutation applied, the failing test name and its failure line, and the
103
- revert. A named owner that stays green under the mutation is not the owner:
104
- find the test that does fail, or drop the RETIRE. No failing observation ⇒
105
- no valid retire proof.
101
+ the mutation. Record the result in the row — the mutation applied, the
102
+ failing test name and its failure line, and the revert. A named owner that
103
+ stays green under the mutation is not the owner: find the test that does
104
+ fail, or drop the RETIRE. No failing observation ⇒ no valid retire proof.
105
+
106
+ Run that break on a scratch copy,
107
+ never in a worktree another agent is editing — not in the working folder
108
+ this run is using either. The `falsifiable-checks` rule's section
109
+ "Break on a scratch copy, never in a shared worktree" is the full recipe.
110
+ This skill carries the minimum itself, because some agents (Codex,
111
+ Antigravity) receive this skill without the rules tree:
112
+
113
+ ```sh
114
+ tmp=$(mktemp -d) # record this path first (step 1)
115
+ git worktree add --detach "$tmp" HEAD
116
+ git diff --binary HEAD | git -C "$tmp" apply --allow-empty
117
+ # copy untracked new files; install dependencies in "$tmp" (a linked
118
+ # node_modules in a workspace monorepo resolves back to the shared tree)
119
+ # baseline: run the named test in "$tmp" BEFORE breaking anything; it must be green
120
+ # break the rule in "$tmp", run the named test there, read the failure
121
+ git worktree remove --force "$tmp" # discarding the copy is the revert
122
+ ```
123
+
124
+ Address the copy by absolute path; never switch the session into it with a
125
+ harness tool such as `EnterWorktree`. A red baseline means the copy is
126
+ incomplete, not that the test bites. Discarding the copy is the revert, and
127
+ the green baseline taken in the copy before the break is the pass-again
128
+ evidence, so the shared tree is never written to.
129
+
130
+ 1. **Record where before you break.** Before applying the mutation, write
131
+ the row's `mutation_location` — the mutated file, the line or section,
132
+ and the absolute path of the scratch copy — into the run's working notes
133
+ for that candidate. It goes in the RETIRE row with the rest of the proof,
134
+ and it exists before the mutation does, so an interrupted run still says
135
+ what was changed and where.
136
+ 2. **A failed restore blocks the row.** If discarding the copy fails (the
137
+ `git worktree remove` errors, or the copy path still exists afterwards),
138
+ or anything suggests the mutation reached a tree other than the copy,
139
+ file **no** RETIRE row for that candidate and run no further mutation
140
+ proofs. Report `mutation-restore-failed` with the recorded
141
+ `mutation_location`, escalated per Escalation, so a person can find and
142
+ repair the change. The run outcome is `recovery-required` (see Run
143
+ outcomes).
106
144
 
107
145
  **Learned planning checks.** A ledger entry whose rule begins
108
146
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
@@ -353,8 +391,8 @@ rejected by rule (see the `promotion-contract` rule):
353
391
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
354
392
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
355
393
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
356
- the mechanical owner / staleness proof per row, and the mutation proof when the
357
- owner is a test). Every RETIRE row also carries the entry's full
394
+ the mechanical owner / staleness proof per row, and the mutation proof with its
395
+ `mutation_location` when the owner is a test). Every RETIRE row also carries the entry's full
358
396
  `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
359
397
  at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
360
398
  12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
@@ -498,7 +536,10 @@ non-technical operator standing at the gate can act on.
498
536
  ## Recovery
499
537
 
500
538
  Every external write is marker-deduped, so a crashed or interrupted run
501
- leaves no cleanup debt: re-running is the recovery procedure. A partial run's
539
+ leaves no cleanup debt: re-running is the recovery procedure. The one
540
+ exception is a RETIRE mutation proof's scratch copy: a run interrupted
541
+ mid-proof can leave it on disk, and its recorded `mutation_location` names
542
+ the path to remove before re-running. A partial run's
502
543
  already-filed tickets are found by their markers and not duplicated; a batch
503
544
  ticket from an interrupted run is reused (append missing rows as a comment)
504
545
  rather than reissued. **Filing order**: file the per-item PROMOTE/DEMOTE
@@ -527,8 +568,10 @@ exact so nothing regresses:
527
568
  recommendation threshold. Report one line: surfaces scanned, entries seen,
528
569
  "nothing to propose".
529
570
  - `blocked` → **`recovery-required`** when the loop itself could not complete
530
- (tracker unreachable, contradictory config, a ledger-contract parse error) —
531
- escalated per Escalation with the operator-readable reason; **or**
571
+ (tracker unreachable, contradictory config, a ledger-contract parse error,
572
+ or a RETIRE mutation proof whose scratch copy could not be discarded, so a
573
+ mutation may survive outside the run's control) — escalated per Escalation
574
+ with the operator-readable reason; **or**
532
575
  **`approval-requested`** when the run finished and is waiting on a human gate
533
576
  rather than being broken.
534
577
  A run that filed nothing because destination-validation (Ticket emission)
@@ -96,11 +96,49 @@ results stays green whatever the code does. For every RETIRE whose proof is
96
96
  "owned by a test" (or any other mechanical owner that runs as a check), run
97
97
  the mutation proof before filing the row: break the rule the named test
98
98
  supposedly guards, run that named test and observe it **fail**, then revert
99
- the mutation and see it pass again. Record the result in the row — the
100
- mutation applied, the failing test name and its failure line, and the
101
- revert. A named owner that stays green under the mutation is not the owner:
102
- find the test that does fail, or drop the RETIRE. No failing observation ⇒
103
- no valid retire proof.
99
+ the mutation. Record the result in the row — the mutation applied, the
100
+ failing test name and its failure line, and the revert. A named owner that
101
+ stays green under the mutation is not the owner: find the test that does
102
+ fail, or drop the RETIRE. No failing observation ⇒ no valid retire proof.
103
+
104
+ Run that break on a scratch copy,
105
+ never in a worktree another agent is editing — not in the working folder
106
+ this run is using either. The `falsifiable-checks` rule's section
107
+ "Break on a scratch copy, never in a shared worktree" is the full recipe.
108
+ This skill carries the minimum itself, because some agents (Codex,
109
+ Antigravity) receive this skill without the rules tree:
110
+
111
+ ```sh
112
+ tmp=$(mktemp -d) # record this path first (step 1)
113
+ git worktree add --detach "$tmp" HEAD
114
+ git diff --binary HEAD | git -C "$tmp" apply --allow-empty
115
+ # copy untracked new files; install dependencies in "$tmp" (a linked
116
+ # node_modules in a workspace monorepo resolves back to the shared tree)
117
+ # baseline: run the named test in "$tmp" BEFORE breaking anything; it must be green
118
+ # break the rule in "$tmp", run the named test there, read the failure
119
+ git worktree remove --force "$tmp" # discarding the copy is the revert
120
+ ```
121
+
122
+ Address the copy by absolute path; never switch the session into it with a
123
+ harness tool such as `EnterWorktree`. A red baseline means the copy is
124
+ incomplete, not that the test bites. Discarding the copy is the revert, and
125
+ the green baseline taken in the copy before the break is the pass-again
126
+ evidence, so the shared tree is never written to.
127
+
128
+ 1. **Record where before you break.** Before applying the mutation, write
129
+ the row's `mutation_location` — the mutated file, the line or section,
130
+ and the absolute path of the scratch copy — into the run's working notes
131
+ for that candidate. It goes in the RETIRE row with the rest of the proof,
132
+ and it exists before the mutation does, so an interrupted run still says
133
+ what was changed and where.
134
+ 2. **A failed restore blocks the row.** If discarding the copy fails (the
135
+ `git worktree remove` errors, or the copy path still exists afterwards),
136
+ or anything suggests the mutation reached a tree other than the copy,
137
+ file **no** RETIRE row for that candidate and run no further mutation
138
+ proofs. Report `mutation-restore-failed` with the recorded
139
+ `mutation_location`, escalated per Escalation, so a person can find and
140
+ repair the change. The run outcome is `recovery-required` (see Run
141
+ outcomes).
104
142
 
105
143
  **Learned planning checks.** A ledger entry whose rule begins
106
144
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
@@ -351,8 +389,8 @@ rejected by rule (see the `promotion-contract` rule):
351
389
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
352
390
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
353
391
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
354
- the mechanical owner / staleness proof per row, and the mutation proof when the
355
- owner is a test). Every RETIRE row also carries the entry's full
392
+ the mechanical owner / staleness proof per row, and the mutation proof with its
393
+ `mutation_location` when the owner is a test). Every RETIRE row also carries the entry's full
356
394
  `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
357
395
  at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
358
396
  12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
@@ -496,7 +534,10 @@ non-technical operator standing at the gate can act on.
496
534
  ## Recovery
497
535
 
498
536
  Every external write is marker-deduped, so a crashed or interrupted run
499
- leaves no cleanup debt: re-running is the recovery procedure. A partial run's
537
+ leaves no cleanup debt: re-running is the recovery procedure. The one
538
+ exception is a RETIRE mutation proof's scratch copy: a run interrupted
539
+ mid-proof can leave it on disk, and its recorded `mutation_location` names
540
+ the path to remove before re-running. A partial run's
500
541
  already-filed tickets are found by their markers and not duplicated; a batch
501
542
  ticket from an interrupted run is reused (append missing rows as a comment)
502
543
  rather than reissued. **Filing order**: file the per-item PROMOTE/DEMOTE
@@ -525,8 +566,10 @@ exact so nothing regresses:
525
566
  recommendation threshold. Report one line: surfaces scanned, entries seen,
526
567
  "nothing to propose".
527
568
  - `blocked` → **`recovery-required`** when the loop itself could not complete
528
- (tracker unreachable, contradictory config, a ledger-contract parse error) —
529
- escalated per Escalation with the operator-readable reason; **or**
569
+ (tracker unreachable, contradictory config, a ledger-contract parse error,
570
+ or a RETIRE mutation proof whose scratch copy could not be discarded, so a
571
+ mutation may survive outside the run's control) — escalated per Escalation
572
+ with the operator-readable reason; **or**
530
573
  **`approval-requested`** when the run finished and is waiting on a human gate
531
574
  rather than being broken.
532
575
  A run that filed nothing because destination-validation (Ticket emission)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -96,11 +96,49 @@ results stays green whatever the code does. For every RETIRE whose proof is
96
96
  "owned by a test" (or any other mechanical owner that runs as a check), run
97
97
  the mutation proof before filing the row: break the rule the named test
98
98
  supposedly guards, run that named test and observe it **fail**, then revert
99
- the mutation and see it pass again. Record the result in the row — the
100
- mutation applied, the failing test name and its failure line, and the
101
- revert. A named owner that stays green under the mutation is not the owner:
102
- find the test that does fail, or drop the RETIRE. No failing observation ⇒
103
- no valid retire proof.
99
+ the mutation. Record the result in the row — the mutation applied, the
100
+ failing test name and its failure line, and the revert. A named owner that
101
+ stays green under the mutation is not the owner: find the test that does
102
+ fail, or drop the RETIRE. No failing observation ⇒ no valid retire proof.
103
+
104
+ Run that break on a scratch copy,
105
+ never in a worktree another agent is editing — not in the working folder
106
+ this run is using either. The `falsifiable-checks` rule's section
107
+ "Break on a scratch copy, never in a shared worktree" is the full recipe.
108
+ This skill carries the minimum itself, because some agents (Codex,
109
+ Antigravity) receive this skill without the rules tree:
110
+
111
+ ```sh
112
+ tmp=$(mktemp -d) # record this path first (step 1)
113
+ git worktree add --detach "$tmp" HEAD
114
+ git diff --binary HEAD | git -C "$tmp" apply --allow-empty
115
+ # copy untracked new files; install dependencies in "$tmp" (a linked
116
+ # node_modules in a workspace monorepo resolves back to the shared tree)
117
+ # baseline: run the named test in "$tmp" BEFORE breaking anything; it must be green
118
+ # break the rule in "$tmp", run the named test there, read the failure
119
+ git worktree remove --force "$tmp" # discarding the copy is the revert
120
+ ```
121
+
122
+ Address the copy by absolute path; never switch the session into it with a
123
+ harness tool such as `EnterWorktree`. A red baseline means the copy is
124
+ incomplete, not that the test bites. Discarding the copy is the revert, and
125
+ the green baseline taken in the copy before the break is the pass-again
126
+ evidence, so the shared tree is never written to.
127
+
128
+ 1. **Record where before you break.** Before applying the mutation, write
129
+ the row's `mutation_location` — the mutated file, the line or section,
130
+ and the absolute path of the scratch copy — into the run's working notes
131
+ for that candidate. It goes in the RETIRE row with the rest of the proof,
132
+ and it exists before the mutation does, so an interrupted run still says
133
+ what was changed and where.
134
+ 2. **A failed restore blocks the row.** If discarding the copy fails (the
135
+ `git worktree remove` errors, or the copy path still exists afterwards),
136
+ or anything suggests the mutation reached a tree other than the copy,
137
+ file **no** RETIRE row for that candidate and run no further mutation
138
+ proofs. Report `mutation-restore-failed` with the recorded
139
+ `mutation_location`, escalated per Escalation, so a person can find and
140
+ repair the change. The run outcome is `recovery-required` (see Run
141
+ outcomes).
104
142
 
105
143
  **Learned planning checks.** A ledger entry whose rule begins
106
144
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
@@ -351,8 +389,8 @@ rejected by rule (see the `promotion-contract` rule):
351
389
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
352
390
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
353
391
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
354
- the mechanical owner / staleness proof per row, and the mutation proof when the
355
- owner is a test). Every RETIRE row also carries the entry's full
392
+ the mechanical owner / staleness proof per row, and the mutation proof with its
393
+ `mutation_location` when the owner is a test). Every RETIRE row also carries the entry's full
356
394
  `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
357
395
  at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
358
396
  12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
@@ -496,7 +534,10 @@ non-technical operator standing at the gate can act on.
496
534
  ## Recovery
497
535
 
498
536
  Every external write is marker-deduped, so a crashed or interrupted run
499
- leaves no cleanup debt: re-running is the recovery procedure. A partial run's
537
+ leaves no cleanup debt: re-running is the recovery procedure. The one
538
+ exception is a RETIRE mutation proof's scratch copy: a run interrupted
539
+ mid-proof can leave it on disk, and its recorded `mutation_location` names
540
+ the path to remove before re-running. A partial run's
500
541
  already-filed tickets are found by their markers and not duplicated; a batch
501
542
  ticket from an interrupted run is reused (append missing rows as a comment)
502
543
  rather than reissued. **Filing order**: file the per-item PROMOTE/DEMOTE
@@ -525,8 +566,10 @@ exact so nothing regresses:
525
566
  recommendation threshold. Report one line: surfaces scanned, entries seen,
526
567
  "nothing to propose".
527
568
  - `blocked` → **`recovery-required`** when the loop itself could not complete
528
- (tracker unreachable, contradictory config, a ledger-contract parse error) —
529
- escalated per Escalation with the operator-readable reason; **or**
569
+ (tracker unreachable, contradictory config, a ledger-contract parse error,
570
+ or a RETIRE mutation proof whose scratch copy could not be discarded, so a
571
+ mutation may survive outside the run's control) — escalated per Escalation
572
+ with the operator-readable reason; **or**
530
573
  **`approval-requested`** when the run finished and is waiting on a human gate
531
574
  rather than being broken.
532
575
  A run that filed nothing because destination-validation (Ticket emission)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -96,11 +96,49 @@ results stays green whatever the code does. For every RETIRE whose proof is
96
96
  "owned by a test" (or any other mechanical owner that runs as a check), run
97
97
  the mutation proof before filing the row: break the rule the named test
98
98
  supposedly guards, run that named test and observe it **fail**, then revert
99
- the mutation and see it pass again. Record the result in the row — the
100
- mutation applied, the failing test name and its failure line, and the
101
- revert. A named owner that stays green under the mutation is not the owner:
102
- find the test that does fail, or drop the RETIRE. No failing observation ⇒
103
- no valid retire proof.
99
+ the mutation. Record the result in the row — the mutation applied, the
100
+ failing test name and its failure line, and the revert. A named owner that
101
+ stays green under the mutation is not the owner: find the test that does
102
+ fail, or drop the RETIRE. No failing observation ⇒ no valid retire proof.
103
+
104
+ Run that break on a scratch copy,
105
+ never in a worktree another agent is editing — not in the working folder
106
+ this run is using either. The `falsifiable-checks` rule's section
107
+ "Break on a scratch copy, never in a shared worktree" is the full recipe.
108
+ This skill carries the minimum itself, because some agents (Codex,
109
+ Antigravity) receive this skill without the rules tree:
110
+
111
+ ```sh
112
+ tmp=$(mktemp -d) # record this path first (step 1)
113
+ git worktree add --detach "$tmp" HEAD
114
+ git diff --binary HEAD | git -C "$tmp" apply --allow-empty
115
+ # copy untracked new files; install dependencies in "$tmp" (a linked
116
+ # node_modules in a workspace monorepo resolves back to the shared tree)
117
+ # baseline: run the named test in "$tmp" BEFORE breaking anything; it must be green
118
+ # break the rule in "$tmp", run the named test there, read the failure
119
+ git worktree remove --force "$tmp" # discarding the copy is the revert
120
+ ```
121
+
122
+ Address the copy by absolute path; never switch the session into it with a
123
+ harness tool such as `EnterWorktree`. A red baseline means the copy is
124
+ incomplete, not that the test bites. Discarding the copy is the revert, and
125
+ the green baseline taken in the copy before the break is the pass-again
126
+ evidence, so the shared tree is never written to.
127
+
128
+ 1. **Record where before you break.** Before applying the mutation, write
129
+ the row's `mutation_location` — the mutated file, the line or section,
130
+ and the absolute path of the scratch copy — into the run's working notes
131
+ for that candidate. It goes in the RETIRE row with the rest of the proof,
132
+ and it exists before the mutation does, so an interrupted run still says
133
+ what was changed and where.
134
+ 2. **A failed restore blocks the row.** If discarding the copy fails (the
135
+ `git worktree remove` errors, or the copy path still exists afterwards),
136
+ or anything suggests the mutation reached a tree other than the copy,
137
+ file **no** RETIRE row for that candidate and run no further mutation
138
+ proofs. Report `mutation-restore-failed` with the recorded
139
+ `mutation_location`, escalated per Escalation, so a person can find and
140
+ repair the change. The run outcome is `recovery-required` (see Run
141
+ outcomes).
104
142
 
105
143
  **Learned planning checks.** A ledger entry whose rule begins
106
144
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
@@ -351,8 +389,8 @@ rejected by rule (see the `promotion-contract` rule):
351
389
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
352
390
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
353
391
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
354
- the mechanical owner / staleness proof per row, and the mutation proof when the
355
- owner is a test). Every RETIRE row also carries the entry's full
392
+ the mechanical owner / staleness proof per row, and the mutation proof with its
393
+ `mutation_location` when the owner is a test). Every RETIRE row also carries the entry's full
356
394
  `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
357
395
  at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
358
396
  12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
@@ -496,7 +534,10 @@ non-technical operator standing at the gate can act on.
496
534
  ## Recovery
497
535
 
498
536
  Every external write is marker-deduped, so a crashed or interrupted run
499
- leaves no cleanup debt: re-running is the recovery procedure. A partial run's
537
+ leaves no cleanup debt: re-running is the recovery procedure. The one
538
+ exception is a RETIRE mutation proof's scratch copy: a run interrupted
539
+ mid-proof can leave it on disk, and its recorded `mutation_location` names
540
+ the path to remove before re-running. A partial run's
500
541
  already-filed tickets are found by their markers and not duplicated; a batch
501
542
  ticket from an interrupted run is reused (append missing rows as a comment)
502
543
  rather than reissued. **Filing order**: file the per-item PROMOTE/DEMOTE
@@ -525,8 +566,10 @@ exact so nothing regresses:
525
566
  recommendation threshold. Report one line: surfaces scanned, entries seen,
526
567
  "nothing to propose".
527
568
  - `blocked` → **`recovery-required`** when the loop itself could not complete
528
- (tracker unreachable, contradictory config, a ledger-contract parse error) —
529
- escalated per Escalation with the operator-readable reason; **or**
569
+ (tracker unreachable, contradictory config, a ledger-contract parse error,
570
+ or a RETIRE mutation proof whose scratch copy could not be discarded, so a
571
+ mutation may survive outside the run's control) — escalated per Escalation
572
+ with the operator-readable reason; **or**
530
573
  **`approval-requested`** when the run finished and is waiting on a human gate
531
574
  rather than being broken.
532
575
  A run that filed nothing because destination-validation (Ticket emission)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -96,11 +96,49 @@ results stays green whatever the code does. For every RETIRE whose proof is
96
96
  "owned by a test" (or any other mechanical owner that runs as a check), run
97
97
  the mutation proof before filing the row: break the rule the named test
98
98
  supposedly guards, run that named test and observe it **fail**, then revert
99
- the mutation and see it pass again. Record the result in the row — the
100
- mutation applied, the failing test name and its failure line, and the
101
- revert. A named owner that stays green under the mutation is not the owner:
102
- find the test that does fail, or drop the RETIRE. No failing observation ⇒
103
- no valid retire proof.
99
+ the mutation. Record the result in the row — the mutation applied, the
100
+ failing test name and its failure line, and the revert. A named owner that
101
+ stays green under the mutation is not the owner: find the test that does
102
+ fail, or drop the RETIRE. No failing observation ⇒ no valid retire proof.
103
+
104
+ Run that break on a scratch copy,
105
+ never in a worktree another agent is editing — not in the working folder
106
+ this run is using either. The `falsifiable-checks` rule's section
107
+ "Break on a scratch copy, never in a shared worktree" is the full recipe.
108
+ This skill carries the minimum itself, because some agents (Codex,
109
+ Antigravity) receive this skill without the rules tree:
110
+
111
+ ```sh
112
+ tmp=$(mktemp -d) # record this path first (step 1)
113
+ git worktree add --detach "$tmp" HEAD
114
+ git diff --binary HEAD | git -C "$tmp" apply --allow-empty
115
+ # copy untracked new files; install dependencies in "$tmp" (a linked
116
+ # node_modules in a workspace monorepo resolves back to the shared tree)
117
+ # baseline: run the named test in "$tmp" BEFORE breaking anything; it must be green
118
+ # break the rule in "$tmp", run the named test there, read the failure
119
+ git worktree remove --force "$tmp" # discarding the copy is the revert
120
+ ```
121
+
122
+ Address the copy by absolute path; never switch the session into it with a
123
+ harness tool such as `EnterWorktree`. A red baseline means the copy is
124
+ incomplete, not that the test bites. Discarding the copy is the revert, and
125
+ the green baseline taken in the copy before the break is the pass-again
126
+ evidence, so the shared tree is never written to.
127
+
128
+ 1. **Record where before you break.** Before applying the mutation, write
129
+ the row's `mutation_location` — the mutated file, the line or section,
130
+ and the absolute path of the scratch copy — into the run's working notes
131
+ for that candidate. It goes in the RETIRE row with the rest of the proof,
132
+ and it exists before the mutation does, so an interrupted run still says
133
+ what was changed and where.
134
+ 2. **A failed restore blocks the row.** If discarding the copy fails (the
135
+ `git worktree remove` errors, or the copy path still exists afterwards),
136
+ or anything suggests the mutation reached a tree other than the copy,
137
+ file **no** RETIRE row for that candidate and run no further mutation
138
+ proofs. Report `mutation-restore-failed` with the recorded
139
+ `mutation_location`, escalated per Escalation, so a person can find and
140
+ repair the change. The run outcome is `recovery-required` (see Run
141
+ outcomes).
104
142
 
105
143
  **Learned planning checks.** A ledger entry whose rule begins
106
144
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
@@ -351,8 +389,8 @@ rejected by rule (see the `promotion-contract` rule):
351
389
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
352
390
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
353
391
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
354
- the mechanical owner / staleness proof per row, and the mutation proof when the
355
- owner is a test). Every RETIRE row also carries the entry's full
392
+ the mechanical owner / staleness proof per row, and the mutation proof with its
393
+ `mutation_location` when the owner is a test). Every RETIRE row also carries the entry's full
356
394
  `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
357
395
  at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
358
396
  12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
@@ -496,7 +534,10 @@ non-technical operator standing at the gate can act on.
496
534
  ## Recovery
497
535
 
498
536
  Every external write is marker-deduped, so a crashed or interrupted run
499
- leaves no cleanup debt: re-running is the recovery procedure. A partial run's
537
+ leaves no cleanup debt: re-running is the recovery procedure. The one
538
+ exception is a RETIRE mutation proof's scratch copy: a run interrupted
539
+ mid-proof can leave it on disk, and its recorded `mutation_location` names
540
+ the path to remove before re-running. A partial run's
500
541
  already-filed tickets are found by their markers and not duplicated; a batch
501
542
  ticket from an interrupted run is reused (append missing rows as a comment)
502
543
  rather than reissued. **Filing order**: file the per-item PROMOTE/DEMOTE
@@ -525,8 +566,10 @@ exact so nothing regresses:
525
566
  recommendation threshold. Report one line: surfaces scanned, entries seen,
526
567
  "nothing to propose".
527
568
  - `blocked` → **`recovery-required`** when the loop itself could not complete
528
- (tracker unreachable, contradictory config, a ledger-contract parse error) —
529
- escalated per Escalation with the operator-readable reason; **or**
569
+ (tracker unreachable, contradictory config, a ledger-contract parse error,
570
+ or a RETIRE mutation proof whose scratch copy could not be discarded, so a
571
+ mutation may survive outside the run's control) — escalated per Escalation
572
+ with the operator-readable reason; **or**
530
573
  **`approval-requested`** when the run finished and is waiting on a human gate
531
574
  rather than being broken.
532
575
  A run that filed nothing because destination-validation (Ticket emission)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
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": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"