WI-010 · Platform & Contracts · llm-io-contracts
done P0 high risk Owner: Paul 100% · 4/4 tasks complete
| Code | WI-010 |
|---|---|
| Phase | Platform & Contracts |
| Order | 10 of 93 |
| Story points | 13 |
| Primary surface | Contract schemas / spike — no production code yet |
| Retires | — |
| Depends on | — |
| Blocks | Provider gateway + adapter boundary — core (registry, capability, schema+prompt compiler, image prep, ProviderAttempt), Output validation core — trust pipeline (stages 0–9, issue/receipt model, rule registry, deterministic repair, branded TrustedScanResult), Candidate ranking engine — deterministic features, fixed-point scoring, priority bands, tie-break, explainability, canonical hash, Scan Session & Orchestration — session identity + candidate lineage + next-scan execution, Sprint 4: Vision Contract POC - scan types, watchlists, overlays, appraisal routing, Vision scan service contract and provider adapter scaffold |
Freeze the model-facing I/O contracts so every vision feature builds on stable shapes — request envelope, per-scan_type result schemas, versioning, shared enums, and coordinates (vision-scanning-spec §5-10, 28).
Spec (docs/specs/P1)
Artifacts (spec §17)
Tests (spec §18)
Freeze (spec §19/§20/§21)
Gap-resolution expansion (D26, 2026-06-20)
The §17 schema package + shared vocabulary + golden valid/invalid fixtures + contract tests are merged and pass; all seven scan types have concrete, separately-versioned result schemas with 0–1000 coords, evidence/claim/unknown distinctions, retake/partial/warning states, and watchlist + next-scan + appraisal contracts — consumable by P2/P3/P4/UI/storage/appraisal without inventing fields (spec §19/§20). Open Questions §21 resolved before freeze.
No paid API / infra spend triggered by this item.
done Sprint: P&C Wave 1: Foundations
Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.
No human tasks linked.
docs/specs/P1-scan-io-contract.md (frozen-quality draft); §17 = required artifacts, §18 = test plan, §19/§20 = acceptance.appraisal_value now has an explicit comparables input channel and rejects unsupplied comparable IDs.priority is replaced with model_priority_hint; P4 owns authoritative ranking.--actor Codex or --actor Claude explicitly.None recorded yet.
None recorded yet.
None recorded yet.
packages/scan-contracts/package.json — standalone P1 scan-contract package scriptspackages/scan-contracts/README.md — contract package usage and P9 boundary notepackages/scan-contracts/schemas/p1-scan-contract.schema.json — canonical JSON Schema bundle: envelopes, primitives, enums, taxonomy/watchlist refs, all 7 result payloadspackages/scan-contracts/src/generated/p1-types.ts — generated TypeScript types from the canonical schema bundlepackages/scan-contracts/src/coordinates.ts — 0-1000 coordinate conversion helperspackages/scan-contracts/scripts/generate-types.mjs — deterministic TS type generationpackages/scan-contracts/scripts/validate-p1-contract.mjs — keyless schema/semantic fixture validatorpackages/scan-contracts/test/p1-contract.test.mjs — Node test suite for coordinates and semantic guardspackages/scan-contracts/fixtures/valid — golden valid request/result fixtures for all seven scan typespackages/scan-contracts/fixtures/invalid — golden invalid fixtures for prohibited values and cross-reference failurespackages/scan-contracts/docs/p1-schema-reference.md — developer schema reference and freeze decisionsdocs/specs/P1-scan-io-contract.md — ?21 resolved; explicit comparables channel; model_priority_hint applieddocs/tracking/deliberations/open-codex-2026-06-20-wi010-p9-floor-coordination.md — coordination ping to WI-068 on shared ID/idempotency/correlation conventionapps/web/package.json — contracts:p1 script hookpackage.json — root contracts:p1 script hookdocs/tracking/status.json — WI-010 D28 log/tools/artifacts/status updateddocs/tracking/items/llm-io-contracts.html — generated WI-010 item page reflects D28 evidencedocs/tracking/specs/P1-scan-io-contract.html — generated P1 spec page reflects resolved ?21docs/tracking/sprint.html — generated tracker boarddocs/tracking/sprint-meta.json — generated live-board metadatadocs/tracking/sprints/p-c-wave-1-foundations.html — generated active sprint pagedocs/tracking/index.html — generated tracker overviewdocs/tracking/specs.html — generated specs indexStarted as part of P&C Wave 1: Foundations (D36). Codex is building this (the most self-contained, fully-specced contract). Owner Paul. Builds on the WI-068 floor conventions where applicable; no other dependencies.
docs/specs/P1-scan-io-contract.md (frozen-quality draft); §17 = required artifacts, §18 = test plan, §19/§20 = acceptance.Read AGENTS.md -> llminterchange.md -> session-handoff.md -> status.json -> latest closed spec-gap round -> decision-log.md, then inspected P1/P9 specs and existing repo tooling. Building P1 as a keyless contract package with canonical JSON Schemas, generated TypeScript types, fixtures, and deterministic tests. WI-068 owns the broader ID/idempotency/correlation convention, so WI-010 will not invent operation/correlation fields beyond the P1 scan request_id already in the spec.
| Check | Result |
|---|---|
| Open deliberations | None at start of work |
| P1 scope | JSON Schema + fixtures + semantic tests; no provider calls |
| P9 coordination | Do not define competing idempotency/correlation convention; consume after WI-068 lands |
| Keyless requirement | Use deterministic local Node tests only |
Implemented the P1 schema package as a standalone packages/scan-contracts module. JSON Schema is canonical; TypeScript types are generated. The package includes valid/invalid golden fixtures, 0-1000 coordinate helpers/tests, semantic invariants for each scan type, explicit input.comparables[] for appraisal_value, and the model_priority_hint rename so P4 remains authoritative for ranking. No provider calls or secrets are used.
| Verification | Command | Result |
|---|---|---|
| Type generation | node packages/scan-contracts/scripts/generate-types.mjs | pass |
| Golden fixtures + semantic invariants | node packages/scan-contracts/scripts/validate-p1-contract.mjs | pass |
| Node contract tests | node --test packages/scan-contracts/test/p1-contract.test.mjs | 5 passed |
| P9 convention | open-codex-2026-06-20-wi010-p9-floor-coordination.md | ping opened; no competing convention invented |
appraisal_value now has an explicit comparables input channel and rejects unsupplied comparable IDs.priority is replaced with model_priority_hint; P4 owns authoritative ranking.Ran the exact npm wrappers after the direct keyless Node checks. npm run contracts:p1 generated the TypeScript types, validated all golden fixtures/semantic invariants, and passed the Node test suite. npm run tracker:check passed with 0 errors and the existing 18 out-of-scope warnings. Regenerated tracker pages after updating WI-010 evidence.
| Command | Result |
|---|---|
| npm run contracts:p1 | pass - fixture validation passed; 5 Node tests passed |
| npm run tracker:check | pass - 0 errors / 18 known warnings |
| node scripts/build-sprint-tracker.mjs | pass - regenerated tracker/spec/item pages |
Moved WI-010 on the Live Board with tracker:promote after the git/status work was complete. The live row moved in_progress -> done. Caveat: the promote script defaults --actor Claude; I omitted --actor Codex, so the audit event label says Claude even though Codex ran this work. I did not create extra status churn to rewrite the audit trail.
| Live action | Result |
|---|---|
| npm run tracker:promote -- WI-010 --to done --reason "WI-010 P1 scan I/O contract package implemented; keyless contract suite and tracker:check pass" --apply | Live Board: in_progress -> done |
| Audit actor | Recorded as Claude by script default; should be read as a tooling caveat for this event |
--actor Codex or --actor Claude explicitly.