feat(verify-slice): add risk-scaled verification workflow
- Add `skills/verify-slice/SKILL.md` (37 lines) defining proportional check sizing, falsifiable assertions, conditional blind runtime execution, white-box diff inspection, and 4-state dispositions (`PASS`, `FAIL`, `BLOCKED`, `INCONCLUSIVE`) separated from human release approval. - Add `skills/verify-slice/references/perspectives.md` specifying minimum checks per tier (`Lightweight`, `Standard`, `High-Assurance`), six review perspectives, and anti-rationalization rules. - Register `verify-slice` in `install.sh` and the active skill table in `README.md`.
This commit is contained in:
1 parent
3677f892b0
commit
9db036e4ac
4 files changed
+79
-1
No files matched your search
@@ -77,6 +77,7 @@ Every skill features an explicit **"Your call"** checkpoint where the agent paus
|
||||
| **[`build-skill`](skills/build-skill/SKILL.md)** | `/build-skill [topic]` | Interactive design, sizing, authoring, and empirical dogfooding of agent skills. Enforces design review gate before file creation. | 49 lines |
|
||||
| **[`inspect-flake-update`](skills/inspect-flake-update/SKILL.md)** | `/inspect-flake-update` | Inspects updated flake.lock inputs, reviews upstream revisions, runs nix flake check, and drafts commit messages. | 46 lines |
|
||||
| **[`nix-devshell`](skills/nix-devshell/SKILL.md)** | `/nix-devshell` | Authors, extends, validates, and troubleshoots project Nix development shells from repository evidence. | 75 lines |
|
||||
| **[`verify-slice`](skills/verify-slice/SKILL.md)** | `/verify-slice` | Runs risk-proportional verification and PR review across behavioral, state, security, ergonomic, and regression perspectives using falsifiable assertions. | 37 lines |
|
||||
|
||||
### Vault Extensions (`extensions/`)
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ while [[ $# -gt 0 ]]; do
|
||||
done
|
||||
|
||||
# Active skills to install
|
||||
ACTIVE_PORTABLE_SKILLS=(build-skill diagnose document git-commit inspect-flake-update journal-builder nix-devshell practice reconcile-docs)
|
||||
ACTIVE_PORTABLE_SKILLS=(build-skill diagnose document git-commit inspect-flake-update journal-builder nix-devshell practice reconcile-docs verify-slice)
|
||||
ACTIVE_EXTENSION_SKILLS=(draft-curation commit-logger)
|
||||
|
||||
# Legacy / deprecated skills to clean up or back up if found in target
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: verify-slice
|
||||
description: >-
|
||||
Runs risk-proportional verification and pull request review across behavioral,
|
||||
state, security, ergonomic, and regression perspectives using falsifiable
|
||||
assertions. Use when verifying a vertical feature slice, reviewing a pull
|
||||
request before merge, or planning QA checks. Not for root-cause debugging;
|
||||
use diagnose.
|
||||
---
|
||||
|
||||
# Verify Slice
|
||||
|
||||
## Use when
|
||||
- Verifying a vertical feature slice or pull request before human release review.
|
||||
- Building or executing risk-proportional QA checks against acceptance criteria.
|
||||
- Not for investigating an unknown failure from raw symptoms: use `diagnose`.
|
||||
|
||||
## Steps
|
||||
1. **Size checks to risk.** Inspect touched files, boundaries, and failure consequences, then apply the matching minimum check set in [perspectives](references/perspectives.md) (`Lightweight`, `Standard`, or `High-Assurance`) plus only the perspectives warranted by the diff. Proceed directly on routine checks within authorized scope; pause for confirmation only when verification would materially expand scope, incur substantial setup or subagent cost, or introduce a trade-off.
|
||||
2. **Write falsifiable assertions.** Convert acceptance criteria and selected perspectives into concrete checks with explicit failure conditions (`FAIL if ...`) and required evidence. Never use open-ended observational prompts ("record what happens").
|
||||
3. **Verify runtime behavior.** Run required behavioral, state, and persistence checks against the live system when the tier requires it, confirming mutations via both UI state and authoritative backend reads. Execute directly by default; use a clean subagent (withholding the diff, PR narrative, and author self-audit) only when independent execution is likely to expose blind spots in stateful workflows or `High-Assurance` changes.
|
||||
4. **Inspect the diff.** Audit the actual code diff and commit history against the selected code-level perspectives (untrusted data and URL sinks, authoritative state reconciliation, scope containment, and test coverage claims).
|
||||
5. **Record dispositions honestly.** Score every check as `PASS`, `FAIL`, `BLOCKED`, or `INCONCLUSIVE` with evidence (see [perspectives](references/perspectives.md)). Never rationalize an unexpected result as a design trade-off, treat a missing check as passing, or convert an aggregate score into release approval.
|
||||
6. **Present the evidence packet.** Group confirmed findings by source (runtime vs. diff), note discrepancies against the implementer's self-audit, surface blocked or unverified areas, and recommend a disposition without waiving failed criteria.
|
||||
|
||||
## Your call
|
||||
- **Expanded verification scope**: approve before spinning up costly test environments, isolated subagents, or checks outside previously authorized boundaries.
|
||||
- **Handling non-passing checks**: decide whether a `FAIL`, `BLOCKED`, or `INCONCLUSIVE` check triggers a repair loop, an environment fix, a tracked follow-up issue, or an explicit waiver.
|
||||
- **Release decision**: decide whether to accept residual risks and merge; verification evidence never authorizes release on its own.
|
||||
|
||||
## Done when
|
||||
- Every required check has an evidence-backed state (`PASS`, `FAIL`, `BLOCKED`, or `INCONCLUSIVE`) and the human owner has reviewed the evidence packet to decide release or rework.
|
||||
|
||||
## Hands off to
|
||||
- `diagnose`: when a failed or blocked check needs root-cause investigation.
|
||||
- `git-commit`: when packaging approved verification or repair changes.
|
||||
- `document`: when verification uncovers a durable architectural insight or decision.
|
||||
@@ -0,0 +1,40 @@
|
||||
# Verification Tiers, Perspectives, and Dispositions
|
||||
|
||||
Reference for `verify-slice`. Keep effort proportional to failure consequences and change uncertainty rather than diff line count alone.
|
||||
|
||||
## 1. Operational Rigor Tiers
|
||||
|
||||
Each tier defines the minimum required checks. Escalate individual perspectives when a small diff touches a high-risk boundary (for example, a two-line auth or URL sanitizer change).
|
||||
|
||||
| Tier | Typical Slice | Minimum Required Checks | Execution Mode |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **Lightweight** | Copy updates, styling tweaks, isolated low-risk fixes with no new state or untrusted inputs | 1. Run relevant existing automated tests.<br/>2. Targeted smoke/regression check on the touched view.<br/>3. Concise diff check for scope containment. | Direct execution in current session. |
|
||||
| **Standard** | New UI component, ordinary API integration, or modification to an established workflow | 1. Falsifiable assertions for every acceptance criterion.<br/>2. Automated test suite, typecheck, and lint.<br/>3. Runtime check of happy, empty, and error states plus persistence reload.<br/>4. Targeted regression check on shared entrypoints.<br/>5. White-box diff review of untrusted sinks and state updates. | Direct execution by default. Use an isolated black-box subagent only if multi-step workflow bias or author self-audit independence warrants the cost. |
|
||||
| **High-Assurance** | Auth, permissions, payments, destructive actions, sensitive data, concurrent/conflict state, or cross-cutting architecture | All `Standard` checks, plus:<br/>1. Explicit conflict, duplicate-submission, and aggregate-state reconciliation assertions.<br/>2. Source-to-sink security audit with adversarial input tests.<br/>3. Secondary backend/API reads confirming persisted truth after mutations. | Independent black-box subagent for behavioral scenarios paired with separate white-box diff review. |
|
||||
|
||||
## 2. Selectable Review Perspectives
|
||||
|
||||
Select only the perspectives relevant to the slice's risk profile. Give each selected perspective concrete assertions rather than vague instructions ("review security").
|
||||
|
||||
| Perspective | Core Question | Concrete Checks to Construct |
|
||||
| :--- | :--- | :--- |
|
||||
| **Behavioral & Workflow** | Can the user complete the intended end-to-end task across real states? | Verify each required user journey across loading, empty, error/retry, partial, and success states; confirm state survives reload and matches backend reads. |
|
||||
| **State & Concurrency** | Do local UI elements, sibling rows, and aggregate counters stay aligned with authoritative state? | Check duplicate-click guards, timeout/retry recovery, and conflict responses (such as `409`); assert that aggregate counters and sibling items reconcile with authoritative server state rather than drifting via partial local heuristics. |
|
||||
| **Security Boundaries** | Can untrusted data execute code, break attributes, or route to unsafe destinations? | Trace every dynamic value into DOM/template sinks: verify safe DOM APIs or HTML escaping for text and quoted attributes, context-appropriate URL validation for `href`/`src`/`action` (never relying on HTML escaping alone for URLs), and at least one adversarial payload check. |
|
||||
| **Ergonomics & Accessibility** | Is the slice usable on narrow screens, with touch, and via keyboard/assistive tech? | Check narrow mobile viewport (`375px`) for overflow, `>= 44x44px` touch targets, sequential keyboard `Tab` focus, visible `:focus-visible` outlines, and `aria-live` announcements for dynamic feedback. |
|
||||
| **Scope & Regression** | Did the slice disturb adjacent features or smuggle unrelated refactors? | Inspect shared files (`main`, routers, shared types/styles) for minimal additive footprint; run targeted smoke checks on neighboring views/endpoints. |
|
||||
| **Commit & Evidence Hygiene** | Are commits localizable and does claimed test coverage match reality? | Check that commits separate coherent boundaries where practical and compare author self-audit claims against what unit/integration tests actually assert. |
|
||||
|
||||
## 3. Four-State Disposition Contract
|
||||
|
||||
Every required assertion ends in exactly one state:
|
||||
|
||||
- `PASS`: Assertion satisfied with observable proof (command output, HTTP response, DOM measurement, or screenshot).
|
||||
- `FAIL`: Assertion violated with reproducible steps and observed vs. expected output.
|
||||
- `BLOCKED`: Check could not run due to an environmental, fixture, or dependency problem (distinct from a product bug; diagnose the blocker before judging the implementation).
|
||||
- `INCONCLUSIVE`: Check ran, but collected evidence is insufficient to prove or falsify the assertion.
|
||||
|
||||
### Anti-Rationalization Rules
|
||||
1. **Expected values before observation**: State the exact pass/fail condition before running the check. If an assertion expects `2` and the system shows `1`, record `FAIL`, never `PASS` with a narrative excuse ("targeted reconciliation trade-off").
|
||||
2. **Separate seed/fixture health from product bugs**: Avoid fragile raw SQL test seeds when domain services or API helpers exist; if a fixture mismatches schema reality, mark `BLOCKED` and fix the fixture.
|
||||
3. **Unique provenance**: When comparing author self-audit, black-box QA, and diff review, label whether each confirmed defect was caught by self-audit, black-box execution, or code inspection so process value stays measurable.
|
||||
Reference in new issue
Block a user