@codyswann/lisa 4.107.11 → 4.107.12

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 (95) hide show
  1. package/dist/core/learnings-retire.d.ts +59 -0
  2. package/dist/core/learnings-retire.d.ts.map +1 -0
  3. package/dist/core/learnings-retire.js +131 -0
  4. package/dist/core/learnings-retire.js.map +1 -0
  5. package/dist/core/learnings.d.ts +1 -0
  6. package/dist/core/learnings.d.ts.map +1 -1
  7. package/dist/core/learnings.js +1 -0
  8. package/dist/core/learnings.js.map +1 -1
  9. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  10. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.js +5 -2
  12. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  13. package/package.json +4 -4
  14. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-learnings-audit/SKILL.md +30 -1
  17. package/plugins/lisa/rules/reference/project-learnings.md +21 -0
  18. package/plugins/lisa/skills/lisa-learnings-audit/SKILL.md +30 -1
  19. package/plugins/lisa-agy/plugin.json +1 -1
  20. package/plugins/lisa-agy/skills/lisa-learnings-audit/SKILL.md +30 -1
  21. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  24. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  28. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-copilot/rules/reference/project-learnings.md +21 -0
  30. package/plugins/lisa-copilot/skills/lisa-learnings-audit/SKILL.md +30 -1
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cursor/rules/project-learnings-reference.mdc +21 -0
  33. package/plugins/lisa-cursor/skills/lisa-learnings-audit/SKILL.md +30 -1
  34. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  36. package/plugins/lisa-devin/rules/reference/project-learnings.md +21 -0
  37. package/plugins/lisa-devin/skills/lisa-learnings-audit/SKILL.md +30 -1
  38. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  40. package/plugins/lisa-expo-agy/plugin.json +1 -1
  41. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  52. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  66. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  69. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  73. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-rails-agy/plugin.json +1 -1
  76. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  80. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  82. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  83. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  87. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  89. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  90. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  94. package/plugins/src/base/rules/reference/project-learnings.md +21 -0
  95. package/plugins/src/base/skills/lisa-learnings-audit/SKILL.md +30 -1
package/package.json CHANGED
@@ -188,7 +188,7 @@
188
188
  "qs": "^6.16.0"
189
189
  },
190
190
  "name": "@codyswann/lisa",
191
- "version": "4.107.11",
191
+ "version": "4.107.12",
192
192
  "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
193
  "main": "dist/index.js",
194
194
  "exports": {
@@ -351,7 +351,7 @@
351
351
  "test": "tests"
352
352
  },
353
353
  "types": "./dist/index.d.ts",
354
- "lisaReleaseCommit": "24d0d26b348446c2439035aaa96f3edc6a82ae93",
355
- "gitHead": "24d0d26b348446c2439035aaa96f3edc6a82ae93",
356
- "lisaReleaseTag": "v4.107.11"
354
+ "lisaReleaseCommit": "391134ddc7552a2623f15c277530d75f0c917b81",
355
+ "gitHead": "391134ddc7552a2623f15c277530d75f0c917b81",
356
+ "lisaReleaseTag": "v4.107.12"
357
357
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -85,6 +85,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
85
85
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
86
86
  a recommendation it cannot evidence.
87
87
 
88
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
89
+ mechanical owner proves nothing until that test has been seen to fail
90
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
91
+ results stays green whatever the code does. For every RETIRE whose proof is
92
+ "owned by a test" (or any other mechanical owner that runs as a check), run
93
+ the mutation proof before filing the row: break the rule the named test
94
+ supposedly guards, run that named test and observe it **fail**, then revert
95
+ the mutation and see it pass again. Record the result in the row — the
96
+ mutation applied, the failing test name and its failure line, and the
97
+ revert. A named owner that stays green under the mutation is not the owner:
98
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
99
+ no valid retire proof.
100
+
88
101
  **Learned planning checks.** A ledger entry whose rule begins
89
102
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
90
103
  the check planning should have run before a dispatched worker had to stop for a
@@ -258,7 +271,13 @@ rejected by rule (see the `promotion-contract` rule):
258
271
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
259
272
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
260
273
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
261
- the mechanical owner / staleness proof per row). Rows are individually
274
+ the mechanical owner / staleness proof per row, and the mutation proof when the
275
+ owner is a test). Every RETIRE row also carries the entry's full
276
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
277
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
278
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
279
+ different identifiers, and only the entry fingerprint shows whether a later
280
+ consolidation rewrote the entry behind the same id. Rows are individually
262
281
  strikeable — the human deletes rows they reject, then flips the ticket ready.
