@codyswann/lisa 2.180.0 → 2.181.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/all/copy-contents/gitignore +206 -0
  2. package/dist/strategies/copy-contents.d.ts.map +1 -1
  3. package/dist/strategies/copy-contents.js +27 -8
  4. package/dist/strategies/copy-contents.js.map +1 -1
  5. package/harper-fabric/copy-contents/gitignore +8 -0
  6. package/package.json +1 -1
  7. package/phaser/copy-contents/gitignore +5 -0
  8. package/phaser/package-lisa/package.lisa.json +8 -2
  9. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  11. package/plugins/lisa/rules/eager/verification.md +6 -0
  12. package/plugins/lisa/rules/reference/verification.md +47 -0
  13. package/plugins/lisa/skills/codify-verification/SKILL.md +10 -0
  14. package/plugins/lisa-agy/plugin.json +1 -1
  15. package/plugins/lisa-agy/skills/codify-verification/SKILL.md +10 -0
  16. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  19. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-copilot/rules/eager/verification.md +6 -0
  23. package/plugins/lisa-copilot/rules/reference/verification.md +47 -0
  24. package/plugins/lisa-copilot/skills/codify-verification/SKILL.md +10 -0
  25. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cursor/rules/verification-reference.mdc +47 -0
  27. package/plugins/lisa-cursor/rules/verification.mdc +6 -0
  28. package/plugins/lisa-cursor/skills/codify-verification/SKILL.md +10 -0
  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/plugins/src/base/rules/eager/verification.md +6 -0
  70. package/plugins/src/base/rules/reference/verification.md +47 -0
  71. package/plugins/src/base/skills/codify-verification/SKILL.md +10 -0
  72. package/typescript/copy-overwrite/scripts/check-verification-coverage.mjs +159 -0
