fluid-core/workplans/FLUID-WP-0002-foundations-and-wire-contract.md
tegwick 76912adef8
Some checks failed
ci / build (push) Failing after 1m6s
Generate contract types, pin fixtures to spec, add build and ADRs
Completes FLUID-WP-0002. The record types in internal/contract are
generated from schemas/ by a dependency-free generator; fixtures
transcribed from the spec's worked examples validate against those
schemas and round-trip through the generated types with
DisallowUnknownFields, so a spec change that misses the schemas fails
CI rather than drifting silently.

Adds identifier prefix helpers, Makefile, GitHub Actions, and five ADRs
recording the Go choice, out-of-process attachment, the wire contract as
boundary, the evidence store, and revision identity.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014KmVxhJ35tCo7rE7UnLwWu

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 1116572@bnt-lap001
Assistant-Session: 8ba9bb93-a72a-4883-b189-2499cce5c400
2026-09-04 02:03:12 +02:00

3.1 KiB

id type title domain repo status owner topic_slug created updated planning_priority planning_order related_repos state_hub_workstream_id
FLUID-WP-0002 workplan FLUID foundations and the wire contract infotech fluid-core done worsch fluid-core 2026-09-04 2026-09-04 high 1
fluid-telegram
fluid-x
fluid-substack
bd8c4140-9c82-500b-a52b-13f275411289

FLUID-WP-0002 - Foundations and the wire contract

Establish the boundary before any code depends on it. fluid-core integrates out of process, so its contract is a set of on-the-wire artifacts, not a Go API. Everything downstream assumes these schemas are stable.

Reference: spec/FluidHypothesisRevisionSchema.md, spec/ArchitectureBlueprint.md §36 (revision descriptor), §17 (routing policy), §44 (control APIs).

T01 - Repository scaffold and INTENT

id: FLUID-WP-0002-T01
status: done
priority: high
state_hub_task_id: "bf47b3dd-9ca0-5ce2-9d9d-22dabab5f89c"

Go module, directory tree per the plan, INTENT.md declaring the wire-contract boundary and the four invariants this repo defends hardest.

T02 - Record schemas

id: FLUID-WP-0002-T02
status: done
priority: high
state_hub_task_id: "5cf83eeb-819f-5972-a660-aa9f5345355f"

JSON Schema for fluid_pressure, fluid_hypothesis, fluid_revision, fluid_experiment, fluid_event, fluid_backend_requirement and the feedback record. Transcribe field names faithfully from the schema document — they are the interop surface, per its §1.

T03 - Descriptor and policy schemas

id: FLUID-WP-0002-T03
status: done
priority: high
state_hub_task_id: "da22bde0-5138-56db-a26d-f63a3195d6ed"

JSON Schema for the revision descriptor (Blueprint §36) and the routing policy (Blueprint §17). These two are what the gateway consumes at runtime and must be readable without any fluid-core code.

T04 - Type generation

id: FLUID-WP-0002-T04
status: done
priority: high
state_hub_task_id: "ba9933b2-0b92-55c4-96b0-b46c955e25a6"

Generate Go types into internal/contract/ from schemas/. Hand-written record types are prohibited — drift between spec and implementation must fail CI.

T05 - Spec examples as fixtures

id: FLUID-WP-0002-T05
status: done
priority: high
state_hub_task_id: "f835faf7-98f4-514f-937d-83b86b4b44a5"

Extract the YAML examples embedded in the spec documents and validate them against the schemas in CI. If the spec changes and the schema does not, the build breaks.

T06 - Build, CI and identifier conventions

id: FLUID-WP-0002-T06
status: done
priority: medium
state_hub_task_id: "2b0e42e0-c6ff-534e-8de4-3ff333af9e78"

Makefile, GitHub Actions (build, vet, test, schema validation), and the identifier prefix helpers from schema doc §16: H- R- E- P- BR- D- EV- F- C-.

T07 - Architecture decision records

id: FLUID-WP-0002-T07
status: done
priority: medium
state_hub_task_id: "83b10a34-08e3-5ceb-81f4-f148a3d87183"

ADRs for: Go as the implementation language; out-of-process attachment; the wire contract as boundary; SQLite to Postgres evidence store; and the revision identity scheme, which Blueprint §54 leaves deliberately open.