263
282
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
264
283
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -274,6 +293,16 @@ implementing run receives its instructions inside the work item:
274
293
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
275
294
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
276
295
  cite the row's mechanical owner or staleness proof.
296
+ - Delete each RETIRE entry only by calling
297
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
298
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
299
+ never by parse → filter → render in a script, and never by a hand edit.
300
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
301
+ the audit (a later learner run changed or merged into it): skip the row, do
302
+ not delete it, and leave it for the next audit to re-evaluate.
303
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
304
+ in the PR and skip the row. On a concurrent-write error, retry the call
305
+ once; never fall back to a manual edit.
277
306
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
278
307
  without new postdating evidence.
279
308
  <!-- gardener-batch-ticket-template:end -->
@@ -80,6 +80,9 @@ collide.
80
80
  which `CLAUDE.md` is only a `@AGENTS.md` pointer) for these categories.
81
81
  - The **build-intake flows** advance `last_confirmed` at claim time
82
82
  (`confirmLearningEntry`, below).
83
+ - The **implementing run of a gardener CONFIRM/RETIRE batch ticket** removes
84
+ each approved RETIRE entry with `retireLearningEntry` (below), never by
85
+ parse → filter → render or a hand edit.
83
86
 
84
87
  Automated promotion of a captured learning to a higher rung (skill, eager rule,
85
88
  executable control, upstream ticket) is the gardener's job, gated by a human
@@ -128,6 +131,24 @@ entry or file instead of throwing, and is idempotent within a claim (a
128
131
  same-date repeat returns `unchanged`). A failed bump is reported and never
129
132
  blocks the build.
130
133
 
134
+ ## Fingerprint-guarded retirement
135
+
136
+ A gardener RETIRE row's entry is deleted only through
137
+ `retireLearningEntry(projectRoot, id, expectedFingerprint, { onStale })` from
138
+ `@codyswann/lisa/learnings`. It is a
139
+ compare-and-swap delete: inside the same ledger lock the writers use, it
140
+ re-reads the live entry and removes it only when its fingerprint still equals
141
+ `expectedFingerprint` — the full entry fingerprint observed at audit time, never
142
+ the 12-hex gardener marker hash (that value is rejected). If a later
143
+ consolidation rewrote the entry behind the same id, the fingerprint differs: the
144
+ call writes nothing, reports the drift through `onStale`, and returns `stale`
145
+ with the live fingerprint, so the row is skipped and re-audited instead of
146
+ discarding lessons the audit never saw. On a match it removes exactly that
147
+ entry, re-checks the budgets, and writes atomically. On a v2 ledger every other
148
+ entry stays byte-identical; a v1 ledger is migrated to v2 by the same write,
149
+ exactly as `confirmLearningEntry` migrates it. A missing file or unknown id
150
+ returns `not-found` without writing.
151
+
131
152
  Only entries accepted by the executable contract may influence the session. A
132
153
  missing file is expected and silent. Malformed Markdown, invalid JSONL, unsafe
133
154
  paths, non-canonical content, or over-budget documents produce one readable
@@ -83,6 +83,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
83
83
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
87
+ mechanical owner proves nothing until that test has been seen to fail
88
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
89
+ results stays green whatever the code does. For every RETIRE whose proof is
90
+ "owned by a test" (or any other mechanical owner that runs as a check), run
91
+ the mutation proof before filing the row: break the rule the named test
92
+ supposedly guards, run that named test and observe it **fail**, then revert
93
+ the mutation and see it pass again. Record the result in the row — the
94
+ mutation applied, the failing test name and its failure line, and the
95
+ revert. A named owner that stays green under the mutation is not the owner:
96
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
97
+ no valid retire proof.
98
+
86
99
  **Learned planning checks.** A ledger entry whose rule begins
87
100
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
101
  the check planning should have run before a dispatched worker had to stop for a
@@ -256,7 +269,13 @@ rejected by rule (see the `promotion-contract` rule):
256
269
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
257
270
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
258
271
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
259
- the mechanical owner / staleness proof per row). Rows are individually
272
+ the mechanical owner / staleness proof per row, and the mutation proof when the
273
+ owner is a test). Every RETIRE row also carries the entry's full
274
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
275
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
276
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
277
+ different identifiers, and only the entry fingerprint shows whether a later
278
+ consolidation rewrote the entry behind the same id. Rows are individually
260
279
  strikeable — the human deletes rows they reject, then flips the ticket ready.
