Scoped Delivery Validation
Architecture: Scoped Delivery Validation
Context and Scope
- Capability identity:
apps/wiki/content/docs/project/specs/cli/issue-250-251-scoped-delivery-validation. The capability is the validation policy that shared delivery skills give to an agent: which checks run locally, which checks CI owns, how a verifier observes and asserts, and how a runtime stack is reused. - Actors and outcome: the delivery agent (parent and scoped workers) needs one cheap, honest validation path. The human operator needs fast delivery and a truthful report of what ran. Issue #250 showed a full five-database, four-service journey rerun to find one missing field at a time. Issue #251 showed two broad local E2E runs (35.3 and 33.2 minutes, 40 and 41 of 47 files failing) where two-minute focused suites decided the result (S5, S6).
- In scope: Q1 to Q12 of the grill log (S2). Non-goal: the source of the ci-app
full-E2E and baseline mandate (Q13, parked). Non-goal: project-owned verifier
references below
.agents/skills/verify-behavior/references/in any project. - Owner of the change: the shared skills source
wearedevpunks/skills(local checkout/home/stefan/repos/skills, branchmain). Harness receives it throughbun run sync:skills(S4). - Spec: sibling
SPEC.mdin this folder, retained in the commit that follows this architecture's retention.
Canonical Terms
Terms from the Scoped Delivery Validation Glossary (S3), pinned by Glossary Q7, Q8, Q9, Q11 and Q12 in S2:
- Verification Tier: one of three levels, selected by the purpose of the run: tier 1 receipt or pure-helper check, tier 2 focused reproduction, tier 3 plan-scoped acceptance journey.
- Observation Manifest: fields and stages a run must capture, defined from generated DTOs and source predicates before the first run.
- Speculative Helper Expectation: a verifier assertion that no requirement or contract supports. It is never a gate until one supports it.
- Owned Stack: a strictly owned, isolated runtime that a delivery reuses across steps with controlled resets.
- New Discriminator: the stated fact that another expensive run can confirm or reject and that earlier runs did not.
Existing terms used unchanged: Project Verifier, Scenario Falsifier, Focused Repair Validation, Verification.
Axioms: CI is the only fresh run. A focused local pass is never a full-suite pass. Partial evidence is never a full pass. Saved receipts never replace current runtime acceptance. Without full-suite CI, one local broad run at closeout replaces the CI wait.
Sources
| Source | Role | Exact location and anchor | Immutable revision or content hash |
|---|---|---|---|
| S1 | Grill status and closure | apps/wiki/content/docs/project/grilling/scoped-delivery-validation-grill-status.md; "Phase State", "Current Round" (R3, frontier empty, confirmed) | commit 39ea69717; blob 9e36dd070d5c5a6d521751a54b1db902ac4aeaa2 |
| S2 | Durable grill log | apps/wiki/content/docs/project/grilling/scoped-delivery-validation-grill-log.md; entries ### Q1 to ### Q13, Glossary Q7 to Q12 | commit 39ea69717; blob 0a29150677f9358de87d1b0f9774fdf906cfb315 |
| S3 | Current glossary | apps/wiki/content/docs/project/domains/scoped-delivery-validation-glossary.mdx; status "Glossary" section | commit 39ea69717; blob e1595559f9a197b7fa7df551702f433f5182832b |
| S4 | Current shared skills (observed behavior) | wearedevpunks/skills skills/phases/delivery-phase, skills/phases/debugging-phase, skills/agnostic/planning/{implement-spec,verify-behavior,create-verification-skill,update-verification-skill,create-plan} | commit 3b0e17402c29489b9e5ec265d83c4f4ee436f5a1 (current sync pin) |
| S5 | Issue #250 report | https://github.com/wearedevpunks/harness-intelligence/issues/250; "Summary" items 1 to 6 | fingerprint report:bddf82785e55f0ec72e44ac4 |
| S6 | Issue #251 report | https://github.com/wearedevpunks/harness-intelligence/issues/251; "Requested default policy" | fingerprint report:01a7742fb074f2b4ec0e476f |
Source Disposition
| Question / entry | Disposition | Accepted detail, replacement, or unresolved point | Evidence | Parked owner / resume trigger |
|---|---|---|---|---|
Q1 ### Q1 | accepted | Focused tests, directly relevant integration checks, affected-workspace type/lint. Broaden only for a changed dependency, a focused failure, or a user request. No repeat without changed inputs. | S2 ### Q1 | — |
Q2 ### Q2 | accepted | No unchanged-baseline run to classify unrelated failures; record them out of scope with evidence. | S2 ### Q2 | — |
Q3 ### Q3 | accepted | verify-behavior exercises only plan-scoped stories; replaces "every in-scope observable story". | S2 ### Q3; S4 verify-behavior/SKILL.md Select step 1 | — |
Q4 ### Q4 | accepted | CI owns full suite and broad regression; closeout awaits and reports CI on the pushed commit; a focused local pass is never a full-suite pass. | S2 ### Q4 | — |
Q5 ### Q5 | accepted | CI is the only fresh run; local acceptance never requires a fresh stack. Deliberately differs from #250 item 5. | S2 ### Q5; S5 item 5 | — |
| Q6 R1 responses | superseded | R1 "skip this last step" response. Replaced by Q6 R2 accepted answer. | S2 ### Q6 "Responses received in R1" | — |
Q6 R2 ### Q6 "Accepted answer (R2…)" | accepted | Keep one local broad run as the fallback, at closeout, covering only what CI lacks, on the Owned Stack after a controlled reset; Q2 applies; reported as a local broad run. | S2 ### Q6 | — |
Q7 ### Q7 | accepted | Three Verification Tiers; tier 3 on the Owned Stack after a controlled reset; receipts never replace runtime acceptance. | S2 ### Q7 | — |
Q8 ### Q8 | accepted | Observation Manifest from generated DTOs and source predicates, before the first run; captured before assertions; secrets redacted. | S2 ### Q8 | — |
Q9 ### Q9 | accepted | Invariants and contract output semantics are gates; Speculative Helper Expectations are not; keep readiness, authorization, lifecycle, concurrency, cleanup gates. | S2 ### Q9 | — |
Q10 ### Q10 | accepted | After a known mismatch, independent observations complete; gate reported failed or blocked; partial evidence never passes. | S2 ### Q10 | — |
Q11 ### Q11 | accepted | Avoid restarts between delivery steps; reuse only a strictly owned, isolated stack with controlled resets; reuse evidence only with matching input identities. | S2 ### Q11 | — |
Q12 ### Q12 | accepted | New Discriminator plus complete Observation Manifest before another expensive run; a recurring missing observation revises the plan. | S2 ### Q12 | — |
Q13 ### Q13 | parked | Source of ci-app full-E2E/baseline mandate. | S2 ### Q13 | ci-app maintainers; resume if the shared policy ships and ci-app still runs mandated broad local suites. |
Whole System
Sources: S2 Q1 to Q12; S4 for current owners. Conclusion: one new reference
(ARC-001) holds the delivery-wide validation policy. Every other skill keeps its
current ownership and adds a pointer or a local rule. The verifier contract
(ARC-003, ARC-004) owns observation mechanics because verify-behavior is the
portable entrypoint that runs scenarios.
| Block selector / component / level | Owner | State and authority | Interface / dependency | Supported constraint and source |
|---|---|---|---|---|
| ARC-001 Validation Scope reference | implement-spec (references/validation-scope.md, new) | Single source for local default, CI ownership, fallback, Verification Tiers, Owned Stack reuse, repeat guard. No runtime state. | Read by create-plan, implement-spec lifecycle, runtime-product-validation, delivery-phase closeout, debugging-phase. Cross-category readers name it as text (sync copies skills flat; relative links across phases/ and agnostic/ do not resolve after sync). | Q1, Q2, Q4, Q5, Q6, Q7, Q11, Q12 |
| ARC-002 Runtime validation | implement-spec (references/runtime-product-validation.md, references/lifecycle.md §9) | Owns supported-runtime proof per task. Changes "start the supported runtime" to "reuse or start the Owned Stack". | Points to ARC-001; calls ARC-003 for visible acceptance. | Q5, Q7, Q11 |
| ARC-003 Verifier entrypoint | verify-behavior (SKILL.md) | Owns scenario selection, observation capture, assertion classes, result status. | Caller passes plan-scoped stories and runtime bounds; returns evidence. | Q3, Q8, Q9, Q10, Q11 |
| ARC-004 Verifier references | create-verification-skill, update-verification-skill (SKILL.md) | Own Feature Map entry shape and drive triage. Entries gain an Observation Manifest and expectation class; triage prefers a controlled reset over relaunch. | Writes project-owned references read by ARC-003. | Q8, Q9, Q11 |
| ARC-005 Plan validation fields | create-plan (SKILL.md) | Owns per-task validation commands. Commands are focused; no task gate is a full suite. | Points to ARC-001 by sibling relative link. | Q1, Q4 |
| ARC-006 Closeout | delivery-phase (phases/closeout.md) | Owns final report. Awaits CI on the pushed commit, or runs the local broad-run fallback; reports which one ran. | Names ARC-001 as text. | Q4, Q6 |
| ARC-007 Debugging | debugging-phase (SKILL.md) | Owns reproduce/verify loop. Uses tiers 1 to 2 and the repeat guard before another expensive run. | Names ARC-001 as text. | Q7, Q12 |
Critical Flows and Boundaries
FLOW-001 Delivery validation path
Sources: Q1, Q3, Q4, Q5, Q6, Q7. Conclusion: local validation grows only with the plan. The only broad check is CI, or one local broad run when CI cannot provide it. Unrelated failures in either broad check are recorded out of scope (Q2); no baseline run follows. A focused local pass never reports as a full-suite pass (Q4).
FLOW-002 Diagnosis loop
FLOW-002-STEP-001 define Observation Manifest (generated DTOs, source predicates; Q8)
FLOW-002-STEP-002 tier 1: receipts / pure helpers (correct the diagnosis; Q7)
FLOW-002-STEP-003 tier 2: focused reproduction (Owned Stack, controlled reset; Q7, Q11)
capture observations before assertions (Q8)
on known mismatch: finish independent observations,
report failed or blocked (Q10)
FLOW-002-STEP-004 before another expensive run:
require New Discriminator + complete Manifest (Q12)
same observation missing again -> revise plan, no rerun
FLOW-002-STEP-005 tier 3 once focused checks settle (FLOW-001-STEP-002)Sources: Q7, Q8, Q10, Q11, Q12; S5 runs 13 to 15. Conclusion: each expensive run must be able to change a decision. The manifest prevents "one missing field per run"; the repeat guard stops blind reruns; tier 2 never pays full-stack startup.
FLOW-003 Expectation classes
assertion source gate? example (S5)
business invariant yes resources converge; no duplicate effect
output semantics (DTO) yes a field the generated DTO defines
speculative helper expect. no releaseId in a public summary that omits it
real gates kept yes readiness, authorization, lifecycle, concurrency, cleanupSources: Q9; S5 three verifier mismatches. Conclusion: a verifier fails a gate only on a requirement or a contract. A cached action label or one fenced competing operation is not a repeated effect or a duplicated resource.
Accepted Detail Coverage
| Question + exact entry/evidence anchor | Exact accepted choice and supplied detail | Provided rationale / alternatives | Architecture selector + applicable visual | System constraint served |
|---|---|---|---|---|
Q1 S2 ### Q1 | Focused tests, directly relevant integration checks, affected-workspace type/lint; broaden on changed dependency, focused failure, user request; no repeat without changed inputs | S6 timings; alternative mandatory full local suite rejected | ARC-001, ARC-005, FLOW-001-STEP-001 | Local cost tracks plan size |
Q2 S2 ### Q2 | No unchanged-baseline run for unrelated failures; record out of scope with evidence | S6 "40 and 41 of 47 failing" | ARC-001, FLOW-001 conclusion | Unrelated failures never pull delivery off scope |
Q3 S2 ### Q3 | verify-behavior exercises plan-scoped stories only; replaces "every in-scope observable story unless bounded" | not recorded | ARC-003, FLOW-001-STEP-002 | Verifier scope follows plan |
Q4 S2 ### Q4 | CI owns full suite/broad regression; closeout awaits CI on pushed commit and reports it; focused pass never a full-suite pass | S6 requested policy | ARC-001, ARC-006, FLOW-001-STEP-004 | Honest reporting; no duplicated CI work |
Q5 S2 ### Q5 | CI is the only fresh run; local acceptance never requires a fresh stack | Alternative #250 item 5 (fresh local final run) rejected | ARC-001, ARC-002, FLOW-001-STEP-002 | No local full-stack restarts |
Q6 S2 ### Q6 R2 | Local broad run fallback: once, at closeout, only what CI lacks (full suite with no CI; E2E with CI lacking E2E), Owned Stack after controlled reset, Q2 applies, reported as local broad run | R1 "skip" response superseded | ARC-001, ARC-006, FLOW-001-STEP-005 | Broad regression coverage stays when CI cannot give it |
Q7 S2 ### Q7 | Tier 1 receipts/pure helpers; tier 2 focused reproduction; tier 3 plan-scoped journey after focused checks settle; receipts never replace runtime acceptance; tier 3 on Owned Stack after reset | S5 item 1 | ARC-001, ARC-007, FLOW-002-STEP-002..005 | Cheapest check that can answer the question |
Q8 S2 ### Q8 | Observation Manifest before first run from generated DTOs and source predicates: public state, exact release/intent, classifier operands, resource ownership, correlated operation/receipt/error stages and timings; captured before assertions; strict secret redaction | S5 item 2 | ARC-003, ARC-004, FLOW-002-STEP-001, FLOW-002-STEP-003 | One run explains its own result |
Q9 S2 ### Q9 | Invariants and contract output semantics gate; Speculative Helper Expectations do not; keep readiness, authorization, lifecycle, concurrency, cleanup gates; cached label or one fenced competing op is not a repeated effect | S5 item 3 | ARC-003, ARC-004, FLOW-003-STEP-001 | No false verifier failures; same rigor |
Q10 S2 ### Q10 | Independent observations complete after a known mismatch; gate reported failed/blocked; partial evidence never a full pass | S5 item 4 | ARC-003, FLOW-002-STEP-003 | One run returns all independent evidence |
Q11 S2 ### Q11 | Avoid restarts between steps; reuse only strictly owned, isolated stack with controlled resets; reuse evidence only with matching input identities | S5 item 5 (diagnosis half) | ARC-001, ARC-002, ARC-003, ARC-004, FLOW-002-STEP-003 | Setup cost paid once per delivery |
Q12 S2 ### Q12 | New Discriminator and complete Observation Manifest before another expensive run; recurring missing observation revises plan | S5 item 6 | ARC-001, ARC-007, FLOW-002-STEP-004 | Stops blind rerun loops |
Spec Traceability
- State: complete. Codes are lookup keys into the sibling
SPEC.md; its Requirements and Outcomes and Acceptance Criteria sections hold them.
| Spec code / section selector | Architecture selectors | Accepted grill Q / exact log-entry evidence anchors | Coverage explanation |
|---|---|---|---|
OUT-001 #out-001-local-validation-follows-the-plan | ARC-001, ARC-003, ARC-005, FLOW-001-STEP-001 | S2 ### Q1; S2 ### Q2; S2 ### Q3 | Local default, out-of-scope failures, plan-scoped stories |
OUT-002 #out-002-ci-owns-broad-regression | ARC-001, ARC-006, FLOW-001-STEP-003, FLOW-001-STEP-004, FLOW-001-STEP-005 | S2 ### Q4; S2 ### Q5; S2 ### Q6 accepted R2 answer | CI wait, CI-only fresh run, local broad-run fallback |
OUT-003 #out-003-verification-is-tiered-and-reuses-the-owned-stack | ARC-001, ARC-002, ARC-004, FLOW-002 | S2 ### Q7; S2 ### Q11 | Tiers and Owned Stack reuse |
OUT-004 #out-004-each-verifier-run-returns-all-its-evidence | ARC-003, ARC-004, FLOW-002-STEP-003, FLOW-003 | S2 ### Q8; S2 ### Q9; S2 ### Q10 | Manifest, expectation classes, observe after mismatch |
OUT-005 #out-005-expensive-runs-need-a-reason | ARC-001, ARC-007, FLOW-002-STEP-004 | S2 ### Q12 | Repeat guard |
| AC-001 | ARC-001, FLOW-001-STEP-001 | S2 ### Q1 | Default local checks |
| AC-002 | ARC-001 | S2 ### Q1 | Three broadening triggers |
| AC-003 | ARC-001, FLOW-002-STEP-004 | S2 ### Q1 | No repeat without changed inputs |
| AC-004 | ARC-001 | S2 ### Q2 | Unrelated failures out of scope; no baseline run |
| AC-005 | ARC-003, FLOW-001-STEP-002 | S2 ### Q3 | Select default replaced |
| AC-006 | ARC-005 | S2 ### Q1; S2 ### Q4 | Focused task validation in plans |
| AC-007 | ARC-006, FLOW-001-STEP-004 | S2 ### Q4 | Closeout awaits and reports CI |
| AC-008 | ARC-001, ARC-006 | S2 ### Q4 | No full-suite claim from focused checks |
| AC-009 | ARC-001, ARC-002 | S2 ### Q5 | CI only fresh run |
| AC-010 | ARC-001, ARC-006, FLOW-001-STEP-005 | S2 ### Q6 accepted R2 answer | Fallback scope, place and report label |
| AC-011 | ARC-001, ARC-007, FLOW-002-STEP-002, FLOW-002-STEP-003, FLOW-002-STEP-005 | S2 ### Q7 | Three tiers; receipts never replace runtime acceptance |
| AC-012 | ARC-002, ARC-003, FLOW-002-STEP-003 | S2 ### Q11 | Owned Stack reuse, evidence identity match, owned cleanup |
| AC-013 | ARC-004 | S2 ### Q11 | Controlled reset before relaunch |
| AC-014 | ARC-003, FLOW-002-STEP-001 | S2 ### Q8 | Manifest content and timing |
| AC-015 | ARC-003, FLOW-002-STEP-003 | S2 ### Q8 | Capture before assertions; redaction |
| AC-016 | ARC-004 | S2 ### Q8; S2 ### Q9 | Feature Map entries carry manifest and expectation class |
| AC-017 | ARC-003, FLOW-003-STEP-001 | S2 ### Q9 | Gate classes |
| AC-018 | ARC-003, FLOW-003-STEP-001 | S2 ### Q9 | Cached label / fenced op not a repeated effect |
| AC-019 | ARC-003, FLOW-002-STEP-003 | S2 ### Q10 | Observe after mismatch; honest status |
| AC-020 | ARC-001, ARC-007, FLOW-002-STEP-004 | S2 ### Q12 | New Discriminator and manifest before expensive rerun |
Flow Failure Coverage
| Lens | Evidence / unknown / justified not applicable | Guarantee at stake | Material unresolved gap |
|---|---|---|---|
| Entry points and path convergence | Validation starts from implement-spec Task Gates, runtime validation, debugging-phase, and closeout. All read ARC-001 (Q1, Q4, Q7, Q12). | Every entry applies the same scope policy | None |
| Critical execution paths | FLOW-001 and FLOW-002 order: manifest, tiers 1–2, guard, tier 3, CI or fallback (Q7, Q12, Q6). | Expensive runs happen last and only with a discriminator | None |
| State ownership and authority | Owned Stack belongs to the delivery run; project verifier references stay project-owned; CI result belongs to the pushed commit (Q4, Q11). | No reuse of unowned resources | None |
| Transaction and side-effect boundaries | Not applicable: guidance changes create no transactional state. Runtime side effects stay under existing owned cleanup (S4 runtime-product-validation). | — | None |
| Concurrency and stale state | Reused evidence requires matching input identities (Q11); existing freshness rules in delivery-phase context continuity apply (S4). | Stale proof never counts | None |
| Idempotency and retries | Repeat guard (Q12) and "no repeat without changed inputs" (Q1). | No blind reruns | None |
| Partial failure and recovery | After a mismatch, independent observations complete; status stays failed/blocked (Q10). Controlled reset precedes relaunch (Q11). | Partial evidence never passes | None |
| Execution lifetime and durability | Owned Stack lives across delivery steps; cleanup at delivery end stays mandatory (S4 runtime-product-validation "Clean up only resources conclusively owned"). Unknown: how long a stack may stay up between resumed sessions; non-material, existing ownership proof governs reuse. | Owned cleanup still happens | None |
| Lifecycle and dependency transitions | A changed dependency broadens local validation (Q1); changed inputs invalidate only affected proof (S4). | Broadening only when evidence demands it | None |
| Completion and observability | Closeout reports focused local checks, CI result or local broad run, and never claims a full-suite pass from focused checks (Q4, Q6). | Truthful completion report | None |
Parked Work and Non-material Unknowns
| Question / source | Disposition and scope consequence | Owner / resume trigger | Why current guarantees remain closed |
|---|---|---|---|
Q13 S2 ### Q13 | Parked. Shared guidance cannot stop a project-owned mandate. | ci-app maintainers; resume if ci-app still runs mandated broad local suites after this ships | The shared policy is complete for shared skills; project rules are out of scope |
| Owned Stack lifetime across resumed sessions | Unknown, non-material | delivery-phase maintainers; resume on a report of stale stack reuse | Ownership and identity checks already gate reuse (Q11) |
Validation
- Decision/source/glossary reconciliation: S1 confirmed and frontier empty; S2 Q1 to Q12 accepted, Q6 R1 superseded by R2, Q13 parked; S3 terms match S1 glossary snapshot.
- Exact-detail cross-level coverage: every accepted Q maps to at least one ARC and one FLOW selector (Accepted Detail Coverage table).
- Relative links, selector targets, visual source/order checks: each selector code appears in its heading, table row, or diagram label (plain Markdown; the wiki build rejects raw HTML anchors); links point to routed wiki pages that exist in the retained tree.
- Spec-code architecture -> grill coverage: complete; OUT-001 to OUT-005 and AC-001 to AC-020 each map to at least one architecture selector and an accepted S2 entry (checked by script on 2026-10-08).
- Mermaid parsing/rendering:
mermaid@11.15.0parse()under a jsdom 26 shim on 2026-10-08 accepted both blocks (flowchart-v2,flowchart-v2). FLOW-002 and FLOW-003 are text views. No rendered image was produced; the wiki app renders at build time. - Existing spec agreement: sibling
SPEC.mdcompiled from the same Q1 to Q12 entries; no conflicting constraint found. - Remaining limits: unknowns listed above are non-material; no approval stamp.