@codyswann/lisa 2.295.6 → 2.296.1

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 (76) hide show
  1. package/dist/core/learnings-contract.d.ts +23 -1
  2. package/dist/core/learnings-contract.d.ts.map +1 -1
  3. package/dist/core/learnings-contract.js +26 -2
  4. package/dist/core/learnings-contract.js.map +1 -1
  5. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.js +5 -3
  7. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  8. package/dist/opencode/plugin-templates/parity-safety-net-heredoc.py +362 -32
  9. package/dist/opencode/plugin-templates/parity-safety-net.sh +13 -7
  10. package/package.json +1 -1
  11. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  12. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +14 -0
  14. package/plugins/lisa/hooks/parity-safety-net-heredoc.py +362 -32
  15. package/plugins/lisa/hooks/parity-safety-net.sh +13 -7
  16. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +14 -0
  17. package/plugins/lisa-agy/hooks/parity-safety-net-heredoc.py +362 -32
  18. package/plugins/lisa-agy/hooks/parity-safety-net.sh +13 -7
  19. package/plugins/lisa-agy/plugin.json +1 -1
  20. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +14 -0
  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-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/hooks/parity-safety-net-heredoc.py +362 -32
  28. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +13 -7
  29. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +14 -0
  30. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cursor/hooks/parity-safety-net-heredoc.py +362 -32
  32. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +13 -7
  33. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +14 -0
  34. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-agy/plugin.json +1 -1
  37. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  47. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  52. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  57. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-agy/plugin.json +1 -1
  62. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  67. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  72. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/src/base/hooks/parity-safety-net-heredoc.py +362 -32
  75. package/plugins/src/base/hooks/parity-safety-net.sh +13 -7
  76. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +14 -0
@@ -7,6 +7,28 @@
7
7
  export declare const LEARNING_CONFIDENCE_VALUES: readonly ["low", "medium", "high"];
8
8
  /** Confidence vocabulary persisted in every learning entry. */
9
9
  export type LearningConfidence = (typeof LEARNING_CONFIDENCE_VALUES)[number];
