Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9db036e4ac | ||
|
|
3677f892b0 |
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 |
|
| **[`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 |
|
| **[`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 |
|
| **[`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/`)
|
### Vault Extensions (`extensions/`)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Active skills to install
|
# 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)
|
ACTIVE_EXTENSION_SKILLS=(draft-curation commit-logger)
|
||||||
|
|
||||||
# Legacy / deprecated skills to clean up or back up if found in target
|
# Legacy / deprecated skills to clean up or back up if found in target
|
||||||
|
|||||||
@@ -45,10 +45,18 @@ when interacting with backend APIs and systems.
|
|||||||
- *Error*: Helpful explanation with an actionable recovery/retry button.
|
- *Error*: Helpful explanation with an actionable recovery/retry button.
|
||||||
- *Partial*: Graceful handling of single-item or paginated boundaries.
|
- *Partial*: Graceful handling of single-item or paginated boundaries.
|
||||||
- *Success*: Immediate visual feedback acknowledging user action.
|
- *Success*: Immediate visual feedback acknowledging user action.
|
||||||
5. **Strict DOM & String Sanitization (XSS Defense)**:
|
|
||||||
- Never interpolate untrusted, backend-sourced, or dynamic string variables directly into `innerHTML` or template literals.
|
## Engineering Invariants
|
||||||
- Always sanitize dynamic values using an explicit HTML escaper (e.g., `escapeHtml()`).
|
|
||||||
- Sanitize across all rendering contexts: text nodes, attribute values (`aria-label`, `title`, `href`, `data-*`), and error messages.
|
1. **Security-by-Construction (Untrusted Data Boundaries)**:
|
||||||
|
- Prefer safe DOM APIs (`textContent`, `createElement`, `setAttribute`) where practical over HTML string concatenation.
|
||||||
|
- When HTML template strings are unavoidable, escape dynamic values in text and quoted attribute contexts (`aria-label`, `title`, `data-*`) with an explicit HTML escaper.
|
||||||
|
- Distinguish HTML escaping from URL validation: never insert untrusted URLs directly into URL-bearing attributes (`href`, `src`, `action`, `formaction`). Validate each URL according to its specific sink and intended behavior (for example, `https:`, `http:`, `mailto:`, or `tel:` for external contact links; relative or allowlisted origin paths for form `action` and media/script `src`; always rejecting executable schemes such as `javascript:`).
|
||||||
|
- Add adversarial input tests (quotes, angle brackets, event-handler payloads, or disallowed URL schemes) whenever rendering dynamic inputs.
|
||||||
|
2. **Explicit State & Reconciliation Invariants**:
|
||||||
|
- Identify the authoritative source of truth for every interactive view before coding.
|
||||||
|
- Decide explicitly which state changes are optimistic and which wait for server confirmation.
|
||||||
|
- Define what happens on duplicate submissions, conflicts, timeouts, and concurrent modifications, including how sibling and aggregate UI elements (counters, badges, filtered lists) reconcile with authoritative server state rather than drifting behind single-row local heuristics.
|
||||||
|
|
||||||
## Ephemeral Worktree Protocol
|
## Ephemeral Worktree Protocol
|
||||||
|
|
||||||
@@ -73,15 +81,9 @@ To allow parallel work without workspace interference:
|
|||||||
|
|
||||||
## Incremental Decomposition & Commit Discipline
|
## Incremental Decomposition & Commit Discipline
|
||||||
|
|
||||||
To maintain high reviewability and fault localization:
|
Keep changes reviewable and commits scoped to coherent boundaries without forcing a rigid commit count or fixed sequence onto every task:
|
||||||
1. **Decompose by Architectural Boundary**:
|
- When a vertical slice spans multiple layers, separate natural boundaries where helpful (such as contract types/client methods, pure logic/unit tests, read presentation, interactive mutation flows, and shell wiring/styles).
|
||||||
- Step 1: Contract types and API client interfaces.
|
- Avoid monolithic commits that bundle read views, interactive modals/mutations, and shared entrypoint wiring together, and avoid artificial micro-commits on small fixes or single-template `htmx` swaps.
|
||||||
- Step 2: Pure helper utilities, formatters, sanitizers, and unit tests.
|
|
||||||
- Step 3: UI views, attendee cards, and list rendering (~200–350 lines).
|
|
||||||
- Step 4: Complex mutation modals, walk-in flows, or form dialogs.
|
|
||||||
- Step 5: Shell navigation wiring and responsive CSS.
|
|
||||||
2. **Commit Sizing**:
|
|
||||||
Avoid bundling read views, interactive modals, and mutation flows into a single massive commit. Keep commits scoped to a single coherent boundary.
|
|
||||||
|
|
||||||
## Browser Observation & Visual Verification
|
## Browser Observation & Visual Verification
|
||||||
|
|
||||||
@@ -100,6 +102,12 @@ Anne never assumes UI code works without visual confirmation:
|
|||||||
- Layout stability and the 5 component states.
|
- Layout stability and the 5 component states.
|
||||||
4. **Report & Evidence**:
|
4. **Report & Evidence**:
|
||||||
Attach visual findings or screenshots to PR descriptions and handoff reports.
|
Attach visual findings or screenshots to PR descriptions and handoff reports.
|
||||||
|
5. **Pre-Handoff Self-Review & Traceability**:
|
||||||
|
Before handing off a PR, map each acceptance criterion to its implementation location and distinguish verification coverage (`unit-tested`, `integration-tested`, `browser-verified`, or `unverified assumption`). Confirm:
|
||||||
|
- Security-sensitive boundaries, untrusted sinks, and error paths were checked.
|
||||||
|
- Related UI elements and aggregate state transitions stay consistent with the authoritative source of truth.
|
||||||
|
- Required tests and targeted regression checks on existing views ran cleanly, and the diff stays within authorized scope.
|
||||||
|
- All deviations, workarounds, residual risks, and unverified assumptions are explicitly disclosed rather than inferred as passing.
|
||||||
|
|
||||||
## Authority Matrix
|
## Authority Matrix
|
||||||
|
|
||||||
|
|||||||
@@ -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