Harness Intelligence Wiki
HarnessValidation and Tools

Validation Gates

Evidence required before harness delivery work can close, and the focused validation scope that produces it

Validation gates match changed surfaces to proof.

They keep agent activity from being mistaken for engineering work. A run can close only when the changed surface has matching evidence: tests, typecheck, build, browser observation, Verification, runtime logs, review findings, docs ingest, CI results, or a specific no-op reason.

Public Surface Proof

Validation proves the surface being trusted. Running a command is weak evidence when the command does not match the change.

A docs-only change needs route and link evidence more than a broad test suite. A UI change can pass typecheck while the actual workflow is broken. A runtime bug can pass unit tests while the reproduced path still fails.

Gate Types

Delivery applies these gates in router order:

  • Pair gate: the Architecture/SPEC Pair Complete gate runs before any dependent dispatch, in every entry mode. ARCHITECTURE.md (status: compiled, readiness: agent-ready) and agent-ready SPEC.md need retained commits, immutable blob URLs, and complete OUT/AC traceability. Gaps go to Requirements Phase through Brainstorming, Requirements, Backlog.
  • Backlog projection gate: before planning, a current write-backlog result names Epic, Story, and provider Task identities, the same V*, native blocker edges, and exact readback.
  • Planning gate: PLAN.md carries pair Context Pointers, architecture_applicability, ## Wiki Context, and one uniform task_identity_mode: provider Task ID and URL per Tn with native blockers, or planning-only with a skip reason. Each task has owned_paths, read_dependencies, shared_runtime_resources, relevant_input_set, wave_boundary, focused validation, RED/GREEN commands, and runtime_validation. A final plan-reviewer subagent pass finds no missing dependencies, owned paths, waves, RED targets, or guidance. See Implementation.
  • Test gate: for behavior-changing work, no production code before a failing test through a public interface. Escapes are only docs, formatting, generated code, config without asserted behavior, scaffold or bookkeeping, and truly non-testable work with reason_not_testable. Forgotten RED is recovered and marked tdd_status: recovered; reason_not_testable never covers it.
  • Static gate: relevant typecheck and lint pass for affected workspaces, or their non-applicability is explicit.
  • Task Gate: each task result is passed, repair_required, or blocked. See Sequential and Parallel Delivery.
  • Browser and UI evidence gate: review_mode: browser | mixed tasks need browser validation. UI changes need durable before/after links under UI Evidence Links, uploaded through repo-asset-management, and carried into the PR. Local paths and transient URLs are not evidence.
  • Runtime validation gate: a task with runtime_validation: required needs conclusive evidence through a public entrypoint, a correlated durable side effect, and owned cleanup. Automated checks alone do not satisfy it. An exact blocker keeps the task blocked.
  • Architecture gate: an architecture-bearing plan needs a cumulative Architecture Checkpoint after each architecture wave and a final zero-drift closure with an empty migration ledger.
  • Verification gate: visibly exercisable acceptance is met only with cited verify-behavior evidence. See Project Verification Flow.
  • Review gate: every delivery, whatever its size, gets one findings-first Review pass over the committed change and its Verification evidence. A second pass needs a high-risk repair; two completed passes is the ceiling. At the ceiling, a further pass needs the human's own words already in the goal or thread; without them, delivery takes an out-of-bounds Autonomous Decision, captures the open findings as debt, and continues to docs ingest or closeout. Review does not rerun proof.
  • Debug gate: runtime failures enter Debugging only with evidence such as logs, repro steps, traces, screenshots, or observed timing.
  • Docs gate: changes to behavior, architecture, setup, contracts, operator workflow, or source knowledge trigger Docs Update, or an explicit no-op reason.
  • Closeout gate: see Closeout Evidence.

Validation Scope

Local validation is focused. It runs only:

  • focused tests for the changed behavior;
  • integration checks the change directly touches;
  • type and lint checks for the affected workspaces.

Validation broadens only for a concrete changed dependency, a focused failure, or an explicit user request. A check reruns only when its relevant inputs changed. A failure outside the plan's changed behavior is unrelated: it is recorded with evidence as out of scope, and work continues.