261
280
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
262
281
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -272,6 +291,16 @@ implementing run receives its instructions inside the work item:
272
291
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
273
292
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
274
293
  cite the row's mechanical owner or staleness proof.
294
+ - Delete each RETIRE entry only by calling
295
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
296
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
297
+ never by parse → filter → render in a script, and never by a hand edit.
298
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
299
+ the audit (a later learner run changed or merged into it): skip the row, do
300
+ not delete it, and leave it for the next audit to re-evaluate.
301
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
302
+ in the PR and skip the row. On a concurrent-write error, retry the call
303
+ once; never fall back to a manual edit.
275
304
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
276
305
  without new postdating evidence.
277
306
  <!-- gardener-batch-ticket-template:end -->
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -83,6 +83,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
83
83
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
87
+ mechanical owner proves nothing until that test has been seen to fail
88
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
89
+ results stays green whatever the code does. For every RETIRE whose proof is
90
+ "owned by a test" (or any other mechanical owner that runs as a check), run
91
+ the mutation proof before filing the row: break the rule the named test
92
+ supposedly guards, run that named test and observe it **fail**, then revert
93
+ the mutation and see it pass again. Record the result in the row — the
94
+ mutation applied, the failing test name and its failure line, and the
95
+ revert. A named owner that stays green under the mutation is not the owner:
96
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
97
+ no valid retire proof.
98
+
86
99
  **Learned planning checks.** A ledger entry whose rule begins
87
100
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
101
  the check planning should have run before a dispatched worker had to stop for a
@@ -256,7 +269,13 @@ rejected by rule (see the `promotion-contract` rule):
256
269
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
257
270
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
258
271
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
259
- the mechanical owner / staleness proof per row). Rows are individually
272
+ the mechanical owner / staleness proof per row, and the mutation proof when the
273
+ owner is a test). Every RETIRE row also carries the entry's full
274
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
275
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
276
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
277
+ different identifiers, and only the entry fingerprint shows whether a later
278
+ consolidation rewrote the entry behind the same id. Rows are individually
260
279
  strikeable — the human deletes rows they reject, then flips the ticket ready.
261
280
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
262
281
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -272,6 +291,16 @@ implementing run receives its instructions inside the work item:
272
291
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
273
292
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
274
293
  cite the row's mechanical owner or staleness proof.
294
+ - Delete each RETIRE entry only by calling
295
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
296
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
297
+ never by parse → filter → render in a script, and never by a hand edit.
298
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
299
+ the audit (a later learner run changed or merged into it): skip the row, do
300
+ not delete it, and leave it for the next audit to re-evaluate.
301
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
302
+ in the PR and skip the row. On a concurrent-write error, retry the call
303
+ once; never fall back to a manual edit.
275
304
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
276
305
  without new postdating evidence.
277
306
  <!-- gardener-batch-ticket-template:end -->
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -80,6 +80,9 @@ collide.
80
80
  which `CLAUDE.md` is only a `@AGENTS.md` pointer) for these categories.
81
81
  - The **build-intake flows** advance `last_confirmed` at claim time
82
82
  (`confirmLearningEntry`, below).
83
+ - The **implementing run of a gardener CONFIRM/RETIRE batch ticket** removes
84
+ each approved RETIRE entry with `retireLearningEntry` (below), never by
85
+ parse → filter → render or a hand edit.
83
86
 
84
87
  Automated promotion of a captured learning to a higher rung (skill, eager rule,
85
88
  executable control, upstream ticket) is the gardener's job, gated by a human
@@ -128,6 +131,24 @@ entry or file instead of throwing, and is idempotent within a claim (a
128
131
  same-date repeat returns `unchanged`). A failed bump is reported and never
129
132
  blocks the build.
130
133
 
134
+ ## Fingerprint-guarded retirement
135
+
136
+ A gardener RETIRE row's entry is deleted only through
137
+ `retireLearningEntry(projectRoot, id, expectedFingerprint, { onStale })` from
138
+ `@codyswann/lisa/learnings`. It is a
139
+ compare-and-swap delete: inside the same ledger lock the writers use, it
140
+ re-reads the live entry and removes it only when its fingerprint still equals
141
+ `expectedFingerprint` — the full entry fingerprint observed at audit time, never
142
+ the 12-hex gardener marker hash (that value is rejected). If a later
143
+ consolidation rewrote the entry behind the same id, the fingerprint differs: the
144
+ call writes nothing, reports the drift through `onStale`, and returns `stale`
145
+ with the live fingerprint, so the row is skipped and re-audited instead of
146
+ discarding lessons the audit never saw. On a match it removes exactly that
147
+ entry, re-checks the budgets, and writes atomically. On a v2 ledger every other
148
+ entry stays byte-identical; a v1 ledger is migrated to v2 by the same write,
149
+ exactly as `confirmLearningEntry` migrates it. A missing file or unknown id
150
+ returns `not-found` without writing.
151
+
131
152
  Only entries accepted by the executable contract may influence the session. A
