@codyswann/lisa 3.69.4 → 3.69.6

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 (71) hide show
  1. package/all/copy-overwrite/scripts/lisa-gates.mjs +200 -15
  2. package/dist/cli/doctor-skip-jobs-migration.d.ts.map +1 -1
  3. package/dist/cli/doctor-skip-jobs-migration.js +6 -0
  4. package/dist/cli/doctor-skip-jobs-migration.js.map +1 -1
  5. package/dist/cli/gate-report-sections.d.ts.map +1 -1
  6. package/dist/cli/gate-report-sections.js +2 -0
  7. package/dist/cli/gate-report-sections.js.map +1 -1
  8. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  9. package/dist/core/lisa-owned-hash-ledger.js +11 -0
  10. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  11. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  12. package/dist/core/upstream-evidence-manifest.js +13 -8
  13. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  14. package/expo/copy-overwrite/scripts/bdd/contract.mjs +41 -2
  15. package/expo/copy-overwrite/scripts/bdd/envelope.mjs +18 -68
  16. package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +135 -206
  17. package/expo/create-only/bdd/coverage-map.json +1 -7
  18. package/package.json +1 -1
  19. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  21. package/plugins/lisa-agy/plugin.json +1 -1
  22. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  25. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-expo-agy/plugin.json +1 -1
  32. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  47. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  52. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser-cursor/.claude-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-typescript/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  62. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  67. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  69. package/scripts/check-learnings-budget.ts +93 -18
  70. package/typescript/create-only/.github/workflows/required-checks-drift.yml +10 -4
  71. package/typescript/github-rulesets/quality-checks.json +4 -0
@@ -78,8 +78,47 @@ export const TRACKER_KEY_PATTERN = /^([A-Z][A-Z0-9]{1,9})-(\d+)$/;
78
78
  /** Repo-issue style tracker tag. Group 1 is an optional repo slug. */
79
79
  export const TRACKER_GH_PATTERN = /^gh-(?:([a-z0-9]+(?:-[a-z0-9]+)*)-)?(\d+)$/;
80
80
 
81
- /** Adoption states. The ruleset context is required ONLY in `enforced`. */
82
- export const ADOPTION_STATES = ["not-adopted", "bootstrap", "enforced"];
81
+ /**
82
+ * The three enforcement levels a project may declare this gate at.
83
+ *
84
+ * Restated here, and asserted equal to the registry's `LEVELS` by a unit test,
85
+ * so the prover can name the valid vocabulary in a refusal message without
86
+ * importing the registry — which lives in a different template directory and
87
+ * is not guaranteed to be installed beside this gate.
88
+ */
89
+ export const GATE_LEVELS = ["required", "optional", "off"];
90
+
91
+ /**
92
+ * Adoption vocabulary Lisa used to read, with what to say about each.
93
+ *
94
+ * The gate had its OWN adoption axis — a `BDD_MODE` workflow input mirrored by
95
+ * an `adoption` block in the coverage map — running alongside the gate registry
96
+ * that every other quality job answers to. Two controls for one question, and
97
+ * the losing one lost silently.
98
+ *
99
+ * `bootstrap` was the reason that axis looked necessary: a visible,
100
+ * non-blocking check with a named owner and a hard expiry, which is `optional`
101
+ * plus paperwork. A grace period does not belong in an adoption vocabulary at
102
+ * all — it hides red, which is the opposite of what adoption is for — so the
103
+ * state was removed and the axis with it.
104
+ *
105
+ * Distinguished from a merely unrecognised value because the gate *knows* what
106
+ * these were and can say something useful. An unrecognised value might be a
107
+ * typo; a retired one is not, and telling its author to check for a typo sends
108
+ * them looking for a mistake they did not make.
109
+ */
110
+ export const RETIRED_ADOPTION_STATES = Object.freeze({
111
+ bootstrap:
112
+ "retired — a time-boxed grace period is `optional` carrying an owner and a " +
113
+ "date, and it hid red rather than showing it. Declare the gate at one of " +
114
+ `${GATE_LEVELS.join(", ")} instead.`,
115
+ "not-adopted":
116
+ "retired — absence of a declaration is no longer a state the gate carries. " +
117
+ `Declare the gate at one of ${GATE_LEVELS.join(", ")} instead.`,
118
+ enforced:
119
+ "retired — enforcement is what a declared gate does. Declare the gate at " +
120
+ `one of ${GATE_LEVELS.join(", ")} instead.`,
121
+ });
83
122
 