@@ -0,0 +1,159 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * check-verification-coverage — per-change verification (UAT) gate.
4
+ *
5
+ * Verification IS UAT — one gate, not two. This fails a feat/fix change that
6
+ * ships no verification-spec delta (the project's e2e/Playwright tests, where
7
+ * `codify-verification` lands the codified playthrough), so every behavioral
8
+ * change carries an acceptance test an agent's verification produced. A genuinely
9
+ * non-behavioral change may carry the `verification-exempt` label, which this
10
+ * check honors but LOGS (never a silent skip).
11
+ *
12
+ * Inputs (all via env, CI-friendly):
13
+ * VERIFY_BASE_SHA diff base (else falls back to `origin/<VERIFY_BASE_REF|main>...HEAD`)
14
+ * VERIFY_HEAD_SHA diff head (default HEAD)
15
+ * VERIFY_BASE_REF base branch for the fallback range (default main)
16
+ * VERIFY_CHANGE_TYPES comma list of conventional-commit types in the change
17
+ * (e.g. "feat,chore"); if empty, derived from commit subjects
18
+ * VERIFY_LABELS comma list of PR labels (for `verification-exempt`)
19
+ *
20
+ * Exit 0 = satisfied / exempt / not-required. Exit 1 = required but missing.
21
+ * @module scripts/check-verification-coverage
22
+ */
23
+ import { execSync } from "node:child_process";
24
+ import { pathToFileURL } from "node:url";
25
+
26
+ const BEHAVIORAL_TYPES = new Set(["feat", "fix"]);
27
+ const EXEMPT_LABEL = "verification-exempt";
28
+ // A verification spec lives in a top-level e2e/ dir, a nested tests/e2e/ tree,
29
+ // or a tests/verification/ tree — NOT an arbitrary path that merely contains an
30
+ // "e2e" segment (e.g. src/e2e/helpers.ts must not satisfy the gate).
31
+ const VERIFICATION_PATH = /^e2e\/|(^|\/)tests\/(e2e|verification)\//;
32
+
33
+ /**
34
+ * Pure decision: is a verification-spec delta required, and is it satisfied?
35
+ * @param {object} input - Evaluation input
36
+ * @param {string[]} input.changedFiles - Paths changed in the range
37
+ * @param {string[]} input.changeTypes - Conventional-commit types present
38
+ * @param {string[]} input.labels - PR labels
39
+ * @returns {{required: boolean, ok: boolean, exempt?: boolean, reason: string}} Verdict
40
+ */
41
+ export function evaluateVerificationCoverage({
42
+ changedFiles,
43
+ changeTypes,
44
+ labels,
45
+ }) {
46
+ const isBehavioral = changeTypes.some(type => BEHAVIORAL_TYPES.has(type));
47
+ const isExempt = labels.includes(EXEMPT_LABEL);
48
+ const hasDelta = changedFiles.some(file => VERIFICATION_PATH.test(file));
49
+
50
+ if (!isBehavioral) {
51
+ return {
52
+ required: false,
53
+ ok: true,
54
+ reason: "No feat/fix change — a verification-spec delta is not required.",
55
+ };
56
+ }
57
+ if (isExempt) {
58
+ return {
59
+ required: true,
60
+ ok: true,
61
+ exempt: true,
62
+ reason: `Behavioral change exempted by the '${EXEMPT_LABEL}' label.`,
63
+ };
64
+ }
65
+ if (hasDelta) {
66
+ return {
67
+ required: true,
68
+ ok: true,
69
+ reason: "Behavioral change ships a verification (e2e) spec delta.",
70
+ };
71
+ }
72
+ return {
73
+ required: true,
74
+ ok: false,
75
+ reason: `Behavioral change (feat/fix) ships NO verification (e2e) spec and is not labeled '${EXEMPT_LABEL}'.`,
76
+ };
77
+ }
78
+
79
+ /**
80
+ * Gather the change context from git + env.
81
+ * @returns {{changedFiles: string[], changeTypes: string[], labels: string[]}} Context
82
+ */
83
+ function gatherContext() {
84
+ const head = process.env.VERIFY_HEAD_SHA || "HEAD";
85
+ const baseRef = process.env.VERIFY_BASE_REF || "main";
86
+ const base = process.env.VERIFY_BASE_SHA || `origin/${baseRef}`;
87
+ // Three-dot diff = the PR's "files changed" (merge-base), matching GitHub.
88
+ // Two-dot log = the commits the PR introduces (not both tips).
89
+ const diffRange = `${base}...${head}`;
90
+ const logRange = `${base}..${head}`;
91
+
92
+ const runGit = (cmd, fallback) => {
93
+ try {
94
+ return execSync(cmd, { encoding: "utf8" });
95
+ } catch {
96
+ return fallback;
97
+ }
98
+ };
99
+
100
+ const changedFiles = runGit(`git diff --name-only ${diffRange}`, "")
101
+ .split("\n")
102
+ .map(line => line.trim())
103
+ .filter(Boolean);
104
+
105
+ const fromEnv = (process.env.VERIFY_CHANGE_TYPES || "")
106
+ .split(",")
107
+ .map(value => value.trim().toLowerCase())
108
+ .filter(Boolean);
109
+ const fromCommits = fromEnv.length
110
+ ? []
111
+ : runGit(`git log --format=%s ${logRange}`, "")
112
+ .split("\n")
113
+ .map(subject => {
114
+ const match = subject.match(/^(\w+)[(!:]/);
115
+ return match ? match[1].toLowerCase() : null;
116
+ })
117
+ .filter(Boolean);
118
+ const changeTypes = [...new Set([...fromEnv, ...fromCommits])];
119
+
120
+ const labels = (process.env.VERIFY_LABELS || "")
121
+ .split(",")
122
+ .map(value => value.trim())
123
+ .filter(Boolean);
124
+
125
+ return { changedFiles, changeTypes, labels };
126
+ }
127
+
128
+ /**
129
+ * CLI entry: evaluate and exit non-zero when a required verification delta is missing.
130
+ * @returns {void}
131
+ */
132
+ function main() {
133
+ const context = gatherContext();
134
+ const result = evaluateVerificationCoverage(context);
135
+ console.log(
136
+ `[verification-coverage] types=[${context.changeTypes.join(
137
+ ","
138
+ )}] labels=[${context.labels.join(",")}]`
139
+ );
140
+ console.log(`[verification-coverage] ${result.reason}`);
141
+ if (result.exempt) {
142
+ console.log(
143
+ "[verification-coverage] EXEMPT (logged): proceeding without a verification delta for a declared non-behavioral change."
144
+ );
145
+ }
146
+ if (!result.ok) {
147
+ console.error(`[verification-coverage] FAIL: ${result.reason}`);
148
+ process.exit(1);
149
+ }
150
+ console.log("[verification-coverage] OK");
151
+ }
152
+
153
+ // Run only when invoked directly — importing for tests must have no side effects.
154
+ if (
155
+ process.argv[1] &&
156
+ import.meta.url === pathToFileURL(process.argv[1]).href
157
+ ) {
158
+ main();
159
+ }