132
153
  missing file is expected and silent. Malformed Markdown, invalid JSONL, unsafe
133
154
  paths, non-canonical content, or over-budget documents produce one readable
@@ -83,6 +83,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
83
83
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
87
+ mechanical owner proves nothing until that test has been seen to fail
88
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
89
+ results stays green whatever the code does. For every RETIRE whose proof is
90
+ "owned by a test" (or any other mechanical owner that runs as a check), run
91
+ the mutation proof before filing the row: break the rule the named test
92
+ supposedly guards, run that named test and observe it **fail**, then revert
93
+ the mutation and see it pass again. Record the result in the row — the
94
+ mutation applied, the failing test name and its failure line, and the
95
+ revert. A named owner that stays green under the mutation is not the owner:
96
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
97
+ no valid retire proof.
98
+
86
99
  **Learned planning checks.** A ledger entry whose rule begins
87
100
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
101
  the check planning should have run before a dispatched worker had to stop for a
@@ -256,7 +269,13 @@ rejected by rule (see the `promotion-contract` rule):
256
269
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
257
270
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
258
271
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
259
- the mechanical owner / staleness proof per row). Rows are individually
272
+ the mechanical owner / staleness proof per row, and the mutation proof when the
273
+ owner is a test). Every RETIRE row also carries the entry's full
274
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
275
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
276
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
277
+ different identifiers, and only the entry fingerprint shows whether a later
278
+ consolidation rewrote the entry behind the same id. Rows are individually
260
279
  strikeable — the human deletes rows they reject, then flips the ticket ready.
261
280
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
262
281
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -272,6 +291,16 @@ implementing run receives its instructions inside the work item:
272
291
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
273
292
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
274
293
  cite the row's mechanical owner or staleness proof.
294
+ - Delete each RETIRE entry only by calling
295
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
296
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
297
+ never by parse → filter → render in a script, and never by a hand edit.
298
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
299
+ the audit (a later learner run changed or merged into it): skip the row, do
300
+ not delete it, and leave it for the next audit to re-evaluate.
301
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
302
+ in the PR and skip the row. On a concurrent-write error, retry the call
303
+ once; never fall back to a manual edit.
275
304
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
276
305
  without new postdating evidence.
277
306
  <!-- gardener-batch-ticket-template:end -->
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -85,6 +85,9 @@ collide.
85
85
  which `CLAUDE.md` is only a `@AGENTS.md` pointer) for these categories.
86
86
  - The **build-intake flows** advance `last_confirmed` at claim time
87
87
  (`confirmLearningEntry`, below).
88
+ - The **implementing run of a gardener CONFIRM/RETIRE batch ticket** removes
89
+ each approved RETIRE entry with `retireLearningEntry` (below), never by
90
+ parse → filter → render or a hand edit.
88
91
 
89
92
  Automated promotion of a captured learning to a higher rung (skill, eager rule,
90
93
  executable control, upstream ticket) is the gardener's job, gated by a human
@@ -133,6 +136,24 @@ entry or file instead of throwing, and is idempotent within a claim (a
133
136
  same-date repeat returns `unchanged`). A failed bump is reported and never
134
137
  blocks the build.
135
138
 
139
+ ## Fingerprint-guarded retirement
140
+
141
+ A gardener RETIRE row's entry is deleted only through
142
+ `retireLearningEntry(projectRoot, id, expectedFingerprint, { onStale })` from
143
+ `@codyswann/lisa/learnings`. It is a
144
+ compare-and-swap delete: inside the same ledger lock the writers use, it
145
+ re-reads the live entry and removes it only when its fingerprint still equals
146
+ `expectedFingerprint` — the full entry fingerprint observed at audit time, never
147
+ the 12-hex gardener marker hash (that value is rejected). If a later
148
+ consolidation rewrote the entry behind the same id, the fingerprint differs: the
149
+ call writes nothing, reports the drift through `onStale`, and returns `stale`
150
+ with the live fingerprint, so the row is skipped and re-audited instead of
151
+ discarding lessons the audit never saw. On a match it removes exactly that
152
+ entry, re-checks the budgets, and writes atomically. On a v2 ledger every other
153
+ entry stays byte-identical; a v1 ledger is migrated to v2 by the same write,
154
+ exactly as `confirmLearningEntry` migrates it. A missing file or unknown id
155
+ returns `not-found` without writing.
156
+
136
157
  Only entries accepted by the executable contract may influence the session. A