CI owns the full suite and broad regression. When the project has no full-suite CI, or CI runs no E2E, closeout runs one local broad run that covers only what CI lacks, on the Owned Stack after a controlled reset. It is reported as a local broad run, never as a CI result.

Verification Tiers

Pick the cheapest tier that can answer the current question:

  1. Tier 1: saved receipts and pure-helper checks, to correct a diagnosis.
  2. Tier 2: a focused reproduction for one hypothesis, on the Owned Stack.
  3. Tier 3: the plan-scoped acceptance journey, after focused checks settle. It exercises only the stories the plan changes.

Saved receipts never replace current runtime acceptance.

Owned Stack

The Owned Stack is the runtime (containers, services, processes, scratch state) that this delivery started and owns, isolated from other runs and users. It starts once and is reused across steps, tasks, and tiers. Between runs, a controlled reset restores known state: truncate or reseed owned data, restart only the process a change invalidated. A relaunch happens only when a reset cannot restore known state. Earlier evidence is reused only when its authority, code, runtime, and scenario identities match. Closeout tears the Owned Stack down through owned cleanup.

New Discriminator

An expensive run rebuilds artifacts, starts the stack, or drives a multi-service journey. Before another expensive run, state its New Discriminator: the fact it can confirm or reject that earlier runs did not. Confirm the Observation Manifest covers that fact. When the same observation is missing again, revise the diagnostic plan instead of rerunning.

Manual Review Checklist

implement-spec writes ## Manual Review Checklist in IMPLEMENTATION-NOTES.md before finalization. It is always required. It is a user handoff, not an agent completion tracker.

AreaCheckHow to performExpected result

Browser and mixed tasks list concrete end-to-end user flows. CLI tasks list exact commands, fixtures, or scenarios. Manual-only checks cover product behavior, visual review, integration smoke, and tracker or docs review. An empty checklist is invalid. When no manual review applies, one explicit row says why there is no user-verifiable surface.

Closeout Evidence

Closeout needs a valid Pass Report for the delivery before any other check. Then:

  • The final path-limited commit contains delivery-owned paths only.
  • When the final tree differs from the pre-review candidate, every required release classification and exact-tree provider proof reruns against the final commit. A failed or unavailable proof blocks closeout.
  • CI results for the pushed commit are reported per check, or the local broad run fallback is reported as such.
  • Final directly observed facts go through write-backlog delivery-status with exact readback. Merge is never deployment evidence. Fog completion needs production evidence for every resulting Story and Task.
  • The Owned Stack is torn down.
  • Checks are labelled focused, CI, or local broad run. Focused checks never report as a full-suite pass.

Comprehensive Behavior Contract

This repository adds a project rule for architecture work: the Comprehensive Behavior Contract Validation flow is one local-and-CI gate. Its current inventory is 12 participating workspaces, 11 testable workspaces, 20 classified public seams, and eight deterministic/real adapter families. The sole non-testable workspace, packages/config, still participates through static and consumer proof.

The contract distinguishes six byte-for-byte locked seams, 13 semantically equivalent seams, and one intentionally changed seam. Repetition, supported concurrency, cleanup, and uncached timing evidence establish determinism without turning timing into an acceptance threshold.

A successful repeat report or review does not close this gate alone. Required CI, the full local closeout command, durable docs, and tracker evidence must also be complete. This repository rule is stricter than the skills' default, where a local broad run is only a fallback.

Phase Wrapper Boundary

Phases order the gates and report evidence. The inner skills keep their proof standards: the delegated skill defines what counts as proof for requirements, planning, implementation, review, debugging, docs ingest, or debt resolution.

No-Op Handling

Skipping a gate requires a reason. Good no-op reasons are specific: docs-only change, no runtime surface, existing test covers the path, browser target unavailable with blocker recorded, or docs ingest considered with no knowledge change.

Vague no-op reasons weaken the trust model. "Not needed" is not enough.

Done Signal

The run can close when relevant gates have evidence, skipped gates have specific no-op reasons, and remaining risks are visible in the final report.

On this page