10
+ /**
11
+ * Average per-entry byte allowance used to DERIVE the whole-file byte budget
12
+ * (`maxTokens = maxEntries * PER_ENTRY_BYTE_ALLOWANCE`), so the entry cap and
13
+ * the byte cap can never contradict.
14
+ *
15
+ * This is an AVERAGE budget, not a per-entry maximum: `maxTokens` is enforced
16
+ * against the whole rendered document — every entry plus the ```jsonl framing
17
+ * (~72 B observed) — and there is NO per-entry byte cap (`rule` is char-capped
18
+ * at `maxRuleCharacters`; `why` is bounded only by the document total). At 600
19
+ * against a ~490 B observed average, each entry carries ~110 B of headroom, so
20
+ * a full 20-entry ledger budgets 12000 B while real content lands near 9800 B —
21
+ * the ~2.2 KB slack absorbs the document framing many times over and leaves room
22
+ * for larger-than-average entries. A single pathologically large `why` can
23
+ * consume a disproportionate share; that is intended — the document total is the
24
+ * real constraint, and the near-boundary regression test pins that behavior.
25
+ *
26
+ * Historically these were two independently hardcoded numbers — a 20-entry cap
27
+ * and a flat 4000-byte cap — that bound the ledger at ~8 entries, stranding
28
+ * valid captures far under the entry ceiling (CodySwannGT/lisa#1959). Deriving
29
+ * the byte cap from the entry cap removes that contradiction at the source.
30
+ */
31
+ export declare const PER_ENTRY_BYTE_ALLOWANCE = 600;
10
32
  export declare const LEARNINGS_CONTRACT: Readonly<{
11
33
  readonly version: 1;
12
34
  readonly fields: readonly ["id", "rule", "why", "provenance", "first_learned", "last_confirmed", "confidence"];
@@ -14,7 +36,7 @@ export declare const LEARNINGS_CONTRACT: Readonly<{
14
36
  readonly maxRuleLines: 2;
15
37
  readonly maxProvenanceReferences: 20;
16
38
  readonly maxEntries: 20;
17
- readonly maxTokens: 4000;
39
+ readonly maxTokens: number;
18
40
  readonly measurement: "utf8-bytes-upper-bound";
19
41
  }>;
20
42
  /** Complete persisted schema for one project learning. */
@@ -1 +1 @@
1
- {"version":3,"file":"learnings-contract.d.ts","sourceRoot":"","sources":["../../src/core/learnings-contract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,0BAA0B,oCAAqC,CAAC;AAE7E,+DAA+D;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,e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;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -5,6 +5,30 @@
5
5
  * @module learnings-contract
6
6
  */
7
7
  export const LEARNING_CONFIDENCE_VALUES = ["low", "medium", "high"];
8
+ /** Maximum number of durable entries the ledger retains. */
9
+ const MAX_ENTRIES = 20;
10
+ /**
11
+ * Average per-entry byte allowance used to DERIVE the whole-file byte budget
12
+ * (`maxTokens = maxEntries * PER_ENTRY_BYTE_ALLOWANCE`), so the entry cap and
13
+ * the byte cap can never contradict.
14
+ *
15
+ * This is an AVERAGE budget, not a per-entry maximum: `maxTokens` is enforced
16
+ * against the whole rendered document — every entry plus the ```jsonl framing
17
+ * (~72 B observed) — and there is NO per-entry byte cap (`rule` is char-capped
18
+ * at `maxRuleCharacters`; `why` is bounded only by the document total). At 600
19
+ * against a ~490 B observed average, each entry carries ~110 B of headroom, so
20
+ * a full 20-entry ledger budgets 12000 B while real content lands near 9800 B —
21
+ * the ~2.2 KB slack absorbs the document framing many times over and leaves room
22
+ * for larger-than-average entries. A single pathologically large `why` can
23
+ * consume a disproportionate share; that is intended — the document total is the
24
+ * real constraint, and the near-boundary regression test pins that behavior.
25
+ *
26
+ * Historically these were two independently hardcoded numbers — a 20-entry cap
27
+ * and a flat 4000-byte cap — that bound the ledger at ~8 entries, stranding
28
+ * valid captures far under the entry ceiling (CodySwannGT/lisa#1959). Deriving
29
+ * the byte cap from the entry cap removes that contradiction at the source.
30
+ */
31
+ export const PER_ENTRY_BYTE_ALLOWANCE = 600;
8
32
  export const LEARNINGS_CONTRACT = Object.freeze({
9
33
  version: 1,
10
34
  fields: Object.freeze([
@@ -19,8 +43,8 @@ export const LEARNINGS_CONTRACT = Object.freeze({
19
43
  maxRuleCharacters: 240,
20
44
  maxRuleLines: 2,
21
45
  maxProvenanceReferences: 20,
22
- maxEntries: 20,
23
- maxTokens: 4000,
46
+ maxEntries: MAX_ENTRIES,
47
+ maxTokens: MAX_ENTRIES * PER_ENTRY_BYTE_ALLOWANCE,
24
48
  measurement: "utf8-bytes-upper-bound",
25
49
  });
26
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"learnings-contract.js","sourceRoot":"","sources":["../../src/core/learnings-contract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAK7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,IAAI;QACJ,MAAM;QACN,KAAK;QACL,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,YAAY;KACJ,CAAC;IACX,iBAAiB,EAAE,GAAG;IACtB,YAAY,EAAE,CAAC;IACf,uBAAuB,EAAE,EAAE;IAC3B,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,wBAAwB;CAC7B,CAAC,CAAC;AAaZ;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC"}
1
+ {"version":3,"file":"learnings-contract.js","sourceRoot":"","sources":["../../src/core/learnings-contract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAK7E,4DAA4D;AAC5D,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,IAAI;QACJ,MAAM;QACN,KAAK;QACL,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,YAAY;KACJ,CAAC;IACX,iBAAiB,EAAE,GAAG;IACtB,YAAY,EAAE,CAAC;IACf,uBAAuB,EAAE,EAAE;IAC3B,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW,GAAG,wBAAwB;IACjD,WAAW,EAAE,wBAAwB;CAC7B,CAAC,CAAC;AAaZ;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4hEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAovMjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
1
+ {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4hEpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAsvMjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
@@ -292,9 +292,9 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
292
292
  "plugins/src/base/hooks/inject-flow-context.sh": "f4ab07065762d592c0fc36be2e4918e767b293aaa4094b9d85d69010576c6dbf",
293
293
  "plugins/src/base/hooks/inject-rules.sh": "89a3780250e21aefa0eb83235523835ec0f83b25807b1ccc21f7a397a0459842",
294
294
  "plugins/src/base/hooks/install-pkgs.sh": "e9a13faba849a277410dde911ab102ee6f88ef915b33571bb1d4eef904172db5",
295
- "plugins/src/base/hooks/parity-safety-net-heredoc.py": "5acc70d65304d8ef01bf3837cbf0fdc77aae6d6e47c0fec824692fe7091da20b",
295
+ "plugins/src/base/hooks/parity-safety-net-heredoc.py": "4be511d0e325e1df09983feb33023c1feb3b492fc92c16cbb48a08c3aaa5f540",
296
296
  "plugins/src/base/hooks/parity-safety-net.agy.sh": "ce9bd2b4566ad9147e4ace56434cffbbe87edb4ccbb57549ab3fd9f4c671ced4",
297
- "plugins/src/base/hooks/parity-safety-net.sh": "f740f600b255742a50f28e5c9d09427c5783c4084e84052dca46bc1f0c94a187",
297
+ "plugins/src/base/hooks/parity-safety-net.sh": "d12583803e8ff5e4b64e68eafc8d3c377af4c400d8b7ecd1c7fe699d8f92784a",
298
298
  "plugins/src/base/hooks/setup-jira-cli.sh": "a675f6b17ce7f0d6b9fb7daeba6d2bc59bcb48ef79b034076ea73b2b1e72ee09",
299
299
  "plugins/src/base/hooks/shell-write-nudge.sh": "69839af423f8792b1e52c71097316c3264425553031627c0a2f9409a9d5becd0",
300
300
  "plugins/src/base/hooks/threshold-ratchet-compare.mjs": "8bc4b379d7057b2fecf9cb35820c39efad0a65df7df49073786f996cc2a74810",
@@ -485,7 +485,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
485
485
  "plugins/src/base/skills/lisa-parity-sentry-seer/SKILL.md": "f44216fa7c8f0c3c3371c65ff73bbeadd1717579502a5603f16b3b33291cab7a",
486
486
  "plugins/src/base/skills/lisa-parity-skill-creator/SKILL.md": "616e0493f75fe92c18137548d7c86a91a9b04d9844ca76fa3f14156e3e7814e5",
487
487
  "plugins/src/base/skills/lisa-performance-review/SKILL.md": "351542c256e54940e6d672a70606b8414425c6435ae6f026841bcc02f9fce9c4",
488
- "plugins/src/base/skills/lisa-persist-learning/SKILL.md": "79fe00903541330b7ca088ad3fde4fec32a2cff8954974bf0bd71910e0ff0eb8",
488
+ "plugins/src/base/skills/lisa-persist-learning/SKILL.md": "d682b944ae099cdad8c91762b6665b8ef613b58bb8b041335841c116c94dd891",
489
489
  "plugins/src/base/skills/lisa-plan/SKILL.md": "9c372e106afd53ff988046119cf36b0f6519c4426775dd8ad3c9d9baeee5d3e2",
490
490
  "plugins/src/base/skills/lisa-plugin-sync-explain/SKILL.md": "b41619f3d0d342af2438afd54cb97db7d2445e54e3fc7bb012292079acbc6a4f",
491
491
  "plugins/src/base/skills/lisa-posthog-access/SKILL.md": "977aef803160b04312c0408136882ac106d8357caf5063a523e72f265bf20cb1",
@@ -6851,6 +6851,8 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
6851
6851
  "tests/unit/hooks/install-pkgs-worktree-node-modules.test.ts": true,
6852
6852
  "tests/unit/hooks/lint-on-edit.test.ts": true,
6853
6853
  "tests/unit/hooks/parity-safety-net-guards.test.ts": true,
6854
+ "tests/unit/hooks/parity-safety-net-heredoc-continuation.test.ts": true,
6855
+ "tests/unit/hooks/parity-safety-net-heredoc-literal.test.ts": true,
6854
6856
  "tests/unit/hooks/parity-safety-net-heredoc.test.ts": true,
6855
6857
  "tests/unit/hooks/parity-safety-net.test.ts": true,
6856
6858
  "tests/unit/hooks/post-checkout.test.ts": true,