137
158
  missing file is expected and silent. Malformed Markdown, invalid JSONL, unsafe
138
159
  paths, non-canonical content, or over-budget documents produce one readable
@@ -83,6 +83,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
83
83
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
87
+ mechanical owner proves nothing until that test has been seen to fail
88
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
89
+ results stays green whatever the code does. For every RETIRE whose proof is
90
+ "owned by a test" (or any other mechanical owner that runs as a check), run
91
+ the mutation proof before filing the row: break the rule the named test
92
+ supposedly guards, run that named test and observe it **fail**, then revert
93
+ the mutation and see it pass again. Record the result in the row — the
94
+ mutation applied, the failing test name and its failure line, and the
95
+ revert. A named owner that stays green under the mutation is not the owner:
96
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
97
+ no valid retire proof.
98
+
86
99
  **Learned planning checks.** A ledger entry whose rule begins
87
100
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
101
  the check planning should have run before a dispatched worker had to stop for a
@@ -256,7 +269,13 @@ rejected by rule (see the `promotion-contract` rule):
256
269
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
257
270
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
258
271
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
259
- the mechanical owner / staleness proof per row). Rows are individually
272
+ the mechanical owner / staleness proof per row, and the mutation proof when the
273
+ owner is a test). Every RETIRE row also carries the entry's full
274
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
275
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
276
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
277
+ different identifiers, and only the entry fingerprint shows whether a later
278
+ consolidation rewrote the entry behind the same id. Rows are individually
260
279
  strikeable — the human deletes rows they reject, then flips the ticket ready.
261
280
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
262
281
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -272,6 +291,16 @@ implementing run receives its instructions inside the work item:
272
291
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
273
292
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
274
293
  cite the row's mechanical owner or staleness proof.
294
+ - Delete each RETIRE entry only by calling
295
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
296
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
297
+ never by parse → filter → render in a script, and never by a hand edit.
298
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
299
+ the audit (a later learner run changed or merged into it): skip the row, do
300
+ not delete it, and leave it for the next audit to re-evaluate.
301
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
302
+ in the PR and skip the row. On a concurrent-write error, retry the call
303
+ once; never fall back to a manual edit.
275
304
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
276
305
  without new postdating evidence.
277
306
  <!-- gardener-batch-ticket-template:end -->
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -80,6 +80,9 @@ collide.
80
80
  which `CLAUDE.md` is only a `@AGENTS.md` pointer) for these categories.
81
81
  - The **build-intake flows** advance `last_confirmed` at claim time
82
82
  (`confirmLearningEntry`, below).
83
+ - The **implementing run of a gardener CONFIRM/RETIRE batch ticket** removes
84
+ each approved RETIRE entry with `retireLearningEntry` (below), never by
85
+ parse → filter → render or a hand edit.
83
86
 
84
87
  Automated promotion of a captured learning to a higher rung (skill, eager rule,
85
88
  executable control, upstream ticket) is the gardener's job, gated by a human
@@ -128,6 +131,24 @@ entry or file instead of throwing, and is idempotent within a claim (a
128
131
  same-date repeat returns `unchanged`). A failed bump is reported and never
129
132
  blocks the build.
130
133
 
134
+ ## Fingerprint-guarded retirement
135
+
136
+ A gardener RETIRE row's entry is deleted only through
137
+ `retireLearningEntry(projectRoot, id, expectedFingerprint, { onStale })` from
138
+ `@codyswann/lisa/learnings`. It is a
139
+ compare-and-swap delete: inside the same ledger lock the writers use, it
140
+ re-reads the live entry and removes it only when its fingerprint still equals
141
+ `expectedFingerprint` — the full entry fingerprint observed at audit time, never
142
+ the 12-hex gardener marker hash (that value is rejected). If a later
143
+ consolidation rewrote the entry behind the same id, the fingerprint differs: the
144
+ call writes nothing, reports the drift through `onStale`, and returns `stale`
145
+ with the live fingerprint, so the row is skipped and re-audited instead of
146
+ discarding lessons the audit never saw. On a match it removes exactly that
147
+ entry, re-checks the budgets, and writes atomically. On a v2 ledger every other
148
+ entry stays byte-identical; a v1 ledger is migrated to v2 by the same write,
149
+ exactly as `confirmLearningEntry` migrates it. A missing file or unknown id
150
+ returns `not-found` without writing.
151
+
131
152
  Only entries accepted by the executable contract may influence the session. A
