@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.
- package/all/copy-overwrite/scripts/check-state-classification.mjs +609 -0
- package/all/copy-overwrite/scripts/lisa-command-envelope.mjs +194 -0
- package/all/copy-overwrite/scripts/lisa-schema-validate.mjs +208 -0
- package/all/copy-overwrite/scripts/schemas/lisa-command-envelope.v1.schema.json +119 -0
- package/all/copy-overwrite/scripts/schemas/lisa-state-contract.v1.schema.json +191 -0
- package/all/create-only/state/README.md +41 -0
- package/all/create-only/state/state-contract.example.json +46 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +59 -12
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- 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/.codex-plugin/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-research/SKILL.md +7 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +1 -1
- package/plugins/lisa/rules/eager/reset-seed-coverage.md +48 -0
- package/plugins/lisa/rules/reference/reset-seed-coverage.md +231 -0
- package/plugins/lisa/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/lisa/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/lisa/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/lisa/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/lisa/skills/lisa-research/SKILL.md +7 -1
- package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-verify/SKILL.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/lisa-agy/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/lisa-agy/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/lisa-agy/skills/lisa-research/SKILL.md +7 -1
- package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +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/reset-seed-coverage.md +48 -0
- package/plugins/lisa-copilot/rules/reference/reset-seed-coverage.md +231 -0
- package/plugins/lisa-copilot/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/lisa-copilot/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/lisa-copilot/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/lisa-copilot/skills/lisa-research/SKILL.md +7 -1
- package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/reset-seed-coverage-reference.mdc +236 -0
- package/plugins/lisa-cursor/rules/reset-seed-coverage.mdc +53 -0
- package/plugins/lisa-cursor/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/lisa-cursor/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/lisa-cursor/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/lisa-cursor/skills/lisa-research/SKILL.md +7 -1
- package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +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/.codex-plugin/skills/ops-db-ops/SKILL.md +93 -2
- package/plugins/lisa-expo/skills/ops-db-ops/SKILL.md +94 -3
- package/plugins/lisa-expo/skills/ops-db-ops/agents/openai.yaml +2 -2
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/ops-db-ops/SKILL.md +94 -3
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/ops-db-ops/SKILL.md +94 -3
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/ops-db-ops/SKILL.md +94 -3
- 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/reset-seed-coverage.md +48 -0
- package/plugins/src/base/rules/reference/reset-seed-coverage.md +231 -0
- package/plugins/src/base/skills/lisa-acceptance-criteria/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-codify-verification/SKILL.md +4 -0
- package/plugins/src/base/skills/lisa-implement/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-parity-safety-net-rules/SKILL.md +8 -3
- package/plugins/src/base/skills/lisa-parity-sentry-sdk-setup/SKILL.md +14 -2
- package/plugins/src/base/skills/lisa-parity-sentry-seer/SKILL.md +5 -3
- package/plugins/src/base/skills/lisa-research/SKILL.md +7 -1
- package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-test-strategy/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-verification-lifecycle/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-verify/SKILL.md +1 -1
- package/plugins/src/expo/skills/ops-db-ops/SKILL.md +94 -3
- package/scripts/check-state-classification.mjs +27 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: lisa-parity-sentry-sdk-setup
|
|
3
3
|
description: "Install and configure the Sentry SDK for a project — detect the framework/runtime, add the correct @sentry/<framework> package, initialize the client, wire the DSN through env, enable error + performance monitoring, and set up source map upload for readable stack traces. One consolidated skill covering react, nextjs, node, nestjs, express, python, django, react-native, and more. Lisa-native reimplementation of Sentry's SDK-setup suite. Use when adding Sentry to a project or fixing an existing Sentry install."
|
|
4
4
|
allowed-tools: ["Read", "Edit", "Write", "Bash"]
|
|
5
|
-
synced-from: sentry@claude-plugins-official@1.3.
|
|
5
|
+
synced-from: sentry@claude-plugins-official@1.3.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Sentry SDK Setup
|
|
@@ -19,7 +19,7 @@ setup skills**; this single Lisa-native skill consolidated all of them. As of
|
|
|
19
19
|
upstream **1.2.0** Sentry itself consolidated the suite into one
|
|
20
20
|
`sentry-instrument` playbook, so the shapes now match — but this skill remains a
|
|
21
21
|
from-scratch reimplementation against Lisa conventions, **not** a translation of
|
|
22
|
-
the upstream skill. Pinned to `sentry@claude-plugins-official@1.3.
|
|
22
|
+
the upstream skill. Pinned to `sentry@claude-plugins-official@1.3.2` via
|
|
23
23
|
`synced-from` so the parity drift detector tracks it as one unit.
|
|
24
24
|
|
|
25
25
|
## Step 0 — Scope the install
|
|
@@ -211,6 +211,16 @@ build time:
|
|
|
211
211
|
- Tie uploads to a **release** identifier (commit SHA or version) and inject the
|
|
212
212
|
same release into `Sentry.init({ release })` so traces map to the right build.
|
|
213
213
|
|
|
214
|
+
## Step 6a — Name custom telemetry consistently
|
|
215
|
+
|
|
216
|
+
When adding custom span or log attributes, use the current stable Sentry
|
|
217
|
+
semantic-convention key for that domain when one exists. Sentry conventions are
|
|
218
|
+
aligned with OpenTelemetry in many domains, but Sentry's current convention is
|
|
219
|
+
authoritative for data sent to Sentry. Consult only the relevant domain in the
|
|
220
|
+
official convention reference, omit deprecated keys, and do not invent a second
|
|
221
|
+
name for an established attribute. Keep values low-cardinality and never attach
|
|
222
|
+
secrets, credentials, request bodies, or unnecessary personal data.
|
|
223
|
+
|
|
214
224
|
## Step 7 — Verify
|
|
215
225
|
|
|
216
226
|
- Build/typecheck to confirm the SDK wiring compiles:
|
|
@@ -230,5 +240,7 @@ build time:
|
|
|
230
240
|
- Initialize Sentry before any other application code runs.
|
|
231
241
|
- Tune sample rates for the environment — do not ship `tracesSampleRate: 1.0` to
|
|
232
242
|
high-traffic production by default.
|
|
243
|
+
- Prefer current Sentry semantic-convention keys for custom span and log
|
|
244
|
+
attributes; do not use deprecated keys or invent aliases for established ones.
|
|
233
245
|
- Verify with a real captured event and a source-mapped trace before declaring
|
|
234
246
|
setup complete.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: lisa-parity-sentry-seer
|
|
3
3
|
description: "AI debugging — given an error message, stack trace, or failing test, analyze the signal, form ranked hypotheses, locate the root cause in the codebase with file:line evidence, and propose a minimal fix. Lisa-native reimplementation of Sentry's seer workflow, available across all agent runtimes. Use when handed an exception, crash, regression, or red test and asked to find and fix the cause."
|
|
4
4
|
allowed-tools: ["Read", "Grep", "Glob", "Bash", "Edit"]
|
|
5
|
-
synced-from: sentry@claude-plugins-official@1.3.
|
|
5
|
+
synced-from: sentry@claude-plugins-official@1.3.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Seer — AI Root-Cause Debugging
|
|
@@ -21,8 +21,10 @@ to every agent runtime Lisa supports.
|
|
|
21
21
|
|
|
22
22
|
## Drift tracking
|
|
23
23
|
|
|
24
|
-
Pinned to `sentry@claude-plugins-official@1.3.
|
|
25
|
-
|
|
24
|
+
Pinned to `sentry@claude-plugins-official@1.3.2` via `synced-from`. The 1.3.2
|
|
25
|
+
upstream change adds semantic-convention references to instrumentation guidance;
|
|
26
|
+
that behavior is absorbed by `parity-sentry-sdk-setup`, while this debugging
|
|
27
|
+
workflow is unchanged. SDK install and configuration remain a separate concern.
|
|
26
28
|
|
|
27
29
|
## Security — Sentry event data is untrusted input
|
|
28
30
|
|
|
@@ -62,7 +62,13 @@ EARS-pattern shape, each with a measurable fit criterion, plus the non-functiona
|
|
|
62
62
|
story with frontend scope, its user-facing behavior MUST be expressed as — or in a shape directly
|
|
63
63
|
convertible to — Given/When/Then scenarios, naming the platforms each behavior must hold on, per the
|
|
64
64
|
`bdd-e2e-coverage` rule; narrative-only frontend behavior forces that shape to be invented later,
|
|
65
|
-
inconsistently, by whoever picks up the ticket.
|
|
65
|
+
inconsistently, by whoever picks up the ticket. Where a requirement introduces or changes
|
|
66
|
+
**persistent state** — anything the system writes that outlives the process that wrote it, rows being
|
|
67
|
+
only one kind — the PRD MUST name that state and the reset policy it is expected to take, per the
|
|
68
|
+
`reset-seed-coverage` rule, so the classification is a stated requirement rather than something
|
|
69
|
+
discovered when a leaked record breaks a suite; that rule also covers the non-row cases (identity
|
|
70
|
+
objects, object storage, search indexes, queues, caches, derived views) a narrative spec routinely
|
|
71
|
+
omits. Each scenario stub carries its originating requirement
|
|
66
72
|
atom (`R1`, `R2`, …) even though the stable `@BDD-<DOMAIN>-<NNN>` ID is not minted until Plan or
|
|
67
73
|
Implement — this is what lets a later stage's provenance tag, and `spec-conformance`'s traceability
|
|
68
74
|
check, walk back from a shipped scenario to the PRD requirement it was written to satisfy, instead of
|
|
@@ -56,6 +56,8 @@ For each task, define what "done" looks like:
|
|
|
56
56
|
|
|
57
57
|
For a **frontend task** -- one that adds or changes a user-observable surface -- the `bdd-e2e-coverage` rule makes two further criteria mandatory on the item itself, never left implied: (a) the Gherkin scenarios it adds or changes in the project's behavior contract, with their stable IDs and required platforms, and (b) aligned e2e automation in the project's configured runner for each of those platforms, with the coverage gate passing and the matrix and burndown regenerated. Carry both into the item's Validation Journey. A project with no behavior contract yet does not get an exemption -- the first such task carries the bootstrap scaffolding as a deliverable, scoped to its own behavior (cite the rule; do not restate its bootstrap steps).
|
|
58
58
|
|
|
59
|
+
For a task that adds or changes **persistent state** -- anything the system writes that outlives the process that wrote it, including identity-provider objects, object storage, search indexes, queues, caches and derived views, not only rows -- the `reset-seed-coverage` rule makes two further criteria mandatory on the item itself, never left implied: (a) every entity it introduces or changes is classified in the project's state contract with a reason and an owner, and (b) anything classified `fixture-owned` has a declared ownership predicate and an actual sweep, with the state-classification check passing. Carry both into the item's Validation Journey. A project with no state contract yet does not get an exemption -- the first such task carries the bootstrap scaffolding as a deliverable, scoped to its own state (cite the rule; do not restate its bootstrap steps).
|
|
60
|
+
|
|
59
61
|
### 3. Assign Verification Type
|
|
60
62
|
|
|
61
63
|
Each task must have a verification method. Choose the most appropriate:
|
|
@@ -58,6 +58,7 @@ Structure findings as:
|
|
|
58
58
|
- Always run `bun run test` to understand current test state before recommending or writing new tests
|
|
59
59
|
- Match existing test conventions -- do not introduce new test patterns
|
|
60
60
|
- For frontend work, the strategy is not complete until every required scenario-platform obligation has aligned e2e automation in the project's configured runner for that platform, or a dated waiver naming the runner limitation (`bdd-e2e-coverage`). A unit test, a route boot, or a passing test on a different platform never seals an obligation
|
|
61
|
+
- For work that adds or changes persistent state, the strategy is not complete until each new entity is classified in the project's state contract and anything `fixture-owned` has a sweep, per the `reset-seed-coverage` rule. Per-flow self-cleanup is not a strategy: a flow that deletes what it created only on its happy path leaks on every failure in between, which is how state pollution becomes an unreproducible flake months later
|
|
61
62
|
- Every test must have a clear "why" -- no tests for testing's sake
|
|
62
63
|
- Focus on testing behavior, not implementation details
|
|
63
64
|
- Verification commands must be runnable locally (no CI/CD dependencies)
|
|
@@ -374,6 +374,7 @@ A task is done only when:
|
|
|
374
374
|
- Proof artifacts are captured
|
|
375
375
|
- Every passing empirical verification is codified as a regression test (or has an explicit, documented skip reason from the allowed set)
|
|
376
376
|
- For frontend work, the `bdd-e2e-coverage` contract is satisfied: every user-facing behavior added or changed exists as a Gherkin scenario with a stable ID traceable to the work item, every required scenario-platform obligation is mapped to aligned e2e automation in the project's configured runner for that platform or carries a dated waiver, and the coverage gate passes with the matrix and burndown regenerated and committed. Missing BDD coverage is a verification failure, not a warning
|
|
377
|
+
- For work that adds or changes persistent state, the `reset-seed-coverage` contract is satisfied: every entity introduced or changed is classified in the project's state contract with a reason and an owner, anything `fixture-owned` declares its ownership predicate and is actually swept, and the state-classification check passes in the same PR. An unclassified entity fails closed; per-flow self-cleanup is not coverage
|
|
377
378
|
- For a leaf work unit, every typed `[EVIDENCE: <artifact-type>: <name>]` marker declared in its Validation Journey has a captured, non-empty artifact of the declared type attached to the ticket (the evidence manifest is fully satisfied)
|
|
378
379
|
- Cross-work-item `EVIDENCE-REF` pointers were excluded from the local manifest and did not satisfy S14 or completion; a runtime-changing leaf has at least one local claiming marker
|
|
379
380
|
- Spec conformance verdict is `CONFORMS` (not `PARTIAL`, not `DIVERGES`)
|
|
@@ -35,7 +35,7 @@ Treat the first successful lead-spawn request (or, on the Codex fallback, the fi
|
|
|
35
35
|
|
|
36
36
|
Execute the **Verify** flow as defined in the `intent-routing` rule (loaded via the lisa plugin). The flow includes:
|
|
37
37
|
|
|
38
|
-
1. **Pre-flight: codification gate** — confirm that every passing local empirical verification on this branch was codified as a regression test (the Implement flow's codify step). If any verification has no committed test and no allowed skip reason (PR / Documentation / Deploy / Investigate-Only), invoke `codify-verification` now and amend the PR before shipping. For frontend work the gate additionally enforces the `bdd-e2e-coverage` rule: the shipped behavior exists as a Gherkin scenario with a stable ID, every required scenario-platform obligation has aligned automation in the project's configured runner for that platform or a dated waiver, and the project's coverage gate passes with the matrix regenerated. A missing runner is never a bare recorded absence — it needs a dated `platformWaivers` entry (per the rule) and, where the runner could reasonably be added, a linked build-ready follow-up ticket referenced from it; never a silent skip. Missing BDD coverage is a verification failure that blocks the ship, not a warning. A change cannot ship until its verifications are guarded.
|
|
38
|
+
1. **Pre-flight: codification gate** — confirm that every passing local empirical verification on this branch was codified as a regression test (the Implement flow's codify step). If any verification has no committed test and no allowed skip reason (PR / Documentation / Deploy / Investigate-Only), invoke `codify-verification` now and amend the PR before shipping. For frontend work the gate additionally enforces the `bdd-e2e-coverage` rule: the shipped behavior exists as a Gherkin scenario with a stable ID, every required scenario-platform obligation has aligned automation in the project's configured runner for that platform or a dated waiver, and the project's coverage gate passes with the matrix regenerated. A missing runner is never a bare recorded absence — it needs a dated `platformWaivers` entry (per the rule) and, where the runner could reasonably be added, a linked build-ready follow-up ticket referenced from it; never a silent skip. Missing BDD coverage is a verification failure that blocks the ship, not a warning. A change cannot ship until its verifications are guarded. For work that adds or changes persistent state the gate additionally enforces the `reset-seed-coverage` rule: every entity the work introduces or changes is classified in the project's state contract, anything `fixture-owned` has an ownership predicate and a sweep, and the state-classification check passes — an unclassified entity fails closed and blocks the ship exactly as missing BDD coverage does.
|
|
39
39
|
2. **Commit** any pending changes via `lisa-git-commit`
|
|
40
40
|
3. **Push and PR** via `lisa-git-submit-pr`
|
|
41
41
|
4. **PR Watch Loop** — drive the PR to MERGED via `lisa-drive-pr-to-merge`, the single source of truth for clearing every blocker: auto-merge with direct-merge fallback, `BEHIND` re-sync, conflict resolution, failing-check fixes, human + bot review-comment handling with thread resolution (it invokes `lisa-pull-request-review` itself), stale `CHANGES_REQUESTED` dismissal, and post-merge ancestry verification. Do not re-implement the loop or its terminal conditions.
|
|
@@ -65,6 +65,7 @@ For each acceptance criterion:
|
|
|
65
65
|
- Every user flow must include at least one error path
|
|
66
66
|
- Use Gherkin format (Given/When/Then) for user flows to enable direct translation into test cases
|
|
67
67
|
- For frontend work, the `bdd-e2e-coverage` rule applies: name the scenario IDs the item will add or change in the project's behavior contract and the platforms each must hold on, and list the contract update plus the aligned e2e automation as explicit acceptance criteria -- they are deliverables, not implied work. List the passing coverage gate and the regenerated matrix and burndown as explicit acceptance criteria too -- the item is not done on a code-complete mapping alone
|
|
68
|
+
- For work that adds or changes persistent state, the `reset-seed-coverage` rule applies: name the persistent entities the item introduces or changes and the reset policy each takes (`fixture-owned` / `preserve` / `derived-rebuild` / `forbidden`), and list the state-contract update, the sweep for anything `fixture-owned`, and the passing state-classification check as explicit acceptance criteria -- they are deliverables, not implied work. Rows are only one kind of state: identity-provider objects, object storage, search indexes, queues, caches and derived views count too
|
|
68
69
|
- When verifying, always run the feature -- never review by only reading code
|
|
69
70
|
- If you cannot run the feature (missing dependencies, services unavailable), report as a blocker -- do not guess
|
|
70
71
|
- If the changes are purely internal (refactoring, config, tooling), report "No user-facing impact" and explain why
|
|
@@ -83,6 +83,10 @@ For **frontend work** — any verification whose validation journey exercised a
|
|
|
83
83
|
|
|
84
84
|
Every artifact encodes the SAME verified journey against a different platform. One is never a substitute for another, and a passing test on one platform never seals another platform's obligation.
|
|
85
85
|
|
|
86
|
+
### 2b. Codifying persistent state (non-demotable)
|
|
87
|
+
|
|
88
|
+
When the verified journey **created, changed, or depended on persistent state**, the `reset-seed-coverage` rule governs what else this codification owes. Classify every entity the work touched in the project's state contract, give anything `fixture-owned` an ownership predicate and a sweep, and run the project's state-classification check the same way the coverage gate is run above — a contract edited but never checked is not proof. Where the journey depended on seeded state, the seed's verify step asserts **exact expected counts** for that state: "at least one" passes against a leak, which is precisely the condition being guarded. Cite the rule for the policy vocabulary and the assurances; do not restate them here.
|
|
89
|
+
|
|
86
90
|
Permitted exits, mirroring the regression-spec rule in `lisa-implement` (never a silent skip, never "optional", and never a bare `N/A`):
|
|
87
91
|
|
|
88
92
|
- The project genuinely has no runner configured for that platform → record a dated `platformWaivers` entry naming the locations checked and "no runner configured" as the reason, exactly like any other unsealable obligation, per the rule. This is never left as a bare `N/A` — an undated absence has no forcing function to ever get revisited.
|
|
@@ -149,6 +149,8 @@ IF it is a Fix (bug), execute the Reproduce sub-flow FIRST:
|
|
|
149
149
|
|
|
150
150
|
For any Fix flow, and for any Build flow that changes user-visible behavior, regression coverage is a required deliverable at the highest practical observation level for the reported surface. If the project has a browser, device, or end-to-end harness for that platform (for example Playwright, Maestro, Detox, Cypress, or an equivalent runtime), the task plan and definition of done MUST include a deterministic regression spec against the reported surface, using mocked or seeded data where needed. This is alongside unit or integration coverage, not a substitute for it. For **frontend work** the deliverable is defined by the `bdd-e2e-coverage` rule and has two halves, both landing in this PR: the Gherkin scenario (stable ID, required platforms) added or updated in the project's behavior contract, and aligned automation in the project's configured runner for **every** platform that scenario requires — no runner substitutes for another, because they guard different platforms of the same behavior. The coverage gate must pass and the matrix and burndown be regenerated before the item is done. Cite the rule; do not restate its scenario, waiver, or bootstrap mechanics here.
|
|
151
151
|
|
|
152
|
+
For work that adds or changes **persistent state**, the `reset-seed-coverage` rule adds a second non-demotable deliverable landing in this same PR: every entity the item introduces or changes is classified in the project's state contract (`fixture-owned` / `preserve` / `derived-rebuild` / `forbidden`) with a reason and an owner, anything `fixture-owned` declares its ownership predicate and is actually swept, and the state-classification check passes. Writing a flow that creates a record and deletes it only on its happy path does NOT satisfy this — that is the leak, not the coverage. Cite the rule; do not restate its policy, waiver, or bootstrap mechanics here.
|
|
153
|
+
|
|
152
154
|
The team lead may not waive, defer, demote, or phrase this regression spec as "optional", "if cheap", "nice to have", or equivalent. The only permitted exits are:
|
|
153
155
|
|
|
154
156
|
1. The project genuinely has no end-to-end harness for the affected platform; record the checked locations and that absence in the task metadata, PR, and work-item evidence.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: lisa-parity-safety-net-rules
|
|
3
3
|
description: "View, set, and verify the custom guard rules enforced by Lisa's safety-net PreToolUse Bash hook (parity-safety-net.sh). The consolidated cross-agent equivalent of the upstream safety-net plugin's set-custom-rules + verify-custom-rules skills — manages a project-local list of extended-regex patterns that block destructive shell commands, on Codex, agy, Copilot, Cursor, and Claude."
|
|
4
4
|
allowed-tools: ["Read", "Edit", "Write", "Bash"]
|
|
5
|
-
synced-from: safety-net@cc-marketplace@2.0.
|
|
5
|
+
synced-from: safety-net@cc-marketplace@2.0.3
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Parity Safety-Net Rules
|
|
@@ -24,12 +24,17 @@ project-specific rules on top of those built-ins.
|
|
|
24
24
|
> against Lisa conventions — it does **not** port or invoke upstream plugin
|
|
25
25
|
> code.
|
|
26
26
|
>
|
|
27
|
-
> **Drift tracking.** Pinned to `safety-net@cc-marketplace@2.0.
|
|
27
|
+
> **Drift tracking.** Pinned to `safety-net@cc-marketplace@2.0.3`.
|
|
28
28
|
> `scripts/plugin-parity-drift.mjs` compares this pin against the upstream
|
|
29
29
|
> version in the plugin cache and flags staleness. **Do not port or copy upstream
|
|
30
30
|
> plugin code.**
|
|
31
31
|
>
|
|
32
|
-
> **
|
|
32
|
+
> **2.0.3 review.** Upstream 2.0.2–2.0.3 added Kimi Code and Amp installation
|
|
33
|
+
> support and release tooling. Those changes do not alter the upstream
|
|
34
|
+
> rule-management skill or Lisa's project-local ERE rule contract, and Lisa does
|
|
35
|
+
> not currently ship hooks for those runtimes, so no behavior is absorbed here.
|
|
36
|
+
>
|
|
37
|
+
> **Known gap at the 2.0.3 pin.** Upstream 2.0.0 rebuilt its engine and added two
|
|
33
38
|
> guard families this hook does **not** mirror: `secret.*` (blocks reading or
|
|
34
39
|
> copying SSH keys, `.env` files, cloud credentials, and coding-CLI credential
|
|
35
40
|
> stores) and `rm.git-metadata` (blocks deleting the `.git` control plane). Both
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: lisa-parity-sentry-sdk-setup
|
|
3
3
|
description: "Install and configure the Sentry SDK for a project — detect the framework/runtime, add the correct @sentry/<framework> package, initialize the client, wire the DSN through env, enable error + performance monitoring, and set up source map upload for readable stack traces. One consolidated skill covering react, nextjs, node, nestjs, express, python, django, react-native, and more. Lisa-native reimplementation of Sentry's SDK-setup suite. Use when adding Sentry to a project or fixing an existing Sentry install."
|
|
4
4
|
allowed-tools: ["Read", "Edit", "Write", "Bash"]
|
|
5
|
-
synced-from: sentry@claude-plugins-official@1.3.
|
|
5
|
+
synced-from: sentry@claude-plugins-official@1.3.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Sentry SDK Setup
|
|
@@ -19,7 +19,7 @@ setup skills**; this single Lisa-native skill consolidated all of them. As of
|
|
|
19
19
|
upstream **1.2.0** Sentry itself consolidated the suite into one
|
|
20
20
|
`sentry-instrument` playbook, so the shapes now match — but this skill remains a
|
|
21
21
|
from-scratch reimplementation against Lisa conventions, **not** a translation of
|
|
22
|
-
the upstream skill. Pinned to `sentry@claude-plugins-official@1.3.
|
|
22
|
+
the upstream skill. Pinned to `sentry@claude-plugins-official@1.3.2` via
|
|
23
23
|
`synced-from` so the parity drift detector tracks it as one unit.
|
|
24
24
|
|
|
25
25
|
## Step 0 — Scope the install
|
|
@@ -211,6 +211,16 @@ build time:
|
|
|
211
211
|
- Tie uploads to a **release** identifier (commit SHA or version) and inject the
|
|
212
212
|
same release into `Sentry.init({ release })` so traces map to the right build.
|
|
213
213
|
|
|
214
|
+
## Step 6a — Name custom telemetry consistently
|
|
215
|
+
|
|
216
|
+
When adding custom span or log attributes, use the current stable Sentry
|
|
217
|
+
semantic-convention key for that domain when one exists. Sentry conventions are
|
|
218
|
+
aligned with OpenTelemetry in many domains, but Sentry's current convention is
|
|
219
|
+
authoritative for data sent to Sentry. Consult only the relevant domain in the
|
|
220
|
+
official convention reference, omit deprecated keys, and do not invent a second
|
|
221
|
+
name for an established attribute. Keep values low-cardinality and never attach
|
|
222
|
+
secrets, credentials, request bodies, or unnecessary personal data.
|
|
223
|
+
|
|
214
224
|
## Step 7 — Verify
|
|
215
225
|
|
|
216
226
|
- Build/typecheck to confirm the SDK wiring compiles:
|
|
@@ -230,5 +240,7 @@ build time:
|
|
|
230
240
|
- Initialize Sentry before any other application code runs.
|
|
231
241
|
- Tune sample rates for the environment — do not ship `tracesSampleRate: 1.0` to
|
|
232
242
|
high-traffic production by default.
|
|
243
|
+
- Prefer current Sentry semantic-convention keys for custom span and log
|
|
244
|
+
attributes; do not use deprecated keys or invent aliases for established ones.
|
|
233
245
|
- Verify with a real captured event and a source-mapped trace before declaring
|
|
234
246
|
setup complete.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: lisa-parity-sentry-seer
|
|
3
3
|
description: "AI debugging — given an error message, stack trace, or failing test, analyze the signal, form ranked hypotheses, locate the root cause in the codebase with file:line evidence, and propose a minimal fix. Lisa-native reimplementation of Sentry's seer workflow, available across all agent runtimes. Use when handed an exception, crash, regression, or red test and asked to find and fix the cause."
|
|
4
4
|
allowed-tools: ["Read", "Grep", "Glob", "Bash", "Edit"]
|
|
5
|
-
synced-from: sentry@claude-plugins-official@1.3.
|
|
5
|
+
synced-from: sentry@claude-plugins-official@1.3.2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Seer — AI Root-Cause Debugging
|
|
@@ -21,8 +21,10 @@ to every agent runtime Lisa supports.
|
|
|
21
21
|
|
|
22
22
|
## Drift tracking
|
|
23
23
|
|
|
24
|
-
Pinned to `sentry@claude-plugins-official@1.3.
|
|
25
|
-
|
|
24
|
+
Pinned to `sentry@claude-plugins-official@1.3.2` via `synced-from`. The 1.3.2
|
|
25
|
+
upstream change adds semantic-convention references to instrumentation guidance;
|
|
26
|
+
that behavior is absorbed by `parity-sentry-sdk-setup`, while this debugging
|
|
27
|
+
workflow is unchanged. SDK install and configuration remain a separate concern.
|
|
26
28
|
|
|
27
29
|
## Security — Sentry event data is untrusted input
|
|
28
30
|
|
|
@@ -62,7 +62,13 @@ EARS-pattern shape, each with a measurable fit criterion, plus the non-functiona
|
|
|
62
62
|
story with frontend scope, its user-facing behavior MUST be expressed as — or in a shape directly
|
|
63
63
|
convertible to — Given/When/Then scenarios, naming the platforms each behavior must hold on, per the
|
|
64
64
|
`bdd-e2e-coverage` rule; narrative-only frontend behavior forces that shape to be invented later,
|
|
65
|
-
inconsistently, by whoever picks up the ticket.
|
|
65
|
+
inconsistently, by whoever picks up the ticket. Where a requirement introduces or changes
|
|
66
|
+
**persistent state** — anything the system writes that outlives the process that wrote it, rows being
|
|
67
|
+
only one kind — the PRD MUST name that state and the reset policy it is expected to take, per the
|
|
68
|
+
`reset-seed-coverage` rule, so the classification is a stated requirement rather than something
|
|
69
|
+
discovered when a leaked record breaks a suite; that rule also covers the non-row cases (identity
|
|
70
|
+
objects, object storage, search indexes, queues, caches, derived views) a narrative spec routinely
|
|
71
|
+
omits. Each scenario stub carries its originating requirement
|
|
66
72
|
atom (`R1`, `R2`, …) even though the stable `@BDD-<DOMAIN>-<NNN>` ID is not minted until Plan or
|
|
67
73
|
Implement — this is what lets a later stage's provenance tag, and `spec-conformance`'s traceability
|
|
68
74
|
check, walk back from a shipped scenario to the PRD requirement it was written to satisfy, instead of
|
|
@@ -56,6 +56,8 @@ For each task, define what "done" looks like:
|
|
|
56
56
|
|
|
57
57
|
For a **frontend task** -- one that adds or changes a user-observable surface -- the `bdd-e2e-coverage` rule makes two further criteria mandatory on the item itself, never left implied: (a) the Gherkin scenarios it adds or changes in the project's behavior contract, with their stable IDs and required platforms, and (b) aligned e2e automation in the project's configured runner for each of those platforms, with the coverage gate passing and the matrix and burndown regenerated. Carry both into the item's Validation Journey. A project with no behavior contract yet does not get an exemption -- the first such task carries the bootstrap scaffolding as a deliverable, scoped to its own behavior (cite the rule; do not restate its bootstrap steps).
|
|
58
58
|
|
|
59
|
+
For a task that adds or changes **persistent state** -- anything the system writes that outlives the process that wrote it, including identity-provider objects, object storage, search indexes, queues, caches and derived views, not only rows -- the `reset-seed-coverage` rule makes two further criteria mandatory on the item itself, never left implied: (a) every entity it introduces or changes is classified in the project's state contract with a reason and an owner, and (b) anything classified `fixture-owned` has a declared ownership predicate and an actual sweep, with the state-classification check passing. Carry both into the item's Validation Journey. A project with no state contract yet does not get an exemption -- the first such task carries the bootstrap scaffolding as a deliverable, scoped to its own state (cite the rule; do not restate its bootstrap steps).
|
|
60
|
+
|
|
59
61
|
### 3. Assign Verification Type
|
|
60
62
|
|
|
61
63
|
Each task must have a verification method. Choose the most appropriate:
|
|
@@ -58,6 +58,7 @@ Structure findings as:
|
|
|
58
58
|
- Always run `bun run test` to understand current test state before recommending or writing new tests
|
|
59
59
|
- Match existing test conventions -- do not introduce new test patterns
|
|
60
60
|
- For frontend work, the strategy is not complete until every required scenario-platform obligation has aligned e2e automation in the project's configured runner for that platform, or a dated waiver naming the runner limitation (`bdd-e2e-coverage`). A unit test, a route boot, or a passing test on a different platform never seals an obligation
|
|
61
|
+
- For work that adds or changes persistent state, the strategy is not complete until each new entity is classified in the project's state contract and anything `fixture-owned` has a sweep, per the `reset-seed-coverage` rule. Per-flow self-cleanup is not a strategy: a flow that deletes what it created only on its happy path leaks on every failure in between, which is how state pollution becomes an unreproducible flake months later
|
|
61
62
|
- Every test must have a clear "why" -- no tests for testing's sake
|
|
62
63
|
- Focus on testing behavior, not implementation details
|
|
63
64
|
- Verification commands must be runnable locally (no CI/CD dependencies)
|
|
@@ -374,6 +374,7 @@ A task is done only when:
|
|
|
374
374
|
- Proof artifacts are captured
|
|
375
375
|
- Every passing empirical verification is codified as a regression test (or has an explicit, documented skip reason from the allowed set)
|
|
376
376
|
- For frontend work, the `bdd-e2e-coverage` contract is satisfied: every user-facing behavior added or changed exists as a Gherkin scenario with a stable ID traceable to the work item, every required scenario-platform obligation is mapped to aligned e2e automation in the project's configured runner for that platform or carries a dated waiver, and the coverage gate passes with the matrix and burndown regenerated and committed. Missing BDD coverage is a verification failure, not a warning
|
|
377
|
+
- For work that adds or changes persistent state, the `reset-seed-coverage` contract is satisfied: every entity introduced or changed is classified in the project's state contract with a reason and an owner, anything `fixture-owned` declares its ownership predicate and is actually swept, and the state-classification check passes in the same PR. An unclassified entity fails closed; per-flow self-cleanup is not coverage
|
|
377
378
|
- For a leaf work unit, every typed `[EVIDENCE: <artifact-type>: <name>]` marker declared in its Validation Journey has a captured, non-empty artifact of the declared type attached to the ticket (the evidence manifest is fully satisfied)
|
|
378
379
|
- Cross-work-item `EVIDENCE-REF` pointers were excluded from the local manifest and did not satisfy S14 or completion; a runtime-changing leaf has at least one local claiming marker
|
|
379
380
|
- Spec conformance verdict is `CONFORMS` (not `PARTIAL`, not `DIVERGES`)
|
|
@@ -35,7 +35,7 @@ Treat the first successful lead-spawn request (or, on the Codex fallback, the fi
|
|
|
35
35
|
|
|
36
36
|
Execute the **Verify** flow as defined in the `intent-routing` rule (loaded via the lisa plugin). The flow includes:
|
|
37
37
|
|
|
38
|
-
1. **Pre-flight: codification gate** — confirm that every passing local empirical verification on this branch was codified as a regression test (the Implement flow's codify step). If any verification has no committed test and no allowed skip reason (PR / Documentation / Deploy / Investigate-Only), invoke `codify-verification` now and amend the PR before shipping. For frontend work the gate additionally enforces the `bdd-e2e-coverage` rule: the shipped behavior exists as a Gherkin scenario with a stable ID, every required scenario-platform obligation has aligned automation in the project's configured runner for that platform or a dated waiver, and the project's coverage gate passes with the matrix regenerated. A missing runner is never a bare recorded absence — it needs a dated `platformWaivers` entry (per the rule) and, where the runner could reasonably be added, a linked build-ready follow-up ticket referenced from it; never a silent skip. Missing BDD coverage is a verification failure that blocks the ship, not a warning. A change cannot ship until its verifications are guarded.
|
|
38
|
+
1. **Pre-flight: codification gate** — confirm that every passing local empirical verification on this branch was codified as a regression test (the Implement flow's codify step). If any verification has no committed test and no allowed skip reason (PR / Documentation / Deploy / Investigate-Only), invoke `codify-verification` now and amend the PR before shipping. For frontend work the gate additionally enforces the `bdd-e2e-coverage` rule: the shipped behavior exists as a Gherkin scenario with a stable ID, every required scenario-platform obligation has aligned automation in the project's configured runner for that platform or a dated waiver, and the project's coverage gate passes with the matrix regenerated. A missing runner is never a bare recorded absence — it needs a dated `platformWaivers` entry (per the rule) and, where the runner could reasonably be added, a linked build-ready follow-up ticket referenced from it; never a silent skip. Missing BDD coverage is a verification failure that blocks the ship, not a warning. A change cannot ship until its verifications are guarded. For work that adds or changes persistent state the gate additionally enforces the `reset-seed-coverage` rule: every entity the work introduces or changes is classified in the project's state contract, anything `fixture-owned` has an ownership predicate and a sweep, and the state-classification check passes — an unclassified entity fails closed and blocks the ship exactly as missing BDD coverage does.
|
|
39
39
|
2. **Commit** any pending changes via `lisa-git-commit`
|
|
40
40
|
3. **Push and PR** via `lisa-git-submit-pr`
|
|
41
41
|
4. **PR Watch Loop** — drive the PR to MERGED via `lisa-drive-pr-to-merge`, the single source of truth for clearing every blocker: auto-merge with direct-merge fallback, `BEHIND` re-sync, conflict resolution, failing-check fixes, human + bot review-comment handling with thread resolution (it invokes `lisa-pull-request-review` itself), stale `CHANGES_REQUESTED` dismissal, and post-merge ancestry verification. Do not re-implement the loop or its terminal conditions.
|
|
@@ -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).
|