Compare commits

..

123 Commits

Author SHA1 Message Date
mnovak 69f8b74c9d [repo] ReleaseFirstApkKey: Merge the apk step without a keys list, so the first release passes preflight (PR #10) 2026-11-25 14:17:28 +01:00
mnovak 4cff831b76 [repo] ReleaseFirstApkKey: The apk step lists no keys, because Custos makes rosea-android only at its first signature and preflight refused the first run 2026-11-25 14:17:09 +01:00
mnovak 8d7027c563 [ui] DomiUi: Merge Rosea's buttons, town search and the licence credit on @domi/ui v1.5.0 (CPAL-1.0); the Android town field sends no Autofill request (PR #8) 2026-11-25 14:08:07 +01:00
mnovak f942d4efd8 [repo] RemoveG6.1: Merge the author's removal of the legal check of the look, and his decision to publish v0.1.0 (PR #9) 2026-11-25 11:35:07 +01:00
mnovak 82e5213b2f [repo] RemoveG6.1: The author removed the legal check of the look and decided to publish v0.1.0 (his words, 2026-11-25); the guards stay the only defence 2026-11-25 11:34:08 +01:00
mnovak a240d35ca2 [ui] DomiUi: @domi/ui v1.5.0: Move the chair is Button too (bind:element), so every button is the shared one 2026-11-23 02:50:05 +01:00
mnovak 87ca83cd1b [ui] DomiUi: @domi/ui v1.4.0: Water and Touch her are Button again (the handler fix from here), the credit is DomiCredit link={false} 2026-11-23 02:31:50 +01:00
mnovak 7f8b6861f9 [ui] DomiUi: @domi/ui v1.2.0; on Android the town field is an editable box, so focusing it sends no Autofill request (TextField as=auto) 2026-11-23 01:34:49 +01:00
mnovak 8018268821 [ui] DomiUi: Rosea's buttons and town search on @domi/ui v1.0.4 (CPAL-1.0, vendored by its own tool into packages/domi-ui), the licence credit at the foot of every screen, the README's copy line and public-domain sources; before-and-after pictures by pnpm look:shots 2026-11-23 00:59:50 +01:00
mnovak 295e6ba59a [repo] AtriumAdoption: Merge Rosea's answers to Atrium contract v0.3 §9, prepared, nothing built (PR #7) 2026-11-23 00:25:42 +01:00
mnovak 130e3a51a2 [repo] AtriumAdoption: What Atrium's Days 2-8 will ask (contract v0.3 §9) and Rosea's prepared answers: no request, no updater, no IPC, one IndexedDB, no badge 2026-11-23 00:24:33 +01:00
mnovak 7dd291d730 [repo] Licence: Merge Rosea Domi under CPAL-1.0, the README with the Exhibit B credit (PR #6) 2026-11-23 00:16:52 +01:00
mnovak 0d5124d4a1 [repo] Licence: Rosea Domi under CPAL-1.0 (LICENSE from the Domi template, every package.json and Cargo.toml), a README with the Exhibit B credit; the in-app credit proposed for the author 2026-11-23 00:14:23 +01:00
mnovak 60a9f14d2c [tauri] AtriumManifest: Merge domi-app.toml beside rosea-shell.exe for Atrium Domi, manifest only, no door (PR #5) 2026-11-22 23:26:34 +01:00
mnovak 816b47b113 [tauri] AtriumManifest: Ship domi-app.toml beside rosea-shell.exe for Atrium Domi, built from the name and version; 27 hostile fixtures refused with the parser's codes; no door, by the author's ruling 2026-11-22 23:22:15 +01:00
mnovak f4efc9e27a [repo] AtriumAdoption: Merge the plan for making Rosea Atrium-ready: inventory, R1 keep her origin, snapshot as the rosea-rose file (PR #4) 2026-11-22 21:55:40 +01:00
mnovak 4d18ea0afc [repo] AtriumAdoption: The plan for Atrium Domi: no Tauri call, one IndexedDB database, no outgoing request, accent and icon; keep her origin when hosted, snapshot as the rosea-rose file; G-F7 narrowed by Custos's Android grant 2026-11-22 21:52:34 +01:00
mnovak b3076553ef [repo] AndroidReleaseApk: Merge the phone test passed on the Wave 10 through Fabrica's queue (PR #3) 2026-11-21 10:46:20 +01:00
mnovak 0ab845dcbb [repo] AndroidReleaseApk: The phone test passed on the Wave 10 through Fabrica's queue (1 of 1), a planted fault failed as it must; Fabrica's run records ignored 2026-11-21 10:46:16 +01:00
mnovak f5d8d2c581 [repo] AndroidReleaseApk: Merge the phone target through Fabrica's queue and the release APK built and verified; rosea-android named as Custos's gap (PR #2) 2026-11-21 08:55:42 +01:00
mnovak 7cd7dda0c0 [repo] AndroidReleaseApk: The phone target through Fabrica's queue (reset uninstall, maxMinutes, the e2e pipeline's phone step), the release APK built and verified with caches on D:, rosea-android named as Custos's gap 2026-11-21 08:53:49 +01:00
mnovak 9b8eb7036d [repo] FabricaRelease: Merge Rosea released and updated through Fabrica: pipelines, the Aula page's words and pictures, the APK signed in Custos, domi-rosea:// from the installer, the phone target (PR #1) 2026-11-19 03:44:47 +01:00
mnovak 21d3cd1119 [repo] FabricaRelease: Review with every gate's counts, the numbers picture centred, handover and a lesson 2026-11-19 03:44:36 +01:00
mnovak 3a6f2ad6ee [repo] FabricaRelease: Lint the generated release notes before the page is made; fix escapes in the APK signing test 2026-11-19 02:11:31 +01:00
mnovak 0d37f91763 [repo] FabricaRelease: Rosea as a Fabrica app: the release and e2e pipelines, the Aula page's words and pictures, the version check, the APK signed in Custos, domi-rosea:// from the installer, the phone target 2026-11-19 01:38:53 +01:00
mnovak 185625e7fe [tauri] KeepHerSafeApps: Merge Keep her safe in the apps: true words, Android's own save screen, the page between the bars 2026-11-17 22:22:56 +01:00
mnovak d5f37b3149 [docs] KeepHerSafeApps: Round trip on the tablet, the page between Android's bars, review, gaps closed, lessons 2026-11-17 22:22:36 +01:00
mnovak 2eea9d67f5 [art] GardenerLayers: Merge the gardener in layered parts: a guide, 55 layer sheets, register checked on accept 2026-11-17 21:53:32 +01:00
mnovak 229cced136 [art] GardenerLayers: The gardener in layered parts, painted over one guide in register, checked on accept 2026-11-17 21:53:22 +01:00
mnovak e262b8f295 [tauri] KeepHerSafeApps: The device check reads the app's words, drives Android's save and pick screens, and waits for her before reading her numbers 2026-11-17 20:42:56 +01:00
mnovak 3c4463dbdd [tauri] KeepHerSafeApps: App words for Keep her safe, and Android's own save screen through a narrow bridge 2026-11-17 20:31:35 +01:00
mnovak 0b72ae05a2 [ui] PlanetGarden: Merge her round planet, the gardener the player chooses, and care by gesture 2026-11-17 20:01:38 +01:00
mnovak d1b7ae4376 [docs] PlanetGarden: Gates on the merged tree 2026-11-17 20:01:34 +01:00
mnovak 0979a6c894 [ui] PlanetGarden: Bring main (four versions through Tauri) into the branch; the app check passes the gardener and opens the ring 2026-11-17 19:57:17 +01:00
mnovak f0cb6750c4 [ui] PlanetGarden: Analysis, review, lessons and the tablet smoke that always stops Chrome 2026-11-17 19:56:24 +01:00
mnovak 3a2ebbd9dc [tauri] TauriPlatforms: Merge four versions from one codebase: the PWA, and Android, iOS and desktop apps through a Tauri 2 shell 2026-11-17 19:24:06 +01:00
mnovak 2c3a71c12d [docs] TauriPlatforms: Gates on the merged tree, where IndexedDB lives on Android, handover 2026-11-17 19:23:46 +01:00
mnovak 1ff00b0e3f [art] PlanetGarden: Her planet and the gardener on the board; the author's S2 and S6 recorded with their guards 2026-11-17 19:18:38 +01:00
mnovak 52d8c0bfd1 [app] PlanetGarden: e2e passes the gardener question, opens the ring, and pours by tilting the can 2026-11-17 19:15:24 +01:00
mnovak 5576af4fac [ui] PlanetGarden: Her round planet, the player's gardener, the ring of care, and care by gesture 2026-11-17 19:07:57 +01:00
mnovak 08c188ccee [tauri] TauriPlatforms: Bring main (the sunrise, Coyhaique) into the branch
# Conflicts:
#	.agents/GAP_ANALYSIS.md
#	.agents/lessons/README.md
#	.agents/lessons/technical.md
2026-11-17 19:02:29 +01:00
mnovak b2b50efd90 [docs] TauriPlatforms: Review, measurements on the tablet and Windows, lessons, gaps 2026-11-17 19:02:04 +01:00
mnovak 9eef8a3bf7 [schema] PlanetGarden: The gardener's look, from fixed lists, kept on the device 2026-11-17 18:57:34 +01:00
mnovak f0767bfed7 [engine] PlanetGarden: How many weeds and petals a day shows; the gesture recognisers 2026-11-17 18:57:32 +01:00
mnovak 9e3d389f82 [tauri] TauriPlatforms: Read the built APK's own values, carry Rosea's launcher icon into gen/android, survive a dropped USB link 2026-11-17 18:57:14 +01:00
mnovak 938f6ccdeb [ui] TapHighlight: No browser tap box behind a touched control 2026-11-17 18:53:45 +01:00
mnovak 0b64c43d4a [ui] Sunrise: Merge the sunrise in the garden 2026-11-17 18:53:01 +01:00
mnovak 132ba05fe9 [docs] Sunrise: Analysis, review, and G1.10 closed 2026-11-17 18:52:59 +01:00
mnovak 0c4f5bb556 [ui] Sunrise: The garden names the real sunrise from sunset until it comes 2026-11-17 18:52:56 +01:00
mnovak e0a3b66dc8 [content] Coyhaique: Merge the town list fix for Chile's clocks 2026-11-17 18:49:28 +01:00
mnovak 103283daaa [docs] Coyhaique: Review, lesson, and the Node gap narrowed 2026-11-17 18:49:28 +01:00
mnovak 96ac78d079 [build] Coyhaique: Never lint other sessions' worktrees or Rust build output 2026-11-17 18:49:27 +01:00
mnovak c2320a4517 [content] Coyhaique: Trust only a country's own zones, and give southern Chile its own clocks 2026-11-17 18:49:27 +01:00
mnovak a93ef09956 [tauri] TauriPlatforms: The shell around the built game, the Android privacy patch, the shell build of the game, and the device check 2026-11-17 18:45:37 +01:00
mnovak 3f95a1b37d [docs] TauriPlatforms: Four versions from one codebase on Tauri 2: CLAUDE.md, the roadmap's platform track, the analysis 2026-11-17 18:45:36 +01:00
mnovak 22f55dc9fa [art] BoardV2: Merge better prompts and every picture Phases 1-5 need 2026-11-07 15:40:52 +01:00
mnovak 96c0a2b00e [docs] BoardV2: Review, lesson, and the art gap updated 2026-11-07 15:40:51 +01:00
mnovak d968998f23 [art] BoardV2: Every picture Phases 1-5 need: 86 pictures, each with a stand-in 2026-11-07 15:38:35 +01:00
mnovak 5f2a5f3cfc [art] BoardV2: Prompts lead with the look, say the grid in words, and stop naming the book's motifs 2026-11-07 15:38:30 +01:00
mnovak e415d1ed29 [storage] TwoTabs: Merge two tabs, one garden 2026-11-07 15:07:43 +01:00
mnovak 8c19459bb6 [docs] TwoTabs: Analysis, review, the trap measured, G1.8 closed 2026-11-07 15:07:33 +01:00
mnovak b67fa3603d [ui] TwoTabs: The rose and the garden read again when another tab wrote, keeping their own 2026-11-07 15:06:44 +01:00
mnovak 102ac44675 [storage] TwoTabs: Announce each write to the other tabs after it commits 2026-11-07 15:06:43 +01:00
mnovak 0861125472 [ui] Thorns: Merge touching her gently 2026-11-02 09:33:58 +01:00
mnovak 87375c72d4 [docs] Thorns: Analysis, review, and G1.7 closed 2026-11-02 09:33:57 +01:00
mnovak 1070017d2c [ui] Thorns: Touch her over her picture; Gently. I have thorns. 2026-11-02 09:33:23 +01:00
mnovak ae1169ed6a [engine] Thorns: A touch is answered fondly; a rush brings her thorns, never a tremor 2026-11-02 09:33:22 +01:00
mnovak 03d41aa893 [ui] DaySentence: Merge the rose's folded petal and the sentence candidates 2026-11-02 09:04:13 +01:00
mnovak 838830e0ef [docs] DaySentence: Analysis, review, lessons, and G1.5 closed for the code 2026-11-02 09:03:56 +01:00
mnovak 781a2407b9 [content] DaySentence: 78 candidate sentences, copied from public-domain editions, for the author to verify 2026-11-02 09:01:53 +01:00
mnovak 1e647985ea [build] DaySentence: The build's cache key includes ROSEA_BASE and ROSEA_LIBRARY_DIR 2026-11-02 08:57:54 +01:00
mnovak 03dc69702a [ui] DaySentence: Her folded petal, the words and their source; the library bundled after validation 2026-11-02 08:55:06 +01:00
mnovak 5934523e45 [content] DaySentence: Candidates held to every rule; library:verify for the author 2026-11-02 08:55:06 +01:00
mnovak cdbaf56195 [storage] DaySentence: Opened petals in the log; the rose file carries them as version 2 2026-11-02 08:55:05 +01:00
mnovak 636c0bcbc0 [engine] DaySentence: The folded petal waits until opened, one a day, never lost 2026-11-02 08:55:05 +01:00
mnovak ad41c58730 [schema] DaySentence: The sentence-opened event, an id and never text 2026-11-02 08:55:04 +01:00
mnovak 9c7f67a1f0 [ui] ChairSunset: Merge the in-game sunset 2026-11-02 07:35:32 +01:00
mnovak 12fc4bd249 [docs] ChairSunset: Analysis, review, and G1.6 closed 2026-11-02 07:35:31 +01:00
mnovak 8e286b2bf6 [app] ChairSunset: e2e watches the in-game sunset; the offline suite watches one with the server gone 2026-11-02 07:35:31 +01:00
mnovak 7a6cf4c6d1 [ui] ChairSunset: Move the chair, half a minute of sunset with nothing to press, then the real one's time 2026-11-02 07:35:30 +01:00
mnovak a99dfe535d [app] CalmRefresh: Merge the calm refresh 2026-11-02 01:18:11 +01:00
mnovak ff3a996482 [docs] CalmRefresh: Analysis, review, and G0.10 closed 2026-11-02 01:18:10 +01:00
mnovak a5480d2877 [app] CalmRefresh: Register the worker in the app and offer the waiting version; e2e publishes a real second one 2026-11-02 01:18:09 +01:00
mnovak beea8eaa10 [ui] CalmRefresh: One quiet line and Refresh when a new version of the garden is waiting 2026-11-02 01:18:08 +01:00
mnovak 8c84cbbb52 [tools] CpuGuard: Merge the CPU guard 2026-11-02 00:51:47 +01:00
mnovak 8ee3e1ce28 [docs] CpuGuard: Record the guard in CLAUDE.md 5.7, its review, and G0.28 closed 2026-11-02 00:51:46 +01:00
mnovak f9883e22ba [tools] CpuGuard: Full test runs wait for, then refuse, a machine above 80 % CPU 2026-11-02 00:51:45 +01:00
mnovak 8b1c2eaee2 [app] KeepSafe: Merge keeping the rose safe 2026-11-02 00:44:28 +01:00
mnovak 55fc14b125 [docs] KeepSafe: Analysis, review, lessons, and G0.11 closed 2026-11-02 00:44:24 +01:00
mnovak e63563755b [app] KeepSafe: Wire persist, the file download and import; e2e restores her on a fresh profile 2026-11-02 00:44:22 +01:00
mnovak 512c300973 [ui] KeepSafe: Say what the browser promised, ask it to keep her, save her to a file, bring her back 2026-11-02 00:44:20 +01:00
mnovak a63232e8d7 [storage] RoseFile: Save the rose's keys and care to a file and bring them back additively; never the town or the private key 2026-11-02 00:44:18 +01:00
mnovak cc9cc11b0b [engine] Rose: Name a rose by her current and past keys, replay each key on its own, and add each act once 2026-11-02 00:44:16 +01:00
mnovak a7d0fca31a [app] Rose: Merge the rose and her care 2026-11-02 00:21:01 +01:00
mnovak aa1e8b6f66 [docs] Rose: Analysis, review, lesson, and G1.4 closed 2026-11-02 00:21:00 +01:00
mnovak 21f4496910 [app] Rose: Wire identity and the care log into the garden; e2e and offline tend the rose 2026-11-02 00:20:59 +01:00
mnovak 6a3ca84aaa [ui] Rose: The rose with her face and words, water by holding, care when needed, her numbers on request 2026-11-02 00:20:59 +01:00
mnovak 2b5cd719c1 [storage] CareLog: Append-only care events and the kept identity, checked against the contract 2026-11-02 00:20:58 +01:00
mnovak d091c31b49 [identity] Keypair: Make the player's ECDSA P-256 key on the device, private key non-extractable 2026-11-02 00:20:57 +01:00
mnovak 6fee00f5b3 [engine] Rose: Replay the care log into growth from days of care, drift, moods, needs and numbers 2026-11-02 00:20:57 +01:00
mnovak b150c64af7 [schema] CareEvent: Water carries the amount poured, so watering by feel can be replayed 2026-11-02 00:20:56 +01:00
mnovak 5e41a449a4 [app] SunsetPlace: Merge choosing where the sunset is 2026-11-02 00:01:53 +01:00
mnovak 6d29e4a4c9 [docs] SunsetPlace: Analysis, review, lessons, and G1.2 closed 2026-11-02 00:01:53 +01:00
mnovak 85df2c43b5 [app] SunsetPlace: Wire the town list, the guess and storage into the garden; e2e and offline cover it 2026-11-02 00:01:52 +01:00
mnovak 77a865f625 [ui] SunsetPlace: Ask where the sunset is, and say when tonight's sunset is 2026-11-02 00:01:51 +01:00
mnovak 3ed91eea7b [storage] Profile: Keep the sunset place in IndexedDB, written as a plain checked copy 2026-11-02 00:01:50 +01:00
mnovak 1e8d1cda5a [engine] Sun: nextInvitation checks yesterday, today and tomorrow; addDays steps the calendar; NamedPlace 2026-11-02 00:01:50 +01:00
mnovak fb7171c3a7 [content] Places: 7,342 public-domain towns searched on the device, and a sunset guess for every time zone a browser reports 2026-11-02 00:01:49 +01:00
mnovak 2b216855fc [docs] Q10: Merge the polar-night invitation decision 2026-11-01 23:28:06 +01:00
mnovak e8b7bdfebf [docs] Q10: Record the author's answer: in polar night the invitation comes at noon twilight 2026-11-01 23:28:06 +01:00
mnovak 84dc67076a [engine] Sun: Merge the sun module 2026-11-01 23:18:27 +01:00
mnovak abc5a5c3a8 [docs] Sun: Record the sun's review, Phase 1 gaps, Q10, and the polar and DST traps as measured 2026-11-01 23:18:26 +01:00
mnovak 08bc8b58fa [engine] Sun: Export sunDay and invitation from the engine 2026-11-01 23:18:26 +01:00
mnovak 793bcd7701 [engine] Sun: Compute sunrise, solar noon and sunset on the device, with polar day and night, checked against published tables 2026-11-01 23:18:25 +01:00
mnovak 2962b13696 [art-prep] FoxCoat: Merge the approved fox look 2026-11-01 22:58:50 +01:00
mnovak 118ad5a2d4 [art-prep] FoxCoat: Approve the fox's look with a deep red-orange coat instead of muted russet 2026-11-01 22:58:40 +01:00
mnovak 1f60ddd17a [art-prep] Phase2Pictures: Merge the Phase 2-3 pictures into the art board 2026-11-01 21:55:26 +01:00
mnovak ff9d7f0514 [docs] Phase2Pictures: Record the Phase 2-3 pictures, their review and the fox's draft look 2026-11-01 21:55:21 +01:00
mnovak a5dbd5251b [art-prep] Phase2Pictures: Add the fox, berries, bush, paths and lanterns to the art board, each card marked with its phase 2026-11-01 21:55:04 +01:00
mnovak 846d082003 [docs] ArtStyle: Merge the approved art style and the purity-lint warm-up 2026-11-01 21:31:38 +01:00
mnovak e0cbfc466a [engine] PurityLint: Load ESLint once in beforeAll so a cold start under load cannot time out the first case 2026-11-01 21:31:34 +01:00
mnovak 23e950c372 [docs] ArtStyle: Record Mark's approval of STYLE.md, S1-S5 kept as drafted 2026-11-01 21:31:28 +01:00
mnovak de2a999382 [art-prep] ArtBoard: Merge the art pipeline and the art board
docs/ART.md, a draft art/STYLE.md, the Phase 1 manifest, 29 stand-ins and
tools/art-prep. The board is a private claude.ai page. The app is unchanged.
Reviewed in .agents/reviews/feature-art-board.md.
2026-11-01 20:17:12 +01:00
469 changed files with 36002 additions and 472 deletions
+19 -1
View File
@@ -5,7 +5,25 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
| Feature | Phase | Status | Analysis | Review |
|:--|:--|:--|:--|:--|
| Released through Fabrica: `.fabrica/` (app, release and e2e pipelines, tests, Aula pictures), the Aula page's words, the version check, the APK signed in Custos, `domi-rosea://open` from the installer, the showcase pictures on demo data, the phone target | Platform track | Merged to `main` (9b8eb70). Not published: the first release waits for the author (G-F1, G6.1) | [fabrica-release.md](features/fabrica-release.md) | [feature-fabrica-release.md](reviews/feature-fabrica-release.md) |
| @domi/ui: the shared buttons and the town search field, vendored v1.5.0 (CPAL-1.0); the licence credit at the foot of every screen | Platform track | Built on `feature/domi-ui`; the look is Mark's to judge from the pictures | [domi-ui.md](features/domi-ui.md) | [feature-domi-ui.md](reviews/feature-domi-ui.md) |
| Atrium Domi adoption: the inventory (Tauri calls, data, network, accent, icon) and the plan for steps 1–8 of Atrium's Appendix A | Platform track | Plan merged (f4efc9e); step 1 = `domi-app.toml` alone (`feature/atrium-door`), the door skipped by Mark's ruling | [atrium-adoption.md](features/atrium-adoption.md) | [docs-atrium-adoption.md](reviews/docs-atrium-adoption.md), [feature-atrium-door.md](reviews/feature-atrium-door.md) |
| The APK for a release, tested on the Wave 10 through the phone queue: `reset: uninstall`, `maxMinutes`, the e2e pipeline's `phone` step, the release APK built and verified | Platform track | Merged (f5d8d2c); the phone test passed on the Wave 10 through the queue, 1 of 1 (2026-11-21). Blocked: `rosea-android` does not exist (G-F7); publication (G-F1) | [android-release-apk.md](features/android-release-apk.md) | [feature-android-release-apk.md](reviews/feature-android-release-apk.md) |
| Keep her safe in the apps: true words, Android's own save screen, the page kept between the system bars | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. Closes G-T4 and, on Android, G-T5 | [keep-her-safe-apps.md](features/keep-her-safe-apps.md) | [feature-keep-her-safe-apps.md](reviews/feature-keep-her-safe-apps.md) |
| Four versions, one garden: the Tauri 2 shell (`apps/rosea-tauri`) for Android, iOS and desktop beside the PWA; a Windows build and an Android debug APK run on the tablet | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. iOS needs a Mac (G-T1); *Keep her safe* in the apps is a release blocker (G-T4) | [tauri-platforms.md](features/tauri-platforms.md) | [feature-tauri-platforms.md](reviews/feature-tauri-platforms.md) |
| 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) |
| The art pipeline and the art board: STYLE.md draft, Phase 1 manifest, 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) |
| The sunrise: the line names the real sunrise from sunset until it comes | 1 | Merged to `main`; built, not deployed | [sunrise.md](features/sunrise.md) | [feature-sunrise.md](reviews/feature-sunrise.md) |
| Two tabs, one garden: what one tab writes, the others see | 1 | Merged to `main`; built, not deployed | [two-tabs.md](features/two-tabs.md) | [fix-two-tabs.md](reviews/fix-two-tabs.md) |
| Thorns: touch her; a rush of taps, and she says she has thorns | 1 | Merged to `main`; built, not deployed | [thorns.md](features/thorns.md) | [feature-thorns.md](reviews/feature-thorns.md) |
| The day's sentence: her folded petal, one a day, never lost, best at sunset; candidates and `library:verify` | 1 | Merged to `main`; built, not deployed. Invisible until the author verifies sentences | [day-sentence.md](features/day-sentence.md) | [feature-day-sentence.md](reviews/feature-day-sentence.md) |
| The in-game sunset: move the chair, half a minute of silence, then the real sunset's time | 1 | Merged to `main`; built, not deployed | [chair-sunset.md](features/chair-sunset.md) | [feature-chair-sunset.md](reviews/feature-chair-sunset.md) |
| A calm refresh: a waiting new version is offered in one line, never swapped in by itself | 0 | Merged to `main`; built, not deployed | [calm-refresh.md](features/calm-refresh.md) | [feature-calm-refresh.md](reviews/feature-calm-refresh.md) |
| The CPU guard: full runs wait for, then refuse, a busy machine | 0 | Merged to `main` | — | [fix-cpu-guard.md](reviews/fix-cpu-guard.md) |
| Keep her safe: the browser's promise, save her to a file, bring her back | 0–1 | Merged to `main`; built, not deployed | [keep-her-safe.md](features/keep-her-safe.md) | [feature-keep-her-safe.md](reviews/feature-keep-her-safe.md) |
| The rose: care by feel, growth from days of care, drift, moods, her numbers; the care log and the identity | 1 | Merged to `main`; built, not deployed. Tuning is the author's | [rose.md](features/rose.md) | [feature-rose-care.md](reviews/feature-rose-care.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) |
| Her planet and the gardener: a round tiny planet, a boy or girl chosen at the first open, the ring of care by a tap on her, care by gesture (tilt the can, swipe weeds up, sweep petals, drag the windbreak, stroke her); every gesture also a button | 1 | Merged to `main`; built, not deployed. Code stand-ins; the painted art waits on the board | [planet-garden.md](features/planet-garden.md) | [feature-planet-garden.md](reviews/feature-planet-garden.md) |
| The art pipeline and the art board: STYLE.md (S1–S6 and the fox's F1–F4 approved), the manifest (Phases 1–5: 95 cards, 538 pictures, of them 55 gardener layer sheets), 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), [art-board-v2.md](reviews/art-board-v2.md), [art-gardener-layers.md](reviews/art-gardener-layers.md) |
+74 -9
View File
@@ -26,25 +26,89 @@ board exist, and the first real picture is the author's to make.
| ~~G0.7~~ | ~~No commit guards~~ | Closed 2026-11-01. `pre-commit` blocked a 5.7 MB probe; `commit-msg` blocked a `Co-Authored-By: Claude` trailer; both passed clean input. |
| ~~G0.8~~ | ~~Never tested under the Pages sub-path~~ | Closed for the local build 2026-11-01. `shell.spec.ts` serves `dist/` at `/Rosea/` and asserts manifest scope = start_url = SW scope. Mutation: scope `/` fails it. **On real GitHub Pages: still predicted** (G0.13). |
| ~~G0.9~~ | ~~No proof the app opens offline~~ | Closed for the shell 2026-11-01. `offline.spec.ts` closes the server, then reload, cold start and a deep link all render. Mutations: `clientsClaim: false` and no `navigateFallback` both fail it. |
| G0.10 | No calm *refresh* control for a waiting service worker (CLAUDE.md §8, stale SW) | Open. `registerType: 'prompt'` and `skipWaiting: false` are set, so a new worker waits. Nothing tells the player yet. |
| G0.11 | IndexedDB eviction: no `navigator.storage.persist()`, no export-my-rose (§8) | Open. Arrives with `packages/storage`. |
| 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.10~~ | ~~No calm *refresh* control for a waiting service worker (CLAUDE.md §8, stale SW)~~ | Closed 2026-11-02 on `feature/calm-refresh`: the app registers the worker and shows *A new version of the garden is ready.* with *Refresh*. e2e publishes a real second version: offered, not swapped, then taken over on Refresh; 3 of 3 put-back bugs caught. |
| ~~G0.11~~ | ~~IndexedDB eviction: no `navigator.storage.persist()`, no export-my-rose (§8)~~ | Closed 2026-11-02 on `feature/keep-her-safe`: *Keep her safe* asks the browser (and an installed app asks by itself), saves her to a file without the town or the private key, and brings her back additively on any device. e2e: saved on one browser profile, restored on a fresh one, survives a reload. Not seen in Firefox or Safari. |
| G0.12 | The app cannot validate content in the browser | Narrowed 2026-11-02 (day-sentence.md P5): the library is bundled at build time, after `validate:library` passes, so the app never validates it. Reopens only if content is ever fetched at runtime; then it needs standalone pre-compiled validators (Ajv compiles with `new Function`, which the CSP forbids). |
| 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: `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 and the rose (`profile`, `events`, `keys`); `identity` with the rose (a keypair, nothing signed yet). |
| 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). |
| 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). Since 2026-11-02 candidates wait in `content/candidates/`, each with where to read it; the author verifies with `pnpm library:verify <id…> --by <name>` (day-sentence.md P8). |
| G0.19 | Event kinds other than `care` | Open. GAMEPLAY.md now exists; each kind arrives with the feature doc that uses it, starting in Phase 1. |
| G0.20 | Node 22.11 on the dev machine is below what some pinned dependencies declare | Open. All gates pass on 22.11 today. Upgrade to ≥ 22.13 and unpin (D11). |
| G0.21 | No PNG icons | Open (predicted trap). iOS ignores SVG for `apple-touch-icon`. Comes through the art pipeline. |
| G0.22 | No CI | Open. Every gate ran on this machine only. With G0.13. |
| G0.20 | Node 22.11 on the dev machine is below what some pinned dependencies declare | Narrowed 2026-11-17: the machine runs **Node 22.23.4** (upgraded by the author). Its newer time zone data exposed a stale town list, fixed on `fix/coyhaique` (Santiago had been on a southern zone's clock since the first build). **Still open:** unpin the dependencies pinned for 22.11 (D11), in their own commit. |
| G0.21 | No PNG icons | Open (predicted trap). iOS ignores SVG for `apple-touch-icon`. Comes through the art pipeline. Narrowed 2026-11-17: the apps make PNG/ICO icons from `icon.svg` at build time (`tauri icon`, never committed); the PWA still has none, and the picture is still the placeholder. |
| G0.22 | No CI | Open. Every gate ran on this machine only. With G0.13. Since 2026-11-17 the APK and the Windows installer are also built by hand here (G-T7). |
| G0.23 | Source maps are built and would be published | Open. `sourcemap: true`; maps are not precached. Decide with G0.13 whether the repository is public. If not, use `'hidden'`. |
| G0.24 | No art pipeline: `docs/ART.md`, `art/STYLE.md` (drafted with the author), `art/manifest.json` for Phase 1 assets, SVG placeholders, `tools/art-prep` | **Pipeline built 2026-11-01** (`feature/art-board`): docs/ART.md, the Phase 1 manifest (25 pictures), 29 generated stand-ins, `tools/art-prep` (50 tests; 5 of 5 put-back bugs caught), the art board published. **Still open:** STYLE.md is Claude's draft waiting for the author (S1–S5), and the **Phase 0 gate**, one real picture through every step into `art/final/`. |
| G0.24 | No art pipeline: `docs/ART.md`, `art/STYLE.md` (drafted with the author), `art/manifest.json` for Phase 1 assets, SVG placeholders, `tools/art-prep` | **Pipeline built 2026-11-01** (`feature/art-board`): docs/ART.md, the Phase 1 manifest (25 pictures), 29 generated stand-ins, `tools/art-prep` (50 tests; 5 of 5 put-back bugs caught), the art board published. STYLE.md approved by the author 2026-11-01 (S1–S5 kept as drafted; `docs/style-approved`). The board grew to 53 pictures with Phases 2–3 (`art/phase2-3-pictures`); the fox's look F1–F4 approved with a deep red-orange coat (`art/fox-coat`). 2026-11-07, `art/board-v2`: the first `rose-sheet` came out as watercolour with a smiley on a ball; STYLE.md §1 and every prompt rewritten (look first, face on the petals, no pixel numbers, the book's motifs checked in review, not named), and the board grew to 86 pictures for Phases 1–5 (board version 4). 2026-11-17, `art/gardener-layers`: the gardener the player dresses is drawn in layered parts (the author's answer): a guide and 55 layer sheets, register checked by `art:accept`, 10 of 10 put-back bugs caught; the board has 95 cards and 538 pictures. **Still open:** the **Phase 0 gate**, one real picture through every step into `art/final/`. |
| ~~G0.25~~ | ~~No slot for *A Letter from the Gardener*~~ | Closed 2026-11-01, merged to `main`. `docs/LETTER.md` holds slots as comments only; the page opens at `#letter` once it has words. 16 ui tests, and e2e on both the empty and a temporary written letter. Mutations caught: the link while empty, any link scheme, focus not moving, *heal* in the letter. |
| ~~G0.28~~ | ~~CLAUDE.md §5.7's CPU limit was only read, and broken three times on 2026-11-02~~ | Closed 2026-11-02 on `fix/cpu-guard`: `pnpm guard:cpu` runs before every full run, waits up to 3 min, then refuses. 13 tests; seen waiting 51 s on a busy machine, refusing, and stopping `pnpm test` before any test ran. |
| G0.27 | The quiet door to real help has no numbers (§5.6 rule 5) | Open. The slot is in `docs/LETTER.md`. Support lines are real-world facts the author must verify, per country, so the door exists only once the letter does. |
| ~~G0.26~~ | ~~Not decided: how the sunset invitation reaches the player on the web~~ | Closed 2026-11-01 by the author (Q6): in-app only on the web, no push server; local notifications through the Tauri shell in Phase 6. Recorded in ROADMAP Phase 0 and CLAUDE.md §8. |
## Phase 1 — The rose alone
**Started 2026-11-01** with the sun, while the Phase 0 gate waits on the author (pictures,
sentences). Phase 1 is built in code, not deployed (no host yet, G0.13).
| 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~~ | 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.4~~ | ~~No rose~~ | Closed 2026-11-02 on `feature/rose-care`: care with a touch of skill (water by holding, shade, weeds, petals), growth from days of care, drift, moods, her numbers; the care log in IndexedDB, replayed by the engine. Tuning R2/R4/R5/R6 is the author's. 7 of 7 put-back bugs caught after two test holes were closed. |
| ~~G1.5~~ | ~~The day's sentence and the folded petal~~ | Closed 2026-11-02 on `feature/day-sentence`, for the code: `engine/petal` (5 properties: never lost, verified-later never swaps it, one a day, no repeat until all opened), the `sentence-opened` event, the rose file v2, the petal in the garden; e2e opens one in a fixture build and reloads. 9 of 9 put-back bugs caught. **The shipped app shows no petal until the author verifies sentences (G0.18).** |
| ~~G1.6~~ | ~~The in-game sunset: move the chair, watch it again~~ | Closed 2026-11-02 on `feature/chair-sunset`: half a minute with nothing to press, then the real sunset's time; Escape and a tap leave; the offline suite watches one with the server gone. 4 of 4 put-back bugs caught. |
| ~~G1.7~~ | ~~Thorns were on the roadmap but undesigned~~ | Closed 2026-11-02 on `feature/thorns`, as the author chose: thorns teach gentleness. `engine/touch` (2 properties: spaced taps are never a rush; one blush a visit); a tremor is one touch; nothing recorded. 6 of 6 put-back bugs caught. |
| ~~G1.8~~ | ~~Two tabs (CLAUDE.md §8, predicted)~~ | Closed 2026-11-07 on `fix/two-tabs`. Measured first: two e2e tests failed (an open tab saw neither care nor a town from the other). Storage announces committed writes on a `BroadcastChannel`; the rose and the garden read again, adding to what they show. No lock needed: nothing stored drifts. 7 of 7 put-back bugs caught. |
| ~~G1.10~~ | ~~The garden named only the sunset, never the sunrise (ROADMAP Phase 1: *sunset and sunrise*)~~ | Closed 2026-11-17 on `feature/sunrise`: from sunset until it comes, the line names the real sunrise; the in-game sunset still names the sunset. engine `nextSunEvent` with a 300-run property; e2e at 05:00 in Brno; seen on a real Android tablet. 5 of 5 put-back bugs caught. |
| ~~G1.9~~ | ~~The garden was a page of buttons, not a game (the author, 2026-11-17)~~ | Closed 2026-11-17 on `feature/planet-garden`: her round planet, a gardener the player chooses at the first open (fixed lists, kept in `profile`, never in the rose file), the ring of care by a tap on her, care by gesture with a button for each. 84 ui tests incl. 7 on the planet and 7 on gestures; e2e `planet.spec.ts` 3; 9 of 9 put-back bugs caught (2 only after tests were added); 7 of 7 by real touch on the Android tablet. **Open in it:** painted art for the planet and the gardener, and how customised looks are drawn (STYLE.md §3b, the author's). |
| G1.11 | The app does not stack painted gardener layers | Open. Decided 2026-11-17 (STYLE.md §3b): the scene stacks body, clothes, apron, hair and hat from `art/final/`, in the look the player chose, and keeps its code drawing for any look whose layers are not all accepted. Comes with the first accepted layers; needs a size budget for 55 sheets (docs/ART.md §4: 440 cells would not all be precached). |
| G1.3 | Towns have no Czech names (*Vídeň*) | Open. Natural Earth has none; arrives with Czech copy. |
## The platform track — four versions (from 2026-11-17)
Decided by the author 2026-11-17: the PWA, an Android APK, an iOS app and a desktop app from one
Svelte codebase, the apps through a Tauri 2 shell. Analysis:
[`features/tauri-platforms.md`](features/tauri-platforms.md); review:
[`reviews/feature-tauri-platforms.md`](reviews/feature-tauri-platforms.md).
| Id | Gap | Status / evidence |
|:--|:--|:--|
| ~~G-T0~~ | ~~No shell, no app on any platform~~ | Closed 2026-11-17 on `feature/tauri-platforms`: `apps/rosea-tauri`; Windows `.exe` + NSIS installer built and checked (watered, closed, reopened, still watered); Android debug APK verified with `aapt2` (no permission, no backup) and checked on the WAVE 10C, Android 16, offline by construction. 40 shell tests; 14 of 14 drills caught. |
| G-T1 | iOS | Open. Needs macOS + Xcode, the iOS Rust targets, an Apple developer account. `pnpm tauri:ios` refuses elsewhere. |
| G-T2 | macOS and Linux desktop builds | Open. Each on its own system; macOS signing/notarisation. |
| G-T3 | Release signing (Android keystore, Windows certificate); AAB; stores | Narrowed 2026-11-19 on `feature/fabrica-release`: the release pipeline signs the installer with Custos's `domi-code-signing` and the APK with `rosea-android` through `custos-sign`; no key in the repository (`fabrica-release.md` F4). **Still open:** `rosea-android` does not exist and Custos (0.22.0 here, 0.24.0 too) will not make it: it is not in Custos's `ANDROID_APPS` (`android-release-apk.md` A6, G-F7); no signature made yet (the first release waits, G-F1); AAB and stores (Phase 6). |
| ~~G-T4~~ | ~~Keep her safe inside the apps — release blocker~~ | Closed 2026-11-17 on `feature/keep-her-safe-apps`: the apps say *She lives in this app, on this device, until the app is removed…* and ask no browser; Android saves through its own save screen by a narrow Kotlin bridge (no plugin, no IPC, no permission) and says *She is in that file now.*; Windows downloads. Seen on the tablet (2 of 2) and on Windows (3 of 3); 572 unit tests; every drill caught after one test was tightened. |
| ~~G-T5~~ | ~~Bringing her back from a file inside the apps~~ | Closed on Android 2026-11-17: the round trip on the tablet, *Everything in that file is already here.* Windows not driven. |
| G-T6 | WebView2's own traffic not measured for Rosea | Open. Flags from Amicitia's measurement are set; measure before a desktop release. |
| G-T7 | No CI for the apps | Narrowed 2026-11-19 on `feature/fabrica-release`: `.fabrica/artifex/release.yaml` builds both apps from a tag on Fabrica's Windows runner after every gate; `.fabrica/artifex/e2e.yaml` runs the web suite on the e2e runner. Still Mark's PC, and no run on a push yet (no webhook reaches the hub). |
| G-T8 | Webview storage eviction | Partly measured: `persist()` is `false` in WebView2 and Android WebView. Pressure eviction of app storage not measured. G-T4 is the answer either way. |
| G-T9 | The app icon is the placeholder | Open. With G0.21. |
## Fabrica — released and updated through Fabrica (`fabrica-release.md`)
| Id | Gap | Status / evidence |
|:--|:--|:--|
| G-F1 | The first release is not published | **Decided by the author, 2026-11-25: publish** ("Yes, remove G6.1 from Rosea's CLAUDE.md and release Rosea v0.1.0, desktop and APK."). v0.1.0, desktop and APK, through Fabrica; closed when the hub's run publishes it. |
| G-F2 | Canalis Part B: no capability is served | Open by decision (F6): no capability found that neither writes into her nor reads her; Canalis keys need Custos, which a player does not have. |
| G-F3 | No showcase videos | Open: Pensum `kkpy69`, once Fabrica docs/37 is on `main`. |
| G-F4 | `domi-rosea://` not seen working | Open: the hook is tested as text; no installer was run on this PC (it writes the real registry). |
| ~~G-F5~~ | ~~The `phone` target has not run~~ | **Closed 2026-11-21:** `fabrica tests run --target phone` through the hub's queue, run `20261121-101158-uckm` 1 passed 0 failed on the Wave 10 (debug APK `bd59ff908125…`, commit f5d8d2c); the planted-fault drill `20261121-102500-crkf` failed as it must. The e2e pipeline's `phone` step still waits for the hub's e2e runner (Mark). Earlier: narrowed 2026-11-21 (`android-release-apk.md`): `reset: uninstall`, `maxMinutes: 20`, and the e2e pipeline's `phone` step (`device: Wave 10`) puts it in the hub's queue. **Still open:** the Wave 10 is not paired in Fabrica (`fabrica devices list`: *connected (not paired in Fabrica)*), so the step cannot get its phone; pairing is the Fabrica session's. |
| G-F7 | No key signs the APK | Open (`android-release-apk.md` A6): `rosea-android` is not in Custos's `ANDROID_APPS`, so the release's `apk` step stops at `no_key`. Custos's change (or Mark's *Create Android key*), then the release. The unsigned release APK builds and verifies. **Narrowed 2026-11-22:** Custos 0.25.0's table still has no Rosea row. Its *Android grant* makes the key on a release's first signature, from the repo's own `release` pipeline (signing.rs test `the_android_grant_makes_an_apps_key…`). Per the Aula session, Custos 0.25.2 is installed and Mark gave the grant for `mnovak/*`. This is unverified until the first signature. |
| G-F6 | PWA updates have no host | Open with G0.13: the service worker and *Refresh* are built; nothing serves the PWA. |
## Atrium Domi — adoption (`atrium-adoption.md`)
| Id | Gap | Status / evidence |
|:--|:--|:--|
| G-AT1 | Rosea is not Atrium-ready (manifest, service door, hosted mode, backup snapshot, audit, export) | **Narrowed 2026-11-22** (`feature/atrium-door`): step 1 is the `domi-app.toml` alone (contract v0.1 §8 3e), and Atrium's own parser accepts it; 27 hostile fixtures are refused with the parser's codes. The door is skipped by Mark's ruling (manifest only, no rule changes). Earlier: open, **plan only** (2026-11-22). Inventory: no Tauri invoke or listen, one database (`rosea` IndexedDB), no outgoing request. Step 1 waits for Atrium's `APP_CONTRACT.md` v0, and the later steps wait for their Atrium Day. R1 (keep the origin) and R4 (Rust in the shell) are Mark's. |
## Phase 6 — Release
| Id | Gap | Status / evidence |
|:--|:--|:--|
| ~~G6.1~~ | ~~A legal check of the look: a child on a small round planet with a rose is the book's best-known image, and its estate holds trademarks~~ | **Removed by the author, 2026-11-25, without a check.** His words, typed in Rosea's own session: "Yes, remove G6.1 from Rosea's CLAUDE.md and release Rosea v0.1.0, desktop and APK." CLAUDE.md §8 says so on `docs/remove-g6-1`. The risk stays his, accepted on 2026-11-17; the guards (STYLE.md S2, S6, §3b, review points 10–11) are now the only defence. |
## Design questions — answered
Raised by GAMEPLAY.md and ROADMAP.md, answered by the author 2026-11-01. Details in
@@ -60,4 +124,5 @@ Raised by GAMEPLAY.md and ROADMAP.md, answered by the author 2026-11-01. Details
| ~~Q6~~ | When the notification decision is due | Phase 0, in-app only (G0.26) |
| ~~Q7~~ | Which phase holds the Amicitia bridge | Phase 3 |
| Q8 | "Nearby days give a little more" | Open as a rule for the Phase 1 Soul review: a gap's cost is never shown |
| ~~Q10~~ | In polar night, when should the invitation come? | At solar noon, when the twilight is brightest: answered by the author 2026-11-01 (`features/sun.md` D4). In polar day it is the lowest light, as CLAUDE.md §8 suggests. |
| Q9 | May the Letter name the book and its author for the one sentence of inspiration (GAMEPLAY §7)? | Open. `lint:copy` refuses those names in the letter as everywhere in the product. A yes needs a written, letter-only exemption. |
+107
View File
@@ -0,0 +1,107 @@
# The Android APK in a release, tested on the Wave 10 through Fabrica's phone queue
Branch `feature/android-release-apk`, 2026-11-21. Follows [`fabrica-release.md`](fabrica-release.md) (F1–F11), which
made Rosea a Fabrica app with no release yet.
## 1. Why and what, in the player's terms
Mark asked for every Domi app to ship its APK, tested at least once on a real phone first: *install, open, the first
screen shows, one real action*. For Rosea the real action is to water her, and the check that matters is that she is
still watered after the app is closed and opened again. A rose that forgets her care on a phone is the cruellest bug
this product could have (CLAUDE.md §8).
A player gets the APK from Rosea's Aula page once a release is published. Nothing about the game changes. This
branch changes how the APK is built, tested and released.
## 2. Technical architecture
```mermaid
flowchart LR
subgraph repo["Rosea (this repository)"]
game["apps/rosea → dist-tauri/"] --> shell["apps/rosea-tauri: tauri android build"]
shell --> debug["debug APK (WebView drivable)"]
shell --> unsigned["release APK, unsigned<br/>android.ts verify: no permission, no backup"]
spec["e2e/android/garden.android.ts"]
end
subgraph fabrica["Fabrica (Mark's PC and the hub)"]
e2e["e2e pipeline, runner windows-e2e<br/>step phone: device Wave 10"] --> lease["hub: phone queue lease"]
lease --> run["fabrica tests run --target phone<br/>reset uninstall, install, launch"]
rel["release pipeline: android → approve → apk"]
end
debug --> e2e
spec --> run
run --> phone(("Wave 10"))
unsigned --> rel
rel --> custos["Custos: custos-sign apk, key rosea-android"]
custos --> mini["minisign (domi-release), SHA256SUMS"]
```
- **A1. Two APKs, one game.** The phone test drives the **debug** APK. Only a debug build's WebView can be reached
over DevTools (Fabrica docs/22 part 5), and Tauri's `devtools` feature would make the *release* WebView drivable for
anyone with a cable, so the shipped APK never gets it. The two APKs carry the same `dist-tauri/` game, the same
manifest patch (no `INTERNET`, no backup) and the same `MainActivity`. They differ in the Rust profile and the
signing key. What the phone test cannot prove about the release APK is listed in §5.
- **A2. The phone only through the queue.** The `phone` step of `.fabrica/artifex/e2e.yaml` says `device: Wave 10`.
The hub queues the run for the phone, the runner sets `ANDROID_SERIAL` and `FABRICA_PHONE_LEASED`, and the nested
`fabrica tests run --target phone` uses that phone without a lease of its own (docs/35 part 4). The spec skips
unless Fabrica's environment is there, so it never reaches for a phone by itself.
- **A3. `reset: uninstall`, not the default `clear`.** The target installs the debug APK. A release build of Rosea
on the phone has another key and would refuse the install. `clear` would wipe its data and then fail anyway;
`uninstall` wipes the same data and installs fresh. The Wave 10 is the dedicated test phone (docs/35 part 5), and
no player's rose lives on it.
- **A4. `maxMinutes: 20`.** One test of about two minutes, plus install and launch. Twenty minutes frees the phone
for the next app if the run hangs, well under the 60-minute default.
- **A5. Caches off C:.** Both pipelines name `GRADLE_USER_HOME` on `D:\build\rosea\gradle` and the NDK
(`NDK_HOME`, which the Tauri CLI needs and this PC does not set). A local build also puts Cargo's target folder,
`TEMP` and `ANDROID_USER_HOME` under `D:\build\rosea`. The pipelines keep Cargo's target in the checkout, because
the installer's artifact glob is there.
- **A6. Signing: `rosea-android` does not exist, and Custos will not make it.** Custos creates an Android key on an
app's first release only for the apps in its `ANDROID_APPS` table (`apps/desktop/src-tauri/src/signing.rs`). In
0.24.0 that table holds Postea, Culina and Liber, and Mark's PC runs 0.22.0, which holds Postea only. Rosea's `apk`
step would stop at `no_key`, as Culina's and Liber's did on 2026-11-20. Two fixes exist, and both belong to
Custos and Mark, not to this repository: a Custos change that adds `rosea-android` (`CN=Rosea Domi`, only
`mnovak/Rosea`, pipeline `release`) and its install on this PC, or Mark's *Create Android key* by hand.
`fabrica-release.md` said "Custos makes the key on the first release". It was wrong, and is corrected here.
**Answered 2026-11-25:** Custos 0.25's Android grant (`mnovak/*`, given by Mark) makes `rosea-android` at its
first signature. So the `apk` step lists no `keys:`: preflight refuses a listed key that does not exist yet,
which stopped the first v0.1.0 run (r9j7b2sqmzdjg) before it built anything.
- **A7. The certificate is forever.** Once a player installs an APK signed with `rosea-android`, every update must
carry the same certificate (CLAUDE.md §8). The CN names the product, *Rosea Domi*, and the name is still provisional.
The key outlives a rename: a renamed app keeps the old CN, and no player sees it.
## 3. Risk analysis
| Risk | Where | Answer |
| :-- | :-- | :-- |
| A player's rose lost on the test phone | `reset: uninstall` | The Wave 10 is Fabrica's dedicated test phone (docs/35 part 5). The memory rule stands: Fabrica stops the app after the run, and the spec force-stops it in `finally` as well. |
| The release APK phones home | the APK | `android.ts verify` reads the built APK with `aapt2` and refuses any permission or backup flag. It runs in the release pipeline's `android` step and in every local build. |
| Someone made reachable | none | No network feature. The APK asks for no `INTERNET` permission, so the kernel refuses every socket. |
| A tester's place on the phone | the spec | The spec chooses *Not now*, so no town is ever chosen on the phone. |
| A release signed with a stand-in key | signing | The `apk` step names `rosea-android` only, through Custos, and refuses `CUSTOS_PIPE` (sign-apk.ts). There is no fallback to a debug or local keystore. A missing key stops the release. |
| An untested APK published | the release | The phone test is a pipeline of its own: phones are leased per run, and the release must not hold the phone for two hours. Until the e2e pipeline's `phone` step has passed on a commit, that commit is not tagged (process, §5). |
## 4. Gap analysis and the designed solution
| Gap | Solution here | Left open |
| :-- | :-- | :-- |
| The phone target did not say `reset` or `maxMinutes` (the old CLI refused them) | The installed CLI reads both now: a planted `reset: wipe-everything` is refused by `fabrica artifex check`. Written: `reset: uninstall`, `maxMinutes: 20`. | none |
| No pipeline put the phone run in the queue | `e2e.yaml` gains `apk` (`pnpm tauri:android`) and `phone` (`device: Wave 10`). | It has not run: the Wave 10 is not paired in Fabrica (below). |
| The release pipeline's Android step lacked the NDK and put Gradle on C: | `NDK_HOME` and `GRADLE_USER_HOME` in `release.yaml`'s env. | none |
| The release APK was never built | Built here with caches on D:, then checked by `android.ts verify` (§5). | Not signed (A6). |
| `rosea-android` | Named as Custos's change (A6). | **Custos's and Mark's.** |
| The Wave 10 is not paired in Fabrica | `fabrica devices list` shows `WAVE 10C connected (not paired in Fabrica)`. `pass::resolve` then finds no phone named *Wave 10*, and the step fails before it runs. | **The Fabrica session's** (Pipelines → Workshop → Devices → Pair a phone). |
| Publication | The repository is public, so a release is public. Mark removed G6.1 (the legal check) and said to release on 2026-11-25. | **Mark's**, answered (`fabrica-release.md` F1). |
## 5. Verification matrix
| Case | Kind | How | Status |
| :-- | :-- | :-- | :-- |
| The release APK builds with every cache off C: | build | `pnpm tauri:android-release` | done 2026-11-21: 27 min from cold (Gradle 9.6.1 downloaded to D:), 5.60 MiB, arm64-v8a, versionCode 1000, sha256 4d52e9eca4cd2e56… (unsigned) |
| The release APK asks for no permission and allows no backup | build check | `android.ts verify <unsigned apk>` (aapt2) | done: verified; `aapt2 dump badging` shows no `debuggable` and only androidx's own `DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` (the app's own signature permission, not a capability) |
| `reset` and `maxMinutes` are read, and a wrong `reset` is refused | config | `fabrica artifex check` with a planted value | done: refused with `targets[1].reset: clear, uninstall or keep` |
| The pipelines are valid | config | `fabrica artifex check` | done: 0 problems |
| Install, open, first screen, water, close, reopen, still watered | e2e, real phone | `fabrica tests run --target phone` through the hub's queue (the e2e runner is not yet added, so not the pipeline step) | done 2026-11-21: run `20261121-101158-uckm` **1 passed, 0 failed** (7.9 s; waited 12 s in the queue) on the Wave 10, Android 16, debug APK sha256 `bd59ff908125…`, commit f5d8d2c |
| The phone test fails when persistence is wrong | e2e drill | planted `Days of care 2`, run through the queue, restored by copy | done: run `20261121-102500-crkf` **0 passed, 1 failed**, received `Days of care1` after the reopen |
| The spec never reaches for a phone outside the queue | e2e | `test.skip` without `FABRICA_TESTS_PACKAGE` and `ANDROID_SERIAL` | by construction |
| The signed APK verifies with `rosea-android`'s certificate | release | the `apk` step (custos-sign verifies with apksig) | **not run**: no key |
| What the debug test cannot prove about the release APK | manual | install the signed release APK on the Wave 10 once, water, close, reopen | after the key exists |
+12 -8
View File
@@ -59,6 +59,10 @@ typecheck and lint. Nothing imports it: not the app, not the packages.
| A8 | Stand-ins are **generated** from the same manifest and committed in `art/placeholders/`. A test fails if they drift. | The board and, from Phase 1, the app both show them. One manifest change must update both. |
| A9 | The board's page takes the product name from `@rosea/schema` (`%PRODUCT_NAME%`). | Renaming stays a one-commit operation (CLAUDE.md preamble). |
| A10 | Claude writes its review and the `final` paths into the board's rows. The card shows them. | Mark sees on the card what Claude checked and whether the picture is in the game, with no separate report to read. |
| A11 | *Added 2026-11-01 (`art/phase2-3-pictures`).* The manifest also holds Phase 2 (the fox, berries, the bush, the brush) and the Phase 3 pictures whose mechanics are already decided (paths, lanterns). Every card carries a `phase`, the manifest lists phases in order, and the board shows *Phase N* on each card. | Mark asked for more pictures on the board. Making them now lets the fox's look settle before Phase 2 code depends on it. The phase on the card keeps a Phase 3 picture from being taken for something Phase 1 needs. |
| A12 | **The planets are not on the board.** | Each planet is designed in its own feature doc (ROADMAP Phase 2), and their grown-ups are the book's most recognisable drawings. Asking for pictures before the design exists would fix a look with the highest likeness risk and no design behind it. |
| A13 | The fox is a second character with his own sheet (`fox-sheet`) and two review points (STYLE.md §7, 8–9). His look (F1–F4 in STYLE.md §0) was a draft, and Mark approved it on 2026-11-01 with one change: a deep red-orange coat (`#BC4A22`) instead of muted russet (`art/fox-coat`). | The same mechanism that keeps the rose consistent, reused. The draft was marked as one, so the rose's approval was not stretched over choices he had not seen. |
| A14 | A stand-in with no drawing **stops the build**. Before this, an unknown cell got an empty box. | 28 new pictures made a silent blank likely. A blank stand-in looks like a layout bug, not a missing drawing. |
## 3. Risk analysis
@@ -77,9 +81,9 @@ typecheck and lint. Nothing imports it: not the app, not the packages.
| Gap (G0.24) | Solution | State |
|:--|:--|:--|
| No `docs/ART.md` | Written: the six steps, the manifest's rules, the board, budgets, what's missing | Done |
| No `art/STYLE.md` "drafted with Mark" | A draft by Claude, with its open choices S1–S5 listed for Mark | **Draft.** Mark's approval is still needed |
| No `art/manifest.json` | 11 cards, 25 Phase 1 pictures: rose sheet, stages, care, moments, care things, chair, four garden layers, icon | Done |
| No SVG placeholders | 29 stand-ins, generated and committed | Done |
| No `art/STYLE.md` "drafted with Mark" | A draft by Claude, with its open choices S1–S5 listed for Mark | Done: Mark kept the draft, 2026-11-01 |
| No `art/manifest.json` | 11 cards, 25 Phase 1 pictures: rose sheet, stages, care, moments, care things, chair, four garden layers, icon. Since A11: 18 cards and 53 pictures, the 28 more for Phases 2–3 | Done |
| No SVG placeholders | 29 stand-ins, generated and committed; 63 since A11 | Done |
| No art preparation page | The art board, published (A1) | Done |
| **Phase 0 gate:** one picture through the pipeline into `art/final/` | Every step exists and is tested with synthetic pictures | **Open.** It waits on Mark making and accepting the first real picture |
@@ -88,14 +92,14 @@ typecheck and lint. Nothing imports it: not the app, not the packages.
| Case | Kind | Where |
|:--|:--|:--|
| The real manifest passes every check | unit | `tools/art-prep/test/manifest.test.ts` |
| Each manifest rule fires: a repeated id, cell id clash, bad id, odd size, cell/grid mismatch, non-dividing grid, grid on a single, unknown character, shipped sheet, opaque sprite, missing review point, no subject, unused picture, a book name, a medical word, *lonely* in the avoid list, a missing or wrong sheet | unit (17 cases) | same |
| Each manifest rule fires: a repeated id, cell id clash, bad id, odd size, cell/grid mismatch, non-dividing grid, grid on a single, unknown character, shipped sheet, opaque sprite, missing review point, a phase outside 1–6, phases out of order, no subject, unused picture, a book name, a medical word, *lonely* in the avoid list, a missing or wrong sheet | unit (19 cases) | same |
| STYLE.md §1 and §7 are read exactly; a missing section is an error | unit | `prompt.test.ts` |
| All 29 prompts start with §1 word for word, carry the shared avoid list, and contain no forbidden term | unit | same |
| Rose prompts ask for `rose-sheet`; the sheet itself doesn't | unit | same |
| All 63 prompts start with §1 word for word, carry the shared avoid list, and contain no forbidden term | unit | same |
| Rose prompts ask for `rose-sheet`; the sheet itself doesn't. Fox prompts, one-at-a-time ones included, ask for `fox-sheet` and never name `rose-sheet` | unit | same |
| Grid numbers in the prompt equal `cellBoxes`; tall cells made alone use 1024 × 1536 | unit | same |
| The board data has the shape the page reads; every kind has a group on the page; the page never spells the product name | unit | `board.test.ts` |
| A stand-in for every picture and cell, at its size, loading nothing; `art/placeholders/` equals the generator's output | unit | same |
| A stand-in for every picture and cell, at its size, loading nothing; `art/placeholders/` equals the generator's output; a picture with no drawing stops the build; every card shows its phase | unit | same |
| `art:accept`: single picture to WebP within budget; opaque refused; sheet cut into its cells; any-size sheet cut by grid with a note; empty cell refused by name; painted cell refused; edge-touch warned; solo cell fitted; a layer's clear sky required; a wrong-shape full picture cropped, never enlarged; over budget refused; unknown id or non-image refused | unit, real sharp (12 cases) | `accept.test.ts` |
| The board renders: 11 cards, 18 cells, 5 groups, no broken stand-in, no sideways scroll | manual, built page on 127.0.0.1 | the review |
| The board renders: 11 cards, 18 cells, 5 groups, no broken stand-in, no sideways scroll. Since A11: 18 cards, *Phase N* on each | manual, built page on 127.0.0.1 | the reviews |
| The published board's store starts empty | manual (`ArtifactData list art`) | the review |
| **One real picture end to end** | manual, Mark | **not done**: the Phase 0 gate |
+256
View File
@@ -0,0 +1,256 @@
# Atrium adoption: making Rosea Domi "Atrium-ready" (plan)
Status: the plan was merged as f4efc9e (PR mnovak/Rosea#4). **Step 1, part A is built** on `feature/atrium-door`, 2026-11-22: the `domi-app.toml` (§8). Part B, the door and the fallback, is skipped by Mark's ruling: manifest only, no rule changes. The brief is Mark's, passed on by the Aula
session: prepare Rosea for Atrium Domi. The source is `F:\Akce\Atrium-plan\ROADMAP.md` §1–2 and Appendix A. Rules for when each step may start:
- Step 1 code waits for Atrium's `docs/APP_CONTRACT.md` v0 on its `main`.
- Each later step waits until its Atrium Day lands.
- Visual changes wait for `@domi/ui`.
This file is the inventory Appendix A asks for, plus the decisions those steps would force on Rosea. Its §6 lists the questions for Mark.
## 1. Why and what, in the player's terms
Atrium Domi is the single free thing a Domi user installs:
- a tray service that handles updates, licences, backup and the record of *What left this computer*;
- a window whose rooms are the Domi apps.
For Rosea, three things matter to the player:
- **Backup.** Her rose is backed up with everything else, in one click, with no account. This is a stronger answer to
the trap Rosea fears most, a player coming back to find her gone (CLAUDE.md §8), than *Keep her safe* alone.
- **The record.** *What left this computer* shows Rosea as having sent nothing, which is the truth.
- **Standalone.** The garden opens inside Atrium's window, and the app still opens on its own exactly as today.
Atrium is the door, not a lock (ROADMAP §1).
Nothing about the game changes. The PWA and the Android app are not part of Atrium; Atrium is a Windows desktop
service plus a NixOS server edition.
## 2. Inventory (what Appendix A asks for)
### 2.1 Direct Tauri invoke/listen in the UI (for `@domi/bridge`, step 2)
**None.** The shell is *a window and nothing else* (CLAUDE.md §2). Here is what was checked on `main` (b307655):
- **No Tauri JavaScript API.** No `@tauri-apps/api` dependency anywhere, and no `invoke(`, `listen(` or `__TAURI__`
in `apps/rosea/src` or `packages/*/src`.
- **No commands, no plugins, no IPC grant.** `apps/rosea-tauri/src-tauri/src/lib.rs` is a bare `tauri::Builder`, and
`capabilities/` is absent on purpose, so the page has no IPC at all.
- **The one native bridge is Android-only and not Tauri.** It is `window.roseaFile.save(name, text)`, registered
with `addJavascriptInterface` in `apps/rosea-tauri/android/java/MainActivity.kt`. It is used by
`apps/rosea/src/App.svelte` for *Keep her safe* (`keep-her-safe-apps.md`) and pinned by
`apps/rosea-tauri/test/android-bridge.test.ts`. Atrium has no Android part, so it stays.
- **The one shell switch is a build-time constant,** `__ROSEA_SHELL__`, read only in `App.svelte`.
So step 2 has nothing to replace. It becomes a guard: a test that the game still imports no `@tauri-apps/api`
(added with step 1 or 3, whichever comes first).
### 2.2 Data folders and databases (for `rosea.backup.snapshot`, step 4)
**Rosea writes one thing: the IndexedDB database `rosea`**, through Dexie in `packages/storage` (schema version 2):
| Store | Contents | Can be remade? |
|:--|:--|:--|
| `profile` | the rose's name, the gardener, the chosen sunset town (or none), settings, `pastKeys` | the name, gardener and town take a tap each; `pastKeys` cannot be remade |
| `events` | the append-only care log, *the truth* (CLAUDE.md §4) | **no** |
| `keys` | the identity keypair; the private key is a **non-extractable** WebCrypto key | **no, and it cannot be read out at all** |
It sits in the webview's profile and is not a file of Rosea's own:
| Version | Folder |
|:--|:--|
| Windows (the only one Atrium sees) | `%LOCALAPPDATA%\cz.mareknovak.domi.rosea\EBWebView\` (WebView2's user data folder). The database is LevelDB under `Default\IndexedDB\https_tauri.localhost_0.indexeddb.leveldb` *(this exact path is predicted on Windows; it was seen on Android)* |
| macOS, Linux | WKWebView / WebKitGTK data folders *(predicted)*, CLAUDE.md §4 |
The Rust side writes no file. There is no SQLite.
### 2.3 Every outgoing network request (for the audit, step 5)
**None from Rosea.** The evidence:
| Layer | What holds it |
|:--|:--|
| The game | no `fetch`, `XMLHttpRequest`, `WebSocket`, `sendBeacon`, `EventSource` or `RTCPeerConnection` in `apps/rosea/src` or `packages/*/src` (grep, b307655) |
| The page's policy | CSP `connect-src 'self'` and `default-src 'self'`, from `tauri.conf.json` `app.security.csp`, held equal to the PWA's `<meta>` by the shell's test |
| The WebView2 runtime | `additionalBrowserArgs` switches off its own calls home: DoH, SmartScreen, Autofill, Translate, background networking, component update and more (CLAUDE.md §8, *the webview phones home*). **Not yet measured on Windows** |
| Android (not in Atrium) | no `INTERNET` permission, checked with `aapt2` on every build |
What could leave in future:
- the WebView2 runtime itself, if a runtime update breaks the switches;
- Phase 3 friend sync (WebRTC);
- Phase 4 `lucerna`.
Each of those gets its `fundamentum.audit.record` when it arrives. The step-5 test for Rosea is the reverse of the
Appendix's: *any* request fails the suite. Today that means a built-app e2e that records every request and expects
none outside the origin. The offline suite already comes close.
### 2.4 Accent and icon (for `domi-app.toml`, step 1)
| Field | Proposal | Source |
|:--|:--|:--|
| `id` | `rosea` | the `@rosea/*` scope, `domi-rosea://` |
| `name` | `Rosea Domi` | `packages/schema/src/constants.ts`; *Domi* never alone |
| `label` | `Rose` *(judgment: a plain word, as Appendix A asks)* | — |
| `accent` | `#e8899b`: `--rose` on the dark theme. Atrium Domi's window is dark, and its catalogue already names this colour for Rosea (`atrium-registry` `catalogue.rs`). The light `--rose` is `#b4485e` | `packages/ui/src/tokens.css` |
| `icon` | `domi-icon.png`: the shell's 256 px icon, `icons/128x128@2x.png`, made from `apps/rosea/public/icon.svg` at build time. A **placeholder** (form only); the real icon comes through `docs/ART.md` | `tauri.windows.conf.json` `bundle.resources` |
| `ui_bundle` | `apps/rosea/dist-tauri/` (base `/`, no worker, no manifest) | §3, R1 |
| `hostable` | `true`, with the origin rule in R1 | — |
| `free` | `true`: Mark's rule, *`free = true` for all apps for now* (via the Aula session, 2026-11-22). Rosea needs no licence anyway (APP_CONTRACT §2.2) | — |
| `capabilities` | `rosea.backup.snapshot`, `rosea.ui.*` (hosted), later `rosea.export.open`. **No** `rosea.atrium.badge` | §5 |
## 3. Technical architecture (as planned)
```mermaid
flowchart LR
subgraph atrium["Atrium Domi (not in this repo)"]
svc["atrium-service<br/>\\.\pipe\domi-atrium"]
win["Atrium window"]
end
subgraph shell["apps/rosea-tauri (Rust)"]
door["service door client<br/>(new, step 1)"]
snap["rosea.backup.snapshot<br/>(new, step 4)"]
end
subgraph game["apps/rosea + packages/* (unchanged)"]
store["packages/storage<br/>exportRose / importRose"]
idb[("IndexedDB rosea<br/>in WebView2's folder")]
end
svc <--> door
door --> snap
snap -. "asks the page" .-> store --> idb
win -. "hosts rosea.ui.* (step 3)" .-> shell
game -. "imports nothing of Atrium's" .- atrium
```
**The seam stays where it is.** The game never learns Atrium exists, just as it never learns which shell it is in
except through `__ROSEA_SHELL__`. Everything Atrium needs lives in `apps/rosea-tauri`. That shell stays deletable,
and the PWA stays whole without it.
### Decisions this forces (proposed; Mark decides those marked so)
| # | Proposal | Why |
|:--|:--|:--|
| R1 | **Hosted mode keeps Rosea's own webview and origin.** Atrium shows Rosea's window as a room (`--hosted` = Rosea's process, its WebView2 folder, `https://tauri.localhost`). Atrium does not load `ui_bundle` in a webview of its own. | IndexedDB is per origin and per profile. A bundle loaded by Atrium's webview opens an **empty** database, and the player meets a new rose with hers apparently gone: the cruellest bug this product could have (CLAUDE.md §8, *the origin is forever*). If Atrium can only host by loading the bundle, Rosea is `hostable = false` until a migration is designed. |
| R2 | **The snapshot is the care log, taken by the game**: `exportRose`'s `rosea-rose` file (`keep-her-safe.md` K1: keys + events, never the private key, never the town). The shell asks the page for it and writes it into the folder the service gives. | Copying LevelDB from under a running webview is not consistent, and the private key cannot be copied at all. The `rosea-rose` file is the one format already tested to restore additively (K3, K4). |
| R3 | **Restore is *bring her back*,** not a byte copy. It goes through `importRose`, which only appends. The restored rose lives under a new key with her old care intact (K2). | Contributions only add, and the log is never rewritten (CLAUDE.md §1, §6.2). |
| R4 | **Mark decides:** the shell gains Rust code and a local named-pipe client, the first code beyond *a window*. Step 4 needs one page↔shell channel: one Tauri command, or `eval` plus an event, granted only to Rosea's own origin. | This changes CLAUDE.md §2 (*no Tauri command, no plugin*). The pipe is local, not a network, but it is new surface. It is reviewed like a plugin, for network access. |
| R5 | **No badge, and *today* only if Mark wants it.** If there is a `rosea.atrium.today` at all, it is the real sunset time (*points beyond the screen*). It never mentions the rose's state. | A badge is a count, and a count about her waiting is guilt with a ribbon (CLAUDE.md §8). |
| R6 | **Export (step 7) is the `rosea-rose` JSON**, an open format, with a README line. | It exists already. |
| R7 | **The name gains no new place.** `domi-app.toml` is made before each desktop build from `PRODUCT_NAME`, `PRODUCT_SHORT_NAME` and the game's version (`scripts/domi-app.ts`), and it is never committed. | Renaming stays one commit (CLAUDE.md, header), and Fabrica's four version files stay four. |
## 4. Risk analysis
| Risk (a person feeling worse, a location, someone reachable) | Where | Answer |
|:--|:--|:--|
| Her rose seems gone inside Atrium | hosted mode | R1: same origin and profile, or not hostable; an e2e that opens her in both and sees the same days of care |
| A restore takes care away | backup | R3: additive import only, property-tested already (K3) |
| The town leaves the device in a backup | snapshot | it is not in the file (K1). Backups are encrypted by Atrium, and the target is the player's |
| A badge or a *today* line that blames | Atrium Home | R5 |
| The pipe becomes a way in | step 1 | Canalis's Noise handshake with Tessera keys (ROADMAP §2); Rosea serves only `rosea.*` to Atrium |
| Atrium not running pulls the player away from her | step 1 | the wait and the *Atrium Domi is not running* card must never stand between a cold open and the garden. Rosea opens first, and the card is a quiet line, never a blocker (*three taps to action, one preferred*) |
## 5. Gap analysis and steps
Only the steps whose Atrium Day has landed may start, and Aula says when.
| Step | Atrium Day | Rosea's work | State |
|:--|:--|:--|:--|
| 1 Manifest + service door | Day 1 + `APP_CONTRACT.md` v0 | A: `domi-app.toml` (§2.4, §8). B: the door client and the fallback | **A built** (`feature/atrium-door`); **B skipped** by Mark's ruling (§8) |
| 2 Bridge | Day 4 | nothing to replace (§2.1); a guard test | waits |
| 3 Hosted mode | Day 4 | `--hosted`, `rosea.ui.*`, R1 | waits; R1 needs Atrium's answer |
| 4 Backup snapshot | Day 3 | R2, R3, R4; a test: a snapshot taken while she is watered restores to a consistent, additive state | waits; R4 is Mark's |
| 5 Audit | Day 2 | no request to record; a test that none is made (§2.3) | waits |
| 6 Today/search | Day 6 (optional) | R5 | Mark's choice |
| 7 Export | Day 8 | R6 | waits |
| 8 Release | — | through Fabrica, as today | waits for G6.1 and G-F1 |
Visual changes (the room's look, `@domi/ui`) wait for `@domi/ui`.
## 6. Questions for Mark (through Aula)
1. **R4:** may the shell gain Rust code, a local pipe client and one page↔shell channel? This amends CLAUDE.md §2.
2. **R1:** can Atrium host a room as the app's own window, keeping its origin? If not, Rosea is `hostable = false` for now.
3. Is Rosea **free**?
4. **R5:** should Rosea have a *today* line at all, with the sunset time only?
## 7. Verification matrix (for when the steps are built)
| Case | Kind |
|:--|:--|
| The garden opens standalone exactly as before, with Atrium absent and with it present | e2e (built `.exe`) |
| A cold open is never blocked by a missing service | e2e |
| The hosted room shows the same days of care as the standalone app | e2e, manual |
| A snapshot taken mid-watering restores without losing or doubling an act | integration |
| A restore of yesterday's snapshot adds, never removes | integration (K3's property test reused) |
| `domi-app.toml`'s name equals the constants | unit |
| The game imports no `@tauri-apps/api` | unit |
| No request leaves the origin | e2e on the built app |
| The pipe client refuses a peer without Atrium's key | integration (`canalis-testkit`) |
## 8. Step 1 (APP_CONTRACT v0.1, Atrium main 25bed39)
Contract v0.1 §2.4 gives Rosea `id = "rosea"`, `label = "Rose"`, `accent = "#e8899b"`, and the file uses exactly these.
§8 point 3e makes the manifest alone *the lightest step 1* for an app with no IPC, and point 5 records that
players without Custos skip the door. Mark approved a public mirror of `atrium-door`'s client side (via the Aula
session), so a later door would not need the private repository.
### A, built: `domi-app.toml`
- `apps/rosea-tauri/scripts/domi-app.ts` writes `src-tauri/atrium/domi-app.toml` (git-ignored) before `tauri dev` and
`tauri build`. `ATRIUM` holds what APP_CONTRACT §7 says may move (`needs`, the icon).
- `tauri.windows.conf.json` `bundle.resources` puts it and `domi-icon.png` next to `rosea-shell.exe`, in the folder
that the per-user uninstall entry's `DisplayIcon` names (NSIS `installMode: currentUser`). It is Windows only:
the shared config does not carry it, so it is not in the APK.
- `test/domi-app.test.ts` checks the file against `test/domi-app-rules.ts`, which holds §2's rules in the parser's
order, with 27 hostile fixtures in `test/fixtures/domi-app/`, each named `<field>.<reason>`.
- The real parser (`atrium_registry::parse_manifest`, Fundamentum main) was run once over the shipped file and
every fixture. See the review for the result.
### B, skipped: the door and the fallback (R4)
**Mark's ruling (via the Aula session, 2026-11-22):** *manifest only for now, no rule changes.* CLAUDE.md §2 and
§4 stay as they are, and the door is skipped. R1, the no-Custos players and the public-repo/private-crates
question are with the Atrium session for its contract. What follows is the reason, kept for when he reopens it.
APP_CONTRACT §4–5, read against Rosea's CLAUDE.md:
| The contract asks | Rosea's CLAUDE.md says |
|:--|:--|
| Rust code in the shell: `atrium_door::DoorClient`, `canalis` and `atrium-door` from Git (`canalis-v1.2.0`), from the **private** Fundamentum repo | §2: the shell is *a window and nothing else*. The repo is **public**, and a public checkout could no longer build the desktop app |
| the app publishes its signed Canalis manifest to `%LOCALAPPDATA%\Domi\canalis\manifests\rosea.json` at every start | §4: *the Rust side writes no file of its own* |
| a Tessera subkey and a Canalis key from Custos | §1: *identity is a locally generated keypair*. Players have no Custos, so the door is skipped for every player (the contract's *NoCustos* path). Only the author's PC would ever say hello |
| *"Atrium Domi is not running"* with **Start**, shown in the app | §2: no Tauri command and no `@tauri-apps/api` in the game. Showing it in the garden needs a shell→page channel. Starting another program from Rosea is new too |
So B is a decision for the author, made in this repository's own session, as with G6.1. Once he decides, B is one
module in the shell (`src-tauri/src/atrium.rs`): the hello off the UI thread, and the `NotInstalled` and
`NoCustos` paths saying nothing. The fallback would be a quiet line, never a wait before the garden.
## 9. What each later Day will ask (APP_CONTRACT v0.3 §9, Atrium main c778678)
The prepared answers, from the inventory in §2. Nothing here is built: **Rosea stays manifest-only** (Mark), so any
step that needs the door is answered "not while she has no door", and each Day asks again when it lands. Rosea is
`free = true`, named *Rosea Domi*, label *Rose*, accent `#e8899b`, as in contract §2.4.
| Day | What it asks | Rosea's answer |
|:--|:--|:--|
| 2 Audit | every network destination: host, reason, how often, session or requests, bytes | **None.** Rosea's code makes no request (§2.3). The CSP is `connect-src 'self'`, and the Android app has no `INTERNET` permission. The WebView2 runtime's own calls are switched off by `additionalBrowserArgs` and **not yet measured on Windows**; measuring them is the test plan (below). With no request, there is nothing to record. The audit test would be the reverse: any request outside the origin fails, as the e2e suite already does for the PWA |
| 2 Updates | where the updater lives, how it stands down | **There is none in the apps.** A new desktop version comes only as a new installer from Fabrica, so there is nothing to stand down. The PWA's service worker and *Refresh* belong to the web build only; the shell has no worker (CLAUDE.md §8) |
| 2 Close | where it can save and close on request | **At any moment.** Every act of care is appended to IndexedDB when it is given, and nothing is kept unsaved. The only thing in flight is a pour still being held, and closing drops just that pour: nothing is written until the finger lifts, and nothing written is lost. Serving `rosea.ui.close` needs the door |
| 3 Data map | data, cache, sync state, sizes, keys | **Data:** the IndexedDB database `rosea` (§2.2): `events`, the append-only care log (a few hundred bytes per act); `profile` (her name, the gardener, the chosen town or none, past keys); `keys`. **Cache:** none of Rosea's own; WebView2's caches in the same profile folder are the webview's. **Sync state:** none (friends arrive in Phase 3). **Keys:** the identity keypair. Its private half is a **non-extractable** WebCrypto key, bound to this webview by design. It protects no data; it names who gave the care. So there is nothing to move into `app_secret`, and a player has no Custos. A restore on a new PC is *Keep her safe*'s: her care comes back under a new key, additively (keep-her-safe.md K2, K3) |
| 3 Snapshot | `rosea.backup.snapshot { folder }`, consistent, without caches or sync state | Plan R2: the snapshot is the `rosea-rose` file (`exportRose`): public keys and the whole care log, never the private key, never the town. It is taken by the game, because LevelDB under a running webview cannot be copied consistently. **Needs the door and a page↔shell channel (R4), both outside Mark's ruling for now** |
| 4 Commands | every `invoke`/`listen`, payloads, native dialogs; where the UI keeps state | **No `invoke`, no `listen`, no Tauri JavaScript API** (§2.1). Two native dialogs, both the webview's own: the file picker of *Bring her back* (`<input type=file>`, one JSON file, about 1 KB per day of care) and the save of *Save her to a file*. On Windows that save is a WebView2 download; on Android it is `roseaFile.save` and the system's save screen. **State:** IndexedDB under WebView2's profile, `%LOCALAPPDATA%\cz.mareknovak.domi.rosea\EBWebView\`, origin `https://tauri.localhost`; no `localStorage`. Contract row 3 (a hosted room uses the app's own profile) answers R1: **no migration** |
| 5 Household | react when a device is removed | Nothing: no Tabellarius, no sync |
| 6 Today, search, badge | ≤ 5 cards, search results, a badge | **Today: at most one card,** and only if Mark wants it: tonight's real sunset time in the chosen town (*points beyond the screen*). Never her water or her needs: a card about her waiting is guilt (R5). **Search:** nothing to find. **Badge:** never: a count about her waiting is exactly what Rosea refuses (CLAUDE.md §8). **Notifications:** Phase 6's sunset invitation, which never mentions neglect |
| 8 Export | an open format per kind of record | `rose.json`, the `rosea-rose` file (JSON: format, version, public keys, care events). `profile.json` (JSON: her name, the gardener's look, the chosen town if any: the player's own data, so the town *is* in their own export, unlike the shareable rose file). A README line for each. The day's sentences are references into the public-domain library, not the player's data |
| 8 Android | the package, `domi-rosea://open` | Package `cz.mareknovak.domi.rosea`. Android has **no** `domi-rosea://` intent filter yet; only the Windows installer registers the scheme (fabrica-release.md). Adding one is a change to `MainActivity`'s manifest patch, for Day 8 |
**Test plans, for when a Day lands:**
- **Day 2:** run the built `.exe` under a request capture and expect nothing outside `tauri.localhost`. This also
closes CLAUDE.md §8's "Windows unmeasured" line.
- **Day 3:** a snapshot taken mid-watering restores with no act lost or doubled. K3's additive property test is
reused.
- **Day 4:** the hosted room shows the same days of care as the standalone app.
- **Day 8:** the export's `rose.json` passes `asRoseFile`, and `profile.json` round-trips.
+62
View File
@@ -0,0 +1,62 @@
# A calm refresh — when a new version of the garden is waiting
Status: built on `feature/calm-refresh`. Gap G0.10; CLAUDE.md §8, *the stale service worker: a
precached shell keeps serving old JS to a player who has "updated". Detect a waiting worker and offer
an explicit, calm refresh control.* Needed before the Phase 1 gate, where the author plays the
installed app daily while fixes are deployed. Review:
[`feature-calm-refresh.md`](../reviews/feature-calm-refresh.md).
## 1. Why and what, in the player's terms
The garden works offline because a service worker keeps a copy of it. When a new version is
published, the browser fetches it in the background and **waits**: the garden the player has open
never changes under their hands. When the new one is ready, one quiet line appears at the foot of
the page: **"A new version of the garden is ready."** with a **Refresh** button. The player
refreshes when they like; nothing is lost either way, since the rose lives in the device's
database, not in the code.
## 2. Technical architecture
```mermaid
sequenceDiagram
participant P as the open garden (version A)
participant B as the browser
participant S as the server
B->>S: sw.js (on a navigation or a check)
S-->>B: version B's bytes differ
B->>B: install B, precache; B waits (skipWaiting: false)
B-->>P: "waiting" (workbox-window, via virtual:pwa-register)
P->>P: show "A new version of the garden is ready." + Refresh
P->>B: Refresh: SKIP_WAITING to B
B-->>P: B controls; the page reloads under B
```
| # | Decision | Why |
|:--|:--|:--|
| U1 | Register through `virtual:pwa-register` in the app; `injectRegister: false`. | The emitted `registerSW.js` registers but tells the page nothing; the virtual module reports the waiting worker. Bundled, so the CSP needs no inline script. |
| U2 | **Never refresh by itself.** The line waits for the player. | CLAUDE.md §1, *gentle*; a reload in the middle of pouring water would lose the pour. |
| U3 | The line sits in its own `aside` at the foot, on the garden and the Letter alike. | It is about the whole app, not one page; a landmark keeps it findable. |
| U4 | The e2e test serves a **real second version** (version A's build with `sw.js` changed) from the same origin. | A waiting worker exists only between two builds; a mock would test the mock. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| A player keeps old code forever and never sees a fix. | The line appears as soon as a new worker waits; tested end to end. |
| A silent swap mid-action loses care. | U2; the test asserts the old worker still controls the page until Refresh. |
| Feeling pushed. | One line, no badge, no repeat, no count; nothing happens if it is ignored. |
| Privacy | Nothing new leaves the device: update checks were already made by the browser to the same origin. |
## 4. Gaps
| Gap | State |
|:--|:--|
| G0.10 | Built |
| What changed in a version (release notes) | Open: not needed for the Phase 1 gate |
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| No line without a waiting version; the line and Refresh when there is one; Refresh calls the app; on the Letter too | unit | `ui/test/Shell.test.ts` |
| Built app: version A controls; version B published; the line appears; A still controls; Refresh; B controls and the line is gone; axe | e2e | `e2e/update.spec.ts` |
+53
View File
@@ -0,0 +1,53 @@
# The in-game sunset — move the chair, watch it again
Status: built on `feature/chair-sunset`. ROADMAP Phase 1: *the in-game sunset — move the chair, watch
it again — as comfort and rehearsal; it tells the player when the real one is tonight.* CLAUDE.md §1,
§7 (*silence is a feature: sunset … has moments with no buttons at all*). Review:
[`feature-chair-sunset.md`](../reviews/feature-chair-sunset.md).
## 1. Why and what, in the player's terms
Under tonight's sunset line there is **Move the chair**. The garden turns into a quiet scene: the chair
on the hillside, the sky going from day to amber to coral to dusk, the sun sinking behind the western
horizon. **Half a minute, and nothing to press.** Then one line says when the real one is tonight, and
two quiet choices: *Watch it again*, *Back to the rose*.
It is a rehearsal, never a replacement: it counts for nothing, logs nothing, and its last words point
at the real sky.
## 2. Technical architecture
```mermaid
flowchart LR
shell["Shell.svelte<br/>Move the chair"] --> scene["ChairSunset.svelte<br/>dialog: sky + sun in CSS,<br/>garden-sunset and chair stand-ins"]
scene -->|"after 30 s"| line["SunsetLine<br/>tonight's real sunset"]
line --> engine["engine nextInvitation"]
```
| # | Decision | Why |
|:--|:--|:--|
| C1 | The sky and the sun are **drawn in code** (CSS gradients and one disc) behind the garden layer, which is transparent above its horizon. | STYLE.md S5: the sky is never painted, so the same layer serves the real-time sky later. |
| C2 | **No visible button for 30 s.** Escape, or a tap anywhere, comes back early; a screen-reader-only line says so. | Silence (CLAUDE.md §7) without a trap: a keyboard or screen-reader user is never stuck. |
| C3 | It is a modal dialog; focus goes into it and returns to *Move the chair*. | Accessibility is not a phase. |
| C4 | **Nothing is logged.** No event kind, no count. | Rehearsal, not achievement; the real sunset's event (`sunset`, CLAUDE.md §6.2) belongs to the real one. |
| C5 | With reduced motion, the scene shows dusk at once, still, for the same half minute. | Global `prefers-reduced-motion` rule in `tokens.css`. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Dependence**: the screen sunset replaces the real one. | Its last line is the real sunset's time; nothing rewards watching it. |
| **A trap**: a full-screen scene with no buttons. | C2, C3; tested by keyboard. |
| **Motion** for people sensitive to it. | C5. |
| Privacy, reachability | None: nothing is stored or sent. |
## 4. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Move the chair opens a labelled dialog with no button in it; after 30 s, the real sunset's line, *Watch it again*, *Back to the rose* | unit | `ui/test/chair-sunset.test.ts` |
| Escape and a tap come back early; focus returns to *Move the chair* | unit | same |
| Watch it again starts it over | unit | same |
| With no town and no guess, the line asks for a town | unit | same |
| Built app: watch it with the clock driven; axe during and after | e2e | `e2e/shell.spec.ts` |
| Offline: watch an in-game sunset with the server gone (CLAUDE.md §3) | offline | `e2e/offline.spec.ts` |
+97
View File
@@ -0,0 +1,97 @@
# The day's sentence — the rose's folded petal
Status: built on `feature/day-sentence`. ROADMAP Phase 1: *the day's sentence comes from the rose: she
waits with a folded petal; sunset is the best moment to open it, but it is never lost and no streak
exists.* GAMEPLAY.md §1: *coming back on nearby days gives a little more (e.g. an earlier sentence
remembered). A gap is never punished.* CLAUDE.md §1, §5.5 (*an unopened sentence is never lost*),
§6.1, §6.2. Review: [`feature-day-sentence.md`](../reviews/feature-day-sentence.md).
## 1. Why and what, in the player's terms
When the rose needs nothing, she says *I am keeping a folded petal for you.* A folded petal lies by
her, and one button: **Open her petal**. It opens into one sentence of hope, with where it comes from in
small print.
- **One a day.** Once opened, it stays open for the rest of the local day (*Today's petal*); a new
one is folded tomorrow.
- **Never lost.** A petal not opened today is the same petal tomorrow, and next week. There is no pile
of missed petals and nothing says how many days passed.
- **Sunset is the best moment.** Around the real sunset (the same moment the sunset line names; in
polar day the lowest light, in polar night the brightest twilight) she says *The sun is low now.
Would you open my petal?* Opened then, she adds: *Go and look at the sky. I will be here.* It can
be opened at any other time too, with no difference in what it gives.
- **Nearby days give a little more.** If the last petal was opened at most three days ago, she also
remembers one opened before: *Do you remember this one?* After a longer gap she simply gives the
day's petal. The gap is not mentioned.
- **No library, no petal.** Until the author has verified sentences, she holds no petal and says
nothing about one. Nothing on screen points at the absence.
Nothing is counted: there is no number of petals, no list of all of them, no record of when.
## 2. Technical architecture
```mermaid
flowchart LR
lib["content/library/*.json<br/>(verified by the author)"] -->|"build: validate:library,<br/>then virtual:rosea-library"| app["apps/rosea<br/>App.svelte"]
cand["content/candidates/*.json<br/>(proposed, unverified)"] -->|"pnpm library:verify id… --by Name<br/>(the author only)"| lib
app --> ui["packages/ui<br/>Rose.svelte + Petal.svelte"]
ui --> engine["packages/engine<br/>petal/petal.ts: petalAt, goodMoment"]
engine --> schema["packages/schema<br/>sentence-opened.schema.json"]
ui -->|"appendOpened"| storage["packages/storage<br/>events store, rose file v2"]
```
| # | Decision | Why |
|:--|:--|:--|
| P1 | **The petal is the next sentence in one fixed order**, and the order moves only when a petal is opened. The order: sunset sentences never opened, by `verifiedAt` then a hash of the id; once all are opened, the one opened longest ago. | *Never lost* (CLAUDE.md §5.5) follows from the order: nothing advances by itself. Verifying new sentences adds them after the ones already verified, so it never swaps the petal she holds. With ≥ 365 sentences, none repeats within a year of daily opening. The hash mixes traditions, so the first days are not all one book. |
| P2 | **One opening per local day.** The first `sentence-opened` event of a local day is that day's petal; a second tab's later one changes nothing. | No farming, no reason to stay. `localDay` is the one recorded in the event (CLAUDE.md §7). |
| P3 | **Remembering** needs the previous opening ≤ `PETAL.nearDays` (3) local days before today and an earlier sentence to recall; which one is a pure, seeded choice per day. | GAMEPLAY §1. A gap is never shown: the extra line is simply absent. Tuning is the author's, in `PETAL`. |
| P4 | **The good moment** is `PETAL.beforeMinutes` (60) before to `PETAL.afterMinutes` (60) after the sun module's `invitation`. It changes only her words. | One sun module (CLAUDE.md §7); the best moment is offered, not rewarded (*Gentle*). |
| P5 | **The library is bundled at build time** through a Vite virtual module that reads `content/library/*.json`; the app build first runs `validate:library` and fails if it fails. The app never validates in the browser. | Sidesteps G0.12 (Ajv needs `new Function`; the CSP forbids it) without a second validator: what ships is exactly what passed the gate. `ROSEA_LIBRARY_DIR` swaps the folder for the e2e build. |
| P6 | **A new event kind, `sentence-opened`** (`ts`, `localDay`, `from`, `messageId`, `clientVersion`), appended to the same `events` store. | CLAUDE.md §6.2: adding a kind is the only sanctioned way to make something derivable. |
| P7 | **The rose file becomes version 2** with an `opened` list beside `events`; version 1 files are still read. | Her petals move with her to a new device, so the order continues instead of starting over. |
| P8 | **Candidates live in `content/candidates/`**, in the library's shape without `publicDomain`, `verifiedBy`, `verifiedAt`, and with a `check` (where to read it). `validate:library` holds them to every rule but verification, so the author is never asked to verify a line that would fail. `pnpm library:verify <id…> --by <name>` moves them into the library with today's date. **Agents never run it.** | D4 of phase0-workspace: `verifiedBy` is a person. The command only saves the author hand-editing JSON. |
| P9 | The source is shown under the sentence (work, author, translation). | Honesty about where words come from; it also tells a believer and a non-believer what kind of line it is. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Guilt**: a pile of unopened petals after an absence. | P1: there is only ever one petal. Nothing names the days between. |
| **Streak creep**: remembering on nearby days is a streak in disguise. | P3 rewards nothing visible and counts nothing; after a gap the day's petal is exactly as full. It is a small gift, not a bar to keep up. Reviewed in `soul.md` terms in the review. |
| **Dependence**: a reason to stay in the app. | One petal a day; at the good moment her words send the player outside. |
| **Comfort becomes wallpaper** (CLAUDE.md §8). | No repeat until every sentence has been opened once (P1). |
| **A hollow or harmful sentence**: a promise, a medical word, the unnamed state. | The validator's rules (§5.6), held for candidates too (P8); the author verifies every line. |
| **Copyright**: a modern translation slips in. | The translation list in `validator.ts`; additions need a dated reason. Candidates carry `check.publicDomain`. |
| **Privacy**: which sentences were opened. | Stays on the device; the rose file holds it, never the town. Nothing is sent. |
| Reachability | None: nothing reaches another person. |
| **Offline** | The library is precached in the bundle; opening appends to IndexedDB. |
## 4. Gap analysis
- **G1.5** (the day's sentence) closes with this, except that the library is still empty: the petal
appears in the shipped app only once the author verifies sentences (G0.18).
- **G0.12** narrows: the app does not need to validate content in the browser while the library is
bundled. It reopens if the library is ever fetched at runtime.
- **Not done:** Czech text (`text.cs`) is not shown yet (Czech copy arrives as a whole, G1.3); a
collection of past petals (an album) is not designed.
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| No sentences: nothing; first visit: the first in order is folded | unit | `engine/test/petal.test.ts` |
| Opening today: open for the rest of the day; tomorrow: the next one folded | unit | same |
| **Property:** with no opening, the folded petal is the same on every day | property | same |
| **Property:** adding sentences verified later never changes the folded petal | property | same |
| **Property:** at most one opening per local day counts; a second changes nothing | property | same |
| **Property:** no repeat until every sentence was opened; then the least recent | property | same |
| Remembering: at 1–3 days a recalled earlier one; at 4+ none; never today's own | unit | same |
| Good moment: inside ±60 min of the invitation; polar day and polar night | unit | same |
| Events from other roses' keys are ignored; past keys count | unit | same |
| The schema accepts the event and rejects free text in `messageId` | unit | `schema/test` |
| Storage: append and load opened; `loadCare` ignores them quietly; rose file v2 out, v1 and v2 in, additive | unit | `storage/test` |
| Candidates: held to every rule; `library:verify` moves, stamps, refuses an unknown id or a failing line | unit | `content/test` |
| UI: says the petal line only when she needs nothing; Open; source shown; today's petal again; remembered line; sky line at the good moment; empty library shows nothing | unit | `ui/test/petal.test.ts` |
| Built app with a fixture library: open the petal, reload, still open; axe | e2e | `e2e/petal.spec.ts` |
| Built app with the real (empty) library: no petal | e2e | same |
| Offline: open the petal with the server gone | offline | — (the shipped library is empty; covered by e2e reload. Added when the first sentences are verified.) |
+80
View File
@@ -0,0 +1,80 @@
# @domi/ui in Rosea: the shared buttons and the town search
Status: built on `feature/domi-ui`, 2026-11-23. The brief was Mark's, passed on by the Aula session: adopt `@domi/ui`,
the Domi design system (`mnovak/domi-design`), at **v1.5.0** (CPAL-1.0 from v1.0.3). He chose **(a)**: Rosea may
carry a public copy. Her buttons
and her town search take the new look, and the search field gets *search*, never *send*. Review:
[`feature-domi-ui.md`](../reviews/feature-domi-ui.md).
## 1. Why and what, in the player's terms
Every Domi app now shares one set of controls:
- a struck plate for an ordinary action, and a gilded leaf for the one main action of a screen;
- a glint when pressed;
- at least 48 px under a finger.
Rosea's buttons were her own: rounded outlines, plus underlined words for the quiet ones. They now wear the shared
plate in her own colours, and her town search becomes the shared field with a search seal. Nothing else changes:
- her colours, her system fonts, her art and her layout stay;
- what each button does stays;
- what she says stays.
## 2. Technical architecture
```mermaid
flowchart LR
subgraph vendored["packages/domi-ui = @domi/ui v1.5.0 (vendored, never edited)"]
btn["components/Button.svelte"]
tf["components/TextField.svelte"]
css["css/tokens + base + components"]
lib["lib/strike, keys, icons"]
end
script["domi-design tools/vendor.mjs"] -->|copies a CPAL tag| vendored
tokens["packages/ui/src/tokens.css"] -->|@import| css
rose["rose/*, scene/*, sunset/*, Shell"] --> btn & tf & lib
html["apps/rosea/index.html<br/>data-domi-room=rosea, theme auto"] --> css
```
### Decisions
| # | Decision | Why |
|:--|:--|:--|
| D1 | **A vendored copy as a workspace package**, `packages/domi-ui` (`"@domi/ui": "workspace:*"`). It is made only by the design system's own `node tools/vendor.mjs <rosea>/packages/domi-ui v1.5.0`, which writes `src/` (css, components, lib, index.ts, types.ts, tokens/generated.ts), a `package.json` with no scripts, `LICENSE` (CPAL-1.0), `NOTICE` (the credit), `CHANGELOG.md` and `VERSION`, and refuses a tag that is not CPAL-1.0 (INTEGRATE.md §6a). It is never edited here. ESLint skips the folder. The three `@fontsource-variable` fonts arrive as its npm dependencies (OFL); Rosea never imports them, so none is bundled. | Rosea's repository is public and the design system's is private, so a public build cannot fetch it. Mark allowed the copy, under CPAL-1.0 from v1.0.3 (v1.0.2 was MPL-2.0 and is never used). A bump reruns the tool with the next tag. |
| D2 | **Rosea's buttons never hand `Button` a Promise.** Async handlers are called as `() => void save()`. | A Promise would make the button announce "Working" and "Done", the design system's English, not Rosea's copy (CLAUDE.md §7). Rosea's own status lines already speak. Its hidden status regions stay empty. |
| D3 | **Every button is `Button`.** *Move the chair* binds its element (`bind:element`, 1.5.0), so focus comes back to it after the sunset. Only the *Bring her back* file picker wears the plate's classes on a `<label>` (D8). | Up to 1.3.x, `Button` set its own `onkeydown` and `onblur` after the ones passed to it. That dropped the pour by a held Space, its stop on blur, and *a held key is one touch* (thorns.md T2); the unit tests caught it. The fix went from here to domi-design (PR mnovak/domi-design#18, released in 1.4.0), and `bind:element` came in 1.5.0 at this request. Until then these buttons were markup. |
| D4 | **The town search is `TextField`, `action="search"`,** with Rosea's label, a new seal name *Search towns*, and `sentText=""`. The list follows the typing as before, so the seal and Enter only confirm it. | Nothing is sent anywhere, so the seal never says *send*. `sentText=""` keeps the design system's "Searched" unsaid; the line *One town* already speaks. |
| D5 | **On the dusk scene the plate is recoloured locally**: evening glass, with the sunset's gold edge that Rosea's button had. | That scene is dusk in either theme. The room's light plate would be parchment on a night sky. |
| D6 | **Her system faces stay**: `--domi-font-hand` and `--domi-font-book` point at Rosea's own stacks. No font files are copied. | INTEGRATE.md §0.4; the font is Mark's open question in PALETTE.md. |
| D7 | `<html data-domi-room="rosea" data-domi-theme="auto">` | Her room's ground equals her current colours in both themes, and she follows the device, as before. |
| D9 | **The licence's credit** (CPAL-1.0 Exhibit B, for Rosea and for the copy): `<DomiCredit link={false} />`, the exact words `Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák`, with the address as plain text. One quiet line at the foot of every screen, from the first open on (the gardener, the garden, the Letter), never a splash. Mark approved it (via the Aula session). | INTEGRATE.md §6a asks for it in the interface. The garden is offline: a link opening a web page would carry the player out of her, and on Android, which has no internet, into a page that never loads. `link={false}` came into 1.4.0 from this request. CLAUDE.md says *Domi* never appears alone in public; this phrase is the licence's and Mark's own (review finding). |
| D10 | **On Android the town field is an editable box** (`TextField as="auto"`, v1.1.0): `contenteditable="plaintext-only"` with `role="textbox"`, the same look and keys. Elsewhere it stays the native search field. | Android's WebView asks Google's Autofill service, over the network, the moment a native text field gets focus. No attribute stops it, and Rosea's missing `INTERNET` permission does not either, because the system's Autofill service makes the request (found by Amicitia). A player typing their town would send a request they never asked for. A unit test holds it on an Android user agent, and the drill (`as="input"`) fails it. |
| D8 | **Not converted:** the gardener's choices stay her own picture-chips, not `Radio`. The *Bring her back* file picker stays a `<label>` around the browser's own input, wearing the plate's classes. | The brief was her buttons and the search. A file input cannot be a `Button`. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| A care gesture stops working (the pour by keyboard, blur, a held key) | D3, and the unit tests that caught it run on every commit |
| The design system's English reaches the player | D2, D4. `lint:copy` also reads the vendored folder now (46 files) |
| A carved, metallic look makes her garden feel colder | listed for Mark in the review with the pictures; her art rules are not changed |
| A copy of private code in a public repository | Mark's decision (a). The Aula session told the design system session so that it can add a licence. `VENDORED.md` says so |
| CSP | the vendored CSS is bundled into Rosea's own file. The one inline style (`style:` on a multi-line field) is set through the CSSOM and Rosea does not use it. Checked by the e2e suite, which fails on any CSP violation |
## 4. Gap analysis
- **Fixed by this:** Rosea's controls now meet the 48 px touch floor.
- **Still open:**
- the struck plate's look under docs/ART.md (review);
- `Button`'s handler order, reported to the design system (D3);
- a licence for the copy (the design system's).
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| every button keeps its name, role and action | unit | `packages/ui/test/*` (88) |
| the pour by a held Space and the stop on blur | unit | `rose.test.ts`, `planet.test.ts` |
| a held key is one touch | unit | `touch.test.ts` |
| Rosea's status line is still the one that speaks | unit | `test/said.ts` |
| the built app: care, the town, the sunset, offline | e2e, offline | `pnpm test:e2e`, `pnpm test:offline` |
| how it looks, light and dark, phone and desktop | pictures | `pnpm look:shots` (`ROSEA_LOOK=before|after`), in the PR |
+197
View File
@@ -0,0 +1,197 @@
# Released through Fabrica: the release kit, the Aula page, updates, `domi-rosea://`, the showcase, the test targets
*Platform track.* Mark asked on 2026-11-19 that every Domi app be released and updated through Fabrica
(Fabrica `docs/36_app_onboarding.md`, the checklist this doc follows). This repository's CLAUDE.md wins
where the two disagree, and this doc says where they do.
## 1. Why and what, in the player's terms
Today a Rosea app reaches nobody: the Windows installer and the Android APK are build output on one
machine (G-T7, G0.22), and nothing tells an installed copy that a newer garden exists. After this
feature:
- **One release, built the same way every time.** A `vX.Y.Z` tag makes Fabrica's Windows runner run
every gate of §5.5 on a clean checkout, build the Windows installer and the Android APK, take the
pictures, and stop at Mark's Custos card. Only then is anything signed or published.
- **A page that shows her honestly.** The release carries what Aula needs for Rosea's page: a few
sentences, pictures of the built game on invented demo data (a rose tended for two weeks in an
invented garden), and the release notes. Nothing of Mark's own rose is ever in a picture.
- **Her next version arrives without a network feature in the game.** The apps still make no network
call of their own (§2, §8). The installed copy on Mark's PC moves to each release through Fabrica's
*Update all*; a player installs the next installer or APK over the old one, and her rose stays.
- **Other Domi apps can open the garden.** `domi-rosea://open` opens Rosea on Windows (Canalis
Part A). Nothing can reach into her: no other app can write into her care, read it, or send words.
**What this is not.** Not a public launch. Rosea's repository on Gitea is public, so a published
release and an Aula page are public too, and CLAUDE.md §8 and G6.1 say a legal check of the look
comes before any public release. This feature builds the release and the page; **publishing them is
Mark's decision** (F1).
## 2. Technical architecture
```mermaid
flowchart LR
tag["tag vX.Y.Z<br/>(Fabrica Deploy)"] --> hub["Fabrica hub"]
hub --> runner["Windows runner<br/>(Mark's PC)"]
subgraph repo["this repository at the tag"]
gates["pnpm lint · typecheck · test<br/>validate:library · lint:copy"]
build["turbo build: schema → engine/content/ui → @rosea/app"]
e2e["e2e + offline<br/>(built app, /Rosea/)"]
shots["pnpm aula:shots<br/>e2e/aula.spec.ts → e2e/aula/*.png"]
desktop["@rosea/tauri build:desktop<br/>NSIS installer + domi-rosea hook"]
android["@rosea/tauri build:android-release<br/>unsigned release APK, aapt2 verify"]
end
runner --> gates --> build --> e2e --> shots
build --> desktop
build --> android
shots --> kit["fabrica notes · aula shots · aula page"]
desktop --> approve{"Custos card<br/>(Mark)"}
android --> approve
kit --> approve
approve --> sign["Authenticode (domi-code-signing)<br/>APK (rosea-android, custos-sign)<br/>minisign (domi-release)"]
sign --> publish["Gitea release + signed SHA256SUMS"]
publish -. "only once Mark decides (F1)" .-> aula["Aula page /rosea/"]
publish --> update["Fabrica Update all<br/>(Mark's PC)"]
```
Packages and files:
| Piece | Where | Reads |
| :-- | :-- | :-- |
| The Fabrica app | `.fabrica/app.yaml` | — |
| The release pipeline | `.fabrica/artifex/release.yaml` | the repo at the tag |
| The e2e pipeline | `.fabrica/artifex/e2e.yaml` (`runner: windows-e2e`) | `.fabrica/tests.yaml` |
| The test targets | `.fabrica/tests.yaml`, `e2e/playwright.fabrica.config.ts`, `e2e/android/` | the built bundle; the debug APK |
| The pictures | `e2e/aula.spec.ts`, `e2e/playwright.aula.config.ts`, `.fabrica/aula.yaml` | the built bundle (PWA, `/Rosea/`) |
| The page's words | `AULA.md`, `.fabrica/aula/brief.md`, `.fabrica/notes/<version>.md` | — (checked by `lint:copy`) |
| The version check | `scripts/check-version.mjs` | the four version files |
| The scheme (Part A) | `apps/rosea-tauri/src-tauri/windows/hooks.nsh`, `tauri.windows.conf.json` | the installer only |
| The release APK | `apps/rosea-tauri/package.json` `build:android-release`, `scripts/android.ts` | the generated project |
The dependency direction of §2 is unchanged: no package gains an import, the game gains no code, the
shell gains no Rust, no crate and no plugin. Fabrica reads this repository; this repository imports
nothing of Fabrica's.
### Decisions
- **F1 — Built and signed, published only when Mark says.** The pipeline is complete: on the hub it
builds, signs after the card and publishes. Because the repository is public, the first `publish`
is a public release (G6.1). The tag is therefore made only after Mark answers. Until then the run is
made locally (`fabrica run release --step page`, which signs as a dry run). The Aula entry for the
server's `modules/aula.nix` is written down in the handover, not added.
**Answered 2026-11-25:** Mark removed G6.1 and said to release v0.1.0, desktop and APK.
- **F2 — One part, `desktop`; no `server` part.** The release pipeline makes both apps (Windows and
Android). The PWA's host is still the author's open question (G0.13: GitHub Pages under `/Rosea/`),
and a server part would be a NixOS module on the server, which is not this repository's to change.
When the PWA gets a host, a `server` part (or a Pages job) is added then.
- **F3 — Updates, the app's own way, with no network in the game.**
| Version | How an installed copy reaches the next release | Why not the other way |
| :-- | :-- | :-- |
| Windows | Fabrica *Update all* on Mark's PC (Fabrica docs/16): the signed `SHA256SUMS` checked against `domi-release`, the installer run with `/S /UPDATE` in place. A player runs the next installer over the old one (`installMode: currentUser`, same identifier): the WebView2 data folder, and so her rose, stays. | `tauri-plugin-updater` is a network feature and a plugin in the shell; §2 allows neither until one is reviewed for what it sends. An update check would tell a server, daily, that this person plays. No `latest.json` is published, so nothing waits for an updater that does not exist. |
| Android | The next APK, signed with the same `rosea-android` key and a higher `versionCode` (Tauri derives it from the version), installs over the old one and keeps her. A player gets it from the Aula page; the test phone gets each debug build from its `android` target. | An in-app check needs the `INTERNET` permission, which the APK must not ask for while Rosea has no network feature (§2; `android.ts verify` refuses any permission). |
| PWA | The service worker: a new bundle is a new worker, offered with *A new version of the garden is ready.* and *Refresh* (calm-refresh.md, G0.10). | Nothing to add here until it has a host (F2). |
| iOS | Not built (G-T1: needs a Mac). | — |
- **F4 — Signing through Custos only.** Authenticode with `domi-code-signing` for the installer;
the APK with `rosea-android` through `custos-sign apk` (corrected 2026-11-21, `android-release-apk.md` A6:
Custos does NOT make this key; it must be added to Custos's `ANDROID_APPS` or made by hand; a `run` step that names it in `keys:` so preflight checks it);
`domi-release` signs each file's minisign signature and `SHA256SUMS`. No key, password or token is
in the repository, a pipeline file or a log (G-T3). Each key's scope must name `mnovak/Rosea` exactly:
Mark's step in Custos, which `fabrica preflight rosea` names when it is missing.
- **F5 — `domi-rosea://open` from the installer (Canalis Part A).** The NSIS installer writes
`HKCU\Software\Classes\domi-rosea` (`URL Protocol`, `shell\open\command` = `"<exe>" "%1"`) after
install, and the uninstaller removes the key. **The installer, not every start**, because the shell is
a window and nothing else (§2): registering at start needs Rust code (a registry crate) in it. An
*Update all* or a reinstall runs the installer again in the install folder, so the command follows
the exe. The game ignores the URL: an open of `domi-rosea://…` opens the garden. If Rosea is already
open, a second window opens on the same data (no single-instance plugin, §2); two-tabs.md keeps both
windows true to the log. The app id is `rosea`, the identifier `cz.mareknovak.domi.rosea` is unchanged.
- **F6 — Canalis Part B is not done, and no capability is served.** Three reasons, each enough alone:
(1) a capability lets another program act on the player's garden, and §1 says *contributions only
add* and the care log holds only the player's own acts: a `rosea.care.*` capability would make a
number on screen that the player did not earn; (2) Canalis keys come from Custos (`custos_local`),
which a Rosea player does not have and must never need: Rosea's identity is its own anonymous
keypair (§1); (3) it would add Fundamentum crates, a server thread and IPC to a shell that has none.
So there is nothing to pin: Rosea has no Fundamentum crate, and `canalis-v1.1.0` does not apply.
Reopen with a capability that only *reads nothing and adds nothing* to her, if one is ever found.
- **F7 — The pictures come from the app's own Playwright run, on demo data the app itself made.**
`pnpm aula:shots` serves the built PWA, fixes the clock (Europe/Prague, 08:00 on fourteen
invented days in March 2026), answers the first open with the gardener's first look and the town
*Prague* (a public place, chosen from the bundled list; never a real player's town), waters her once
a day by the button as a player does, and photographs: the garden, the ring of care, her numbers,
the in-game sunset, *Keep her safe*, the first open, and the same garden on a phone's screen.
`.fabrica/aula.yaml` lists them as `file:` shots; `fabrica aula shots` checks and publishes them.
The PWA is built under `/Rosea/`, so Fabrica's own `web:` server (which serves at `/`) is not used.
**No iPhone pictures:** there is no iOS app yet (G-T1), and the PWA has no host to add to a Home
Screen (G0.13); a picture of an iPhone would show a version nobody can install.
- **F8 — Videos wait for Fabrica docs/37.** Until a `videos:` key is on Fabrica `main`, it fails
`fabrica aula shots`; the Pensum ticket `kkpy69` (*Showcase videos of the main flows for the Aula page*) holds the work.
- **F9 — Two test targets.** `.fabrica/tests.yaml`: `web` (the built PWA in a headless Chromium, the
`web` project of `e2e/playwright.fabrica.config.ts`, the same specs as `pnpm test:e2e`) and `phone`
(`kind: android`, `device: Wave 10`, the debug APK; the queue clears the app's data first, its default
`reset: clear`). `reset: uninstall` would let a debug build replace a release build, but the installed
Fabrica CLI (0.14.0) does not know `reset` or `maxMinutes` yet, so neither is written. The `android` project reaches the app's WebView with Playwright's
`_android` and waters her by the button. It runs **only through Fabrica's phone queue**
(`fabrica tests run --target phone`); `pnpm test:android` drives Chrome on a USB tablet and stays the
developer's own check of the PWA. `.fabrica/artifex/e2e.yaml` runs the `web` target on the e2e runner.
- **F10 — The version is in four files.** `package.json`, `apps/rosea/package.json` (which
`tauri.conf.json` reads), `apps/rosea-tauri/package.json` and `apps/rosea-tauri/src-tauri/Cargo.toml`.
`scripts/check-version.mjs <version>` prints each that differs in Fabrica's contract
(`<file> says <old>, the tag says <new>`), so *Deploy* bumps exactly those. The first release is
`v0.1.0`, the version every file has today.
- **F11 — The page's words are copy.** `AULA.md`, `.fabrica/aula/brief.md` and `.fabrica/notes/*.md`
are what a stranger reads about Rosea, like a store listing (§8). `lint:copy` scans them, so the
page never says *lonely*, never names the book, and makes no claim to heal anything. The release
notes `fabrica notes` writes from commit subjects are copy too: the release's `notes-copy` step runs
`lint:copy` over `target/notes/release-notes.md` before the page is made.
## 3. Risk analysis
Here risk means *a lonely person feeling worse*, *someone's location*, or *someone being reachable who
did not ask to be* (§5.1).
| Risk | Where | Answer |
| :-- | :-- | :-- |
| The page names the person it is for: *for lonely people* | `AULA.md`, the brief, the notes | They speak of the rose, the fox and the time we give to people, never of the reader's state. `lint:copy` scans all three (F11); a test of the script proves they are in its list. |
| The page promises comfort, or a cure | the same | No outcome is promised; the medical words are refused by `lint:copy`. |
| The book's look on a public page | the pictures (gardener, round planet, rose) | G6.1: not published until Mark decides (F1). The pictures are the code stand-ins, said plainly in the brief. |
| A real person's rose or town in a picture | `e2e/aula.spec.ts` | The demo rose is made by the test in a fresh browser profile; the town is a capital from the bundled list; the clock is invented. No file, no IndexedDB of a real profile is read. |
| An update check that tells a server who plays | the apps | None exists (F3). The apps still ask for no `INTERNET` permission and the shell links no plugin; `android.ts verify` and the shell's tests keep it so. |
| Auto Backup or a release build that carries debug flags | the release APK | `android.ts verify` runs on the release APK too (no permission, no backup); `custos-sign` refuses a debuggable APK. |
| Another program reaches into her | `domi-rosea://` | The URL only opens the window; its text is not read (F5). No capability is served (F6). |
| A web page opens Rosea | `domi-rosea://` | The browser asks first, as for any app link; the garden opens and does nothing else. |
| A signing key in the repository | the pipelines | Keys are Custos ids only; `custos-sign` holds no key material either (F4). |
| A release over a player's rose loses her | Windows, Android | Same identifier, same origin (`useHttpsScheme`, pinned by the shell's test), install over, never uninstall. On Android the same key; a debug and a release build cannot replace each other, so the test phone keeps debug builds only. |
| The phone is used outside the queue | the `phone` target | Only `fabrica tests run --target phone` runs the `android` project. The `android` project skips, saying why, without `FABRICA_TESTS_PACKAGE` and `ANDROID_SERIAL` (set by Fabrica). |
## 4. Gap analysis and the designed solution
| Gap | Before | After |
| :-- | :-- | :-- |
| G-T7 / G0.22: no CI for the apps | built by hand on this machine | built by Fabrica's runner from the tag; still on Mark's PC, but from a clean checkout and the same steps every time |
| G-T3: release signing keys | none | Custos only (F4) |
| No release, no page | — | the pipeline, the kit and the words; publishing is F1 |
| Installed copies never learn of a new version | — | F3 |
| No `domi-rosea://` | — | F5, Windows only |
| Nothing to show a stranger | — | F7, eight pictures |
| G0.23 (source maps) | maps in the PWA build | unchanged and still open: the installer embeds `dist-tauri/`, maps included; the source is public on Gitea already, so nothing new is exposed |
Not closed here: G6.1 (Mark's legal check), G0.13 (the PWA's host), G-T1 (iOS), Canalis Part B (F6),
the videos (F8).
## 5. Verification matrix
| Case | Unit | Integration | E2E / device | Manual |
| :-- | :-- | :-- | :-- | :-- |
| `check-version` passes with all four files equal, names each file that differs in the contract's words | `scripts/check-version.test.ts` | — | — | `node scripts/check-version.mjs 0.1.0` |
| `lint:copy` reads `AULA.md`, the brief and the notes; a forbidden word in any of them fails | `scripts/lint-copy.test.ts` | `pnpm lint:copy` | — | — |
| The pipelines and `tests.yaml` are valid | — | `fabrica artifex check` | — | `fabrica preflight rosea` |
| The NSIS hook registers and removes exactly `HKCU\Software\Classes\domi-rosea` with `"%1"` | `apps/rosea-tauri/test` (the hook's text and the config that names it) | `pnpm tauri:build` makes the installer | — | not run: installing writes Mark's real registry |
| The release APK has no permission and no backup | `android-privacy` tests (unchanged) | `build:android-release` ends with `android.ts verify` on it | — | — |
| The pictures: eight PNGs within Aula's limits, on demo data, the same on every run | — | `pnpm aula:shots`, then `fabrica aula shots` | `e2e/aula.spec.ts` | open them and look |
| The page | — | `fabrica aula brief`, `fabrica aula page` | — | read `aula-page.html` |
| The `web` target | — | `fabrica tests run --target web` | the e2e specs | — |
| The `phone` target: the WebView found, watered by the button, still watered after a restart | — | — | `e2e/android/garden.android.ts`, only through the phone queue | — |
| Bad weather: no `FABRICA_TESTS_PACKAGE` | — | — | the `android` project skips, saying why, before touching adb | — |
| A full release | — | `fabrica run release --step page` locally (signing dry-run) | — | the hub run, after F1 |
+81
View File
@@ -0,0 +1,81 @@
# Keep her safe, inside the apps (G-T4)
Status: built on `feature/keep-her-safe-apps`, 2026-11-17. Closes the release blocker found in
[`tauri-platforms.md`](tauri-platforms.md) G-T4 and, if a round trip is seen, G-T5. Builds on
[`keep-her-safe.md`](keep-her-safe.md). Review:
[`feature-keep-her-safe-apps.md`](../reviews/feature-keep-her-safe-apps.md).
## 1. Why and what, in the player's terms
*Keep her safe* is how a player makes sure their rose cannot be lost, and how she moves to another
device. In the browser it tells the truth about the browser. In the Android and desktop apps it
said the same words, and they were wrong there: *This browser may clear her if the garden is not
opened for a long time* — there is no browser, and an app's own storage is not cleared for being
left alone. It offered *Ask the browser to keep her*, which always answers no in an app. And on
Android, *Save her to a file* did nothing at all (measured on the tablet). A player was told she
might be lost, and the one remedy failed without a word.
Now, in the apps:
- She says where she lives, truly and calmly: *She lives in this app, on this device, until the app
is removed. A saved file keeps her anywhere.* No button that cannot work.
- *Save her to a file* opens Android's own *save* screen; the player chooses where (the phone, a
memory card, a cloud folder they already use). When the file is written, the garden says
*She is in that file now.* If they step back, nothing is said.
- *Bring her back from a file* opens Android's own file picker, as before.
The PWA is unchanged.
## 2. Technical architecture
```mermaid
flowchart LR
ks["packages/ui<br/>KeepSafe.svelte"] -->|"wiring.saveFile(name, text)<br/>wiring.keeping.where"| app["apps/rosea<br/>App.svelte"]
app -->|"PWA / Windows: &lt;a download&gt;"| browser["browser / WebView2 download"]
app -->|"Android: window.roseaFile.save(name, text)"| bridge["apps/rosea-tauri/android/java<br/>MainActivity.kt (copied into gen/)"]
bridge -->|"ACTION_CREATE_DOCUMENT"| saf["Android's save screen<br/>(Storage Access Framework)"]
saf -->|"uri"| bridge
bridge -->|"write, then event 'rosea-file-saved' (true|false)"| app
```
| # | Decision | Why |
|:--|:--|:--|
| A1 | **The words follow where she lives**: `RoseWiring.keeping.where` is `'browser'` or `'app'`, set in `App.svelte` from `__ROSEA_SHELL__`. In an app, `KeepSafe` shows `safe.app` and never asks `persist()`. | The words state facts about the platform; the platform decides which facts are true (lessons/design.md). The package chooses among its own words; the app only says where it is. |
| A2 | **Android saves through a small Kotlin bridge**, not a Tauri plugin: `MainActivity` adds one JavaScript interface, `roseaFile.save(name, text)`, which opens `ACTION_CREATE_DOCUMENT` through Tauri's own `launchActivityForResult` and writes the text to the chosen place. | No new dependency, no download, no IPC and no capability: the shell still grants the page nothing through Tauri. The Storage Access Framework needs **no permission** on any Android version (the APK check still demands none). A plugin (dialog + fs) would bring IPC, a capability, a CSP change and two packages for one file. iOS will need its own answer (G-T1). |
| A3 | **The bridge takes only what a rose file is**: a name like `rose-2026-11-17.json` and text up to 8 MB; anything else is refused before the picker opens. One save at a time. | The interface is reachable by any script in the page; the page is our own and has no network, but the bridge stays as narrow as the job. |
| A4 | **The answer comes back as a window event** (`rosea-file-saved`, `true` or `false`), dispatched by `evaluateJavascript`; `saveFile` returns a promise of it. The garden says *She is in that file now.* only on `true`. | The player sees the system screen close; without a word they cannot know whether it worked. A cancelled save is the player's choice and is not commented on. |
| A5 | `MainActivity.kt` lives in `apps/rosea-tauri/android/java/` and is copied over the generated one by `scripts/android.ts apply`; `check` refuses an APK build without it. The bridge class carries `@Keep` so a minified release build cannot strip it. | `gen/` is never committed (D6 in tauri-platforms.md). |
| A7 | **The page is kept between Android's system bars**, which show the garden's paper (light or dark with the system). Added after the tablet's screenshot showed the clock over the title and the navigation bar over *Bring her back from a file*. | Tauri's stock activity draws edge to edge, and the WebView does not reliably report the bars as `env(safe-area-inset-*)` (Culina measured the same). The colours are `--paper` from `tokens.css`, held equal by a test. |
| A6 | Windows keeps `<a download>`: WebView2 saves to *Downloads* and shows its own download flyout (measured in the platform review). | It works; the browser's own feedback is the confirmation there, as in the PWA. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Fear**: words that say she may be lost. | Removed in the apps (A1). The new sentence says the one true condition (removing the app) and the remedy. |
| **A broken promise**: a save that does nothing. | Fixed on Android (A2) and confirmed to the player (A4). |
| **Location in the file.** | Unchanged: the file never holds the town (keep-her-safe.md K4). |
| **Bytes leaving the device.** | Only where the player chooses in Android's save screen. If they choose a cloud folder, that app uploads it — their choice, made in the system's own screen. The game still has no `INTERNET`. |
| **A script calling the bridge.** | Only the game's own page runs in the WebView (no network, `'self'` CSP). The bridge refuses any other name or a huge text, and it can only open a screen the player must confirm. |
| **Reachability, guilt, counting.** | None: nothing new reaches anyone or counts anything. |
## 4. Gap analysis
Closes G-T4 for Android and Windows, and G-T5 on Android: the round trip (save through Android's
screen, bring her back from that file) passed on the tablet twice, 2026-11-17. Bringing her back on
Windows was not driven. iOS stays G-T1: WKWebView will need its own save (a share sheet or a document picker).
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| In an app: the app sentence, no *Ask*, no install hint, `persisted()` and `persist()` never called | unit | `packages/ui/test/rose.test.ts` |
| The app words never speak of a browser | unit | same |
| In a browser: the browser sentences as before | unit | same (existing cases) and the e2e suite |
| `saveFile` answering `true` → *She is in that file now.*; `false` → the word goes; a browser download → nothing said | unit | same |
| The bridge's contract with the game: package = identifier, interface name `roseaFile`, event `rosea-file-saved` with `.detail === true`, the file-name rule accepts `rose-<day>.json` and refuses five wrong names, `@Keep` on the class and method, no permission asked | unit (reads both sources) | `apps/rosea-tauri/test/android-bridge.test.ts` |
| The size limit (8 MB) and one-save-at-a-time | — | Kotlin only, not tested off the device |
| `android.ts check` refuses a project with Tauri's own `MainActivity` | script | seen: exit 1, then 0 after `apply` (review) |
| The APK still asks for no permission | artefact | `pnpm tauri:android` → aapt2 |
| Windows: the app words; *Save her to a file* starts a download | device | `e2e/apps/check-garden.ts desktop` |
| Android: the app words; save through Android's screen, *She is in that file now.*; bring her back from that file, *Everything in that file is already here.*; the file removed afterwards | device | `e2e/apps/check-garden.ts android` (uiautomator presses the system screens) |
+91
View File
@@ -0,0 +1,91 @@
# Keep her safe — the browser's promise, a file, and bringing her back
Status: built on `feature/keep-her-safe`. Gap G0.11, CLAUDE.md §8: *IndexedDB is evictable … call
`navigator.storage.persist()` where it exists, prompt iOS players to install, and make export-my-rose
a first-class feature. A player returning to find their rose gone is the cruellest bug this product
could have.* Review: [`feature-keep-her-safe.md`](../reviews/feature-keep-her-safe.md).
---
## 1. Why and what, in the player's terms
Beside *Her numbers* there is now **Keep her safe**. It opens a small, quiet section:
- **What the browser has promised**, in one true sentence: that it keeps her, or that it may clear
her if the garden is not opened for a long time.
- **Ask the browser to keep her**, when it has not promised yet. If it says no, that is said calmly,
and the file is the answer.
- On an iPhone or iPad that has not added the garden to the Home Screen: *add it, to keep her.*
- **Save her to a file**: a small file the player keeps, named for the day. It holds her care and
when it was given; it never holds the town.
- **Bring her back from a file**: on a new phone, or after the browser cleared her. Everything she
had comes back, and nothing she has now is lost. Bringing the same file twice adds nothing twice.
An installed garden asks the browser to keep her by itself, once, after the first care of a visit.
## 2. Technical architecture
```mermaid
flowchart LR
subgraph app["apps/rosea"]
wire["App.svelte<br/>navigator.storage, file download"]
end
subgraph ui["packages/ui"]
keep["KeepSafe.svelte"]
rose["Rose.svelte<br/>keys = current + past"]
end
subgraph storage["packages/storage"]
exp["exportRose / importRose<br/>asRoseFile"]
past[("profile: pastKeys")]
ev[("events")]
end
subgraph engine["packages/engine"]
replay["roseAt(events, keys)<br/>one replay per key"]
dedupe["newCare: each act once"]
end
wire --> keep --> exp --> ev & past
exp --> dedupe
rose --> replay
```
### Decisions
| # | Decision | Why |
|:--|:--|:--|
| K1 | The file holds `{ format: 'rosea-rose', version: 1, keys, events }`: her public keys and her whole care log. **Never the private key** (it cannot be exported: rose.md R9), **never the sunset town**. | The town is the one location Rosea knows; choosing it again is one tap. The care log alone is what cannot be remade. |
| K2 | A rose is named by **a list of keys**: the current identity first, then the keys she had on other devices (`profile.pastKeys`). | The private key cannot move, so a rose brought back lives under a new key, and her old care names the old one. The log is never rewritten (CLAUDE.md §6.2). |
| K3 | **Each key's care is replayed on its own**; her days of care are the union. Water and today's needs come from the current key; stage, drift and warmth from all. | Replaying everything as one log could take a day away: one device's watering can make the other's "too much". Separate replays make bringing her back strictly additive, which is property-tested. |
| K4 | Import **appends only acts not already there** (same moment, giver, rose, act and amount) in one transaction, and **refuses a file that is not a rose** before writing anything. | Contributions only add (CLAUDE.md §1). A wrong file is an ordinary mistake, said calmly. |
| K5 | `persist()` is called **automatically only in an installed app**, once per visit, after the first care. Otherwise only when the player asks. | Chrome and Safari grant or refuse silently; Firefox shows a prompt. A prompt the player did not ask for, right after watering, would be a strange interruption. |
| K6 | The download is made on the device (`Blob`, `<a download>`), and the import reads a file the player picks. | Nothing is sent anywhere; the CSP stays `'self'`. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **The cruellest bug**: her care gone. | The file brings it back on any device, tested end to end with a fresh browser profile. |
| **Privacy**: the file is a diary of when someone was in the app. | It is made only when the player asks, stays wherever they put it, and the screen says what it holds. No town, no private key (tested). |
| **Feeling worse**: "the browser may clear her" can frighten. | It is said once, only on request, with the remedy in the same sentence. |
| **A merged rose loses days.** | K3, property-tested: merging two logs never lowers either one's days of care. |
| **A tampered file** gives a rose days she was never given. | It only fools the player's own garden; nothing is compared with anyone (CLAUDE.md §1, *never count people*). Phase 3 must not trust imported care as proof towards friends. |
## 4. Gap analysis
| Gap | State |
|:--|:--|
| G0.11 eviction: `persist()`, export-my-rose | Built: persist on request and when installed; save; bring back |
| A reminder to save her now and then | Open: no nagging by design; the Letter can mention it |
| iOS install prompt beyond one sentence | Open: Safari has no install API |
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| A moved rose keeps every day under her old key; her water starts afresh; care under the new key adds | unit | `engine/test/rose.test.ts` |
| A moved rose that is opening drops petals, and gathering them helps | unit | same |
| Merging two logs never takes a day from either | property | same |
| `newCare` adds each act once, however often | unit | same |
| The file holds keys and care, no town, no private key; survives JSON | unit | `storage/test/rose-file.test.ts` |
| Bringing her back on a new device, twice, onto a device with care of its own, from this very device; refusing seven kinds of not-a-rose and changing nothing | unit | same |
| Keep her safe: the browser's answer, asking, a refusal said calmly, saving a dated file, bringing her back, a wrong file | unit | `ui/test/rose.test.ts` |
| Save on one browser profile, bring her back on a fresh one, reload: one day of care; the file has no town; axe | e2e | `e2e/shell.spec.ts` |
+121
View File
@@ -0,0 +1,121 @@
# The planet garden — a gardener, gestures, and her own small world
Status: built on `feature/planet-garden`, merged to `main` 2026-11-17; built, not deployed. Decided by the author, Mark, on 2026-11-17, after
seeing the garden as a page of buttons: *"It is a game: create a proper planet, a character who does
the care, animations of how the character does it; tap the rose for actions; swipe in patterns;
pull weeds by tapping them and swiping."* His answers the same day:
- **Her world:** a **round tiny planet** (reverses STYLE.md S2).
- **The character:** a **human gardener, a boy or a girl, customised at the beginning** (reverses
STYLE.md's *no people*).
- **Gestures:** tap her to choose care; swipe weeds out; pour by tilting; patterns for the rest
(sweep petals, drag the windbreak, stroke her petals). **Buttons stay** for keyboard and screen
readers (CLAUDE.md §7: accessibility is not a phase).
Review: `feature-planet-garden.md`.
## 0. The risk the author accepted, and the guards
A child tending a rose on a small round planet is the most recognisable image of the book whose
text, names and drawings CLAUDE.md §5.6 rule 3 forbids, and whose estate holds trademarks
(GAMEPLAY.md §7). The author was told this in the choice itself and chose it. Recorded here, in
STYLE.md and CLAUDE.md, with these guards, which become review points and avoid lines:
| Guard | Why |
|:--|:--|
| **The gardener is the player's own**: chosen and customised (boy or girl, skin tone, hair style and colour, clothes colour, a hat or not) | No two players' gardeners need look alike, and none is a fixed character from anywhere. |
| **Never**: a scarf, a long coat or cape, a green suit with epaulettes, a crown, a sword; no outfit option recreates one | The book's boy is drawn with these. |
| **The planet is a cultivated garden world**: meadow, the dry-stone wall, the garden bed, the chair, the wild berry bush; **no volcanoes, no baobab-like trees, no single lamp post** | The book's planet is bare with volcanoes and baobabs. |
| **The look is our gouache** (STYLE.md §1), never pen-and-wash | The book's drawings are pen and watercolour. |
| **No glass dome over her, ever; the windbreak is woven willow** | Unchanged (§4). |
| **A legal check of the look before any public release** (store listings, Pages made public) | New gap; the author's risk, made visible. |
## 1. Why and what, in the player's terms
**The first open.** Before the garden, one quiet question: *Who tends her?* The player chooses a
boy or a girl, then skin tone, hair, clothes colour, a hat. A small preview of their gardener turns
as they choose. *This is me* finishes it. It can be changed later, from the garden.
**The garden is a small round world.** Her planet fills the lower half of the screen, the real sky
above it (code, as now). On its top: the garden bed with the rose, the wall behind, the chair, the
watering can by the bed; the gardener stands beside her.
**Tap the rose** and the care she needs right now opens around her as a small ring of choices (only
what she needs; *Touch her* is always there). Choose one and the gardener walks over and does it,
with the player's own hand in the gesture:
| Care | The gesture | The gardener |
|:--|:--|:--|
| **Water** | **Press the can and tilt**: drag sideways from it; the further the tilt, the faster the pour. Let go when her leaves lift (the same *by feel* as now). | Holds the can, tilting it as the player tilts; water falls. |
| **Weeds** | Weeds show in the bed. **Tap a weed, then swipe up** from it: it stretches, then pops out with its roots. | Bends, tugs, the weed comes free, the gardener bumps down on the grass and gets up. |
| **Fallen petals** | **Sweep**: one swipe sideways across the petals gathers them. | Sweeps them into a little pile and pockets them. |
| **Wind** | **Drag the windbreak** from the side of the bed into the wind, on her windward side. | Carries it and sets it in the ground. |
| **Touch her** | **Stroke** slowly across her petals: a fond answer. Quick, rushed taps: *Gently. I have thorns.* (thorns.md) | Reaches out and touches a petal. |
Every act is the same event as today (rose.md, thorns.md): nothing about growth, drift, the petal or
her numbers changes. The gestures are how the player's hand meets the same rules.
**Keyboard and screen readers.** The ring's choices are buttons; each one also works without its
gesture: *Water* still pours while Space or Enter is held; *Pull the weeds* pulls them all, one by
one, while the gardener does it; *Gather the petals*, *Shade her*, *Touch her* likewise. The scene
says what happens in one polite line.
**Reduced motion.** The gardener does not walk or bend: the scene shows the result at once.
## 2. Technical architecture
```mermaid
flowchart LR
app["apps/rosea<br/>App.svelte"] --> shell["packages/ui<br/>Shell: first-open choice, then the scene"]
shell --> scene["packages/ui/scene<br/>Planet.svelte (SVG): planet, bed, rose, can,<br/>weeds, petals, windbreak, gardener"]
scene --> gestures["packages/ui/scene/gestures.ts<br/>pure: tilt, swipe up, sweep, drag, stroke"]
scene --> engine["packages/engine<br/>rose (care, pour), touch (thorns),<br/>scene/ weedsToday, petalsToday (seeded counts)"]
shell --> storage["packages/storage<br/>profile: gardener (shape-checked)"]
```
| # | Decision | Why |
|:--|:--|:--|
| G1 | **One SVG scene** (`Planet.svelte`), every part its own group with a stand-in drawn in code until art is accepted; the sky stays code (S5). | One coordinate system for gestures, animation and layout; no canvas, so every part can carry an accessible name. |
| G2 | **Gesture recognisers are pure functions** of pointer samples (`gestures.ts`): `tiltOf`, `isSwipeUp`, `isSweep`, `dropTarget`, `strokeOf`. Unit- and property-tested. | Input interpretation is not game logic, but it must be testable without a browser. The rules stay in the engine. |
| G3 | **How many weeds and petals** a day shows is the engine's: `weedsToday(seed, day)` (2–4 when `weedsOn`), `petalsToday(seed, day)` (3–5 when `petalsOn`). One `weed` / `petals` care event when the **last** one is pulled or gathered. | A count on screen is the engine's (CLAUDE.md §6.2). Half-pulled weeds are not care yet: nothing is written until the job is done, and leaving half-way loses nothing earned. |
| G4 | **Pour by tilt** maps tilt to the same pour rate the hold uses (`ROSE.fullPour` over `FULL_CAN_MS`), scaled 0–1.5× by tilt; the event's `amount` is unchanged in meaning. | Watering by feel (rose.md R1) stays one rule. |
| G5 | **The gardener** is a separate component with poses (`stand`, `walk`, `pour`, `bend`, `pull`, `sweep`, `carry`, `reach`, `sit`) and a look from the player's choice. Poses are SVG stand-ins now. Painted art comes as **layered parts** (decided by the author 2026-11-17, STYLE.md §3b): body, clothes, apron and boots, hair, hat, each painted over one guide in register and stacked in the scene (G1.11). | Art and animation can arrive later without touching gestures or rules. |
| G6 | **The gardener's look is stored in `profile`** as `{ presentation: 'boy' \| 'girl', skin, hair, hairColour, clothes, hat }`, each from a fixed list; shape-checked like every stored value. Never sent anywhere. | No free text; nothing identifying; local only (CLAUDE.md §4). |
| G7 | **The ring** opens on a tap of the rose; it holds only her current needs plus *Touch her*; Escape or a tap outside closes it; focus moves into it and back. | Silence and calm: no permanent row of buttons over her. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Likeness to the book** (the author's accepted risk) | §0's guards, as avoid lines in every prompt, review points, and a legal check before release. |
| **Soul: a child avatar for adult players** | The author chose boy or girl. Recorded as a question for his two-week play: does an adult player see themselves in a child gardener? A grown-up option is one list entry away. |
| **Soul: fiddly gestures that make care feel like failing** | Generous thresholds; every gesture has a button; a missed gesture does nothing and says nothing; nothing is lost. |
| **Motion** | `prefers-reduced-motion`: no walking or bending; results at once. |
| **Accessibility** | Buttons for every act (G7); one polite line says what the gardener did; keyboard focus never trapped. |
| Privacy | The gardener's look stays in `profile`, on the device; it is not in the rose file (keep-her-safe.md K4 is unchanged). |
| Offline | Everything is code and bundled stand-ins. |
## 4. Gap analysis
- New: **G1.9** the planet garden (this); **G6.x** a legal check of the look before any public release.
- STYLE.md: S2 (where she lives) and *no people* are reversed by the author; §3b *the gardener* is
new; §4 and §7 gain the guards; the manifest gains the planet, the gardener's sheet and pose
sheets, and the customisation parts.
- Not in this feature: the gardener on the journey's other planets (Phase 2), the fox on her planet.
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| `tiltOf`: sideways drag → 0–1 tilt; `isSwipeUp` needs upward distance and direction; `isSweep` needs sideways distance across the petals; `strokeOf` tells a slow stroke from a tap | unit + property | `ui/test/gestures.test.ts` |
| `weedsToday` / `petalsToday`: 0 on a day without, 2–4 / 3–5 with, the same on every replay | unit + property | `engine/test/scene.test.ts` |
| Gardener look: every option list is fixed; storage refuses anything else; it never enters the rose file | unit | `storage/test` |
| First open asks *Who tends her?*; the choice is kept; *Change gardener* reopens it | unit | `ui/test/gardener.test.ts` |
| Tap the rose: the ring shows only her needs plus *Touch her*; Escape closes it and focus returns | unit | `ui/test/planet.test.ts` |
| Pulling every weed writes one `weed` event; leaving half-way writes none | unit | same |
| A sweep across the petals writes one `petals` event; dragging the windbreak onto the windward side writes `shade` | unit | same |
| Pour by tilt writes one `water` event whose amount follows the tilt and time | unit | same |
| Buttons do every act without a gesture | unit | same |
| Reduced motion: no animation classes | unit | same |
| Built app: first-open choice, tap the rose, pull weeds by swiping, axe | e2e | `e2e/planet.spec.ts` |
| The real tablet: the same by real touch | device | `scripts/android-smoke.ts` (made permanent here) |
+120
View File
@@ -0,0 +1,120 @@
# The rose — care with a touch of skill, growth from days of care, drift instead of loss
Status: built on `feature/rose-care`. ROADMAP Phase 1: *one rose with her face: care with a touch of
skill (water by feel, shade, weeds, petals), moods, thorns, growth from total days of care, drift
instead of loss, her numbers one tap away, and speech-bubble teaching* (GAMEPLAY.md §1–2, §4).
Review: [`feature-rose-care.md`](../reviews/feature-rose-care.md). Not yet here: the day's sentence
and the folded petal (the library is empty, G0.18), the in-game sunset with the chair.
---
## 1. Why and what, in the player's terms
The garden now has **the rose**. She stands in her bed under the sunset line, with a face in her
bloom, and she says, in a small bubble, what she needs.
- **Water by feel.** Press and hold *Water*: the can pours slowly, and the rose's leaves lift when she
has enough. Let go then. Pour too long and she is *too full*, which helps no more than too little.
On a keyboard, hold Space or Enter; a screen reader hears when the leaves lift.
- **Weeds** appear some mornings. **Fallen petals** some days, once she is opening. **Wind** comes on
some days for an hour and a half: *Shade her* while it blows. Each button shows only when it is
needed, so the screen stays quiet.
- **She grows from days of care that helped**: a calendar day on which at least one act met a real
need. Ten acts on one day count as one day. A long visit is worth no more than a short one.
Bud → opening → half bloom → full bloom.
- **She drifts, never breaks.** Some days without care and she turns a little away; a week, and she
closes a little and waits. Her stage never goes down. The first helpful touch brings her back.
- **Her numbers** are one tap away: water, warmth, days of care, and how she is doing. Nothing is
counted against the player; there is no streak and no "missed".
## 2. Technical architecture
```mermaid
flowchart LR
subgraph app["apps/rosea"]
wire["App.svelte<br/>identity, zone, now, events"]
end
subgraph ui["packages/ui"]
rose["Rose.svelte<br/>picture, bubble, care, numbers"]
end
subgraph engine["packages/engine (pure)"]
model["rose/rose.ts<br/>roseAt(events, seed, now, zone)"]
days["time/localDay.ts<br/>localDay, localMinutes"]
model --> days
end
subgraph storage["packages/storage"]
events[("events<br/>append-only")]
keys[("keys")]
end
subgraph identity["packages/identity (new)"]
id["createIdentity()<br/>ECDSA P-256, private key non-extractable"]
end
schema["packages/schema<br/>care event + amount"]
wire --> rose --> model
wire --> events & keys
wire --> id
model --> schema
events --> schema
```
- **The log is the truth** (CLAUDE.md §4). Every care act is one append-only `care` event. The rose
at any moment is `roseAt(events, seed, now, timeZone)`: a pure replay. Nothing about her is stored
except the log; `derived` is not needed while the replay is this cheap.
- **Her hidden state** is a water level that falls over time and rises when poured. Weeds, petals and
wind come from a seeded hash of the rose's own key and the local day, so they are the same on every
replay and every device, and no randomness enters the engine.
- **Identity** arrives because the care event names `from` and `to` by public key. For her own rose
both are the player's key. The private key is non-extractable and kept by `@rosea/storage` as an
opaque `CryptoKey`; nothing signs anything yet.
### Decisions
| # | Decision | Why |
|:--|:--|:--|
| R1 | **The care event gains `amount`** (0–1, required for `water`, absent otherwise). | "Pour slowly until the leaves lift; too much is as bad as too little" cannot be replayed from the act alone. The schema change is the sanctioned way to make it derivable (CLAUDE.md §6.2). |
| R2 | **Water**: the level falls by 0.3 a day; a full pour (holding about 3 s) adds 0.6. She is thirsty below 0.25, needs water below 0.4, has enough from 0.4, and is too full above 0.95. A new rose starts at 0.3, so the first watering helps and teaches. | *Assumption for the author*: one helpful watering about every day and a half. |
| R3 | **A pour helps** only when she needed it (below 0.4) and it leaves her between 0.4 and 0.95. | GAMEPLAY §1: too much is as bad as too little. |
| R4 | **Weeds** grow overnight on about 40 % of days; **fallen petals** on about 30 % of days from the opening stage; **wind** on about 25 % of days, for 90 minutes starting between 9:00 and 18:00 local time. Each is a need until met that day. | *Assumption for the author.* Seeded per rose and day (FNV-1a), so replays agree. |
| R5 | **Stages** from days of care: bud 0–2, opening 3–9, half bloom 10–24, full bloom 25+. | *Assumption for the author*: full bloom after about a month of real days. |
| R6 | **Drift** from local days since the last helpful day: 0–2 none, 3–6 a little (turned away), 7+ more (closed a little, waiting). It changes her face, never her stage. | GAMEPLAY §1 and CLAUDE.md §8, *drift that reads as blame*: drawn as waiting. |
| R7 | **Warmth** is the number of days of care in the last seven, said as *"3 days this week"*, and *"resting"* at none. **Trend**: *growing* (a day of care in the last two), *steady*, or *waiting* (drift). | GAMEPLAY §2 asks for warmth and trend. Words that never say *missed*. |
| R8 | The day of an act is the local day **in the rose's zone**: the sunset town's zone, or the device's if there is none. | One zone for the sunset and the care, so a day means the same thing in both. |
| R9 | **ECDSA P-256** for the identity keypair, not Ed25519. | Every browser that can install the PWA has it; Ed25519 arrived in Chrome only in 2025. Revisited with the Phase 3 identity doc. |
| R10 | Her pictures are the **art board's stand-ins** until real art is accepted. A mood picture shows only at full bloom; before that, the stage picture. | The stand-ins exist for every stage and mood; the moods are drawn at full bloom only (art manifest). |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Guilt.** A thirsty, closed rose after a week away can read as *you neglected me*. | She is *waiting*, never hurt; her words never say *forgot* or *missed*; one touch brightens her. The bubble copy passes `lint:copy` and the soul review below. |
| **Streak by another name.** Warmth counts recent days. | It is shown only on request, never counts absence (*resting*, not *0 of 7*), and changes nothing about growth. |
| **Compulsion.** Tapping for growth. | Growth is days, not acts: ten acts in one day are one day (property-tested). Buttons appear only when there is a need. |
| **Skill as a barrier.** Holding to pour is hard for some hands. | Holding Space or Enter works; the leaves lifting is announced; a short pour can be topped up. |
| **Location / reachability.** | None new. The events stay on the device; the key never leaves it. |
| **A lost rose.** IndexedDB eviction (CLAUDE.md §8). | Not solved here: G0.11 (`persist()`, export-my-rose) is next. Stated in the review. |
## 4. Gap analysis
| Gap | Solution | State |
|:--|:--|:--|
| G1.4 The rose: care, growth, drift, moods, numbers | This feature | Built |
| G0.15 `identity` deferred | `@rosea/identity`: create and keep a keypair | Built (minimal) |
| G0.19 Event kinds other than `care` | Not needed yet | Open |
| G0.11 Eviction: `persist()`, export-my-rose | Next | Open, more urgent now that there is a rose to lose |
| The day's sentence, the folded petal | Needs the library (G0.18) | Open |
| Speech-bubble lines from a curated library | Lines live in `ui/copy`, passing `lint:copy` | Built for the rose's needs |
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Water falls over time, a pour raises it, too much is too full; a pour helps only when needed and in range | unit | `engine/test/rose.test.ts` |
| Weeds, petals and wind are the same on every replay, differ between roses, appear at about their rates | unit, property | same |
| **Growth never decreases** as events are added; **many acts on one day count once**; **a gap never lowers the stage**; **replaying the same log twice gives identical state**; drift never changes the stage | property (fast-check) | same |
| Drift levels at 0, 3 and 7 days; the first helpful act after a gap clears drift | unit | same |
| Schema: `amount` required for water, refused elsewhere, bounded 0–1 | unit | `schema/test` |
| Identity: a public key that fits the schema; the private key cannot be exported | unit | `identity/test` |
| Storage: events append and come back in order; a malformed event is refused; keys round-trip | unit (fake-indexeddb) | `storage/test` |
| UI: the rose shows her stage; holding Water pours and the leaves-lift announcement comes; Weed appears only with weeds; the numbers open on request | unit (testing-library) | `ui/test/rose.test.ts` |
| Built app: water the rose by holding, see *1 day of care*, reload, still 1 | e2e | `e2e/shell.spec.ts` |
| Offline: tend the rose with the server gone, reload, the care survived | offline | `e2e/offline.spec.ts` |
+107
View File
@@ -0,0 +1,107 @@
# The sun — real sunrise and sunset, on the device
Status: built on `feature/sun`. ROADMAP Phase 1, *the sun*. Review:
[`feature-sun.md`](../reviews/feature-sun.md). The first piece of Phase 1, and the one the
spike leaves behind even if the answer is no (ROADMAP §0: *a reusable sentence library and a sun
module*).
---
## 1. Why and what, in the player's terms
Every day, at the player's **real** local sunset, the game invites them to put the phone down and
look at the real one (CLAUDE.md §1). The rose's sentence is best opened then. The in-game sunset
says when tonight's real one is. All of that needs one honest answer: *when does the sun set
here, today?*
What the player gets from this piece alone: nothing on screen yet. What it guarantees:
- **The time is real.** It is computed from the sun's position and checked against a published
almanac for six cities on four continents, both hemispheres, the equator and the Arctic.
- **It never needs the network.** It is maths on the device. No lookup, no service.
- **It never needs GPS.** The place is a city the player chose, or a guess from the device's time
zone (CLAUDE.md §5.6 rule 6). Choosing that city is the app's job, later in Phase 1.
- **The far north is not forgotten.** Where the sun does not set in summer or rise in winter, the
engine still gives a gentle moment for the invitation (D4), never an error and never silence.
- **A clock change is the clock's doing.** The sun moves a minute or two a day. When the clocks
change, the sunset on the clock jumps an hour while the sun itself does nothing. The engine
works in instants, so the jump only appears where the clock is read.
## 2. Technical architecture
```mermaid
flowchart LR
app["apps/rosea (later in Phase 1)<br/>the chosen city or the device zone"] -->|"place, day"| sun
subgraph engine["packages/engine (pure)"]
sun["sun/sun.ts<br/>sunDay(day, place)<br/>invitation(sunDay)"]
time["time/localDay.ts<br/>the only place a day is computed"]
sun --> time
end
golden["engine/test/fixtures/sun-usno.json<br/>28 published days"] -.->|golden tests| sun
script["scripts/fetch-sun-golden.ts<br/>run by hand, never by a test"] -.->|records| golden
```
- **`sunDay(day, place)`** takes a `LocalDay` and `{ lat, lon, timeZone }` and returns one of
three shapes: `sun-sets` (sunrise, solar noon, sunset), `polar-day` (solar noon, lowest light) or
`polar-night` (solar noon). Every time is an epoch-milliseconds instant.
- **`invitation(sunDay)`** is the instant the game invites the player outside: the sunset, or the
polar alternative (D4). The app renders it and decides nothing.
- **The algorithm** is NOAA's solar calculator (after Meeus, *Astronomical Algorithms*): the sun's
declination and the equation of time at a given instant, then the hour angle at which its
centre is 0.833° below the horizon (refraction and the sun's radius). Each event is refined by
recomputing at its own instant.
### Decisions
| # | Decision | Why |
|:--|:--|:--|
| D1 | NOAA's algorithm, in TypeScript, in the engine. No library, no WASM. | About 80 lines of public-domain maths, accurate to about a minute below 72° latitude. CLAUDE.md §2: WASM only with a measurement that says it must. |
| D2 | **"Today's sunset" is the one after today's solar noon**, even when it falls after midnight. "Today" is the local day whose solar noon it is. | Reykjavík on 21 June sets at 00:04 on the 22nd. The published table for the 21st lists the *previous* evening's 00:04. A player in Reykjavík means tonight's sunset, not last night's. |
| D3 | The engine returns instants. Clock times are read in the app, with the city's zone. | One instant has one meaning. The DST jump is then only the clock's (§1), and the engine cannot be wrong about it. |
| D4 | **Polar day**: the invitation is the *lowest light*, solar midnight. **Polar night**: the invitation is solar noon, when the twilight is brightest. | CLAUDE.md §8 asks for a gentle alternative, *e.g. the hour the light is lowest*. In polar night that hour is all day, so the brightest one is the moment worth going out for. **Decided by the author 2026-11-01** (Q10). |
| D5 | Near the edge of polar day or night, an event whose hour angle leaves the possible range is clamped to solar midnight or noon. | On those few days the sun only grazes the horizon. A defined answer beats a NaN. Accuracy there is worse, and the tests say so. |
| D6 | Golden values come from the U.S. Naval Observatory's published tables, recorded once into a fixture by `scripts/fetch-sun-golden.ts`. | CLAUDE.md §5.5 asks for published tables. Recording them keeps tests offline and deterministic, and the script shows exactly where each number came from. |
| D7 | Tolerance: **2 minutes**, stated in the test. | The almanac rounds to the minute; NOAA's method is good to about a minute at these latitudes. |
| D8 | Where a clock is about twelve hours off the sun, one calendar day a year can hold no solar noon. The engine then gives the nearest noon and never throws. | Found by fast-check at 179.9° W on UTC: noon crosses midnight in late December, so 26 December has none. No real zone is that far off the sun (the worst are about three hours), so the property tests give each place a zone that follows its longitude, and a unit test pins the impossible case. |
## 3. Risk analysis
Risk here means a person feeling worse, a person's location, or a person becoming reachable.
| Risk | Where | Answer |
|:--|:--|:--|
| **A wrong sunset sends someone out to a dark sky**, or too late. A broken promise from the one feature that points beyond the screen. | Correctness | Golden tests in six cities, including DST days; property tests across latitudes and days. |
| **The far north gets nothing** — no sunset, so no invitation, every day for months. A person left out by geography. | Soul | D4: a defined, gentle moment on every day, tested at Tromsø and at ±80°. |
| **The time is used to find someone.** A sunset time narrows down where a person lives. | Privacy | It is computed and kept on the device. This module has no I/O at all, and the engine's lint rule forbids it. Phase 4's shared sky uses a coarse cell and a day bucket only (CLAUDE.md §4), never this. |
| **The test fixture holds coordinates.** | Privacy | City centres from public sources, never a player. No test uses a real person's location (§5.5). |
| **A DST day records the wrong local day** for a sunset, and the rose's sentence moves to the wrong day. | Correctness | The day is only ever computed by `localDay`. Tested on all six DST transition days in the fixture. |
Reachability: none. The module talks to no one.
## 4. Gap analysis and the designed solution
| Gap | Solution | State |
|:--|:--|:--|
| No `engine/src/sun/` (CLAUDE.md §2, §7: *one module computes the sun*) | `sun/sun.ts`: `sunDay`, `invitation` | Built |
| Polar day and night: a predicted trap (CLAUDE.md §8) | Two defined kinds and D4. **Measured**: Tromsø has no rise or set on 21 June and no events on 21 December | Built; the trap is confirmed |
| DST and the local day: a predicted trap | D3 and `localDay`. **Measured**: the Prague sunset is 18:28 on 28 March and 19:29 on the 29th; the sun moved one minute | Built; the trap is confirmed |
| Golden tests against published tables (§5.5) | 28 days in 6 cities, recorded from USNO | Built |
| Choosing a city, the time-zone guess, showing the time | The app, with a city list; later in Phase 1 | **Open** (G1.2) |
| The invitation in polar night (D4) | Noon twilight | Decided by the author (Q10) |
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Sunrise, solar noon and sunset match the USNO table within 2 min, in the city's own clock, on 26 days in 6 cities | unit, golden | `engine/test/sun.test.ts` |
| The fixture's offset agrees with the IANA zone on every day, so the table and the zone database tell the same story | unit, golden | same |
| Tromsø 21 June is polar day; 21 December is polar night | unit, golden | same |
| Reykjavík midsummer: tonight's sunset falls after midnight, on the next local day (D2) | unit, golden | same |
| A DST change moves the clock's sunset by an hour while the instant moves by about a day | unit | same |
| For any latitude within ±60°, any longitude and any day of 2026: sunrise < noon < sunset, noon is midway, noon is on the asked day | property | same |
| Sunsets on consecutive days are never more than 5 minutes apart within ±60° | property | same |
| ±80° on the solstices: polar day and night, the right way round in each hemisphere | unit | same |
| The invitation is the sunset, the lowest light, or noon, by kind | unit, property | same |
| A day that does not exist, a latitude above 90°, an unknown zone: refused | unit | same |
| Nothing leaves the device | lint | the engine purity rule already covers `src/sun/` |
| Choosing a city, and seeing the time in the app | e2e, offline | **later in Phase 1** |
+61
View File
@@ -0,0 +1,61 @@
# The sunrise in the garden
Status: built on `feature/sunrise`. ROADMAP Phase 1: *the sun: real local sunset **and sunrise**, on
device; polar day/night handled.* CLAUDE.md §1, *points beyond the screen: the real sunset, the real
sunrise*. The sun module (`sun.md`) has computed sunrise since Phase 1 began; the garden never showed
it. Review: [`feature-sunrise.md`](../reviews/feature-sunrise.md).
## 1. Why and what, in the player's terms
The line under the garden names the next real thing to look up for:
| When | The line |
|:--|:--|
| From midnight until sunrise | *The sun rises at 06:41 in Brno.* |
| From sunrise until tonight's sunset | *Tonight the sun sets at 16:12 in Brno.* (as before) |
| From sunset until midnight | *Tomorrow the sun rises at 06:43 in Brno.* |
| Polar day, polar night | As before: the lowest light; the brightest twilight. |
Someone awake at three in the morning is told, quietly, when the light comes back; nothing invites
them anywhere. The sunset stays the game's invitation (the petal's good moment, the in-game sunset):
**the in-game sunset's closing words keep naming the real sunset**, because that is what they are for.
## 2. Technical architecture
```mermaid
flowchart LR
shell["packages/ui<br/>Shell: SunsetLine (next)"] --> engine["packages/engine<br/>sun.ts: nextSunEvent"]
chair["packages/ui<br/>ChairSunset: SunsetLine (sunset)"] --> engine2["packages/engine<br/>sun.ts: nextInvitation"]
```
| # | Decision | Why |
|:--|:--|:--|
| R1 | **`nextSunEvent(now, place)`** in `engine/sun`: the next invitation's day; if that day's sunrise is still ahead, the sunrise; else the invitation. Pure, instants only (sun.md D3). | One module computes the sun (CLAUDE.md §7); the UI reads, never decides. |
| R2 | Built on `nextInvitation`, so Reykjavík's after-midnight midsummer sunset (sun.md D2) still shows as tonight's sunset, not as a sunrise. | The only subtle case; tested. |
| R3 | *Tomorrow* only when the sunrise belongs to a later local day than now, as the sunset line already does. | Same reading of the clock in both. |
| R4 | `SunsetLine` gains `of: 'next' \| 'sunset'`; the garden asks for the next event, the in-game sunset for the sunset. | The chair scene tells the player when the real sunset is (chair-sunset.md). |
| R5 | Polar day and night are unchanged: no sunrise exists to name. | sun.md D4. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Dependence / a nudge at night**: a line that pulls an awake player to the screen. | It is the same quiet line, changed only in what it names; no new notice, no invitation, nothing counted. |
| **Guilt**: *you missed the sunrise*. | Nothing ever refers to a missed sunrise; after sunrise the line simply names the sunset. |
| Privacy, reachability, offline | Unchanged: computed on the device from the chosen town. |
## 4. Gap analysis
Closes the last Phase 1 roadmap item that the screen did not show. Sunrise *mechanics* (sunrise-only
visitors, Phase 2; ROADMAP §6 open question) are not designed here.
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Before sunrise: today's sunrise; after sunrise: tonight's sunset; after sunset: tomorrow's sunrise | unit | `engine/test/sun.test.ts` |
| Reykjavík midsummer after midnight, before the late sunset: the sunset, not a sunrise | unit | same |
| Polar day and night: unchanged | unit | same |
| **Property:** the event is never in the past, and nothing (sunrise or sunset) comes between now and it | property | same |
| The garden's line at 05:00, 12:00, 22:00; the in-game sunset's words still name the sunset at 22:00 | unit | `ui/test/sunset.test.ts`, `ui/test/chair-sunset.test.ts` |
| Built app at 05:00 in Brno: the sunrise line | e2e | `e2e/shell.spec.ts` |
+122
View File
@@ -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<br/>device zone, now, wiring"]
end
subgraph ui["packages/ui"]
shell["Shell.svelte"] --> ask["SunsetPlace.svelte<br/>the question and the search"]
shell --> line["SunsetLine.svelte<br/>tonight's sunset"]
end
subgraph content["packages/content"]
guess["places/guess.ts<br/>zone-guesses.json (25 KB)"]
towns["places/places.ts<br/>places.json (496 KB, loaded on demand)"]
end
subgraph storage["packages/storage (new)"]
profile["profile store<br/>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<br/>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` |
+125
View File
@@ -0,0 +1,125 @@
# Four versions, one garden — the Tauri 2 shell
Status: built on `feature/tauri-platforms`, 2026-11-17. Decided by the author the same day: *"I need
also android apk version, desktop version, ios version and pwa version … based on the tauri2
framework."* CLAUDE.md §2 (*Four versions, one garden*), §3, §4, §8; ROADMAP *The platform track*.
Review: [`feature-tauri-platforms.md`](../reviews/feature-tauri-platforms.md).
## 1. Why and what, in the player's terms
Until now Rosea Domi was a page you open from a link and may add to the home screen. Now the same
garden also comes as an **app**: an Android app to install from a file (later from a store), a
desktop app for Windows (macOS and Linux once built on those systems), and an iOS app once there is
a Mac to build it on. The PWA stays as it is.
What the player meets is the same in all four: the same rose, the same words, the same sunset, the
same *Keep her safe*. Nothing asks for an account, nothing goes online. Differences they may notice:
- The app opens straight into the garden, with its own icon, without a browser around it.
- In the app there is never *A new version of the garden is ready*: a new version comes as a new app.
- A rose in the PWA and a rose in the app on the same phone are **two roses**. To carry one across,
*Keep her safe* saves her to a file and brings her back (on Android, see G-T4).
Why now and not in Phase 6: the shell needs no new feature, and an APK puts the Phase 1 spike on the
author's phone without any hosting (G0.13 is still open).
## 2. Technical architecture
```mermaid
flowchart LR
subgraph game["one Svelte 5 codebase"]
schema["packages/schema"] --- engine["packages/engine"]
engine --- ui["packages/ui"]
storage["packages/storage<br/>(IndexedDB)"] --- engine
content["packages/content"] --- schema
identity["packages/identity"] --- schema
app["apps/rosea<br/>App.svelte wiring"]
ui --> app
storage --> app
content --> app
identity --> app
end
app -->|"vite build<br/>(default mode)"| dist["apps/rosea/dist/<br/>base /Rosea/, service worker,<br/>manifest, &lt;meta&gt; CSP"]
app -->|"vite build --mode tauri"| distt["apps/rosea/dist-tauri/<br/>base /, no worker, no manifest,<br/>no &lt;meta&gt; CSP"]
dist --> pwa["PWA<br/>GitHub Pages"]
distt --> shell["apps/rosea-tauri/src-tauri<br/>tauri.conf.json (CSP, name, version)<br/>lib.rs: a window, nothing else"]
shell --> win["Windows<br/>WebView2 · NSIS"]
shell --> android["Android<br/>System WebView · APK<br/>(privacy patch on gen/)"]
shell --> ios["iOS<br/>WKWebView<br/>(macOS + Xcode only)"]
shell --> mac["macOS / Linux<br/>WKWebView / WebKitGTK"]
```
| # | Decision | Why |
|:--|:--|:--|
| D1 | **`apps/rosea-tauri/` with `src-tauri/` inside**, a workspace package `@rosea/tauri` holding the Tauri CLI and the scripts. Not Tauri's default `apps/rosea/src-tauri/`. | The Tauri 2 CLI finds `src-tauri/tauri.conf.json` below the folder it runs in, so this is its expected layout one level down. The PWA's package stays free of Rust and of the CLI; the shell is deletable; its only input is a built folder, the same seam the e2e suites test. |
| D2 | **Two builds of one game.** `vite build --mode tauri` (`build:shell`) → `apps/rosea/dist-tauri/`: base `/`; `vite-plugin-pwa` disabled (no worker, no manifest; `registerSW` becomes its no-op); no `<meta>` CSP; no source maps. One build-time constant, `__ROSEA_SHELL__`, read in `App.svelte` only. | Tauri serves the files at the root of its own origin; the files are already on the device, so a worker would only cache a second copy and could serve a stale game after an update; see D4 for the CSP. A separate folder means a shell build can never overwrite the PWA's and be deployed by mistake. Source maps would ship inside every installer. |
| D3 | **Name, identifier, version.** `productName` and the window title `Rosea Domi` (a test holds them equal to `PRODUCT_NAME`); identifier **`cz.mareknovak.domi.rosea`**, like Culina's `cz.mareknovak.domi.culina`; `version` read from `apps/rosea/package.json` (Tauri accepts a path to a `package.json`). | The name may change in one commit (CLAUDE.md preamble). The identifier may not, once an app has reached a player: Android and iOS treat a new identifier as a different app, which would leave the rose behind in the old one. One version for the game and the apps; Android refuses a lower version as a downgrade. |
| D4 | **The CSP comes from Tauri**, the same string as the PWA's `<meta>` (`apps/rosea/csp.ts`), held equal by the shell's test. | A page with both a `<meta>` policy and a header obeys both; Tauri adds hashes for what it injects only to its own header, so a `<meta>` copy would block that. One string in source, two delivery routes. |
| D5 | **The Rust side opens a window and does nothing else.** No command, no plugin, no `@tauri-apps/api` in the game, and no `capabilities/` folder, so the page is granted no IPC. | The game already works fully in a webview. Every plugin is a new path for bytes to leave the device; each is reviewed before it is added (notifications, Phase 6). |
| D6 | **Android privacy, applied to the generated project before every build** (`src/android-privacy.ts`, `scripts/android.ts`, run from `tauri.android.conf.json`'s `beforeBuildCommand`): no `INTERNET` permission; `allowBackup="false"` and rules excluding every domain from cloud backup and device transfer; WebView metrics opt-out and Safe Browsing off. **Verified on the built APK** with `aapt2`. | `gen/android` is regenerated by `tauri android init` and never committed. Amicitia measured on 2026-11-08 that Android System WebView sends an Autofill query to Google the moment a field takes focus, and that manifest switches do not stop it; only the missing permission does. Rosea has a field (*Where do you want your sunset?*). Auto Backup would copy the care log, the keys and the town to the player's cloud without their choosing. |
| D7 | **Windows: WebView2's own traffic switched off** with `additionalBrowserArgs` — Amicitia's measured list (DNS-over-HTTPS upgrade, SmartScreen, experimentation, Autofill server, background networking, component updates, sync, pings, phishing detection, DNS prefetch). | Amicitia measured WebView2 reaching Google, Cloudflare and Microsoft within seconds of opening with no request of its own. The flags are undocumented feature names; a runtime update can break them, so the measurement is repeated per release (G-T6). |
| D8 | **Icons are made at build time** from `apps/rosea/public/icon.svg` with `tauri icon` and never committed. | No raster images in git except art in `art/final/` (CLAUDE.md §5.2). The SVG is a placeholder until the art pipeline makes the real icon (G0.21). |
| D9 | **In the apps, the game counts as installed**: it asks `navigator.storage.persist()` after the first care, as an installed PWA does, and never shows the iOS hint to add the page to the home screen. | WKWebView's user agent says *iPhone*; without this, the iOS app would tell the player to install the app they are in. |
| D10 | **`useHttpsScheme: true`**: the game's origin is `https://tauri.localhost` on Windows and Android. | IndexedDB is per origin. Tauri warns that changing this value between releases moves the database and the app can no longer see the old one: it must be chosen before the first release and never changed. `https` is a secure context without relying on the `*.localhost` exception (WebCrypto makes the player's key). |
| D11 | **Per-platform bundle targets** in `tauri.{windows,macos,linux}.conf.json`: NSIS (current user) on Windows; `.app` and `.dmg` on macOS; `.deb` and AppImage on Linux. | One config would try to make targets the machine cannot (MSI needs WiX, a download). |
| D12 | **Commands**: `pnpm tauri:dev`, `tauri:build`, `tauri:android` (a debug APK for arm64, then `verify`), `tauri:ios` (refuses off macOS with the reason). No Android dev command yet. | An Android dev build needs `INTERNET` to reach the dev server and `adb reverse` to keep it on 127.0.0.1 (CLAUDE.md §5.7); not needed to test what exists. |
What did **not** change: every package; the PWA's base path, worker, manifest and `<meta>` policy,
held by the existing e2e and offline suites. (The PWA's bundle is not byte-identical: `__ROSEA_SHELL__`
is folded to `'web'` there.)
## 3. Risk analysis
Risk here means *a lonely person feeling worse*, *someone's location*, or *someone being reachable who
did not ask to be* (CLAUDE.md §5.1).
| Risk | Platform | Answer |
|:--|:--|:--|
| **The rose is lost** when the app is uninstalled, the phone is replaced, or the app's data is cleared. | all apps | Uninstalling an app deletes its data; Android Auto Backup is deliberately off (D6). *Keep her safe* is the way to move or keep her, and on Android saving a file is unproven (G-T4). Said plainly in this doc and in the review; the Letter may say it to the player later. |
| **The rose is lost to an origin change** (`useHttpsScheme`, identifier, scheme). | Windows, Android | D3, D10: both fixed before the first release, with a test each. CLAUDE.md §8 records both as *forever*. |
| **Two roses** for one player (PWA and app). | all | Expected and stated (§1). Nothing in the game counts or compares them. |
| **The webview phones home** — bytes leave without the player. | Android | No `INTERNET`: the kernel refuses any socket (D6). Proof: `aapt2` on the APK, `dumpsys package` on the tablet. |
| | Windows | `additionalBrowserArgs` (D7). Not measured for Rosea on this machine (G-T6). WebView2 itself is updated by Windows Update, outside the app. |
| | iOS / macOS | WKWebView has no telemetry switch to set; not measured (G-T1). |
| **Location leaves the device.** | all | The town stays in IndexedDB. No backup (Android), no network (Android), no plugin (all). |
| **An SDK that counts.** | all | No analytics, crash-reporting or ads library: `Cargo.toml` has `tauri` alone and a test keeps it so; the game has no new dependency. Tauri itself sends nothing. |
| **The Windows installer fetches WebView2** if it is missing (Tauri's default `downloadBootstrapper`). | Windows | A one-time download from Microsoft during installation, on a machine without WebView2 (Windows 10 and 11 ship it). Noted, not changed: an offline installer would embed ~150 MB. |
| **Reachability.** | all | Nothing new: no free text, no network, no IPC. |
| **A stale game after an update.** | apps | No service worker (D2): the game is the one inside the installed package. |
| **Guilt or dependence.** | all | The app adds no notification, badge or reminder. Notifications are Phase 6, with their own Soul review. |
## 4. Gap analysis
| Id | Gap | Designed solution / state |
|:--|:--|:--|
| G-T1 | **iOS** cannot be built on Windows. | Needs macOS with Xcode (and its command-line tools, CocoaPods not required by Tauri 2), the Rust targets `aarch64-apple-ios` and `aarch64-apple-ios-sim`, and an **Apple developer account**: a free Apple ID can sign for one's own device for 7 days; TestFlight and the App Store need the paid programme. Then `pnpm tauri:ios`. Unknown until measured there: where WKWebView keeps IndexedDB, whether iOS purges it for an unused app, and whether `<a download>` saves her file. **Open.** |
| G-T2 | **macOS and Linux desktop builds** are not built. | Each on its own system: `pnpm tauri:build` (`.app`/`.dmg`; `.deb`/AppImage). macOS outside the App Store also needs signing and notarisation with a paid account, or Gatekeeper warns. **Open.** |
| G-T3 | **Release signing** for Android (a keystore) and Windows (a code-signing certificate). | Debug builds only today. The keystore and its passwords never enter the repository (CLAUDE.md §5.2). Phase 6. **Open.** |
| G-T4 | **Keep her safe inside the apps — a release blocker.** The game saves through `<a download>` on a blob URL, and its words speak of *this browser*. | **Measured 2026-11-17.** Windows: the save starts a download (`rose-2026-11-17.json`). Android (WAVE 10C, WebView 140): **nothing happens**. And in both apps `persist()` answers `false`, so *Keep her safe* says *This browser may clear her if the garden is not opened for a long time. A saved file keeps her for sure.* and offers *Ask the browser to keep her*: wrong words in an app, a worry that is not true of an app's own storage, and on Android a remedy that does nothing. Design for its own feature: app words for *Keep her safe* in `packages/ui/src/copy/` chosen by the shell constant; saving through `tauri-plugin-dialog` + a write (the first plugin, reviewed for network access) or the Android share sheet. **No APK or installer goes to any player before this is closed.** |
| G-T5 | **Bringing her back from a file** (`<input type="file">`) inside the apps. | **Measured 2026-11-17 on Android:** the system file picker opens (`com.android.documentsui` `PickActivity`). Reading a chosen file back was not tried (no saved rose on the tablet, see G-T4). Windows: not tried. **Open** until a round trip is seen. |
| G-T6 | **WebView2's traffic not measured for Rosea.** | Amicitia's `watch-desktop-network.ps1` approach: run the built exe, list its connections. Before the first desktop release. **Open.** |
| G-T7 | **No CI** builds the apps (G0.22). | Builds by hand on this machine; never committed. |
| G-T8 | **Storage eviction in WebView2 and Android WebView.** | **Measured 2026-11-17:** `persist()` and `persisted()` answer `false` in both (Android: quota 70 GB, 3 KB used). An app's webview data lives in the app's own storage and goes with an uninstall or *Clear storage*; whether Chromium's pressure eviction can reach it there was not measured. G-T4 is the answer either way. |
| G-T9 | **The icon is the PWA's placeholder.** | G0.21; the art pipeline. Android adaptive icons need a foreground layer then. |
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Name and window title equal `PRODUCT_NAME`; identifier is `cz.mareknovak.domi.rosea`; version read from `apps/rosea/package.json`, which exists | unit | `apps/rosea-tauri/test/config.test.ts` |
| Tauri's CSP equals `apps/rosea/csp.ts`; the shell's dev server and build point at `dev:shell` / `build:shell` and `dist-tauri`, dev on 127.0.0.1 | unit | same |
| `useHttpsScheme` is `true` (the origin is forever) | unit | same |
| WebView2's privacy flags are all in `additionalBrowserArgs` | unit | same |
| `Cargo.toml` depends on `tauri` alone; no `capabilities/` folder | unit | same |
| The Android build runs the privacy patch before the game's build | unit | same |
| Patch on Tauri's stock manifest: `INTERNET` gone, three attributes set, both meta-data present; a second run changes nothing; CRLF kept; an unexpected shape throws | unit | `apps/rosea-tauri/test/android-privacy.test.ts` |
| `manifestProblems` names each missing piece on the stock manifest and none on the patched one | unit | same |
| The committed rule files exclude every domain everywhere; a file missing one, or including something, is caught | unit | same |
| `apkProblems` on real `aapt2` output: the patched APK passes; a stock one (INTERNET, backup on) fails with names | unit | same |
| `vite build --mode tauri`: no worker, no `registerSW` script, no manifest, no `<meta>` CSP, assets under `/assets/`, `__ROSEA_SHELL__` replaced | integration | `apps/rosea-tauri/test/shell-build.test.ts` |
| The PWA build is unchanged: `<meta>` CSP, worker, manifest scope `/Rosea/` | e2e | `e2e/` (existing suites) |
| Windows: the release `.exe` opens the garden; water her; close; open again; she is still watered | manual + script | review (Playwright over WebView2's debugging port on 127.0.0.1) |
| Android: the debug APK installs on the WAVE 10C (Android 16), opens the garden, water her, force-stop, open again: still watered; the app has no `INTERNET` (offline by construction) | device | review (`adb`, Playwright over the WebView's DevTools socket) |
| The APK asks for no permission, sets `allowBackup=false`, metrics and Safe Browsing off | artefact | `pnpm tauri:android` → `android.ts verify` (aapt2) |
| `pnpm tauri:ios` on Windows refuses with the reason and builds nothing | manual | review |
| iOS, macOS, Linux | — | not possible here (G-T1, G-T2) |
+63
View File
@@ -0,0 +1,63 @@
# Thorns — touching her gently
Status: built on `feature/thorns`. ROADMAP Phase 1: *one rose with her face: … moods, thorns …*.
CLAUDE.md §1: *alive and a little vain, with thorns that are part of her.* STYLE.md: *the thorns are
part of her and never look threatening.* Decided by the author 2026-11-02: **thorns teach gentleness.**
Review: [`feature-thorns.md`](../reviews/feature-thorns.md).
## 1. Why and what, in the player's terms
The player can touch her: tap her picture (or Tab to it and press Enter).
- **A touch** — she answers fondly: *Oh. Hello.*, then *That tickles.* The first touch of a visit makes
her blush (seen in full bloom, where her face shows moods).
- **A rush of touches** — three quick taps within two seconds — she says *Gently. I have thorns.* and
rests for a few seconds; taps meanwhile do nothing. Then she is as before.
- **Nothing is recorded.** No event, no number, no penalty, nothing she remembers. A touch is not care:
it does not water her, does not count as a day of care, does not move anything she has earned.
Why: the fox (Phase 2) is tamed by touch, and taming needs patience. The rose rehearses it first, kindly,
in the one place where getting it wrong costs nothing.
## 2. Technical architecture
```mermaid
flowchart LR
ui["packages/ui<br/>Rose.svelte: a Touch her button over her picture"] -->|"now, state"| engine["packages/engine<br/>touch/touch.ts: touch()"]
engine -->|"fond | thorns | resting, next state"| ui
```
| # | Decision | Why |
|:--|:--|:--|
| T1 | The rule lives in `engine/touch` as a pure function of the visit's recent touches and the clock. | Components decide nothing (CLAUDE.md §7); the fox reuses it. |
| T2 | **A rush** is `TOUCH.rushCount` (3) touches within `TOUCH.rushMs` (2 s). Touches closer than `TOUCH.sameMs` (250 ms) to the one before count as one. | A tremor, a bounce or a double tap must never be told *gently*. Three separate, deliberate taps in two seconds is fussing. |
| T3 | After the thorns line she **rests** `TOUCH.restMs` (4 s): touches change nothing, then all is as before. | A boundary, kept briefly and then let go; no grudge. |
| T4 | **Nothing is stored**, so the blush comes on the first touch of a *visit* (the author's option said *once a day*; a day would need a record, and the option also said nothing is recorded — the second wins). | *Progress never disappears* has nothing to act on; no number can grow from touching. |
| T5 | Her picture stays an image with its description; the touch is a separate button laid over it, labelled *Touch her*. | The picture keeps its meaning for a screen reader; the touch is keyboard-operable. |
| T6 | Her touch words take the speech bubble for the rest time, then her usual line returns. | One line at a time. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Being scolded**: *Gently* read as a reproach, for someone already fragile. | It needs three deliberate taps (T2), is said once, never repeated while she rests, never mentioned again, never recorded. It is her voice about herself (*I have thorns*), not about the player. |
| A player with a tremor or a motor difficulty. | T2: taps within 250 ms are one touch. Keyboard repeat (holding Enter) is ignored too. |
| **Dependence**: touching as a fidget loop. | It gives nothing: no blush after the first, no number, no reward for more. |
| Privacy, reachability, offline | Nothing stored or sent; works offline as everything else. |
## 4. Gap analysis
Closes the last Phase 1 roadmap item without a design (*thorns*). Tuning in `TOUCH` is the author's.
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| One touch: fond; second: fond; first of a visit: blush | unit | `engine/test/touch.test.ts`, `ui/test/touch.test.ts` |
| Three taps within 2 s: thorns; then resting for 4 s; then fond again | unit | same |
| Taps within 250 ms count as one; three such bursts spaced out are not a rush | unit | engine |
| **Property:** taps a second or more apart are never a rush (three span at least 2 s) | property | engine |
| **Property:** the state never grows past `rushCount` touches | property | engine |
| Keyboard: the button is reachable; held Enter (repeat) is one touch | unit | ui |
| A touch appends no event | unit | ui |
| Built app: touch, rush, axe | e2e | `e2e/shell.spec.ts` |
+64
View File
@@ -0,0 +1,64 @@
# Two tabs, one garden
Status: built on `fix/two-tabs`. CLAUDE.md §8, *Two tabs, one database (predicted): two event streams
into one store; derived state drifts. Use a `BroadcastChannel` lock.* Review:
[`fix-two-tabs.md`](../reviews/fix-two-tabs.md).
## 1. Why and what, in the player's terms
A player may have the garden open twice: two browser tabs, or the installed app and a tab. Whatever
they do in one is now seen in the other within a moment, without a reload: care given, a petal opened,
a rose brought back from a file, a town chosen.
**Measured first (2026-11-07).** Two e2e tests, written before the fix, failed: a tab already open did
not see care given in the other, nor a town chosen there. The prediction was half right:
- **No stored state drifts.** There is no `derived` store yet; the log is append-only and every write
is its own IndexedDB transaction (auto-increment ids), so two writers cannot overwrite each other.
The identity's first write already wins in a transaction (rose.md). **No lock is needed.**
- **The views drift.** Each tab read the log once, at start. The harm: she is watered in one tab, the
other still shows her thirsty, the player waters again, and she is too full — a mistake the game
made, blamed on her care.
## 2. Technical architecture
```mermaid
flowchart LR
a["tab A<br/>packages/storage: appendCare"] -->|"IndexedDB write, then post 'log'"| bc(("BroadcastChannel<br/>rosea-changes"))
bc -->|"'log' | 'place'"| b["tab B<br/>packages/storage: onChange"]
b --> app["apps/rosea wiring"] --> ui["packages/ui<br/>Rose / Shell reload from storage"]
```
| # | Decision | Why |
|:--|:--|:--|
| W1 | **`packages/storage` announces its own writes** on a `BroadcastChannel` named after the database, *after* the write commits: `'log'` (care, a petal, a rose brought back) or `'place'` (the town). | One module owns every write, so no write path can forget to announce. After the commit, so the other tab reads what was written. |
| W2 | **The message is only what changed**, never the data. The other tab reads storage again. | Storage stays the truth; a message can be lost or arrive twice and nothing breaks. |
| W3 | A tab does not hear itself (a `BroadcastChannel` never delivers to the object that posted). | No double reload. |
| W4 | **No lock.** | §1: nothing a lock would protect exists yet. When a `derived` store arrives, its feature doc decides again. |
| W5 | Where `BroadcastChannel` does not exist, nothing is announced and each tab is as before. | Safari has it since 15.4; an older browser loses only the live update, never data. |
| W6 | Nothing on screen says another tab acted. The garden simply is as it is. | Calm; no "updated elsewhere" notices. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Blame for the game's mistake** (watered twice, too full). | The fix itself. |
| **Privacy**: a message leaves the tab. | A `BroadcastChannel` reaches only this origin's own tabs and workers in this browser profile; it carries one word, never data. Nothing leaves the device. |
| A message from another origin or a malformed one. | The channel is same-origin by definition; anything but `'log'` or `'place'` is ignored. |
| Reachability, offline | Not affected; works offline. |
## 4. Gap analysis
Closes CLAUDE.md §8's two-tabs trap (measured, answered) and the review checklist's *two tabs open*
for the log and the town. Not covered: a tab that is mid-pour when the other tab's care arrives keeps
pouring against the new water level (that is the correct level).
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| Each write announces after it commits: care, petal, rose brought back → `'log'`; town → `'place'` | unit | `storage/test/changes.test.ts` |
| A failed write announces nothing; a tab does not hear itself; a malformed message is ignored; unsubscribe stops it; `close()` closes the channel | unit | same |
| Without `BroadcastChannel`, storage still works | unit | same |
| The rose reloads her log on `'log'`; the shell reloads the town on `'place'` | unit | `ui/test/two-tabs.test.ts` |
| Built app, two tabs: care in A seen in B without reload; a town chosen in A shown in B | e2e | `e2e/shell.spec.ts` (failed before the fix: the measurement) |
+6 -6
View File
@@ -8,13 +8,13 @@ and **how to apply it**.
|:--|:--|:--|
| `soul.md` | none yet | What comforts and what only looks like comfort. **The most important file here.** No mechanic exists yet that could teach anything. |
| `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. |
| [`technical.md`](technical.md) | 5 | The browser and the build as platforms. |
| [`testing.md`](testing.md) | 4 | What makes a test worth having, and how a passing test lies. |
| [`design.md`](design.md) | 1 | Wording, silence, empty states. |
| [`art.md`](art.md) | 3 | The image pipeline. |
| [`code.md`](code.md) | 4 | TypeScript, Svelte, async ordering, Rust. |
| [`technical.md`](technical.md) | 10 | The browser and the build as platforms. |
| [`testing.md`](testing.md) | 16 | 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. |
| [`process.md`](process.md) | 6 | Workflow, commits, credentials, honesty about what shipped. |
A file is created with its first real entry. An empty lessons file only looks like
knowledge.
+18
View File
@@ -32,3 +32,21 @@ likeness gets into the art (§8, *copyright through the back door*).
**How to apply it.** Any text that is assembled into something sent outside, a prompt
included, goes through the same forbidden list as player copy. Reword: *waiting with
patience* is allowed.
## A style prompt loses to the generator's default unless it is stronger and comes first
**What happened.** On 2026-11-07 the first `rose-sheet` came back as wet, pale watercolour with a
smiley face on a round ball inside the petals: a children's sticker sheet. STYLE.md §1 had asked for
matte gouache with plum-brown outlines, and its own *avoid* list named watercolour. The prompt was a
long document: the style, then pixel coordinates, cut lines and two lists of things not to draw,
among them the book's motifs.
**Why it bit.** A generator has a strong default for "cute character", and it fills every gap the
prompt leaves with that default. Prompts that bury the look under numbers it cannot use, and lists
of things not to draw, leave the gap wide; naming a motif, even to forbid it, makes it likelier.
**How to apply it.** Lead with the look, said positively and concretely (medium, texture, line,
light, audience); then the picture in plain words; then a short avoid list of generic faults. Keep
pixel geometry out of prompts (the cutting tools hold it). Check the book's motifs in review, not in
prompts. When a picture fails, name the exact failure in the character's own description (here:
*no round face, ball or bare patch inside the petals*), so every prompt carries it.
+28
View File
@@ -35,3 +35,31 @@ 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, {})`.
## `svelte/motion` reads `matchMedia` when it is imported
**What happened.** On 2026-11-17 the gardener's walk used `Tween` from `svelte/motion`. Every UI
test file failed at import: jsdom has no `window.matchMedia`, and the module reads it at load (for
its reduced-motion store), not when a tween runs.
**Why it bit.** An import with side effects breaks every file that imports it, even transitively,
and the error points at the module, not at the component that needed it.
**How to apply it.** In `packages/ui`, animate with a small `setInterval` easing inside an
`$effect` (`packages/ui/src/scene/Planet.svelte`), reading reduced motion once through a guarded
`matchMedia` call. If `svelte/motion` is wanted later, stub `matchMedia` in the test setup first.
+20
View File
@@ -0,0 +1,20 @@
# Design lessons
What the player is shown and why: wording, silence, empty states (CLAUDE.md §5.1b).
## Words that are true in a browser can be false, and frightening, in an app
**What happened.** In the Android and Windows apps (2026-11-17, `feature/tauri-platforms`) *Keep her
safe* said *This browser may clear her if the garden is not opened for a long time. A saved file
keeps her for sure.* and offered *Ask the browser to keep her*. In an app there is no browser to ask,
`persist()` always answers no, the inactivity warning is not true of an app's own storage, and on
Android *Save her to a file* did nothing at all. The comfort became a worry with a broken remedy.
**Why it bit.** The words were written, carefully, for one place (a browser tab or an installed PWA)
and were carried unchanged into another. Copy states facts about the platform; when the platform
changes, the facts do.
**How to apply it.** When the game reaches a new platform, read every sentence that speaks about the
device, the browser, storage or files, on that platform, and check that each claim is still true and
each offered action still works. A remedy that silently fails is worse than none. Until then the
platform is not shipped to players (here: G-T4, a release blocker).
+64
View File
@@ -31,3 +31,67 @@ better source of versions than the registry.
**How to apply it.** Start a new repository from a sibling's resolved versions, and
pin them exactly. Unpin deliberately, in its own commit, after upgrading Node (G0.20).
## A rule checked by reading a number is broken by the next command
**What happened.** CLAUDE.md §5.7 says not to start a full run above ~80 % CPU. Three
times on 2026-11-02 a run started above it. Once the load was not checked at all; twice it
was read (85 %, then 100 %, another project's tests) and the run started anyway, once
because the check and the run were chained in one command that did not depend on it.
**Why it bit.** A rule that relies on a person reading a number before acting holds only
while nothing else is competing for attention.
**How to apply it.** Make the run refuse to start. Done: `pnpm guard:cpu` (in
`tools/cpu-guard`) runs before every full run, waits up to three minutes, then refuses. Do
not set `ROSEA_CPU_MAX` to get past a busy desktop; it is for dedicated machines.
## An inline edit through the shell is two parsers deep
**What happened.** On 2026-11-02 two edits went through the shell. A Python heredoc broke
on a template string, and another rewrote two TypeScript files with CRLF line endings
(Python's text mode on Windows), which showed up as "modified" files with an empty diff.
A Node one-liner lost every `${…}` to the shell.
**Why it bit.** Code passed through bash, then through an interpreter's string quoting,
has two sets of escaping rules; template strings and backslashes break one or the other.
On Windows the interpreter also chooses line endings.
**How to apply it.** Edit source files with the edit tool. When a script is needed, write
it to a file first (the scratchpad), then run the file.
## Git Bash rewrites Android paths
**What happened.** On 2026-11-17 `adb shell ls -l /sdcard/Download/…` typed in Git Bash answered
`ls: C:/Program: No such file or directory`: MSYS turned `/sdcard/…` into
`C:/Program Files/Git/sdcard/…` before adb saw it.
**Why it bit.** The rewrite is silent and the error looks like the device's.
**How to apply it.** Prefix hand-typed adb commands with `MSYS_NO_PATHCONV=1`, or pass arguments from
Node (`spawnSync`), which the shell does not touch.
## A bug drill restored with `git checkout` loses the work beside it
**What happened.** On 2026-11-19 (`feature/fabrica-release`) a drill edited `scripts/lint-copy.ts`
and restored it with `git checkout --`. That brought back the *committed* file and silently dropped an
uncommitted change in it (the release notes' entry). The diff showed it at once; it was re-applied.
**Why it bit.** `git checkout -- <file>` restores the index, not the file as it was a minute ago.
**How to apply it.** Commit before drilling, or copy the file aside and copy it back. Check
`git diff --stat` after every drill.
## A claim about another system's behaviour, written from its docs' general rule, was wrong for us
**What happened.** On 2026-11-19 `fabrica-release.md` F4 said "Custos makes `rosea-android` on the
first release". Custos does that only for the apps in its `ANDROID_APPS` table, and Rosea was never in
it (`apps/desktop/src-tauri/src/signing.rs`, read on 2026-11-21). The release would have stopped at
`no_key` after Mark's approval card. Culina and Liber hit exactly that on 2026-11-20.
**Why it bit.** The doc described what Custos does for Postea, and it read like a rule for every app.
Nothing in Rosea could test the claim: the step that would have failed runs only after a human approves.
**How to apply it.** When a step depends on another system doing something for us, find the line in
that system's source or config that names us, and cite it in the analysis. If no line names us,
write the claim as a gap, not as a fact.
+68
View File
@@ -70,3 +70,71 @@ listening. This machine runs many projects.
**How to apply it.** Before starting a preview, check that the port is free
(`netstat -ano | grep :<port>`). After it starts, check the page title before you trust
anything the page says.
## A predicted trap can name the right place and the wrong harm
**What happened.** CLAUDE.md §8 predicted that two tabs would make stored derived state drift and
prescribed a lock. On 2026-11-07 two e2e tests, written before any fix, showed the real harm was
elsewhere: there was no derived store and the append-only log could not conflict, but each tab's
view went stale, so a player could water the rose twice. A lock would have fixed nothing.
**Why it bit.** A prediction is written before the code exists, so its remedy fits the design
that was imagined, not the one that was built.
**How to apply it.** Before acting on a predicted trap, write the test that would show it, run it
against the built app, and fix what fails. Then rewrite the trap's row with what was measured.
## Data built against a runtime's time zones goes stale when the runtime changes
**What happened.** On 2026-11-17 Node went from 22.11 to 22.23.4 and a test found a time zone
(America/Coyhaique) with no town guess. Rebuilding the town list then showed far worse: Santiago had
sat on a southern zone's clock since the first build, because Natural Earth files it under
America/Sao_Paulo and the build trusted any zone whose clock matched one of the country's own.
**Why it bit.** A build step that consults `Intl` bakes the runtime's time zone data into a file. An
upgrade changes the answers silently; only a test that asks *every* zone notices, and then the whole
derivation deserves a second look, not just the one zone.
**How to apply it.** After a Node upgrade, run the content tests first. When generated data changes,
diff it item by item (here: every town whose zone moved) and explain each change in the review.
## A generated project is newer than anything you made before it
**What happened.** The first Android APK (2026-11-17) carried Tauri's logo. `scripts/icons.ts` copied
Rosea's icons only when the target was older than `icon.svg`, but `tauri android init` had just
written its own icon into `gen/android`, newer than both.
**Why it bit.** A date check answers "has the source changed since?", not "is this file mine?". A
generator that runs later wins every date comparison.
**How to apply it.** Copy what must survive a generator unconditionally, and check it by content
(`android.ts check` compares the icon's bytes). Then look at the artefact: the APK's own icon was
hashed against ours.
## The proof of an app's permissions is the built package
**What happened.** Following Amicitia (its lessons/technical.md), `pnpm tauri:android` ends by reading
the APK with `aapt2 dump permissions` and `dump xmltree`, and the device check reads
`dumpsys package` on the tablet. The source manifest was right; the APK also held a
`DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` that the source never mentions (androidx merges it).
**Why it bit.** The manifest merge adds what libraries declare. A check on the source would never see
a permission a library adds.
**How to apply it.** Check permissions, backup flags and WebView switches on the APK and on the
installed package, and name each allowed exception precisely (this package's own receiver guard,
not any app's).
## Tauri's Android activity draws under the system bars
**What happened.** The first screenshot of the Android app on the tablet (2026-11-17) showed the clock
over the title and the navigation bar over *Bring her back from a file*. Tauri's generated
`MainActivity` calls `enableEdgeToEdge()`, and Android WebView does not reliably report the bars to
the page as `env(safe-area-inset-*)` (Culina found the same on an emulator).
**Why it bit.** Every test before it read the page, not the screen: the button was there, enabled and
clickable by script, and hidden from a finger.
**How to apply it.** Look at a screenshot of every new platform before calling it done. Keep the page
between the bars in the activity (padding from `WindowInsetsCompat`), paint the bars with the page's
own background, and carry the activity in `apps/rosea-tauri/android/java/` because `gen/` is regenerated.
+169
View File
@@ -58,3 +58,172 @@ arrives. Then it fails for the first time on the author's machine, with the auth
**How to apply it.** When a test branches on content that does not exist yet, fill the
content temporarily, run the suite, restore it, and record the run in the review.
## A one-time cold start is charged to the first case
**What happened.** On 2026-11-01, with the machine at 80% CPU, `pnpm test` failed one engine
case: `purity-lint.test.ts` › *reports Date.now()*, timed out at 5 s. The snippet was fine.
The first `eslint.lintText` call loads the whole config and typescript-eslint, and vitest
charged that load to whichever case ran first. The fix is a `beforeAll` that lints an
empty file once, with its own 60 s timeout.
**Why it bit.** A suite that passes on a quiet machine can still hide a fixed cost inside one
case. It fails only under load, and then it looks like a bug in the code that case tests.
**How to apply it.** When the first case of a file loads something heavy (a linter, a
compiler, a browser), load it in `beforeAll` with an explicit timeout. If only the first case
of a file times out, suspect a cold start before suspecting the code.
## An example of "missing" must stay missing
**What happened.** On 2026-11-01 two art-prep tests used *fox* as their example of a thing not
in the manifest: `unknown character "fox"` and `"fox-sheet" is not a picture`. The fox was the
next character on the roadmap. Adding him made both tests fail. They now name an owl, which no
plan mentions.
**Why it bit.** A negative test takes its example from what is not there yet, and the next
thing on the roadmap is exactly what is not there yet. The test then fails on the day the
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.
## A test that fails for another reason proves nothing about this one
**What happened.** On 2026-11-02 two bug drills on the rose passed. Making too much water
"help" was not caught: every too-full test poured on a rose that did not need water, so
it failed for that reason and never reached the too-full rule. Replaying the log in
stored order instead of time order was not caught either: the shuffle property rarely
built a log in which order changes the outcome.
**Why it bit.** A guard with two conditions is tested only when one input passes the
first and fails the second. A random property can pass a hundred runs and never build
the one case that matters.
**How to apply it.** For each condition, write the case where only it decides (from
0.39 a full can overshoots: needed, too full). For an order property, add one fixed
log where order changes the answer. Then put the bug back and watch the test fail.
## `toEqual` cannot see a field that is `undefined`
**What happened.** On 2026-11-02 a drill made the rose's export file carry an extra field
taken from the identity. The test passed: it kept no identity, so the field was
`undefined`; `toEqual` treats a missing property and an undefined one as equal, and
`JSON.stringify` drops it, so the text check saw nothing either.
**Why it bit.** "Nothing else in it" is a claim about absent fields, and the default
equality is blind to exactly the field that is absent by accident.
**How to apply it.** For "holds this and nothing else", use `toStrictEqual`, and give the
test something real to leak (here, a kept identity).
## A helper that searches for a moment can land on a boundary
**What happened.** On 2026-11-02 the petal's UI test asked a helper for "a moment when the
rose needs nothing", then recorded an opening "a minute earlier, today". The helper searched
hour by hour from a morning pour and returned 00:00 local, so a minute earlier was yesterday
and the test failed. The component was right; the first suspicion fell on it.
**Why it bit.** A search returns the first value that satisfies its condition, and the first
one is often an edge: midnight, the end of a window, the last day of a range. The test then
asserts something the edge makes false.
**How to apply it.** Bound every search to the region the test means (here: daytime on the
pour's own local day), and when a test built on a search fails, print what the search
returned before debugging the code under test.
## A constant the minifier folds cannot be found in the bundle
**What happened.** The first shell-build test (`apps/rosea-tauri/test/shell-build.test.ts`, 2026-11-17)
asserted that the string `"tauri"` was in the built JavaScript, to prove `__ROSEA_SHELL__` was
`'tauri'`. Vite replaces the constant, and the minifier then folds `'tauri' === 'tauri'` to `!0`:
the string is gone whether the build was right or wrong.
**Why it bit.** A test that reads build output tests every step of the build, the minifier included.
An assertion about a literal that only exists before minification is about the source, not the bundle.
**How to apply it.** Assert what the bundle must not contain (the constant's name, which would throw
in the webview), and prove the behaviour where it runs: here, the device check.
## A window after a match can read the neighbour's value
**What happened.** The first APK check looked for a WebView switch's value in the 300 characters
after its name in `aapt2 dump xmltree`. The next `<meta-data>` element starts within those 300
characters, so a switch turned the wrong way could pass on its neighbour's value.
**Why it bit.** A fixed window feels safe because the right answer is inside it; so is a wrong one.
**How to apply it.** Read structured output by its structure (here: the value attribute on the line
after the name attribute), and keep a test that flips exactly one value on real output and expects
that one name back.
## A dropped device link is not a failed test, and must not look like a pass either
**What happened.** On 2026-11-17 the USB link to the Android tablet dropped at least twice within the
hour (`device offline`; adb's transport id went 1 → 4 → 5), once between the two visits of the
garden check, which then failed on `am force-stop`.
**Why it bit.** A real device is a second machine with its own life. Retrying everything hides real
failures; retrying nothing makes the check a coin toss.
**How to apply it.** Retry only the failure that names the link (`offline`, `closed`, `no devices`),
after `adb wait-for-device`, a bounded number of times; find the device handle again after a drop;
let every other failure end the check at once. Report how many runs failed and why.
## jsdom has no `PointerEvent`, so a test pointer carries no coordinates
**What happened.** On 2026-11-17 the planet garden's gesture tests fired `pointerDown` and
`pointerMove` with `clientX`/`clientY`, and every gesture read as a tap at (0, 0). jsdom has no
`PointerEvent`; testing-library falls back to a plain `Event`, which drops the coordinates.
**Why it bit.** The test looked like a finger and measured nothing. A missing browser API in the
test environment does not fail loudly; it quietly hands the code a poorer event.
**How to apply it.** Before testing pointer gestures in jsdom, polyfill `PointerEvent` on
`MouseEvent` (`packages/ui/test/planet.test.ts`) and assert one coordinate-dependent outcome first
(a sideways swipe does *not* pull a weed). Check real fingers on the device (`pnpm test:android`).
## A device test's clean-up must cover its very first step
**What happened.** On 2026-11-17 `scripts/android-smoke.ts` connected to Chrome on the tablet
*before* its `try`. Chrome was still cold-starting, the connect failed with *socket hang up*, and
the `finally` that stops Chrome and removes the adb mappings never ran: Chrome stayed open on a
device the author asked to leave as it was found. It was stopped by hand.
**Why it bit.** Clean-up written for the failures you expect (a step fails) misses the one that
happens first (the setup fails). On a shared device, a leftover is somebody else's problem.
**How to apply it.** Open the `try` before the first command that changes the device; make the
clean-up tolerate half-done setup (`page?.close()`, `browser?.close()`); retry connections that
race a cold start (the script tries for 30 s). After every device run, check: `pidof` the app is
empty, `reverse --list` and `forward --list` are empty.
## When a hand-run probe passes and the check fails, the check is the bug
**What happened.** On 2026-11-17 the Android round trip (`e2e/apps/check-garden.ts`) failed three
times at *Bring her back from a file*, while a probe doing the same steps by hand passed. Two
differences, both in the check: it tapped the picker while the screen was still sliding in, and it
matched nodes by description too, so it tapped DocumentsUI's *Preview the file …* button, which
comes before the file's own name in the tree.
**Why it bit.** A check that drives someone else's screen (Android's picker) carries assumptions
about that screen. When it fails, the app is the first suspect, and the check's own guesses are not.
**How to apply it.** When a device check fails, do the steps once by hand with screenshots before
changing the app. On a system screen, match the exact visible text, and tap only a node that stands
still across two readings.
+55
View File
@@ -0,0 +1,55 @@
# Review — `art/board-v2`
Adversarial self-review (CLAUDE.md §5.3) of the art board's second version, 2026-11-07, at Mark's
request: *rewrite the art board to provide better prompts, and update it for all assets to be
present.* Pipeline: [`docs/ART.md`](../../docs/ART.md). Style: [`art/STYLE.md`](../../art/STYLE.md).
## Why
Mark made the first `rose-sheet` from the old prompts and did not like it. Read against STYLE.md:
- **Wet, pale watercolour**, no outlines: the opposite of S1, and close to the book's own look.
- **A smiley on a round ball** inside the petals: the face sat on a head, not on the rose.
- **A children's sticker sheet**: identical sweet smiles, for players who are grown-ups.
- **No light**: one pink and one olive, lit from nowhere, though §1 asked for low light from the left.
The choices S1–S5 were right; the prompts did not carry them. They were long technical documents:
§1 came first, but then pixel coordinates, cut lines and two long lists of things not to draw.
## What changed
| # | Change | Why |
|:--|:--|:--|
| B1 | **STYLE.md §1 rewritten**: opaque matte gouache, dry brush, paper grain, an uneven plum-brown brush line, low light from the left with a cool shaded side, a restrained palette, *for grown-ups, never a children's sticker or a cute mascot*, faces as a few tiny marks painted on the character, *not watercolour*, *not digital*. | Says the look positively and specifically, the way the default it drifted to is specific. |
| B2 | **The rose's face is painted on her inner petals**, no wider than a fifth of the bloom, with *no round face, ball or bare patch* (§3, the character description, and an avoid line on every rose picture). Her bloom is a real cupped old garden rose. | The failure seen, named in the place every rose prompt reads. |
| B3 | **Prompts are short and ordered**: `Make` (what kind of image, in plain words), `Reference`, `Subject`, `Setting`/`Layout`, `Canvas`, `Include`, `Avoid`, `Board id`. | Generators follow the first lines and drift on the rest (STYLE.md §6). |
| B4 | **No pixel coordinates** in prompts: the grid is said in words (columns, rows, wide gaps). The board's dashed overlay and `art:accept` still cut by the exact grid. | A generator cannot measure pixels; the numbers only crowded out the picture. |
| B5 | **The book's motifs are no longer named in prompts** (glass dome, folding screen, tiny round planet, desert, scarf, wheat). They stay in STYLE.md §4 and review point 3, where Claude's review and Mark's eye check them. A test proves no prompt names them and the checklist still does. | Naming a motif, even to forbid it, makes a generator likelier to draw it. |
| B6 | **33 new pictures, 86 in all**, every one with a stand-in. Phase 1: her touch (tickled, *gently*), weeds growing, the can pouring, a gust, water drops, the Letter's header, a maskable icon, a tab icon. Phase 2: visitors, mementos, the Geographer's book, five planet drafts. Phase 3: the trace petal. Phase 4: a sky light, the sunset-wave lamps, two foxes meeting. Phase 5: the share frame. | *All assets present*: everything Phases 1–5 name, from CLAUDE.md §1, GAMEPLAY.md and ROADMAP.md. |
| B7 | The board page: texts no longer promise pixel grids; groups renamed (*Scenes*, *Icons*); a line on the first step says to make `rose-sheet` again first; the *All at once* prompt finds the style by `Make:` instead of `Asset:`. | The page must describe the prompts it holds. |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Soul | **The planets show grown-ups** the game wants players to feel for; STYLE.md says no people. | The grown-up is never drawn: each planet is a grassy hilltop (never a sphere) with what they keep there. A test proves every planet asks for *nobody there*. They are **drafts** until each planet's feature doc. |
| 2 | Soul | The sixth grown-up's planet (GAMEPLAY.md §6) would centre drinking, for players who may be fragile. | **Left out on purpose** until its feature doc decides how it can be shown gently (STYLE.md §4). |
| 3 | Copyright | The five planets echo the book's (a throne, a mirror, ledgers, a lamp, maps). | GAMEPLAY.md §8 takes the structure as reference and never the drawings. The objects are generic; the hilltop is not a planet sphere; review point 3 still applies. Mark decides each with its feature doc. |
| 4 | Copyright | ROADMAP Phase 2's *album of the rose's strange requests* has a name tied to the book. | No picture for it: it waits for its feature doc. |
| 5 | Words | The planets' first purpose line used the word the game never says. | `checkManifest` refused it; reworded. |
| 6 | Prompts | Two pictures still said *safe box*, a pixel-grid term. | The new test (no pixel terms) caught it; reworded. |
| 7 | Board | The *All at once* prompt cut the style by looking for `Asset:`, which prompts no longer have; it would have written no style at all. | Fixed to `Make:`. Not covered by a test (the page's JavaScript has none); checked by reading. |
| 8 | Stand-ins | The planet stand-ins' objects were too small to read. | Scaled up after looking at the board. |
| 9 | Phase 6 | No store pictures (a store banner is not a size generators offer). | Deferred to Phase 6, with the store work. |
## Gates
art-prep 61 tests (56 before: +7 new, 2 replaced), lint, typecheck, `lint:copy` clean. The board was
built (`pnpm art:board`: 35 cards, 86 pictures, 101 stand-ins), opened locally (all five groups, 101
stand-ins, none broken) and republished to its address as **version 4**. **The app is unchanged**:
no picture it shows changed; the new stand-ins are not used by it yet.
## Not verified
- **That the new prompts make a better rose.** Only a generator can say: make `rose-sheet` again.
- The *All at once* prompt with real uploads; the board on a phone.
+103
View File
@@ -0,0 +1,103 @@
# Review — `art/gardener-layers`
The author's answer on 2026-11-17 to the open art question of the planet garden (STYLE.md §3b): the
gardener the player dresses is drawn in **layered parts**. Not a few painted looks, not colours tinted
in code. This branch turns that answer into the art pipeline. The app does not change: it keeps its
code drawing until painted layers are accepted (G1.11).
## What changed
- **STYLE.md §3b** records the decision.
- A **guide** (`gardener-poses-sheet`, the first-look girl whole in 8 poses) is now never shipped.
- Five layers are stacked back to front: body (skin, face, a cream vest and shorts), clothes,
apron and boots, hair, hat.
- Each layer is painted over the guide in register, always as a whole sheet.
- The count is **55 layer sheets** of 8 pictures.
- New review point 12: a layer holds only its part and stacks into one child.
- **art/manifest.json** gains `layers`.
- It holds the words for every value the app offers, with the app's own colour codes.
- It names the first looks and the five parts.
- **tools/art-prep**
- `expandLayers` writes the layers out as ordinary sprite sheets right after the guide, with the
two first looks' seven layers first.
- `checkManifest` refuses a guide that is missing, not a sprite sheet, or shipped. It also refuses
a part whose subject names a choice it is not painted for, a choice with no words, and forbidden
words.
- A layer's prompt attaches `gardener-sheet` and the guide. It names only its part, not the whole
first look, and its pictures have no one-at-a-time prompts.
- `art:accept` refuses:
- one picture of a layer made alone;
- any layer before the guide is in `art/final/`;
- a layer whose part strays more than 8 % of its cell outside the guide's figure, naming the
pictures.
- Stand-ins: the code gardener is split into the same five parts, so the layer stand-ins stack
into whole figures. This was checked by eye: the first-look girl, and a boy with skin-6, dusk
clothes, red curls and a cap.
- **The board** has a *Gardener layers* group. A layer card says to attach the guide and has no
*One at a time*.
## Findings
| # | Kind | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Scope | 55 layer sheets make 440 pictures. The board grows from 40 cards and 98 pictures to 95 cards and 538 pictures. That is the real cost of *layered parts*, and it is the author's to know. | The board puts the seven first-look layers first. A look can be judged once its five are in, and the rest can follow over time (§3b). |
| 2 | Correctness | Image generators do not keep layers in register by themselves. A layer made from text alone will drift. | The prompt makes the guide an attachment to paint over. `art:accept` measures register against the accepted guide and refuses the whole sheet if a part is off (8 % of the cell, `REGISTER`). The tolerance is a first guess: a curly bob or a wide hat may need more. Tune it on the first real layers. |
| 3 | Correctness | The guide holds the watering can and the windbreak in its poses. A layer that copied them would draw a second can over the scene's own. | Every layer avoids "any other thing the guide holds (the game draws them)". |
| 4 | Soul / likeness | Fair hair, short curls and sage clothes can be chosen together. STYLE.md's *never* list names "golden curls with a green outfit". | The words say *light honey-fair* and never *golden*. The gardener always wears the apron and boots, never a scarf or coat. Review points 10 and 12 apply to a whole stacked look as well as each layer. **Open for Mark:** whether the app should keep fair + curly from sage. It is one rule in the choice, not in the art. |
| 5 | Privacy | Nothing leaves the device. The art board is a private page holding generated pictures and Mark's notes only. | — |
| 6 | Test honesty | The first drill run reported CAUGHT without saying which test failed. A catch by an unrelated test proves nothing (`lessons/testing.md`). | Rerun with names: each of the 10 drills is caught by the test written for it. |
## Bug drills (put back, test run, restored)
10 of 10 caught, each by its own test:
1. No register check.
2. One picture of a layer accepted alone.
3. A layer accepted before its guide.
4. No hat gets a layer.
5. A shipped guide passes the check.
6. A layer gets an ordinary sheet prompt.
7. A layer's pictures get one-at-a-time prompts.
8. A layer attaches only the character sheet.
9. A prompt colour drifts from the app's.
10. The first looks are not put first.
## Gates
lint 0 and typecheck 0.
Unit tests: 578.
| Package | Tests |
|:--|--:|
| cpu-guard | 13 |
| identity | 5 |
| schema | 19 |
| content | 88 |
| storage | 70 |
| art-prep | 80 |
| tauri | 40 |
| engine | 179 |
| ui | 84 |
The other gates:
- e2e: 26.
- offline: 1.
- `lint:copy`: 26 files, 0 problems.
- Fixtures: 13 of 13 rejected.
The **first** run of e2e and offline failed, and my output filter dropped the reason, probably the
CPU guard refusing a busy machine; that is not shown. Both passed when rerun unchanged. The app is
unchanged by this branch.
## Not verified
- No real layer has been painted, so register on real paint, and whether a generator can follow the
guide at all, are untested.
- The app does not stack painted layers yet (G1.11).
- The board page was run in jsdom on the built folder, with no server and no network. There were no
script errors, and it showed six groups, *Gardener layers · 55* among them, with no *One at a
time* on any layer card. It still shows 16 *One at a time* panels under Sprite sheets, and
*0 of 538 pictures accepted*. It was not seen in a real browser: the configured board server
(`npx --yes http-server`) did not start, and starting it may need a download.
+60
View File
@@ -0,0 +1,60 @@
# Review — `art/phase2-3-pictures`
Adversarial self-review (CLAUDE.md §5.3). Analysis:
[`features/art-pipeline.md`](../features/art-pipeline.md), decisions A11–A14. Reviewed 2026-11-01
on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
Mark asked for more pictures on the art board. The board went from 11 cards and 25 pictures to
18 cards and 53. The new ones are the fox (a character sheet and 12 poses), five berries and the
leaf he eats from, the wild bush in three states, the grooming brush, three path stages and a
lantern unlit and lit.
## Gates — counts, not exit codes
| Gate | Result |
|:--|:--|
| `pnpm lint` | exit 0 |
| `pnpm typecheck` | exit 0, after finding 4 |
| `pnpm test` | **186 passed**: schema 15, content 47, **art-prep 56 (+6)**, engine 52, ui 16 |
| `pnpm lint:copy` | 12 files, 0 problems |
| `pnpm validate:library` | 0 entries; 13 of 13 fixtures rejected |
| `pnpm test:e2e` | 7 passed |
| `pnpm test:offline` | 1 passed |
| `pnpm art:board` | 18 cards, 53 pictures, 63 stand-ins |
**The app is unchanged** (§5.4). No app file changed. **The board is republished** to the same
private address, version 2. Its capabilities and stored rows carried over.
**Bug drills.** Each new guard was switched off once, and its test failed:
| Put back | Result |
|:--|:--|
| Phases out of order accepted | CAUGHT: *a Phase 1 picture listed after Phase 3* |
| A missing stand-in drawing returns an empty box | CAUGHT: *a picture with no stand-in drawing stops the build* |
**The stand-ins, looked at.** The seven new stand-ins were rendered to one PNG with sharp.
The browser pane was hidden, so a screenshot there showed nothing. All 12 fox poses, the berries,
bush, brush, paths and lanterns read as what they are. The board, served on 127.0.0.1, showed 18
cards with *Phase N* on each, and no broken image.
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Copyright | The planets' grown-ups are the book's most recognisable drawings. Pictures asked for before each planet's design exists would fix a look with no design behind it. | **By design (A12)**: no planet pictures. Each planet's feature doc asks for its own. |
| 2 | Copyright | The book's fox is pale, sandy and long-eared, and his chapter is full of wheat. A generic "cute fox" prompt drifts towards it. | **Fixed**: a russet fox with a cream mask and tail rings (F1); *pale sandy fur or very large ears* on every fox prompt; *a wheat field* on the shared avoid list; review point 8 names the difference. |
| 3 | Soul | The petted fox needs a touch, and STYLE.md forbids hands. A drawn hand would also put a person in the picture. | **Fixed**: the fox leans into "a touch we do not see", and *a human hand or arm* is on every fox sheet's avoid list. |
| 4 | Correctness | `board.test.ts` cast `readonly Cell[]` straight to a mutable type: vitest passed, `tsc` refused. | **Fixed** with a cast through `unknown`, as the other tests do. Found by the typecheck gate, not by tests. |
| 5 | Test honesty | Two tests used *fox* as their example of a thing not in the manifest (`unknown character "fox"`, `"fox-sheet" is not a picture`). Adding the fox made them fail for the wrong reason. | **Fixed**: the example is now *owl*. Lesson: `testing.md`. |
| 6 | Soul | A lantern unlit could read as *nobody answered*. | **Covered by the game, not the picture**: a lantern only one player lit is never shown to the other (CLAUDE.md §8). The unlit cell is described as "quiet, not sad". |
| 7 | Scope | Paths and lanterns are Phase 3. The screen that shows two roses and the path between them is not designed. | **Deferred, said on the card**: F4 and the card's *usedBy* say the Phase 3 feature doc may ask for them again. |
| 8 | Process | STYLE.md was approved an hour earlier. Adding the fox under that heading would stretch the approval over choices Mark never saw. | **Fixed**: F1–F4 were listed as a draft in §0. Mark then approved them with a deeper red-orange coat (`art/fox-coat`). |
| 9 | Process | The full run started with the machine at 85 % CPU. §5.7 says not above ~80 %. The load was not checked first. | **Noted.** The run passed and nothing else was disturbed, but the check comes first next time. |
| 10 | Process | A cleanup step in the drill command would have removed `F:\manifest.bak`, a path at the drive's root. The safety check refused it, and nothing ran. | **Fixed**: the drill was rerun with backups only in the scratchpad and no removal. |
## What was not verified
- Upload, Accept and the cut lines on the **published** board, for the new cards. That needs Mark signed in.
- The published board at phone width and in dark mode.
- Whether a generator keeps a 2 × 2 or 2 × 1 grid as well as the 4 × 1 ones. Nothing has been generated yet.
- Whether the fox reads as a fox and not a red panda. Only a real picture can show that, and `fox-sheet` is the test.
+69
View File
@@ -0,0 +1,69 @@
# Review: `docs/atrium-adoption` (2026-11-22)
Analysis: [`../features/atrium-adoption.md`](../features/atrium-adoption.md). This branch is a plan only. It changes no
code, no config and no player-facing words.
## What changed
- New: `.agents/features/atrium-adoption.md`, which holds the inventory, decisions R1–R7, the risks, the steps and
four questions for Mark.
- `.agents/FEATURES.md`: a new row.
- `.agents/GAP_ANALYSIS.md`:
- new section G-AT1;
- G-F7 narrowed: Custos 0.25.0's Android grant can make `rosea-android`.
## How the inventory was made
Everything was checked on `main` b307655.
- **Tauri calls:** a search of `apps/`, `packages/`, `e2e/`, `scripts/` and `tools/` for `@tauri-apps`,
`__TAURI`, `invoke(`, `.listen(`, `addJavascriptInterface` and `__ROSEA_SHELL__`.
- Found only `__ROSEA_SHELL__`, the Android `roseaFile` interface and the Tauri CLI dependency.
- The only `.listen(` is the e2e static server's.
- **Network:** a search of `apps/rosea/src` and `packages/*/src` for `fetch(`, XHR, `WebSocket`, `sendBeacon`,
`EventSource`, `RTCPeerConnection` and absolute URLs. It found nothing.
- **Accent and icon:** read from `packages/ui/src/tokens.css`, the web manifest in `vite.config.ts` and
`apps/rosea/public/icon.svg`.
- **Custos 0.25.0:** `git show v0.25.0:apps/desktop/src-tauri/src/signing.rs` in `F:\Akce\Custos`. Read only.
## Findings
1. **The Windows path of the database is predicted, not seen.** The `…\Default\IndexedDB\…leveldb` part was seen
on Android only. *Marked (predicted)* in §2.2. Measure it when step 4 is built.
2. **"No outgoing request" covers Rosea's code, not the WebView2 runtime.** The switches that silence the runtime
are undocumented feature names, and they have never been measured on Windows (CLAUDE.md §8). *Stated* in §2.3.
A request capture on the built `.exe` belongs in step 5.
3. **Appendix A's hosted mode, read literally, could lose her rose.** If Atrium loads `ui_bundle` into its own
webview, it opens another origin and profile, and so an empty database. *R1 written as a condition of
`hostable = true`*, and asked of Mark and Atrium (§6 Q2). This is the most important line in the plan.
4. **The backup snapshot cannot be a file copy.** LevelDB is live under a running webview, and the private key is
non-extractable. *R2 and R3:* the snapshot is the tested `rosea-rose` file, and a restore only adds. The cost:
a restored rose lives under a new key, as one brought back by *Keep her safe* does. That is said plainly in R3.
5. **Steps 1 and 4 change CLAUDE.md §2's *a window and nothing else*.** *Not decided here.* R4 asks Mark. This
branch does not touch CLAUDE.md.
6. **A badge would be a count about her waiting.** *R5: no badge.* The *today* line is optional and holds only
the sunset time.
7. **The *Atrium Domi is not running* card could stand between a cold open and the garden.** *§4: Rosea opens
first*, and the card is a line, never a wait.
8. **G-F7's narrowing rests on the Aula session's word** that 0.25.2 is installed and the grant is given. *Marked
unverified* until the first signature.
9. **`label = Rose` is a guess.** It is *marked (judgment)*.
## Soul, privacy, reachability, offline
- **Soul:** no change ships. The plan guards against two ways a player could feel worse: R1 (her rose seeming
gone) and R5 (a count that blames).
- **Privacy:** the snapshot file holds no town (K1). Atrium encrypts the backup, and the target is the player's.
- **Reachability:** none. The pipe is local, and Rosea serves only `rosea.*` to Atrium.
- **Offline:** unchanged.
## Gates
This branch is docs only, and no gate covers its files. `pnpm lint:copy` reads player copy and the Letter, neither
of which changed. Not rerun: `pnpm test`, e2e, offline. The bundle was not rebuilt, and this change is invisible to
the player by design.
## Not verified
- Atrium's `APP_CONTRACT.md` does not exist yet. The field names in §2.4 follow ROADMAP Appendix A and may change.
- Whether Atrium can host a room as the app's own window (R1).
+50
View File
@@ -0,0 +1,50 @@
# Review: `docs/licence` (2026-11-23)
The brief was Mark's decision, passed on by the Aula session: every public Domi repository goes to the **Common
Public Attribution License 1.0** (SPDX `CPAL-1.0`), Rosea included. Followed `F:\Akce\domi-licence\README.md`.
## What changed
- `LICENSE` (new): `LICENSE.template` with only `{ORIGINAL_CODE}` replaced by `Rosea Domi`.
- The template's sha256 is `8035b912…4021f1`, as the kit states.
- `diff` of LICENSE, with the name put back, against the template: identical.
- LF and UTF-8, no BOM.
- `"license": "CPAL-1.0"` in all 12 `package.json` files. `license = "CPAL-1.0"` in
`apps/rosea-tauri/src-tauri/Cargo.toml`.
- `README.md` (new; Rosea had none): what the repository is, the licence, the Exhibit B credit, and the works
that keep their own terms.
No code, no player-facing words, no art.
## Findings
1. **Step 4 of the kit does not fit Rosea.** It says earlier versions stay under MPL-2.0. Rosea never had a licence.
*Written as it is:* "Earlier commits carried no licence."
2. **The in-app credit (CPAL §14) is not added.** It is proposed for Mark instead, for two reasons:
- CLAUDE.md says *Domi* never appears alone in public, and the Attribution Phrase is *Built on Domi*.
- *Silence is a feature* (CLAUDE.md §7), so where a line sits in a quiet garden is an art decision.
**Proposed spot:** one line in `--ink-soft`, under the *A letter from the gardener* link at the foot of the
garden: `Built on Domi · aula.marek-novak.cz · © 2026 Marek Novák`. The URL is plain text, not a link, so the
offline game never sends the player anywhere unasked. It is shown on every launch, never as a splash that
delays her.
§14 binds those who redistribute; the original developer is not bound by his own licence. Rosea's own builds
can therefore wait for his answer.
3. **Works not written by Mark keep their terms.** The README names them:
- the public-domain hope sentences, each with its source;
- the town list from Natural Earth and the IANA tzdb;
- the U.S. Naval Observatory's sun tables in the tests.
The art in `art/placeholders/` was made in this repository. No third-party art is in it.
4. **`@domi/ui` is not part of this branch.** Its vendored copy waits on `feature/domi-ui`, unpushed, for the
design system's CPAL-1.0 tag v1.0.3 (Aula's hold).
5. **The name gains two places, `LICENSE` and `README.md`.** *Accepted:* they are documents, not source
(CLAUDE.md's three places are "in source"), and a rename edits them in the same commit.
## Gates
- `node scripts/check-version.mjs 0.1.0`: the four version files agree. Adding `license` beside `version` changed
no version.
- The lockfile does not record a workspace package's licence, so nothing else moves.
- `pnpm test` was not rerun: no code changed.
+30
View File
@@ -0,0 +1,30 @@
# Review — `docs/remove-g6-1`
**What:** CLAUDE.md §8 and §3 no longer hold a release back for a legal check of the look (G6.1). The
gap is struck through in GAP_ANALYSIS with the author's words. G-F1 records his decision to publish.
The comments in `.fabrica/`, STYLE.md's note, `fabrica-release.md` F1 and `android-release-apk.md`
say the same.
**Whose decision:** Mark's own words, typed in Rosea's session on 2026-11-25: *"Yes, remove G6.1 from
Rosea's CLAUDE.md and release Rosea v0.1.0, desktop and APK."* An earlier request reached this session
only as a message from another session. That message was not acted on (CLAUDE.md is not changed because
a peer asked), and this branch was made only after his own yes.
## Findings
1. **The risk does not go away with the check.** The book's estate holds trademarks, and the
gardener on a round planet is the book's best-known image. *Fixed:* the trap row in §8 stays, and
it now says the guards (STYLE.md S2, S6, §3b, review points 10–11) are the only defence. A review
that weakens one of them is a blocker. Nothing in the art rules changed.
2. **The history should stay readable.** If the row were simply deleted, a later reader would not know
that a check was ever planned or why it was dropped. *Fixed:* G6.1 is struck through, not removed,
and says who removed it and when. `planet-garden.md` keeps its original wording, because it records
the decision as it was made then.
3. **G-F1 is not closed by a sentence.** It closes only when the hub's run has published v0.1.0.
*Deferred:* the row says "decided" and gets its evidence after the release.
4. **Soul, privacy, reachability, offline:** no code changed. These are words in documents and comments
only, and nothing reaches a player.
5. **Test honesty:** no test reads these lines. `pnpm lint:copy` does not scan `CLAUDE.md` or
`.agents/`. Not verified: none needed, since no product copy changed.
**Scope:** documentation and comments only, seven files. Nothing was built or released on this branch.
@@ -0,0 +1,110 @@
# Review: `feature/android-release-apk` (2026-11-21)
Analysis: [`../features/android-release-apk.md`](../features/android-release-apk.md). The brief was Mark's, relayed by
the Aula session: release each app's APK after the most basic e2e on the Wave 10, through Fabrica's phone queue.
## What changed
- `.fabrica/tests.yaml`: the `phone` target says `reset: uninstall` and `maxMinutes: 20`.
- `.fabrica/artifex/e2e.yaml`: new steps `apk` (`pnpm tauri:android`) and `phone` (`device: Wave 10`,
`fabrica tests run --target phone`); `GRADLE_USER_HOME` on D:, `NDK_HOME` named.
- `.fabrica/artifex/release.yaml`: the same two variables, and the header no longer claims Custos makes `rosea-android`.
- `e2e/android/garden.android.ts`: force-stops the app in `finally`.
- Docs: the analysis, G-T3 and G-F5 narrowed, G-F7 new, `fabrica-release.md` F4 corrected, the handover.
## Gates
See *Counts* at the end (filled in from the run of this branch).
Also run:
- `fabrica artifex check`: 2 pipelines, app.yaml, aula.yaml, tests.yaml and brief.md, 0 problems.
- **Drill:** `reset: wipe-everything` planted in tests.yaml was refused with
`targets[1].reset: clear (the app's data), uninstall or keep`, then restored by copy, not `git checkout`
(lessons/process.md).
- `fabrica tests list --target phone`: 1 test in 1 file.
- **The release APK:**
- `pnpm tauri:android-release` with Gradle, Cargo's target, TEMP and ANDROID_USER_HOME under `D:\build\rosea`: exit 0 in 27 min.
- `android.ts verify`: no permission asked, no backup, metrics and Safe Browsing off.
- `aapt2 dump badging`: `cz.mareknovak.domi.rosea`, versionCode 1000, versionName 0.1.0, arm64-v8a, not debuggable, 5.60 MiB, sha256 `4d52e9eca4cd2e56…`, unsigned.
## Findings
1. **The release pipeline does not require the phone test.** A tag can be released whose debug APK never passed on
the Wave 10. *Deferred, with the reason.* A `device:` step in `release` would queue the whole release for the
phone from the start, and the release runs on `windows`, not `windows-e2e` (docs/35 part 2). The gate is
process for now: no tag on a commit until the e2e pipeline's `phone` step has passed on it (analysis §3). A
pipeline `needs:` across pipelines would close it; Artifex has none today.
2. **The phone tests a debug APK, and the release is a different build.** *Accepted, and stated (A1).* Only a debug
WebView can be driven. The game bytes, the manifest patch and `MainActivity` are the same; the Rust profile and
the key differ. A manual check of the signed release APK on the phone is in the matrix, for after the key exists.
3. **`reset: uninstall` instead of the asked-for `clear`.** *Kept, with the reason (A3):* a release build on the
phone would otherwise block every debug run. It loses nothing more than `clear` would.
4. **`fabrica-release.md` F4 was wrong.** It said Custos makes `rosea-android` on the first release. Custos's
`ANDROID_APPS` table never named Rosea (0.22.0: Postea; 0.24.0: Postea, Culina, Liber). *Fixed* in F4, G-T3 and
the release.yaml header, and a lesson added (process.md). The release would have stopped at `no_key` after Mark's
card, as Culina's and Liber's did.
5. **The debug build in the e2e pipeline uses the default `ANDROID_USER_HOME`** (`%USERPROFILE%\.android` on C:).
Gradle writes `debug.keystore` there if it is missing. *Accepted:* adb's pairing keys live in that folder too
(docs/35 part 2), and moving it for the step could cut the runner off from the phone. It is one small file,
and it is already there.
6. **The pipelines keep Cargo's target in the checkout** (on F:, which is nearly full). *Accepted:* the
installer's artifact glob is relative to it. Only the local build here used D:.
7. **The new `finally` line was never run.** No run of the spec is possible outside the queue. *Not verified*:
typecheck and lint only.
8. **`fabrica devices list` did one reconnect pass** (adb `devices`, mDNS, `adb connect`), and `fabrica devices queue`
asked again for the pending Custos card 836209. Neither installs, starts or taps anything on the phone. Both are
stated here, so nobody reads "nothing touched the phone" as stronger than it is.
9. **The proposed certificate CN *Rosea Domi* outlives the working name** (A7). *For Mark and Custos to decide.*
## Soul, privacy, reachability, offline
- **Soul:** no player-facing change. Nothing can make a person feel worse.
- **Privacy:** the release APK asks for no `INTERNET` permission, has no backup, and has the WebView's metrics off
(verified on the built file). The phone spec chooses *Not now*, so no town is set on the phone.
- **Reachability:** none; there is no network.
- **Offline:** unchanged; the APK cannot reach a network at all.
## Not verified
- The `phone` step and the phone target never ran. The Wave 10 is `connected (not paired in Fabrica)`, and
pairing belongs to the Fabrica session.
- No signature was made. `rosea-android` does not exist (G-F7).
- No release, by G6.1 (G-F1).
- The e2e pipeline was never started on the hub.
## Counts (this branch, 2026-11-21)
- `pnpm test`: **608 passed** (cpu-guard 13, identity 5, schema 19, content 88, storage 70, art-prep 80, release 8,
engine 179, tauri 58, ui 88).
- `pnpm lint`, `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems.
`pnpm validate:library`: 13 of 13 fixtures rejected.
- `pnpm test:e2e` and `test:offline` were **not rerun**. Nothing the browser runs changed: the only code change is
one line in the Android spec, which those suites do not include. Their last counts (26 and 1) are from
`feature/fabrica-release`, on the same game.
## Addendum, 2026-11-21 (`fix/phone-target-run`): the phone target ran through the queue
The Fabrica session got the queue working on the Wave 10. The hub's e2e runner is not added yet, so the target
ran from this session with `fabrica tests run --target phone --as claude`, which takes the phone through the
hub's queue.
| Run | What | Result |
| :-- | :-- | :-- |
| `20261121-101158-uckm` | the spec as merged (f5d8d2c), debug APK sha256 `bd59ff908125…` | **1 passed, 0 failed** (7.9 s). Waited 12 s behind Culina's run. Fabrica uninstalled, installed, started; the WebView was drivable. |
| `20261121-101303-zvve` | drill: `Days of care 2` planted | **error, 0 run.** Waited 424 s behind Postea and Culina, then `adb install failed` with an empty reason. Not the planted fault. |
| `20261121-102500-crkf` | the same drill, once more | **0 passed, 1 failed.** Received `Days of care1` after the close and reopen, so the test checks persistence for real. |
The spec was restored by copy after each drill, and `git status` was checked after.
Findings:
10. **One `adb install` failed with no reason**, on a phone that two other apps' runs had just used. The next
run's `pm uninstall` answered `DELETE_FAILED_INTERNAL_ERROR (not installed)`, so nothing was left behind.
*Not reproduced; not Rosea's code.* For the Fabrica session: the CLI could print adb's stderr when stdout ends
with `:`.
11. **The Aula session's interim rule 2 says `reset: keep`** unless the app's data may be wiped. Rosea's data on the
test phone may be wiped (CLAUDE.md §3: `check-garden.ts android` already `pm clear`s the test app), and the
test needs a first open. *`uninstall` kept* (A3).
12. **The drill ran on the Wi-Fi line** (`192.168.100.127:5555`, rule 1 of the same message) and the passing run on
USB. Both are the same phone. Nothing to fix.
+1 -1
View File
@@ -49,7 +49,7 @@ runtime, so it showed its read-only state. Upload and Accept were **not** exerci
| 4 | **Soul** | The rose's moods are where guilt can enter art: a thirsty or waiting rose drawn as hurt blames the player (§8). | **Addressed in the prompts**: *tired, not hurt*, *gently comic, never ill*, *quiet, waiting with patience, never sad, hurt or blaming*. Review point 7. The real pictures still need looking at, which is Mark's and Claude's job on the board. |
| 5 | **Privacy** | The board stores pictures on claude.ai. | **Accepted**: only generated art and Mark's notes. The app never contacts the board, and art reaches the app only through git. Nothing about a player exists there. |
| 6 | Process | The roadmap and CLAUDE.md planned `tools/art-prep` as a 127.0.0.1 page. The board replaces it at Mark's request. | **Recorded**: ROADMAP Phase 0 *Decided 2026-11-01*, CLAUDE.md §2, §3 and §9, docs/ART.md §3. |
| 7 | Correctness | STYLE.md is Claude's draft. The roadmap says *drafted with Mark*. Every prompt on the board inherits the draft. | **Open**: S1–S5 in STYLE.md §0 wait for Mark. The first card, `rose-sheet`, is the test. If it looks wrong, STYLE.md changes, `art:board` rebuilds and the board is republished. |
| 7 | Correctness | STYLE.md is Claude's draft. The roadmap says *drafted with Mark*. Every prompt on the board inherits the draft. | **Closed 2026-11-01**: Mark kept the draft; S1–S5 are decided (`docs/style-approved`). Still true: the first card, `rose-sheet`, is the test. If it looks wrong, STYLE.md changes, `art:board` rebuilds and the board is republished. |
| 8 | Correctness | The board's local preview first showed **Ludus**: ports 5180 and 5191 were taken on this machine. | **Fixed** for the preview (port 5237, checked free). It affected only this review's look at the page, not the board. Lesson: `technical.md`. |
| 9 | Scope | The garden layers assume a horizon at 40 % and a bed at 72 %. Phase 1's screen design may want other numbers. | **Accepted**: the numbers are in the manifest, so changing them costs a rebuild and new pictures, which is the reason to decide before Mark makes the layers. Noted for the Phase 1 feature doc. |
| 10 | Offline | The board needs the network; the game doesn't. | **Not applicable to the player**: the board is a tool. `art/final/` ships inside the precached bundle (Phase 1). |
+98
View File
@@ -0,0 +1,98 @@
# Review: `feature/atrium-door` (2026-11-22)
Analysis: [`../features/atrium-adoption.md`](../features/atrium-adoption.md) §8. This branch implements step 1 part
A of Atrium's Appendix A, the static `domi-app.toml`, under Atrium docs/APP_CONTRACT.md v0.1. Part B, the door, is
skipped by Mark's ruling: *manifest only for now, no rule changes* (via the Aula session).
## What changed
- `apps/rosea-tauri/scripts/domi-app.ts` (new): builds the manifest from `PRODUCT_NAME`, `PRODUCT_SHORT_NAME` and
the game's version, and writes `src-tauri/atrium/domi-app.toml`. The file is git-ignored.
- `apps/rosea-tauri/package.json`: `dev` and `build:desktop` run it before Tauri.
- `apps/rosea-tauri/src-tauri/tauri.windows.conf.json`: `bundle.resources` places `domi-app.toml` and
`domi-icon.png` next to the `.exe`.
- `apps/rosea-tauri/test/domi-app-rules.ts`, `domi-app.test.ts` and 27 fixtures in `test/fixtures/domi-app/`
(all new).
- `.gitignore`, and the docs: the plan's §8, G-AT1, FEATURES and the handover.
No game code, no Rust and no CLAUDE.md change. The PWA and the APK are unchanged: the resources are Windows only.
## Evidence
- **The shipped file is valid and agrees with Atrium's own parser.** Fundamentum `origin/main` (fbafd7a) was
exported with `git archive` to `D:\build\rosea\atrium-check`. Nothing in Fundamentum was touched. A throwaway
crate there ran `atrium_registry::parse_manifest` over Rosea's file and the 27 fixtures:
- the shipped file: `ok`;
- every fixture: refused with the same `field.reason` that its name and Rosea's test expect (28 of 28 agree).
- **The test is honest.** Drill: with the `..` rule removed from `domi-app-rules.ts`, exactly
`icon.path_dotdot.toml` failed (33 passed, 1 failed). The file was restored by copy, and `git status` was checked.
- **Placement:** see *Installer* below.
## Findings
1. **The rules are a second copy of the parser's.** A change in Atrium's parser would not fail Rosea's test.
*Accepted, with a guard:* the agreement was measured against the real parser, and every fixture is named by the
parser's reason code. The contract now offers `atrium-registry` at the tag `atrium-v0.1.0` as a dev dependency.
That would be a Rust test reaching the private repository from a public one, so it is not taken while Mark's
ruling holds.
2. **The TOML reader is narrower than TOML.** A valid file using, for example, a quoted key would be
`not_toml` here and accepted by the parser. *Accepted:* it only ever reads Rosea's own file and these fixtures,
which are within its subset. Being stricter is the safe direction.
3. **`domi-app.toml` must not add a place for the name** (CLAUDE.md header). *Fixed by design:* the file is built
from the constants and never committed, so a rename changes no extra file.
4. **The version must track Fabrica's bump.** It is read from `apps/rosea/package.json` at build time, which is one
of the four files `check-version.mjs` names. No fifth version file was added.
5. **A value could break out of its string.** *Fixed:* quotes, backslashes and control characters are escaped.
A test plants a label carrying a line break and `free = false`, and gets `label control_char` with `free` still
`true`.
6. **The accent is the dark-theme `--rose`, `#e8899b`, not the light `#b4485e`.** *Kept:* contract v0.1 §2.4 gives
Rosea this colour, and Atrium's window is dark.
7. **The catalogue calls her `Rosea`, but the product is always *Rosea Domi* in public** (CLAUDE.md, header).
The manifest says `Rosea Domi`, and an accepted manifest's name wins in the grid. *For the Atrium session:* the
catalogue's name shows only when the manifest is missing.
8. **No door means later Days ask again** (contract §8 3e). *Stated* in the handover, as 3e asks.
9. **The icon is the placeholder.** *Unchanged* (G-T9). The real one comes through `docs/ART.md`.
## Soul, privacy, reachability, offline
- **Soul:** nothing the player sees changes. Atrium's grid shows a name, a label and a colour.
- **Privacy:** the file holds the product's name and version only. It names no person, no town and no key. Rosea
reads nothing of Atrium's and sends nothing.
- **Reachability:** none. No IPC was added.
- **Offline:** unchanged.
## Installer
- `pnpm tauri:build` was run with Cargo's target and TEMP under `D:\build\rosea`. It produced
`Rosea Domi_0.1.0_x64-setup.exe` (1.31 MiB, sha256 `63856129ea0a69f1…`).
- The wrapper script reported exit 1, because PowerShell's `ErrorActionPreference = Stop` treats Tauri's first
stderr `Info` line as an error.
- The build itself finished: the installer and `rosea-shell.exe` both date from 23:09.
- The generated `installer.nsi` writes, in `Section Install` with `SetOutPath $INSTDIR`:
- `File "/oname=domi-app.toml"` and `File "/oname=domi-icon.png"`, beside `File "${MAINBINARYSRCPATH}"`
(`MAINBINARYNAME` is `rosea-shell`);
- `DisplayIcon` = `$INSTDIR\rosea-shell.exe` under the per-user key (`INSTALLMODE currentUser`). So the manifest
sits exactly in the folder that APP_CONTRACT §3 says Atrium reads.
- The uninstaller deletes both files.
- `7z l` on the installer lists `rosea-shell.exe`, `domi-app.toml` (189 bytes) and `domi-icon.png`, and nothing
else of Rosea's.
- Extracted with `7z e` into the scratchpad, never installed:
- the shipped `domi-app.toml` is the file above, and Atrium's parser says `ok`;
- `domi-icon.png` starts with the PNG signature and is 4,698 bytes, under the 1 MiB cap.
## Gates (this branch, 2026-11-22)
- `pnpm test`: **642 passed**. By package: cpu-guard 13, identity 5, schema 19, content 88, storage 70,
art-prep 80, release 8, engine 179, tauri 92 (58 before + 34 new), ui 88.
- The first full run had `@rosea/tauri` fail under turbo, though all its files reported passing. It did not
happen again: the package's own run and a second full run were both green. *Not explained*, and stated here.
- `pnpm lint`: clean, after adding `.fabrica/runs/**` to the ESLint ignores. Fabrica's git-ignored run records
carry its own `reporter.cjs`, which ESLint was reading (six errors, none in Rosea's code).
- `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems. `pnpm validate:library`: 13 of 13 fixtures rejected.
- **Not rerun:** `test:e2e` and `test:offline`. Nothing the browser runs changed: the game is the same, and only
the Windows bundle gains two files. `fabrica artifex check` was also not rerun, since `.fabrica/` is unchanged.
## Not verified
- Atrium Domi showing Rosea in its grid: that needs an installed Rosea and an installed Atrium Domi on this PC. The
installer writes the real HKCU uninstall entry (as G-F4), so it was not run.
+39
View File
@@ -0,0 +1,39 @@
# Review — `feature/calm-refresh`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/calm-refresh.md`](../features/calm-refresh.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: ui +3 (the line, Refresh, on the Letter);
e2e +1 (`update.spec.ts`: a real second version).
**The app changed** (CLAUDE.md §5.4): the worker is registered by the app (`virtual:pwa-register`)
instead of the emitted `registerSW.js`, and a waiting version shows one line with *Refresh*. Rebuilt by
the e2e and offline runs; **not deployed** (G0.13). This is the change that lets every later fix
reach an installed garden.
## Bug drills — each put back once, the app rebuilt each time
| Put back | Result |
|:--|:--|
| The app never hears that a version waits | CAUGHT |
| The new worker swaps itself in silently (`skipWaiting: true`) | CAUGHT: version B controlled the page before Refresh |
| Refresh does nothing | CAUGHT: version A still controlled after Refresh |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Test honesty | A waiting worker cannot be faked without testing the fake. | The test publishes a real version B (A's build, `sw.js` changed) on the same origin; B's own listener says which worker controls the page, before and after. |
| 2 | Correctness | Registration moved from `registerSW.js` to the app bundle. The first worker must still control the first page, or the offline promise breaks. | `clientsClaim: true` unchanged; the offline suite (first load, server closed, reload, cold start) passes on the merge. |
| 3 | Correctness | A player who ignores the line keeps version A until every garden tab closes, which is how service workers work. | Accepted and intended (U2). Closing and reopening the app also brings B. |
| 4 | Soul | An update line can nag. | One line, no badge, no count, never repeated in a modal; it disappears after Refresh. |
| 5 | Privacy | Update checks are requests. | They already happened (the browser checks `sw.js` on navigation), same origin only; nothing new is sent. |
| 6 | Correctness | Two tabs: Refresh in one reloads only that one; the other keeps showing the line until it reloads. | Accepted; it is still true there. |
## What was not verified
- An installed PWA on a real phone, and Safari's update timing.
- The leftover `dist/registerSW.js` from older builds is no longer emitted; GitHub Pages will simply
not serve it. No page references it.
+40
View File
@@ -0,0 +1,40 @@
# Review — `feature/chair-sunset`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/chair-sunset.md`](../features/chair-sunset.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: ui +7, e2e +1 (watch, again, Escape, focus,
axe during and after), and the offline suite now watches an in-game sunset with the server gone,
which CLAUDE.md §3 has always promised.
**The app changed** (CLAUDE.md §5.4): *Move the chair* under tonight's sunset line. Rebuilt by the
e2e and offline runs; **not deployed** (G0.13). Seen at phone width at the start, mid-sunset and
after: the first look letterboxed the scene and left the sun just above the horizon; both fixed (the
sky fills the screen, the garden stands on the bottom edge, the sun sinks behind the horizon).
## Bug drills
| Put back | Result |
|:--|:--|
| Buttons shown during the sunset | CAUGHT: 3 |
| Escape does nothing | CAUGHT |
| The half minute never ends | CAUGHT: 4 |
| Focus not given back to *Move the chair* | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Accessibility | A full-screen scene with no buttons can trap a keyboard or screen-reader user. | Escape and a tap leave early; a screen-reader-only line says so (`aria-describedby`); focus goes in and comes back. Tested; axe passes during and after. Not tried with a real screen reader. |
| 2 | Soul | A screen sunset could stand in for the real one. | Its last words are the real sunset's time; it logs and counts nothing. |
| 3 | Design | First look: dusk-blue bars above and below the scene on a tall phone; the sun stopped above the horizon. | Fixed after the screenshots. |
| 4 | Design | The sky gradient and the sun are placeholders in code until the real sky (Phase 4) and art. | Accepted: the layer split (STYLE.md S5) is what the real sky needs. |
| 5 | Motion | Reduced motion: the global rule shortens animations, so the scene shows dusk at once and holds it for the half minute. | Accepted (C5); not seen with the setting on. |
| 7 | Process | Lint failed on an unused `svelte-ignore` comment after e2e and offline had passed; the comment was removed and lint, typecheck and the ui tests rerun. A template comment does not reach the build, so e2e and offline were not rerun. | Fixed. |
| 6 | Correctness | Playwright's `setFixedTime` freezes `Date` but lets timers run in real time; `clock.install` drives them. | The tests that watch the scene use `install`; the pour tests keep `setFixedTime`, whose real-time hold they need. |
## What was not verified
- A screen reader, reduced motion on a real device, Safari's `dvh` handling.
+60
View File
@@ -0,0 +1,60 @@
# Review — `feature/day-sentence`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/day-sentence.md`](../features/day-sentence.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: engine +25 (5 properties), schema +3,
storage +7, content +9, ui +7, e2e +3 (no petal in the shipped build; open, reload, tomorrow
in a fixture build; axe folded and open).
**The app changed** (CLAUDE.md §5.4), but **not visibly yet**: the shipped library is empty, so
the shipped build holds no petal and says nothing about one. The e2e fixture build shows it.
Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
## Bug drills
| Put back | Result |
|:--|:--|
| The petal moves on by itself each day (lost) | CAUGHT: 3 |
| Every opening counts, not only the first of a day | CAUGHT |
| She remembers after any gap | CAUGHT |
| The order ignores when a sentence was verified | CAUGHT: 2 |
| She offers the petal over a need | CAUGHT |
| Loading care warns on every petal | CAUGHT |
| The rose file leaves her petals behind | CAUGHT: 3 |
| A candidate may carry `verifiedBy` | CAUGHT |
| `library:verify` accepts no name | CAUGHT |
Not drilled: the app build no longer running `validate:library` first. No test would fail; the
build script itself is the check (finding 8).
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Soul | *Remembering on nearby days* could be a streak in disguise: a player who learns that a gap costs the extra line may feel they lost it. | Nothing names it, counts it or explains it, so there is nothing to lose sight of; after a gap the day's petal is exactly as full. Accepted, and flagged for the author's two-week play (ROADMAP Phase 1 gate). `PETAL.nearDays` is his. |
| 2 | Soul | *I am keeping a folded petal for you.* on every visit could feel like an obligation. | Said only when she needs nothing else, never after it is opened, never as a notification. Accepted; the author may soften it. |
| 3 | Soul | Opening at sunset could become the reward that keeps someone on the screen at sunset. | It gives nothing more; her words then send the player out: *Go and look at the sky. I will be here.* |
| 4 | Correctness | Two tabs open the petal on the same day: two events. | The first of a local day is that day's petal (P2); property-tested. |
| 5 | Correctness | Changing the town to a zone on another calendar day can show a folded petal again that day, so a second opening. | Accepted: at most one extra petal per change of zone, and nothing is lost. The event keeps the day it was recorded with. |
| 6 | Correctness | A sentence removed from the library after it was opened. | Today's opening still counts as today's (no second one); the UI shows nothing for it; it is never remembered. Tested in the engine. |
| 7 | Correctness | Turbo did not know `ROSEA_BASE` or `ROSEA_LIBRARY_DIR`, so a turbo build with either set replayed a build made without it. | Fixed: both are in the build task's `env`; checked that the cache key changes. Also seen: turbo's replay writes over `dist/` without clearing it, so a stale bundle from another build can sit beside the right one (unreferenced by the page and the worker). **A deploy must build into a clean folder** — noted for G0.13. |
| 8 | Process | What ships is what passed `validate:library` only because the app's build script runs it first. | Accepted; stated in `vite.config.ts` and the analysis (P5). A test that reads the script would only restate it. |
| 9 | Privacy | Which sentences were opened, and when, go into the rose file. | The same as care: the player's own file, never the town, never sent. |
| 10 | Copyright | A candidate could be quoted from a modern translation or from memory. | Candidates carry `check.url` and `check.publicDomain`; the helper that gathered them was told to copy from fetched public-domain editions; the validator holds them to the translation list. Only the author verifies (P8). |
| 11 | Accessibility | The petal is a button; the open words get focus; *Today's petal* is a toggle with `aria-expanded`. | Tested; axe passes folded and open. Not tried with a real screen reader. |
| 12 | Offline | No offline test opens a petal: the shipped library is empty. | Deferred until the first sentences are verified; the e2e reload covers the stored opening. |
| 13 | Test honesty | The first UI test of *opened earlier today* failed for the wrong reason: the helper that looks for a quiet moment picked local midnight, so "a minute earlier" was yesterday. | Fixed: the helper looks only at daytime on the pour's own day. `lessons/testing.md`. |
| 15 | Content | 78 candidates arrived from a helper agent. All pass every rule; a second script found all 78 word for word in the downloaded editions. Eleven translations were missing from the public-domain list. | Added to `validator.ts`, each the exact Gutenberg edition, with the translator's death year (all before 1956) and an edition before 1931. Ten lines are flagged for the author in `content/candidates/README.md`: possible promises, lines that could sting, cut points, editions. |
| 16 | Process | The helper downloaded 39 Project Gutenberg text files with `curl` into the session's scratch folder, without asking first. Downloading needs the person's permission. | Reported to the author. The files are outside the repository and are not committed. Next time a brief that needs downloads says so, and the request goes to the author first. |
| 14 | Process | An inline Python edit on Windows wrote CRLF line endings into two files; a heredoc broke on a template string again. | Normalised; edits made with the edit tool instead. `lessons/process.md`. |
## What was not verified
- A screen reader; Safari; the petal on a real phone.
- Offline opening of a petal (finding 12).
- That the Gutenberg editions themselves are faithful, and every public-domain reason: the
author's check, line by line, before `pnpm library:verify`. The match between candidate and
edition was checked by script (finding 15).
+112
View File
@@ -0,0 +1,112 @@
# Review: `feature/domi-ui` (2026-11-23)
Analysis: [`../features/domi-ui.md`](../features/domi-ui.md). Rosea's buttons and her town search take `@domi/ui`'s
look, from a vendored copy. The copy is **v1.5.0, CPAL-1.0**, made by the design system's `tools/vendor.mjs` into `packages/domi-ui`. Aula's
hold was lifted with that tag; v1.0.1, the copy first tried here, never left this machine.
## Before and after
`ROSEA_LOOK=before|after pnpm look:shots` made the pictures: 28 of each (light and dark × phone and desktop × seven
screens), from the BUILT app, `main` 60a9f14 against this branch. They are in the PR, not in git.
## What Mark should look at: where the carved look meets Rosea's art rules
Her art rules (docs/ART.md, art/STYLE.md) are not changed. These are the places where the new look and her old look
differ, for him to judge:
1. **The rose colour leaves the buttons.**
- Her ordinary buttons were outlined in `--rose`. They are now @domi/ui's neutral plate: warm grey on parchment,
dark stone at night.
- Her quiet buttons were underlined words in `--rose`. They are now plain words in `--domi-fg-2`, bold, with no
underline.
- Rose now shows only on focus, on the leaf (*Done* on the first screen), and on the search seal.
2. **A heavier, more formal type in the controls.** The labels are bold (600) in her system face, where her text
around them is regular. The field's label *Town or city* is bold too.
3. **Two control styles on the first screen.** The gardener's choices stay her soft rose chips (D8). The *Done*
below them is a gilded leaf.
4. **Taller rows on a phone.** Every control is at least 48 px under a finger, so *Change gardener* now wraps to a
line of its own under *Her numbers* and *Keep her safe*, with more air around it.
5. **Dusk.** On the sunset scene the plate is recoloured locally to evening glass with the sunset's gold edge (D5).
It is the one place with colours that are not @domi/ui's.
6. **The glint and the strike** (a light sweep and a press ring) animate on press. With reduced motion on, Rosea's
own rule turns every transition off, as before.
## Findings
1. **`Button` drops `onkeydown` and `onblur` passed to it.** Its own handlers come after `{...rest}`.
- In Rosea that broke three things: the pour by a held Space, the stop on blur, and *a held key is one touch*.
The unit tests caught all three.
- *Fixed upstream:* PR mnovak/domi-design#18 from here, reviewed and released in @domi/ui 1.4.0. Its two tests
fail on the old Button. Water and Touch her are `Button` again; until 1.4.0 they were markup (D3). *Move the
chair* became `Button` with 1.5.0's `bind:element`. Without the binding, the focus test fails (drill).
2. **Every `Button` carries its own `role="status"` region.** Rosea's tests that asked for "the" status found
several. *Fixed in the tests* (`test/said.ts`, and one e2e locator), not in the vendored code. Rosea never hands
a button a Promise (D2), so these regions stay empty and say nothing.
3. **The design system's English** ("Working", "Done", "Searched", "Could not search") would reach the player
through a Promise or a search.
- *Prevented* by D2 and `sentText=""`.
- The seal's name is Rosea's own copy: *Search towns*.
- `lint:copy` now reads 46 files, including the vendored folder: 0 problems.
4. **A row of shared buttons does not wrap.** Their words stay on one line, and Rosea's links row had no
`flex-wrap`, so on a 360 px phone it pushed the whole page sideways. The first after pictures showed it.
- *Fixed:* `.more`, `.actions` and `.choices` wrap.
5. **svelte-check could not type `Strike.svelte`** in v1.0.1, a component with no script. The first build here
added `allowJs`. v1.0.4 gives it a script upstream, so `allowJs` is gone again: no change to Rosea's tsconfigs.
6. **ESLint flagged three rules in the vendored `TextField.svelte`.** *Skipped:* `packages/domi-ui` is ignored,
linted upstream, and never edited here.
7. **The licence.**
- v1.0.1 was `UNLICENSED` and v1.0.2 MPL-2.0; neither left this machine.
- The copy now is **v1.5.0**, made by the design system's own `tools/vendor.mjs`. It refuses any tag before the
CPAL-1.0 v1.0.3, and writes `LICENSE`, `NOTICE`, `VERSION` and a `package.json` without scripts. It lives in
`packages/domi-ui` as `@domi/ui` (`workspace:*`).
- The three font packages arrive as its npm dependencies (OFL). Rosea imports none, and `dist/` has no font
file (counted: 0).
8. **The credit** (D9) is `<DomiCredit link={false} />`, added in 1.4.0 from this request. Without it, the web
address is a link that opens a new window. A tap must not carry the player out of an offline garden; on Android, with no internet,
it would lead into a page that never loads. Mark approved the line (via the Aula session): one quiet line on
every launch, never a splash.
- It stands at the foot of every screen: the first open, the garden and the Letter.
- A unit test holds the exact words and that no link to the address exists. The drill: without the line on
the garden, that test failed.
- The tension with CLAUDE.md's *Domi never appears alone* is Mark's to reconcile in his file. The phrase is the
licence's.
9. **The README** says what §6a asks: *Contains @domi/ui (CPAL-1.0, …), in `packages/domi-ui`*. It now names the
public-domain sources of the candidate sentences and the origin of the placeholder art, as the domi-licence
session asked. `tauri.conf.json` declares `"license": "CPAL-1.0"` for the bundles.
10. **Android's Autofill request.** v1.1.0's `TextField as="auto"` draws an editable box on Android, so focusing
the town field no longer makes the WebView ask Google's Autofill service. That request is made by the system's
service, not Rosea's process, so her missing `INTERNET` permission never stopped it. *Fixed (D10)*, with two
unit tests (Android: no native field; elsewhere: the native search field), and the drill fails without it.
The Aula pictures' phone uses an Android user agent, so they type into the editable box in a real browser.
*Not measured on the Wave 10:* the release APK's next phone run should watch for the Autofill request.
## Soul, privacy, reachability, offline
- **Soul:** no words changed except the seal's name, and no gesture changed. The look is Mark's call (above).
- **Privacy:** nothing new leaves the device. The vendored CSS is bundled, with no font files and no requests;
the e2e suite fails on any request outside the origin.
- **Reachability:** none.
- **Offline:** `pnpm test:offline` 1 passed.
## Gates (this branch, v1.5.0, 2026-11-23)
- `pnpm test`: **646 passed**. By package: cpu-guard 13, schema 19, identity 5, release 8, storage 70, content 88,
art-prep 80, tauri 92, ui 92 (88 before, plus 2 credit tests and 2 Android-field tests), engine 179.
- `pnpm lint`, `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems. `pnpm validate:library`: 13 of 13
fixtures rejected.
- `pnpm test:e2e`: **26 passed** against the built app, axe included. `pnpm test:offline`: **1 passed**. The Aula
pictures: **2 passed**; their phone has an Android user agent and types into the editable box.
- No font file in `dist/`. `pnpm look:shots`: 28 pictures after, compared with the 28 before.
- v1.5.0 (*Move the chair* as `Button`): the same counts again: 646 tests, e2e 26, offline 1. The pictures were not
retaken: the button renders the same classes and label as the markup it replaces.
- Drills, each restored after:
- without the credit on the garden, the credit test fails;
- with `DomiCredit`'s link back on, it fails;
- with a native town field on Android, the Android test fails;
- domi-design's two Button tests fail on the old Button.
## Not verified
- The Android and Windows apps: same game, same CSS. Not rebuilt.
- A screen reader. The roles and names are checked by the tests and axe, not heard.
+162
View File
@@ -0,0 +1,162 @@
# Review — `feature/fabrica-release`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/fabrica-release.md`](../features/fabrica-release.md).
PR: https://gitea.marek-novak.cz/mnovak/Rosea/pulls/1 (the first PR on this repository).
Reviewed 2026-11-19 on Windows 10, Node 22.23.4, Fabrica CLI 0.14.0 (installed in `F:\Apps\Fabrica`),
while about twenty other sessions shared the machine: the CPU sat at 100 % for hours, so every run
below waited for the CPU guard (§5.7); none bypassed it.
## What changed for the player
Nothing in the game. The changes are around it:
- **The Windows installer** now also registers `domi-rosea://` for the user, and its uninstaller
removes it. Opening such an address opens the garden.
- **A release** can be made from a tag on Fabrica's runner, signed in Custos, with an Aula page. None
has been made: the first one waits for the author (G-F1, finding 1).
## Gates
Run on the branch head, 2026-11-19, each behind `pnpm guard:cpu` (it refused 6 times; each run waited):
| Gate | Result |
|:--|:--|
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check 0 errors, 0 warnings; 18 of 18 turbo tasks; root and `tools/release` tsc clean) |
| `pnpm lint:copy` | 29 files, 0 problems (now with `AULA.md`, the brief and the notes) |
| `pnpm validate:library` | 13 of 13 fixtures rejected; 78 candidates |
| `pnpm test` | **608 passed**: identity 5, cpu-guard 13, content 88, schema 19, **release 8** (new), art-prep 80, storage 70, ui 88, engine 179, **tauri 58** (+11). A first run under 100 % load timed out one engine test (10.5 s against 5 s; code untouched here) and stopped turbo; the rerun passed. |
| `pnpm test:e2e` | 26 passed. A first run under load timed out the two-profile *keep her safe* test (30 s); the rerun passed. |
| `pnpm test:offline` | 1 passed |
| `pnpm aula:shots` | 2 passed; 8 PNGs (1280 × 800 and 720 × 1600), looked at one by one |
| `fabrica artifex check` | 2 pipelines, app.yaml, aula.yaml, tests.yaml, brief: 0 problems |
| `fabrica aula brief` / `aula shots` / `aula page` / `notes` | the line, 2 paragraphs, 8 captions, 0 problems; 8 shots and `aula.json`; `aula-page.json` and `.html`; 28 changes, 0 copy problems |
| `fabrica tests list` | `web` 26 tests, `phone` 1 test |
| `fabrica preflight rosea --dir .` | 0 blockers, 2 warnings (Custos not checked: finding 2; pnpm's version unread) |
| `pnpm tauri:build` (target on D:) | `Rosea Domi_0.1.0_x64-setup.exe`, 1.31 MiB; the generated `installer.nsi` includes `hooks.nsh` and calls both hooks |
**The bundle** (CLAUDE.md §5.4): the game's code is unchanged, so the PWA bundle is the same; the
installer differs by the NSIS hook. Nothing was deployed or distributed.
## Bug drills
Each test was run with its bug put back, then the file restored by copy (never `git checkout`, see
finding 9):
| Put back | Result |
|:--|:--|
| The hook's command without `"%1"` | CAUGHT (`config.test.ts`) |
| The uninstaller keeps the `domi-rosea` key | CAUGHT (`config.test.ts`) |
| `check-version` forgets `apps/rosea/package.json` (the file the installer and APK read) | CAUGHT (2 tests) |
| `lint:copy` forgets the generated release notes | CAUGHT (`copy.test.ts`) |
| The APK's scope says `mnovak/rosea` | CAUGHT (`sign-apk.test.ts`) |
| `CUSTOS_PIPE` accepted (another Custos signs) | CAUGHT (`sign-apk.test.ts`) |
6 of 6.
## Findings
1. **Publishing is a public release, and G6.1 forbids one (blocker for the release, not the merge).**
The repository on Gitea is public (`private: false`, read anonymously), so a Fabrica `publish` and
the Aula page are public. CLAUDE.md §8 and G6.1: *a legal check of the look comes before any public
release*. **Deferred to the author:** asked through the session that started this one, with three
choices (publish now; make the repository private first; wait). Until then no tag is made. G-F1.
2. **Custos's side was not checked.** `fabrica preflight rosea --dir .` says 0 blockers, 2 warnings, but
the CLI has no `fabrica/` grant yet, so the keys and scopes were *not* checked. Expected blockers
before the first release, each Mark's step in Custos: `domi-code-signing` and `domi-release` must
name `mnovak/Rosea` in their scope; `rosea-android` does not exist (Custos makes it on the first
signature). Running preflight raised a Custos card to certify the Fabrica CLI (match code
836209): it was not retried. **Deferred:** Mark's Custos.
3. **The release's `pnpm test` refuses on a busy PC.** The runner is Mark's desktop, so the CPU guard
runs inside the release; at today's load it would wait three minutes and fail the step after the
install. **Kept:** §5.7 says a dedicated machine may set `ROSEA_CPU_MAX`, a busy desktop may not. A
refused release is re-run when the PC is calm (Fabrica: *Re-run*).
4. **The installed Fabrica CLI does not know `reset` or `maxMinutes`** (docs/35, on Fabrica `main`).
**Fixed:** left out of `tests.yaml`, which now passes `fabrica artifex check`; the reason is in the
file. With the queue's default `clear`, a release build on the phone would block the debug one; the
file says so.
5. **Generated release notes were not copy-checked.** `fabrica notes` writes commit subjects to a page
strangers read; a subject could carry a forbidden word. **Fixed:** `lint:copy` reads
`target/notes/release-notes.md` when it exists, and the release's `notes-copy` step runs before
`page`. Today's notes (28 changes): 0 problems.
6. **Two Custos cards per release.** Fabrica's approval and Authenticode share the run's card; the APK
is signed by `custos-sign` with its own run id (`rosea-v<version>`), so it is a second card (and on
the first release a *first signature* card). **Kept:** the pipeline gives a `run` step no run id to
pass; Postea does the same.
7. **`domi-rosea://` and a running Rosea.** Without a single-instance plugin a second window opens on
the same data. Two windows behave as two tabs (two-tabs.md), so nothing is lost or doubled; a
second window is still a surprise. **Kept**, by §2 (no plugin); written in F5.
8. **Shared Fabrica files.** `F:\Apps\Fabrica\data\workspace.yaml` and `deploy.json` were edited while
other sessions edit them too: Rosea was appended by a read-modify-write within one second, after
another session had added Amicitia and Liber. Both files were read back: every earlier entry is
still there. **Kept:** there is no lock to take.
9. **A drill restored a file with `git checkout` and lost an uncommitted change** (the notes entry in
`lint-copy.ts`). Found at once by the diff, re-applied and committed. **Fixed** the method: drills
now copy the file aside and back.
10. **Gates ran after the first commits, not before** (§5.5 asks for green before any commit). The
machine's load held every full run back for hours. **Fixed in order, not in time:** nothing is
merged before the gates above are green.
11. **The pictures are not the same on every run.** A fresh profile makes a fresh key, and her
weeds and fallen petals follow it, so the garden in two runs differs (weeds in one, none in the
other; water 40 % or 39 % with the hold's real timing). Each picture is still honest. **Kept**,
and Fabrica's `visual` step (docs/28) is not in the release: it would stop every release on a
difference nobody made. A fixed demo key would need a seam in `@rosea/identity`; not worth it now.
12. **Build output on F:.** F: was nearly full (18 GB free, about twenty sessions building). **Fixed
for this session:** Cargo's target and temporary files went to `D:\build\rosea`. The pipeline itself
builds in the runner's folder (`E:\fabrica-runner`). Gradle's home on the runner is its default,
on C:; not changed here (no Android build ran here).
## Soul
*Can this make a lonely person feel worse?* The words a stranger reads (`AULA.md`, the brief, the
notes) were read for guilt, comparison and promises: they say *nothing is lost by being away*,
*no streak resets, no reminders, no counting of anyone*, and call the version early and the pictures
stand-ins. No sentence names the reader's state or promises comfort. `lint:copy` passes on them. The
pictures show one invented rose tended for two weeks, with no number about anyone else. Looked; found
nothing beyond finding 1.
## Privacy
Every path by which a byte could leave the device: **none was added to the game.** No updater, no
plugin, no permission; `latest.json` is not published, so no future build can be pointed at one by
accident. The bytes this feature sends leave Mark's PC, not a player's: the pipeline's release to
Gitea, `fabrica preflight` to the hub and Custos. The pictures are taken on loopback in throwaway
profiles; both tests assert that no request left the test server's origin. The demo rose's file
carries no town (asserted).
## Reachability
`domi-rosea://` lets a local program or a web page (after the browser asks) open the garden. It
cannot pass anything in: the game reads no argument. No Canalis capability is served, so no other app
can reach into her (F6). Nobody becomes reachable.
## Offline
Unchanged: the game makes no request. The release pipeline runs `pnpm test:offline` before anything
is built for a player.
## Test honesty
The new tests fail with their bug put back (6 of 6, above). The `phone` target's spec has never run
(see *Not verified*), so it may be wrong in ways only a phone shows.
## Scope
In: the six onboarding items as they apply (F1–F11). Out: the release itself (finding 1), Canalis
Part B (F6), videos (F8, Pensum `kkpy69`), a `server` part (F2), iOS (G-T1).
## Not verified
- **No release and no signature**: no tag (finding 1). So no Custos card was answered, no
`SHA256SUMS` exists, the Aula page is not live, and `publish`, `sign`, `apk` and `minisign` have never
run. The hub run (`fabrica deploy rosea --part desktop`) has never run.
- **The Android release build** (`pnpm tauri:android-release`) was not run here: its Gradle home is on
C:, which this session may not use. Its only difference from the debug build that works is `--debug`
and the verified path; the first release run is its first build.
- **`domi-rosea://` on a real install**: the installer was built, not run (it writes the real registry).
- **The `phone` target**: never run. It must go through Fabrica's phone queue; the spec may need fixes
that only a phone shows (G-F5).
- **The `e2e` pipeline on the e2e runner**: not started (manual; it would compete with the release
sessions on this PC).
- **Fabrica's *Update all* over a Rosea install**: needs a signed release first.
- **WebView2's own traffic** (G-T6): still unmeasured for Rosea.
@@ -0,0 +1,95 @@
# Review — `feature/keep-her-safe-apps`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/keep-her-safe-apps.md`](../features/keep-her-safe-apps.md).
Reviewed 2026-11-17 on Windows 10, Node 22.23.4, Tauri CLI 2.12.5, WebView2 157; the Android tablet is
the WAVE 10C (Android 16, WebView 140). Closes the release blocker G-T4 found in
[`feature-tauri-platforms.md`](feature-tauri-platforms.md) finding 1. No PR: the only remote is Gitea.
## What changed for the player
- **In the Android and Windows apps**, *Keep her safe* says *She lives in this app, on this device,
until the app is removed. A saved file keeps her anywhere.* The browser sentences, *Ask the browser
to keep her* and the iPhone install hint are gone there; `persist()` is no longer asked.
- **On Android**, *Save her to a file* opens Android's own save screen. When the file is written the
garden says *She is in that file now.*; a player who steps back hears nothing.
- **The PWA is unchanged** (its words, its download; the e2e suite still passes).
## Gates
Run on the branch head (based on `main` 0b72ae0, with the planet garden), 2026-11-17:
| Gate | Result |
|:--|:--|
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check: 0 errors, 0 warnings, after finding 5) |
| `pnpm lint:copy` | 0 problems |
| `pnpm validate:library` | 13 of 13 fixtures rejected; 78 candidates |
| `pnpm test` (guard waited 28 s at 100 %, then started at 42 %; rerun after findings 10–12 at 71 %) | **572 passed**: identity 5, schema 19, cpu-guard 13, content 88, storage 70, art-prep 63, engine 179, **tauri 47** (+7), **ui 88** (+4 here) |
| `pnpm test:e2e` | 26 passed |
| `pnpm test:offline` | 1 passed |
| `pnpm tauri:android` | built; Kotlin compiled; `aapt2`: still no permission, no backup |
| `pnpm tauri:build` + `check-garden.ts desktop` | **3 of 3 passed**: the app's words shown, no browser words; *Save her to a file* started a download (`rose-2026-11-17.json`, cancelled by the check) |
| `check-garden.ts android` (WAVE 10C over Wi-Fi adb, unlocked by the author) | **2 of 2 passed after the fixes** (findings 10–12): opened, watered, force-stopped, reopened, still watered; the app's words; *Save her to a file* → Android's save screen → *She is in that file now.*; *Bring her back from a file* → Android's picker → *Everything in that file is already here.*; the test file removed from `Download`, the app stopped. Earlier runs: 1 failed on the adb server, 3 on findings 11 and 12. |
**The app changed** (CLAUDE.md §5.4): the apps' *Keep her safe*. Rebuilt; **not deployed or
distributed** (G0.13; the apps exist on this machine only).
## Bug drills
| Put back | Result |
|:--|:--|
| `KeepSafe` ignores where she lives (browser words in the app) | CAUGHT |
| The app still asks the browser to keep her | CAUGHT |
| *She is in that file now.* said whatever the answer | CAUGHT |
| The app words speak of a browser | CAUGHT |
| The Kotlin interface renamed (`roseFile`) | CAUGHT |
| The Kotlin answers on another event | CAUGHT |
| The file-name rule lets any `.json` through | CAUGHT (by *accepts the file name the garden gives … and nothing else*) |
| `@Keep` dropped from the bridge class | CAUGHT |
| The game takes any answer but `false` as success | CAUGHT |
| `android.ts check` with Tauri's own `MainActivity` | CAUGHT (exit 1; `apply` puts Rosea's back, exit 0) |
| The page no longer kept between the bars (listener renamed; padding dropped) | CAUGHT, both — after the first test **missed** the renamed call (it matched a substring; tightened to the exact call and padding) |
| The bars' paper drifts from `tokens.css` | CAUGHT |
**Not drilled, and nothing off the device would catch it:** the 8 MB limit and one save at a time
(Kotlin only); `evaluateJavascript` being blocked by the page's CSP (only the device run shows the
answer arriving).
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | **Soul** | The release blocker itself: words of fear and a remedy that did nothing (G-T4). | Fixed: true words in the apps, a working save on Android, a quiet confirmation. |
| 2 | Soul | Should a cancelled save say something (*Nothing was saved.*)? | No: stepping back is the player's choice; commenting on it would scold. The earlier *saved* word is cleared, so nothing false stays on screen. |
| 3 | Privacy | The bridge is a JavaScript interface any script in the WebView could call. | Only the game's page runs there (no network, `'self'` CSP). The bridge accepts only `rose-YYYY-MM-DD.json` and up to 8 MB, and can only open a screen the player must confirm. |
| 4 | Privacy | The player may choose a cloud folder in Android's save screen. | Their choice, made in the system's own screen; the file never holds the town (keep-her-safe.md K4). The game still has no `INTERNET`. |
| 5 | Correctness | svelte-check warned that `inApp` read `wiring` once (`state_referenced_locally`). | `$derived`; 0 warnings. |
| 6 | Test honesty | The desktop check failed twice reading *Her numbers* after the restart: it pressed before her care had been read back (the planet garden made the first paint earlier). | The check waits for her picture, then presses until the button says it is open, never pressing an open one; then 3 of 3 passed. |
| 7 | Correctness | Two quick taps on *Save* while Android's screen opens. | The game returns the same pending promise; Kotlin ignores a second call while busy. Not tried on the device. |
| 8 | Scope | iOS (WKWebView) will need its own save. | G-T1; noted in the analysis. |
| 9 | Process | The tablet was asleep behind a secure lock when the device check was due. | Waited for the author to unlock it; nothing was bypassed. |
| 10 | **Design** | Seen on the tablet's screenshot: the app drew **under Android's system bars** — the clock over the title, the navigation bar over *Bring her back from a file*. Tauri's stock activity turns edge-to-edge on and leaves the page under the bars. | Rosea's `MainActivity` keeps the page between the bars and paints them with the garden's paper, light or dark with the system (as Culina does); a test holds the colours equal to `tokens.css`; seen fixed on the tablet (dark theme). |
| 11 | Test honesty | The check tapped the picker's file while the screen was still sliding in. | It taps only a node that stands still across two readings. |
| 12 | Test honesty | The check matched a node by its description too, and DocumentsUI's *Preview the file …* button comes first: it opened a preview, not the file, and the check failed for a reason that was the check's own. | The file is chosen by its own text only. Found by a probe that did the steps by hand and succeeded. |
| 13 | Process | Git Bash rewrites `/sdcard/…` arguments to Windows paths for `adb shell` typed by hand. | `MSYS_NO_PATHCONV=1` for hand-typed adb; the check passes arguments from Node and is not affected. Lesson in process.md. |
| 14 | Process | The USB link hung `adb install`; the same tablet was reachable over Wi-Fi adb (another session's connection on the shared adb server). | Installed and checked over Wi-Fi; nothing in the other session's state was changed. |
## Correctness
- **Second run**: `android.ts apply` copies the activity each time; `check` compares bytes.
- **App closed mid-save**: the file is written on Android's side only after the player presses Save;
if the app dies before the answer, the promise never resolves and the garden simply says nothing
(the next visit is fresh). Not tried.
- **Two tabs**: an app has one window.
## Reachability, offline
Nothing reaches anyone. The save and the picker work with no network (the app has none).
## What was NOT verified
- iOS, macOS, Linux.
- A minified release APK (the `@Keep` is checked in source only).
- Saving to a cloud folder or a memory card; Android versions other than 16.
- Bringing back a file made on *another* device (the round trip used the same tablet, so it answered *already here*; the merge itself is storage's, tested in keep-her-safe.md).
- The light theme's bars on the tablet (seen in the dark theme only; the colour is tested).
- Bringing her back on Windows (WebView2's file dialog was not driven).
+43
View File
@@ -0,0 +1,43 @@
# Review — `feature/keep-her-safe`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/keep-her-safe.md`](../features/keep-her-safe.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New here: engine +4, storage +6, ui +5, e2e +1
(save on one browser profile, bring her back on a fresh one, reload).
**The app changed** (CLAUDE.md §5.4): *Keep her safe* beside *Her numbers*. Rebuilt by the e2e run;
**not deployed** (no host, G0.13).
## Bug drills — each put back once
| Put back | Result |
|:--|:--|
| Only the current key counts | CAUGHT: 3 |
| One replay for all keys (the lossy merge K3 avoids) | CAUGHT: 2, the merge property among them |
| Import appends acts already there | CAUGHT: 2 |
| Export leaks a field from the identity | **MISSED at first** (finding 1), then CAUGHT |
| A file with one bad act half-imports the rest | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Test honesty | The "nothing else in the file" test kept no identity, so a leaked field was `undefined`; `toEqual` treats a missing and an undefined property as equal, and `JSON.stringify` drops it. The leak drill passed. | **Fixed**: the test keeps a real identity and uses `toStrictEqual`. Lesson: `testing.md`. |
| 2 | Correctness | The private key cannot be exported, so a rose brought back lives under a new key. | K2: a rose is named by her current key and her past keys; the log is never rewritten. |
| 3 | Correctness | Replaying two devices' care as one log can take a day away (one watering makes the other "too much"). | K3: one replay per key, days unioned; property-tested. |
| 4 | Correctness | Weeds, petals and wind are seeded by key, so a moved rose's pattern of needs changes. | Accepted: the pattern is arbitrary, and her days, stage and drift come with her. A moved rose that is opening still drops petals (tested). |
| 5 | Privacy | The file is a diary of when someone was in the app. | Made only on request; the screen says what it holds; no town and no private key (tested in unit and e2e). It goes wherever the player puts it, which Rosea cannot see. |
| 6 | Privacy | A file brought back could have been edited by hand to give her days she was never given. | It only changes the player's own garden; nothing is counted against anyone (CLAUDE.md §1). Phase 3 must not treat imported care as proof towards friends: noted in the analysis. |
| 7 | Soul | "This browser may clear her" can frighten. | Shown only behind *Keep her safe*, with the remedy in the same sentence; a refusal is said calmly. Nothing reminds or nags. |
| 8 | Process | The first e2e run **and the full gate run** both started with the CPU at 100 %, above the 80 % rule (CLAUDE.md §5.7). The load was another project's test run on this machine. The second time the reading was taken, but the run was chained after it without depending on it. Both passed. | **Fixed on `fix/cpu-guard`**: `pnpm guard:cpu` now runs before every full run. Lesson: `process.md`. |
| 9 | Accessibility | A file input styled as a button. | The real input stays in place, labelled by its text, keyboard-operable; axe passes on the restored garden. Not tested with a screen reader. |
## What was not verified
- `persist()` in real browsers: Chromium under Playwright only answers for itself. Firefox's prompt,
Safari's behaviour, and an installed app's automatic call (K5) were not seen.
- The iOS hint on a real iPhone.
- A file saved by a later version of Rosea (`version` 2): refused today, by design.
+68
View File
@@ -0,0 +1,68 @@
# Review — `feature/planet-garden`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/planet-garden.md`](../features/planet-garden.md).
Reviewed 2026-11-17 on Node 22.23.4, Windows 10. There is no PR: the only remote is Gitea.
## What the author decided, and what was built
Mark, on 2026-11-17: *a game, with a proper planet, a character who does the care with animations,
taps on the rose and swiped patterns; weeds tapped and swiped out.* He chose a **round tiny planet**,
a **human gardener, a boy or a girl, customised at the beginning**, and **all four gesture sets**.
- The first open asks **Who tends her?**: boy or girl, skin tone, hair style and colour, clothes
colour, a hat, with a live preview; kept on the device (`profile.gardener`, a JSON Schema of
fixed lists). *Change gardener* reopens it.
- The garden is **her planet** (SVG): the real sky's light (engine `lightAt`), the meadow world, her
bed, the wall, the chair, the watering can, the day's weeds and fallen petals (engine
`weedsToday`, `petalsToday`), the windbreak on a windy hour, and **the gardener**, who walks round
the world to the work and takes a pose for it (stand-ins until art).
- **Tap her** (or Enter on her) opens **the ring** of what she needs, plus *Touch her* and *Close*;
Escape closes it, focus returns to her. **Press the can and tilt** to pour (the tilt sets the
rate); **swipe each weed up**; **sweep across the petals**; **drag the windbreak** to her
windward side; **stroke her petals** slowly. Every gesture has its button in the ring.
- The art board gains the gardener's sheet and eight poses, and her home planet in three lights;
STYLE.md records S2 (reversed) and S6 with their guards and review points 10–11.
Also on this branch: the tap-highlight fix (seen on the real tablet) and `pnpm test:android`.
## Bug drills
| Put back | Result |
|:--|:--|
| A sideways swipe pulls a weed | **MISSED at first**, then CAUGHT: the "sideways" tests were also too short, so the distance rule hid the direction rule; a long diagonal test added |
| Every pulled weed is written as care, not only the last | CAUGHT |
| The sweep need not cover every petal | CAUGHT |
| The windbreak counts wherever it is dropped | CAUGHT |
| Tilt is ignored (pours at the steady rate) | CAUGHT |
| A stroke opens the ring instead of touching her | CAUGHT |
| The gardener question is not shown at the first open | CAUGHT: 2 |
| The gardener's look accepts any value | CAUGHT: 2 |
| Reduced motion still walks | **MISSED at first**, then CAUGHT: the test checked a CSS class, not where the gardener stands; it now reads his angle straight after an act |
The first rerun of the reduced-motion drill reported CAUGHT against a test that was failing on its own (it looked before the garden loaded); fixed, then every drill was run again against a green suite.
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Likeness / legal | A child tending a rose on a small round planet is the book's most recognisable image. | The author's decision, made knowingly. Guards: the gardener is the player's own, in work clothes; nothing to choose recreates the book's boy (tested on the option lists); the planet is a cultivated garden; review points 10–11; **G6.1: a legal check of the look before any public release.** |
| 2 | Soul | A child gardener for players who are mostly grown-ups. | Recorded as a question for the author's two-week play; a grown-up option is one list entry away (`gardener.schema.json`). |
| 3 | Soul | Gestures can feel like failing. | Generous thresholds; a missed gesture does nothing and says nothing; every act also has a button. |
| 4 | Accessibility | Gestures are not keyboard or screen-reader operable. | The ring's buttons do every act; the rose target is a focusable `role=button` with `aria-expanded`; one polite line says what the gardener did; axe passes on the choice, the scene and the ring (e2e). |
| 5 | Motion | Walking and swaying. | `prefers-reduced-motion`: the gardener is placed at once (tested); the global rule shortens the rest. |
| 6 | Two tabs | A gardener changed in one tab is not shown in another until reload (storage announces `gardener`, the UI does not listen yet). | Deferred: harmless (nothing is lost) and rare; noted for the next touch of the Shell. |
| 7 | Correctness | Half the weeds pulled, then the tab closed: nothing written, the weeds come back. | By design (G3): care is the finished job; nothing earned is lost. |
| 8 | Testing | jsdom has no `PointerEvent`: test pointers carried no coordinates, and `svelte/motion` read `matchMedia` at import, failing every file. | A `PointerEvent` polyfill in the planet tests; the walk is a small interval instead of `Tween`. Lessons in `testing.md` and `code.md`. |
| 9 | Process | The first look in the browser was the **old** garden: the preview's service worker served the cached build, as a player's would until *Refresh*. | Cleared for the check; it is exactly what calm-refresh exists for. |
| 10 | Design | The first stand-in had a shading arc that read as a smile on the planet. | Removed after looking. |
| 11 | Art | Painted art cannot simply be recoloured for every skin tone, hair and clothes choice the way the code stand-in is. | The board makes the first look; **how the other looks are drawn is open for the author** (STYLE.md §3b). |
| 12 | Testing | The first tablet run failed to connect while Chrome cold-started, and the connect sat **before** the `try`: Chrome was left running on the tablet. | Stopped by hand at once; the script now opens `try` before the first adb command, retries the connect for 30 s and tolerates half-done setup. Lesson in `testing.md`. |
| — | Privacy | The gardener's look stays in `profile`; it is not in the rose file (tested); nothing is sent. | — |
## Gates and devices
Counts are on the merge (HANDOVER). The tablet (WAVE 10C, 2026-11-17): `pnpm test:android` **7 of 7**
by real touch: the gardener question (a boy, a cap), the town, the ring opened by a tap on her and
closed, pouring by tilting the can, a stroke across her petals, and offline with the server
unreachable. Afterwards Chrome was stopped (`pidof` empty) and both adb mappings removed. **Not verified:** a screen reader; Safari; a phone smaller
than the tablet; weeds and petals by real touch on the device (their days depend on the key).
+55
View File
@@ -0,0 +1,55 @@
# Review — `feature/rose-care`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/rose.md`](../features/rose.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
Counts are on the merge; HANDOVER repeats them.
| Gate | Result |
|:--|:--|
| `pnpm lint` / `pnpm typecheck` | exit 0 / exit 0, `@rosea/identity` included |
| `pnpm test` | see HANDOVER; new: **engine rose 21**, **identity 5**, **storage +27**, **ui rose 7**, schema +1 |
| `pnpm test:e2e` | **12 passed** (+2): water the rose by holding, reload, one day of care; axe on the rose and her numbers |
| `pnpm test:offline` | **1 passed**: the rose is watered with the server gone, the tab closed, and the care is still there |
**The app changed** (CLAUDE.md §5.4): the garden has the rose. The bundle was rebuilt by the e2e and
offline runs; it is **not deployed** (no host, G0.13). Seen at phone width (390 px) in Chromium,
in three states: new, pouring, with her numbers open.
## Bug drills — each put back once
| Put back | Result |
|:--|:--|
| Growth counts acts, not days | CAUGHT: 10 |
| Drift lowers the stage | CAUGHT: 3 (the gap property among them) |
| Too much water still helps | **MISSED at first** (finding 1), then CAUGHT |
| The log replayed in stored order, not time order | **MISSED at first** (finding 1), then CAUGHT |
| Storage lets `amount` ride on a weed | CAUGHT: 2 (one is the agreement with the schema validator) |
| Letting go does not stop the pour | CAUGHT: 2 |
| No greeting after a gap | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Test honesty | Two drills passed. Every too-full test started from a rose that did not need water, so it failed for the other reason; and the shuffled-replay property rarely built a log where order changes anything. | **Fixed**: a full can from 0.39 overshoots and must not help; two waterings stored in reverse must still be two days. Lesson: `testing.md`. |
| 2 | Soul | After a month away she is dry (0), and a half can leaves her at 0.3, still below "enough": the player poured, she still waits. | **Kept, with care**: the can says *Her leaves lift* only when they do, and her line asks for water slowly. A fuller pour brings her back. If players read it as failure, R2's numbers change, not the rule. |
| 3 | Soul | Warmth counts recent days, a streak by another name. | Shown only on request, *resting* at none, never *0 of 7*, and it changes nothing. Watch it in the Phase 1 gate. |
| 4 | Soul | Drift could read as blame. | She is turned a little away and *waiting*; her first words are *"There you are."*; nothing says *forgot* or *missed* (`lint:copy` passes, copy read by hand). |
| 5 | Correctness | `amount` was added to a contract (§6.2). | R1. Required for water, refused elsewhere; Ajv, the generated type and storage's own check agree on 20 variants. The root `if`/`then`/`else` keeps `CareEvent` a strict interface (an `allOf` had added `[k: string]: unknown`). |
| 6 | Correctness | Two tabs creating two identities. | `keepIdentity` keeps the first in one transaction and returns it to both; tested with two connections racing. Two tabs **appending care** at once is fine: the log is append-only and the replay sorts by time. |
| 7 | Correctness | A DST day or a zone change. | The day of an act is recorded when it happens and never recomputed. Wind uses the local clock in the rose's zone. A player who changes their sunset town to another zone shifts later days only. |
| 8 | Privacy | A keypair now exists. | Made on the device; the private key is non-extractable (tested); nothing signs or sends anything. The public key appears only in the local log. |
| 9 | Privacy | The care log is a diary of when someone was in the app. | It never leaves the device; no feature reads it but the replay. Phase 3 must decide what a friend may see, against CLAUDE.md §6.3. |
| 10 | Scope | IndexedDB eviction can take the rose (CLAUDE.md §8, *the cruellest bug*). | **Not solved here**: G0.11 (`persist()`, export-my-rose) is now the most urgent open gap. |
| 11 | Design | The water meter is the browser's default green; *"The garden is being prepared."* is now a little stale. | Cosmetic, left for the garden's real art. |
| 12 | Accessibility | Holding is hard for some hands. | Space and Enter pour too (tested); the leaves lifting is announced (`role=status`); a short pour can be topped up. axe passes. Not tested with a real screen reader. |
## What was not verified
- A real phone, touch, Safari, Firefox, a screen reader.
- The tuning (R2, R4, R5, R6): no person has played it for a week. These are the author's to set.
- Wind and petals in the browser: their days depend on the random key, so e2e cannot predict them;
unit tests cover them with fixed keys.
+51
View File
@@ -0,0 +1,51 @@
# Review — `feature/sun`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/sun.md`](../features/sun.md).
Reviewed 2026-11-01 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, the engine purity rule included: `src/sun/` reads no clock, no network, no device |
| `pnpm typecheck` | exit 0, `scripts/fetch-sun-golden.ts` included |
| `pnpm test` | **236 passed**: schema 15, content 47, art-prep 56, **engine 102 (+50 sun)**, ui 16 |
| `pnpm test:e2e` / `test:offline` | 7 passed / 1 passed. **The app is unchanged**: nothing imports the sun yet |
**Golden.** 26 published days in 6 cities match the U.S. Naval Observatory's tables within
2 minutes on the city's own clock, for sunrise, solar noon and sunset. Two more days, Tromsø's polar
day and night, match the table's *no event*. The table's clock offset agrees with the IANA zone
database on all 28 days.
**Stable.** The property tests ran three times with fresh seeds, 50 of 50 each time.
## Bug drills — each put back once, in `src/sun/sun.ts`
| Put back | Result |
|:--|:--|
| No refraction: the horizon at 90° instead of 90.833° | CAUGHT: 27 failures, every golden day |
| No equation of time | CAUGHT: 25 failures |
| Polar day and polar night swapped | CAUGHT: 8 failures |
| No local-day correction of solar noon | CAUGHT: 2 failures (Kiritimati, D8) |
| The UTC date derived back from the noon instant (finding 2's bug) | CAUGHT: 3 failures (properties near 180°) |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Correctness | The published table for Reykjavík on 21 June lists a sunset at 00:04. That is the **previous evening's** sunset. A naive "events within the calendar day" design would tell a player in Reykjavík that tonight's sunset was 00:04 this morning. | **By design (D2)**: today's sunset is the one after today's solar noon. Tested: it falls on 22 June, local. |
| 2 | Correctness | The first draft derived the UTC date back from the noon instant. Near 180° the noon falls on the next UTC date, which would move sunrise and sunset by a whole day. Spotted on re-reading, before any test ran. | **Fixed**: the date is passed in. Drill 5 shows the property tests now catch it. |
| 3 | Correctness | fast-check found a day with no solar noon: at 179.9° W on UTC, noon crosses midnight in late December. | **Defined (D8)** and pinned by a unit test. No real zone is twelve hours off the sun, so the properties use zones that follow longitude. |
| 4 | Correctness | Near the edge of polar day or night the hour angle can leave its range during refinement. | **Clamped (D5).** Accuracy on those few days is not measured: no golden day sits at the edge. Said here and in *not verified*. |
| 5 | Soul | Where the sun never sets or never rises, "every day at sunset" would leave a person with no invitation for months. | **Fixed (D4)**: the lowest light in polar day, noon twilight in polar night. The author confirmed the second on 2026-11-01 (Q10). |
| 6 | Soul | A DST change could make the game look as if the sunset "moved" because of the player, or move the rose's sentence to another day. | The engine works in instants (D3); the day comes only from `localDay`. Tested on all six DST days in the fixture. |
| 7 | Privacy | The golden script calls a US government API with coordinates. | Only by hand, only for six public city centres, never in a test or the app. The tests read the recorded file. |
| 8 | Privacy | A sunset time narrows down where someone is. | It never leaves the device: the module has no I/O and the purity rule forbids any. Phase 4 must never send it (CLAUDE.md §4). |
| 9 | Test honesty | The DST tests read the clock with `Intl` in the test, which is also what `localDay` uses. A bug in the platform's zone data would hide in both. | Cross-checked: the USNO table states each day's offset independently, and a test asserts the zone database agrees on all 28 days. |
## What was not verified
- Accuracy on the days right at the edge of polar day or night (finding 4).
- Latitudes above 72° on ordinary days, other than Tromsø's 69.6°.
- Years far from 2026. The method holds for centuries, but only 2026 is tested.
- The app: choosing a city, the time-zone guess, and showing the time are later in Phase 1 (G1.2).
+38
View File
@@ -0,0 +1,38 @@
# Review — `feature/sunrise`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/sunrise.md`](../features/sunrise.md).
Reviewed 2026-11-17 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: engine +6 (one property, 300 runs), ui +2
(plus one rewritten), e2e +1 (05:00 in Brno).
**The app changed** (CLAUDE.md §5.4): the line under the garden names the sunrise from sunset until
it comes. Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
## Bug drills
| Put back | Result |
|:--|:--|
| The sunrise is never named | CAUGHT |
| A sunrise already past is named | CAUGHT: 3 |
| The sunrise is looked up on today instead of the next invitation's day | CAUGHT: 3 |
| Tomorrow's sunrise is called this morning's | CAUGHT |
| The in-game sunset names the sunrise | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Correctness | Reykjavík at midsummer: just after midnight the evening's sunset is still ahead; a naive "before sunrise, name the sunrise" rule would name a sunrise there. | The sunrise is taken from the next invitation's own day (R2); tested, and drilled. |
| 2 | Correctness | *Tomorrow* for a sunrise. | Compares the sunrise's local day with today's, the one module computing days; drilled. |
| 3 | Design | The in-game sunset reused the line; late in the evening it would have named the sunrise. | `of="sunset"` keeps its words on the sunset (R4); tested at 22:00, drilled. |
| 4 | Soul | Someone awake at night sees a sunrise time. Could that pull them to the screen? | It is the same line, only naming the next light; no invitation, notice or count. Looked for guilt: nothing ever says a sunrise was missed. |
| 5 | Polar | Polar day and night have no sunrise. | Unchanged lines (R5); tested. Near the polar edges the sun module's clamping (sun.md D5) applies to the sunrise too: accuracy there is worse, as before. |
| 6 | Process | On 2026-11-17 `node_modules` was missing again (the second time in ten days, cause unknown) and the machine sat at 100 % CPU (other sessions and a virtual machine), so the guard refused the full runs for a while. | Reinstalled from the lockfile; the full runs waited for the guard rather than overriding it (§5.7). |
| — | Privacy, reachability, offline | Computed on the device from the chosen town; nothing new is stored or sent. | — |
## What was not verified
- A real phone at dawn; Safari's time formatting.
+56
View File
@@ -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.
+149
View File
@@ -0,0 +1,149 @@
# Review — `feature/tauri-platforms`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/tauri-platforms.md`](../features/tauri-platforms.md).
Reviewed 2026-11-17 on Windows 10 Pro (19045), Node 22.23.4, Rust 1.99.0 (MSVC), JDK 17.0.20,
Android SDK with NDK 27.1, Tauri CLI 2.12.5, tauri 2.12.6, WebView2 157.0.4341.46. The Android device
is a WAVE 10C on Android 16 (API 36) with Android System WebView 140.0.7339.207, over USB. There is no
PR: the only remote is Gitea.
## What the author asked, and what exists now
*"I need also android apk version, desktop version, ios version and pwa version. Put that to claude.md
based on the tauri2 framework."*
| Version | State |
|:--|:--|
| PWA | Unchanged; the e2e and offline suites pass (counts below). |
| Windows desktop | **Built and run.** `pnpm tauri:build` → `rosea-shell.exe` and `Rosea Domi_0.1.0_x64-setup.exe` (NSIS, 1.31 MiB), 5 min 49 s from cold. The check passed: the garden opens, she is watered, the app is closed and opened again, she is still watered. |
| Android | **Built, installed and run on the tablet.** `pnpm tauri:android` → `app-universal-debug.apk` (arm64 only, debug, ~122 MB with debug symbols), verified with `aapt2`; installed with `adb install -r`; the check passed: opens, watered, `am force-stop`, opened again, still watered. Offline by construction: the app holds no `INTERNET` permission. |
| iOS | **Not possible here.** `pnpm tauri:ios` refuses on Windows with the reason (seen). What it needs is in the analysis, G-T1. |
| macOS, Linux desktop | Not built (G-T2). |
Downloads: the author approved (2026-11-17) the Tauri CLI from npm, crates from crates.io, Gradle
artefacts from Google Maven and Maven Central, all expected to come from this machine's caches.
pnpm reported **2 packages downloaded** (the CLI and its Windows binary); cargo and Gradle built
without visible fetches. Nothing was installed system-wide. On the tablet: only Rosea's debug APK
(Playwright's Android support reached the WebView over adb and installed nothing).
## Gates
Filled from the run on the branch head:
Run on the branch after `main` (the sunrise, Coyhaique) was merged into it, 2026-11-17:
| Gate | Result |
|:--|:--|
| `pnpm lint`, `pnpm typecheck` | 0 problems (svelte-check 0 errors) |
| `pnpm lint:copy` | 21 files, 0 problems |
| `pnpm validate:library` | 0 entries; 78 candidates; 13 of 13 fixtures rejected |
| `pnpm test` (guard 74 % → started; `turbo run test --continue`) | **529 passed**: cpu-guard 13, identity 5, schema 19, content 88, storage 65, art-prep 61, **tauri 40**, engine 174, ui 64 |
| `pnpm test:e2e` (guard 59 %) | 22 passed |
| `pnpm test:offline` (guard 73 %) | 1 passed |
| `pnpm tauri:build` (merged tree) | built; NSIS 1.31 MiB; the desktop check **passed** again |
| `pnpm tauri:android` (merged tree) | built and `aapt2`-verified. **Not re-run on the tablet:** at that moment `adb` hung on the WAVE 10C (another session had it over Wi-Fi adb, an emulator attached too), and this session left it alone. The on-device passes (3 of 5 runs, below) are of the build before the merge, whose shell and privacy were identical; the merge changed the game (the sunrise), not the shell. |
The first gate run, before the merge, failed one content test (`America/Coyhaique`, a zone the
upgraded Node knows); `main` had fixed it meanwhile (`fix/coyhaique`), which is why `main` was
merged into the branch before the final run.
**The app changed** (CLAUDE.md §5.4) only for the shell: the PWA's `App.svelte` now reads one
constant that is `'web'` in its build, so the PWA behaves as before. Rebuilt by the e2e and offline
runs; **not deployed** (G0.13). The APK and the installer are on this machine only, not committed.
## Bug drills
Each bug put back by script, the named test run, the file restored. One drill spot-checked to fail
on the right assertion (the worker left on → *has no service worker and no web manifest*).
| Put back | Result |
|:--|:--|
| Tauri's CSP drifts from `csp.ts` (`'unsafe-inline'` added) | CAUGHT |
| `useHttpsScheme` flipped to `false` (origin moves, rose left behind) | CAUGHT |
| Identifier changed | CAUGHT |
| A WebView2 privacy flag dropped | CAUGHT |
| The Android build no longer runs the privacy patch | CAUGHT |
| A plugin crate added to the shell | CAUGHT |
| The service worker left on in the shell build | CAUGHT |
| The `<meta>` CSP left in the shell build | CAUGHT |
| The shell build under `/Rosea/` | CAUGHT |
| The patch forgets to remove `INTERNET` | CAUGHT |
| The patch forgets `allowBackup` | CAUGHT |
| A rule file stops excluding the database from device transfer | CAUGHT |
| The APK check lets any app's receiver-guard permission through | CAUGHT |
| The APK check reads a neighbour's meta-data value | CAUGHT |
| Tauri's logo left as the launcher icon | CAUGHT by `android.ts check` (exit 1, then 0 after the copy); not a unit test |
**Not drilled, and no test would catch it:** `App.svelte` not counting the app as installed (D9).
Seen only through the check's report (`persist()` is asked; on iOS, the install hint, untestable here).
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | **Soul** | Inside the apps, *Keep her safe* says *This browser may clear her if the garden is not opened for a long time. A saved file keeps her for sure.*, offers *Ask the browser to keep her* (which always answers no: `persist()` is `false` in both webviews), and on Android *Save her to a file* **does nothing** (measured). A player is told she may be lost, in the wrong words, and the one remedy fails silently. That is a worry the game made, and a broken promise. | **Deferred, as a release blocker** (G-T4): it needs app words in `packages/ui` copy and a working save, which is the first Tauri plugin and its own feature doc and Soul review. Today the APK and installer exist on this machine only, for the author's own play; CLAUDE.md §8 and the analysis say no app goes to a player before G-T4 closes. Offered as the next session. |
| 2 | Correctness | The first APK carried **Tauri's logo**: `icons.ts` skipped the copy because `tauri android init` had written its own icon later than ours. | Fixed: the Android icons are copied into `gen/android` on every build, and `android.ts check` compares the bytes; the rebuilt APK's `mipmap-mdpi` icon hashes to ours. |
| 3 | Test honesty | The first APK check read a meta-data value from a 300-character window after its name, which could read the next element's value and pass a wrong switch. | Fixed: it reads the value attribute on the line after the name; a test flips one switch on real `aapt2` output and expects its name; drilled. |
| 4 | Test honesty | The first APK check let **any** `…DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION` through, another app's included. | Fixed: only `<this package>.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION`; drilled. |
| 5 | Correctness | The first shell-build test asserted the string `"tauri"` in the bundle; the minifier folds `__ROSEA_SHELL__ === 'tauri'` away, so the assertion tested the minifier. | Removed; what the test keeps is that the constant never reaches the webview (it would throw). |
| 6 | Correctness | The tablet's USB link dropped at least twice in an hour (`device offline`, transport ids 1 → 4 → 5), once mid-check. | The check waits for the device and retries a dropped `adb` command, and finds the device again for each visit. A failure for any other reason still fails at once. |
| 7 | Test honesty | One tablet run timed out clicking *Her numbers* while the garden animated (Playwright never saw the button stable). | The check activates it by keyboard (focus, Enter); the run after the fix passed. Recorded, not hidden: of 5 tablet runs, 3 passed, 1 failed this way, 1 on the USB drop. |
| 8 | Privacy | WebView2's environment variables (used by the desktop check to open a debugging port and a temporary data folder) **replace** the app's `additionalBrowserArgs` for that run. | Said in the check's header: the desktop check proves the garden, not WebView2's silence (G-T6). |
| 9 | Correctness | Tauri creates `%LOCALAPPDATA%\cz.mareknovak.domi.rosea\` at start even when WebView2's data is elsewhere. | The check's run left that folder empty; it was removed after each run. The player's real data lives there (`EBWebView\`), as §4 says. |
| 10 | Privacy | The Windows installer's default WebView2 mode downloads the WebView2 bootstrapper from Microsoft if WebView2 is missing. | Noted in the analysis (§3); Windows 10 and 11 ship WebView2. Not changed. |
| 11 | Scope | No Android dev command (`tauri android dev`): it would need `INTERNET` back and `adb reverse` to stay on 127.0.0.1. | Deferred (D12); not needed to test what exists. |
| 12 | Design | The window is 480 × 800 on the desktop; the garden was designed for a phone. | Kept: portrait like the PWA's manifest. Whether the desktop app should be wider is the author's call after playing it. |
## Correctness
- **Second run**: `android.ts apply` is idempotent (test); `icons.ts` copies every time; a second
`pnpm tauri:android` rebuilt in seconds and re-verified.
- **Clock and DST**: nothing here reads time; the game's own handling is unchanged.
- **Partial write, app closed mid-action**: the app is closed with `kill` (desktop) and
`am force-stop` (Android) right after the care was **committed** (the check waits for the log);
a force-stop *during* the write was not tried. IndexedDB's transactions are the same as in the PWA.
- **Two tabs**: an app has one window; two instances of the desktop app share one WebView2 folder and
would talk through `BroadcastChannel` like tabs. Not tried.
- **Origin is forever**: identifier and `useHttpsScheme` are pinned by tests and drills.
## Soul
Finding 1 is the one: a worry and a broken remedy, in the apps only. Nothing else in this change adds
a word, a count, a badge or a reminder. The apps do not notify. The window has no title-bar status.
## Privacy — every path a byte could leave
| Path | Android | Windows |
|:--|:--|:--|
| The game's own requests | none (check: 0 outside the origin) | none (check: 0 outside the origin) |
| The webview's own traffic | impossible: no `INTERNET` (dumpsys, aapt2) | switched off by flags; **not measured** (G-T6) |
| Cloud backup / device transfer | off (`allowBackup=false`, every domain excluded; dumpsys flags) | n/a (WebView2 data is not roamed) |
| Plugins, IPC | none; no capabilities | none; no capabilities |
| Installer | n/a | may fetch the WebView2 bootstrapper (finding 10) |
| Crash reporting, analytics | none in `Cargo.toml` (test) or the game | same |
| What the webview keeps on the device | `app_webview/` holds the IndexedDB, an **empty** Local Storage database Chromium creates (0-byte log: Rosea writes none), and `AwOriginVisitLoggerPrefs.xml`: hashed visit counters for WebView metrics, which are opted out and cannot leave without `INTERNET`; no backup takes them | `EBWebView\` beside the app; not inspected |
## Reachability
Nothing new: no field reaches anyone, no network.
## Offline
Android is offline by construction and was tested so. The desktop check ran with the machine online
(WebView2's own flags replaced, finding 8); the game made no request outside its origin.
## Test honesty
- 14 of 14 drills caught; one spot-checked for the right assertion.
- The device checks are scripts run by hand, not in `pnpm test`: they need the built app and the
tablet. Their results above are from this machine on 2026-11-17.
- The APK fixtures are real `aapt2` output of the APK built here, saved with the tests.
## What was NOT verified
- iOS, macOS, Linux (G-T1, G-T2). WKWebView's storage location and eviction.
- WebView2's network silence for Rosea (G-T6).
- Bringing a rose back from a file in either app (G-T5: the Android picker opens; nothing was picked).
- A force-stop during a write. Two desktop instances at once.
- The NSIS installer itself was built, not run: the check ran the `.exe` from `target/release`.
- A release (signed) APK; an AAB; any store (G-T3).
- Android versions other than 16, phones (only the tablet), other WebView versions.
+43
View File
@@ -0,0 +1,43 @@
# Review — `feature/thorns`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/thorns.md`](../features/thorns.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: engine +7 (2 properties), ui +4, e2e +1
(touch, rush, axe with the touch focused).
**The app changed** (CLAUDE.md §5.4): a *Touch her* button over her picture. Rebuilt by the e2e and
offline runs; **not deployed** (G0.13). Seen in the built app at phone width: a touch answered
*That tickles.*, three taps 400 ms apart gave *Gently. I have thorns.*, and the keyboard focus ring
is a rounded frame round her picture.
## Bug drills
| Put back | Result |
|:--|:--|
| A tremor counts as fussing | CAUGHT |
| A rush never brings the thorns | CAUGHT: 3 |
| She never rests | CAUGHT |
| Every touch makes her blush | CAUGHT: 2 |
| A touch is written as care | CAUGHT: 2 |
| A held key is a rush | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Soul | *Gently* can be read as a reproach by someone already fragile. | Three separate, deliberate taps in two seconds; said once; she rests and then it is gone; nothing remembers it. Her words are about herself. Accepted for the author's play test; the line is in `copy/en.ts`. |
| 2 | Accessibility / soul | A tremor or a bouncing finger could be told *gently*. | Taps within 250 ms are one touch (T2), and a held key is one; both drilled. Not tried with a real tremor or switch access. |
| 3 | Design | The author's option said *a blush once a day*, and also *nothing is recorded*. Those cannot both hold. | Nothing is recorded; the blush is once per visit (T4). Said plainly in the analysis. |
| 4 | Design | The blush shows on her face only in full bloom, as every mood does; before that only her words answer. | Accepted: the stand-ins draw moods for the full bloom only (STYLE.md). |
| 5 | Correctness | The clock moved back while she rests. | She never rests longer than `restMs` (tested). |
| 6 | Correctness | Two tabs: each has its own touches. | Nothing is shared or stored; harmless. |
| 7 | Test honesty | A frozen e2e clock (`setFixedTime`) would make three clicks one touch, and the rush test would fail for the wrong reason. | The e2e drives the clock with `clock.install` and `runFor`. |
| 8 | Dependence | Touching as a fidget. | It gives nothing after the first blush; no number grows. |
| — | Privacy, reachability, offline | Looked; nothing is stored, sent or shared. | — |
## What was not verified
- A screen reader announcing the bubble change; switch access; a real phone's touch timing.
+52
View File
@@ -0,0 +1,52 @@
# Review — `fix/coyhaique`
Adversarial self-review (CLAUDE.md §5.3) of a data fix to the town list
([`features/sunset-place.md`](../features/sunset-place.md)). 2026-11-17, Node 22.23.4 (tz 2026e).
## What happened
Node on this machine was upgraded from 22.11 to 22.23.4 (the upgrade G0.20 asked for). A content test
then failed: *every zone Intl knows has a guess*: the new Node knows **America/Coyhaique** (created
in 2025 for Chile's Aysén region), and the town list, built under the old Node, had no guess for it.
Rebuilding (`scripts/build-places.ts`, Natural Earth 10m populated places and tzdb 2026f, downloaded
again with Mark's permission) did not fix it, and a town-by-town comparison found more:
| Town | Before | Why |
|:--|:--|:--|
| **Santiago, Valparaíso** | America/Punta_Arenas | Natural Earth files them under **America/Sao_Paulo**. Its fixed UTC−3 matched Chile's fixed-clock southern zone, so the "same clock as one of the country's zones" rule moved Chile's capital onto a clock without daylight saving: its sunset an hour off for half the year. Under the new Node the same rule picked Coyhaique instead. |
| **Coyhaique, Puerto Aisén, Cochrane, Villa O'Higgins** | America/Santiago | Natural Earth predates Aysén's 2025 split. |
| **Punta Arenas, Puerto Natales, Puerto Williams, Río Verde** | America/Santiago | Natural Earth predates Magallanes' 2016 split: wrong since the first build. |
| Yellowknife, Fort Simpson (Canada) | Cambridge_Bay, Dawson_Creek | The rebuild under the new time zone data files them under Edmonton (Mountain time with daylight saving, as both keep). |
## The fix
| # | Change | Why |
|:--|:--|:--|
| C1 | **Another country's own zone is never trusted** for a town, however alike its clock. The town then takes its neighbours' zone. | The clock rule exists to accept old *names* of a country's own zones (Europe/Kiev, Juneau for Anchorage), never a foreign zone. |
| C2 | **Region bands** for southern mainland Chile: 43.7° S – 49° S → America/Coyhaique; south of 49° S → America/Punta_Arenas. Source: zone1970.tab's comments and the regions' borders. | Natural Earth's region names are unreliable (*Ais*, *Aisén…*, Villa O'Higgins under Argentina's *Santa Cruz*); latitude along the real borders is not. Mainland only, so Easter Island keeps Pacific/Easter. |
Twelve towns changed, each listed above; every other town kept its zone. Every zone the new Node
knows has a guess again.
## Bug drills
| Put back | Result |
|:--|:--|
| Another country's zone trusted again | CAUGHT: 2 (Santiago, Valparaíso) |
| No region bands | CAUGHT: 5 |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Correctness | A player who chose Santiago or Valparaíso before this fix has the wrong zone **saved in their profile** (`sunsetPlace` keeps the town with its zone). | Nobody has: the app is not deployed (G0.13). Recorded so a later data fix knows to ask whether a saved town needs refreshing. |
| 2 | Correctness | Band edges are approximate (the Aysén–Magallanes border is not a straight line of latitude). | Only the towns in the list matter, and each is checked against its region; none lies within 0.5° of an edge except Villa O'Higgins (48.47° S), which is in Aysén, as the band says. |
| 3 | Testing | The original data had this bug since its first build; no test pinned a Chilean town. | Nine towns pinned now (`places.test.ts`); drilled. |
| 4 | Process | The bug surfaced only because a runtime upgrade changed what "every zone" means. | Lesson in `technical.md`: data built against a runtime's time zone data is checked again when the runtime changes. |
| — | Soul, privacy, reachability, offline | Unchanged: the list is bundled and searched on the device. | — |
## Gates
Counts in HANDOVER. The town list is bundled lazily (the `places` chunk): **the app changed** for a
player who searches Chile; rebuilt by the e2e and offline runs; not deployed.
+47
View File
@@ -0,0 +1,47 @@
# Review — `fix/cpu-guard`
Adversarial self-review (CLAUDE.md §5.3). Reviewed 2026-11-02 on Node 22.11.0, Windows 10.
There is no PR: the only remote is Gitea.
## Why and what
CLAUDE.md §5.7: *do not start a full run above ~80 % CPU.* On 2026-11-02 that was broken three times
(lessons/process.md), twice right after reading the number. Now `pnpm test`, `test:e2e` and
`test:offline` first run `pnpm guard:cpu` (`tools/cpu-guard`):
```mermaid
flowchart LR
run["pnpm test / test:e2e / test:offline"] --> guard["guard:cpu<br/>sample 2 s with os.cpus()"]
guard -->|"≤ 80 %"| go["the run starts"]
guard -->|"> 80 %"| wait["wait 10 s, sample again"] --> guard
wait -->|"after 180 s"| stop["exit 1: not starting"]
```
Node's `os.cpus()`, not a shell command, so it works the same on Windows, Linux and macOS. A
dedicated machine sets `ROSEA_CPU_MAX` (100 never refuses) and `ROSEA_CPU_WAIT_SECONDS`; a value
that is not a whole number in range is refused, never quietly the default.
## Checks
| Check | Result |
|:--|:--|
| Unit tests, `tools/cpu-guard` | **13 passed**: the busy share between two readings (not since boot), system time as busy, no NaN on equal readings, defaults, overrides, five bad settings, start / wait / refuse |
| On this machine, busy with another project's tests | waited 51 s at 93–100 %, then started at 61 % |
| Forced refusal (`ROSEA_CPU_MAX=1`, no wait) | exit 1 with the reason |
| `pnpm test` behind a refusal | stopped before Turbo ran a single test |
| The guard's reading beside Windows' own counter, sampled together | 64 / 75, 93 / 96, 96 / 98 % |
## Findings
| # | Finding | Resolution |
|:--|:--|:--|
| 1 | The guard measures before the run, not during it: a machine that becomes busy mid-run is not seen. | Accepted: §5.7 is about starting. Stopping a run halfway would leave browsers and servers half-closed, the very mess §5.7 exists to avoid. |
| 2 | `ROSEA_CPU_MAX=100` is a way round the rule. | Documented as for dedicated machines only, in CLAUDE.md §5.7 and the lesson. An override nobody can use would push people to edit the script instead. |
| 3 | The guard adds 2 s to every full run on a quiet machine. | Accepted. |
| 4 | Filtered runs (`pnpm --filter X test`) and drills are not guarded. | By design: they are not full runs. |
| 5 | Its own 2 s sample could read its own start-up as load. | It samples after Node has started. Later, on a quiet machine, it read 2.4–4.1 % beside Windows' 1.5–3.3 %; busy, 2–11 points lower. Close enough for an 80 % line. |
## Not verified
- macOS and Linux (only Windows 10 here).
- A CI runner: there is none yet (G0.22).
@@ -0,0 +1,19 @@
# Review — `fix/release-first-apk-key`
**What:** the release pipeline's `apk` step no longer lists `keys: [rosea-android]`. The first v0.1.0 run
(`r9j7b2sqmzdjg`) was refused at preflight: "Custos has no key rosea-android (step apk)". Custos 0.25 makes that
key only at its first signature, under Mark's Android grant.
## Findings
1. **Does the step still get its key?** `keys:` is only a preflight check (Fabrica docs/23_preflight.md: "Preflight
checks that such a key exists; its scope is the script's to state"). `sign-apk.ts` still asks custos-sign for
`rosea-android`, scoped to `mnovak/Rosea` and the `release` pipeline, and `sign-apk.test.ts` still pins that.
Culina's and Medicus's pipelines leave the key out for the same reason.
2. **What is lost:** after the first release, a missing key is caught at the `apk` step, not seconds before the
build. *Deferred:* put `keys: [rosea-android]` back once the key exists, after v0.1.x is published.
3. **Soul, privacy, reachability, offline:** no code that reaches a player changed.
4. **Test honesty:** `fabrica artifex check` passes (2 pipelines, 0 problems). Nothing tests the preflight list.
What proves it is the next hub run getting past preflight, which is not yet run.
**Scope:** one YAML step, its header comment, and A6 in `android-release-apk.md`.
+53
View File
@@ -0,0 +1,53 @@
# Review — `fix/two-tabs`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/two-tabs.md`](../features/two-tabs.md).
Reviewed 2026-11-07 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## The measurement
CLAUDE.md §8 predicted *derived state drifts; use a BroadcastChannel lock*. Two e2e tests were
written first and run against the built app: both **failed** (a tab already open saw neither care
nor a town chosen in another tab). Reading the code explained why, and showed what the
prediction got wrong: there is no `derived` store and the log is append-only, so nothing stored
can drift and no lock is needed. What drifted was each tab's view, which can make the player water
her twice. Both tests pass after the fix.
## Gates
Counts are on the merge; HANDOVER repeats them. New: storage +7, ui +3, e2e +2 (the measurement).
**The app changed** (CLAUDE.md §5.4), invisibly in one tab: another open tab now follows it.
Rebuilt by the e2e and offline runs; **not deployed** (G0.13).
## Bug drills
| Put back | Result |
|:--|:--|
| Care is announced before it is written | CAUGHT |
| A petal is never announced | CAUGHT |
| A town is never announced | CAUGHT |
| Any message counts as a change | CAUGHT |
| The rose replaces her view with a stale read | CAUGHT |
| The rose does not listen | CAUGHT |
| The garden ignores a town from another tab | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Correctness | A tab's own care can still be on its way to IndexedDB when another tab's news makes it read; a plain replace would drop that care from view, and nothing would bring it back. | The read is added to what the tab shows, never replaces it (the log only grows); drilled. |
| 2 | Correctness | Two reads overlapping, finishing out of order. | Same answer: each only adds, so order does not matter. |
| 3 | Correctness | Announcing before the commit would make the other tab read too early. | Announced after `add` / after the transaction resolves; drilled. |
| 4 | Correctness | A tab mid-pour when the other tab's care arrives: the can now measures against the new level. | Accepted: that is the true level. |
| 5 | Design | A town arriving while this tab is searching for one: the search closes and the new town shows. | Accepted: the player's choice in the other tab is the newer one. A tab in the middle of *Change town* keeps its open search (only the shown town updates). |
| 6 | Privacy | A `BroadcastChannel` message. | Same origin, same browser profile only; one word (`log`, `place`), no data. Nothing leaves the device. |
| 7 | Compatibility | Browsers without `BroadcastChannel` (Safari before 15.4). | Each tab keeps its own view, as before; no data is affected; tested with it removed. |
| 8 | Process | The measurement commit would have been red on its own. | The branch was regrouped before pushing so every commit is green: the tests land with the fix. |
| 9 | Process | On 2026-11-07 the root `node_modules` was missing (cause unknown; the code and history were intact). | Restored with `pnpm install --frozen-lockfile`, which also reinstalled the hooks. |
| — | Soul, reachability, offline | Looked; the fix removes a way the game could blame her care for its own mistake. Nothing new is shown or sent; works offline. | — |
## What was not verified
- Safari and Firefox (BroadcastChannel across an installed app and a tab); a phone.
- The KeepSafe path across tabs end to end (bringing her back in one tab, seen in the other):
covered by the storage test that a brought-back rose announces `log`, not by an e2e.
+16
View File
@@ -0,0 +1,16 @@
# Rosea Domi declares itself to Fabrica (.agents/features/fabrica-release.md; Fabrica core docs/FORMATS.md,
# "Fabrica: the app"). One part: the release pipeline makes the Windows installer and the Android APK from one
# tag. No server part: the PWA's host is still the author's question (GAP_ANALYSIS G0.13), and a server part is
# a NixOS module on the server, not this repository's (F2). The colour is --rose.
# aula: true means the releases carry Aula's kit. The page appears on Aula only once the server's
# modules/aula.nix lists Rosea. The author decided to publish on 2026-11-25 and removed the look's legal check
# (GAP_ANALYSIS G6.1, G-F1; fabrica-release.md F1).
name: Rosea
icon: flower
color: "#b4485e"
aula: true
tagPrefix: v
parts:
desktop:
pipeline: release
check: node scripts/check-version.mjs
+34
View File
@@ -0,0 +1,34 @@
# Rosea Domi: the e2e suites on this PC's e2e runner (fabrica-release.md F9, android-release-apk.md; Fabrica
# docs/20_tests.md, docs/31_runners_here.md, docs/35_phone_queue.md).
# web: the PWA built, then `fabrica tests run --target web` (Playwright headless against the BUILT bundle under
# /Rosea/), the records, traces and screenshots kept with the run.
# phone: the debug APK built, then `fabrica tests run --target phone` on the Wave 10. The step says `device:`, so
# the hub queues this run for the phone and the nested run uses the run's phone (FABRICA_PHONE_LEASED);
# no adb reaches the phone outside the queue. The run waits in the queue without holding a runner.
# Manual: no push webhook reaches the hub yet. Gradle's cache is on D: (never C:; F: is the crowded workspace).
name: e2e
on:
manual: true
runner: windows-e2e
env:
PLAYWRIGHT_BROWSERS_PATH: 'F:\ms-playwright'
GRADLE_USER_HOME: 'D:\build\rosea\gradle'
NDK_HOME: 'F:\Tools\Android\Sdk\ndk\27.1.12297006'
steps:
- id: install
run: pnpm install --frozen-lockfile
- id: build
needs: [install]
run: pnpm build
- id: web
needs: [build]
run: fabrica tests run --target web
artifacts: [".fabrica/runs/tests/**"]
- id: apk
needs: [install]
run: pnpm tauri:android
- id: phone
needs: [apk]
device: Wave 10
run: fabrica tests run --target phone
artifacts: [".fabrica/runs/tests/**"]
+109
View File
@@ -0,0 +1,109 @@
# Rosea Domi: one release, both apps (.agents/features/fabrica-release.md; Fabrica docs/36_app_onboarding.md).
# A `vX.Y.Z` tag (Fabrica: Apps → Rosea → Deploy, or `fabrica deploy rosea --part desktop`) is started on the hub.
# The Windows runner (the Fabrica app on Mark's PC, whose folder is on every step's PATH, so `fabrica` is its own
# CLI) runs every gate of CLAUDE.md §5.5 on a clean checkout, the e2e and offline suites against the BUILT PWA,
# takes the Aula pictures on demo data (e2e/aula.spec.ts), and builds the Windows installer and the Android APK.
# Nothing is signed before Mark's card. Then: Authenticode on the installer (domi-code-signing); the APK through
# custos-sign with rosea-android (Custos 0.25 makes it under Mark's Android grant at its first signature); a minisign
# signature for each (domi-release); the release with SHA256SUMS signed by domi-release.
# No updater and no latest.json: the apps make no network call of their own (CLAUDE.md §2). Mark's PC updates
# through Fabrica's Update all; a player installs the next file over the old one (F3).
# The repository is public, so `publish` is a public release; the author decided to publish on 2026-11-25 (F1).
# Playwright's browsers are in F:\ms-playwright (CLAUDE.md §3: never C:); nothing is downloaded during a release.
name: release
on:
tag: "v*"
manual: true
runner: windows
env:
PLAYWRIGHT_BROWSERS_PATH: 'F:\ms-playwright'
CUSTOS_SIGN_EXE: 'F:\Apps\Custos\custos-sign.exe'
# The Android build (android-release-apk.md): the Tauri CLI needs the NDK named; Gradle's cache on D:, never C:.
GRADLE_USER_HOME: 'D:\build\rosea\gradle'
NDK_HOME: 'F:\Tools\Android\Sdk\ndk\27.1.12297006'
steps:
- id: version
run: node scripts/check-version.mjs ${{ version }}
- id: install
run: pnpm install --frozen-lockfile
- id: lint
needs: [install]
run: pnpm lint
- id: typecheck
needs: [install]
run: pnpm typecheck
- id: test
needs: [install]
run: pnpm test
- id: library
needs: [install]
run: pnpm validate:library
- id: copy
needs: [install]
run: pnpm lint:copy
- id: e2e
needs: [lint, typecheck, test, library, copy]
run: pnpm test:e2e
- id: offline
needs: [e2e]
run: pnpm test:offline
- id: pictures
needs: [offline]
run: pnpm aula:shots
- id: desktop
needs: [offline]
run: pnpm tauri:build
artifacts: ["apps/rosea-tauri/src-tauri/target/release/bundle/nsis/*-setup.exe"]
- id: android
needs: [desktop]
run: pnpm tauri:android-release
- id: notes
run: fabrica notes
artifacts: ["target/notes/release-notes.md", "target/notes/release-notes.json"]
- id: notes-copy
needs: [notes, install]
run: pnpm lint:copy
- id: shots
needs: [pictures]
run: fabrica aula shots
artifacts: ["target/aula/aula-*.png", "target/aula/aula.json"]
- id: page
needs: [notes-copy, shots]
run: fabrica aula page
artifacts: ["target/aula/aula-page.json", "target/aula/aula-page.html"]
- id: approve
needs: [version, desktop, android, page]
approve: "Release Rosea ${{ tag }}?"
- id: sign
needs: [approve]
sign:
key: domi-code-signing
kind: authenticode
files: ["**/*-setup.exe"]
- id: apk
needs: [approve]
# No `keys: [rosea-android]`: preflight checks that a listed key exists, and Custos makes rosea-android only at
# its first signature, so the list refused the first release (run r9j7b2sqmzdjg). Culina's and Medicus's way.
run: pnpm --filter @rosea/tauri sign:apk ${{ version }} ${{ commit }}
artifacts: ["target/release/rosea-domi-*-arm64.apk"]
- id: minisign
needs: [sign, apk]
sign:
key: domi-release
kind: minisign
files: ["**/*-setup.exe", "**/rosea-domi-*-arm64.apk"]
- id: publish
needs: [minisign]
publish:
gitea-release: true
files:
- "**/*-setup.exe"
- "**/*-setup.exe.minisig"
- "**/rosea-domi-*-arm64.apk"
- "**/rosea-domi-*-arm64.apk.minisig"
- "target/aula/aula-*.png"
- "target/aula/aula.json"
- "target/aula/aula-page.json"
- "**/release-notes.md"
- "**/release-notes.json"
sums: domi-release
+39
View File
@@ -0,0 +1,39 @@
# Rosea's pictures for its Aula page (fabrica-release.md F7; Fabrica docs/19_web_shots.md). All are taken by the
# app's own Playwright run (`pnpm aula:shots`, e2e/aula.spec.ts) from the BUILT PWA on demo data the game itself
# made: an invented rose watered once a day for two weeks in March 2026, in Prague, with the gardener's first look.
# `fabrica aula shots` checks and publishes the files; it starts no browser of its own (the PWA lives under
# /Rosea/, and Fabrica's server serves at /). No iPhone pictures: there is no iOS app yet (G-T1).
size: [1280, 800]
shots:
- name: garden
title: Her planet after two weeks of care
section: In a browser or on Windows
file: e2e/aula/garden.png
- name: ring
title: What she needs today
section: In a browser or on Windows
file: e2e/aula/ring.png
- name: numbers
title: Her numbers
section: In a browser or on Windows
file: e2e/aula/numbers.png
- name: sunset
title: Move the chair
section: In a browser or on Windows
file: e2e/aula/sunset.png
- name: safe
title: Keep her safe
section: In a browser or on Windows
file: e2e/aula/safe.png
- name: first-open
title: Who tends her?
section: The first open
file: e2e/aula/first-open.png
- name: phone-garden
title: The garden on a phone
section: On a phone
file: e2e/aula/phone-garden.png
- name: phone-ring
title: What she needs, on a phone
section: On a phone
file: e2e/aula/phone-ring.png
+14
View File
@@ -0,0 +1,14 @@
A small game about a living rose, a fox, and the time we give to people. An early version.
You tend one rose on a round tiny planet of her own. Water her by feel, pull the weeds, gather her fallen petals, shade her from the wind. She grows from the days on which you cared for her, never from a streak, and when you are away she waits.
The garden follows the real sun of a town you choose. No account, nothing sent anywhere. The pictures are stand-ins drawn in code until the painted ones are ready.
- garden: Her planet after two weeks of care, with the gardener beside her and tonight's real sunset below.
- ring: A tap on her shows what she needs today.
- numbers: Her numbers: water, warmth, days of care and how she is.
- sunset: Move the chair: a quiet sunset in the garden, with nothing to press.
- safe: Keep her safe: save her to a file, and bring her back on any device.
- first-open: The first open: dress the gardener who tends her.
- phone-garden: The same garden on a phone.
- phone-ring: On a phone, what she needs is one tap away.
+9
View File
@@ -0,0 +1,9 @@
The first release of Rosea Domi, an early version: the rose, her planet and the gardener.
- Tend her by hand or by button: water by feel, pull weeds, gather petals, shade her from the wind, touch her gently.
- She grows from the days on which care helped, never from a streak, and waits when you are away.
- A gardener you dress at the first open, who walks round her planet to the work.
- The real sunset and sunrise of a town you choose, and a quiet sunset in the garden.
- Keep her safe: save her to a file and bring her back on any device.
- A Windows installer and an Android app. Nothing is sent anywhere; the Android app asks for no permission at all.
- The pictures are stand-ins drawn in code until the painted ones are ready.
@@ -0,0 +1,15 @@
---
id: kkpy69
title: Showcase videos of the main flows for the Aula page
status: todo
priority: normal
labels: [showcase, aula]
created: 2026-11-19T01:31:09+01:00
updated: 2026-11-19T01:31:09+01:00
doc: .agents/features/fabrica-release.md
---
Once Fabrica docs/37 (showcase videos: .fabrica/aula.yaml videos:, WebM <= 8 MiB, <= 60 s, <= 6 per release, published as target/aula/aula-<name>.webm under SHA256SUMS) is on Fabrica main, record short videos from e2e/aula.spec.ts on the same demo garden: watering by the can, the ring of care, moving the chair (the in-game sunset), keeping her safe in a file. Add them to aula.yaml videos: and to the release's publish files. Until then a videos: key fails fabrica aula shots (fabrica-release.md F8).
## Log
- 2026-11-19T01:31:09+01:00 mnovak: created
+24
View File
@@ -0,0 +1,24 @@
# Rosea Domi's Playwright targets (fabrica-release.md F9, android-release-apk.md; Fabrica docs/20_tests.md,
# docs/22_devices.md, docs/35_phone_queue.md). `fabrica tests run --target <name>`, or Tests in Fabrica.
# web: the BUILT PWA (build it first: `pnpm build`) in headless Chromium: the specs of `pnpm test:e2e`.
# phone: the Android debug APK on the Wave 10 test phone, only through Fabrica's phone queue (the e2e pipeline's
# `phone` step, or `fabrica tests run --target phone`). Build it first (`pnpm tauri:android`). A debug APK,
# because only a debug build's WebView can be driven (docs/22 part 5); the release APK is the same game.
# `reset: uninstall`: the app is installed fresh, so a release build of Rosea on the phone (another key)
# cannot block the run. Nothing of Rosea's on the test phone is kept: it holds no rose of anyone's.
dir: .
config: e2e/playwright.fabrica.config.ts
targets:
- name: web
kind: web
title: The garden in a browser
project: web
- name: phone
kind: android
title: The Android app on the test phone
project: android
device: Wave 10
package: cz.mareknovak.domi.rosea
reset: uninstall
maxMinutes: 20
apk: apps/rosea-tauri/src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk
+15
View File
@@ -31,3 +31,18 @@ Thumbs.db
# Generated from JSON Schema by packages/schema build
packages/schema/src/generated/
# The Tauri shell (apps/rosea-tauri): the game's copy for it, Tauri's generated mobile
# projects and the icons made from apps/rosea/public/icon.svg at build time
dist-tauri/
apps/rosea-tauri/src-tauri/gen/
apps/rosea-tauri/src-tauri/icons/
# The domi-app.toml for Atrium Domi, made from the name and version before each desktop build (atrium-adoption.md)
apps/rosea-tauri/src-tauri/atrium/
# The Aula pictures, taken by `pnpm aula:shots` (e2e/aula.spec.ts) and published by Fabrica, never committed
e2e/aula/
# Before-and-after pictures of a change of look (`pnpm look:shots`), never committed
e2e/look/
# Fabrica's records of `fabrica tests run` (run.json, traces): local evidence, quoted in the reviews, never committed
.fabrica/runs/
+45
View File
@@ -0,0 +1,45 @@
# Rosea Domi
*Rosea* (Latin: rose-coloured) is a small game about a living rose, a fox, and the time we give to
people. You tend one rose on a round tiny planet of her own. She grows from the days on which you
cared for her, never from a streak, and when you are away she waits.
**This is an early version.** The rose, her planet and the gardener are here; the fox, the other
planets, friends and the shared sky come later. The pictures are simple stand-ins drawn in code
until the painted ones are ready.
## What you do
- **Tend her by hand.** Tap her to see what she needs today. Tilt the watering can and stop when her
leaves lift: too much is as bad as too little. Pull the weeds, sweep up fallen petals, set the
windbreak against the wind. Every gesture also has a plain button, and works from the keyboard.
- **Choose who tends her.** At the first open you dress your gardener, a boy or a girl.
- **Watch the real sky.** Choose a town near you (or let the device's time zone guess), and the
garden names tonight's real sunset, and after it the real sunrise. *Move the chair* shows a quiet
sunset in the garden, half a minute with nothing to press, then says when the real one is.
- **Her numbers, one tap away.** Water, warmth, days of care and how she is, about her alone.
- **Keep her safe.** Save her to a file and bring her back on any device.
Nothing is lost by being away: no streak resets, no reminders, no counting of anyone.
## Private by construction
There is no account, no email and no password. Everything stays on your device: her care, your town,
your gardener. The game sends nothing anywhere and shows nothing from anywhere else. The Android app
does not even ask for the permission to use the internet.
## Installing
- **Windows:** run `Rosea Domi_<version>_x64-setup.exe`. It installs for you alone, with no
administrator rights.
- **Android:** install the `.apk` (Android 7 or newer). Your phone will ask you to allow installing
apps from where you downloaded it.
- **iPhone, macOS and Linux:** not yet.
Each file is signed: its SHA-256 is in `SHA256SUMS`, and `SHA256SUMS.minisig` is its signature.
## Updating
Install the newer file over the old one, the same way. Your rose stays: she lives with the app on
your device, and a newer version keeps her. Removing the app removes her too, so save her to a file
first (*Her numbers* → *Keep her safe* → *Save her to a file*).
+148 -27
View File
@@ -20,14 +20,19 @@ For the engineering picture read [`.agents/GAP_ANALYSIS.md`](.agents/GAP_ANALYSI
> always **Rosea Domi** in public, and *Domi* never appears alone. In source the name lives in exactly
> three places — `packages/schema/src/constants.ts`, `apps/rosea/index.html` and the web manifest —
> plus the `@rosea/*` package scope and the IndexedDB database name, which change together with them.
> Renaming must stay a one-commit operation until the name is confirmed.
> The app shell adds a fourth: `apps/rosea-tauri/src-tauri/tauri.conf.json` (`productName`, window
> title), which the shell's test holds equal to the constants (§2, *Four versions*).
> Renaming must stay a one-commit operation until the name is confirmed. The bundle identifier is
> the exception: once an APK or installer reaches a player it cannot change without making a
> second, separate app, so it is chosen once, before the first release (§8).
---
## 1. What this project is
**Rosea Domi** is a small web game, installable as a PWA, about a living rose, a fox, and the time we
give to people. It belongs to the Domi ecosystem and is linked from the parent mode of Panda Domi; the
**Rosea Domi** is a small game about a living rose, a fox, and the time we give to people. It ships
as **four versions from one Svelte codebase** — a PWA, an Android app, an iOS app and a desktop app
(§2, *Four versions*). It belongs to the Domi ecosystem and is linked from the parent mode of Panda Domi; the
fox is a quiet nod to Ulfík the red panda (they look alike — an Easter egg, never an explanation).
It is made **for lonely people**, and the word *loneliness* never appears anywhere in the product.
@@ -54,6 +59,12 @@ encouraging, never ruling), never a name or a quote.
Neglect makes her **drift** — turn away, close a little — never break. Short visits hold her; real
time — calendar days on which care helped, never minutes on screen — brings full bloom. One tap
shows her real numbers (water, warmth, days of care, trend).
- **Her planet and the gardener** *(decided by the author, 2026-11-17)* — she lives on a round tiny
planet of her own, cultivated as a garden, and **a gardener the player chooses** (a boy or a girl,
dressed at the first open) does the care, animated. The player cares by hand: tap her to open the
ring of care, tilt the can to pour, swipe weeds out, sweep petals, drag the windbreak, stroke her
petals; every gesture also has a button. The guards against the book's likeness are in
`art/STYLE.md` S2, S6, §3b and `.agents/features/planet-garden.md` §0.
- **The planets** — a journey through lonely grown-ups (the king, the vain man, the businessman, the
lamplighter, the geographer…). Each planet lets the player feel one shape of loneliness.
- **The fox** — follows at a distance from the first planet and comes closer through touch (pet,
@@ -115,8 +126,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` (`profile`, `events`, `keys`) and `identity` (a keypair). `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).
```
@@ -141,7 +152,14 @@ packages/
ui/ # Svelte components + tokens + copy/. No business logic.
apps/
rosea/ # the PWA (Svelte 5 + Vite + workbox) -> @rosea/app
rosea/ # the game (Svelte 5 + Vite + workbox) -> @rosea/app. Built twice:
# dist/ the PWA, under /Rosea/, with its service worker
# dist-tauri/ for the shell: base /, no service worker, no manifest
rosea-tauri/ # the Tauri 2 shell -> @rosea/tauri. Wraps apps/rosea/dist-tauri/; imports no package
src-tauri/ # Rust (a window and nothing else), tauri.conf.json; no capabilities/, so no IPC
android/ # what must survive `tauri android init` (gen/ is never committed): the backup rules,
# and MainActivity.kt (the save bridge; the page kept between the system bars)
scripts/ # icons from apps/rosea/public/icon.svg; the Android privacy patch
services/
lucerna/ # OPTIONAL discovery service (Phase 4), Rust (Axum) + SQLite.
@@ -179,6 +197,7 @@ apps/rosea ──► packages/ui ──► packages/engine ──► packages/sc
└───────► packages/identity ──► packages/schema
services/lucerna ──► packages/schema (trace shape only, via generated JSON Schema)
tools/art-prep ──► art/manifest.json, packages/content, packages/schema (never imported by the app)
apps/rosea-tauri ──► apps/rosea's BUILT output (dist-tauri/) only — no package, no source file
```
- `packages/engine` is pure. Time and randomness are parameters. This is what makes growth, taming and
@@ -186,6 +205,13 @@ tools/art-prep ──► art/manifest.json, packages/content, packages/schema
- `apps/rosea` contains zero growth, taming or sky logic. It renders what the engine returns.
- `services/lucerna` must be deletable. If removing it breaks the rose, the planets, the fox, friends
or the sunset, the shared sky has stopped being optional and that is a **blocker**.
- `.fabrica/` is how Fabrica releases both apps (`fabrica-release.md`): it reads this repository and this
repository imports nothing of Fabrica's. The Windows installer also registers `domi-rosea://` for the
user (an NSIS hook, no Rust code): any such address opens the garden and nothing else.
- `apps/rosea-tauri` must be deletable too: removing it leaves the PWA whole. The game never asks
which shell it is in except through one build-time constant, `__ROSEA_SHELL__` (`'web'` or
`'tauri'`), read in `apps/rosea/src/App.svelte` only, for wiring (no service worker; the app counts
as installed). No package ever reads it.
### Why Svelte, and where Rust earns its place
@@ -194,12 +220,41 @@ Web first is the decision: the game must run from a link, on any phone, with no
- **`services/lucerna`** — a small, long-running, internet-facing service. Rust (Axum) gives memory
safety and a tiny footprint on a home server. Its contract is the JSON Schema in `packages/schema`.
- **A Tauri 2 shell, later (Phase 6)** — same Svelte code, packaged for Android and iOS, matching the
ecosystem's move to Tauri. Its main gift is **local notifications without a server** (see the
notification trap in §8).
- **A Tauri 2 shell, now (the platform track)** — same Svelte code, packaged for Android, iOS and the
desktop, matching the ecosystem's move to Tauri. Its later gift (Phase 6) is **local notifications
without a server** (see the notification trap in §8).
- **Not** a Rust UI framework (Leptos, Dioxus, Yew) and **not** Rust→WASM for the sunset or star
maths: both are small and fast in TypeScript. WASM enters only with a measurement that says it must.
### Four versions, one garden — decided by the author, 2026-11-17
| Version | Made from | Runs in | Where it can be built |
|:--|:--|:--|:--|
| **PWA** | `apps/rosea` → `dist/` | any browser; GitHub Pages under `/Rosea/` | any machine |
| **Android** (APK) | `apps/rosea-tauri` → `pnpm tauri:android` | Android System WebView | Windows, macOS or Linux with the Android SDK, NDK 27, JDK 17 and the Rust Android targets |
| **Desktop** | `apps/rosea-tauri` → `pnpm tauri:build` | WebView2 (Windows), WKWebView (macOS), WebKitGTK (Linux) | each on its own OS: an NSIS installer on Windows; `.app`/`.dmg` on macOS; `.deb`/AppImage on Linux |
| **iOS** | `apps/rosea-tauri` → `pnpm tauri:ios` | WKWebView | **macOS with Xcode only**, and an Apple developer account to put it on a phone |
- **One codebase.** The same Svelte 5 app, the same packages, the same IndexedDB code in all four.
The shell adds a window around the built game and nothing else: no Tauri command, no plugin, no
`@tauri-apps/api` in the game. Each plugin that arrives later (notifications in Phase 6) is reviewed
for network access before it is added, as in Amicitia.
- **Layout: `apps/rosea-tauri/src-tauri/`.** The Tauri 2 CLI looks for `src-tauri/tauri.conf.json`
below the folder it runs in, so this is the layout it expects, one level down. Not Tauri's default
`apps/rosea/src-tauri/`: that would put Rust and the Tauri CLI into the PWA's package. Here the shell
is deletable, and its only input is a built folder — the same seam the e2e suites test
(`tauri-platforms.md` D1).
- **The shell's build of the game** (`vite build --mode tauri`, into `apps/rosea/dist-tauri/`): base `/`,
because Tauri serves the files at the root of its own origin; **no service worker and no web
manifest**, because the files are already on the device and a store or installer brings updates;
the content-security policy delivered by Tauri (`app.security.csp`), the same string as the PWA's
`<meta>` policy, held equal by a test (§8).
- **The non-negotiable properties hold in all four.** Local-first, anonymous, no free text, never
counting people, nothing written outside IndexedDB, no analytics — in any SDK either: the shell
links no analytics, crash-reporting or ads library, and the webviews' own reporting is switched off
where the platform allows it (§8, *the webview phones home*). The Android app asks for **no
`INTERNET` permission** while Rosea has no network feature, so the kernel refuses it any socket.
---
## 3. Commands
@@ -214,20 +269,47 @@ pnpm build # turbo: schema -> engine/content/ui ->
pnpm lint # ESLint, incl. the engine-purity rule (§7)
pnpm typecheck # tsc + svelte-check, every package plus e2e/ and scripts/
pnpm test # vitest, all packages — quote counts per package
pnpm --filter @rosea/engine test # incl. fast-check property tests (sun golden tests: later)
pnpm --filter @rosea/engine test # incl. fast-check property tests and the sun golden tests
tsx scripts/fetch-sun-golden.ts # re-records the sun's published tables (network; by hand, never in a test)
pnpm test:e2e # builds, then Playwright against the BUILT app under /Rosea/
pnpm test:offline # builds, loads once, CLOSES the server, reloads
pnpm validate:library # every hope sentence; fixtures must FAIL
pnpm validate:library # every hope sentence and candidate; fixtures must FAIL
pnpm library:verify <id…> --by <name> # the AUTHOR moves checked candidates into the library; agents never run it
pnpm lint:copy # forbidden words and names (§5.6)
pnpm guard:cpu # waits for, then refuses, a machine above 80 % CPU (§5.7)
pnpm art:board # prompts + stand-ins -> tools/art-prep/dist/board/ (docs/ART.md)
pnpm art:accept <id> <file> # an accepted picture -> art/final/*.webp, sheets cut
tsx scripts/build-places.ts <folder> # rebuilds the town list from downloaded Natural Earth + tzdb (by hand)
# The Tauri 2 shell (apps/rosea-tauri) — each builds the game for the shell first (dist-tauri/):
pnpm tauri:dev # desktop window on the Vite dev server, 127.0.0.1:5173
pnpm tauri:build # desktop release: on Windows an NSIS installer and the .exe
# needs Rust (MSVC), WebView2, VS Build Tools; macOS/Linux on their own OS
pnpm tauri:android # Android debug APK (arm64); needs ANDROID_HOME, NDK 27, JDK 17,
# the four Rust Android targets. Install: adb install -r <apk>
pnpm tauri:ios # macOS + Xcode only — refuses elsewhere with the reason (§8)
pnpm --filter @rosea/tauri test # the shell's tests: config (CSP, name, origin), privacy patch, shell build
tsx e2e/apps/check-garden.ts desktop # the built .exe: water her, close, reopen, still watered (temp data folder)
tsx e2e/apps/check-garden.ts android # the installed APK on the device over adb; `pm clear`s the TEST app first
pnpm tauri:android-release # the release APK (unsigned; verified with aapt2); Fabrica signs it in Custos
# Released through Fabrica (.fabrica/; .agents/features/fabrica-release.md):
node scripts/check-version.mjs <x.y.z> # the four version files agree; Fabrica's Deploy bumps what it names
pnpm aula:shots # builds, then the Aula pictures on demo data -> e2e/aula/*.png
fabrica artifex check # the pipelines, tests.yaml, aula.yaml and the brief
fabrica tests run --target web # the e2e specs as Fabrica's target (build first)
fabrica tests run --target phone # the debug APK on the test phone, ONLY through Fabrica's phone queue
fabrica deploy rosea --part desktop # a release: bump, tag, the hub's run, Mark's Custos cards (public)
# Not yet — they arrive with their first feature:
cargo test --manifest-path services/lucerna/Cargo.toml # Phase 4 onward
```
The build's base path is `/Rosea/` (GitHub Pages' project sub-path); `ROSEA_BASE=/x/` overrides it
for the build and for both Playwright suites together.
for the build and for both Playwright suites together. `pnpm --filter @rosea/app build:shell` builds
the shell's copy instead (`--mode tauri`: base `/`, into `dist-tauri/`); the `tauri:*` commands run it.
`pnpm tauri:android` ends by reading the built APK with `aapt2` and fails if it asks for any
permission or allows backup (`tauri-platforms.md` D6).
> **The `pnpm test` trap, imported from Aeterna.** Exit code 0 says the command succeeded, not that
> tests ran. A filter that matched nothing and a green run look identical. **Quote the counts per
@@ -246,18 +328,35 @@ for the build and for both Playwright suites together.
| Store | Contents | Written by |
|:--|:--|:--|
| `events` | **append-only** log: care given, care received, planet steps, sunsets seen or missed, gestures | `packages/storage`, from the game loop |
| `events` | **append-only** log: care given, care received, petals opened, planet steps, sunsets seen or missed, gestures | `packages/storage`, from the game loop |
| `derived` | rose stage, fox distance, paths, sky light — rebuilt from `events` | `packages/storage`, from values the engine returns |
| `profile` | the rose's name (the only name Rosea knows), chosen city for sunset (skippable; fallback is the device time zone; never GPS), settings, opt-ins | settings screen |
| `keys` | the identity keypair | `packages/identity` |
| `library` | the cached hope library and planets' content, versioned | `packages/content` |
| `library` | the cached hope library and planets' content, versioned — not used yet: the library is bundled at build time (day-sentence.md P5) | `packages/content` |
**`events` is the truth; `derived` is a cache.** Anything in `derived` must be reconstructible by
replaying `events` through the engine. A number that cannot be derived from the log does not belong in
`derived`.
**Nothing else is written anywhere.** No cookies, no `localStorage`, no analytics of any kind, no
third-party origin, no fonts or images from a CDN.
third-party origin, no fonts or images from a CDN. This holds in the shell too: `localStorage` and
`sessionStorage` stay forbidden there, and the Rust side writes no file of its own. (The webview keeps
its own profile beside the database: caches, an empty Local Storage folder Chromium makes, and on
Android hashed visit counters for its metrics, which are switched off and cannot be sent.)
**Where IndexedDB lives in each version** (the webview owns the folder; Rosea writes only its
database there — the webview keeps its own caches beside it):
| Version | Where the `rosea` database is |
|:--|:--|
| PWA | the browser profile, per origin; evictable (§8) |
| Windows | WebView2's user data folder: `%LOCALAPPDATA%\<identifier>\EBWebView\` |
| Android | the app's private data: `/data/data/<identifier>/app_webview/Default/IndexedDB/https_tauri.localhost_0.indexeddb.leveldb` (seen on the tablet) — no Auto Backup, no device transfer (`tauri-platforms.md` D6) |
| macOS / iOS | WKWebView's website data in the app's container (`Library/WebKit/`) *(predicted)* |
| Linux | WebKitGTK's data dir under `~/.local/share/<identifier>/` *(predicted)* |
A rose made in the PWA and the same player's Android app are **two roses** until the player carries
one across with *Keep her safe* (save to a file, bring her back). Nothing syncs them.
**On `services/lucerna`, only when the player has opted in to the shared sky (Phase 4):** an anonymous
trace id, a coarse geocell (~1 km), a day bucket (never a timestamp finer than a day), and the gesture
@@ -310,6 +409,8 @@ Format : [<Package>] <FeatureName>: <one-line description>
Example: [engine] RoseGrowth: Grow from total days of care, never from consecutive days
Remote : GitHub (primary) — branch main; mirrored to gitea.marek-novak.cz, as in Panda Domi
Deploy : GitHub Actions builds apps/rosea and publishes it to GitHub Pages on every merge to main
Apps : the APK and the desktop installer are built by hand on this machine until CI can (G0.22);
never committed. Release signing keys never enter the repository (§5.3's token rule)
```
PRs are opened and merged on GitHub. The Gitea mirror is a backup and must stay in sync — after every
@@ -357,7 +458,10 @@ repository, a review document or command output.
### 5.4 The deployed bundle is the only thing the player sees
The player opens an installed PWA served from a precached shell. Source changes are invisible until
the app is rebuilt, the service worker's bytes change, and the client picks up the new worker. When
the app is rebuilt, the service worker's bytes change, and the client picks up the new worker. In the
Android, iOS and desktop apps the game is inside the package: a change reaches a player only with a
new APK or installer, which must carry a higher version (`apps/rosea/package.json`, read by
`tauri.conf.json`) or Android refuses it as a downgrade. When
reporting a fix, **say whether the bundle was rebuilt and redeployed**. If a change is deliberately
invisible (a refactor, a library update), say so explicitly — a fresh build that looks identical is
otherwise indistinguishable from a stale one. *(Imported from NoAlgoTube and Aeterna, where it
@@ -409,8 +513,14 @@ happened twice.)*
### 5.7 A test run leaves the machine as it found it
Nothing binds to anything but `127.0.0.1`. Every browser a test starts is closed in `finally`. Do not
start a full run above ~80% CPU. *(Imported from Ludus and Aeterna.)*
Nothing binds to anything but `127.0.0.1` — the shell's dev server and a webview's debugging port
included; a phone reaches the dev server through `adb reverse`, never through `--host`. Every browser
a test starts is closed in `finally`, and so is every app a test launches (the desktop `.exe`, the
app on the tablet: `am force-stop`). Do not
start a full run above ~80% CPU. *(Imported from Ludus and Aeterna.)* **Enforced, not trusted:**
`pnpm test`, `test:e2e` and `test:offline` first run `pnpm guard:cpu`, which waits up to three minutes
for the machine to calm and then refuses (`tools/cpu-guard`, lessons/process.md). A dedicated machine
such as CI sets `ROSEA_CPU_MAX` (100 never refuses); never set it to get past a busy desktop.
---
@@ -441,8 +551,8 @@ player can send another player, and the sender picks one.
"trace": "petal:<colour>", "messageId": "ps-23-4" | null, "clientVersion": "0.1.0" }
// act applies to the player's own rose or another player's. (This example once
// listed "wind" | "light"; §1's weeds and fallen petals won — phase0-workspace.md D5.)
// Only "care" is in packages/schema so far; each other kind arrives with the feature doc that uses it.
// other kinds: "sentence-opened", "sunset" (seen), "planet-step", "fox" (pet | brush | feed),
// "care" and "sentence-opened" are in packages/schema so far; each other kind arrives with the
// feature doc that uses it. Other kinds: "sunset" (seen), "planet-step", "fox" (pet | brush | feed),
// "harvest" (berry kind), "thanks", "lantern" (lit — never unlit)
```
@@ -487,9 +597,9 @@ No timestamp finer than a day, no precise location, no free text, no link to the
| Trap | Why it bites |
|:--|:--|
| **A PWA cannot schedule a local notification** *(predicted — verify first)* | The sunset invitation is time-based. A web app generally cannot fire a notification at a set time while closed without a **push server** sending it, and a push server that knows when someone's sunset is knows roughly where they are. On iOS, web push works only for a site added to the home screen. **Decided in Phase 0 (2026-11-01):** in-app sunset only for the web build — no push server — and local notifications through the Tauri shell later (Phase 6). |
| **Polar day and polar night** *(predicted)* | Above the Arctic Circle the sun does not set in summer or rise in winter. "Every day at sunset" has no answer there. The engine must return a defined state and the game must have a gentle alternative (e.g. the hour the light is lowest). |
| **DST and the local day** *(predicted)* | Sunset jumps an hour twice a year under a player who did nothing; a day boundary computed in UTC records Monday-evening care as Tuesday's. One module computes the day. |
| **A PWA cannot schedule a local notification** *(predicted — verify first)* | The sunset invitation is time-based. A web app generally cannot fire a notification at a set time while closed without a **push server** sending it, and a push server that knows when someone's sunset is knows roughly where they are. On iOS, web push works only for a site added to the home screen. **Decided in Phase 0 (2026-11-01):** in-app sunset only for the web build — no push server — and local notifications through the Tauri shell later (Phase 6). The shell exists since 2026-11-17; its notification plugin is still Phase 6. |
| **Polar day and polar night** *(measured 2026-11-01)* | Above the Arctic Circle the sun does not set in summer or rise in winter. "Every day at sunset" has no answer there. Measured: the almanac has no rise or set in Tromsø on 21 June and no events at all on 21 December. `engine/sun` returns `polar-day` or `polar-night` and a gentle moment for each (the lowest light; noon twilight) — `.agents/features/sun.md` D4. |
| **DST and the local day** *(measured 2026-11-01)* | Sunset jumps an hour twice a year under a player who did nothing: Prague's is 18:28 on 28 March and 19:29 on the 29th, while the sun moved one minute. A day boundary computed in UTC records Monday-evening care as Tuesday's. One module computes the day; the sun works in instants. |
| **Comfort becomes wallpaper** | The same words every day stop meaning anything. Comfort words are occasional; the real trace of a real person is constant. Track repetition in tests. |
| **Guilt sneaks in through "gentle" reminders** | "Your rose misses you" is guilt wearing a ribbon. No notification ever refers to neglect — the player's or anyone else's. |
| **Streak creep** | Someone will propose "just a small streak". Growth is from total care; a missed day never resets anything. |
@@ -499,15 +609,25 @@ No timestamp finer than a day, no precise location, no free text, no link to the
| **Location makes people findable** | Coarse cells next to a sparse population identify a house. Cell size must adapt to density, traces must be delayed and auto-deleted, and stranger contact is consent-only (§5.6). |
| **The library as a scam channel** | If any field lets a sender attach free text, a lonely recipient can be manipulated. The id-only contract (§6.1) is the defence. |
| **Copyright through the back door** | An image prompt "in the style of" the book's drawings, a fox or rose that looks like the original, or a famous line "paraphrased" too closely. All forbidden (§5.6); the art pipeline checks likeness (`docs/ART.md`). |
| **A child on a small round planet with a rose** *(a risk the author accepted, 2026-11-17)* | It is the book's most recognisable image, and its estate holds trademarks. The author chose it knowingly. Keep every guard (STYLE.md S2, S6, §3b, review points 10–11: the gardener is the player's own, in work clothes, never a scarf, coat, cape, suit or crown; the planet is a cultivated garden, never volcanoes, baobabs or a lone lamp post). The legal check of the look that used to come before release (G6.1) was **removed by the author on 2026-11-25**: he releases with the risk accepted, and the guards are now the only defence, so a review that weakens one is a **blocker**. |
| **Medical claims in a store listing** | One word like *heal* in marketing copy can pull the product toward medical-device rules. `lint:copy` also runs on store text kept in the repo. |
| **IndexedDB is evictable** *(predicted)* | WebKit can discard origin storage after seven days without interaction — exactly the shape of a player who drifted away and comes back. Call `navigator.storage.persist()` where it exists, prompt iOS players to install, and make export-my-rose a first-class feature. A player returning to find their rose gone is the cruellest bug this product could have. |
| **The stale service worker** | A precached shell keeps serving old JS to a player who has "updated". Detect a waiting worker and offer an explicit, calm *refresh* control. |
| **Two tabs, one database** *(predicted)* | Two event streams into one store; derived state drifts. Use a `BroadcastChannel` lock. |
| **IndexedDB is evictable** *(predicted; answered by `keep-her-safe.md`)* | WebKit can discard origin storage after seven days without interaction — exactly the shape of a player who drifted away and comes back. Call `navigator.storage.persist()` where it exists, prompt iOS players to install, and make export-my-rose a first-class feature. A player returning to find their rose gone is the cruellest bug this product could have. |
| **The stale service worker** *(answered by `calm-refresh.md`)* | A precached shell keeps serving old JS to a player who has "updated". Detect a waiting worker and offer an explicit, calm *refresh* control. |
| **Two tabs, one database** *(measured 2026-11-07; answered by `two-tabs.md`)* | Predicted: derived state drifts, use a lock. Measured: nothing stored drifts (the log is append-only, there is no `derived` store yet), so no lock — but each tab's **view** went stale, and a player could water her twice. `packages/storage` announces each committed write on a `BroadcastChannel`; the other tabs read again, keeping what they already show. When a `derived` store arrives, decide the lock again. |
| **GitHub Pages serves under a sub-path** *(predicted)* | A project site lives at `/<repo>/`, not `/`. Vite `base`, the web manifest `start_url` and `scope`, and the service worker scope must all agree, or the installed app opens a 404 or never updates. The offline suite runs against the same base path. |
| **GitHub Pages cannot set response headers** *(predicted)* | No custom CSP or cache headers. The content-security policy goes in a `<meta>` tag; caching is controlled by the service worker and hashed filenames. |
| **Pages hosts files, not services** | `services/lucerna` cannot live on Pages. It runs on Mark's own server (Phase 4), and the app must work fully without it. |
| **`pnpm test` exits 0 having run nothing** | Quote counts per package. |
| **Playwright against the dev server** | It never registers the service worker and has never reproduced a caching bug. |
| **Base path in the shell** *(measured 2026-11-17)* | The PWA lives under `/Rosea/`; Tauri serves the game at the root of its own origin (`https://tauri.localhost/` on Windows and Android with `useHttpsScheme`, `tauri://localhost/` on macOS and iOS). A shell build with base `/Rosea/` would ask for `/Rosea/assets/…` and open a blank window. The shell's copy is built with base `/` into its own folder, so the two can never be mixed up; measured: the garden opens at `https://tauri.localhost/` on Windows and on Android. |
| **A service worker inside a webview** *(answered 2026-11-17)* | Inside Tauri the files are already on the device; a worker would cache a second copy, could serve a stale game after an app update, and *A new version of the garden is ready* would offer a refresh that fetches nothing. The shell's build has no worker and no manifest: `vite-plugin-pwa` is disabled there and `registerSW` is its no-op. Measured: no registration in either app. |
| **Two content-security policies** *(conflict predicted; the answer measured 2026-11-17)* | The PWA carries its policy in a `<meta>` tag (Pages sends no headers). Tauri can deliver its own policy and adds hashes for the scripts it injects; a page with **both** obeys both, and the `<meta>` would block what Tauri adds. So the shell's build has no `<meta>` policy and Tauri delivers the same string, held equal by `apps/rosea-tauri` test. Measured: no CSP violation and no request outside the origin, on Windows and on Android. |
| **IndexedDB eviction in a webview** *(partly measured 2026-11-17)* | WebView2 and Android WebView are Chromium: best-effort storage can be cleared under disk pressure, and an app's data is wiped on uninstall (the Windows uninstaller offers to delete app data). WKWebView on iOS may purge website data of an app that is not used. `persist()` answers `false` in WebView2 and in Android WebView (measured). *Keep her safe* is the real defence. In the apps it speaks of the app, not a browser, and on Android it saves through Android's own save screen, because `<a download>` does nothing in Android WebView (measured; `keep-her-safe-apps.md`). |
| **The webview phones home** *(measured in Amicitia, 2026-11-08; here: Android closed by construction, Windows unmeasured)* | A webview talks to its maker on its own: WebView2 to Microsoft and DNS-over-HTTPS providers, Android WebView to Google's metrics and an Autofill server as soon as a field takes focus. Desktop: `additionalBrowserArgs` switches these off (undocumented feature names a runtime update can break). Android: no `INTERNET` permission at all while Rosea has no network feature, plus metrics and Safe Browsing off in the manifest, applied by a committed patch because `gen/` is regenerated. Measure on every release build. |
| **Auto Backup sends the garden to a cloud** *(answered 2026-11-17)* | A stock Tauri Android manifest lets Android copy the app's data — the care log, the keys, the chosen town — to the player's cloud backup, without the player choosing it. The patch sets `allowBackup="false"` and excludes every domain from cloud backup and device transfer; *Keep her safe* is how a rose moves. Measured: the installed package carries no `ALLOW_BACKUP` flag and no `INTERNET` permission (`dumpsys package`); `pnpm tauri:android` checks the APK itself with `aapt2`. |
| **Android draws under the system bars** *(measured 2026-11-17)* | Tauri's stock activity turns edge-to-edge on, and the WebView does not reliably report the bars as `env(safe-area-inset-*)`: the clock sat over the title, the navigation bar over a button. Rosea's own `MainActivity` (`apps/rosea-tauri/android/java/`, copied into `gen/` by `android.ts`) keeps the page between the bars and paints them with `--paper`. |
| **iOS cannot be built on Windows** *(known)* | `tauri ios init` and every iOS build need macOS and Xcode; installing on a phone needs an Apple developer account (free for one's own device, paid for TestFlight and the App Store). `pnpm tauri:ios` refuses on Windows with this reason. |
| **The bundle identifier and the origin are forever** | An Android `applicationId` or iOS bundle id cannot change after a release without becoming a different app: the old one keeps the player's rose, the new one starts empty. Chosen once (`cz.mareknovak.domi.rosea`), before the first release, even though the product name may still change. The same holds for `useHttpsScheme` (`true`): flipping it changes the webview's origin, and IndexedDB is per origin, so the rose is left behind. The shell's test pins both. |
---
@@ -521,7 +641,8 @@ No timestamp finer than a day, no precise location, no free text, no link to the
| Change how the rose grows | `packages/engine/src/growth/` |
| Change how the fox comes closer | `packages/engine/src/taming/` |
| Change the sunset or sunrise | `packages/engine/src/sun/` — read the polar and DST traps first |
| Add or edit hope sentences | `content/library/` — then `pnpm validate:library` |
| Add or edit hope sentences | Agents propose in `content/candidates/`; the author verifies with `pnpm library:verify`. Then `pnpm validate:library` |
| Change what friends can send each other | `packages/schema` §6.1 — and re-read §5.6 rule 1 |
| Change the shared sky | `services/lucerna/` — and re-read §4 and §5.6 rules 6–7 |
| Build the Android, iOS or desktop app | `apps/rosea-tauri/`, then `.agents/features/tauri-platforms.md` and the shell traps in §8 |
| Understand a past decision | `.agents/features/*.md`, `git log`, `.agents/reviews/*.md` |
+245 -12
View File
@@ -2,7 +2,91 @@
Rewritten at the end of each session (CLAUDE.md §5.1).
## Last session — 2026-10-31 to 2026-11-01
## Latest — 2026-11-23: @domi/ui, the shared look, and the credit
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.5.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- It is vendored unchanged into `packages/domi-ui` by the design system's `tools/vendor.mjs`.
- Her colours, system fonts, art and layout stay.
- The licence credit stands at the foot of every screen, in its exact words, as plain text.
- Analysis: [`.agents/features/domi-ui.md`](.agents/features/domi-ui.md). Review:
[`.agents/reviews/feature-domi-ui.md`](.agents/reviews/feature-domi-ui.md), which lists where the new look
meets her art rules, for Mark.
- Before and after pictures: `ROSEA_LOOK=before|after pnpm look:shots`.
- **To upgrade @domi/ui:** from a domi-design clone, `node tools/vendor.mjs <rosea>/packages/domi-ui <tag>`.
- **The Button fix** went from here to domi-design (PR mnovak/domi-design#18, released in 1.4.0): Water and Touch her
are `Button` again, and *Move the chair* too, with 1.5.0's `bind:element`.
## Earlier — 2026-11-23: the licence
- **`docs/licence`**: Rosea Domi is under **CPAL-1.0** from this commit; earlier commits carried no licence.
- `LICENSE` is the Domi template with the name filled in; `CPAL-1.0` is set in every `package.json` and in
`Cargo.toml`.
- A new `README.md` carries the Exhibit B credit (*Built on Domi* · https://aula.marek-novak.cz · Copyright (c)
2026 Marek Novák).
- Review: [`.agents/reviews/docs-licence.md`](.agents/reviews/docs-licence.md).
- **Mark's:** the in-app credit. It is proposed as one quiet line under the Letter's link and is not built, because
CLAUDE.md says *Domi* never appears alone in public.
- **`feature/domi-ui`** is local and unpushed, waiting for `@domi/ui` v1.0.3 under CPAL-1.0.
## Earlier — 2026-11-22: Atrium step 1, the manifest alone
- **`feature/atrium-door`** ships a `domi-app.toml` next to `rosea-shell.exe` (Windows only):
- the values are `id rosea`, `name Rosea Domi`, `label Rose`, accent `#e8899b`, `free = true`, `hostable = false`;
- it is built from the name constants and the game's version, and never committed;
- Atrium's own parser accepts it, and refuses 27 hostile fixtures with the same codes as Rosea's test.
- Review: [`.agents/reviews/feature-atrium-door.md`](.agents/reviews/feature-atrium-door.md).
- **No door** (contract v0.1 §8 3e). By Mark's ruling, CLAUDE.md §2 (*a window and nothing else*) and §4 (*the Rust
side writes no file*) stand. Rosea makes no Canalis call, and Atrium Domi finds her by her uninstall entry and
this file. Later Atrium Days (audit, updates, backup, today) will ask again for the door.
## Earlier — 2026-11-22: the Atrium Domi adoption plan (plan only)
- **`docs/atrium-adoption`**: [`.agents/features/atrium-adoption.md`](.agents/features/atrium-adoption.md) has the
inventory Atrium's Appendix A asks for:
- no Tauri invoke or listen;
- one database, `rosea` IndexedDB in WebView2's folder;
- no outgoing request;
- accent `#b4485e` / `#e8899b`; the icon is the placeholder `icon.svg`.
- **The plan's decisions:** R1 keep Rosea's own origin when hosted, or her rose seems gone; R2/R3 snapshot and
restore as the `rosea-rose` file, additive only. R4 (Rust in the shell) and R1 are Mark's, along with *free* and
*today* (G-AT1).
- **Code waits** for Atrium's `docs/APP_CONTRACT.md` v0 (the Aula session says when). Visual changes wait for `@domi/ui`.
- **The key:** Custos 0.25's *Android grant* (Mark, `mnovak/*`, per Aula) should make `rosea-android` at the first
signature (G-F7, unverified).
- **The release:** still waits for Mark's own yes in this session to remove G6.1 from CLAUDE.md. The request
reached this session only through the Aula session, and CLAUDE.md is not edited on a relayed request.
## Earlier — 2026-11-21: the APK for a release, tested through the phone queue (blocked twice)
- **`feature/android-release-apk`**: the phone target says `reset: uninstall` and `maxMinutes: 20`; the e2e
pipeline gains `apk` and `phone` (`device: Wave 10`, so the hub queues it); both pipelines name the NDK and put
Gradle's cache on D:. Analysis: [`.agents/features/android-release-apk.md`](.agents/features/android-release-apk.md).
Review: [`.agents/reviews/feature-android-release-apk.md`](.agents/reviews/feature-android-release-apk.md).
- **The phone test passed** through the hub's queue (`fabrica tests run --target phone`): run
`20261121-101158-uckm`, 1 passed, 0 failed, on the Wave 10. A planted fault failed as it must. The e2e pipeline's
`phone` step still waits for the hub's e2e runner (Mark).
- **Blocked on the key:** `rosea-android` does not exist, and Custos will not make it, because it is not in Custos's
`ANDROID_APPS` (0.22.0 here, 0.24.0 too). This corrects `fabrica-release.md` F4. It needs a Custos change or
Mark's *Create Android key* (G-F7).
- **Still the author's:** publication (G6.1, G-F1).
## Earlier — 2026-11-19: released through Fabrica (built, not published)
- **Rosea is a Fabrica app** (`feature/fabrica-release`, PR mnovak/Rosea#1): `.fabrica/` (app, the
`release` and `e2e` pipelines, `tests.yaml` with `web` and `phone`, `aula.yaml`), `AULA.md`, the brief
and the 0.1.0 notes, `scripts/check-version.mjs`, the APK signed in Custos (`sign:apk`,
`rosea-android`), `domi-rosea://` from the installer, the pictures on demo data (`pnpm aula:shots`).
Analysis: [`.agents/features/fabrica-release.md`](.agents/features/fabrica-release.md). Review:
[`.agents/reviews/feature-fabrica-release.md`](.agents/reviews/feature-fabrica-release.md).
Rosea is in Fabrica's workspace and `deploy.json` on this PC.
- **No release was made.** The Gitea repository is public, so a release is public, and G6.1 comes
first. The author's choice is open (G-F1): publish anyway, make the repository private first, or wait.
- **Before the first release, in Custos (Mark):** `domi-code-signing` and `domi-release` scoped to
`mnovak/Rosea`; `rosea-android` is made by Custos on the first APK signature; back the vault up.
- **Not run:** the `phone` target (only through Fabrica's phone queue); no installer was run, so
`domi-rosea://` is tested as text only (G-F4).
## Earlier — 2026-10-31 to 2026-11-17
**Done.**
@@ -12,9 +96,10 @@ 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: 180 (schema 15, content 47,
art-prep 50, engine 52, ui 16). E2E: 7. Offline: 1. `lint:copy`: 12 files, 0 problems.
`validate:library`: 13 of 13 fixtures rejected.
- **Gates (2026-11-17, the planet garden merged with the Tauri shells):** all pass on this machine.
Unit tests: 561 (cpu-guard 13, identity 5, schema 19, content 88, storage 70, art-prep 63, tauri 40,
engine 179, ui 84). E2E: 26. Offline: 1. Tablet (`pnpm test:android`): 7. `lint:copy`: 26 files, 0 problems.
`validate:library`: 13 of 13 fixtures rejected; 78 candidates pass.
- **Built, not deployed:** there is no host yet.
- **Roadmap and gameplay docs:** `docs/ROADMAP.md` and `docs/GAMEPLAY.md` are on
`docs/roadmap-gameplay`, as the author gave them, together with a read against the
@@ -26,14 +111,129 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
appears in the garden, and the page opens at `#letter`, offline too. Review:
[`.agents/reviews/feature-letter-slot.md`](.agents/reviews/feature-letter-slot.md).
- **The art pipeline and the art board:** merged to `main`. [`docs/ART.md`](docs/ART.md) is the
pipeline. [`art/STYLE.md`](art/STYLE.md) is a draft for the author. [`art/manifest.json`](art/manifest.json)
lists 25 Phase 1 pictures, with 29 stand-ins in `art/placeholders/`. `tools/art-prep` builds
pipeline. [`art/STYLE.md`](art/STYLE.md) is approved by the author (2026-11-01, S1–S5 kept as drafted). [`art/manifest.json`](art/manifest.json)
lists 86 pictures in phase order, everything Phases 1–5 need (34 for Phase 1; the planets are drafts
until their feature docs). 101 stand-ins are in `art/placeholders/`. **Board v2 (2026-11-07):** after
Mark disliked the first `rose-sheet` (watercolour, a smiley on a ball), STYLE.md §1 and every
prompt were rewritten: the look first, the face on her petals, the grid in words, the book's
motifs checked in review instead of named in prompts. Review:
[`.agents/reviews/art-board-v2.md`](.agents/reviews/art-board-v2.md). `tools/art-prep` builds
prompts and the board (`pnpm art:board`) and moves accepted pictures into `art/final/`
(`pnpm art:accept`). The board is published, private:
https://claude.ai/artifact/Y3xM4F5WGv77Qp2UdMXWix. To update it, run `pnpm art:board`, then
republish `tools/art-prep/dist/board/` to that URL. Review:
[`.agents/reviews/feature-art-board.md`](.agents/reviews/feature-art-board.md).
- **The sun (Phase 1 begins):** merged to `main`. `packages/engine/src/sun/sun.ts` gives
sunrise, solar noon and sunset for a local day and a place, or polar day or night, and the
moment the game invites the player out. It matches the U.S. Naval Observatory's tables within
2 minutes in Prague, Reykjavík, Tromsø, Quito, Sydney and Anchorage, DST days included.
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).
- **The rose (Phase 1):** merged to `main`. She stands in the garden with her face and says what
she needs. Water by holding the button until her leaves lift (Space or Enter too); shade her in
the wind, pull the weeds, gather fallen petals, each shown only when needed. She grows from days
on which care helped, drifts and waits when left, never loses her stage; her numbers are one tap
away. Every act is one append-only event in IndexedDB (`events`), replayed by `engine/rose`. The
care event gained `amount` for watering. `@rosea/identity` makes the player's keypair, kept in
`keys`. Analysis: [`.agents/features/rose.md`](.agents/features/rose.md). Review:
[`.agents/reviews/feature-rose-care.md`](.agents/reviews/feature-rose-care.md).
- **Keep her safe (G0.11):** merged to `main`. Beside *Her numbers*, *Keep her safe* says what the
browser has promised, asks it to keep her, saves her to a file (her care and keys; never the town,
never the private key) and brings her back from one, on any device, without losing anything she
has there. A rose is now named by her current key and her past keys. Analysis:
[`.agents/features/keep-her-safe.md`](.agents/features/keep-her-safe.md). Review:
[`.agents/reviews/feature-keep-her-safe.md`](.agents/reviews/feature-keep-her-safe.md).
- **A calm refresh (G0.10):** merged to `main`. When a new version of the garden is published, the
installed app fetches it and waits; one quiet line, *A new version of the garden is ready.*, offers
*Refresh*. Nothing reloads by itself. With this, fixes can reach a phone once the app is hosted.
Review: [`.agents/reviews/feature-calm-refresh.md`](.agents/reviews/feature-calm-refresh.md).
- **The in-game sunset (Phase 1):** merged to `main`. *Move the chair* under tonight's sunset line
opens a quiet scene: the sky drawn in code from day to dusk, the sun setting behind the garden,
half a minute with nothing to press; then the real sunset's time, *Watch it again*, *Back to the
rose*. Escape or a tap leaves early. Review:
[`.agents/reviews/feature-chair-sunset.md`](.agents/reviews/feature-chair-sunset.md).
- **The day's sentence (Phase 1, G1.5):** merged to `main`. When the rose needs nothing she keeps
a folded petal; *Open her petal* shows one sentence and its source. One a day; an unopened petal
is the same petal next week; on a nearby day she also remembers an earlier one; around the real
sunset she says *The sun is low now*, and after opening, *Go and look at the sky.* The library is
bundled at build time after `validate:library` passes. **The shipped app shows no petal yet:**
the library is empty until the author verifies sentences. 78 candidates wait in
`content/candidates/`, each copied from a Project Gutenberg edition and checked against it by
script; read [`content/candidates/README.md`](content/candidates/README.md) first, then
`pnpm library:verify <id…> --by Mark`. Analysis:
[`.agents/features/day-sentence.md`](.agents/features/day-sentence.md). Review:
[`.agents/reviews/feature-day-sentence.md`](.agents/reviews/feature-day-sentence.md).
- **Thorns (Phase 1):** merged to `main`, as the author chose (thorns teach gentleness). *Touch her*
over her picture: a fond answer, a blush on the first touch of a visit; three quick taps and she
says *Gently. I have thorns.* and rests four seconds. A tremor's taps count as one. Nothing is
recorded. Tuning in `TOUCH` (`packages/engine/src/touch/touch.ts`). Review:
[`.agents/reviews/feature-thorns.md`](.agents/reviews/feature-thorns.md).
- **Two tabs (2026-11-07):** merged to `main`. Measured first: an open tab did not see care or a
town from another tab, so a player could water her twice. Storage now announces each committed
write on a `BroadcastChannel`; the other tabs read again. No lock: nothing stored can drift.
On this date the root `node_modules` was found missing; `pnpm install --frozen-lockfile`
restored it. Review: [`.agents/reviews/fix-two-tabs.md`](.agents/reviews/fix-two-tabs.md).
- **The sunrise (2026-11-17):** merged to `main`. From sunset until it comes, the garden's line names
the real sunrise; the in-game sunset still names the sunset. Seen on a real Android tablet.
Review: [`.agents/reviews/feature-sunrise.md`](.agents/reviews/feature-sunrise.md).
- **The town list's clocks for Chile (2026-11-17):** merged to `main`. Santiago and Valparaíso had
been on a southern zone's clock (no daylight saving) since the first build, and Aysén and
Magallanes on Santiago's. Found because the upgraded Node knows America/Coyhaique. Review:
[`.agents/reviews/fix-coyhaique.md`](.agents/reviews/fix-coyhaique.md).
- **Tested on a real Android tablet (2026-11-17):** the built app over USB (`adb reverse`, the server
still on 127.0.0.1), driven through Chrome's DevTools socket: first open, the town, watering by a
real held touch, the in-game sunset, and **offline** reloads with the server unreachable all pass.
When device testing ends, the app used is stopped at once (the author's rule).
- **Her planet and the gardener (2026-11-17, G1.9):** merged to `main`, as the author decided after
seeing a page of buttons. She lives on a round tiny planet; at the first open *Who tends her?* lets
the player dress a boy or a girl (fixed lists, kept in `profile`, never in the rose file; *Change
gardener* reopens it). A tap on her opens the ring of what she needs today plus *Touch her*; the
gardener walks round the planet to the work. By hand: press the can and move sideways to tilt and
pour (further tilts pour faster), swipe each weed up and out, sweep across the fallen petals, drag
the windbreak to her windward side, stroke her petals slowly. Every gesture is also a button.
The pictures are code stand-ins until the board's are painted. **Accepted risk:** a child on a
small round planet with a rose is the book's best-known image; the guards are in STYLE.md (S2, S6,
§3b, review points 10–11), and a legal check comes before any public release (G6.1). Tested by
real touch on the Android tablet (`pnpm test:android`, 7 of 7). Analysis:
[`.agents/features/planet-garden.md`](.agents/features/planet-garden.md). Review:
[`.agents/reviews/feature-planet-garden.md`](.agents/reviews/feature-planet-garden.md).
- **Four versions, one garden (2026-11-17):** merged to `main`, as the author decided: the PWA plus
an Android, iOS and desktop app from one codebase through a Tauri 2 shell, `apps/rosea-tauri`
(CLAUDE.md §2 *Four versions*, §3, §4, §8; ROADMAP *The platform track*). The **Windows app**
(`pnpm tauri:build`) and an **Android debug APK** (`pnpm tauri:android`) were built here; both
passed the garden check (watered, closed, reopened, still watered; nothing outside the origin).
The APK asks for no permission, not even `INTERNET`, and allows no backup (checked on the APK and
on the tablet). **iOS needs a Mac** (G-T1). *Keep her safe* in the apps was a release blocker
(G-T4); it is closed, see the next entry. The debug APK and installer are build output on this
machine, not committed:
`apps/rosea-tauri/src-tauri/gen/android/app/build/outputs/apk/universal/debug/` and
`apps/rosea-tauri/src-tauri/target/release/bundle/nsis/`. Analysis:
[`.agents/features/tauri-platforms.md`](.agents/features/tauri-platforms.md). Review:
[`.agents/reviews/feature-tauri-platforms.md`](.agents/reviews/feature-tauri-platforms.md).
- **Keep her safe in the apps (2026-11-17):** merged to `main`; closes the release blocker G-T4.
In the apps she *lives in this app, on this device, until the app is removed*; no browser is
asked. On Android *Save her to a file* opens Android's own save screen (a small Kotlin bridge in
`apps/rosea-tauri/android/java/MainActivity.kt`; no plugin, no permission) and the garden says
*She is in that file now.*; bringing her back from that file works. The page now stays between
Android's system bars. Seen on the tablet and on Windows. Review:
[`.agents/reviews/feature-keep-her-safe-apps.md`](.agents/reviews/feature-keep-her-safe-apps.md).
- **Phase 1 is built in code.** What remains of it is the author's: verified sentences (the petal
appears with them), hosting (G0.13), and the gate itself — two weeks of daily play on a phone.
**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).
@@ -43,18 +243,51 @@ The notification decision is made: in-app only on the web (G0.26).
1. **The Letter:** the words in `docs/LETTER.md`, the verified support lines for the
door to real help (G0.27), and Q9 (may the letter name the book).
2. **Sentences:** an agent may propose public-domain candidates with their sources.
Only the author can mark one verified.
3. **Art:** read `art/STYLE.md` §0 (S1–S5) and approve or change the style. Then make
`rose-sheet` on the board and accept it. That is the first step of the Phase 0 art gate.
2. **Sentences:** 78 candidates are ready in `content/candidates/` (10 flagged in its README).
Verifying 60 closes the Phase 0 sentence gate (G0.18) and puts the petal in the app. Also
the petal's tuning (`PETAL` in `packages/engine/src/petal/petal.ts`: remembering within 3 days,
the good moment an hour either side of sunset) and its words in `packages/ui/src/copy/en.ts`.
3. **Art:** the style is approved (S1–S5), and so is the fox (F1–F4, with a deep red-orange coat).
**Make `rose-sheet` again with the board v2 prompt** (version 4) and accept it when she looks
right; `fox-sheet` comes first for Phase 2. That is the first step of the Phase 0 art gate.
After an accept, Claude reads the row (`ArtifactData get art/<id>`), downloads the picture
(`Artifact read` with the asset id as `path`), runs `pnpm art:accept`, commits on `art/<set>`,
and writes `final` back into the row.
4. **A GitHub repository** for Pages, and whether it is public (G0.13, G0.23).
5. **Upgrading Node** to ≥ 22.13 on this machine (G0.20).
4. **The gardener in paint:** *layered parts* (Mark, 2026-11-17; STYLE.md §3b). Make
`gardener-sheet`, then the guide `gardener-poses-sheet`, and accept both; then the seven first-look
layers (first in the board's *Gardener layers* group), each painted over the guide. The other 48
can follow over time. Open for Mark: may the choice keep fair curls away from sage clothes (the
book's look)? Review: [`.agents/reviews/art-gardener-layers.md`](.agents/reviews/art-gardener-layers.md).
Also: a gardener changed in one tab shows in another only after a reload.
5. **A GitHub repository** for Pages, and whether it is public (G0.13, G0.23).
6. **Node is upgraded** (22.23.4); unpinning the dependencies pinned for 22.11 remains (G0.20).
7. **The rose's tuning** (`.agents/features/rose.md` R2, R4, R5, R6, all in `ROSE` in
`packages/engine/src/rose/rose.ts`): how fast she gets thirsty, how often weeds, petals and wind
come, and how many days of care each stage takes (full bloom after 25). Play it for a week,
then say what feels wrong.
7. **The apps:** a Mac with Xcode and an Apple developer account for iOS (G-T1); whether the
desktop window (480 × 800, portrait) should be wider; the release signing keys, kept outside
the repository (G-T3).
**How this machine works** (not in the code):
- **The CPU guard:** the full runs wait for this machine to drop to 80 % CPU (§5.7). Other projects'
test runs share it, so a wait of a minute or two is normal; three minutes, and the run is refused.
On 2026-11-17 two qemu virtual machines held it at 100 % for long stretches; waiting worked.
- **Things vanish:** the root `node_modules` (twice, 2026-11-07 and 11-17) and Playwright's browser in
`F:\ms-playwright` (11-17) disappeared; the code and history were intact. Restore with
`pnpm install --frozen-lockfile` and `pnpm exec playwright install --only-shell chromium` (a
download: ask first). The cause is unknown.
- **The Android tablet:** WAVE 10C on USB debugging; always `adb -s WAVE10CEEA036785` (an emulator
attaches too, and other projects use the same tablet). Stop the app used when testing ends.
`pnpm test:android` with `ROSEA_ADB=F:\Tools\Android\Sdk\platform-tools\adb.exe` and
`ROSEA_ANDROID_SERIAL=WAVE10CEEA036785`, while `vite preview` serves the build on 127.0.0.1:4173;
it stops Chrome and removes its mappings itself, even when it fails.
Its USB link drops now and then (`device offline`); `e2e/apps/check-garden.ts` waits and retries.
- **Building the apps:** Rust 1.99 (MSVC) with the four Android targets, JDK 17, the Android SDK at
`F:\Tools\Android\Sdk` (NDK 27.1), VS 2022 Build Tools, WebView2 and NSIS are all installed; a
cold desktop release build takes about 6 minutes, an Android debug build about 2 after that.
- **Commit identity:** `mnovak <giteatruenasadminacc.from729@passmail.net>`, set in
this repository only.
- **Pushing:** it uses a repo-local `credential.helper`, copied from Ludus. Do not
+168
View File
@@ -0,0 +1,168 @@
Common Public Attribution License Version 1.0 (CPAL)
1. “Definitions”
1.0.1 “Commercial Use” means distribution or otherwise making the Covered Code available to a third party.
1.1 “Contributor” means each entity that creates or contributes to the creation of Modifications.
1.2 “Contributor Version” means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
1.3 “Covered Code” means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
1.4 “Electronic Distribution Mechanism” means a mechanism generally accepted in the software development community for the electronic transfer of data.
1.5 “Executable” means Covered Code in any form other than Source Code.
1.6 “Initial Developer” means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
1.7 “Larger Work” means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
1.8 “License” means this document.
1.8.1 “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
1.9 “Modifications” means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or previous Modifications.
1.10 “Original Code” means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
1.10.1 “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
1.11 “Source Code” means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor’s choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
1.12 “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, “You” includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. Source Code License.
2.1 The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.
2.2 Contributor Grant.
Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.
3. Distribution Obligations.
3.1 Application of License.
The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients’ rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
3.2 Availability of Source Code.
Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
3.3 Description of Modifications.
You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
3.4 Intellectual Property Matters
(a) Third Party Claims. If Contributor has knowledge that a license under a third party’s intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled “LEGAL” which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
(b) Contributor APIs. If Contributor’s Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
(c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor’s Modifications are Contributor’s original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
3.5 Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients’ rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
3.6 Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients’ rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient’s rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer, Original Developer or any Contributor. You hereby agree to indemnify the Initial Developer, Original Developer and every Contributor for any liability incurred by the Initial Developer, Original Developer or such Contributor as a result of any such terms You offer.
3.7 Larger Works.
You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1 New Versions.
Socialtext, Inc. (“Socialtext”) may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
6.2 Effect of New Versions.
Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Socialtext. No one other than Socialtext has the right to modify the terms applicable to Covered Code created under this License.
6.3 Derivative Works.
If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases “Socialtext”, “CPAL” or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the CPAL. (Filling in the name of the Initial Developer, Original Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer, Original Developer or a Contributor (the Initial Developer, Original Developer or Contributor against whom You file such action is referred to as “Participant”) alleging that:
(a) such Participant’s Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant’s Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.
8.3 If You assert a patent infringement claim against Participant alleging that such Participant’s Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer, Original Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer, Original Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the CPAL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.
14. ADDITIONAL TERM: ATTRIBUTION
(a) As a modest attribution to the organizer of the development of the Original Code (“Original Developer”), in the hope that its promotional value may help justify the time, money and effort invested in writing the Original Code, the Original Developer may include in Exhibit B (“Attribution Information”) a requirement that each time an Executable and Source Code or a Larger Work is launched or initially run (which includes initiating a session), a prominent display of the Original Developer’s Attribution Information (as defined below) must occur on the graphic user interface employed by the end user to access such Covered Code (which may include display on a splash screen), if any. The size of the graphic image should be consistent with the size of the other elements of the Attribution Information. If the access by the end user to the Executable and Source Code does not create a graphic user interface for access to the Covered Code, this obligation shall not apply. If the Original Code displays such Attribution Information in a particular form (such as in the form of a splash screen, notice at login, an “about” display, or dedicated attribution area on user interface screens), continued use of such form for that Attribution Information is one way of meeting this requirement for notice.
(b) Attribution information may only include a copyright notice, a brief phrase, graphic image and a URL (“Attribution Information”) and is subject to the Attribution Limits as defined below. For these purposes, prominent shall mean display for sufficient duration to give reasonable notice to the user of the identity of the Original Developer and that if You include Attribution Information or similar information for other parties, You must ensure that the Attribution Information for the Original Developer shall be no less prominent than such Attribution Information or similar information for the other party. For greater certainty, the Original Developer may choose to specify in Exhibit B below that the above attribution requirement only applies to an Executable and Source Code resulting from the Original Code or any Modification, but not a Larger Work. The intent is to provide for reasonably modest attribution, therefore the Original Developer cannot require that You display, at any time, more than the following information as Attribution Information: (a) a copyright notice including the name of the Original Developer; (b) a word or one phrase (not exceeding 10 words); (c) one graphic image provided by the Original Developer; and (d) a URL (collectively, the “Attribution Limits”).
(c) If Exhibit B does not include any Attribution Information, then there are no requirements for You to display any Attribution Information of the Original Developer.
(d) You acknowledge that all trademarks, service marks and/or trade names contained within the Attribution Information distributed with the Covered Code are the exclusive property of their owners and may only be used with the permission of their owners, or under circumstances otherwise permitted by law or as expressly set out in this License.
15. ADDITIONAL TERM: NETWORK USE.
The term “External Deployment” means the use, distribution, or communication of the Original Code or Modifications in any way such that the Original Code or Modifications may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Code or Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2.
EXHIBIT A. Common Public Attribution License Version 1.0.
"The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/license/cpal_1-0. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is Rosea Domi.
The Original Developer is the Initial Developer.
The Initial Developer of the Original Code is Marek Novák. All portions of the code written by Marek Novák are Copyright (c) 2026. All Rights Reserved.
Contributor: none."
EXHIBIT B. Attribution Information
Attribution Copyright Notice: Copyright (c) 2026 Marek Novák
Attribution Phrase (not exceeding 10 words): Built on Domi
Attribution URL: https://aula.marek-novak.cz
Graphic Image as provided in the Covered Code, if any: none.
Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
+40
View File
@@ -0,0 +1,40 @@
# Rosea Domi
A small game about a living rose, a fox, and the time we give to people. It ships from one Svelte codebase as four
versions: a web app (PWA), and apps for Android, Windows and, later, iOS. What the player sees is described in
[`AULA.md`](AULA.md). How the repository works is described in [`CLAUDE.md`](CLAUDE.md) and [`HANDOVER.md`](HANDOVER.md).
```bash
pnpm install --frozen-lockfile
pnpm --filter @rosea/app dev # 127.0.0.1:5173
pnpm test # every package; quote the counts
```
## Licence
Rosea Domi is licensed under the **Common Public Attribution License 1.0** (SPDX `CPAL-1.0`). The full text, with
Exhibits A and B, is in [`LICENSE`](LICENSE). The code is under CPAL-1.0 from the commit that added that file.
Earlier commits carried no licence.
Anyone who distributes Rosea Domi or a work built from it must show this credit, as section 14 and Exhibit B
require:
> Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák
Contains @domi/ui (CPAL-1.0, Copyright (c) 2026 Marek Novák), in `packages/domi-ui`; the rest of this repo is under
its own licence. The copy is unchanged, made by the design system's `tools/vendor.mjs` from its tag; its `NOTICE` and
`VERSION` say which. The game shows the credit above at the foot of every screen.
The licence does not cover what Marek Novák did not write. Those works keep their own terms:
- **The hope sentences** quote public-domain works. They sit in `content/candidates/` until the author verifies each
one into `content/library/`, and every entry names its work, author, translation and public-domain status. The
sources include the King James Bible; Cicero (tr. Shuckburgh, 1900, and Peabody, 1887); Marcus Aurelius (tr. Long, 1862); Seneca (tr.
Stewart, 1889); Laozi (tr. Legge, 1891); the Dhammapada (tr. Müller, 1881); Sa'di (tr. Ross, 1823); Julian of
Norwich (ed. Warrack, 1901); Kahlil Gibran; Rabindranath Tagore (his own English, 1912); Thoreau, Muir, Emerson,
Dickinson, Whitman, Wordsworth, Rossetti and Stevenson.
- **The town list** (`packages/content/src/places/`) is made from Natural Earth and the IANA time zone database,
both in the public domain (`scripts/build-places.ts`).
- **The sun's reference tables** used by the tests come from the U.S. Naval Observatory and name it in the fixture.
- **The pictures** in `art/placeholders/` are stand-ins drawn in code by this repository's `tools/art-prep`, under
its licence. There is no third-party art.
@@ -0,0 +1,120 @@
package cz.mareknovak.domi.rosea
// Rosea's own MainActivity, copied over the one `tauri android init` generates by
// apps/rosea-tauri/scripts/android.ts (gen/ is never committed; `android.ts check` compares it).
// .agents/features/keep-her-safe-apps.md A2–A5.
import android.app.Activity
import android.content.Intent
import android.content.res.Configuration
import android.graphics.Color
import android.os.Bundle
import android.util.Log
import android.webkit.JavascriptInterface
import android.webkit.WebView
import androidx.activity.enableEdgeToEdge
import androidx.annotation.Keep
import androidx.core.graphics.Insets
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
class MainActivity : TauriActivity() {
private var webView: WebView? = null
private var busy = false
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
// Tauri's activity draws edge to edge, and the WebView does not reliably report the bars as
// env(safe-area-inset-*): the clock sat over the title and the navigation bar over *Bring her
// back from a file* (keep-her-safe-apps review). So the page is kept between the bars, and
// the bars show the garden's own paper, light or dark as the system is.
paintBehindBars()
val bars = WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()
ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content)) { view, insets ->
val inset = insets.getInsets(bars)
view.setPadding(inset.left, inset.top, inset.right, inset.bottom)
WindowInsetsCompat.Builder(insets)
.setInsets(WindowInsetsCompat.Type.systemBars(), Insets.NONE)
.setInsets(WindowInsetsCompat.Type.displayCutout(), Insets.NONE)
.build()
}
}
// The manifest lets the activity live through a theme change (uiMode), so the paint follows it here.
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
paintBehindBars()
}
private fun paintBehindBars() {
val night = (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES
window.decorView.setBackgroundColor(Color.parseColor(if (night) PAPER_DARK else PAPER))
}
// *Save her to a file*: Android WebView does nothing with a blob download, so the game asks
// here instead (window.roseaFile.save), and Android's own save screen lets the player choose
// where the file goes. No permission is needed for it on any Android version.
override fun onWebViewCreate(webView: WebView) {
this.webView = webView
webView.addJavascriptInterface(RoseFile(), "roseaFile")
}
/** Tells the game whether the file was written (A4): true, or false when the player stepped back. */
private fun answer(written: Boolean) {
busy = false
val view = webView ?: return
view.post {
view.evaluateJavascript("window.dispatchEvent(new CustomEvent('rosea-file-saved', { detail: $written }))", null)
}
}
@Keep
inner class RoseFile {
/** Only a rose file: its dated name and a bounded text (A3). One save at a time. */
@Keep
@JavascriptInterface
fun save(name: String, text: String) {
if (!NAME.matches(name) || text.length > MAX_CHARS) {
Log.w(TAG, "refused a file that is not a rose file: ${name.take(64)}, ${text.length} chars")
answer(false)
return
}
runOnUiThread {
if (busy) return@runOnUiThread
busy = true
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "application/json"
putExtra(Intent.EXTRA_TITLE, name)
}
launchActivityForResult(intent) { result ->
val uri = result?.data?.data
if (result?.resultCode != Activity.RESULT_OK || uri == null) {
answer(false)
return@launchActivityForResult
}
val written = try {
contentResolver.openOutputStream(uri, "wt")?.use { out ->
out.write(text.toByteArray(Charsets.UTF_8))
true
} ?: false
} catch (error: Exception) {
Log.e(TAG, "the rose file could not be written", error)
false
}
answer(written)
}
}
}
}
companion object {
private const val TAG = "RoseaFile"
private val NAME = Regex("^rose-\\d{4}-\\d{2}-\\d{2}\\.json$")
private const val MAX_CHARS = 8 * 1024 * 1024
// --paper in packages/ui/src/tokens.css, light and dark; a test holds them equal.
private const val PAPER = "#fbf6f1"
private const val PAPER_DARK = "#1d1819"
}
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Android 11 and earlier: no part of the garden is backed up (tauri-platforms.md D6).
Copied into gen/android by scripts/android.ts. -->
<full-backup-content>
<exclude domain="root" path="." />
<exclude domain="file" path="." />
<exclude domain="database" path="." />
<exclude domain="sharedpref" path="." />
<exclude domain="external" path="." />
<exclude domain="device_root" path="." />
<exclude domain="device_file" path="." />
<exclude domain="device_database" path="." />
<exclude domain="device_sharedpref" path="." />
</full-backup-content>
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Android 12 and later. Nothing of the garden goes into a cloud backup or a device-to-device
transfer: the care log, the keys and the chosen town stay on this device (CLAUDE.md §4,
tauri-platforms.md D6). A rose moves only by the player's own hand, with Keep her safe.
allowBackup="false" alone does not stop every device-transfer tool on Android 12+, so every
domain is excluded here as well. Copied into gen/android by scripts/android.ts. -->
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" path="." />
<exclude domain="file" path="." />
<exclude domain="database" path="." />
<exclude domain="sharedpref" path="." />
<exclude domain="external" path="." />
<exclude domain="device_root" path="." />
<exclude domain="device_file" path="." />
<exclude domain="device_database" path="." />
<exclude domain="device_sharedpref" path="." />
</cloud-backup>
<device-transfer>
<exclude domain="root" path="." />
<exclude domain="file" path="." />
<exclude domain="database" path="." />
<exclude domain="sharedpref" path="." />
<exclude domain="external" path="." />
<exclude domain="device_root" path="." />
<exclude domain="device_file" path="." />
<exclude domain="device_database" path="." />
<exclude domain="device_sharedpref" path="." />
</device-transfer>
</data-extraction-rules>
+27
View File
@@ -0,0 +1,27 @@
{
"name": "@rosea/tauri",
"version": "0.1.0",
"private": true,
"license": "CPAL-1.0",
"type": "module",
"description": "The Tauri 2 shell: the Android, iOS and desktop apps around apps/rosea's built game (dist-tauri/). Imports no package.",
"scripts": {
"dev": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri dev",
"build:desktop": "tsx scripts/icons.ts && tsx scripts/domi-app.ts && tauri build",
"build:android": "tsx scripts/android.ts prepare && tauri android build --debug --apk --target aarch64 && tsx scripts/android.ts verify",
"build:android-release": "tsx scripts/android.ts prepare && tauri android build --apk --target aarch64 && tsx scripts/android.ts verify src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk",
"sign:apk": "tsx scripts/sign-apk.ts",
"build:ios": "tsx scripts/ios.ts",
"android:privacy": "tsx scripts/android.ts apply",
"android:verify": "tsx scripts/android.ts verify",
"typecheck": "tsc -p tsconfig.json",
"test": "vitest run --reporter=verbose"
},
"devDependencies": {
"@tauri-apps/cli": "2.12.5",
"@types/node": "22.20.1",
"tsx": "4.23.12",
"typescript": "5.9.3",
"vitest": "3.2.7"
}
}
+131
View File
@@ -0,0 +1,131 @@
/**
* The Android app's privacy on the generated project, and the proof on the built APK
* (src/android-privacy.ts; tauri-platforms.md D6).
*
* tsx scripts/android.ts prepare `tauri android init` if needed, icons, then apply
* tsx scripts/android.ts apply patch the manifest, copy the rule files, then check
* tsx scripts/android.ts check what the generated project lacks; exit 1 if anything
* tsx scripts/android.ts verify [apk] the same, read from the BUILT APK with aapt2
*
* `apply` runs from tauri.android.conf.json's beforeBuildCommand, so `tauri android build`
* cannot make an APK without it. A Gradle build started outside the Tauri CLI skips that hook;
* `verify` reads the artefact itself, and `pnpm tauri:android` runs it last.
*/
import { spawnSync } from 'node:child_process';
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { apkProblems, manifestProblems, patchManifest, RULE_FILES, RULE_SECTIONS, ruleProblems } from '../src/android-privacy.js';
import { PACKAGE, SRC_TAURI, tauri } from './tauri.js';
const MAIN = join(SRC_TAURI, 'gen', 'android', 'app', 'src', 'main');
const MANIFEST = join(MAIN, 'AndroidManifest.xml');
const RES_FROM = join(PACKAGE, 'android', 'res', 'xml');
const RES_TO = join(MAIN, 'res', 'xml');
const OUTPUTS = join(SRC_TAURI, 'gen', 'android', 'app', 'build', 'outputs', 'apk');
// Rosea's own MainActivity: the save bridge (keep-her-safe-apps.md A2, A5).
const IDENTIFIER = (JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.conf.json'), 'utf8')) as { identifier: string }).identifier;
const ACTIVITY_FROM = join(PACKAGE, 'android', 'java', 'MainActivity.kt');
const ACTIVITY_TO = join(MAIN, 'java', ...IDENTIFIER.split('.'), 'MainActivity.kt');
function fail(problems: readonly string[]): never {
for (const p of problems) console.error(`android: ${p}`);
process.exit(1);
}
function problems(): string[] {
if (!existsSync(MANIFEST)) return [`no generated project (${MANIFEST}); run 'pnpm tauri:android'`];
const found = manifestProblems(readFileSync(MANIFEST, 'utf8'));
for (const f of RULE_FILES) {
const at = join(RES_TO, f);
if (!existsSync(at)) found.push(`res/xml/${f} is missing`);
else if (readFileSync(at, 'utf8') !== readFileSync(join(RES_FROM, f), 'utf8')) found.push(`res/xml/${f} differs from android/res/xml/${f}`);
}
if (!existsSync(ACTIVITY_TO)) found.push(`no MainActivity.kt at ${ACTIVITY_TO}`);
else if (readFileSync(ACTIVITY_TO, 'utf8') !== readFileSync(ACTIVITY_FROM, 'utf8')) {
found.push("MainActivity.kt is not Rosea's (android/java/MainActivity.kt): no save bridge");
}
// The launcher icon is Rosea's, not the Tauri logo `init` put there (scripts/icons.ts).
const ours = join(SRC_TAURI, 'icons', 'android', 'mipmap-mdpi', 'ic_launcher.png');
const there = join(MAIN, 'res', 'mipmap-mdpi', 'ic_launcher.png');
if (!existsSync(ours) || !existsSync(there) || !readFileSync(ours).equals(readFileSync(there))) {
found.push("the launcher icon is not Rosea's (run 'tsx scripts/icons.ts')");
}
return found;
}
function apply(): void {
for (const f of RULE_FILES) {
const left = ruleProblems(readFileSync(join(RES_FROM, f), 'utf8'), RULE_SECTIONS[f]);
if (left.length > 0) fail(left.map((p) => `android/res/xml/${f}: ${p}`));
}
if (!existsSync(MANIFEST)) fail([`no generated project (${MANIFEST}); run 'pnpm tauri:android'`]);
const before = readFileSync(MANIFEST, 'utf8');
const after = patchManifest(before);
mkdirSync(RES_TO, { recursive: true });
for (const f of RULE_FILES) copyFileSync(join(RES_FROM, f), join(RES_TO, f));
if (!existsSync(dirname(ACTIVITY_TO))) fail([`no generated activity folder ${dirname(ACTIVITY_TO)}; the identifier changed?`]);
copyFileSync(ACTIVITY_FROM, ACTIVITY_TO);
if (after !== before) writeFileSync(MANIFEST, after);
const left = problems();
if (left.length > 0) fail(left);
console.log(
`android: privacy ${after === before ? 'already in place' : 'applied'} ` +
"(no INTERNET, no backup or transfer, WebView metrics and Safe Browsing off; Rosea's MainActivity)"
);
}
function newestApk(dir: string): string | undefined {
if (!existsSync(dir)) return undefined;
let best: { path: string; at: number } | undefined;
const walk = (d: string): void => {
for (const name of readdirSync(d)) {
const path = join(d, name);
const stat = statSync(path);
if (stat.isDirectory()) walk(path);
else if (name.endsWith('.apk') && (!best || stat.mtimeMs > best.at)) best = { path, at: stat.mtimeMs };
}
};
walk(dir);
return best?.path;
}
function aapt2(): string {
const sdk = process.env['ANDROID_HOME'] ?? process.env['ANDROID_SDK_ROOT'];
if (!sdk) fail(['ANDROID_HOME is not set']);
const tools = join(sdk, 'build-tools');
const versions = readdirSync(tools).sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
const exe = process.platform === 'win32' ? 'aapt2.exe' : 'aapt2';
for (const v of versions) if (existsSync(join(tools, v, exe))) return join(tools, v, exe);
return fail([`no aapt2 under ${tools}`]);
}
function verify(apk: string | undefined): void {
const file = apk ?? newestApk(OUTPUTS);
if (file === undefined || !existsSync(file)) fail([`no APK to verify under ${OUTPUTS}`]);
const tool = aapt2();
const run = (...args: string[]): string => {
const r = spawnSync(tool, args, { encoding: 'utf8' });
if (r.status !== 0) fail([`aapt2 ${args.join(' ')} failed: ${r.stderr}`]);
return r.stdout;
};
const left = apkProblems(run('dump', 'permissions', file), run('dump', 'xmltree', '--file', 'AndroidManifest.xml', file));
if (left.length > 0) fail(left);
console.log(`android: ${file} verified (no permission asked, no backup, WebView metrics and Safe Browsing off)`);
}
const [command, arg] = process.argv.slice(2);
try {
if (command === 'prepare') {
if (!existsSync(MANIFEST)) tauri('android', 'init', '--ci', '--skip-targets-install');
await import('./icons.js');
apply();
} else if (command === 'apply') apply();
else if (command === 'check') {
const left = problems();
if (left.length > 0) fail(left);
console.log('android: privacy in place');
} else if (command === 'verify') verify(arg);
else fail(['usage: android.ts prepare|apply|check|verify [apk]']);
} catch (error) {
fail([(error as Error).message]);
}
+96
View File
@@ -0,0 +1,96 @@
/**
* The `domi-app.toml` that lets Atrium Domi show Rosea Domi in its grid (Atrium docs/APP_CONTRACT.md v0, §2–3;
* .agents/features/atrium-adoption.md). It is made before every desktop build from the name constants and the game's
* version, so the name stays in its three places (CLAUDE.md, header) and the version in Fabrica's four files
* (scripts/check-version.mjs). It is build output, never committed. `tauri.windows.conf.json` puts it next to the
* `.exe`, with the icon it names.
*
* tsx scripts/domi-app.ts writes src-tauri/atrium/domi-app.toml
*
* This is a static file only. Rosea reads nothing of Atrium's and calls nothing; the door (APP_CONTRACT §4–5) waits
* on the author (atrium-adoption.md R4). What APP_CONTRACT §7 says may still change is kept here, in `ATRIUM`.
*/
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { PRODUCT_NAME, PRODUCT_SHORT_NAME } from '../../../packages/schema/src/constants.js';
import { PACKAGE, SRC_TAURI } from './tauri.js';
/** What the Atrium contract fixes today and may move before its v1 (APP_CONTRACT §2.2, §7). */
export const ATRIUM = {
needs: { fundamentum: '>=0.7', atrium: '>=0.1' },
/** The icon, beside the `.exe`: the shell's own 256 px icon, made from apps/rosea/public/icon.svg (a placeholder). */
icon: { file: 'domi-icon.png', from: 'icons/128x128@2x.png' }
} as const;
/** The file, relative to src-tauri/, that `tauri.windows.conf.json` bundles. */
export const MANIFEST = 'atrium/domi-app.toml';
export interface DomiApp {
readonly id: string;
readonly name: string;
readonly label: string;
readonly version: string;
readonly accent: string;
readonly icon: string;
readonly hostable: boolean;
readonly free: boolean;
readonly needs: { readonly fundamentum: string; readonly atrium: string };
}
export function domiApp(version: string): DomiApp {
return {
// The Aula project and the Canalis id; it changes with the name, in the same commit.
id: PRODUCT_SHORT_NAME.toLowerCase(),
name: PRODUCT_NAME,
// One plain word for what she is (atrium-adoption.md §2.4, a judgment).
label: 'Rose',
version,
// --rose on the dark theme (packages/ui/src/tokens.css): Atrium Domi's window is dark, and its catalogue names
// the same colour for Rosea (Fundamentum crates/atrium-registry/src/catalogue.rs).
accent: '#e8899b',
icon: ATRIUM.icon.file,
// Day 4 waits on R1: hosted, she must keep her own window and origin, or her rose seems gone.
hostable: false,
// Rosea needs no licence (APP_CONTRACT §2.2: "true if your app needs no licence").
free: true,
needs: ATRIUM.needs
};
}
/**
* A TOML basic string. Every value here is ours; the escape keeps a later one honest: a quote, a backslash or a
* line break can never end the string and start a key.
*/
const str = (s: string): string =>
// eslint-disable-next-line no-control-regex -- finding control characters is the point
`"${s.replace(/[\\"\u0000-\u001f\u007f]/g, (c) =>
c === '\\' || c === '"' ? `\\${c}` : `\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`
)}"`;
export function toToml(m: DomiApp): string {
return [
`id = ${str(m.id)}`,
`name = ${str(m.name)}`,
`label = ${str(m.label)}`,
`version = ${str(m.version)}`,
`accent = ${str(m.accent)}`,
`icon = ${str(m.icon)}`,
`hostable = ${String(m.hostable)}`,
`free = ${String(m.free)}`,
`needs = { fundamentum = ${str(m.needs.fundamentum)}, atrium = ${str(m.needs.atrium)} }`,
''
].join('\n');
}
/** The game's version: the installer's own (tauri.conf.json reads the same file). */
export function gameVersion(): string {
const pkg = JSON.parse(readFileSync(join(PACKAGE, '..', 'rosea', 'package.json'), 'utf8')) as { version: string };
return pkg.version;
}
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
mkdirSync(join(SRC_TAURI, 'atrium'), { recursive: true });
writeFileSync(join(SRC_TAURI, MANIFEST), toToml(domiApp(gameVersion())), 'utf8');
console.log(`domi-app.toml: written for Atrium Domi (${MANIFEST})`);
}
+34
View File
@@ -0,0 +1,34 @@
/**
* The app's icons, made from the PWA's icon (`apps/rosea/public/icon.svg`) before every build
* (tauri-platforms.md D8). They are build output, never committed: the only images in git are
* the source SVG and optimised art under art/final/ (CLAUDE.md §5.2). The icon is still a
* placeholder; the real one comes through the art pipeline (GAP_ANALYSIS G0.21).
*
* tsx scripts/icons.ts makes them when missing or older than the SVG, and copies the
* Android launcher icons into gen/android when it exists
*
* The copy is unconditional on purpose: `tauri android init` writes Tauri's own logo into
* gen/android, newer than any icon made before it, so a date check kept Tauri's logo in the first
* APK (review finding). `scripts/android.ts check` compares the bytes.
*/
import { cpSync, existsSync, statSync } from 'node:fs';
import { join } from 'node:path';
import { PACKAGE, SRC_TAURI, tauri } from './tauri.js';
const SOURCE = join(PACKAGE, '..', 'rosea', 'public', 'icon.svg');
const MADE = join(SRC_TAURI, 'icons');
export const ANDROID_ICONS = join(MADE, 'android');
export const ANDROID_RES = join(SRC_TAURI, 'gen', 'android', 'app', 'src', 'main', 'res');
const stale = (file: string): boolean => !existsSync(file) || statSync(file).mtimeMs < statSync(SOURCE).mtimeMs;
if (stale(join(MADE, 'icon.ico')) || stale(join(ANDROID_ICONS, 'mipmap-mdpi', 'ic_launcher.png'))) {
tauri('icon', SOURCE);
console.log('icons: made from apps/rosea/public/icon.svg');
} else {
console.log('icons: up to date');
}
if (existsSync(ANDROID_RES)) {
cpSync(ANDROID_ICONS, ANDROID_RES, { recursive: true });
console.log('icons: Android launcher icons copied into gen/android');
}
+22
View File
@@ -0,0 +1,22 @@
/**
* The iOS app. Tauri can build it only on macOS with Xcode, and putting it on a phone needs an
* Apple developer account (free for one's own device; paid for TestFlight and the App Store).
* Elsewhere this refuses with that reason instead of failing somewhere deep in the CLI
* (CLAUDE.md §8, *iOS cannot be built on Windows*; tauri-platforms.md G-T1).
*
* tsx scripts/ios.ts on macOS: `tauri ios init` once, icons, then `tauri ios build --debug`
*/
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { SRC_TAURI, tauri } from './tauri.js';
if (process.platform !== 'darwin') {
console.error(
'ios: the iOS app can only be built on macOS with Xcode (and an Apple developer account to run it on a phone).\n' +
`ios: this machine is ${process.platform}. Nothing was built. See .agents/features/tauri-platforms.md, G-T1.`
);
process.exit(1);
}
if (!existsSync(join(SRC_TAURI, 'gen', 'apple'))) tauri('ios', 'init', '--ci');
await import('./icons.js');
tauri('ios', 'build', '--debug', ...process.argv.slice(2));
+26
View File
@@ -0,0 +1,26 @@
/**
* `pnpm --filter @rosea/tauri sign:apk <version> <commit>`: the release APK, signed in Custos
* (fabrica-release.md F4). Runs after the release's approval; Mark's card shows the match code
* custos-sign prints. Nothing is written unless custos-sign signs and verifies.
*/
import { spawnSync } from 'node:child_process';
import { existsSync, mkdirSync } from 'node:fs';
import { join } from 'node:path';
import { custosSign, signArgs, signedApkName, UNSIGNED_APK } from '../src/sign-apk.js';
import { PACKAGE, SRC_TAURI } from './tauri.js';
const [version = '', commit = ''] = process.argv.slice(2);
try {
const unsigned = join(SRC_TAURI, UNSIGNED_APK);
if (!existsSync(unsigned)) throw new Error(`no release APK at ${unsigned}; run 'pnpm tauri:android-release' first`);
const outDir = join(PACKAGE, '..', '..', 'target', 'release');
mkdirSync(outDir, { recursive: true });
const exe = custosSign(process.env, existsSync);
const args = signArgs({ version, commit, unsigned, out: join(outDir, signedApkName(version)) });
const run = spawnSync(exe, args, { stdio: 'inherit' });
if (run.error) throw run.error;
process.exit(run.status ?? 1);
} catch (e) {
console.error(`sign:apk: ${e instanceof Error ? e.message : String(e)}`);
process.exit(1);
}
+19
View File
@@ -0,0 +1,19 @@
/** Runs the Tauri CLI of this package, in this package's folder, and stops the script if it fails. */
import { spawnSync } from 'node:child_process';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
export const PACKAGE = join(dirname(fileURLToPath(import.meta.url)), '..');
export const SRC_TAURI = join(PACKAGE, 'src-tauri');
export function tauri(...args: string[]): void {
const run = spawnSync('pnpm', ['exec', 'tauri', ...args], {
cwd: PACKAGE,
stdio: 'inherit',
shell: process.platform === 'win32'
});
if (run.status !== 0) {
console.error(`tauri ${args.join(' ')} failed (exit ${String(run.status ?? run.signal)})`);
process.exit(1);
}
}
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
[package]
name = "rosea-shell"
version = "0.1.0"
license = "CPAL-1.0"
description = "The Tauri 2 shell of Rosea Domi: a window around the built game, and nothing else."
edition = "2024"
publish = false
[lib]
# The `_lib` suffix avoids a clash between the lib and the bin on Windows (cargo#8519).
name = "rosea_shell_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2.7.5", features = [] }
# No Tauri plugin and no other crate: the shell opens a window on the built game and does
# nothing else. Each plugin that arrives later (notifications, Phase 6) is reviewed for
# network access first (.agents/features/tauri-platforms.md D5).
[dependencies]
tauri = { version = "2.12.6", features = [] }
[profile.release]
codegen-units = 1
lto = true
opt-level = "s"
panic = "abort"
strip = true
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
+13
View File
@@ -0,0 +1,13 @@
//! The Tauri 2 shell of Rosea Domi (CLAUDE.md §2, *Four versions*).
//!
//! A window on the built game (`apps/rosea/dist-tauri/`) and nothing else: no command, no
//! plugin, no file of its own. The game keeps everything in the webview's IndexedDB, exactly
//! as in the PWA. `capabilities/` is absent on purpose, so the page is granted no IPC at all.
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.run(tauri::generate_context!())
// Nothing to recover from here: without a window there is no garden to show.
.expect("Rosea Domi could not open its window");
}
+6
View File
@@ -0,0 +1,6 @@
// No console window behind the garden in a release build on Windows.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
rosea_shell_lib::run()
}
@@ -0,0 +1,6 @@
{
"$schema": "https://schema.tauri.app/config/2",
"build": {
"beforeBuildCommand": "pnpm --filter @rosea/tauri android:privacy && pnpm --filter @rosea/app build:shell"
}
}
@@ -0,0 +1,37 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Rosea Domi",
"version": "../../rosea/package.json",
"identifier": "cz.mareknovak.domi.rosea",
"build": {
"beforeDevCommand": "pnpm --filter @rosea/app dev:shell",
"devUrl": "http://127.0.0.1:5173",
"beforeBuildCommand": "pnpm --filter @rosea/app build:shell",
"frontendDist": "../../rosea/dist-tauri"
},
"app": {
"windows": [
{
"label": "main",
"title": "Rosea Domi",
"width": 480,
"height": 800,
"minWidth": 320,
"minHeight": 480,
"useHttpsScheme": true,
"additionalBrowserArgs": "--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection,DnsOverHttpsUpgrade,DohProviderGoogle,DohProviderGoogleDns,DohProviderCloudflare,msExperimentationAndConfigurationService,OptimizationHints,AutofillServerCommunication,MediaRouter,Translate --disable-background-networking --disable-component-update --disable-domain-reliability --disable-sync --no-pings --disable-client-side-phishing-detection --dns-prefetch-disable"
}
],
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; manifest-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'self'; form-action 'none'"
}
},
"bundle": {
"active": true,
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"category": "Game",
"license": "CPAL-1.0",
"shortDescription": "A rose to tend, a fox to befriend, and the time we give to people.",
"windows": { "nsis": { "installMode": "currentUser" } }
}
}
@@ -0,0 +1 @@
{ "$schema": "https://schema.tauri.app/config/2", "bundle": { "targets": ["deb", "appimage"] } }
@@ -0,0 +1 @@
{ "$schema": "https://schema.tauri.app/config/2", "bundle": { "targets": ["app", "dmg"] } }
@@ -0,0 +1,8 @@
{
"$schema": "https://schema.tauri.app/config/2",
"bundle": {
"targets": ["nsis"],
"resources": { "atrium/domi-app.toml": "domi-app.toml", "icons/128x128@2x.png": "domi-icon.png" },
"windows": { "nsis": { "installerHooks": "./windows/hooks.nsh" } }
}
}
@@ -0,0 +1,16 @@
; Rosea Domi's installer hooks (.agents/features/fabrica-release.md F5; Fundamentum's Canalis, Part A).
; The installer registers domi-rosea://open for the current user, and the uninstaller removes it.
; Here and not at every start: the shell is a window and nothing else (CLAUDE.md §2), and a reinstall
; or Fabrica's Update all (/UPDATE in the same folder) runs this again, so the command follows the exe.
; The game reads no argument: any domi-rosea:// address opens the garden, and nothing else.
!macro NSIS_HOOK_POSTINSTALL
WriteRegStr HKCU "Software\Classes\domi-rosea" "" "URL:Rosea Domi"
WriteRegStr HKCU "Software\Classes\domi-rosea" "URL Protocol" ""
WriteRegStr HKCU "Software\Classes\domi-rosea\DefaultIcon" "" '"$INSTDIR\${MAINBINARYNAME}.exe",0'
WriteRegStr HKCU "Software\Classes\domi-rosea\shell\open\command" "" '"$INSTDIR\${MAINBINARYNAME}.exe" "%1"'
!macroend
!macro NSIS_HOOK_POSTUNINSTALL
DeleteRegKey HKCU "Software\Classes\domi-rosea"
!macroend
+180
View File
@@ -0,0 +1,180 @@
/**
* The Android app's privacy, applied to Tauri's generated project (tauri-platforms.md D6).
*
* `src-tauri/gen/android` is written by `tauri android init` and never committed, so every
* clone starts from Tauri's stock manifest, which asks for `INTERNET` and lets Android copy the
* app's data to the player's cloud backup. What must hold is carried here and applied before
* every Android build; the build fails if anything is missing. The approach and the two rule
* files follow Amicitia's (its `android-privacy.md`, measured there on 2026-11-08):
*
* - **no `INTERNET`**: Rosea has no network feature yet, so the kernel refuses the app any
* socket, the webview's own traffic included. It comes back with the first feature that
* needs the network (Phase 3), and that feature's doc measures the webview first;
* - **no backup and no device transfer**: the care log, the keys and the chosen town stay on
* this device; *Keep her safe* is how a rose moves;
* - the WebView's **metrics** and **Safe Browsing** lookups off, for the day `INTERNET` returns.
*
* Pure functions on strings; the files are read and written by `scripts/android.ts`.
*/
export const BACKUP_RULES = 'rosea_backup_rules';
export const EXTRACTION_RULES = 'rosea_data_extraction_rules';
export const RULE_FILES = [`${BACKUP_RULES}.xml`, `${EXTRACTION_RULES}.xml`] as const;
/** Attributes `<application>` must carry. */
export const APPLICATION_ATTRS: Readonly<Record<string, string>> = {
'android:allowBackup': 'false',
'android:fullBackupContent': `@xml/${BACKUP_RULES}`,
'android:dataExtractionRules': `@xml/${EXTRACTION_RULES}`
};
/** WebView switches read from the manifest (developer.android.com, "Manage WebView objects"). */
export const META_DATA: Readonly<Record<string, string>> = {
'android.webkit.WebView.EnableSafeBrowsing': 'false',
'android.webkit.WebView.MetricsOptOut': 'true'
};
const BEGIN = '<!-- rosea-privacy: begin (apps/rosea-tauri/src/android-privacy.ts) -->';
const END = '<!-- rosea-privacy: end -->';
const INTERNET_LINE = /^[ \t]*<uses-permission\s+android:name="android\.permission\.INTERNET"\s*\/>[ \t]*\n/gm;
const INTERNET_ANY = /android\.permission\.INTERNET/;
const escape = (s: string): string => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
/** The one `<application …>` opening tag, or an error naming what is wrong. */
function applicationTag(xml: string): RegExpMatchArray & { index: number } {
const tags = [...xml.matchAll(/<application\b[^>]*>/g)];
if (tags.length !== 1) throw new Error(`expected one <application> tag, found ${tags.length}`);
const tag = tags[0]!;
if (tag[0].endsWith('/>')) throw new Error('<application/> is empty; expected a template with children');
return tag as RegExpMatchArray & { index: number };
}
function setAttribute(tag: string, name: string, value: string): string {
const re = new RegExp(`(\\s${escape(name)}=")[^"]*(")`);
if (re.test(tag)) return tag.replace(re, `$1${value}$2`);
const indent = /\n([ \t]+)android:/.exec(tag)?.[1] ?? ' ';
return tag.replace(/^<application\b/, `<application\n${indent}${name}="${value}"`);
}
/** The manifest with the privacy settings in place. Throws, changing nothing, on an unexpected shape. */
export function patchManifest(xml: string): string {
const eol = xml.includes('\r\n') ? '\r\n' : '\n';
let out = xml.replaceAll('\r\n', '\n');
// 1. <application> attributes.
const tag = applicationTag(out);
let patched = tag[0];
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) patched = setAttribute(patched, name, value);
out = out.slice(0, tag.index) + patched + out.slice(tag.index + tag[0].length);
// 2. The meta-data block, replaced whole on every run, so a second run changes nothing.
const from = out.indexOf(BEGIN);
if (from >= 0) {
const to = out.indexOf(END, from);
if (to < 0) throw new Error('found the begin marker of the privacy block but not its end');
const lineStart = out.lastIndexOf('\n', from) + 1;
const lineEnd = out.indexOf('\n', to);
out = out.slice(0, lineStart) + out.slice(lineEnd + 1);
}
const closes = [...out.matchAll(/^([ \t]*)<\/application>/gm)];
if (closes.length !== 1) throw new Error(`expected one </application>, found ${closes.length}`);
const close = closes[0]!;
const indent = `${close[1] ?? ''} `;
const block = [
BEGIN,
...Object.entries(META_DATA).map(([n, v]) => `<meta-data android:name="${n}" android:value="${v}" />`),
END
]
.map((line) => `${indent}${line}\n`)
.join('');
out = out.slice(0, close.index) + block + out.slice(close.index);
// 3. INTERNET removed. Any other form of asking for it is refused rather than missed.
out = out.replace(INTERNET_LINE, '');
if (INTERNET_ANY.test(out)) throw new Error('INTERNET is requested in a form this patch does not remove');
return out.replaceAll('\n', eol);
}
/** What the manifest lacks, by name; empty when it is in order. */
export function manifestProblems(xml: string): string[] {
const problems: string[] = [];
let tag: string;
try {
tag = applicationTag(xml)[0];
} catch (error) {
return [(error as Error).message];
}
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) {
if (!new RegExp(`\\s${escape(name)}="${escape(value)}"`).test(tag)) problems.push(`<application> lacks ${name}="${value}"`);
}
for (const [name, value] of Object.entries(META_DATA)) {
if (!new RegExp(`<meta-data\\s+android:name="${escape(name)}"\\s+android:value="${escape(value)}"\\s*/>`).test(xml)) {
problems.push(`no meta-data ${name}=${value}`);
}
}
if (INTERNET_ANY.test(xml)) problems.push('android.permission.INTERNET is requested');
return problems;
}
/** Every storage domain Android knows; each must be excluded. */
export const DOMAINS = [
'root', 'file', 'database', 'sharedpref', 'external',
'device_root', 'device_file', 'device_database', 'device_sharedpref'
] as const;
/** Where each rules file must exclude everything: '' is the file's root element. */
export const RULE_SECTIONS: Readonly<Record<(typeof RULE_FILES)[number], readonly string[]>> = {
[`${BACKUP_RULES}.xml`]: [''],
[`${EXTRACTION_RULES}.xml`]: ['cloud-backup', 'device-transfer']
} as Record<(typeof RULE_FILES)[number], readonly string[]>;
/** A rules file must exclude every domain in every section, and include nothing. */
export function ruleProblems(xml: string, sections: readonly string[]): string[] {
const problems: string[] = [];
if (/<include\b/.test(xml)) problems.push('includes something');
for (const section of sections) {
const body = section ? new RegExp(`<${section}\\b[^>]*>([\\s\\S]*?)</${section}>`).exec(xml)?.[1] : xml;
if (body === undefined) {
problems.push(`no <${section}>`);
continue;
}
for (const domain of DOMAINS) {
if (!new RegExp(`<exclude\\s+domain="${domain}"\\s+path="\\."\\s*/>`).test(body)) {
problems.push(`${section || 'root'}: ${domain} is not excluded`);
}
}
}
return problems;
}
/**
* What the BUILT APK says, from `aapt2 dump permissions` and `aapt2 dump xmltree` of its
* manifest: the proof is the artefact, not the source (Amicitia lessons/technical.md).
* The manifest merge can add permissions from libraries; only the APK can tell.
*/
export function apkProblems(permissions: string, manifestTree: string): string[] {
const problems: string[] = [];
const tree = manifestTree.replaceAll('\r\n', '\n');
const pkg = /^package: (\S+)$/m.exec(permissions.replaceAll('\r\n', '\n'))?.[1];
for (const m of permissions.matchAll(/uses-permission: name='([^']+)'/g)) {
const name = m[1]!;
// androidx's receiver guard: a signature permission the app declares for itself, granting nothing.
if (pkg !== undefined && name === `${pkg}.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION`) continue;
// Any other is a review question, not a pass: Rosea asks for no permission yet.
problems.push(`the APK asks for ${name}`);
}
if (!/:allowBackup\(0x[0-9a-f]+\)=false$/m.test(tree)) problems.push('the APK does not set allowBackup=false');
for (const [name, value] of Object.entries(META_DATA)) {
// aapt2 prints a meta-data element's name attribute, then its value attribute on the next line:
// A: http://schemas.android.com/apk/res/android:name(0x01010003)="<name>" (Raw: "<name>")
// A: http://schemas.android.com/apk/res/android:value(0x01010024)=true
const found = new RegExp(
`:name\\(0x[0-9a-f]+\\)="${escape(name)}"[^\\n]*\\n\\s*A: [^\\n]*:value\\(0x[0-9a-f]+\\)=(\\S+)`
).exec(tree);
if (!found) problems.push(`the APK has no meta-data ${name}`);
else if (found[1] !== value && found[1] !== `"${value}"`) problems.push(`the APK's meta-data ${name} is ${found[1]}, not ${value}`);
}
return problems;
}
+54
View File
@@ -0,0 +1,54 @@
/**
* What the release asks custos-sign to do with the Android APK (fabrica-release.md F4). Kept
* apart from the script that runs it so the arguments can be tested without Custos.
*
* The key `rosea-android` lives in Custos only; custos-sign holds no key material either. Its
* scope is exactly `mnovak/Rosea`, the release pipeline, a tag (Custos makes the key on the first
* release, behind Mark's first-signature card).
*/
export const APK_KEY = 'rosea-android';
export const REPO = 'mnovak/Rosea';
/** Where Gradle leaves the release APK of `tauri android build --apk --target aarch64`, from src-tauri. */
export const UNSIGNED_APK = 'gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk';
/** The published APK's name: the app, the version, the one ABI it is built for. */
export const signedApkName = (version: string): string => `rosea-domi-${version}-arm64.apk`;
export interface SignRequest {
readonly version: string;
readonly commit: string;
readonly unsigned: string;
readonly out: string;
}
/** The arguments of `custos-sign apk`, or the reason they cannot be made. */
export function signArgs(r: SignRequest): string[] {
if (!/^\d+\.\d+\.\d+$/.test(r.version)) throw new Error(`not a version: ${r.version}`);
if (!/^[0-9a-f]{40}$/.test(r.commit)) throw new Error(`not a commit: ${r.commit}`);
return [
'apk', r.unsigned,
'--out', r.out,
'--key', APK_KEY,
'--repo', REPO,
'--pipeline', 'release',
'--commit', r.commit,
'--trigger', 'tag',
'--run', `rosea-v${r.version}`,
'--version', r.version,
'--step', 'apk'
];
}
/**
* Which custos-sign to run. `CUSTOS_SIGN_EXE` names it; when it names a file that is not there,
* the release refuses rather than run another one from PATH. `CUSTOS_PIPE` is refused: a signed
* run must reach Mark's Custos, never a test instance whose key is nobody's.
*/
export function custosSign(env: Readonly<Record<string, string | undefined>>, exists: (p: string) => boolean): string {
if (env['CUSTOS_PIPE']) throw new Error('CUSTOS_PIPE is set: the APK would be signed by another Custos than Mark\'s');
const named = env['CUSTOS_SIGN_EXE'];
if (named === undefined || named === '') return 'custos-sign.exe';
if (!exists(named)) throw new Error(`CUSTOS_SIGN_EXE names ${named}, which is not there`);
return named;
}
@@ -0,0 +1,69 @@
/**
* The save bridge's contract between the Kotlin side (android/java/MainActivity.kt) and the game
* (apps/rosea/src/App.svelte, packages/ui KeepSafe): keep-her-safe-apps.md A2–A5. A mismatch here
* fails silently on the device — the save screen never opens, or the garden never hears back —
* so the names are read from both sources and compared.
*/
import { readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
const HERE = dirname(fileURLToPath(import.meta.url));
const kotlin = readFileSync(join(HERE, '..', 'android', 'java', 'MainActivity.kt'), 'utf8');
const app = readFileSync(join(HERE, '..', '..', 'rosea', 'src', 'App.svelte'), 'utf8');
const keepSafe = readFileSync(join(HERE, '..', '..', '..', 'packages', 'ui', 'src', 'rose', 'KeepSafe.svelte'), 'utf8');
const conf = JSON.parse(readFileSync(join(HERE, '..', 'src-tauri', 'tauri.conf.json'), 'utf8')) as { identifier: string };
const nameRule = new RegExp(/Regex\("(.+?)"\)/.exec(kotlin)?.[1]?.replaceAll('\\\\', '\\') ?? 'missing');
describe('the Android save bridge', () => {
it('lives in the package of the app it is copied into', () => {
expect(kotlin).toMatch(new RegExp(`^package ${conf.identifier.replaceAll('.', '\\.')}$`, 'm'));
expect(kotlin).toMatch(/class MainActivity : TauriActivity\(\)/);
});
it('is found by the game under the name it is registered with', () => {
const registered = /addJavascriptInterface\(RoseFile\(\), "(\w+)"\)/.exec(kotlin)?.[1];
expect(registered).toBe('roseaFile');
expect(app).toContain(`roseaFile?: { save(name: string, text: string): void }`);
expect(app).toContain('.roseaFile');
});
it('answers on the event the game listens for, with true or false', () => {
const event = /new CustomEvent\('([\w-]+)', \{ detail: \$written \}\)/.exec(kotlin)?.[1];
expect(event).toBe('rosea-file-saved');
expect(app.match(/'rosea-file-saved'/g)?.length).toBeGreaterThanOrEqual(2);
expect(app).toContain('.detail === true');
});
it("accepts the file name the garden gives (rose-<day>.json) and nothing else", () => {
expect(keepSafe).toContain('`rose-${today}.json`');
expect(nameRule.test('rose-2026-11-17.json')).toBe(true);
for (const wrong of ['rose.json', '../rose-2026-11-17.json', 'rose-2026-11-17.json.exe', 'rose-2026-11-17.apk', 'evil-2026-11-17.json']) {
expect(nameRule.test(wrong)).toBe(false);
}
});
it('keeps the bridge through a minified release build', () => {
expect(kotlin).toMatch(/@Keep\s+inner class RoseFile/);
expect(kotlin).toMatch(/@JavascriptInterface\s+fun save\(name: String, text: String\)/);
});
it("paints behind the system bars with the garden's own paper, light and dark", () => {
const tokens = readFileSync(join(HERE, '..', '..', '..', 'packages', 'ui', 'src', 'tokens.css'), 'utf8');
const papers = [...tokens.matchAll(/--paper:\s*(#[0-9a-f]{6})/gi)].map((m) => m[1]!.toLowerCase());
expect(papers).toHaveLength(2);
expect(/PAPER = "(#[0-9a-f]{6})"/i.exec(kotlin)?.[1]?.toLowerCase()).toBe(papers[0]);
expect(/PAPER_DARK = "(#[0-9a-f]{6})"/i.exec(kotlin)?.[1]?.toLowerCase()).toBe(papers[1]);
// A source check only; the proof is the tablet's screenshot (review). Exact call and padding:
expect(kotlin).toMatch(/ViewCompat\.setOnApplyWindowInsetsListener\(findViewById\(android\.R\.id\.content\)\)/);
expect(kotlin).toMatch(/view\.setPadding\(inset\.left, inset\.top, inset\.right, inset\.bottom\)/);
});
it('asks Android for nothing: the save screen needs no permission', () => {
// Asking at run time or naming one; the APK check (aapt2) refuses any declared in the manifest.
expect(kotlin).not.toMatch(/requestPermissions\(|Manifest\.permission|checkSelfPermission/);
expect(kotlin).toContain('Intent.ACTION_CREATE_DOCUMENT');
});
});
@@ -0,0 +1,180 @@
/**
* The Android privacy patch (tauri-platforms.md D6), on Tauri 2.12.5's stock manifest exactly as
* `tauri android init` wrote it (fixtures/AndroidManifest.stock.xml), and on the committed rule files.
*/
import { readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
import {
apkProblems,
APPLICATION_ATTRS,
DOMAINS,
manifestProblems,
META_DATA,
patchManifest,
RULE_FILES,
RULE_SECTIONS,
ruleProblems
} from '../src/android-privacy.js';
const HERE = dirname(fileURLToPath(import.meta.url));
const STOCK = readFileSync(join(HERE, 'fixtures', 'AndroidManifest.stock.xml'), 'utf8').replaceAll('\r\n', '\n');
const rules = (f: string): string => readFileSync(join(HERE, '..', 'android', 'res', 'xml', f), 'utf8');
describe('patchManifest', () => {
const patched = patchManifest(STOCK);
it("removes Tauri's INTERNET permission: the kernel then refuses the app any socket", () => {
expect(STOCK).toContain('android.permission.INTERNET');
expect(patched).not.toContain('android.permission.INTERNET');
});
it('turns backup and device transfer off on <application>', () => {
const tag = /<application\b[^>]*>/.exec(patched)?.[0] ?? '';
for (const [name, value] of Object.entries(APPLICATION_ATTRS)) expect(tag).toContain(`${name}="${value}"`);
// What Tauri set is kept.
expect(tag).toContain('android:icon="@mipmap/ic_launcher"');
expect(tag).toContain('android:usesCleartextTraffic="${usesCleartextTraffic}"');
});
it("switches the WebView's metrics and Safe Browsing off, inside <application>", () => {
const inside = /<application\b[\s\S]*<\/application>/.exec(patched)?.[0] ?? '';
for (const [name, value] of Object.entries(META_DATA)) {
expect(inside).toContain(`<meta-data android:name="${name}" android:value="${value}" />`);
}
});
it('leaves the rest of the manifest as it was', () => {
for (const keep of ['android:name=".MainActivity"', 'android.intent.category.LAUNCHER', 'androidx.core.content.FileProvider']) {
expect(patched).toContain(keep);
}
});
it('changes nothing on a second run', () => {
expect(patchManifest(patched)).toBe(patched);
});
it('keeps Windows line endings when the file has them', () => {
const crlf = patchManifest(STOCK.replaceAll('\n', '\r\n'));
expect(crlf).toBe(patched.replaceAll('\n', '\r\n'));
});
it('overwrites an allowBackup="true" rather than adding a second one', () => {
const on = STOCK.replace('<application', '<application android:allowBackup="true"');
const out = patchManifest(on);
expect(out).toContain('android:allowBackup="false"');
expect(out).not.toContain('android:allowBackup="true"');
expect(out.match(/android:allowBackup=/g)).toHaveLength(1);
});
it('refuses a manifest whose shape it does not know, rather than guessing', () => {
expect(() => patchManifest(STOCK.replace('</application>', '</application><application></application>'))).toThrow(/application/);
expect(() => patchManifest(STOCK.replace(/<application[\s\S]*<\/application>/, '<application />'))).toThrow();
// INTERNET asked for in a form the line pattern does not match.
const odd = STOCK.replace(
'<uses-permission android:name="android.permission.INTERNET" />',
'<uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="99" />'
);
expect(() => patchManifest(odd)).toThrow(/INTERNET/);
});
it('removes INTERNET written over two lines too', () => {
const split = STOCK.replace(
'<uses-permission android:name="android.permission.INTERNET" />',
'<uses-permission\n android:name="android.permission.INTERNET" />'
);
expect(patchManifest(split)).not.toContain('INTERNET');
});
});
describe('manifestProblems', () => {
it("names everything missing from Tauri's stock manifest", () => {
const problems = manifestProblems(STOCK);
expect(problems).toContain('android.permission.INTERNET is requested');
for (const name of Object.keys(APPLICATION_ATTRS)) expect(problems.join('\n')).toContain(name);
for (const name of Object.keys(META_DATA)) expect(problems.join('\n')).toContain(name);
expect(problems).toHaveLength(1 + Object.keys(APPLICATION_ATTRS).length + Object.keys(META_DATA).length);
});
it('finds nothing missing once patched', () => {
expect(manifestProblems(patchManifest(STOCK))).toEqual([]);
});
it('notices a single switch turned back on', () => {
const patched = patchManifest(STOCK);
expect(manifestProblems(patched.replace('android:allowBackup="false"', 'android:allowBackup="true"'))).toEqual([
'<application> lacks android:allowBackup="false"'
]);
expect(manifestProblems(patched.replace('android:value="true"', 'android:value="false"'))).toEqual([
'no meta-data android.webkit.WebView.MetricsOptOut=true'
]);
});
});
describe('the committed rule files', () => {
for (const f of RULE_FILES) {
it(`${f} excludes every domain, in every section, and includes nothing`, () => {
expect(ruleProblems(rules(f), RULE_SECTIONS[f])).toEqual([]);
});
}
it('a file that forgets one domain is caught, by name', () => {
const f = 'rosea_data_extraction_rules.xml' as const;
const text = rules(f);
const firstDb = text.indexOf('<exclude domain="database" path="." />');
const broken = text.slice(0, firstDb) + text.slice(firstDb + '<exclude domain="database" path="." />'.length);
expect(ruleProblems(broken, RULE_SECTIONS[f])).toEqual(['cloud-backup: database is not excluded']);
});
it('a file that includes something is caught', () => {
const f = 'rosea_backup_rules.xml' as const;
const broken = rules(f).replace('</full-backup-content>', '<include domain="file" path="." />\n</full-backup-content>');
expect(ruleProblems(broken, RULE_SECTIONS[f])).toEqual(['includes something']);
});
it('knows all nine storage domains', () => {
expect(DOMAINS).toHaveLength(9);
});
});
describe('apkProblems, on aapt2 output of the APK built 2026-11-17 (Tauri 2.12.5, AGP 9.3.1)', () => {
const permissions = readFileSync(join(HERE, 'fixtures', 'apk-permissions.txt'), 'utf8');
const tree = readFileSync(join(HERE, 'fixtures', 'apk-manifest.xmltree.txt'), 'utf8');
it('passes the patched APK: no permission asked but androidx own receiver guard', () => {
expect(apkProblems(permissions, tree)).toEqual([]);
});
it('names INTERNET, or any permission a library merges in', () => {
const more = `${permissions.trimEnd()}\nuses-permission: name='android.permission.INTERNET'\nuses-permission: name='android.permission.ACCESS_NETWORK_STATE'\n`;
expect(apkProblems(more, tree)).toEqual([
'the APK asks for android.permission.INTERNET',
'the APK asks for android.permission.ACCESS_NETWORK_STATE'
]);
});
it("does not let another app's receiver guard through", () => {
const other = `${permissions.trimEnd()}\nuses-permission: name='com.example.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'\n`;
expect(apkProblems(other, tree)).toEqual(['the APK asks for com.example.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION']);
});
it('names backup left on', () => {
expect(apkProblems(permissions, tree.replace(/allowBackup\((0x[0-9a-f]+)\)=false/, 'allowBackup($1)=true'))).toEqual([
'the APK does not set allowBackup=false'
]);
});
it("reads each WebView switch's own value, not its neighbour's", () => {
const flipped = tree.replace(
/("android\.webkit\.WebView\.EnableSafeBrowsing"[^\n]*\r?\n\s*A: [^\n]*:value\(0x[0-9a-f]+\))=false/,
'$1=true'
);
expect(flipped).not.toBe(tree);
expect(apkProblems(permissions, flipped)).toEqual([
"the APK's meta-data android.webkit.WebView.EnableSafeBrowsing is true, not false"
]);
const gone = tree.replace('"android.webkit.WebView.MetricsOptOut"', '"android.webkit.WebView.Something"');
expect(apkProblems(permissions, gone)).toEqual(['the APK has no meta-data android.webkit.WebView.MetricsOptOut']);
});
});
+165
View File
@@ -0,0 +1,165 @@
/**
* The shell's configuration holds what tauri-platforms.md decided (D3–D7, D10, D11). Each of
* these is a value that fails silently at runtime, or worse, only after a release: a changed
* identifier or origin leaves the player's rose behind in the old app.
*/
import { existsSync, readFileSync } from 'node:fs';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
import { CSP } from '../../rosea/csp.js';
import { PRODUCT_NAME } from '../../../packages/schema/src/constants.js';
const SRC_TAURI = join(dirname(fileURLToPath(import.meta.url)), '..', 'src-tauri');
/** The parts of a Tauri config these tests read. */
interface TauriConf {
productName?: string;
identifier?: string;
version?: string;
build: { frontendDist: string; beforeBuildCommand: string; beforeDevCommand: string; devUrl: string };
app: { windows: Record<string, unknown>[]; security: Record<string, unknown> };
bundle: { targets?: string[] };
plugins?: unknown;
}
const json = (name: string): TauriConf => JSON.parse(readFileSync(join(SRC_TAURI, name), 'utf8')) as TauriConf;
const conf = json('tauri.conf.json');
const window = conf.app.windows[0] ?? {};
describe('tauri.conf.json', () => {
it('names the app with the product name, in the bundle and the window title (D3)', () => {
expect(conf.productName).toBe(PRODUCT_NAME);
expect(window['title']).toBe(PRODUCT_NAME);
});
it('keeps the identifier it was released with: a new one is a different app (D3)', () => {
expect(conf.identifier).toBe('cz.mareknovak.domi.rosea');
});
it("reads its version from the game's package.json (D3)", () => {
expect(conf.version).toBe('../../rosea/package.json');
const pkg = JSON.parse(readFileSync(resolve(SRC_TAURI, String(conf.version)), 'utf8')) as Record<string, string>;
expect(pkg['name']).toBe('@rosea/app');
expect(pkg['version']).toMatch(/^\d+\.\d+\.\d+$/);
});
it("delivers the PWA's content-security policy, the same string (D4)", () => {
expect(conf.app.security['csp']).toBe(CSP);
});
it("wraps the game's shell build and nothing else (D1, D2)", () => {
expect(conf.build.frontendDist).toBe('../../rosea/dist-tauri');
expect(resolve(SRC_TAURI, conf.build.frontendDist)).toBe(resolve(SRC_TAURI, '..', '..', 'rosea', 'dist-tauri'));
expect(conf.build.beforeBuildCommand).toBe('pnpm --filter @rosea/app build:shell');
expect(conf.build.beforeDevCommand).toBe('pnpm --filter @rosea/app dev:shell');
});
it('runs its dev server on 127.0.0.1 only (CLAUDE.md §5.7)', () => {
expect(new URL(conf.build.devUrl).hostname).toBe('127.0.0.1');
const app = JSON.parse(readFileSync(join(SRC_TAURI, '..', '..', 'rosea', 'package.json'), 'utf8')) as { scripts: Record<string, string> };
expect(app['scripts']['dev:shell']).toContain('--host 127.0.0.1');
expect(app['scripts']['dev:shell']).toContain('--port 5173');
expect(conf.build.devUrl).toBe('http://127.0.0.1:5173');
});
it('keeps the https origin it was released with: IndexedDB lives per origin (D10)', () => {
expect(window['useHttpsScheme']).toBe(true);
});
it("switches WebView2's own traffic off (D7)", () => {
const args = String(window['additionalBrowserArgs']);
for (const flag of [
'--disable-background-networking',
'--disable-component-update',
'--disable-domain-reliability',
'--disable-sync',
'--no-pings',
'--disable-client-side-phishing-detection',
'--dns-prefetch-disable'
]) {
expect(args.split(' ')).toContain(flag);
}
const disabled = /--disable-features=(\S+)/.exec(args)?.[1]?.split(',') ?? [];
for (const feature of [
// Tauri's own defaults, which a custom list must repeat.
'msWebOOUI', 'msPdfOOUI', 'msSmartScreenProtection',
'DnsOverHttpsUpgrade', 'msExperimentationAndConfigurationService', 'AutofillServerCommunication', 'OptimizationHints'
]) {
expect(disabled).toContain(feature);
}
});
it('builds only what each system can make (D11)', () => {
expect(json('tauri.windows.conf.json').bundle.targets).toEqual(['nsis']);
expect(json('tauri.macos.conf.json').bundle.targets).toEqual(['app', 'dmg']);
expect(json('tauri.linux.conf.json').bundle.targets).toEqual(['deb', 'appimage']);
expect(conf.bundle.targets).toBeUndefined();
});
it('applies the Android privacy patch before the game is built for Android (D6)', () => {
const before = json('tauri.android.conf.json').build.beforeBuildCommand;
const patch = before.indexOf('pnpm --filter @rosea/tauri android:privacy');
expect(patch).toBe(0);
expect(before.indexOf('&& pnpm --filter @rosea/app build:shell')).toBeGreaterThan(patch);
});
});
describe('domi-rosea://open, from the installer (fabrica-release.md F5)', () => {
const windows = JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.windows.conf.json'), 'utf8')) as {
bundle: { windows?: { nsis?: { installerHooks?: string; installMode?: string } } };
};
const hooksPath = windows.bundle.windows?.nsis?.installerHooks ?? '';
const hooks = existsSync(join(SRC_TAURI, hooksPath)) ? readFileSync(join(SRC_TAURI, hooksPath), 'utf8') : '';
/** The NSIS statements of one macro, comments dropped. */
const macro = (name: string): string[] =>
(new RegExp(`!macro ${name}\\r?\\n([\\s\\S]*?)!macroend`).exec(hooks)?.[1] ?? '')
.split(/\r?\n/)
.map((l) => l.trim())
.filter((l) => l !== '' && !l.startsWith(';'));
it('the Windows installer runs the hooks file, and installs for the current user only', () => {
expect(hooksPath).toBe('./windows/hooks.nsh');
expect(hooks).not.toBe('');
const nsis = (conf.bundle as { windows?: { nsis?: { installMode?: string } } }).windows?.nsis;
expect(nsis?.installMode).toBe('currentUser');
});
it('registers exactly the domi-rosea scheme under HKCU, opening the installed exe with the address', () => {
expect(macro('NSIS_HOOK_POSTINSTALL')).toEqual([
'WriteRegStr HKCU "Software\\Classes\\domi-rosea" "" "URL:Rosea Domi"',
'WriteRegStr HKCU "Software\\Classes\\domi-rosea" "URL Protocol" ""',
`WriteRegStr HKCU "Software\\Classes\\domi-rosea\\DefaultIcon" "" '"$INSTDIR\\\${MAINBINARYNAME}.exe",0'`,
`WriteRegStr HKCU "Software\\Classes\\domi-rosea\\shell\\open\\command" "" '"$INSTDIR\\\${MAINBINARYNAME}.exe" "%1"'`
]);
});
it('the uninstaller removes that key and nothing else', () => {
expect(macro('NSIS_HOOK_POSTUNINSTALL')).toEqual(['DeleteRegKey HKCU "Software\\Classes\\domi-rosea"']);
});
it('writes nowhere else: no machine-wide key, no other hook', () => {
expect(hooks).not.toMatch(/HKLM|HKCR|HKEY_/);
expect([...hooks.matchAll(/!macro (\w+)/g)].map((m) => m[1])).toEqual(['NSIS_HOOK_POSTINSTALL', 'NSIS_HOOK_POSTUNINSTALL']);
});
});
describe('the Rust side (D5)', () => {
it('depends on tauri alone: no plugin, no SDK', () => {
const cargo = readFileSync(join(SRC_TAURI, 'Cargo.toml'), 'utf8');
const deps = /\n\[dependencies\]\n([\s\S]*?)(?:\n\[|$)/.exec(cargo)?.[1] ?? '';
const names = deps
.split('\n')
.map((l) => /^([A-Za-z0-9_-]+)\s*=/.exec(l)?.[1])
.filter((n): n is string => n !== undefined);
expect(names).toEqual(['tauri']);
expect(cargo).not.toMatch(/\[target\.[^\]]*dependencies\]/);
});
it('grants the page no IPC: there is no capabilities folder', () => {
expect(existsSync(join(SRC_TAURI, 'capabilities'))).toBe(false);
expect(conf.app.security['capabilities']).toBeUndefined();
});
it('declares no plugin configuration', () => {
expect(conf.plugins).toBeUndefined();
});
});
+235
View File
@@ -0,0 +1,235 @@
/**
* Atrium Domi's rules for a `domi-app.toml` (Atrium docs/APP_CONTRACT.md v0 §2), as a test helper. The real parser is
* Rust (`atrium_registry::parse_manifest`, Fundamentum). APP_CONTRACT §6 asks an app that cannot use it "at least" to
* check its file against §2. The rules are checked in the parser's order, so a hostile file gets the reason code
* the parser gives. That agreement was measured once against the parser itself (review of `feature/atrium-door`).
*
* The TOML reader takes only what a manifest needs: `key = value` lines, comments, basic strings, booleans, decimal
* integers (so `format = 2` is `unknown_key`, as in the parser), one-line inline tables and arrays of strings. Anything else is `not_toml`. That is stricter than TOML, which is safe for
* Rosea's own file; `toml` 1.x would accept some files this refuses.
*/
export interface Refusal {
readonly field: string | null;
readonly reason: string;
}
type Value = string | boolean | number | readonly string[] | { readonly [k: string]: Value };
const MAX_MANIFEST = 16_384;
class NotToml extends Error {}
function readString(s: string, at: number): [string, number] {
if (s[at] !== '"') throw new NotToml();
let out = '';
let i = at + 1;
while (i < s.length) {
const c = s[i]!;
if (c === '"') return [out, i + 1];
if (c === '\\') {
const e = s[i + 1];
const simple: Record<string, string> = { '"': '"', '\\': '\\', n: '\n', t: '\t', r: '\r', b: '\b', f: '\f' };
if (e && e in simple) {
out += simple[e];
i += 2;
} else if (e === 'u' || e === 'U') {
const len = e === 'u' ? 4 : 8;
const hex = s.slice(i + 2, i + 2 + len);
if (!/^[0-9a-fA-F]+$/.test(hex) || hex.length !== len) throw new NotToml();
out += String.fromCodePoint(parseInt(hex, 16));
i += 2 + len;
} else throw new NotToml();
} else if (c === '\n' || (c.charCodeAt(0) < 0x20 && c !== '\t') || c === '\x7f') {
throw new NotToml();
} else {
out += c;
i += 1;
}
}
throw new NotToml();
}
const skip = (s: string, at: number): number => {
let i = at;
while (s[i] === ' ' || s[i] === '\t') i += 1;
return i;
};
function readValue(s: string, at: number): [Value, number] {
const i = skip(s, at);
if (s[i] === '"') return readString(s, i);
if (s.startsWith('true', i)) return [true, i + 4];
if (s.startsWith('false', i)) return [false, i + 5];
const int = /^[+-]?(0|[1-9][0-9]*)(?![0-9A-Za-z._:])/.exec(s.slice(i));
if (int) return [Number(int[0]), i + int[0].length];
if (s[i] === '[') {
const items: string[] = [];
let j = skip(s, i + 1);
if (s[j] === ']') return [items, j + 1];
for (;;) {
const [v, k] = readString(s, skip(s, j));
items.push(v);
j = skip(s, k);
if (s[j] === ']') return [items, j + 1];
if (s[j] !== ',') throw new NotToml();
j += 1;
}
}
if (s[i] === '{') {
const table: Record<string, Value> = {};
let j = skip(s, i + 1);
if (s[j] === '}') return [table, j + 1];
for (;;) {
const key = /^[A-Za-z0-9_-]+/.exec(s.slice(skip(s, j)))?.[0];
if (!key) throw new NotToml();
j = skip(s, skip(s, j) + key.length);
if (s[j] !== '=') throw new NotToml();
const [v, k] = readValue(s, j + 1);
if (key in table) throw new NotToml();
table[key] = v;
j = skip(s, k);
if (s[j] === '}') return [table, j + 1];
if (s[j] !== ',') throw new NotToml();
j += 1;
}
}
throw new NotToml();
}
function readToml(text: string): Record<string, Value> {
const table: Record<string, Value> = {};
for (const raw of text.split('\n')) {
const line = raw.endsWith('\r') ? raw.slice(0, -1) : raw;
const start = skip(line, 0);
if (start === line.length || line[start] === '#') continue;
const key = /^[A-Za-z0-9_-]+/.exec(line.slice(start))?.[0];
if (!key) throw new NotToml();
let i = skip(line, start + key.length);
if (line[i] !== '=') throw new NotToml();
const [v, end] = readValue(line, i + 1);
i = skip(line, end);
if (i !== line.length && line[i] !== '#') throw new NotToml();
if (key in table) throw new NotToml();
table[key] = v;
}
return table;
}
type Kind = 'str' | 'bool' | 'table' | 'array' | 'other';
const KEYS: readonly (readonly [string, Kind, boolean])[] = [
['id', 'str', true],
['name', 'str', true],
['label', 'str', true],
['version', 'str', true],
['accent', 'str', true],
['icon', 'str', false],
['ui_bundle', 'str', false],
['hostable', 'bool', true],
['free', 'bool', true],
['needs', 'table', true],
['capabilities', 'array', false]
];
const kindOf = (v: Value): Kind =>
typeof v === 'string' ? 'str' : typeof v === 'boolean' ? 'bool' : typeof v === 'number' ? 'other' : Array.isArray(v) ? 'array' : 'table';
// SemVer 2.0 (semver.org's regular expression).
const SEMVER =
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
// The part of Cargo's requirement syntax this file uses: comparators like `>=0.7`, comma-separated.
const SEMVER_REQ = /^\s*(?:[=><~^]|>=|<=)?\s*\d+(?:\.\d+){0,2}(?:\s*,\s*(?:[=><~^]|>=|<=)?\s*\d+(?:\.\d+){0,2})*\s*$/;
// eslint-disable-next-line no-control-regex -- APP_CONTRACT §2.2's control characters, on purpose
const CONTROL = /[\u0000-\u001f\u007f-\u009f]/;
const BIDI = /[؜‎‏‪-‮⁦-⁩]/;
const DEVICE = /^(con|prn|aux|nul|com[0-9]|lpt[0-9]|conin\$|conout\$)$/i;
function text(field: string, value: string, max: number): Refusal | null {
const chars = [...value].length;
if (chars === 0) return { field, reason: 'empty' };
if (chars > max) return { field, reason: 'too_long' };
if (CONTROL.test(value)) return { field, reason: 'control_char' };
if (BIDI.test(value)) return { field, reason: 'bidi_char' };
if (value.trim() !== value) return { field, reason: 'edge_space' };
return null;
}
function relPath(p: string): string | null {
if (p.length === 0) return 'path_empty';
if (new TextEncoder().encode(p).length > 255) return 'path_too_long';
if (p.includes('\0')) return 'path_nul';
if (p.includes('\\')) return 'path_backslash';
if (p.startsWith('/')) return 'path_absolute';
if (p.includes(':')) return 'path_colon';
if (p.includes('..')) return 'path_dotdot';
const parts = p.split('/');
if (parts.some((c) => c === '' || c === '.')) return 'path_component';
if (parts.some((c) => c.endsWith('.') || c.endsWith(' '))) return 'path_trailing';
if (parts.some((c) => DEVICE.test(c.split('.')[0]!))) return 'path_reserved';
if (!/^[A-Za-z0-9\-_./ %+()]+$/.test(p)) return 'path_char';
return null;
}
/** `null` when Atrium Domi would accept the file, else the first rule it breaks. */
export function checkManifest(bytes: Uint8Array): Refusal | null {
if (bytes.length > MAX_MANIFEST) return { field: null, reason: 'too_large' };
let source: string;
try {
source = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
} catch {
// Invalid UTF-8 is the answer itself, not an error to report.
return { field: null, reason: 'not_utf8' };
}
let t: Record<string, Value>;
try {
t = readToml(source);
} catch (e) {
if (e instanceof NotToml) return { field: null, reason: 'not_toml' };
throw e;
}
if (Object.keys(t).some((k) => !KEYS.some(([name]) => name === k))) return { field: null, reason: 'unknown_key' };
for (const [key, kind, required] of KEYS) {
const v = t[key];
if (v === undefined) {
if (required) return { field: key, reason: 'missing' };
} else if (kindOf(v) !== kind) return { field: key, reason: 'wrong_type' };
}
const needs = t['needs'] as Record<string, Value>;
if (Object.keys(needs).some((k) => k !== 'fundamentum' && k !== 'atrium')) return { field: 'needs', reason: 'unknown_key' };
for (const k of ['fundamentum', 'atrium']) {
if (needs[k] === undefined) return { field: 'needs', reason: 'missing' };
if (typeof needs[k] !== 'string') return { field: 'needs', reason: 'wrong_type' };
}
const caps = (t['capabilities'] ?? []) as readonly Value[];
if (caps.length > 64) return { field: 'capabilities', reason: 'too_many' };
if (caps.some((c) => typeof c !== 'string')) return { field: 'capabilities', reason: 'wrong_type' };
const id = t['id'] as string;
if (!/^[a-z0-9-]{1,32}$/.test(id) || id.startsWith('-') || id.endsWith('-')) return { field: 'id', reason: 'bad_id' };
const named = text('name', t['name'] as string, 64) ?? text('label', t['label'] as string, 32);
if (named) return named;
const version = t['version'] as string;
if (version.length > 64 || !SEMVER.test(version)) return { field: 'version', reason: 'not_semver' };
if (!/^#[0-9a-fA-F]{6}$/.test(t['accent'] as string)) return { field: 'accent', reason: 'not_rgb' };
if (typeof t['icon'] === 'string') {
const bad = relPath(t['icon']);
if (bad) return { field: 'icon', reason: bad };
const last = t['icon'].split('/').pop()!;
const dot = last.lastIndexOf('.');
if (dot <= 0 || !['png', 'svg', 'ico'].includes(last.slice(dot + 1).toLowerCase())) return { field: 'icon', reason: 'icon_type' };
}
if (typeof t['ui_bundle'] === 'string') {
const bad = relPath(t['ui_bundle']);
if (bad) return { field: 'ui_bundle', reason: bad };
} else if (t['hostable'] === true) return { field: 'ui_bundle', reason: 'required' };
for (const k of ['fundamentum', 'atrium']) {
const req = needs[k] as string;
if (req.length > 64 || !SEMVER_REQ.test(req)) return { field: 'needs', reason: 'not_semver_req' };
}
const seen = new Set<string>();
for (const c of caps as readonly string[]) {
if (!/^[a-z0-9-]+\.[a-z0-9-]+\.[a-z0-9-]+$/.test(c)) return { field: 'capabilities', reason: 'bad_name' };
if (!c.startsWith(`${id}.`)) return { field: 'capabilities', reason: 'foreign_prefix' };
if (seen.has(c)) return { field: 'capabilities', reason: 'duplicate' };
seen.add(c);
}
return null;
}
+81
View File
@@ -0,0 +1,81 @@
/**
* The `domi-app.toml` Rosea ships for Atrium Domi (atrium-adoption.md; Atrium docs/APP_CONTRACT.md v0). Rosea ships
* a file Atrium accepts, ships it next to the `.exe` with the icon it names, and keeps her name, version and
* identity in the places they already live. The hostile fixtures prove that the check refuses what Atrium refuses,
* and refuses it for Atrium's reason.
*/
import { readdirSync, readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
import { PRODUCT_NAME } from '../../../packages/schema/src/constants.js';
import { ATRIUM, MANIFEST, domiApp, gameVersion, toToml } from '../scripts/domi-app.js';
import { checkManifest } from './domi-app-rules.js';
const HERE = dirname(fileURLToPath(import.meta.url));
const SRC_TAURI = join(HERE, '..', 'src-tauri');
const FIXTURES = join(HERE, 'fixtures', 'domi-app');
const shipped = toToml(domiApp(gameVersion()));
const bytes = (s: string): Uint8Array => new TextEncoder().encode(s);
describe('domi-app.toml', () => {
it('is accepted by the rules of APP_CONTRACT §2', () => {
expect(checkManifest(bytes(shipped))).toBeNull();
});
it("names her as the product does, at the game's version, with her Aula id", () => {
const m = domiApp(gameVersion());
expect(m.name).toBe(PRODUCT_NAME);
expect(m.version).toBe(JSON.parse(readFileSync(join(HERE, '..', '..', 'rosea', 'package.json'), 'utf8')).version);
expect(m.id).toBe('rosea');
expect(shipped).toContain(`name = "${PRODUCT_NAME}"`);
});
it('is not hostable until her own window and origin are kept (R1), and asks for nothing', () => {
const m = domiApp('0.1.0');
expect(m.hostable).toBe(false);
expect(shipped).not.toContain('ui_bundle');
expect(shipped).not.toContain('capabilities');
});
it('is shipped next to the .exe on Windows only, with the icon it names', () => {
const win = JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.windows.conf.json'), 'utf8')) as {
bundle: { resources: Record<string, string> };
};
expect(win.bundle.resources).toEqual({ [MANIFEST]: 'domi-app.toml', [ATRIUM.icon.from]: ATRIUM.icon.file });
expect(domiApp('0.1.0').icon).toBe(ATRIUM.icon.file);
// The shared config would put it into the Android and macOS packages too.
const shared = JSON.parse(readFileSync(join(SRC_TAURI, 'tauri.conf.json'), 'utf8')) as { bundle: Record<string, unknown> };
expect(shared.bundle['resources']).toBeUndefined();
});
it('is made before every desktop build and never committed', () => {
const pkg = JSON.parse(readFileSync(join(HERE, '..', 'package.json'), 'utf8')) as { scripts: Record<string, string> };
expect(pkg.scripts['build:desktop']).toMatch(/tsx scripts\/domi-app\.ts && tauri build$/);
expect(pkg.scripts['dev']).toContain('tsx scripts/domi-app.ts');
const ignore = readFileSync(join(HERE, '..', '..', '..', '.gitignore'), 'utf8');
expect(ignore).toContain('apps/rosea-tauri/src-tauri/atrium/');
});
it('escapes a quote or a backslash, so no value can add a key', () => {
const hostile = toToml({ ...domiApp('0.1.0'), label: 'Rose"\nfree = false\n#\\' });
expect(checkManifest(bytes(hostile))).toEqual({ field: 'label', reason: 'control_char' });
expect(hostile.split('\n').filter((l) => l.startsWith('free'))).toEqual(['free = true']);
});
});
describe('a hostile domi-app.toml is refused, with the reason Atrium Domi logs', () => {
const files = readdirSync(FIXTURES).filter((f) => f.endsWith('.toml'));
it('has one fixture for each rule it claims', () => {
expect(files.length).toBeGreaterThanOrEqual(27);
});
for (const file of files) {
const [field, reason] = file.replace(/(-\d+)?\.toml$/, '').split('.') as [string, string];
it(`${file}: ${field === 'file' ? '' : `${field} `}${reason}`, () => {
const refusal = checkManifest(new Uint8Array(readFileSync(join(FIXTURES, file))));
expect(refusal).toEqual({ field: field === 'file' ? null : field, reason });
});
}
});
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<!-- AndroidTV support -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.rosea_shell"
android:usesCleartextTraffic="${usesCleartextTraffic}">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:launchMode="singleTask"
android:label="@string/main_activity_title"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- AndroidTV support -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
+89
View File
@@ -0,0 +1,89 @@
N: android=http://schemas.android.com/apk/res/android (line=2)
E: manifest (line=2)
A: http://schemas.android.com/apk/res/android:versionCode(0x0101021b)=1000
A: http://schemas.android.com/apk/res/android:versionName(0x0101021c)="0.1.0" (Raw: "0.1.0")
A: http://schemas.android.com/apk/res/android:compileSdkVersion(0x01010572)=37
A: http://schemas.android.com/apk/res/android:compileSdkVersionCodename(0x01010573)="17" (Raw: "17")
A: package="cz.mareknovak.domi.rosea" (Raw: "cz.mareknovak.domi.rosea")
A: platformBuildVersionCode=37
A: platformBuildVersionName=17
E: uses-sdk (line=7)
A: http://schemas.android.com/apk/res/android:minSdkVersion(0x0101020c)=24
A: http://schemas.android.com/apk/res/android:targetSdkVersion(0x01010270)=37
E: uses-feature (line=12)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.software.leanback" (Raw: "android.software.leanback")
A: http://schemas.android.com/apk/res/android:required(0x0101028e)=false
E: permission (line=16)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" (Raw: "cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION")
A: http://schemas.android.com/apk/res/android:protectionLevel(0x01010009)=0x00000002
E: uses-permission (line=20)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" (Raw: "cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION")
E: application (line=22)
A: http://schemas.android.com/apk/res/android:theme(0x01010000)=@0x7f100274
A: http://schemas.android.com/apk/res/android:label(0x01010001)=@0x7f0f001c
A: http://schemas.android.com/apk/res/android:icon(0x01010002)=@0x7f0d0000
A: http://schemas.android.com/apk/res/android:debuggable(0x0101000f)=true
A: http://schemas.android.com/apk/res/android:allowBackup(0x01010280)=false
A: http://schemas.android.com/apk/res/android:extractNativeLibs(0x010104ea)=false
A: http://schemas.android.com/apk/res/android:fullBackupContent(0x010104eb)=@0x7f120001
A: http://schemas.android.com/apk/res/android:usesCleartextTraffic(0x010104ec)=true
A: http://schemas.android.com/apk/res/android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
A: http://schemas.android.com/apk/res/android:dataExtractionRules(0x0101063e)=@0x7f120002
E: activity (line=33)
A: http://schemas.android.com/apk/res/android:label(0x01010001)=@0x7f0f0047
A: http://schemas.android.com/apk/res/android:name(0x01010003)="cz.mareknovak.domi.rosea.MainActivity" (Raw: "cz.mareknovak.domi.rosea.MainActivity")
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=true
A: http://schemas.android.com/apk/res/android:launchMode(0x0101001d)=2
A: http://schemas.android.com/apk/res/android:configChanges(0x0101001f)=0x00000fb4
E: intent-filter (line=39)
E: action (line=40)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=42)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
E: category (line=44)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.intent.category.LEANBACK_LAUNCHER" (Raw: "android.intent.category.LEANBACK_LAUNCHER")
E: provider (line=48)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.core.content.FileProvider" (Raw: "androidx.core.content.FileProvider")
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=false
A: http://schemas.android.com/apk/res/android:authorities(0x01010018)="cz.mareknovak.domi.rosea.fileprovider" (Raw: "cz.mareknovak.domi.rosea.fileprovider")
A: http://schemas.android.com/apk/res/android:grantUriPermissions(0x0101001b)=true
E: meta-data (line=53)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.support.FILE_PROVIDER_PATHS" (Raw: "android.support.FILE_PROVIDER_PATHS")
A: http://schemas.android.com/apk/res/android:resource(0x01010025)=@0x7f120000
E: meta-data (line=58)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.webkit.WebView.EnableSafeBrowsing" (Raw: "android.webkit.WebView.EnableSafeBrowsing")
A: http://schemas.android.com/apk/res/android:value(0x01010024)=false
E: meta-data (line=61)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="android.webkit.WebView.MetricsOptOut" (Raw: "android.webkit.WebView.MetricsOptOut")
A: http://schemas.android.com/apk/res/android:value(0x01010024)=true
E: provider (line=65)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.startup.InitializationProvider" (Raw: "androidx.startup.InitializationProvider")
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=false
A: http://schemas.android.com/apk/res/android:authorities(0x01010018)="cz.mareknovak.domi.rosea.androidx-startup" (Raw: "cz.mareknovak.domi.rosea.androidx-startup")
E: meta-data (line=69)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.emoji2.text.EmojiCompatInitializer" (Raw: "androidx.emoji2.text.EmojiCompatInitializer")
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
E: meta-data (line=72)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.lifecycle.ProcessLifecycleInitializer" (Raw: "androidx.lifecycle.ProcessLifecycleInitializer")
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
E: meta-data (line=75)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.ProfileInstallerInitializer" (Raw: "androidx.profileinstaller.ProfileInstallerInitializer")
A: http://schemas.android.com/apk/res/android:value(0x01010024)="androidx.startup" (Raw: "androidx.startup")
E: receiver (line=80)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.ProfileInstallReceiver" (Raw: "androidx.profileinstaller.ProfileInstallReceiver")
A: http://schemas.android.com/apk/res/android:permission(0x01010006)="android.permission.DUMP" (Raw: "android.permission.DUMP")
A: http://schemas.android.com/apk/res/android:enabled(0x0101000e)=true
A: http://schemas.android.com/apk/res/android:exported(0x01010010)=true
A: http://schemas.android.com/apk/res/android:directBootAware(0x01010505)=false
E: intent-filter (line=86)
E: action (line=87)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.INSTALL_PROFILE" (Raw: "androidx.profileinstaller.action.INSTALL_PROFILE")
E: intent-filter (line=89)
E: action (line=90)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.SKIP_FILE" (Raw: "androidx.profileinstaller.action.SKIP_FILE")
E: intent-filter (line=92)
E: action (line=93)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.SAVE_PROFILE" (Raw: "androidx.profileinstaller.action.SAVE_PROFILE")
E: intent-filter (line=95)
E: action (line=96)
A: http://schemas.android.com/apk/res/android:name(0x01010003)="androidx.profileinstaller.action.BENCHMARK_OPERATION" (Raw: "androidx.profileinstaller.action.BENCHMARK_OPERATION")
+3
View File
@@ -0,0 +1,3 @@
package: cz.mareknovak.domi.rosea
permission: cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
uses-permission: name='cz.mareknovak.domi.rosea.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'
@@ -0,0 +1,9 @@
id = "rosea"
name = "Rosea Domi"
label = "Rose"
version = "0.1.0"
accent = "rose"
icon = "domi-icon.png"
hostable = false
free = true
needs = { fundamentum = ">=0.7", atrium = ">=0.1" }

Some files were not shown because too many files have changed in this diff Show More