Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions spikes/home-c-handoff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Parent Home Candidate C — handoff-first (prototype spike)

Rubric: **art_VyNYOggs v1.0** (frozen), canonical scenario **S1**, candidate **3 — handoff-first**.
Direct worker assignment (thread `th_wkbO7wK7`, root task `todo_IpkisZRm`); the folio-style registry
task `todo_wZdouzJU` is superseded by this assignment, matching what the rubric registry already
records for candidates 1 and 2 (real code on isolated branches, draft PR + evidence document).

## The lens

The home **leads with the takeover brief**: what the on-duty caregiver needs to take over care
right now. Capture (voice-first, typed fallback) and the event feed serve the brief. The teaching
point S1 forces: the nap → night-waking **correction changes the plan** for the next caregiver —
a feed-first home buries that; a handoff-first home puts it above the fold with lineage attached.

## What lives here

- `src/contract.ts` — contract mirror of **art_I2TCG08V v0.2** (Entry, Event, extraction envelope
with stale-suppression + idempotent apply) on the pinned `effect@4.0.0-rc.115`.
- `src/grants.ts` — audience model: household/relationship grants; per-event restriction as an
explicitly-flagged PROPOSED extension; draft-visibility rule stated in code.
- `src/data.ts` — decodes the committed fixtures through Effect schemas at load; viewer filtering.
- `src/screens/` — Home (takeover brief, feed with per-event audience cues, 30-day strip),
Capture (S1-A scripted replay: interruption → draft saved → typed completion → one
clarification), Inspect (S1-B: correct-with-preview, audience restriction, photo attach),
Month (30-day history with gap disclosure), Review doorway (the one representative screen),
Rosa view (S1-F grants-filtered). Plain react-native; typechecked, not executed.
- `fixtures/` — deterministic synthetic data: `s1-day.json` (all six beats), `month-history.json`
(30 days; final row SET from the S1 day so they cannot diverge), `media/`, `manifest.json`
(self-describing, transcript sha256s). Generated by `scripts/generate-fixtures.ts` (seed 20260915).

## Run

```bash
bun test # from spikes/home-c-handoff/ — contract decode + semantics (no install needed;
# hoisted pnpm layout resolves effect/react-native from the workspace root)
bun scripts/generate-fixtures.ts # regenerate — must be a byte-level no-op (tested)
bun run typecheck # tsc strict over src/test/scripts (RN screens included)
```

## Deliberate scope lines (rubric ground rule 3)

Extraction-review card flow (slots 11–14), handoff implementation (slot 23), and digest flow
(slot 24) are OUT of scope — the review flow appears only as a badge/doorway into one
representative screen. The prototype is a home lens, not a backend.

## Known divergences (for the evaluator)

1. **Contract doc vs merged domain schema.** `packages/domain` Event uses `timestamp` +
`payload: Record<string, number>` and has no `_tag`/`occurredAt`/`quantity`/`authorId`/`note`;
the contract document (art_I2TCG08V v0.2) and the evaluation corpus adapter use
`occurredAt`/`quantity`/`authorId`. This fixture set follows the contract document. Already
flagged for the v0.3 contract fold (Event.authorId); the home candidates are not the
reconciliation owner.
2. **Per-event audience restriction** (S1-B "parents only") has no home in contract v0.2 — modeled
here as an additive prototype-layer record; proposals belong to the contract owner.
3. **Personas.** Repo evaluation fixtures use `caregiver-1` / child "Ava"; rubric scenario S1
(Elena / Marco / Rosa / Sofia, binding) is used verbatim, with slug-style authorIds
(`elena`, `marco`, `rosa`) matching the repo's id style.

All data is synthetic. Nothing merges from this branch (candidate exclusion — exploration only).
64 changes: 64 additions & 0 deletions spikes/home-c-handoff/fixtures/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"manifestVersion": "0.1.0",
"rubric": {
"artifactId": "art_VyNYOggs",
"version": "1.0 (frozen 2026-09-17)",
"candidate": "3 — handoff-first",
"registryTask": "todo_wZdouzJU (folio version superseded by direct worker assignment)",
"executingThread": "th_wkbO7wK7",
"rootTask": "todo_IpkisZRm"
},
"contract": {
"artifactId": "art_I2TCG08V",
"version": "0.2",
"effectPin": "4.0.0-rc.115",
"note": "Wire shapes follow the contract document (and the evaluation corpus adapter); the merged packages/domain implementation diverges (timestamp/payload vs occurredAt/quantity) — flagged in the evidence document."
},
"scenario": {
"scenarioId": "S1",
"personas": [
"elena",
"marco",
"rosa",
"sofia"
],
"binding": true
},
"fixtures": [
{
"id": "HOME-C-S1-DAY",
"file": "s1-day.json",
"kind": "scenario",
"beats": [
"S1-A",
"S1-B",
"S1-C",
"S1-D",
"S1-E",
"S1-F"
]
},
{
"id": "HOME-C-MONTH-HISTORY",
"file": "month-history.json",
"kind": "history",
"days": 30
},
{
"id": "HOME-C-BREAKFAST-PHOTO",
"file": "media/breakfast-photo.png",
"kind": "media",
"bytes": 68,
"sha256": "431ced6916a2a21a156e38701afe55bbd7f88969fbbfc56d7fe099d47f265460",
"note": "synthetic placeholder image (1×1 PNG)"
}
],
"transcripts": {
"sha256": {
"entry-e1": "c3168035d4f94de160775d04e4ff3ef703e5869576e6ac4d6acecc382fc36040",
"entry-e2": "cf41358be79c0d5d9f9ed8fda3ea7bc95cda8623eb5722b70b5d4505bf5463d2"
},
"byteFidelityRule": "transcript bytes are exactly what was dictated; interruption markers are session facts, never transcript bytes"
},
"allSynthetic": true
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading