Provides theoretical foundations for evidence-based confidence in software systems, covering test severity, mutation analysis, observability, and regression harness design. Useful when reasoning about test adequacy, confidence levels, and whether testing processes should change.
Ships in preferences-operations-and-reliability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
"Tests pass" and "we have confidence" are not the same thing. Tests can pass while being inadequate — they would also pass with a wrong implementation. Implementations can be correct while being over-constrained by brittle tests that prevent legitimate evolution. The beads issue graph can say "closed" while the codebase is in a partially functional state.
Three coupled failure modes drive this gap:
The optimization target is to maximize confidence per unit of testing investment, where confidence is measured by the severity of the evidence, not the volume of tests. A small number of high-severity tests that would fail under any plausible-but-wrong implementation provides stronger confidence than a large suite of low-severity tests that pass regardless. This document establishes the theoretical foundations for reasoning about this optimization across the full lifecycle of an AI-agent-driven engineering workflow.
The severity criterion, adapted from preferences-scientific-inquiry-methodology, provides the foundational question for all validation reasoning: would this test have failed if the implementation were wrong?
A test result e is good evidence for claim H only if the test procedure had a high probability of not yielding e if H were false. This means a test that always passes regardless of implementation has zero severity and provides no evidence. A test that discriminates between correct and plausible-but-wrong implementations has high severity. Severity is not binary — it exists on a continuum.
Consider three engineering examples.
nix build succeeding has low severity for correctness because builds can succeed with wrong behavior.
A property-based test that generates 1000 random inputs and verifies an algebraic law has high severity because it would fail under most incorrect implementations.
An integration test that exercises the specific interface contract between two subsystems has high severity for that contract.
Property-based tests, as described in preferences-algebraic-laws, are the primary mechanism for high-severity evidence because they test universal properties across generated inputs rather than specific examples.
The severity of a property test scales with the diversity of generated inputs and the discriminating power of the property being tested.
When assessing whether to invest in a new test, the severity question should be primary. A test that is easy to write but would pass under most incorrect implementations is not worth writing — it adds maintenance cost without adding confidence. A test that is harder to write but would fail under any plausible-but-wrong implementation is worth the investment because it provides genuine evidence.
The relationship between specification and implementation forms a partial order. Implementation P refines specification S if every observable behavior of P is allowed by S. The specification's looseness — the set of behaviors it permits but does not require — represents the intended degrees of freedom for implementors.
This refinement obligation is one leg of a two-obligation pair: refinement here is P ⇒ S, the program meeting the specification at their shared alphabet.
Its companion, W ∧ S ⇒ R — the satisfaction argument that the specification discharges the requirement in the presence of the world's actual behavior — is owned by preferences-requirements-engineering, which also introduces the world W and the requirement R this section does not otherwise name.
Stating either obligation is a different act from grading the evidence that discharges it; this skill owns only the latter, and the severity and confidence machinery in the rest of this document is that grading.
Tests should constrain exactly what the specification requires, no more and no less.
Property-based tests preserve more freedom than example-based tests because properties express "what must hold for all inputs" without specifying "what the output looks like for this specific input."
Algebraic laws from preferences-algebraic-laws are the ideal test form: they express structural properties that any correct implementation must satisfy while permitting arbitrary implementation strategies.
The validation ladder orders testing approaches from least constraining to most constraining:
| Rung | Mechanism | Freedom preserved |
|---|---|---|
| Type-level constraints | Illegal states unrepresentable (from preferences-domain-modeling) | Maximum — the type system enforces invariants without runtime tests |
| Algebraic law tests | Structural properties (from preferences-algebraic-laws) | High — any implementation satisfying the laws is valid |
| Property-based tests | Behavioral properties across generated inputs | High — specifies what, not how |
| Contract tests | Interface conformance between components | Moderate — constrains interaction shape |
| Integration tests | Assembled subsystem behavior | Moderate — constrains end-to-end paths |
| Example-based tests | Specific input-output pairs | Low — most constraining, use sparingly |
Lower rungs preserve more freedom. Prefer the lowest rung that provides sufficient severity for the claim being tested.
The ladder is not a maturity model where you ascend from top to bottom. It is a tool selection guide. A claim about monoidal associativity belongs on the algebraic law rung; an algebraic law test is both more severe and less constraining than an example-based test for that claim. A claim about end-user workflow completion belongs on the integration rung; no amount of algebraic law testing would address it. The claim determines the rung, not the project's maturity.
Five orthogonal dimensions for assessing evidence quality, adopted from assurance case literature (Goal Structuring Notation — Kelly & Weaver, 2004):
In Goal Structuring Notation terms, the satisfaction argument W ∧ S ⇒ R (owned by preferences-requirements-engineering) is the natural top-level goal node of such a case, with the world assumptions W appearing as context nodes and as away-goals the case is conditional on.
Directness measures whether the evidence tests the actual claim or a proxy. Direct evidence tests the thing itself; indirect evidence tests something correlated. A unit test that exercises the function under test is direct; code coverage metrics are indirect.
Severity (Mayo) asks whether the evidence would have come out differently if the claim were false. This is the core discriminating dimension — evidence with low severity is noise regardless of the other dimensions.
Coverage measures what fraction of the specification's requirements the evidence addresses. A test suite with 100% severity on 10% of requirements still leaves 90% unvalidated.
Freshness reflects when the evidence was last produced. Evidence decays as the codebase evolves. A test that passed 6 months ago on a different commit provides weak evidence for today's code.
Independence captures whether the evidence comes from a source independent of the implementation. Self-testing (the implementer writes the tests) provides less independence than adversarial testing (a reviewer or separate agent writes the tests).
These dimensions are not a checklist but a lens for assessing whether confidence is warranted. An agent reading an issue's evidence-freshness date and seeing it is months old should recognize this as a confidence concern without being told to check.
In practice, most evidence portfolios are strong on some dimensions and weak on others. A freshly run, high-severity property test may lack independence if the same agent wrote the implementation and the test. A thorough adversarial review may lack freshness if the code has changed since the review. The goal is not perfection across all five dimensions but awareness of where the gaps are, so that confidence claims remain calibrated to the actual strength of the evidence supporting them.
Confidence levels form a monotone chain ordered by evidence strength:
| Level | Meaning | Evidence required |
|---|---|---|
undemonstrated | No evidence exists | Default state |
finding-recorded | Probe produced documented findings | Written findings that inform next steps |
prototype | Working code exists but untested | Code runs in at least one scenario |
locally-verified | Unit/property tests pass locally | Automated tests with meaningful severity |
integration-verified | Assembled subsystems work together | Integration tests at component boundaries |
validated | Higher-level requirement is satisfied | End-to-end or acceptance tests against spec |
regression-protected | Automated harness prevents backsliding | CI-enforced tests that would detect regression |
regressed | Previously validated claim no longer holds | Evidence of failure (demotion target, not a promotion step) |
Promotion requires fresh, severe evidence at the target level — not just the passage of time or the closing of issues.
Skipping levels is permitted when evidence directly supports the higher claim; an end-to-end test can promote directly to validated without passing through locally-verified.
The chain is monotone in the sense that each level subsumes the evidence requirements of all lower levels.
regression-protected implies validated implies integration-verified, and so on.
An implementation cannot be regression-protected if no integration test has ever passed, because the CI harness would be guarding a claim that was never established.
The finding-recorded level applies specifically to probe issues whose deliverable is documented findings rather than code.
It is not a prerequisite for prototype on implementation issues — an implementation issue progresses directly from undemonstrated to prototype when working code exists.
The chain is ordered by evidence strength within each issue type, but the finding-recorded to prototype transition represents a type switch (epistemic finding to code artifact) rather than a monotone strength increase.
Within integration-verified, the regulator-kind choice is the severity sub-axis: process-compose runners sample the application-composition envelope (process startup, port binding, IPC handshake), nspawn container tests sample the service-on-NixOS envelope (systemd unit activation, declarative configuration interpretation), and full nixosTest VMs sample the NixOS-module + kernel + multi-machine envelope (network namespaces, kernel features, cross-machine protocol).
Each kind would distinguish a strictly wider class of incorrect implementations from correct ones than the prior, so under Mayo's criterion the same integration-verified label backed by a VM-test regulator is stronger evidence than the same label backed by a process-compose runner.
See preferences-nix-checks-architecture §"Choosing among integration regulators" for the decision rules that fix which kind is appropriate for a given target's envelope.
Demotion to regressed is triggered by six conditions:
Demotion is not failure; it is the system working correctly. A confidence chain that never demotes is either stable (nothing changes) or dishonest (changes happen but confidence is never reassessed). In an actively evolving codebase, periodic demotion and re-promotion is the expected steady state.
Three tiers of regression protection serve different contexts:
| Guard type | Mechanism | Strength | When to use |
|---|---|---|---|
manual | Documented verification procedure that a human or agent runs | Weak — depends on discipline | When automation is infeasible or disproportionately expensive |
automated | CI-enforced tests that run on every commit/PR | Strong — continuous, objective | Default target for production code |
runtime | Monitors, health checks, or canary deployments that detect regression in production | Strongest — catches environmental failures automation misses | For properties that depend on deployment environment |
Mutation analysis serves as meta-validation: inject known faults into the implementation and check whether the test suite detects them.
The mutation score (percentage of injected faults detected) quantifies test suite adequacy.
A surviving mutant — a fault not detected — identifies a gap in the regression harness.
Tools include cargo-mutants (Rust), mutmut (Python), and Stryker (TypeScript/JavaScript).
These are advisory; the framework does not require mutation testing, but agents should be aware it exists as a meta-validation technique for assessing the severity of existing test suites.
The three tiers are not exclusive.
A well-defended property typically has automated guards in CI and may additionally have runtime monitors in production for environment-sensitive behavior.
The tier selection determines the minimum acceptable level of protection for a given claim, not an upper bound on how many mechanisms can guard it.
Runtime verification, as formalized by Leucker and Schallhart (2009), provides a theoretical foundation for the runtime tier.
Runtime monitors observe execution traces and check them against formal specifications, catching violations that static test suites cannot anticipate because they depend on deployment context, timing, or external service behavior.
Three anti-patterns that agents should recognize and flag when encountered.
Green-suite theater occurs when the test suite is green but has low severity. Tests check syntax rather than semantics, verify mocks rather than real integrations, or cover the happy path but miss edge cases. The diagnostic question: what implementation bugs would this test suite miss? If the answer is "many plausible ones," the suite has low severity regardless of its pass rate.
Confidence-by-proximity occurs when a closed issue is conflated with a validated implementation.
Closure means "the planned work was performed," not "the claim is supported by evidence."
The diagnostic: check the confidence signal.
If it is undemonstrated or prototype on a closed issue, there is a gap between what the tracker says and what the evidence supports.
Over-specification theater occurs when tests are coupled to implementation details — specific function call sequences, exact output formatting, internal data structures — rather than specification properties. Any legitimate refactoring breaks tests, so refactoring is avoided and the codebase ossifies. The diagnostic question: would this test still pass if the same specification were reimplemented with a different algorithm? If not, the test is coupled to implementation, not specification.
The runtime tier of the regression harness — health checks, canary deployments, and production monitors — is where validation assurance meets observability engineering.
This section connects the severity criterion and confidence promotion chain to concrete observability practices described in preferences-observability-engineering and preferences-production-readiness.
An SLO burn rate alert is a runtime regression signal. When the error budget burns faster than expected after a deployment, the deployment has introduced a regression that pre-deployment testing did not catch. This is the runtime tier operating at its designed purpose: catching what automated tests cannot. The severity of this detection is high by construction — it is based on actual user experience degradation, not a proxy metric.
The confidence promotion chain (from undemonstrated through regression-protected) has an implicit temporal dimension.
Evidence ages: a test that passed last week is weaker evidence than a test that passed after the latest commit.
For runtime evidence, staleness depends on monitoring data recency and the rate of environmental change.
A health check that passed 30 seconds ago in a stable environment is strong evidence.
The same health check result in a rapidly changing environment (during deployment, scaling event, or dependency update) is weaker evidence because the environment may have shifted.
The severity criterion asks "would this test have failed if the implementation were wrong?" For runtime monitors, the equivalent is: "would this SLI detect the degradation if it occurred?" An SLI that measures overall request success rate has moderate severity — it detects outages but may miss partial degradation affecting specific user segments. An SLI that measures success rate per user cohort or per feature has higher severity — it discriminates between widespread and localized degradation. SLI design should be evaluated through the severity lens: high-severity SLIs discriminate between correct and degraded states with high probability.
Production telemetry provides evidence that no pre-deployment test can: evidence that the system works correctly under real load, with real data, against real dependencies, in the actual network topology.
This is the strongest tier of the regression harness because it tests against the full complexity of the production environment.
The trade-off is latency — runtime detection happens after deployment, meaning some users may experience the regression before it is detected.
Progressive delivery (described in preferences-production-readiness) mitigates this by limiting blast radius.
Cross-reference preferences-observability-engineering for SLO mechanics and preferences-production-readiness for progressive delivery and the four post-deploy questions.
Severity applies to the process itself, not just to individual tests. The meta-level question: would our planning and validation methodology have produced a different outcome if our understanding of the problem were wrong? If the answer is no — if the methodology produces the same plan regardless of whether assumptions are correct — then the methodology has zero severity and provides no information about whether we are on the right track.
This is the bridge from single-loop learning (correct errors within the existing framework) to double-loop learning (question whether the framework itself should change), following Argyris and Schon's organizational learning theory.
Agents should recognize and surface these double-loop learning signals:
When an agent recognizes any of these patterns, the correct response is to pause execution and surface the observation rather than pressing on within a framework it perceives as inadequate. The agent's primary obligation is to the quality of the outcome, not to compliance with the plan. The plan is a tool for achieving the outcome — when the plan is counterproductive, the agent's duty is to say so.
This meta-cognitive capacity is not a separate phase or skill. It is a pervasive quality of how the agent engages with its work at every level of the session lifecycle.
The reflexive severity principle extends the Peircean self-correcting inquiry structure identified in preferences-adaptive-planning section "Cross-domain applicability."
| Domain | Single-loop | Double-loop |
|---|---|---|
| Engineering | Plan/implement/validate/replan | Question whether the planning methodology is fit for the problem |
| Scientific inquiry | Hypothesize/predict/test/revise | Question whether the experimental methodology is severe |
| Bayesian modeling | Prior/simulate/posterior-check/expand | Question whether the model class is adequate for the phenomenon |
The Peircean fixation of belief applies at every level: the method by which we fix belief must itself be subject to scrutiny, or it becomes dogma. This holds for individual tests, test suites, validation strategies, planning methodologies, and the overall process.
The practical implication is that validation assurance is not a phase that happens after implementation. It is a perspective that pervades every phase — from specification decomposition (are these requirements falsifiable?) through implementation (is this testable at the appropriate rung?) through review (does the evidence actually discriminate?) through maintenance (has the evidence gone stale?). When this perspective is internalized rather than proceduralized, the overhead of validation assurance approaches zero because it becomes indistinguishable from careful engineering.
The three threads this skill develops at the per-test level — Mayo's severity criterion, refinement as spec-implementation freedom preservation, and the confidence promotion chain — have a structural counterpart at the regulator-suite level in compositional continuous verification (CCV).
CCV's four-property hierarchy (existence, traceability, adequacy, integrity, each strictly stronger than the prior) is the systems-level operationalization of those same commitments lifted from individual tests to the whole verification apparatus.
What severity asks of a single test — would it fail if the implementation were wrong? — integrity asks of the whole regulator suite, operationally checked by mutation testing of regulator targets.
What refinement asks of a spec-implementation pair — does the implementation stay inside the specification's declared freedom? — adequacy asks of an envelope-regulator pair, requiring that regulators saturate every declared coverage bin within their target's envelope.
What the confidence promotion chain asks of evidence accumulation along a single claim — each level strictly stronger than the prior, with no skipping the chain — the four-property hierarchy asks of the suite's structural completeness, with traceability presupposing existence and adequacy presupposing traceability and integrity presupposing adequacy.
See preferences-compositional-continuous-verification for the full hierarchy, the closure-operator realization, and the agent-side enumerate-and-audit habit on .#checks.
preferences-adaptive-planning for the MPC/VSM/Cynefin framework this skill extends with evidence-based confidencepreferences-scientific-inquiry-methodology for the epistemological foundations (Mayo's severity criterion, Peircean pragmatism) that this skill operationalizes for engineeringpreferences-algebraic-laws for property-based testing as the primary mechanism for high-severity, freedom-preserving evidencepreferences-domain-modeling for type-level constraints as the first rung of the validation ladderpreferences-compositional-continuous-verification for the systems-level four-property hierarchy (existence → traceability → adequacy → integrity) that operationalizes severity, refinement, and the confidence promotion chain at the regulator-suite scalepreferences-nix-checks-architecture §"Choosing among integration regulators" for the three-way regulator-kind decision (process-compose / nspawn / full VM) that fixes the severity sub-axis within integration-verifiedWhat SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/preferences-adaptive-planningAdaptive planning and control theory foundations for AI agent engineering, including MPC receding-horizon planning, Viable System Model mapping, queue economics, Cynefin domain classification, and stigmergic coordination. Load when reasoning about planning depth optimization, buffer sizing, validation gate placement, replanning triggers, or understanding why session workflow skills work the way they do.
/preferences-compositional-continuous-verificationCompositional Continuous Verification (CCV) — theoretical anchor for system-level approximate correctness via operating-envelope-plus-regulator pairs that compose into a single closure operator. Distinct from narrow Continuous Validation (Rosenthal–Jones runtime sense). Load when designing flake checks, reasoning about coverage and traceability, proposing new regulators, auditing whether a system's verification apparatus closes, or framing the agent-side enumerate-and-audit habit on `.#checks`.
/preferences-operations-and-reliability:preferences-validation-assurancefrom preferences-operations-and-reliability
npx claudepluginhub cameronraysmith/vanixiets --plugin preferences-operations-and-reliabilityOther plugins' skills for the same job