Build the Vertical Slice
Build Mosaic as a sequence of complete slices. Each slice produces a runnable system and preserves the earlier tests.
Slice 1 · One deterministic run
Section titled “Slice 1 · One deterministic run”Implement:
Task,Budget,RunState, andRunError;ModelandVerifiertraits;- scripted model;
- one structured output;
- in-memory trace.
Acceptance: a test covers success, invalid output, one repair, and exhausted repair budget.
Slice 2 · Forge CLI and file traces
Section titled “Slice 2 · Forge CLI and file traces”Add:
clapcommands;- YAML task parsing;
- JSONL trace persistence;
- strict replay;
- cancellation;
- redaction.
Acceptance: replay reaches the same terminal state with no external calls.
Slice 3 · Text and image evidence
Section titled “Slice 3 · Text and image evidence”Add content-addressed blobs, text locators, image regions, OCR, and an embedding adapter.
enum EvidenceQuery { Text(String), SimilarTo(EvidenceId), Region { image: EvidenceId, area: NormalizedRegion },}Acceptance: a generated claim cannot cite a nonexistent image region.
Slice 4 · Audio and video timelines
Section titled “Slice 4 · Audio and video timelines”Add timed transcript spans, sampled frames, shot boundaries, and audio events. Start with external decoders behind traits before optimizing.
Acceptance:
- no decoded interval escapes source duration;
- the pipeline is bounded under a large input;
- cancellation terminates decoding;
- artifacts retain transform provenance.
Slice 5 · Real models
Section titled “Slice 5 · Real models”Add one remote adapter and one local capability:
- normalize request/response metadata;
- protect secrets;
- record model artifact or provider model ID;
- support timeout and retry policy;
- benchmark the local model.
Acceptance: either provider can replace the scripted model without changing program logic.
Slice 6 · Tools and authorization
Section titled “Slice 6 · Tools and authorization”Add a read-only source tool and a preview-producing transformation tool. Every tool declares effect and capabilities.
let authorized = authorizer.check(actor, run, proposed_call)?;let receipt = tool_runtime.execute(authorized).await?;let observed = verifier.observe_effect(&receipt).await?;Acceptance: a model-generated call cannot bypass authorization, even during replay or retry.
Slice 7 · Durable API
Section titled “Slice 7 · Durable API”Add Axum, SQLx, workers, object storage, leases, event IDs, and resumable SSE.
Acceptance:
- worker crash does not duplicate an effect;
- server restart preserves run state;
- client reconnect receives missed events;
- tenant isolation holds at retrieval and tool boundaries.
Slice 8 · Evaluation and routing
Section titled “Slice 8 · Evaluation and routing”Add:
- versioned fixtures;
- deterministic graders;
- calibrated model grader;
- experiment reports;
- small/local route and strong fallback;
- quality, latency, and cost thresholds.
Acceptance: release tooling rejects a candidate that improves mean score while increasing severe failures.
Slice 9 · Multimodal generation
Section titled “Slice 9 · Multimodal generation”Add candidate generation adapters for at least two output modalities—for example image storyboards and speech narration.
Do not begin with final video generation. Use a funnel:
many cheap briefs → a few storyboard candidates → verified image + narration pairs → expensive video finalists → human-approved artifactAcceptance: every output has provenance, safety status, cost, grader results, and approval state.
Slice 10 · Production hardening
Section titled “Slice 10 · Production hardening”- structured traces and metrics;
- per-tenant quotas;
- audit log;
- provider and local model health;
- data retention and deletion;
- chaos tests for timeouts and partial failures;
- canary and rollback;
- runbook.
The capstone demonstration
Section titled “The capstone demonstration”Run Signal Room and Cutroom on Mosaic. Then show:
- the same evidence primitives support both;
- local preprocessing reduces expensive model context;
- a small-model path handles routine cases;
- verifier failures trigger targeted repair or routing;
- held-out evals establish the trade-off;
- a risky generated artifact cannot publish without approval.
That demonstration proves you built an AI application platform—not a provider wrapper.