@codyswann/lisa 2.345.0 → 2.346.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 (143) hide show
  1. package/all/copy-overwrite/scripts/check-state-classification.mjs +609 -0
  2. package/all/copy-overwrite/scripts/lisa-command-envelope.mjs +194 -0
  3. package/all/copy-overwrite/scripts/lisa-schema-validate.mjs +208 -0
  4. package/all/copy-overwrite/scripts/schemas/lisa-command-envelope.v1.schema.json +119 -0
  5. package/all/copy-overwrite/scripts/schemas/lisa-state-contract.v1.schema.json +191 -0
  6. package/all/create-only/state/README.md +41 -0
  7. package/all/create-only/state/state-contract.example.json +46 -0
  8. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  9. package/dist/core/upstream-evidence-manifest.js +59 -12
  10. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  11. package/package.json +1 -1
  12. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa/.codex-plugin/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  15. package/plugins/lisa/.codex-plugin/skills/lisa-codify-verification/SKILL.md +4 -0
  16. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +2 -0
  17. package/plugins/lisa/.codex-plugin/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  18. package/plugins/lisa/.codex-plugin/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  19. package/plugins/lisa/.codex-plugin/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  20. package/plugins/lisa/.codex-plugin/skills/lisa-research/SKILL.md +7 -1
  21. package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +2 -0
  22. package/plugins/lisa/.codex-plugin/skills/lisa-test-strategy/SKILL.md +1 -0
  23. package/plugins/lisa/.codex-plugin/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  24. package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +1 -1
  25. package/plugins/lisa/rules/eager/reset-seed-coverage.md +48 -0
  26. package/plugins/lisa/rules/reference/reset-seed-coverage.md +231 -0
  27. package/plugins/lisa/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  28. package/plugins/lisa/skills/lisa-codify-verification/SKILL.md +4 -0
  29. package/plugins/lisa/skills/lisa-implement/SKILL.md +2 -0
  30. package/plugins/lisa/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  31. package/plugins/lisa/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  32. package/plugins/lisa/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  33. package/plugins/lisa/skills/lisa-research/SKILL.md +7 -1
  34. package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +2 -0
  35. package/plugins/lisa/skills/lisa-test-strategy/SKILL.md +1 -0
  36. package/plugins/lisa/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  37. package/plugins/lisa/skills/lisa-verify/SKILL.md +1 -1
  38. package/plugins/lisa-agy/plugin.json +1 -1
  39. package/plugins/lisa-agy/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  40. package/plugins/lisa-agy/skills/lisa-codify-verification/SKILL.md +4 -0
  41. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +2 -0
  42. package/plugins/lisa-agy/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  43. package/plugins/lisa-agy/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  44. package/plugins/lisa-agy/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  45. package/plugins/lisa-agy/skills/lisa-research/SKILL.md +7 -1
  46. package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +2 -0
  47. package/plugins/lisa-agy/skills/lisa-test-strategy/SKILL.md +1 -0
  48. package/plugins/lisa-agy/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  49. package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +1 -1
  50. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  53. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-copilot/rules/eager/reset-seed-coverage.md +48 -0
  57. package/plugins/lisa-copilot/rules/reference/reset-seed-coverage.md +231 -0
  58. package/plugins/lisa-copilot/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  59. package/plugins/lisa-copilot/skills/lisa-codify-verification/SKILL.md +4 -0
  60. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +2 -0
  61. package/plugins/lisa-copilot/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  62. package/plugins/lisa-copilot/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  63. package/plugins/lisa-copilot/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  64. package/plugins/lisa-copilot/skills/lisa-research/SKILL.md +7 -1
  65. package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +2 -0
  66. package/plugins/lisa-copilot/skills/lisa-test-strategy/SKILL.md +1 -0
  67. package/plugins/lisa-copilot/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  68. package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +1 -1
  69. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-cursor/rules/reset-seed-coverage-reference.mdc +236 -0
  71. package/plugins/lisa-cursor/rules/reset-seed-coverage.mdc +53 -0
  72. package/plugins/lisa-cursor/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  73. package/plugins/lisa-cursor/skills/lisa-codify-verification/SKILL.md +4 -0
  74. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +2 -0
  75. package/plugins/lisa-cursor/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  76. package/plugins/lisa-cursor/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  77. package/plugins/lisa-cursor/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  78. package/plugins/lisa-cursor/skills/lisa-research/SKILL.md +7 -1
  79. package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +2 -0
  80. package/plugins/lisa-cursor/skills/lisa-test-strategy/SKILL.md +1 -0
  81. package/plugins/lisa-cursor/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  82. package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +1 -1
  83. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  85. package/plugins/lisa-expo/.codex-plugin/skills/ops-db-ops/SKILL.md +93 -2
  86. package/plugins/lisa-expo/skills/ops-db-ops/SKILL.md +94 -3
  87. package/plugins/lisa-expo/skills/ops-db-ops/agents/openai.yaml +2 -2
  88. package/plugins/lisa-expo-agy/plugin.json +1 -1
  89. package/plugins/lisa-expo-agy/skills/ops-db-ops/SKILL.md +94 -3
  90. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-expo-copilot/skills/ops-db-ops/SKILL.md +94 -3
  92. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  93. package/plugins/lisa-expo-cursor/skills/ops-db-ops/SKILL.md +94 -3
  94. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  96. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  97. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  101. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  102. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  106. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  107. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  111. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  112. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  116. package/plugins/lisa-rails-agy/plugin.json +1 -1
  117. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  121. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  122. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  126. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  127. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  129. package/plugins/src/base/rules/eager/reset-seed-coverage.md +48 -0
  130. package/plugins/src/base/rules/reference/reset-seed-coverage.md +231 -0
  131. package/plugins/src/base/skills/lisa-acceptance-criteria/SKILL.md +1 -0
  132. package/plugins/src/base/skills/lisa-codify-verification/SKILL.md +4 -0
  133. package/plugins/src/base/skills/lisa-implement/SKILL.md +2 -0
  134. package/plugins/src/base/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
  135. package/plugins/src/base/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
  136. package/plugins/src/base/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
  137. package/plugins/src/base/skills/lisa-research/SKILL.md +7 -1
  138. package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +2 -0
  139. package/plugins/src/base/skills/lisa-test-strategy/SKILL.md +1 -0
  140. package/plugins/src/base/skills/lisa-verification-lifecycle/SKILL.md +1 -0
  141. package/plugins/src/base/skills/lisa-verify/SKILL.md +1 -1
  142. package/plugins/src/expo/skills/ops-db-ops/SKILL.md +94 -3
  143. package/scripts/check-state-classification.mjs +27 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ops-db-ops
3
- description: Database migrations, reverts, schema generation, and GraphQL codegen for Expo + serverless backend projects. Operates on the backend (TypeORM) and frontend (GraphQL code generation).
3
+ description: Database migrations, reverts, schema generation, GraphQL codegen, and the reset/seed/verify state operations for Expo + serverless backend projects. Operates on the backend (TypeORM) and frontend (GraphQL code generation).
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Read
@@ -8,9 +8,10 @@ allowed-tools:
8
8
 
9
9
  # Ops: Database Operations
10
10
 
11
- Manage database migrations, schema generation, and GraphQL code generation.
11
+ Manage database migrations, schema generation, GraphQL code generation, and the project's
12
+ reset/seed/verify state operations.
12
13
 
13
- **Argument**: `$ARGUMENTS` — operation (`migrate`, `revert`, `generate`, `schema`, `codegen`) and optional environment (default: `dev`)
14
+ **Argument**: `$ARGUMENTS` — operation (`migrate`, `revert`, `generate`, `schema`, `codegen`, `seed`, `reset`, `reset:verify`, `state:inventory`, `state:classify`) and optional environment (default: `dev`)
14
15
 
15
16
  ## Path Convention
16
17
 
@@ -21,6 +22,21 @@ Manage database migrations, schema generation, and GraphQL code generation.
21
22
 
22
23
  **CRITICAL**: Never run migrations or reverts against production without explicit human confirmation.
23
24
 
25
+ **Destructive state operations are stricter than that.** `reset` (and any `seed` that clears before
26
+ it writes) is governed by the `reset-seed-coverage` rule and never runs on the strength of a
27
+ confirmation alone:
28
+
29
+ - Run `--dry-run` first, always, and read what it says it will change. A dry run that reports an
30
+ entity whose ownership it cannot establish is a STOP, not a warning.
31
+ - The environment is whatever the adapter resolves server-side. A `--stage`, `TEST_ENV`, URL, host,
32
+ or public build-time variable is a *request* the adapter checks, never the answer. If the requested
33
+ stage and the resolved environment disagree, that is a refusal to investigate — not something to
34
+ re-run with a different flag.
35
+ - **Production has no override, in any repo, ever.** There is no flag, variable, or confirmation
36
+ phrase that makes a production reset correct. If one appears to exist, stop and report it.
37
+ - Never invent a reset. If the project ships no reset adapter, say so and stop; do not improvise
38
+ deletions with ad-hoc queries or the migration tooling.
39
+
24
40
  ## Discovery
25
41
 
26
42
  Read the backend `package.json` to discover available migration and schema scripts:
@@ -31,10 +47,22 @@ Read the backend `package.json` to discover available migration and schema scrip
31
47
  - `generate:sql-schema*` — regenerate SQL schema for MCP
32
48
  - AWS credential/profile scripts such as `aws:signin:*` and any environment-backed remote profile
33
49
 
50
+ Read the backend and frontend `package.json` to discover the state operations. Discover them; do not
51
+ assume these exact names — a project may expose them under its own, and this skill runs whatever the
52
+ project declares:
53
+ - `db:seed` / `seed:*` — write the fixture baseline
54
+ - `db:reset` / `reset:*` — converge state back to that baseline
55
+ - `db:reset:verify` / `reset:verify:*` — prove the post-state, by exact counts
56
+ - `state:inventory` — enumerate what the running environment actually holds
57
+ - `check:state-classification` — compare that inventory against the state contract
58
+
34
59
  Read the frontend `package.json` to discover codegen scripts:
35
60
  - `fetch:graphql:schema:*` — fetch GraphQL schema
36
61
  - `generate:types:*` — generate TypeScript types
37
62
 
63
+ If a state script the operation needs does not exist, report the absence and the scripts that DO
64
+ exist. Do not substitute a different script, and do not fall back to running SQL by hand.
65
+
38
66
  ## AWS Prerequisite
39
67
 
40
68
  All database operations (except `codegen`) require AWS credentials. Verify the target profile first:
@@ -113,11 +141,74 @@ STAGE={env} bun run generate:sql-schema
113
141
 
114
142
  **Note**: The backend must be running (locally or deployed) for schema fetching to work.
115
143
 
144
+ ### seed (write the fixture baseline)
145
+
146
+ Run the project's discovered seed script for the target environment. A seed is additive or
147
+ convergent, never a blind wipe; if the project's seed clears first, treat it as a reset and follow
148
+ the reset sequence below.
149
+
150
+ ```bash
151
+ cd "${BACKEND_DIR:-../backend-v2}"
152
+ {package-manager} run {discovered-seed-script} --stage {env}
153
+ ```
154
+
155
+ ### reset (converge state back to the baseline)
156
+
157
+ Never a single command. The sequence is fixed:
158
+
159
+ 1. **Dry run.** `{discovered-reset-script} --dry-run --stage {env}`. Read the enumeration. Stop on
160
+ any entity of unknown ownership, on any `forbidden`-classified entity appearing at all, and on
161
+ any disagreement between the requested stage and the resolved environment.
162
+ 2. **Classify first if the contract is stale.** If `check:state-classification` reports an
163
+ unclassified entity, the reset does not run — an unclassified entity is neither safe to keep nor
164
+ safe to delete. Fix the state contract, then start over at step 1.
165
+ 3. **Apply**, passing an idempotency key when running in CI:
166
+ `{discovered-reset-script} --stage {env} --idempotency-key {run-id}`.
167
+ 4. **Verify** with `reset:verify`. A reset that mutated but did not verify is a failure, not a
168
+ partial success.
169
+ 5. **Converge check.** Applying a second time must report no further change. If the second run keeps
170
+ deleting, the ownership predicate is wrong — report it rather than re-running.
171
+
172
+ ### reset:verify (prove the post-state)
173
+
174
+ ```bash
175
+ {package-manager} run {discovered-verify-script} --stage {env}
176
+ ```
177
+
178
+ Verification asserts **exact** expected counts per fixture entity. "At least one" passes against a
179
+ leak, which is the condition being guarded.
180
+
181
+ ### state:inventory (enumerate what the environment actually holds)
182
+
183
+ Produces the runtime inventory the classification check compares against. A complete inventory
184
+ covers more than rows: identity-provider objects, object storage prefixes, search indexes, queues
185
+ and dead-letter backlogs, caches with a persistence tier, derived and materialized views, and
186
+ runtime-created jobs. Record anything that could not be enumerated, with the reason.
187
+
188
+ ### state:classify (compare the inventory to the contract)
189
+
190
+ ```bash
191
+ node scripts/check-state-classification.mjs
192
+ ```
193
+
194
+ Exit 0 = every entity the environment holds is classified and every policy obligation is met.
195
+ Nonzero = an unclassified entity, an unswept `fixture-owned` entity, a stale classification, an
196
+ incomplete inventory, or a missing assurance. Report the findings verbatim — each names the entity
197
+ and what is missing.
198
+
116
199
  ## Output Format
