From 6d29e4a4c9f468d751cda9615fd7291a46531a4a Mon Sep 17 00:00:00 2001 From: mnovak Date: Mon, 2 Nov 2026 00:01:53 +0100 Subject: [PATCH] [docs] SunsetPlace: Analysis, review, lessons, and G1.2 closed --- .agents/FEATURES.md | 1 + .agents/GAP_ANALYSIS.md | 5 +- .agents/features/sunset-place.md | 122 ++++++++++++++++++++++++ .agents/lessons/README.md | 4 +- .agents/lessons/code.md | 15 +++ .agents/lessons/testing.md | 15 +++ .agents/reviews/feature-sunset-place.md | 56 +++++++++++ CLAUDE.md | 5 +- HANDOVER.md | 13 ++- 9 files changed, 228 insertions(+), 8 deletions(-) create mode 100644 .agents/features/sunset-place.md create mode 100644 .agents/reviews/feature-sunset-place.md diff --git a/.agents/FEATURES.md b/.agents/FEATURES.md index c94bff3..faa2c95 100644 --- a/.agents/FEATURES.md +++ b/.agents/FEATURES.md @@ -8,5 +8,6 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in | Workspace, contracts, gates, PWA shell | 0 | Merged to `main` 2026-11-01 (`d11d242`); built, not deployed. Phase 0 gate still open | [phase0-workspace.md](features/phase0-workspace.md) | [feature-phase0-workspace.md](reviews/feature-phase0-workspace.md) | | Roadmap and gameplay docs, read against the code | 0 | Merged 2026-11-01; Q1–Q7 answered by the author | — | [docs-roadmap-gameplay.md](reviews/docs-roadmap-gameplay.md) | | The Letter slot: page at `#letter`, empty `docs/LETTER.md` | 0 | Merged to `main`; built, not deployed. Invisible until the author writes | [letter-slot.md](features/letter-slot.md) | [feature-letter-slot.md](reviews/feature-letter-slot.md) | +| Where the sunset is: choose a town (or skip to a guess from the device's zone), kept on the device; tonight's sunset in the garden | 1 | Merged to `main`; built, not deployed | [sunset-place.md](features/sunset-place.md) | [feature-sunset-place.md](reviews/feature-sunset-place.md) | | The sun: real sunrise, sunset and solar noon on the device; polar day and night | 1 | Merged to `main`; engine only, the app does not show it yet | [sun.md](features/sun.md) | [feature-sun.md](reviews/feature-sun.md) | | The art pipeline and the art board: STYLE.md (S1–S5 and the fox's F1–F4 approved), the manifest (Phase 1–3, 53 pictures), stand-ins, `tools/art-prep`, the published board | 0 | Merged to `main`; board published (private). The app is unchanged. Gate waits on the first real picture | [art-pipeline.md](features/art-pipeline.md) | [feature-art-board.md](reviews/feature-art-board.md), [art-phase2-3-pictures.md](reviews/art-phase2-3-pictures.md) | diff --git a/.agents/GAP_ANALYSIS.md b/.agents/GAP_ANALYSIS.md index 134d694..0c11393 100644 --- a/.agents/GAP_ANALYSIS.md +++ b/.agents/GAP_ANALYSIS.md @@ -31,7 +31,7 @@ board exist, and the first real picture is the author's to make. | G0.12 | The app cannot validate content in the browser | Open. Ajv compiles with `new Function`, which the CSP forbids. Needs standalone pre-compiled validators before the app reads the library. | | G0.13 | No GitHub remote, no Pages deploy workflow, no mirror check (§5.2) | Open. Only the Gitea remote exists. | | G0.14 | Author-owned docs missing: `docs/PRINCIPLES.md`, `docs/ART.md`, `art/STYLE.md`, `docs/LETTER.md` | Open, narrowed 2026-11-01: `docs/ROADMAP.md` and `docs/GAMEPLAY.md` were added on `docs/roadmap-gameplay`, as the author gave them. Agents scaffold LETTER.md; they never write its voice. | -| G0.15 | Deferred packages: `storage`, `identity`, `sync`, `services/lucerna`, `tools/art-prep` | Open by design (D1). Each arrives with its first feature. | +| G0.15 | Deferred packages: `identity`, `sync`, `services/lucerna` | Open by design (D1). Each arrives with its first feature. `tools/art-prep` arrived with the art board; `storage` with the sunset place (2026-11-02, the `profile` store only). | | G0.16 | The outcome-phrase heuristic has no reviewed override | Open. A real sentence that trips it (a false positive) cannot enter the library. Design: a `reviewedBy` field on the entry, set only by a person. | | G0.17 | Manual: install on a phone, open in airplane mode | Open. Needs a hosted build (G0.13). | | G0.18 | The library is empty | Open. **Phase 0 gate**: 60 sentences, each sourced and verified public domain (ROADMAP Phase 0). Release needs ≥ 365. `verifiedBy` is a person, so an agent may propose candidates but never mark one verified (D4). | @@ -53,7 +53,8 @@ sentences). Nothing in Phase 1 is visible to the player yet. | Id | Gap | Status / evidence | |:--|:--|:--| | ~~G1.1~~ | ~~No module computes the sun (CLAUDE.md §7); polar and DST traps only predicted~~ | Closed 2026-11-01 on `feature/sun`. `engine/src/sun/sun.ts`: 26 published days in 6 cities within 2 min, polar day and night at Tromsø, 50 tests, 5 of 5 put-back bugs caught. Both traps measured (CLAUDE.md §8). | -| G1.2 | The player cannot choose a city; no time-zone guess; no sunset time on screen | Open. A city list on the device (never GPS, never an IP lookup), the device zone as the fallback, the time shown in the garden. | +| ~~G1.2~~ | ~~The player cannot choose a city; no time-zone guess; no sunset time on screen~~ | Closed 2026-11-02 on `feature/sunset-place`. 7,342 public-domain towns searched on the device, a guess for every zone a browser reports, the town kept in IndexedDB, tonight's sunset in the garden. 299 unit, 10 e2e, offline choosing and changing a town; 6 of 6 put-back bugs caught. | +| G1.3 | Towns have no Czech names (*Vídeň*) | Open. Natural Earth has none; arrives with Czech copy. | ## Design questions — answered diff --git a/.agents/features/sunset-place.md b/.agents/features/sunset-place.md new file mode 100644 index 0000000..438a81a --- /dev/null +++ b/.agents/features/sunset-place.md @@ -0,0 +1,122 @@ +# Where the sunset is — choosing a town, the guess, tonight's sunset + +Status: built on `feature/sunset-place`. ROADMAP Phase 1, *the sun*: "the player is asked *Where do +you want your sunset?* (a city, skippable); if skipped, it is guessed from the device time zone. +**Never GPS.**" Gap G1.2. Review: [`feature-sunset-place.md`](../reviews/feature-sunset-place.md). +Builds on [`sun.md`](sun.md). + +--- + +## 1. Why and what, in the player's terms + +The first time the player opens the garden, under the name, it asks one quiet question: +**Where do you want your sunset?** A box to type a town, and below it a way to say *not now*. + +- **Typing a town** shows matching towns at once, with no network: *Brno*, *Praha*, *plzen* all + work. Choosing one says, in the garden, **"Tonight the sun sets at 7:29 PM in Brno."** +- **Not now** uses a guess from the device's clock: in Prague's time zone, Prague. The garden says + so: the line ends with *a guess from this device's time zone*. A player who travels gets the guess + for wherever their phone's clock is. +- **Change town** is always there, under the line. Choosing again replaces the town; nothing else + changes. +- **After the sunset** the line speaks of tomorrow's. **In the far north** it speaks of the lowest + light, or of the noon twilight (`sun.md` D4). +- **The town stays on this device.** It is the only place Rosea knows about the player, and it never + leaves. If the device will not keep it (a private window that blocks storage), the garden still + shows the sunset and says, calmly, that it will ask again next time. + +What it never does: ask for GPS, look up an address, guess from the network, or say anything about a +missed sunset. + +## 2. Technical architecture + +```mermaid +flowchart LR + subgraph app["apps/rosea"] + main["App.svelte
device zone, now, wiring"] + end + subgraph ui["packages/ui"] + shell["Shell.svelte"] --> ask["SunsetPlace.svelte
the question and the search"] + shell --> line["SunsetLine.svelte
tonight's sunset"] + end + subgraph content["packages/content"] + guess["places/guess.ts
zone-guesses.json (25 KB)"] + towns["places/places.ts
places.json (496 KB, loaded on demand)"] + end + subgraph storage["packages/storage (new)"] + profile["profile store
sunset place"] + end + subgraph engine["packages/engine"] + next["sun.nextInvitation(now, place)"] + day["time.addDays / localDay"] + end + main --> shell + main -->|"guessTown(zone)"| guess + main -->|"import() on first search"| towns + main -->|"load / save"| profile + line --> next --> day + build["scripts/build-places.ts
run by hand"] -.-> guess & towns +``` + +- **`@rosea/content/places`** — `searchTowns(query)`: accent- and case-blind, by English name, + local name (*Praha*) and Latin-script language names; best match first, then the larger town; + *"Sydney, Canada"* narrows by country or region. Imported dynamically, so the garden does not + carry 7,342 towns. +- **`@rosea/content/guess`** — `guessTown(zone)`: the largest town in that zone, or the zone's own + location from the time zone database. Keyed by the names browsers report (`Asia/Calcutta`) as well + as the database's (`Asia/Kolkata`). `UTC` and `Etc/*` guess nothing. +- **`@rosea/storage`** — Dexie over the IndexedDB database `rosea`. One store so far, `profile`, + holding `sunsetPlace`: either `{ kind: 'town', town }` or `{ kind: 'device-zone' }`. A record of + the wrong shape reads as *no choice yet*, with a warning in the console. +- **`@rosea/engine`** — `nextInvitation(now, place)`: the first invitation at or after now, checking + yesterday, today and tomorrow (Reykjavík, 00:02 in June). `addDays` for calendar steps. +- **`@rosea/ui`** — renders. It receives the device zone, the clock, the guess, a search function + and load/save as props; it imports neither content nor storage (CLAUDE.md §2 dependency + direction). + +### Decisions + +| # | Decision | Why | +|:--|:--|:--| +| P1 | **Natural Earth's populated places** (public domain), 7,342 towns. Downloaded by hand with the author's approval; only the derived JSON is committed. | The only public-domain town list with time zones. GeoNames is better but CC BY, which would need an attribution line in the product. | +| P2 | **Natural Earth's time zones are cross-checked, not trusted.** A town keeps its zone only if its clock is identical all through 2026 to one of its country's zones in the IANA database and fits its longitude (within 3.5 h, across the date line). Otherwise the five nearest trusted towns in the same country vote; with none, the country's nearest zone location. 1,205 towns were corrected. | Measured: Prague was *America/Chicago*, Cardiff *Australia/Sydney*, Sydney had none. A wrong zone shows the right sunset at the wrong clock time. | +| P3 | The guess is the **largest town in the device's zone**. | Recognisable ("Prague"), and the zone is all the device tells. | +| P4 | *Not now* stores `device-zone`, not a town. | The guess then follows the phone's clock when the player travels. | +| P5 | The town list loads **on first search**, as its own precached chunk. | 208 KB compressed is too much to parse on every open of a quiet garden. Offline it is already cached. | +| P6 | The time is shown in the **town's** zone, in the device's locale format. | It is the clock the player will see out there. | +| P7 | Storage failing is **not an error page**: the choice lives for the session and the garden says it will ask again. | CLAUDE.md §1: network and device features degrade to a calm state with an explanation. | +| P8 | `navigator.storage.persist()` is **not** called yet. | Firefox shows a prompt; asking for it on choosing a town would be strange. It belongs to G0.11 (eviction), with export-my-rose. | + +## 3. Risk analysis + +| Risk | Answer | +|:--|:--| +| **Location** — the chosen town is where the player lives, near enough. | It is stored only in this device's IndexedDB. Nothing in this feature makes a request: the e2e test asserts no request leaves the origin while searching and choosing. Never GPS, never IP. | +| **A wrong clock** sends someone out an hour early or late. | P2, and a test that every town's clock fits its longitude; the known bad zones are pinned by name. Residual: a town Natural Earth filed under a *same-country, same-looking* wrong zone (e.g. Dunhuang, Gansu, under Xinjiang time by its neighbours' vote) is not caught. Stated in the review. | +| **Feeling worse** — a question on the first screen can feel like a demand. | It is skippable in one tap, the skip still gives a sunset, and nothing ever counts or mentions a missed sunset. | +| **Feeling judged for where one lives** — a small town not in the list. | The empty search says *"A larger one nearby will do."*, never *not found* as an error. | +| **Reachability** | None. The town is never shared. | + +## 4. Gap analysis and the designed solution + +| Gap | Solution | State | +|:--|:--|:--| +| G1.2: no way to choose a town, no guess, no sunset on screen | This feature | Built | +| G0.15: `packages/storage` deferred until its first feature | `@rosea/storage` with the `profile` store | Built | +| G0.11: eviction — `persist()`, export-my-rose | Not here (P8) | Open | +| Czech names for towns (*Vídeň*) | Natural Earth has no Czech column; local names cover *Praha*, *Wien* | Open, with Czech copy | +| Planetary twins of the sunset (the in-game sunset, the chair) | Phase 1, later | Open | + +## 5. Verification matrix + +| Case | Kind | Where | +|:--|:--|:--| +| 7,342 towns, every zone valid, every clock fits its longitude; Prague, Cardiff, Sydney, Anchorage, Kryvyi Rih, Apia, Pristina keep the right zone | unit | `content/test/places.test.ts` | +| Search by English, local and accent-free names; larger first; comma narrows; empty and unknown are `[]` | unit | same | +| Guess for 7 zones including browser names; UTC guesses nothing; every zone Intl knows is covered | unit | same | +| `nextInvitation`: today before sunset, tomorrow after; Reykjavík after midnight; never past, ≤ 48 h, nothing earlier in between | unit, property | `engine/test/sun.test.ts` | +| `addDays` across DST, years, leap days; inverse property | unit, property | `engine/test/localDay.test.ts` | +| Storage: nothing saved reads `null`; town and device-zone round-trip; a malformed record reads `null` with a warning; a database that cannot open rejects | unit (fake-indexeddb) | `storage/test/profile.test.ts` | +| UI: asks when nothing is saved; search lists towns; choosing shows the line; *not now* shows the guess and says so; tomorrow after sunset; polar wording; storage failure says it will ask again; change and keep | unit (testing-library) | `ui/test/sunset.test.ts` | +| Built app: choose Brno, see Brno's sunset at the time the engine computes, reload and it is still Brno; nothing requested from another origin; no axe violations | e2e | `e2e/shell.spec.ts` | +| Offline: choose a town, close the server, reload: the town and the line survive | offline | `e2e/offline.spec.ts` | diff --git a/.agents/lessons/README.md b/.agents/lessons/README.md index df79dff..e3cac3c 100644 --- a/.agents/lessons/README.md +++ b/.agents/lessons/README.md @@ -10,9 +10,9 @@ and **how to apply it**. | `architecture.md` | none yet | Layering, ownership, seams. | | `design.md` | none yet | Wording, silence, empty states. | | [`art.md`](art.md) | 2 | The image pipeline. | -| [`code.md`](code.md) | 2 | TypeScript, Svelte, async ordering, Rust. | +| [`code.md`](code.md) | 3 | TypeScript, Svelte, async ordering, Rust. | | [`technical.md`](technical.md) | 5 | The browser and the build as platforms. | -| [`testing.md`](testing.md) | 6 | What makes a test worth having, and how a passing test lies. | +| [`testing.md`](testing.md) | 7 | What makes a test worth having, and how a passing test lies. | | `privacy.md` | none yet | What could leave the device or make a person findable. (The geocell finding is in the review, not here: it was caught before it cost anything.) | | [`process.md`](process.md) | 2 | Workflow, commits, credentials, honesty about what shipped. | diff --git a/.agents/lessons/code.md b/.agents/lessons/code.md index 6b3ba09..4040a83 100644 --- a/.agents/lessons/code.md +++ b/.agents/lessons/code.md @@ -35,3 +35,18 @@ condition that returns early hides every read after it. **How to apply it.** In an effect, read the state you depend on before any early return or `&&` (`const target = heading; if (moved) target?.focus();`). Test the re-run, not just the first run. + +## Svelte 5 state is a Proxy, and IndexedDB cannot clone a Proxy + +**What happened.** On 2026-11-02 the sunset town was never saved in a real browser. The +search results lived in `$state`, which wraps objects in a Proxy. The town passed to +`save` was that Proxy, and IndexedDB's structured clone threw `DataCloneError`. Every +unit test passed. The e2e suite found it: after a reload, the garden asked again. + +**Why it bit.** Anything that crosses a structured-clone boundary (IndexedDB, +`postMessage`, `BroadcastChannel`, `structuredClone`) refuses a Proxy, and Svelte 5 +hands out Proxies wherever state is deep. + +**How to apply it.** At every storage or messaging boundary, write a plain copy built +field by field (in `@rosea/storage`, the same shape check used on reading). Keep lists +that are only passed along as `$state.raw`. Test the boundary with `new Proxy(value, {})`. diff --git a/.agents/lessons/testing.md b/.agents/lessons/testing.md index 78bdc28..201a5c6 100644 --- a/.agents/lessons/testing.md +++ b/.agents/lessons/testing.md @@ -87,3 +87,18 @@ feature lands, for a reason that has nothing to do with the feature. **How to apply it.** For a "does not exist" example, pick a name no plan will ever add (an owl in a game with a fox, `owl-sheet`), never the next item on the roadmap. + +## A fake that does not do what the real thing refuses hides the bug + +**What happened.** The UI tests for the sunset town used a fake `save` that pushed the +value into an array. The real save goes to IndexedDB, which clones the value and refuses +a Proxy. The fake never cloned, so 10 UI tests passed while saving was broken in every +browser (`code.md`). The same feature's e2e tests then raced the IndexedDB commit by +reloading milliseconds after a click, and passed or failed on alternate runs. + +**Why it bit.** A fake is a claim about the real dependency. When the real one rejects +inputs, a fake that accepts everything tests a different program. + +**How to apply it.** A fake for a boundary does the boundary's checks: a storage fake +calls `structuredClone` on what it is given. An e2e test that reloads after a write first +waits for the write to be readable (`e2e/stored.ts`), never for the screen alone. diff --git a/.agents/reviews/feature-sunset-place.md b/.agents/reviews/feature-sunset-place.md new file mode 100644 index 0000000..8456492 --- /dev/null +++ b/.agents/reviews/feature-sunset-place.md @@ -0,0 +1,56 @@ +# Review — `feature/sunset-place` + +Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/sunset-place.md`](../features/sunset-place.md). +Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea. + +## Gates — counts, not exit codes + +| Gate | Result | +|:--|:--| +| `pnpm lint` | exit 0 (after finding 6) | +| `pnpm typecheck` | exit 0, `@rosea/storage` included; `svelte-check` 0 errors, 0 warnings | +| `pnpm test` | **299 passed**: schema 15, **storage 18 (new)**, content 71 (+24), art-prep 56, engine 113 (+11), ui 26 (+10) | +| `pnpm test:e2e` | **10 passed** (+3), against the built app | +| `pnpm test:offline` | **1 passed**, now choosing a town online and changing it offline | +| `pnpm lint:copy` | 15 files, 0 problems | +| `pnpm validate:library` | 13 of 13 fixtures rejected | + +**The app changed** (CLAUDE.md §5.4): the garden now asks where the sunset is and shows it. The +bundle was rebuilt by the e2e and offline runs. It is **not deployed**: there is no host yet (G0.13). + +**Stable.** After finding 2, the offline suite passed 3 runs of 3 and e2e 2 of 2 in a row. + +## Bug drills — each put back once + +| Put back | Result | +|:--|:--| +| Storage writes the caller's object, not a plain copy | CAUGHT: the Proxy test | +| The zone guess reads inherited keys (`constructor`) | CAUGHT | +| Search without accent folding | CAUGHT, by the normalise test only: *plzen* still found Plzeň through Natural Earth's ASCII name, a second path | +| `nextInvitation` skips yesterday | CAUGHT: 2 (Reykjavík after midnight, the property) | +| "Tomorrow" said on the same day | CAUGHT: 2 | +| A failed save goes unmentioned | CAUGHT | + +## Findings + +| # | Area | Finding | Resolution | +|:--|:--|:--|:--| +| 1 | Correctness | **Saving never worked in a browser.** The UI's towns lived in Svelte 5 `$state`, which wraps them in a Proxy; IndexedDB cannot clone a Proxy and threw `DataCloneError`. Every unit test passed, because the fake `save` only pushed into an array. Found by e2e: after a reload the garden asked again. | **Fixed twice**: storage writes a plain copy built by its own shape check (and refuses a malformed one), and the results list is `$state.raw`. A storage test saves a Proxy. Lessons: `code.md`, `testing.md`. | +| 2 | Test honesty | The tests reloaded or closed the tab milliseconds after the click, racing the IndexedDB commit; the offline suite passed and failed on alternate runs. | **Fixed**: `e2e/stored.ts` waits until the town is in IndexedDB before a reload or close. | +| 3 | Correctness | **Natural Earth's time zones are wrong where it matters**: Prague *America/Chicago*, Cardiff *Australia/Sydney*, Anchorage *America/Juneau*, Sydney none, and 1,183 towns none. A nearest-zone fallback then made its own errors: southern Ukraine on Moscow time (Simferopol), Gansu on Xinjiang time. | **Fixed (P2)**: identical-clock check, longitude fit across the date line, neighbour vote, nearest zone location last. The cases are pinned by name in `places.test.ts`, and every town's clock is checked against its longitude. | +| 4 | Correctness | Browsers report CLDR zone names (`Asia/Calcutta`, `Europe/Kiev`), not always the tz database's. A guess table keyed only by the database's names would guess nothing in Kolkata. | **Fixed**: the guesses are also keyed by the name Intl resolves to; a test checks every zone Intl knows. | +| 5 | Correctness | Tonga and Samoa (UTC+13 at 175° W) were dropped by a longitude check that did not wrap. | **Fixed**; Apia is pinned. | +| 6 | Process | The shell turned ` ` in a heredoc into the character itself; lint caught it (`no-irregular-whitespace`). | **Fixed** with a plain `\s+`. | +| 7 | Privacy | The town is where the player lives, near enough. | It is written only to this device's IndexedDB. The e2e test asserts that searching and choosing request nothing from another origin, and that the town list came from this origin. No GPS, no IP, no lookup. | +| 8 | Privacy | The build downloaded datasets. | By hand, with the author's approval, into the session's scratch folder; only the derived JSON is committed. Public domain both. | +| 9 | Soul | A question on the first screen can feel like a demand, and a small town not found like a judgment. | One tap skips it and still gives a sunset; an empty search says *"A larger one nearby will do."* No copy mentions a missed sunset. | +| 10 | Soul | A guess shown as fact could send someone out at the wrong time. | The guessed line says it is a guess, and *Change town* is always under it. | +| 11 | Correctness | Not verified: a town Natural Earth filed under a wrong zone **of its own country with the same clock rules** (Dunhuang, Gansu, voted onto Xinjiang time by its neighbours). | **Open, stated.** The longitude check cannot see it. Rare, and the player can choose a neighbouring town. | +| 12 | Scope | `navigator.storage.persist()` is not called; a drifted-away player on iOS can lose the town (CLAUDE.md §8). | **Deferred to G0.11** with export-my-rose (P8). Losing the town only means being asked again. | + +## What was not verified + +- A real phone, a real install, Safari or Firefox: only Chromium under Playwright. +- A private window that refuses IndexedDB in a real browser: covered by unit tests with a rejecting store. +- Two tabs choosing different towns at once: last write wins, and the other tab shows its own until reload. +- Czech town names (*Vídeň*): Natural Earth has none. diff --git a/CLAUDE.md b/CLAUDE.md index 3030f1b..f8a2980 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -115,8 +115,8 @@ feed of anything. ## 2. Repository layout -Phase 0 scaffolded `schema`, `engine`, `content`, `ui`, `apps/rosea`, `tools/art-prep` and `art/`. -`storage`, `identity`, `sync` and `services/lucerna` arrive with their first feature, because an +Phase 0 scaffolded `schema`, `engine`, `content`, `ui`, `apps/rosea`, `tools/art-prep` and `art/`; +Phase 1 added `storage` (the `profile` store). `identity`, `sync` and `services/lucerna` arrive with their first feature, because an empty package has a test suite that runs nothing ([`phase0-workspace.md`](.agents/features/phase0-workspace.md) D1). ``` @@ -222,6 +222,7 @@ pnpm validate:library # every hope sentence; fixtures must FA pnpm lint:copy # forbidden words and names (§5.6) pnpm art:board # prompts + stand-ins -> tools/art-prep/dist/board/ (docs/ART.md) pnpm art:accept # an accepted picture -> art/final/*.webp, sheets cut +tsx scripts/build-places.ts # rebuilds the town list from downloaded Natural Earth + tzdb (by hand) # Not yet — they arrive with their first feature: cargo test --manifest-path services/lucerna/Cargo.toml # Phase 4 onward diff --git a/HANDOVER.md b/HANDOVER.md index 63d9b5d..366e4d3 100644 --- a/HANDOVER.md +++ b/HANDOVER.md @@ -12,8 +12,8 @@ Rewritten at the end of each session (CLAUDE.md §5.1). Gitea hashes match. Analysis: [`.agents/features/phase0-workspace.md`](.agents/features/phase0-workspace.md). Review, with counts and the mutation results: [`.agents/reviews/feature-phase0-workspace.md`](.agents/reviews/feature-phase0-workspace.md). -- **Gates:** all pass on this machine. Unit tests: 236 (schema 15, content 47, - art-prep 56, engine 102, ui 16). E2E: 7. Offline: 1. `lint:copy`: 12 files, 0 problems. +- **Gates:** all pass on this machine. Unit tests: 299 (schema 15, storage 18, content 71, + art-prep 56, engine 113, ui 26). E2E: 10. Offline: 1. `lint:copy`: 15 files, 0 problems. `validate:library`: 13 of 13 fixtures rejected. - **Built, not deployed:** there is no host yet. - **Roadmap and gameplay docs:** `docs/ROADMAP.md` and `docs/GAMEPLAY.md` are on @@ -42,6 +42,15 @@ Rewritten at the end of each session (CLAUDE.md §5.1). The app does not use it yet. Analysis: [`.agents/features/sun.md`](.agents/features/sun.md). Review: [`.agents/reviews/feature-sun.md`](.agents/reviews/feature-sun.md). +- **Where the sunset is (Phase 1):** merged to `main`. The garden asks *Where do you want your + sunset?*: a search over 7,342 public-domain towns on the device, or *Not now*, which guesses + from the device's time zone. The answer is kept in IndexedDB (the new `@rosea/storage`, store + `profile`), and the garden says when tonight's sunset is. Natural Earth's time zones were wrong + for Prague, Cardiff and Anchorage, among others; `scripts/build-places.ts` cross-checks every one + against the tz database. To rebuild the list, download the two sources again (the script's + header says which) and run it. Analysis: [`.agents/features/sunset-place.md`](.agents/features/sunset-place.md). + Review: [`.agents/reviews/feature-sunset-place.md`](.agents/reviews/feature-sunset-place.md). + **Phase 0 is not finished.** The roadmap's Phase 0 is more than the workspace. Its gate needs 60 verified sentences (G0.18) and one illustration through the art pipeline (G0.24). The pipeline and the board are built; the first real picture is not made yet. Also open: a GitHub remote (G0.13). The Letter slot is built (G0.25).