@codyswann/lisa 1.85.7 → 1.85.9

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.
@@ -14,8 +14,17 @@ export declare class EnsureLisaPostinstallMigration implements Migration {
14
14
  readonly description = "Ensure Node-based projects run Lisa in their postinstall script";
15
15
  /**
16
16
  * Check whether this migration should run on the project
17
+ *
18
+ * Primary path: Node project types (typescript, expo, nestjs, cdk, npm-package)
19
+ * with a package.json whose postinstall lacks the CI-guarded Lisa invocation.
20
+ *
21
+ * Fallback path: non-Node projects (e.g. Rails-only) that nevertheless ship a
22
+ * package.json containing a legacy Lisa postinstall (unguarded). These were
23
+ * written by an older Lisa version before the CI guard existed and still need
24
+ * an upgrade. Projects without a package.json are untouched.
17
25
  * @param ctx - Migration context
18
- * @returns True when a Node project is missing the Lisa invocation in postinstall
26
+ * @returns True when a Node project is missing the Lisa invocation in postinstall,
27
+ * or when a non-Node project has an unguarded legacy Lisa postinstall
19
28
  */
20
29
  applies(ctx: MigrationContext): Promise<boolean>;
21
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-lisa-postinstall.d.ts","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AA0ElC;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,YAAW,SAAS;IAC9D,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,WAAW,qEACgD;IAEpE;;;;OAIG;IACG,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAmBtD;;;;OAIG;IACG,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAqC7D"}
1
+ {"version":3,"file":"ensure-lisa-postinstall.d.ts","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAoFlC;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,YAAW,SAAS;IAC9D,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,WAAW,qEACgD;IAEpE;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAmBtD;;;;OAIG;IACG,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAqC7D"}
@@ -23,6 +23,14 @@ async function readPackageJson(projectDir) {
23
23
  * the CI guard is introduced without duplicating the invocation.
24
24
  */
25
25
  const LEGACY_LISA_INVOCATION_RE = /node node_modules\/@codyswann\/lisa\/dist\/index\.js --yes --skip-git-check \. 2>\/dev\/null \|\| true/;
26
+ /**
27
+ * Guarded Lisa invocation pattern (CI guard directly gates the Lisa command).
28
+ * Used to detect when the migration has already been applied. Avoids false
29
+ * positives where the CI guard precedes an unrelated command (e.g.
30
+ * `[ -n "$CI" ] || patch-package && node ...lisa...`), which would leave Lisa
31
+ * effectively unguarded inside a `&&` chain.
32
+ */
33
+ const GUARDED_LISA_INVOCATION_RE = /\[ -n "\$CI" \] \|\| node node_modules\/@codyswann\/lisa\/dist\/index\.js --yes --skip-git-check \. 2>\/dev\/null \|\| true/;
26
34
  /**
27
35
  * Compose the new postinstall, prepending the Lisa invocation to any existing command.
28
36
  * If the existing script already contains a legacy Lisa invocation (no CI guard),
@@ -68,21 +76,30 @@ export class EnsureLisaPostinstallMigration {
68
76
  description = "Ensure Node-based projects run Lisa in their postinstall script";
69
77
  /**
70
78
  * Check whether this migration should run on the project
79
+ *
80
+ * Primary path: Node project types (typescript, expo, nestjs, cdk, npm-package)
81
+ * with a package.json whose postinstall lacks the CI-guarded Lisa invocation.
82
+ *
83
+ * Fallback path: non-Node projects (e.g. Rails-only) that nevertheless ship a
84
+ * package.json containing a legacy Lisa postinstall (unguarded). These were
85
+ * written by an older Lisa version before the CI guard existed and still need
86
+ * an upgrade. Projects without a package.json are untouched.
71
87
  * @param ctx - Migration context
72
- * @returns True when a Node project is missing the Lisa invocation in postinstall
88
+ * @returns True when a Node project is missing the Lisa invocation in postinstall,
89
+ * or when a non-Node project has an unguarded legacy Lisa postinstall
73
90
  */
74
91
  async applies(ctx) {
75
- if (!hasNodePostinstallType(ctx.detectedTypes)) {
76
- return false;
77
- }
78
92
  const pkg = await readPackageJson(ctx.projectDir);
79
93
  if (!pkg) {
80
94
  return false;
81
95
  }
82
96
  const postinstall = pkg.scripts?.postinstall;
83
- if (postinstall &&
84
- postinstall.includes(LISA_MARKER) &&
85
- postinstall.includes(CI_GUARD_PREFIX)) {
97
+ if (!hasNodePostinstallType(ctx.detectedTypes)) {
98
+ return (!!postinstall &&
99
+ postinstall.includes(LISA_MARKER) &&
100
+ !GUARDED_LISA_INVOCATION_RE.test(postinstall));
101
+ }
102
+ if (postinstall && GUARDED_LISA_INVOCATION_RE.test(postinstall)) {
86
103
  return false;
87
104
  }
88
105
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-lisa-postinstall.js","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAOnE,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAC3C,MAAM,eAAe,GAAG,GAAG,eAAe,8FAA8F,CAAC;AACzI,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE;;;GAGG;AACH,MAAM,cAAc,GAA2B,CAAC,OAAO,CAAC,CAAC;AAUzD;;;;GAIG;AACH,KAAK,UAAU,eAAe,CAC5B,UA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,GAAG,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAC7C,CAAC;QAED,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QACzC,MAAM,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,OAAO,GAAgB;YAC3B,GAAG,GAAG;YACN,OAAO,EAAE,EAAE,GAAG,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE;SAC5D,CAAC;QAEF,MAAM,OAAO,GAAG,cAAc,CAAC,WAAW;YACxC,CAAC,CAAC,2CAA2C,cAAc,EAAE;YAC7D,CAAC,CAAC,uCAAuC,cAAc,EAAE,CAAC;QAE5D,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;YAChE,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,SAAS;gBACjB,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO;aACR,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,CAAC,YAAY,CAAC;YAC5B,OAAO;SACR,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -78,7 +78,7 @@
78
78
  "lodash": ">=4.18.1"
79
79
  },
80
80
  "name": "@codyswann/lisa",
81
- "version": "1.85.7",
81
+ "version": "1.85.9",
82
82
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
83
83
  "main": "dist/index.js",
84
84
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
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-cdk",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
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-expo",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
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-nestjs",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "1.85.7",
3
+ "version": "1.85.9",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -165,7 +165,7 @@ Automatically fixes CI failures by having Claude analyze error logs and push fix
165
165
  Automatically triages CodeRabbit review comments and either fixes valid findings or replies to dismiss invalid ones.
166
166
 
167
167
  - Triggers when CodeRabbit submits a review (not per inline comment — once per review summary)
168
- - Skips PRs authored by bots to prevent bot-to-bot loops
168
+ - Skips PRs authored by `coderabbitai[bot]` or `dependabot[bot]` to prevent bot-to-bot loops (PRs authored by `claude[bot]` or other bots are allowed)
169
169
  - For each review comment, Claude determines if the finding is valid or a misunderstanding
170
170
  - Valid findings: fixes the code and commits with conventional messages
171
171
  - Invalid findings: replies to the comment explaining why the suggestion does not apply