@codyswann/lisa 4.60.5 → 4.60.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.
- package/dist/codex/scripts/block-migration-edits.sh +12 -4
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.js +2 -2
- package/dist/opencode/plugin-templates/lisa-block-migration-edits.ts +10 -2
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- 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-cursor/.claude-plugin/plugin.json +1 -1
- 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/.codex-plugin/skills/nestjs-rules/SKILL.md +6 -11
- package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +14 -18
- package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +6 -11
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +6 -11
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +14 -18
- package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +6 -11
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +14 -18
- package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +6 -11
- 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/nestjs/hooks/block-migration-edits.sh +14 -18
- package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +6 -11
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Lisa-managed Codex hook script (PreToolUse Edit|Write|apply_patch).
|
|
3
|
+
# This scopes direct edit tools; it does not verify approval or establish the
|
|
4
|
+
# provenance of files written through other tools.
|
|
3
5
|
# Blocks edits to TypeORM migration files. Use `bun run migration:generate`
|
|
4
6
|
# to regenerate from entity diffs instead — hand-written migrations drift
|
|
5
7
|
# from entity metadata and break the schema/migration contract.
|
|
@@ -71,8 +73,8 @@ fi
|
|
|
71
73
|
# there is no `cd` here — the Claude copy needs one because a PreToolUse hook
|
|
72
74
|
# there establishes none.
|
|
73
75
|
#
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
+
# A project may supply its own `migration-provenance` check for these edits.
|
|
77
|
+
# The built-in only refuses the scoped Edit/Write/apply_patch calls.
|
|
76
78
|
# ---------------------------------------------------------------------------
|
|
77
79
|
# shellcheck source=/dev/null
|
|
78
80
|
. "${SCRIPT_DIR}/lisa-edit-gate.sh"
|
|
@@ -103,8 +105,14 @@ while IFS= read -r FILE_PATH; do
|
|
|
103
105
|
TypeORM migrations must be regenerated from entity diffs:
|
|
104
106
|
bun run migration:generate -- src/database/migrations/<descriptive-name>
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
Out-of-band migrations (backfills, seed data, maintenance) cannot always
|
|
109
|
+
come from entity diffs. A project that supports these edits can declare a
|
|
110
|
+
\`migration-provenance\` check at \`pre-tool\` in .lisa.config.json. The hook
|
|
111
|
+
runs that check and uses its result to permit or refuse the edit.
|
|
112
|
+
|
|
113
|
+
Document the migration's rationale and verification in its class comment.
|
|
114
|
+
This default hook cannot verify human approval. It inspects Edit, Write and
|
|
115
|
+
apply_patch, not Bash writes. Do not switch tools to evade its refusal.
|
|
108
116
|
EOF
|
|
109
117
|
exit 2
|
|
110
118
|
;;
|
|
@@ -48,9 +48,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
|
|
|
48
48
|
}),
|
|
49
49
|
f87e6eee47ddb6416f2c639b79b96a68173c9c562999fbad98abe012ac913d28: Object.freeze({
|
|
50
50
|
contractVersion: "1.9.0",
|
|
51
|
-
packageVersions: Object.freeze(["4.60.
|
|
51
|
+
packageVersions: Object.freeze(["4.60.6"]),
|
|
52
52
|
provenances: Object.freeze([
|
|
53
|
-
"workspace package @codyswann/lisa@4.60.
|
|
53
|
+
"workspace package @codyswann/lisa@4.60.6 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
|
|
54
54
|
]),
|
|
55
55
|
}),
|
|
56
56
|
});
|
|
@@ -912,7 +912,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
912
912
|
"plugins/src/harper-fabric/skills/harper-rest-queries/SKILL.md": "cadccf7c4a3d9ebf9557c2739e65dd0bd8be08e6f65b1e89d416cc85e5183dec",
|
|
913
913
|
"plugins/src/harper-fabric/skills/harper-schema-graphql/SKILL.md": "e60a691b0586d7554ea01ece4a71f9a7a4f1e585b94c46ad64c4edd32327fde6",
|
|
914
914
|
"plugins/src/harper-fabric/skills/harper-testing/SKILL.md": "5a3c91d80ea2ac97df5b085114e2111a2c749ff0ad259a291cf16cb2f96258b8",
|
|
915
|
-
"plugins/src/nestjs/hooks/block-migration-edits.sh": "
|
|
915
|
+
"plugins/src/nestjs/hooks/block-migration-edits.sh": "24c6b704ad821576234c4e1cfa7b9a5fee40dca360035d7561ba150444e37c01",
|
|
916
916
|
"plugins/src/nestjs/hooks/lisa-edit-gate.sh": "0a8d9a043f04b15b71bb500ff03cf1e67e4ac292181a5d596ddf078f301e671f",
|
|
917
917
|
"plugins/src/nestjs/skills/nestjs-graphql/SKILL.md": "205b4be76dfe9b2cc4688a7e2cb1754c68aedf67bdc00187af40af0e49ba854a",
|
|
918
918
|
"plugins/src/nestjs/skills/nestjs-graphql/references/advanced-features.md": "57b2c69daa4c91ccd1556db363ea1dd0912ba942222571839ba0e5eca064196f",
|
|
@@ -920,7 +920,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
|
|
|
920
920
|
"plugins/src/nestjs/skills/nestjs-graphql/references/quick-start.md": "58ab79368768540c7e9da17af7e2bbc8a703f879806443f117f79b61a3aff18f",
|
|
921
921
|
"plugins/src/nestjs/skills/nestjs-graphql/references/resolvers-mutations.md": "76135d5b1466ba3fa01b01d5e0e4d6675af8bda1c163ba64b5931cdfe2b718dd",
|
|
922
922
|
"plugins/src/nestjs/skills/nestjs-graphql/references/types-scalars.md": "28c10e5c297928438c3ef72407c20e587cb9bb15173d9aa3fd4e661822def311",
|
|
923
|
-
"plugins/src/nestjs/skills/nestjs-rules/SKILL.md": "
|
|
923
|
+
"plugins/src/nestjs/skills/nestjs-rules/SKILL.md": "0539c464cc0ce04340bb8a5b716a3b3919cc5adaa22ad3776d1e8400d8a63313",
|
|
924
924
|
"plugins/src/nestjs/skills/typeorm-patterns/SKILL.md": "319707f8e61845e84a72d478ecb7a6e327f9e9a8b3822de7746d17a418afa34f",
|
|
925
925
|
"plugins/src/nestjs/skills/typeorm-patterns/references/configuration-patterns.md": "0c5db577e4ad72f80f00ed12ad095cd5aa59536bff45cde20b26146754994aa5",
|
|
926
926
|
"plugins/src/nestjs/skills/typeorm-patterns/references/entity-patterns.md": "350376367c7521944b20b2df4f9a9c34ad5446d0f814d4ea01c5c487ebae9d8e",
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* straight from `output.args.filePath`. Throwing in `tool.execute.before`
|
|
11
11
|
* cancels the tool call and surfaces the message to the agent (verified-by-run
|
|
12
12
|
* on opencode 1.16.2).
|
|
13
|
+
* This adapter does not delegate to a project's migration-provenance check;
|
|
14
|
+
* unlike the Claude and Codex adapters, it cannot permit those exceptions.
|
|
15
|
+
* It neither verifies human approval nor inspects Bash writes.
|
|
13
16
|
*
|
|
14
17
|
* NOTE: This file is a template Lisa copies verbatim into a host project's
|
|
15
18
|
* `.opencode/plugin/`. It is intentionally excluded from this repo's tsconfig
|
|
@@ -35,8 +38,13 @@ const LisaBlockMigrationEdits = async () => {
|
|
|
35
38
|
"TypeORM migrations must be regenerated from entity diffs:",
|
|
36
39
|
" bun run migration:generate -- src/database/migrations/<descriptive-name>",
|
|
37
40
|
"",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
41
|
+
"Out-of-band migrations (backfills, seed data, maintenance) cannot",
|
|
42
|
+
"always come from entity diffs. Document their rationale and verification.",
|
|
43
|
+
"",
|
|
44
|
+
"This OpenCode adapter only inspects edit/write and cannot verify",
|
|
45
|
+
"human approval. It does not yet support the project migration-provenance",
|
|
46
|
+
"exception check available in the Claude and Codex adapters, so it keeps",
|
|
47
|
+
"refusing this edit. Do not switch tools to evade the refusal.",
|
|
40
48
|
].join("\n")
|
|
41
49
|
);
|
|
42
50
|
},
|
package/package.json
CHANGED
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"zod-validation-error": "^4.0.0"
|
|
188
188
|
},
|
|
189
189
|
"name": "@codyswann/lisa",
|
|
190
|
-
"version": "4.60.
|
|
190
|
+
"version": "4.60.6",
|
|
191
191
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
192
192
|
"main": "dist/index.js",
|
|
193
193
|
"exports": {
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
"test": "tests"
|
|
337
337
|
},
|
|
338
338
|
"types": "./dist/index.d.ts",
|
|
339
|
-
"lisaReleaseCommit": "
|
|
340
|
-
"gitHead": "
|
|
341
|
-
"lisaReleaseTag": "v4.60.
|
|
339
|
+
"lisaReleaseCommit": "29a6f62c71498e13d34089873ed85f043c51fd4a",
|
|
340
|
+
"gitHead": "29a6f62c71498e13d34089873ed85f043c51fd4a",
|
|
341
|
+
"lisaReleaseTag": "v4.60.6"
|
|
342
342
|
}
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# This file is managed by Lisa.
|
|
3
3
|
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
4
|
|
|
5
|
-
# PreToolUse hook: block Write/Edit on TypeORM migration files.
|
|
5
|
+
# PreToolUse hook: block Write/Edit on TypeORM migration files by default.
|
|
6
|
+
# This scopes direct edit tools; it does not verify approval or establish the
|
|
7
|
+
# provenance of files written through other tools.
|
|
6
8
|
# NestJS projects must use `bun run migration:generate` to create migrations
|
|
7
9
|
# from entity diffs. Hand-written migrations drift from entity metadata and
|
|
8
10
|
# break the schema/migration contract.
|
|
@@ -79,8 +81,8 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
79
81
|
# That is what keeps an undeclared project on exactly the command, and exactly
|
|
80
82
|
# the exit status, it had before.
|
|
81
83
|
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
+
# A project may supply its own `migration-provenance` check for these edits.
|
|
85
|
+
# The built-in only refuses the scoped Write/Edit calls.
|
|
84
86
|
# ---------------------------------------------------------------------------
|
|
85
87
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
86
88
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
@@ -98,7 +100,7 @@ if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
|
98
100
|
fi
|
|
99
101
|
|
|
100
102
|
cat >&2 <<EOF
|
|
101
|
-
❌ Blocked:
|
|
103
|
+
❌ Blocked: This default hook refuses Write/Edit on TypeORM migration files.
|
|
102
104
|
|
|
103
105
|
File: $FILE_PATH
|
|
104
106
|
|
|
@@ -110,20 +112,14 @@ artifact — generate them from entity diffs:
|
|
|
110
112
|
2. Run: bun run migration:generate --name=<DescriptiveName>
|
|
111
113
|
3. Review the generated migration; commit entity + migration together.
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
Out-of-band migrations (backfills, seed data, maintenance) cannot always
|
|
116
|
+
come from entity diffs. A project that supports these edits can declare a
|
|
117
|
+
\`migration-provenance\` check at \`pre-tool\` in .lisa.config.json. The hook
|
|
118
|
+
runs that check and uses its result to permit or refuse the edit.
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
If you believe this edit is an out-of-band migration:
|
|
121
|
-
1. STOP and tell the user what change is needed and why it cannot
|
|
122
|
-
be expressed via the entity model.
|
|
123
|
-
2. Get explicit approval before proceeding.
|
|
124
|
-
3. Document the rationale in the migration's class comment.
|
|
125
|
-
|
|
126
|
-
Do NOT silently hand-write a migration. See the nestjs-rules skill
|
|
127
|
-
for the full rationale.
|
|
120
|
+
Document the migration's rationale and verification in its class comment.
|
|
121
|
+
This default hook cannot verify human approval and does not inspect Bash
|
|
122
|
+
writes. Do not switch tools to evade its refusal. See the nestjs-rules skill
|
|
123
|
+
for the supported project-check path.
|
|
128
124
|
EOF
|
|
129
125
|
exit 2
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# This file is managed by Lisa.
|
|
3
3
|
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
4
|
|
|
5
|
-
# PreToolUse hook: block Write/Edit on TypeORM migration files.
|
|
5
|
+
# PreToolUse hook: block Write/Edit on TypeORM migration files by default.
|
|
6
|
+
# This scopes direct edit tools; it does not verify approval or establish the
|
|
7
|
+
# provenance of files written through other tools.
|
|
6
8
|
# NestJS projects must use `bun run migration:generate` to create migrations
|
|
7
9
|
# from entity diffs. Hand-written migrations drift from entity metadata and
|
|
8
10
|
# break the schema/migration contract.
|
|
@@ -79,8 +81,8 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
79
81
|
# That is what keeps an undeclared project on exactly the command, and exactly
|
|
80
82
|
# the exit status, it had before.
|
|
81
83
|
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
+
# A project may supply its own `migration-provenance` check for these edits.
|
|
85
|
+
# The built-in only refuses the scoped Write/Edit calls.
|
|
84
86
|
# ---------------------------------------------------------------------------
|
|
85
87
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
86
88
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
@@ -98,7 +100,7 @@ if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
|
98
100
|
fi
|
|
99
101
|
|
|
100
102
|
cat >&2 <<EOF
|
|
101
|
-
❌ Blocked:
|
|
103
|
+
❌ Blocked: This default hook refuses Write/Edit on TypeORM migration files.
|
|
102
104
|
|
|
103
105
|
File: $FILE_PATH
|
|
104
106
|
|
|
@@ -110,20 +112,14 @@ artifact — generate them from entity diffs:
|
|
|
110
112
|
2. Run: bun run migration:generate --name=<DescriptiveName>
|
|
111
113
|
3. Review the generated migration; commit entity + migration together.
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
Out-of-band migrations (backfills, seed data, maintenance) cannot always
|
|
116
|
+
come from entity diffs. A project that supports these edits can declare a
|
|
117
|
+
\`migration-provenance\` check at \`pre-tool\` in .lisa.config.json. The hook
|
|
118
|
+
runs that check and uses its result to permit or refuse the edit.
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
If you believe this edit is an out-of-band migration:
|
|
121
|
-
1. STOP and tell the user what change is needed and why it cannot
|
|
122
|
-
be expressed via the entity model.
|
|
123
|
-
2. Get explicit approval before proceeding.
|
|
124
|
-
3. Document the rationale in the migration's class comment.
|
|
125
|
-
|
|
126
|
-
Do NOT silently hand-write a migration. See the nestjs-rules skill
|
|
127
|
-
for the full rationale.
|
|
120
|
+
Document the migration's rationale and verification in its class comment.
|
|
121
|
+
This default hook cannot verify human approval and does not inspect Bash
|
|
122
|
+
writes. Do not switch tools to evade its refusal. See the nestjs-rules skill
|
|
123
|
+
for the supported project-check path.
|
|
128
124
|
EOF
|
|
129
125
|
exit 2
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# This file is managed by Lisa.
|
|
3
3
|
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
4
|
|
|
5
|
-
# PreToolUse hook: block Write/Edit on TypeORM migration files.
|
|
5
|
+
# PreToolUse hook: block Write/Edit on TypeORM migration files by default.
|
|
6
|
+
# This scopes direct edit tools; it does not verify approval or establish the
|
|
7
|
+
# provenance of files written through other tools.
|
|
6
8
|
# NestJS projects must use `bun run migration:generate` to create migrations
|
|
7
9
|
# from entity diffs. Hand-written migrations drift from entity metadata and
|
|
8
10
|
# break the schema/migration contract.
|
|
@@ -79,8 +81,8 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
79
81
|
# That is what keeps an undeclared project on exactly the command, and exactly
|
|
80
82
|
# the exit status, it had before.
|
|
81
83
|
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
+
# A project may supply its own `migration-provenance` check for these edits.
|
|
85
|
+
# The built-in only refuses the scoped Write/Edit calls.
|
|
84
86
|
# ---------------------------------------------------------------------------
|
|
85
87
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
86
88
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
@@ -98,7 +100,7 @@ if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
|
98
100
|
fi
|
|
99
101
|
|
|
100
102
|
cat >&2 <<EOF
|
|
101
|
-
❌ Blocked:
|
|
103
|
+
❌ Blocked: This default hook refuses Write/Edit on TypeORM migration files.
|
|
102
104
|
|
|
103
105
|
File: $FILE_PATH
|
|
104
106
|
|
|
@@ -110,20 +112,14 @@ artifact — generate them from entity diffs:
|
|
|
110
112
|
2. Run: bun run migration:generate --name=<DescriptiveName>
|
|
111
113
|
3. Review the generated migration; commit entity + migration together.
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
Out-of-band migrations (backfills, seed data, maintenance) cannot always
|
|
116
|
+
come from entity diffs. A project that supports these edits can declare a
|
|
117
|
+
\`migration-provenance\` check at \`pre-tool\` in .lisa.config.json. The hook
|
|
118
|
+
runs that check and uses its result to permit or refuse the edit.
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
If you believe this edit is an out-of-band migration:
|
|
121
|
-
1. STOP and tell the user what change is needed and why it cannot
|
|
122
|
-
be expressed via the entity model.
|
|
123
|
-
2. Get explicit approval before proceeding.
|
|
124
|
-
3. Document the rationale in the migration's class comment.
|
|
125
|
-
|
|
126
|
-
Do NOT silently hand-write a migration. See the nestjs-rules skill
|
|
127
|
-
for the full rationale.
|
|
120
|
+
Document the migration's rationale and verification in its class comment.
|
|
121
|
+
This default hook cannot verify human approval and does not inspect Bash
|
|
122
|
+
writes. Do not switch tools to evade its refusal. See the nestjs-rules skill
|
|
123
|
+
for the supported project-check path.
|
|
128
124
|
EOF
|
|
129
125
|
exit 2
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.60.
|
|
3
|
+
"version": "4.60.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# This file is managed by Lisa.
|
|
3
3
|
# Do not edit directly — changes will be overwritten on the next `lisa` run.
|
|
4
4
|
|
|
5
|
-
# PreToolUse hook: block Write/Edit on TypeORM migration files.
|
|
5
|
+
# PreToolUse hook: block Write/Edit on TypeORM migration files by default.
|
|
6
|
+
# This scopes direct edit tools; it does not verify approval or establish the
|
|
7
|
+
# provenance of files written through other tools.
|
|
6
8
|
# NestJS projects must use `bun run migration:generate` to create migrations
|
|
7
9
|
# from entity diffs. Hand-written migrations drift from entity metadata and
|
|
8
10
|
# break the schema/migration contract.
|
|
@@ -79,8 +81,8 @@ LISA_HOOK_DIR="$(cd "$(dirname "$0")" 2>/dev/null && pwd)"
|
|
|
79
81
|
# That is what keeps an undeclared project on exactly the command, and exactly
|
|
80
82
|
# the exit status, it had before.
|
|
81
83
|
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
+
# A project may supply its own `migration-provenance` check for these edits.
|
|
85
|
+
# The built-in only refuses the scoped Write/Edit calls.
|
|
84
86
|
# ---------------------------------------------------------------------------
|
|
85
87
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
86
88
|
[ -f "$LISA_HOOK_DIR/lisa-edit-gate.sh" ] &&
|
|
@@ -98,7 +100,7 @@ if [ -n "${CLAUDE_PROJECT_DIR:-}" ] &&
|
|
|
98
100
|
fi
|
|
99
101
|
|
|
100
102
|
cat >&2 <<EOF
|
|
101
|
-
❌ Blocked:
|
|
103
|
+
❌ Blocked: This default hook refuses Write/Edit on TypeORM migration files.
|
|
102
104
|
|
|
103
105
|
File: $FILE_PATH
|
|
104
106
|
|
|
@@ -110,20 +112,14 @@ artifact — generate them from entity diffs:
|
|
|
110
112
|
2. Run: bun run migration:generate --name=<DescriptiveName>
|
|
111
113
|
3. Review the generated migration; commit entity + migration together.
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
Out-of-band migrations (backfills, seed data, maintenance) cannot always
|
|
116
|
+
come from entity diffs. A project that supports these edits can declare a
|
|
117
|
+
\`migration-provenance\` check at \`pre-tool\` in .lisa.config.json. The hook
|
|
118
|
+
runs that check and uses its result to permit or refuse the edit.
|
|
115
119
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
If you believe this edit is an out-of-band migration:
|
|
121
|
-
1. STOP and tell the user what change is needed and why it cannot
|
|
122
|
-
be expressed via the entity model.
|
|
123
|
-
2. Get explicit approval before proceeding.
|
|
124
|
-
3. Document the rationale in the migration's class comment.
|
|
125
|
-
|
|
126
|
-
Do NOT silently hand-write a migration. See the nestjs-rules skill
|
|
127
|
-
for the full rationale.
|
|
120
|
+
Document the migration's rationale and verification in its class comment.
|
|
121
|
+
This default hook cannot verify human approval and does not inspect Bash
|
|
122
|
+
writes. Do not switch tools to evade its refusal. See the nestjs-rules skill
|
|
123
|
+
for the supported project-check path.
|
|
128
124
|
EOF
|
|
129
125
|
exit 2
|
|
@@ -51,11 +51,9 @@ In this project, **entity files (`src/database/entities/*.ts`) are the single so
|
|
|
51
51
|
2. Run `bun run migration:generate --name=<DescriptiveName>` to produce the migration from the diff.
|
|
52
52
|
3. Review the generated migration, then commit both the entity change and the migration together.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Generate Schema Migrations
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Never create or modify a TypeORM migration file directly. Use `migration:generate` from `package.json`:
|
|
56
|
+
Use `migration:generate` from `package.json` for changes represented by entity metadata:
|
|
59
57
|
|
|
60
58
|
```bash
|
|
61
59
|
bun run migration:generate --name=<DescriptiveName>
|
|
@@ -69,18 +67,15 @@ Some changes genuinely cannot be derived from entity diffs:
|
|
|
69
67
|
- **Data backfills** (populating a new column from existing rows)
|
|
70
68
|
- **Data transformations** (splitting a column, normalizing values)
|
|
71
69
|
- **One-off cleanup** (deleting orphaned rows before a constraint is added)
|
|
70
|
+
- **Database maintenance** (refreshing planner statistics with `ANALYZE`)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
1. **Stop and tell the user.** Explain what change is needed and why it cannot be expressed via the entity model.
|
|
76
|
-
2. **Get explicit approval** before writing the migration by hand.
|
|
77
|
-
3. Document the rationale in the migration's class comment so future readers understand why this one was not generated.
|
|
72
|
+
Use the project's established migration process for these cases. Document the rationale and verification in the migration's class comment so future readers understand why it was not generated. Apply the authorization already given for the work; the default edit hook does not record or verify human approval.
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
A project that supports direct migration edits can declare its own `migration-provenance` check at `pre-tool` in `.lisa.config.json`. The Claude and Codex hooks run that check for the targeted migration and permit the edit only when it passes. The check must validate the project's migration policy; an unconditional success command proves nothing. Without a declared check, the built-in still refuses the edit. OpenCode's migration adapter currently does not support this exception path and continues to refuse it.
|
|
80
75
|
|
|
81
76
|
### Enforcement
|
|
82
77
|
|
|
83
|
-
The `lisa-nestjs` plugin
|
|
78
|
+
The `lisa-nestjs` plugin's default `PreToolUse` hook (`block-migration-edits.sh`) refuses `Write`/`Edit` on paths matching `**/migrations/*.ts` or `**/migrations/*.js`. Codex also inspects `apply_patch`; its migration matcher and OpenCode's matcher cover numbered TypeScript migration filenames. These are direct-edit checks, not an audit of migration authorship: they do not inspect Bash writes. Do not switch tools to evade a refusal. Use the supported project check where available.
|
|
84
79
|
|
|
85
80
|
### Why Auto-Generation
|
|
86
81
|
|