Verify Complex Artifacts
Gate a finished candidate between generation and its next trust boundary.
Separate factual and deterministic evidence from an isolated output-context
review so the producer cannot explain the artifact into passing.
Point at the problem
After a gate establishes a defect, name the matching Sin in the gate
record: sin → observed evidence → invalidated gate. Naming the deformation
accepts its presence in the outcome; it does not prove a cause, require a
repair, or establish completion. When repair is authorized, a Sin's optional
counter may inform the repair plan.
Laws
- Gate the candidate, not the conversation. Verify the final files,
renders, behaviors, and consumer entry points. Do not pass an artifact from a
producer's summary, confidence, or remembered tool output.
- Expect gaps; refine from evidence. Iterative and model-assisted
production predictably leaves omissions, misplaced emphasis, private-context
assumptions, and locally coherent relationships. Treat the gate as a way to
expose and repair those gaps, not as a ceremony for confirming the
producer's result. Preserve every unresolved gap in the verdict.
- Freeze the end-state factual boundary. Name the candidate revision,
artifact manifest, governing sources, intended consumer, next transition,
and authorized state expected when the iteration completes before checking.
Treat the observed implementation-time state as progress evidence, not as
the acceptance contract. Keep that producer interpretation outside the
isolated output-context review. A repair creates a new revision and
invalidates affected results.
- Keep gate classes distinct. Deterministic quality checks establish
machine-testable facts. Factual review checks requirements and source truth.
Consumer-surface inspection establishes what the consumer actually sees,
runs, and can reach. Isolated output-context review checks inferable
context, semantic coherence, and process residue. Human acceptance resolves
subjective or strategic fit. One class cannot substitute for another.
Security checks belong to the deterministic and factual classes; there is
no separate security gate.
- Verify through the consumer surface. Parse source, but also open, render,
run, import, install, print, navigate, or recalculate the artifact from the
entry point its consumer receives.
- Turn prohibitions into checks. Convert important “must not” constraints
into a linter, schema, assertion, search, permission boundary, or explicit
adversarial review item whenever possible.
- Do not self-certify output-context integrity. The producing context may
run factual and deterministic checks, but a fresh review subagent with no
drafting history must perform the output-context gate.
- Enforce an unbiased review boundary. Give the reviewer exactly the final
target and neutral durable review rules. Give it no producer interpretation,
consumer or reader profile, artifact role or layer, source facts,
validation output, process declaration, expected verdict, intended repair,
or prior review. It must infer context from the artifact and cite that
evidence in its verdict.
- Fail visibly. A skipped required check, unavailable consumer view, or
unavailable review subagent is
UNVALIDATED, not a pass. A known
violation is BLOCK.
- Repair by revision. If edits are authorized, repair the production
artifact outside the review session, regenerate derived outputs, rerun every
invalidated check, and use a fresh review subagent.
- Reserve acceptance for judgment. Ask a human about product direction,
taste, brand, risk ownership, or an ambiguous contract. Do not ask a human
to compensate for failed syntax, broken links, missing requirements, or
other checkable defects.
- Diagnose damage, not polish. Scan the whole candidate for cross-cutting
damage signatures before accepting local improvements or passing checks.
Treat each signature as a lead and prove or dismiss it through the gate
class capable of observing the affected property.
Select the post-trigger route
After activation, choose the smallest route that covers the trust transition:
| Activated verification need |
Route |
| A complex artifact already exists and must be ready for handoff, merge, publication, deployment, or delivery |
Run the complete gate |
| Create or change an artifact and verify it |
Finish the relevant generation workflow, freeze its candidate, then run the complete gate as a separate phase |
| Review only, audit, or assess readiness |
Run the gates and report; do not edit |
| Verify one explicit property such as syntax, links, formulas, or tests |
Run the repository-native check; add the complete gate only when an integrated readiness decision is requested |
| Decide whether the result is desirable, on-brand, or strategically correct |
Run applicable quality and review gates first, then request human acceptance |
Use the supplied domain contract as gate input. Do not copy a domain-specific
authoring workflow into the gate.
Run the complete gate
1. Define the trust boundary
Record:
- the exact candidate revision and every artifact in scope;
- the next transition and the consumer or system receiving it;
- authoritative requirements, schemas, source facts, policies, and explicit
user decisions, including the state expected when the current iteration is
complete;
- critical failure modes and irreversible or high-impact consequences;
- whether repairs are authorized and who owns final acceptance.
Separate completed-state requirements from observations of the current
implementation, then separate verified requirements from assumptions. If the
intended completed state, scope, or strategic intent cannot be inferred safely,
return NEEDS-HUMAN-DECISION; do not promote the implementation-time state into
the contract.
2. Build the artifact manifest
Inventory primary files, generated or derived files, cross-file references,
consumer entry points, and required views. Include enough identity to detect a
stale check: revision, path, version, checksum, or an equivalent stable marker.
Read artifact checks, apply its cross-cutting
damage-signature scan, and select only the applicable artifact families. Add
contract-specific checks before running generic ones.
For a compound deliverable, state cross-artifact invariants such as:
- a README command matches the packaged executable;
- a chart agrees with its source table;
- a PDF export matches the editable document;
- screenshots reflect the shipped interface;
- schemas, examples, generated clients, and runtime defaults agree.
Inventory every material consumer-visible assertion connecting named subjects
as source, relation, target, direction, modality, condition. Material means
an edge a consumer could act on: a capability, compatibility, dependency,
causation, ordering, or ownership claim within the frozen scope. Record the
bound applied and its exclusions. Verify each inventoried edge against
authoritative contracts for both endpoints or an explicit product decision.
Repeated prose, co-location, valid links, and internal coherence are not
evidence for a relationship.
3. Freeze the factual verification plan
Create a concise verification plan before running checks. It must identify:
- candidate and manifest;
- consumer, transition, and authoritative sources;
- requirement and invariant IDs, minting short stable IDs when the request
supplies none;
- required factual, deterministic, and consumer-surface checks;
- severity and pass rules;
- acceptance questions and decision owners.
Do not change the contract merely to make the candidate pass. A legitimate
plan or contract change is a new gate revision and must remain visible in the
handoff. This plan is producer context: never include it in the isolated
output-context review.
4. Run factual and deterministic gates
Prefer repository-native validators, builds, tests, linters, schema checks,
exporters, and inspectors. Capture the command or tool, candidate revision,
scope, result, and material counts.
For every plausible damage signature, record the target evidence and run the
adversarial check named in the reference. Route proof leakage, disproportionate
attention, and placement drift through the isolated output-context review as
well as any factual gate they trigger. Do not clear a signature because the
change is requested, locally correct, or covered by a passing proxy check.
Check requirements, authoritative source facts, and cross-artifact invariants
here. Account for every in-scope requirement or record an explicit exclusion.
Account separately for every named-subject relationship edge in the manifest's
recorded bound or return BLOCK, UNVALIDATED, or NEEDS-HUMAN-DECISION
according to the missing evidence or authority.
These checks may use domain skills, source repositories, specifications,
schemas, and validation output; none of that evidence enters the isolated
output-context review.
Reconcile the candidate with the authorized state at the end of the iteration,
not merely with a checkout, branch, rollout, or artifact observed while work is
in flight. A consumer-visible record of that intermediate state is BLOCK when
it stands in for the completed contract, even if it was accurate when recorded.
A transitional state passes only when the finished product deliberately
supports it as part of its enduring contract.
Run prerequisite checks before expensive or judgment-heavy checks. Stop the
transition on a failed required check. If repair is authorized, fix the
candidate and restart from the earliest invalidated gate; otherwise report
BLOCK.
When repair is authorized and the named sin provides a counter, use it as a
repair lead, then rerun every invalidated gate. The owning gate still proves
whether the defect is repaired.
A command exiting successfully proves only the property it actually checks.
Do not relabel a build as semantic, visual, security, or requirement
verification.
5. Inspect consumer surfaces
Exercise the artifact from its declared starting state:
- Open or execute each primary entry point.
- Inspect every materially distinct representation or mode.
- Traverse the critical reader, user, operator, or importer path.
- Check boundaries, error states, empty or extreme cases, and cross-artifact
links.
- Record what was observed and which views or environments were unavailable.
Use rendered evidence for layout and visual claims. Use runtime or imported
evidence for behavioral claims. Source inspection alone does not pass these
checks.
6. Run the isolated output-context review
Spawn a fresh review subagent with no inherited generation context. Give it
exactly:
- the final review target; and
- output-context review, unchanged.
Prefer the complete final artifact. Use a diff only when it retains enough
final-state context to assess the changed material and its opening or primary
entry surface. For a compound artifact, provide the delivered bundle itself;
do not add a producer-authored wrapper or manifest solely for review.
Supply no task summary, scope statement, artifact classification, consumer or
reader description, role or layer, source facts, validation summary,
process declaration, producer rationale, prior review, expected verdict, or
intended fix. The reviewer must not consult other sources; when the harness
supports tool restriction, limit its tools to reading the supplied target. It
reviews only; it does not edit or rewrite the artifact.
Require it to infer the subject, consumer or system, task or effect, and process
status from the target where those are material, and cite target evidence. When
the target presents independently selectable named subjects, require the
reviewer's per-subject result row, as specified in the review rules, for each.
Do not require a documentation-style
offer from code, spreadsheets, or other artifacts whose consumer surface
establishes purpose differently. This gate's PASS means the output is semantically coherent
in its own context and free of unjustified process residue. It does not
establish external factual correctness, requirement coverage, cross-artifact
truth, or deterministic-check results.
7. Resolve the verdict
Use exactly one gate status:
PASS: every required factual, deterministic, and consumer-surface check
passed, the fresh output-context review subagent passed, and acceptance passed or
was not required.
BLOCK: a known defect, contradiction, failed required check, or unmet
contract remains.
NEEDS-HUMAN-DECISION: only a subjective, strategic, ownership, or genuinely
ambiguous contract decision prevents completion.
UNVALIDATED: a required tool, view, source, environment, or review
subagent was unavailable.
On BLOCK, repair only when authorized. Create a new candidate revision,
rerun invalidated checks, and use a new review subagent that receives no
prior verdict or repair narrative.
8. Produce the gate record
Report:
- candidate revision, manifest, consumer, and trust transition;
- contract sources and assumptions;
- named-subject relationship edges, authoritative evidence, exclusions, and
verified-over-total count;
- deterministic checks with commands, results, and counts;
- damage signatures tested, evidence observed, and gate disposition;
- consumer surfaces and critical paths observed;
- isolated output-context review subagent status and inferred context;
- human acceptance result or exact decision needed;
- exclusions, unavailable checks, residual risks, and final gate status.
Keep the gate record outside the delivered artifact unless that record is
itself an explicitly requested deliverable. Never add production-process
commentary merely to prove that verification occurred.
Completion conditions
Declare the post-generation gate complete only when:
- the manifest accounts for every artifact and derived representation in
scope;
- the factual verification plan accounts for every requirement and
cross-artifact invariant;
- applicable factual and deterministic checks ran against the reported
candidate revision;
- every plausible cross-cutting damage signature was tested through its
owning gate rather than dismissed from producer intent;
- every material consumer-visible named-subject relationship in the recorded
bound was inventoried and verified against both endpoint contracts or an
explicit product decision;
- primary consumer paths and materially distinct views were exercised;
- a fresh output-context review subagent inferred context from only the
target and neutral rules and returned a valid verdict;
- required human acceptance is recorded;
- the handoff distinguishes
PASS, BLOCK, NEEDS-HUMAN-DECISION, and
UNVALIDATED without softening them.
1---2name: verify-complex-artifacts3description: Use for a final verification, review, QA pass, or readiness gate on a finished multi-file artifact before handoff, merge, publication, deployment, or delivery; not for one routine check.4---56# Verify Complex Artifacts78Gate a finished candidate between generation and its next trust boundary.9Separate factual and deterministic evidence from an isolated output-context10review so the producer cannot explain the artifact into passing.1112## Point at the problem1314After a gate establishes a defect, name the matching [Sin](SINS.md) in the gate15record: `sin → observed evidence → invalidated gate`. Naming the deformation16accepts its presence in the outcome; it does not prove a cause, require a17repair, or establish completion. When repair is authorized, a Sin's optional18counter may inform the repair plan.1920## Laws21221. **Gate the candidate, not the conversation.** Verify the final files,23 renders, behaviors, and consumer entry points. Do not pass an artifact from a24 producer's summary, confidence, or remembered tool output.252. **Expect gaps; refine from evidence.** Iterative and model-assisted26 production predictably leaves omissions, misplaced emphasis, private-context27 assumptions, and locally coherent relationships. Treat the gate as a way to28 expose and repair those gaps, not as a ceremony for confirming the29 producer's result. Preserve every unresolved gap in the verdict.303. **Freeze the end-state factual boundary.** Name the candidate revision,31 artifact manifest, governing sources, intended consumer, next transition,32 and authorized state expected when the iteration completes before checking.33 Treat the observed implementation-time state as progress evidence, not as34 the acceptance contract. Keep that producer interpretation outside the35 isolated output-context review. A repair creates a new revision and36 invalidates affected results.374. **Keep gate classes distinct.** Deterministic quality checks establish38 machine-testable facts. Factual review checks requirements and source truth.39 Consumer-surface inspection establishes what the consumer actually sees,40 runs, and can reach. Isolated output-context review checks inferable41 context, semantic coherence, and process residue. Human acceptance resolves42 subjective or strategic fit. One class cannot substitute for another.43 Security checks belong to the deterministic and factual classes; there is44 no separate security gate.455. **Verify through the consumer surface.** Parse source, but also open, render,46 run, import, install, print, navigate, or recalculate the artifact from the47 entry point its consumer receives.486. **Turn prohibitions into checks.** Convert important “must not” constraints49 into a linter, schema, assertion, search, permission boundary, or explicit50 adversarial review item whenever possible.517. **Do not self-certify output-context integrity.** The producing context may52 run factual and deterministic checks, but a fresh review subagent with no53 drafting history must perform the output-context gate.548. **Enforce an unbiased review boundary.** Give the reviewer exactly the final55 target and neutral durable review rules. Give it no producer interpretation,56 consumer or reader profile, artifact role or layer, source facts,57 validation output, process declaration, expected verdict, intended repair,58 or prior review. It must infer context from the artifact and cite that59 evidence in its verdict.609. **Fail visibly.** A skipped required check, unavailable consumer view, or61 unavailable review subagent is `UNVALIDATED`, not a pass. A known62 violation is `BLOCK`.6310. **Repair by revision.** If edits are authorized, repair the production64 artifact outside the review session, regenerate derived outputs, rerun every65 invalidated check, and use a fresh review subagent.6611. **Reserve acceptance for judgment.** Ask a human about product direction,67 taste, brand, risk ownership, or an ambiguous contract. Do not ask a human68 to compensate for failed syntax, broken links, missing requirements, or69 other checkable defects.7012. **Diagnose damage, not polish.** Scan the whole candidate for cross-cutting71 damage signatures before accepting local improvements or passing checks.72 Treat each signature as a lead and prove or dismiss it through the gate73 class capable of observing the affected property.7475## Select the post-trigger route7677After activation, choose the smallest route that covers the trust transition:7879| Activated verification need | Route |80| --- | --- |81| A complex artifact already exists and must be ready for handoff, merge, publication, deployment, or delivery | Run the complete gate |82| Create or change an artifact and verify it | Finish the relevant generation workflow, freeze its candidate, then run the complete gate as a separate phase |83| Review only, audit, or assess readiness | Run the gates and report; do not edit |84| Verify one explicit property such as syntax, links, formulas, or tests | Run the repository-native check; add the complete gate only when an integrated readiness decision is requested |85| Decide whether the result is desirable, on-brand, or strategically correct | Run applicable quality and review gates first, then request human acceptance |8687Use the supplied domain contract as gate input. Do not copy a domain-specific88authoring workflow into the gate.8990## Run the complete gate9192### 1. Define the trust boundary9394Record:9596- the exact candidate revision and every artifact in scope;97- the next transition and the consumer or system receiving it;98- authoritative requirements, schemas, source facts, policies, and explicit99 user decisions, including the state expected when the current iteration is100 complete;101- critical failure modes and irreversible or high-impact consequences;102- whether repairs are authorized and who owns final acceptance.103104Separate completed-state requirements from observations of the current105implementation, then separate verified requirements from assumptions. If the106intended completed state, scope, or strategic intent cannot be inferred safely,107return `NEEDS-HUMAN-DECISION`; do not promote the implementation-time state into108the contract.109110### 2. Build the artifact manifest111112Inventory primary files, generated or derived files, cross-file references,113consumer entry points, and required views. Include enough identity to detect a114stale check: revision, path, version, checksum, or an equivalent stable marker.115116Read [artifact checks](references/artifact-checks.md), apply its cross-cutting117damage-signature scan, and select only the applicable artifact families. Add118contract-specific checks before running generic ones.119120For a compound deliverable, state cross-artifact invariants such as:121122- a README command matches the packaged executable;123- a chart agrees with its source table;124- a PDF export matches the editable document;125- screenshots reflect the shipped interface;126- schemas, examples, generated clients, and runtime defaults agree.127128Inventory every material consumer-visible assertion connecting named subjects129as `source, relation, target, direction, modality, condition`. Material means130an edge a consumer could act on: a capability, compatibility, dependency,131causation, ordering, or ownership claim within the frozen scope. Record the132bound applied and its exclusions. Verify each inventoried edge against133authoritative contracts for both endpoints or an explicit product decision.134Repeated prose, co-location, valid links, and internal coherence are not135evidence for a relationship.136137### 3. Freeze the factual verification plan138139Create a concise verification plan before running checks. It must identify:140141- candidate and manifest;142- consumer, transition, and authoritative sources;143- requirement and invariant IDs, minting short stable IDs when the request144 supplies none;145- required factual, deterministic, and consumer-surface checks;146- severity and pass rules;147- acceptance questions and decision owners.148149Do not change the contract merely to make the candidate pass. A legitimate150plan or contract change is a new gate revision and must remain visible in the151handoff. This plan is producer context: never include it in the isolated152output-context review.153154### 4. Run factual and deterministic gates155156Prefer repository-native validators, builds, tests, linters, schema checks,157exporters, and inspectors. Capture the command or tool, candidate revision,158scope, result, and material counts.159160For every plausible damage signature, record the target evidence and run the161adversarial check named in the reference. Route proof leakage, disproportionate162attention, and placement drift through the isolated output-context review as163well as any factual gate they trigger. Do not clear a signature because the164change is requested, locally correct, or covered by a passing proxy check.165166Check requirements, authoritative source facts, and cross-artifact invariants167here. Account for every in-scope requirement or record an explicit exclusion.168Account separately for every named-subject relationship edge in the manifest's169recorded bound or return `BLOCK`, `UNVALIDATED`, or `NEEDS-HUMAN-DECISION`170according to the missing evidence or authority.171These checks may use domain skills, source repositories, specifications,172schemas, and validation output; none of that evidence enters the isolated173output-context review.174175Reconcile the candidate with the authorized state at the end of the iteration,176not merely with a checkout, branch, rollout, or artifact observed while work is177in flight. A consumer-visible record of that intermediate state is `BLOCK` when178it stands in for the completed contract, even if it was accurate when recorded.179A transitional state passes only when the finished product deliberately180supports it as part of its enduring contract.181182Run prerequisite checks before expensive or judgment-heavy checks. Stop the183transition on a failed required check. If repair is authorized, fix the184candidate and restart from the earliest invalidated gate; otherwise report185`BLOCK`.186187When repair is authorized and the named sin provides a counter, use it as a188repair lead, then rerun every invalidated gate. The owning gate still proves189whether the defect is repaired.190191A command exiting successfully proves only the property it actually checks.192Do not relabel a build as semantic, visual, security, or requirement193verification.194195### 5. Inspect consumer surfaces196197Exercise the artifact from its declared starting state:1981991. Open or execute each primary entry point.2002. Inspect every materially distinct representation or mode.2013. Traverse the critical reader, user, operator, or importer path.2024. Check boundaries, error states, empty or extreme cases, and cross-artifact203 links.2045. Record what was observed and which views or environments were unavailable.205206Use rendered evidence for layout and visual claims. Use runtime or imported207evidence for behavioral claims. Source inspection alone does not pass these208checks.209210### 6. Run the isolated output-context review211212Spawn a fresh review subagent with no inherited generation context. Give it213exactly:2142151. the final review target; and2162. [output-context review](references/output-context-review.md), unchanged.217218Prefer the complete final artifact. Use a diff only when it retains enough219final-state context to assess the changed material and its opening or primary220entry surface. For a compound artifact, provide the delivered bundle itself;221do not add a producer-authored wrapper or manifest solely for review.222223Supply no task summary, scope statement, artifact classification, consumer or224reader description, role or layer, source facts, validation summary,225process declaration, producer rationale, prior review, expected verdict, or226intended fix. The reviewer must not consult other sources; when the harness227supports tool restriction, limit its tools to reading the supplied target. It228reviews only; it does not edit or rewrite the artifact.229230Require it to infer the subject, consumer or system, task or effect, and process231status from the target where those are material, and cite target evidence. When232the target presents independently selectable named subjects, require the233reviewer's per-subject result row, as specified in the review rules, for each.234Do not require a documentation-style235offer from code, spreadsheets, or other artifacts whose consumer surface236establishes purpose differently. This gate's `PASS` means the output is semantically coherent237in its own context and free of unjustified process residue. It does not238establish external factual correctness, requirement coverage, cross-artifact239truth, or deterministic-check results.240241### 7. Resolve the verdict242243Use exactly one gate status:244245- `PASS`: every required factual, deterministic, and consumer-surface check246 passed, the fresh output-context review subagent passed, and acceptance passed or247 was not required.248- `BLOCK`: a known defect, contradiction, failed required check, or unmet249 contract remains.250- `NEEDS-HUMAN-DECISION`: only a subjective, strategic, ownership, or genuinely251 ambiguous contract decision prevents completion.252- `UNVALIDATED`: a required tool, view, source, environment, or review253 subagent was unavailable.254255On `BLOCK`, repair only when authorized. Create a new candidate revision,256rerun invalidated checks, and use a new review subagent that receives no257prior verdict or repair narrative.258259### 8. Produce the gate record260261Report:262263- candidate revision, manifest, consumer, and trust transition;264- contract sources and assumptions;265- named-subject relationship edges, authoritative evidence, exclusions, and266 verified-over-total count;267- deterministic checks with commands, results, and counts;268- damage signatures tested, evidence observed, and gate disposition;269- consumer surfaces and critical paths observed;270- isolated output-context review subagent status and inferred context;271- human acceptance result or exact decision needed;272- exclusions, unavailable checks, residual risks, and final gate status.273274Keep the gate record outside the delivered artifact unless that record is275itself an explicitly requested deliverable. Never add production-process276commentary merely to prove that verification occurred.277278## Completion conditions279280Declare the post-generation gate complete only when:2812821. the manifest accounts for every artifact and derived representation in283 scope;2842. the factual verification plan accounts for every requirement and285 cross-artifact invariant;2863. applicable factual and deterministic checks ran against the reported287 candidate revision;2884. every plausible cross-cutting damage signature was tested through its289 owning gate rather than dismissed from producer intent;2905. every material consumer-visible named-subject relationship in the recorded291 bound was inventoried and verified against both endpoint contracts or an292 explicit product decision;2936. primary consumer paths and materially distinct views were exercised;2947. a fresh output-context review subagent inferred context from only the295 target and neutral rules and returned a valid verdict;2968. required human acceptance is recorded;2979. the handoff distinguishes `PASS`, `BLOCK`, `NEEDS-HUMAN-DECISION`, and298 `UNVALIDATED` without softening them.