@codyswann/lisa 2.205.0 → 2.206.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.
- package/dist/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +6 -0
- package/dist/sync/registry.js.map +1 -1
- package/expo/copy-overwrite/scripts/check-e2e-coverage.mjs +374 -0
- package/expo/create-only/e2e.thresholds.json +8 -0
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/rules/eager/upstream-to-lisa.md +8 -3
- package/plugins/lisa/rules/reference/upstream-to-lisa.md +15 -4
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/eager/upstream-to-lisa.md +8 -3
- package/plugins/lisa-copilot/rules/reference/upstream-to-lisa.md +15 -4
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/upstream-to-lisa-reference.mdc +15 -4
- package/plugins/lisa-cursor/rules/upstream-to-lisa.mdc +8 -3
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/eager/upstream-to-lisa.md +8 -3
- package/plugins/src/base/rules/reference/upstream-to-lisa.md +15 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAoCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAoCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAgIjD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EA0C/C,CAAC"}
|
package/dist/sync/registry.js
CHANGED
|
@@ -49,6 +49,12 @@ export const SYNC_REGISTRY = [
|
|
|
49
49
|
],
|
|
50
50
|
description: "Test coverage floors (statements/branches/functions/lines)",
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
key: "quality.e2eCoverage",
|
|
54
|
+
defaultValue: { playwright: { routes: 80 }, maestro: { routes: 80 } },
|
|
55
|
+
artifacts: [{ file: "e2e.thresholds.json", pointer: "" }],
|
|
56
|
+
description: "E2E route/screen coverage floors (Playwright web routes, Maestro screens)",
|
|
57
|
+
},
|
|
52
58
|
{
|
|
53
59
|
key: "quality.lintBudgets",
|
|
54
60
|
defaultValue: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAsDA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C,MAAM,iBAAiB,GAAc;IACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CACnE,CAAC;AAEF,MAAM,oBAAoB,GAAG;IAC3B,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE;QACJ,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,eAAe;QACxB,UAAU,EAAE,aAAa;KAC1B;CACO,CAAC;AAEX,MAAM,kBAAkB,GAAc;IACpC,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,cAAc;IACxB,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,cAAc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,cAAc;QACnB,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,SAAS,EAAE,kBAAkB;KAC9B;IACD;QACE,GAAG,EAAE,mBAAmB;QACxB,YAAY,EAAE,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;QACtD,SAAS,EAAE,uBAAuB;KACnC;IACD;QACE,GAAG,EAAE,YAAY;QACjB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,aAAa;QAClB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,kBAAkB;QACvB,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;QACvD,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,oBAAoB;QACzB,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,YAAY,EAAE,CAAC,kBAAkB,CAAC;QAClC,SAAS,EAAE,oBAAoB;KAChC;CACF,CAAC"}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* check-e2e-coverage — aggregate e2e route/screen coverage gate (Expo).
|
|
4
|
+
*
|
|
5
|
+
* The e2e counterpart of the unit-test coverage thresholds: where Vitest/Jest
|
|
6
|
+
* gate on line coverage, this gates on SURFACE coverage — the percentage of
|
|
7
|
+
* expo-router routes exercised by at least one e2e spec, computed per runner:
|
|
8
|
+
*
|
|
9
|
+
* - Playwright: routes visited via `page.goto("<path>")` in e2e specs
|
|
10
|
+
* (top-level `e2e/` or nested `tests/e2e/` trees).
|
|
11
|
+
* - Maestro: screens opened via `openLink: <deep link>` in `.maestro/` flows.
|
|
12
|
+
*
|
|
13
|
+
* Maestro is black-box (no code-coverage hook exists for a compiled native
|
|
14
|
+
* app), so route coverage is the shared metric both runners can honor. A spec
|
|
15
|
+
* or flow that reaches a screen by tapping rather than deep-linking can declare
|
|
16
|
+
* it with an `e2e-route: /path` comment annotation (JS/TS or YAML comment).
|
|
17
|
+
*
|
|
18
|
+
* Thresholds default to 80% per runner and are project-tunable via
|
|
19
|
+
* `e2e.thresholds.json` (create-only, same convention as vitest.thresholds.json):
|
|
20
|
+
* { "playwright": { "routes": 80 }, "maestro": { "routes": 80 } }
|
|
21
|
+
* A runner threshold of 0 disables that runner's gate (logged, never silent).
|
|
22
|
+
*
|
|
23
|
+
* Inputs (env, CI-friendly):
|
|
24
|
+
* E2E_COVERAGE_ROOT project root to scan (default: cwd)
|
|
25
|
+
*
|
|
26
|
+
* Exit 0 = every runner meets its threshold (or nothing to gate).
|
|
27
|
+
* Exit 1 = at least one runner is under threshold; uncovered routes are listed.
|
|
28
|
+
* @module scripts/check-e2e-coverage
|
|
29
|
+
*/
|
|
30
|
+
import * as fs from "node:fs";
|
|
31
|
+
import * as path from "node:path";
|
|
32
|
+
import { pathToFileURL } from "node:url";
|
|
33
|
+
|
|
34
|
+
export const defaultThresholds = {
|
|
35
|
+
playwright: { routes: 80 },
|
|
36
|
+
maestro: { routes: 80 },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ROUTE_FILE_PATTERN = /\.(?:tsx|ts|jsx|js)$/;
|
|
40
|
+
const SPEC_FILE_PATTERN = /\.(?:tsx|ts|jsx|js|mjs)$/;
|
|
41
|
+
const FLOW_FILE_PATTERN = /\.(?:yaml|yml)$/;
|
|
42
|
+
// `e2e-route: /path` inside any comment declares a route as covered even when
|
|
43
|
+
// the spec reaches it by tapping/navigating rather than by URL or deep link.
|
|
44
|
+
const ROUTE_ANNOTATION_PATTERN = /e2e-route:\s*(\/[^\s'"`,)]*)/g;
|
|
45
|
+
const GOTO_PATTERN = /\.goto\(\s*(["'`])([^"'`]+)\1/g;
|
|
46
|
+
const OPEN_LINK_PATTERN = /openLink:\s*["']?([^\s"']+)/g;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Derive the expo-router route for one file inside the app directory.
|
|
50
|
+
* Layouts (`_layout`), private files (`_*`), special files (`+not-found`,
|
|
51
|
+
* `+html`) and API routes (`*+api`) are not navigable screens and return null.
|
|
52
|
+
* @param {string} relativePath - Path relative to the app directory
|
|
53
|
+
* @returns {string | null} Route path (e.g. "/profile/[id]"), or null
|
|
54
|
+
*/
|
|
55
|
+
export function routeFromFile(relativePath) {
|
|
56
|
+
if (!ROUTE_FILE_PATTERN.test(relativePath)) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const withoutExtension = relativePath.replace(ROUTE_FILE_PATTERN, "");
|
|
60
|
+
const rawSegments = withoutExtension.split("/");
|
|
61
|
+
const basename = rawSegments[rawSegments.length - 1];
|
|
62
|
+
if (basename.startsWith("+") || basename.endsWith("+api")) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (rawSegments.some(segment => segment.startsWith("_"))) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const segments = rawSegments
|
|
69
|
+
// Route groups like "(tabs)" organize files without affecting the URL.
|
|
70
|
+
.filter(segment => !(segment.startsWith("(") && segment.endsWith(")")))
|
|
71
|
+
.filter(segment => segment !== "index");
|
|
72
|
+
return `/${segments.join("/")}`.replace(/\/+/g, "/");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Enumerate the unique navigable routes for a set of app-directory files.
|
|
77
|
+
* @param {string[]} files - Paths relative to the app directory
|
|
78
|
+
* @returns {string[]} Sorted unique route paths
|
|
79
|
+
*/
|
|
80
|
+
export function enumerateRoutes(files) {
|
|
81
|
+
const routes = files
|
|
82
|
+
.map(file => routeFromFile(file))
|
|
83
|
+
.filter(route => route !== null);
|
|
84
|
+
return [...new Set(routes)].sort();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Normalize a visited URL or deep link to a route-comparable path.
|
|
89
|
+
* Handles absolute paths, http(s) URLs, custom-scheme deep links
|
|
90
|
+
* (`myapp://profile/1` → `/profile/1`), and Expo dev-client URLs
|
|
91
|
+
* (`exp://host:8081/--/profile` → `/profile`).
|
|
92
|
+
* @param {string} raw - The literal URL/path from a spec or flow
|
|
93
|
+
* @returns {string | null} Normalized path, or null when not a navigation
|
|
94
|
+
*/
|
|
95
|
+
export function normalizeVisitedPath(raw) {
|
|
96
|
+
if (!raw) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
const withoutQuery = raw.split(/[?#]/)[0];
|
|
100
|
+
const devClientSplit = withoutQuery.split("/--/");
|
|
101
|
+
if (devClientSplit.length > 1) {
|
|
102
|
+
return normalizeVisitedPath(`/${devClientSplit[1]}`);
|
|
103
|
+
}
|
|
104
|
+
const schemeMatch = withoutQuery.match(/^([a-zA-Z][\w+.-]*):\/\/(.*)$/);
|
|
105
|
+
const pathPart = schemeMatch
|
|
106
|
+
? schemeMatch[1] === "http" || schemeMatch[1] === "https"
|
|
107
|
+
? // http(s): the first segment is the host, the rest is the path.
|
|
108
|
+
`/${schemeMatch[2].split("/").slice(1).join("/")}`
|
|
109
|
+
: // Custom scheme: everything after :// is the route.
|
|
110
|
+
`/${schemeMatch[2]}`
|
|
111
|
+
: withoutQuery.startsWith("/")
|
|
112
|
+
? withoutQuery
|
|
113
|
+
: `/${withoutQuery.replace(/^\.\//, "")}`;
|
|
114
|
+
const collapsed = pathPart.replace(/\/+/g, "/");
|
|
115
|
+
const trimmed =
|
|
116
|
+
collapsed.length > 1 ? collapsed.replace(/\/$/, "") : collapsed;
|
|
117
|
+
return trimmed || "/";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Extract every route-comparable path a Playwright spec visits.
|
|
122
|
+
* @param {string} source - Spec file contents
|
|
123
|
+
* @returns {string[]} Normalized visited paths
|
|
124
|
+
*/
|
|
125
|
+
export function extractPlaywrightPaths(source) {
|
|
126
|
+
const fromGoto = [...source.matchAll(GOTO_PATTERN)].map(match => match[2]);
|
|
127
|
+
const fromAnnotations = [...source.matchAll(ROUTE_ANNOTATION_PATTERN)].map(
|
|
128
|
+
match => match[1]
|
|
129
|
+
);
|
|
130
|
+
return [...fromGoto, ...fromAnnotations]
|
|
131
|
+
.map(visited => normalizeVisitedPath(visited))
|
|
132
|
+
.filter(visited => visited !== null);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Extract every route-comparable path a Maestro flow opens.
|
|
137
|
+
* @param {string} source - Flow YAML contents
|
|
138
|
+
* @returns {string[]} Normalized visited paths
|
|
139
|
+
*/
|
|
140
|
+
export function extractMaestroPaths(source) {
|
|
141
|
+
const fromOpenLink = [...source.matchAll(OPEN_LINK_PATTERN)].map(
|
|
142
|
+
match => match[1]
|
|
143
|
+
);
|
|
144
|
+
const fromAnnotations = [...source.matchAll(ROUTE_ANNOTATION_PATTERN)].map(
|
|
145
|
+
match => match[1]
|
|
146
|
+
);
|
|
147
|
+
return [...fromOpenLink, ...fromAnnotations]
|
|
148
|
+
.map(visited => normalizeVisitedPath(visited))
|
|
149
|
+
.filter(visited => visited !== null);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Does a visited path satisfy a route? Dynamic segments (`[id]`) match any
|
|
154
|
+
* one segment, catch-alls (`[...rest]`) match one or more, and interpolated
|
|
155
|
+
* spec segments (template `${...}` holes) match any route segment.
|
|
156
|
+
* @param {string} route - Enumerated route (e.g. "/profile/[id]")
|
|
157
|
+
* @param {string} visited - Normalized visited path (e.g. "/profile/42")
|
|
158
|
+
* @returns {boolean} Whether the visit covers the route
|
|
159
|
+
*/
|
|
160
|
+
export function routeMatchesVisit(route, visited) {
|
|
161
|
+
const routeSegments = route.split("/").filter(Boolean);
|
|
162
|
+
const visitedSegments = visited.split("/").filter(Boolean);
|
|
163
|
+
const isCovered = (routeIndex, visitedIndex) => {
|
|
164
|
+
if (routeIndex === routeSegments.length) {
|
|
165
|
+
return visitedIndex === visitedSegments.length;
|
|
166
|
+
}
|
|
167
|
+
const segment = routeSegments[routeIndex];
|
|
168
|
+
if (/^\[\.\.\..*\]$/.test(segment)) {
|
|
169
|
+
return visitedIndex < visitedSegments.length;
|
|
170
|
+
}
|
|
171
|
+
if (visitedIndex === visitedSegments.length) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
const visitedSegment = visitedSegments[visitedIndex];
|
|
175
|
+
const segmentMatches =
|
|
176
|
+
/^\[.*\]$/.test(segment) ||
|
|
177
|
+
visitedSegment.includes("${") ||
|
|
178
|
+
segment === visitedSegment;
|
|
179
|
+
return segmentMatches && isCovered(routeIndex + 1, visitedIndex + 1);
|
|
180
|
+
};
|
|
181
|
+
return isCovered(0, 0);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Merge project threshold overrides over the defaults, per runner.
|
|
186
|
+
* @param {typeof defaultThresholds} defaults - Baseline thresholds
|
|
187
|
+
* @param {object} overrides - Contents of e2e.thresholds.json (may be partial)
|
|
188
|
+
* @returns {typeof defaultThresholds} Effective thresholds
|
|
189
|
+
*/
|
|
190
|
+
export function mergeThresholds(defaults, overrides) {
|
|
191
|
+
return {
|
|
192
|
+
playwright: { ...defaults.playwright, ...overrides?.playwright },
|
|
193
|
+
maestro: { ...defaults.maestro, ...overrides?.maestro },
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Pure decision: does each runner's route coverage meet its threshold?
|
|
199
|
+
* @param {object} input - Evaluation input
|
|
200
|
+
* @param {string[]} input.routes - Enumerated app routes
|
|
201
|
+
* @param {string[]} input.playwrightVisited - Paths Playwright specs visit
|
|
202
|
+
* @param {string[]} input.maestroVisited - Paths Maestro flows open
|
|
203
|
+
* @param {typeof defaultThresholds} input.thresholds - Effective thresholds
|
|
204
|
+
* @returns {{ok: boolean, runners: Record<string, {threshold: number, total: number, covered: number, percentage: number, missing: string[], ok: boolean}>}} Verdict
|
|
205
|
+
*/
|
|
206
|
+
export function evaluateE2eCoverage({
|
|
207
|
+
routes,
|
|
208
|
+
playwrightVisited,
|
|
209
|
+
maestroVisited,
|
|
210
|
+
thresholds,
|
|
211
|
+
}) {
|
|
212
|
+
const evaluateRunner = (visited, threshold) => {
|
|
213
|
+
const missing = routes.filter(
|
|
214
|
+
route => !visited.some(visit => routeMatchesVisit(route, visit))
|
|
215
|
+
);
|
|
216
|
+
const covered = routes.length - missing.length;
|
|
217
|
+
const percentage =
|
|
218
|
+
routes.length === 0 ? 100 : (covered / routes.length) * 100;
|
|
219
|
+
return {
|
|
220
|
+
threshold,
|
|
221
|
+
total: routes.length,
|
|
222
|
+
covered,
|
|
223
|
+
percentage,
|
|
224
|
+
missing,
|
|
225
|
+
ok: threshold === 0 || percentage >= threshold,
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
const runners = {
|
|
229
|
+
playwright: evaluateRunner(playwrightVisited, thresholds.playwright.routes),
|
|
230
|
+
maestro: evaluateRunner(maestroVisited, thresholds.maestro.routes),
|
|
231
|
+
};
|
|
232
|
+
return { ok: runners.playwright.ok && runners.maestro.ok, runners };
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Load project threshold overrides from `e2e.thresholds.json`, if present.
|
|
237
|
+
* Malformed JSON is a readable, operator-facing failure rather than an
|
|
238
|
+
* uncaught SyntaxError and stack trace.
|
|
239
|
+
* @param {string} thresholdsFile - Absolute path to the thresholds file
|
|
240
|
+
* @returns {object} Parsed overrides, or {} when the file is absent
|
|
241
|
+
* @throws {Error} When the file exists but is not valid JSON
|
|
242
|
+
*/
|
|
243
|
+
export function loadThresholdOverrides(thresholdsFile) {
|
|
244
|
+
if (!fs.existsSync(thresholdsFile)) {
|
|
245
|
+
return {};
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
return JSON.parse(fs.readFileSync(thresholdsFile, "utf8"));
|
|
249
|
+
} catch (error) {
|
|
250
|
+
throw new Error(`e2e.thresholds.json is not valid JSON — ${error.message}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Recursively list files under a directory, relative to it.
|
|
256
|
+
* @param {string} directory - Absolute directory path
|
|
257
|
+
* @returns {string[]} Relative file paths (posix separators), or [] if absent
|
|
258
|
+
*/
|
|
259
|
+
function listFiles(directory) {
|
|
260
|
+
if (!fs.existsSync(directory)) {
|
|
261
|
+
return [];
|
|
262
|
+
}
|
|
263
|
+
return fs
|
|
264
|
+
.readdirSync(directory, { recursive: true, withFileTypes: true })
|
|
265
|
+
.filter(entry => entry.isFile())
|
|
266
|
+
.map(entry =>
|
|
267
|
+
path
|
|
268
|
+
.relative(directory, path.join(entry.parentPath, entry.name))
|
|
269
|
+
.split(path.sep)
|
|
270
|
+
.join("/")
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Read every matching file under the given directories and extract paths.
|
|
276
|
+
* @param {object} input - Extraction input
|
|
277
|
+
* @param {string} input.root - Project root
|
|
278
|
+
* @param {string[]} input.directories - Candidate directories to scan
|
|
279
|
+
* @param {RegExp} input.filePattern - Which files to read
|
|
280
|
+
* @param {(source: string) => string[]} input.extract - Path extractor
|
|
281
|
+
* @returns {string[]} Every visited path found
|
|
282
|
+
*/
|
|
283
|
+
function collectVisitedPaths({ root, directories, filePattern, extract }) {
|
|
284
|
+
return directories.flatMap(directory => {
|
|
285
|
+
const absolute = path.join(root, directory);
|
|
286
|
+
return listFiles(absolute)
|
|
287
|
+
.filter(file => filePattern.test(file))
|
|
288
|
+
.flatMap(file =>
|
|
289
|
+
extract(fs.readFileSync(path.join(absolute, file), "utf8"))
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* CLI entry: scan the project, evaluate, and exit non-zero when under threshold.
|
|
296
|
+
* @returns {void}
|
|
297
|
+
*/
|
|
298
|
+
function main() {
|
|
299
|
+
const root = process.env.E2E_COVERAGE_ROOT || process.cwd();
|
|
300
|
+
const appDir = ["app", "src/app"]
|
|
301
|
+
.map(candidate => path.join(root, candidate))
|
|
302
|
+
.find(candidate => fs.existsSync(candidate));
|
|
303
|
+
if (!appDir) {
|
|
304
|
+
console.log(
|
|
305
|
+
"[e2e-coverage] OK: no expo-router app directory found — nothing to gate."
|
|
306
|
+
);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const routes = enumerateRoutes(listFiles(appDir));
|
|
310
|
+
if (routes.length === 0) {
|
|
311
|
+
console.log("[e2e-coverage] OK: no navigable routes — nothing to gate.");
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const thresholdsFile = path.join(root, "e2e.thresholds.json");
|
|
316
|
+
let overrides;
|
|
317
|
+
try {
|
|
318
|
+
overrides = loadThresholdOverrides(thresholdsFile);
|
|
319
|
+
} catch (error) {
|
|
320
|
+
console.error(`[e2e-coverage] FAIL: ${error.message}`);
|
|
321
|
+
process.exit(1);
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const thresholds = mergeThresholds(defaultThresholds, overrides);
|
|
325
|
+
|
|
326
|
+
const result = evaluateE2eCoverage({
|
|
327
|
+
routes,
|
|
328
|
+
playwrightVisited: collectVisitedPaths({
|
|
329
|
+
root,
|
|
330
|
+
directories: ["e2e", "tests/e2e"],
|
|
331
|
+
filePattern: SPEC_FILE_PATTERN,
|
|
332
|
+
extract: extractPlaywrightPaths,
|
|
333
|
+
}),
|
|
334
|
+
maestroVisited: collectVisitedPaths({
|
|
335
|
+
root,
|
|
336
|
+
directories: [".maestro"],
|
|
337
|
+
filePattern: FLOW_FILE_PATTERN,
|
|
338
|
+
extract: extractMaestroPaths,
|
|
339
|
+
}),
|
|
340
|
+
thresholds,
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
for (const [runner, verdict] of Object.entries(result.runners)) {
|
|
344
|
+
const summary = `${verdict.covered}/${verdict.total} routes (${verdict.percentage.toFixed(1)}% vs ${verdict.threshold}% required)`;
|
|
345
|
+
if (verdict.threshold === 0) {
|
|
346
|
+
console.log(
|
|
347
|
+
`[e2e-coverage] ${runner}: gate disabled (threshold 0) — ${summary}`
|
|
348
|
+
);
|
|
349
|
+
} else if (verdict.ok) {
|
|
350
|
+
console.log(`[e2e-coverage] ${runner}: OK — ${summary}`);
|
|
351
|
+
} else {
|
|
352
|
+
console.error(`[e2e-coverage] ${runner}: FAIL — ${summary}`);
|
|
353
|
+
console.error(
|
|
354
|
+
`[e2e-coverage] ${runner}: screens with no e2e test yet:\n` +
|
|
355
|
+
verdict.missing.map(route => ` - ${route}`).join("\n")
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (!result.ok) {
|
|
360
|
+
console.error(
|
|
361
|
+
"[e2e-coverage] FAIL: some screens have no end-to-end test. Add a Playwright spec (page.goto) or Maestro flow (openLink) that reaches each screen listed above, add an `e2e-route: /path` comment to a spec that already reaches it by navigation, or adjust e2e.thresholds.json."
|
|
362
|
+
);
|
|
363
|
+
process.exit(1);
|
|
364
|
+
}
|
|
365
|
+
console.log("[e2e-coverage] OK");
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Run only when invoked directly — importing for tests must have no side effects.
|
|
369
|
+
if (
|
|
370
|
+
process.argv[1] &&
|
|
371
|
+
import.meta.url === pathToFileURL(process.argv[1]).href
|
|
372
|
+
) {
|
|
373
|
+
main();
|
|
374
|
+
}
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"ws": ">=8.20.1"
|
|
96
96
|
},
|
|
97
97
|
"name": "@codyswann/lisa",
|
|
98
|
-
"version": "2.
|
|
98
|
+
"version": "2.206.0",
|
|
99
99
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
100
100
|
"main": "dist/index.js",
|
|
101
101
|
"exports": {
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
# Upstream To Lisa (load-bearing)
|
|
2
2
|
|
|
3
|
-
When working in a project that has Lisa installed, you will sometimes find that the **real fix belongs upstream in Lisa**, not in this project — a bug or gap in a Lisa-distributed template, rule, skill, agent, hook, or CI workflow, or a governance pattern worth generalizing back to the templates.
|
|
3
|
+
When working in a project that has Lisa installed, you will sometimes find that the **real fix belongs upstream in Lisa**, not in this project — a bug or gap in a Lisa-distributed template, rule, skill, agent, hook, or CI workflow, or a governance pattern worth generalizing back to the templates. The defining test: **does the root cause live in a Lisa-distributed artifact?** If yes, file upstream, regardless of whether your local fix survives the next `lisa apply`.
|
|
4
|
+
|
|
5
|
+
Tell-tale signs include:
|
|
6
|
+
|
|
7
|
+
- The file is Lisa-managed (carries Lisa governance markers, or lives in a path Lisa owns) and any edit you make here would be **overwritten on the next `lisa apply`**.
|
|
8
|
+
- The file was created from a Lisa `create-only` template and carries language such as `Lisa will not overwrite it`. That header is a positive upstream signal: existing repos will keep their local copy, but every newly scaffolded repo still inherits the broken template until Lisa is fixed.
|
|
4
9
|
|
|
5
10
|
When that happens, you have **two obligations — do both**:
|
|
6
11
|
|
|
7
|
-
1. **Fix it locally so you are not blocked.** Apply the stopgap in this project so you can keep working.
|
|
12
|
+
1. **Fix it locally so you are not blocked.** Apply the stopgap in this project so you can keep working. For copy-overwrite files, treat the local fix as temporary because it will be clobbered when the upstream fix ships and Lisa re-applies. For create-only files, keep the local fix because Lisa will not overwrite it, but still file upstream so new repos stop inheriting the bug.
|
|
8
13
|
2. **File an upstream issue in the Lisa repository.** Use the `github-write-issue` skill (`lisa-github-write-issue`) to create an issue **in Lisa's source repo `CodySwannGT/lisa`** (pass it as the target repo, e.g. `gh ... --repo CodySwannGT/lisa`) — **not** in this project's own repo. Capture: the root cause, the symptom you hit here, and the proposed durable fix in Lisa's templates/rules/skills.
|
|
9
14
|
|
|
10
15
|
## Do not
|
|
11
16
|
|
|
12
|
-
- Do **not** only fix it locally and move on —
|
|
17
|
+
- Do **not** only fix it locally and move on — even when a create-only local fix survives, the broken template keeps shipping to every new repo until it is fixed upstream.
|
|
13
18
|
- Do **not** try to edit Lisa's templates from inside this project — you are not in the Lisa repo; those edits don't exist upstream and get overwritten.
|
|
14
19
|
- Do **not** file the issue in this project's repo — it must land in `CodySwannGT/lisa`.
|
|
15
20
|
|
|
@@ -9,14 +9,25 @@ You are working in a downstream/host project (not the Lisa source repo) and you
|
|
|
9
9
|
- A bug or gap in a Lisa-distributed **template, rule, skill, agent, hook, or CI workflow**.
|
|
10
10
|
- A **governance pattern** discovered here that should be generalized back into Lisa's templates so every project benefits.
|
|
11
11
|
- Anything where the file you want to change is **Lisa-managed** — it carries Lisa governance markers, lives in a path Lisa owns, or any edit would be **overwritten on the next `lisa apply`**.
|
|
12
|
+
- Anything where the root cause is in a Lisa **create-only** template, even if the generated file says Lisa will not overwrite it.
|
|
12
13
|
|
|
13
|
-
The defining test:
|
|
14
|
+
The defining test: **does the root cause live in a Lisa-distributed artifact?** If yes, file upstream. The wipe-out test is a sufficient signal, not the only signal.
|
|
15
|
+
|
|
16
|
+
| Template class | Local fix survives `lisa apply`? | Why it is still upstream-worthy |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| **copy-overwrite** (managed) | No — clobbered on next apply | The local fix is throwaway; without the upstream fix it re-breaks. |
|
|
19
|
+
| **create-only** (first setup) | Yes — Lisa never overwrites it | No existing repo self-heals, and every newly scaffolded repo inherits the bug. |
|
|
20
|
+
|
|
21
|
+
For create-only files, header text such as `Lisa will not overwrite it` is a **positive** upstream signal, not a reason to stay local. Keep the downstream fix because Lisa will not replace it, and still file upstream so future projects receive the corrected template.
|
|
14
22
|
|
|
15
23
|
## What to do — both steps, always
|
|
16
24
|
|
|
17
25
|
### 1. Fix it locally so you are not blocked
|
|
18
26
|
|
|
19
|
-
Apply the stopgap in this project so you can keep working. Do **not** stall waiting for an upstream fix to land.
|
|
27
|
+
Apply the stopgap in this project so you can keep working. Do **not** stall waiting for an upstream fix to land.
|
|
28
|
+
|
|
29
|
+
- For copy-overwrite files, treat the local change as temporary: it will be clobbered when the upstream fix ships and Lisa re-applies.
|
|
30
|
+
- For create-only files, keep the local change: Lisa will not overwrite it. The upstream issue is still mandatory because new projects keep inheriting the broken template until Lisa changes.
|
|
20
31
|
|
|
21
32
|
### 2. File an upstream issue in the Lisa repository
|
|
22
33
|
|
|
@@ -27,11 +38,11 @@ The issue should capture, following the skill's three-audience / acceptance-crit
|
|
|
27
38
|
- **Root cause** — which Lisa template/rule/skill/agent/hook/workflow is wrong or missing, with the path under `plugins/src/...` (or the relevant template source) if known.
|
|
28
39
|
- **Symptom** — what broke or was missing in *this* project, and how it surfaced. Reference this project so the fix can be validated against a real case.
|
|
29
40
|
- **Proposed durable fix** — the change to make in Lisa's source so it propagates to all projects on the next apply.
|
|
30
|
-
- **Local stopgap applied** — note that a
|
|
41
|
+
- **Local stopgap applied** — note that a local fix is in place here, whether it is temporary copy-overwrite work or a retained create-only patch.
|
|
31
42
|
|
|
32
43
|
## Do not
|
|
33
44
|
|
|
34
|
-
- Do **not** only fix it locally and move on.
|
|
45
|
+
- Do **not** only fix it locally and move on. For copy-overwrite files, the local fix is throwaway and re-breaks on the next apply. For create-only files, the local fix survives, but the broken template still ships to every new project.
|
|
35
46
|
- Do **not** edit Lisa's templates from inside this project. You are not in the Lisa repo; those edits don't exist upstream and get overwritten — they create the illusion of a fix while the real source stays broken.
|
|
36
47
|
- Do **not** file the issue in this project's own repo. The durable fix is tracked in `CodySwannGT/lisa`.
|
|
37
48
|
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
# Upstream To Lisa (load-bearing)
|
|
2
2
|
|
|
3
|
-
When working in a project that has Lisa installed, you will sometimes find that the **real fix belongs upstream in Lisa**, not in this project — a bug or gap in a Lisa-distributed template, rule, skill, agent, hook, or CI workflow, or a governance pattern worth generalizing back to the templates.
|
|
3
|
+
When working in a project that has Lisa installed, you will sometimes find that the **real fix belongs upstream in Lisa**, not in this project — a bug or gap in a Lisa-distributed template, rule, skill, agent, hook, or CI workflow, or a governance pattern worth generalizing back to the templates. The defining test: **does the root cause live in a Lisa-distributed artifact?** If yes, file upstream, regardless of whether your local fix survives the next `lisa apply`.
|
|
4
|
+
|
|
5
|
+
Tell-tale signs include:
|
|
6
|
+
|
|
7
|
+
- The file is Lisa-managed (carries Lisa governance markers, or lives in a path Lisa owns) and any edit you make here would be **overwritten on the next `lisa apply`**.
|
|
8
|
+
- The file was created from a Lisa `create-only` template and carries language such as `Lisa will not overwrite it`. That header is a positive upstream signal: existing repos will keep their local copy, but every newly scaffolded repo still inherits the broken template until Lisa is fixed.
|
|
4
9
|
|
|
5
10
|
When that happens, you have **two obligations — do both**:
|
|
6
11
|
|
|
7
|
-
1. **Fix it locally so you are not blocked.** Apply the stopgap in this project so you can keep working.
|
|
12
|
+
1. **Fix it locally so you are not blocked.** Apply the stopgap in this project so you can keep working. For copy-overwrite files, treat the local fix as temporary because it will be clobbered when the upstream fix ships and Lisa re-applies. For create-only files, keep the local fix because Lisa will not overwrite it, but still file upstream so new repos stop inheriting the bug.
|
|
8
13
|
2. **File an upstream issue in the Lisa repository.** Use the `github-write-issue` skill (`lisa-github-write-issue`) to create an issue **in Lisa's source repo `CodySwannGT/lisa`** (pass it as the target repo, e.g. `gh ... --repo CodySwannGT/lisa`) — **not** in this project's own repo. Capture: the root cause, the symptom you hit here, and the proposed durable fix in Lisa's templates/rules/skills.
|
|
9
14
|
|
|
10
15
|
## Do not
|
|
11
16
|
|
|
12
|
-
- Do **not** only fix it locally and move on —
|
|
17
|
+
- Do **not** only fix it locally and move on — even when a create-only local fix survives, the broken template keeps shipping to every new repo until it is fixed upstream.
|
|
13
18
|
- Do **not** try to edit Lisa's templates from inside this project — you are not in the Lisa repo; those edits don't exist upstream and get overwritten.
|
|
14
19
|
- Do **not** file the issue in this project's repo — it must land in `CodySwannGT/lisa`.
|
|
15
20
|
|