132
153
  missing file is expected and silent. Malformed Markdown, invalid JSONL, unsafe
133
154
  paths, non-canonical content, or over-budget documents produce one readable
@@ -83,6 +83,19 @@ a `last_confirmed` bump), **RETIRE** (provably redundant/stale — proof, not
83
83
  vibes), or leave alone. No evidence ⇒ no candidate; the gardener never files
84
84
  a recommendation it cannot evidence.
85
85
 
86
+ **A RETIRE owned by a test needs a mutation proof.** Naming a test as the
87
+ mechanical owner proves nothing until that test has been seen to fail
88
+ without the rule (CodySwannGT/lisa#4530): a test whose fake returns empty
89
+ results stays green whatever the code does. For every RETIRE whose proof is
90
+ "owned by a test" (or any other mechanical owner that runs as a check), run
91
+ the mutation proof before filing the row: break the rule the named test
92
+ supposedly guards, run that named test and observe it **fail**, then revert
93
+ the mutation and see it pass again. Record the result in the row — the
94
+ mutation applied, the failing test name and its failure line, and the
95
+ revert. A named owner that stays green under the mutation is not the owner:
96
+ find the test that does fail, or drop the RETIRE. No failing observation ⇒
97
+ no valid retire proof.
98
+
86
99
  **Learned planning checks.** A ledger entry whose rule begins
87
100
  `Planning (prd|decomposition|ready-gate|filing):` is a `planning-miss` learning:
88
101
  the check planning should have run before a dispatched worker had to stop for a
@@ -256,7 +269,13 @@ rejected by rule (see the `promotion-contract` rule):
256
269
  **One batch ticket per run — CONFIRM + RETIRE** (`issue_type: Task`): a single
257
270
  ticket listing every CONFIRM row (`last_confirmed` bump, with the evidence the
258
271
  entry demonstrably applied) and every **provably-redundant** RETIRE row (with
259
- the mechanical owner / staleness proof per row). Rows are individually
272
+ the mechanical owner / staleness proof per row, and the mutation proof when the
273
+ owner is a test). Every RETIRE row also carries the entry's full
274
+ `expectedFingerprint`: the live `entry.fingerprint` read from the parsed ledger
275
+ at audit time (`learning-` plus 20 hex digits, or a legacy token). It is not the
276
+ 12-hex `<invariant-hash>` in the row's `[lisa-gardener]` marker — the two are
277
+ different identifiers, and only the entry fingerprint shows whether a later
278
+ consolidation rewrote the entry behind the same id. Rows are individually
260
279
  strikeable — the human deletes rows they reject, then flips the ticket ready.
261
280
  The gardener **never bumps `last_confirmed` itself**: the bumps are executed
262
281
  by the **implementing factory run** that picks up the flipped batch ticket.
@@ -272,6 +291,16 @@ implementing run receives its instructions inside the work item:
272
291
  - Implement each surviving RETIRE row as a proof-citing deletion PR per the
273
292
  `promotion-contract` rule's reverse-atomicity clause: the deleting PR must
274
293
  cite the row's mechanical owner or staleness proof.
294
+ - Delete each RETIRE entry only by calling
295
+ `retireLearningEntry(projectRoot, id, expectedFingerprint)` from
296
+ `@codyswann/lisa/learnings` with the row's full `expectedFingerprint` —
297
+ never by parse → filter → render in a script, and never by a hand edit.
298
+ - A RETIRE that returns `stale` means the entry's fingerprint drifted since
299
+ the audit (a later learner run changed or merged into it): skip the row, do
300
+ not delete it, and leave it for the next audit to re-evaluate.
301
+ - A RETIRE that returns `not-found` means the entry is already gone: note it
302
+ in the PR and skip the row. On a concurrent-write error, retry the call
303
+ once; never fall back to a manual edit.
275
304
  - Struck/deleted rows are human rejections — skip them; they are not re-filed
276
305
  without new postdating evidence.
277
306
  <!-- gardener-batch-ticket-template:end -->
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "4.107.11",
3
+ "version": "4.107.12",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"