84
123
  /**
85
124
  * Classify a raw tag as a tracker reference, if it is one.
@@ -31,59 +31,6 @@ const ENVELOPE_MODULE_PATHS = Object.freeze([
31
31
  "../../../all/copy-overwrite/scripts/lisa-command-envelope.mjs",
32
32
  ]);
33
33
 
34
- /**
35
- * Defect codes bootstrap is PERMITTED to downgrade to a warning.
36
- *
37
- * This is an allowlist and it is load-bearing: an unrecognized code — a new
38
- * check, a typo, a future contributor's addition — is treated as FATAL. A
39
- * denylist of "fatal codes" would fail OPEN on exactly the value nobody
40
- * anticipated, which is how a gate quietly stops gating.
41
- *
42
- * Everything here is a contract-QUALITY defect: the manifest is legible and
43
- * the adoption state is coherent, the contract just is not clean yet. Codes
44
- * about adoption integrity itself (bootstrap-metadata, bootstrap-expired,
45
- * adoption-drift, config-*, discovery-invalid) are deliberately absent, so
46
- * they always fail: a malformed discovery block would silently switch off the
47
- * only check that can see an undeclared test, exactly as a quoted coverage
48
- * floor silently switches off the bar (`floor-invalid`, likewise absent).
49
- */
50
- export const WARNABLE_DEFECT_CODES = Object.freeze([
51
- "baseline",
52
- "coverage-regression",
53
- "discovery-missing",
54
- "empty-contract",
55
- "exclusion-metadata",
56
- "exclusion-stale",
57
- "execution-results",
58
- "floor-missing",
59
- "floor-regression",
60
- "mapping-duplicate",
61
- "mapping-evidence",
62
- "mapping-file",
63
- "mapping-orphan",
64
- "mapping-platform",
65
- "mapping-runner",
66
- "obligation-uncovered",
67
- "scenario-deleted",
68
- "scenario-duplicate-id",
69
- "scenario-id",
70
- "scenario-lifecycle",
71
- "scenario-platform",
72
- "scenario-provenance",
73
- "scenario-steps",
74
- "spec-undisclosed",
75
- "tracker-missing",
76
- "tracker-orphan",
77
- "waiver-duplicate",
78
- "waiver-excluded",
79
- "waiver-expired",
80
- "waiver-masks-mapping",
81
- "waiver-metadata",
82
- "waiver-orphan",
83
- "waiver-platform",
84
- "waiver-runner",
85
- ]);
86
-
87
34
  /**
88
35
  * Envelope statuses that may exit 0.
89
36
  *
@@ -128,19 +75,19 @@ export function subjectFor(item) {
128
75
  }
129
76
 
130
77
  /**
131
- * Whether any defect must fail the run, given the adoption state.
78
+ * Whether any defect must fail the run.
132
79
  *
133
- * `enforced` fails on any defect at all. `bootstrap` fails on any defect
134
- * whose code is NOT on the warnable allowlist. `not-adopted` reaches here
135
- * only with adoption-integrity defects, which are never warnable.
136
- * @param {string} adoptionState - not-adopted | bootstrap | enforced.
80
+ * Every defect does. There used to be a per-code severity split — an allowlist
81
+ * of 34 contract-quality codes that a `bootstrap` run graded `warning` and
82
+ * exited 0 on — and the split existed only to make that grace period possible.
83
+ * With the grace period gone the allowlist has nothing left to serve: a project
84
+ * that does not want this property enforced declares the gate `off`, which is a
85
+ * decision someone can read, rather than a green check that found 500 defects.
137
86
  * @param {readonly object[]} defects - Defects found.
138
87
  * @returns {boolean} True when the run must fail.
139
88
  */
140
- export function hasFatalDefect(adoptionState, defects) {
141
- if (defects.length === 0) return false;
142
- if (adoptionState === "enforced") return true;
143
- return defects.some(item => !WARNABLE_DEFECT_CODES.includes(item.code));
89
+ export function hasFatalDefect(defects) {
90
+ return defects.length > 0;
144
91
  }
145
92
 
146
93
  /**
@@ -187,23 +134,26 @@ export function contractVersion(contract) {
187
134
  }
188
135
 
189
136
  /**
190
- * Counters describing the run, plus the adoption state the counts belong to.
137
+ * Counters describing the run.
191
138
  *
192
139
  * The five facts stay separate here exactly as they do in the report: what is
193
140
  * DECLARED, what is MAPPED (traceability), what RAN, what those runs
194
141
  * RETURNED, and what is WAIVED. A reader comparing two runs must never have
195
142
  * to infer which one a percentage refers to.
196
- * @param {object} input - Adoption state, report, defects, and files written.
143
+ *
144
+ * There is no `findingsWarning` counter and no `adoptionState`. Both belonged
145
+ * to the retired adoption axis: severity was decided by it, and the state was
146
+ * the axis itself. A finding is a finding, and whether the property is governed
147
+ * at all is answered by the gate declaration, one layer out.
148
+ * @param {object} input - Report, defects, and files written.
197
149
  * @returns {object} The envelope's `summary`.
198
150
  */
199
- export function buildSummary({ adoptionState, report, defects, filesWritten }) {
151
+ export function buildSummary({ report, defects, filesWritten }) {
200
152
  const counts = {
201
153
  deleted: 0,
202
154
  created: filesWritten,
203
155
  preserved: 0,
204
- adoptionState,
205
- findingsError: defects.filter(item => item.severity === "error").length,
206
- findingsWarning: defects.filter(item => item.severity === "warning").length,
156
+ findings: defects.length,
207
157
  };
208
158
  if (!report) return counts;
209
159
  return {