117
200
 
201
+ Every state operation returns the standard command envelope on stdout — one JSON object with
202
+ `schemaVersion`, `capability`, `mode`, `operation`, `environment`, `contractVersion`, `dryRun`,
203
+ `status`, `correlationId`, and `summary{deleted,created,preserved}`. Report from that envelope, not
204
+ from prose scraped off stderr. A destructive operation that produced no envelope has not been
205
+ verified, whatever its exit code said.
206
+
118
207
  Report operation result:
119
208
 
120
209
  | Operation | Environment | Target | Status | Details |
121
210
  |-----------|-------------|--------|--------|---------|
122
211
  | migrate | dev | local DB | SUCCESS | 2 migrations applied |
123
212
  | codegen | dev | frontend | SUCCESS | Types regenerated |
213
+ | reset | dev | reset adapter | completed | deleted 12 / preserved 31, converged on second apply, correlation `abc123` |
214
+ | state:classify | dev | state contract | failed | `public.notes` unclassified — fail closed |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
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": "2.345.0",
3
+ "version": "2.346.0",
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": "2.345.0",
3
+ "version": "2.346.0",
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": "2.345.0",
3
+ "version": "2.346.0",
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": "2.345.0",
3
+ "version": "2.346.0",
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-phaser",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
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-rails",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
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-rails",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
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-rails",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
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": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, 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": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.345.0",
3
+ "version": "2.346.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -0,0 +1,48 @@
1
+ # Reset/Seed Coverage & State Classification (load-bearing)
2
+
3
+ **Every persistent entity a project owns carries exactly one declared reset policy, and a work item that adds or changes persistent state is not done until the reset/seed contract covers it.** An entity the running system holds but the contract does not classify is a contract violation, and the check that finds it **fails closed** — an unclassified entity is never treated as safe to keep and never treated as safe to delete.
4
+
5
+ **One vendor-neutral contract, cited by** `lisa-research`, `lisa-acceptance-criteria`, `lisa-task-decomposition`, `lisa-test-strategy`, `lisa-implement`, `lisa-codify-verification`, `lisa-verification-lifecycle`, and `lisa-verify` (the `leaf-only-lifecycle` / `repo-scope-split` precedent: one shared slug, never divergent per-skill prose). It never names a database engine, cloud, identity provider, or test runner — those are project configuration.
6
+
7
+ ## Why this exists
8
+
9
+ Test suites create state. Without a contract, cleanup is a habit: a flow creates a uniquely-marked record and deletes it on the happy path only, so every early failure leaks one more. Nothing sweeps it, nothing complains, and the suite degrades until someone reads a flake as a product bug. The observed shape is always the same — leaked records accumulate silently until a list view, a uniqueness constraint, or a count assertion breaks. Per-flow self-cleanup is not coverage; it is the failure mode.
10
+
11
+ ## Membership
12
+
13
+ Membership is **state, not repo name, ticket label, or storage engine**: an entity is in scope the moment something the project writes **outlives the process that wrote it**. That includes rows and tables, but rows are only one kind of state. Also in scope: identity-provider objects (accounts, groups, memberships, sessions), object storage (buckets, prefixes, uploaded files), search indexes, queues and topics (in-flight and dead-letter), caches with a persistence tier, materialized/derived views and projections, feature-flag and configuration overrides, scheduled jobs created at runtime, and analytics or third-party side effects a run leaves behind. Out of scope: values that live only in memory for the duration of one process.
14
+
15
+ A work item is in scope when it **adds** such an entity, **changes what owns or writes** one, or **changes the lifetime** of one. Renames count as changes, not as new entities plus deletions.
16
+
17
+ ## The four policies
18
+
19
+ Every entity is classified as exactly one of:
20
+
21
+ - **`fixture-owned`** — the reset may create, mutate, and delete rows here, but only those it owns. Ownership is declared as a predicate (a reserved id shape, a reserved account or namespace, a marker attribute), never as "everything in this entity."
22
+ - **`preserve`** — the reset must leave this untouched. Catalog, reference data, anything a migration seeds, anything expensive or impossible to rebuild, and any state belonging to someone who is not the fixture.
23
+ - **`derived-rebuild`** — not authored by anyone; recomputed from its sources after the reset (projections, materialized views, search indexes, caches). The reset rebuilds it rather than clearing or preserving it, and proves it converged.
24
+ - **`forbidden`** — the reset must be structurally unable to touch it: ledgers, payments, wallets, withdrawals, audit trails, anything irreversible. Declaring `forbidden` obliges naming the enforcement outside the script — a least-privilege role, a revoked grant, a separate account or credential boundary — because a script-only promise dies in the refactor that drops the safe caller.
25
+
26
+ **Classify by provenance, never by observation.** "The table looked empty" is not evidence it is unused; runtime statistics are approximations, and a table that has never been analyzed reports rows it holds. Ask who writes it and whether anything can put it back.
27
+
28
+ ## Keep-lists are a detector, not the safety model
29
+
30
+ Deriving the clear-list by subtracting a keep-list from a schema listing is a **useful detector** — run it, and let it flag entities the contract has not seen. It is not the boundary. It cannot model renames, multiple schemas, framework-generated entities, views, partitions, row-level ownership, or any of the non-DB state above, and "new entities are cleared unless exempted" erases unrelated data the first time something adds one. The boundary is the classification; subtraction only tells you the classification is stale.
31
+
32
+ ## Required assurances
33
+
34
+ A reset contract is not complete until it declares, and points at evidence for, all of: non-fixture and catalog data survive; reserved fixture identifiers are rejected on collision with anything real; foreign references into preserved entities are refused rather than cascaded; every write is **acknowledged** (a mutation reported by the caller and not confirmed by the system is a failure, not a success); a second apply converges to the same state and reports no further change; the post-state is verified by **exact expected counts**, not "at least one"; and production fails closed with no override of any kind. Where the platform can enforce a boundary with roles, grants, or constraints, it does — the in-process guard remains as defense in depth, never as the primary control.
35
+
36
+ ## Definition of done
37
+
38
+ A work item that adds or changes persistent state is not done until: (1) every entity it introduces or changes is classified in the project's state contract with a reason and an owner; (2) `fixture-owned` entities it introduces declare their ownership predicate **and** are actually swept by the reset — an entity a suite creates but nothing removes is the leak this rule exists to prevent; (3) `preserve`/`forbidden` entities it introduces name their enforcement; (4) any seed the suite depends on covers the new state, with the verify step asserting exact counts; and (5) the state-classification check passes in the same PR. **A missing or stale classification is a verification failure, not a warning** — it blocks completion exactly as a `PARTIAL` spec-conformance verdict does, and is never demoted to "optional", "if cheap", or a follow-up without a linked build-ready ticket created before merge.
39
+
40
+ ## Bootstrap, noop, and degradation
41
+
42
+ A project with no state contract yet is not exempt: the first work item touching persistent state scaffolds the minimum (the contract file, its own entities classified, the check wired into CI) and covers **its own** state. It never backfills the whole system — pre-existing unclassified entities are recorded as burndown with an owner and a date, not treated as this item's blocker. A project that genuinely holds no persistent state declares a **machine-readable noop** (`mode: "declared-noop"` with reason, owner, and a capability-manifest reference) which the check verifies against the repo rather than taking on faith — a bare exit 0 is indistinguishable from a successful destructive run and never satisfies this rule. A project that cannot produce a runtime inventory records the checked sources and the absence, exactly as the regression-spec absence path in `verification` does; a silent skip is never one of the exits.
43
+
44
+ ## Command envelope
45
+
46
+ Every reset, seed, verify, inventory, and classification adapter answers the **same interface** — one validated JSON result on stdout, exit 0 only when the operation both completed **and** verified, `--dry-run` mandatory before anything destructive, and a requested stage always re-checked against server-resolved identity rather than trusted. The envelope is specified in the reference body and is what makes "every repo answers the same question the same way" checkable instead of aspirational.
47
+
48
+ Full contract (state-contract schema, check semantics, detectors, envelope schema, enforcement patterns, bootstrap procedure): [reference/reset-seed-coverage.md](../reference/reset-seed-coverage.md).