Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e0cbfc466a | |||
| 23e950c372 | |||
| de2a999382 | |||
| 8426980bfa | |||
| 3ff14fab16 | |||
| f24597dfdb | |||
| 1bfbd4a66c | |||
| 9d294096d9 | |||
| a200832cfb | |||
| b871ab9899 | |||
| 40f496d1ac | |||
| 3829058e2e | |||
| 68d9c60c14 | |||
| 12f5179688 | |||
| d11d2425ee | |||
| 6885a217cd | |||
| 49c8def037 |
@@ -0,0 +1,11 @@
|
||||
# Features
|
||||
|
||||
One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
|
||||
[`GAP_ANALYSIS.md`](GAP_ANALYSIS.md).
|
||||
|
||||
| Feature | Phase | Status | Analysis | Review |
|
||||
|:--|:--|:--|:--|:--|
|
||||
| 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 (approved), 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) |
|
||||
@@ -0,0 +1,63 @@
|
||||
# Gap analysis
|
||||
|
||||
What the product needs that it does not have yet, and what was closed. A closed gap
|
||||
is struck through **with its evidence in the row** (CLAUDE.md §5.1).
|
||||
|
||||
Ids are `G<phase>.<n>`. Phases follow [`docs/ROADMAP.md`](../docs/ROADMAP.md). The
|
||||
workspace part of Phase 0 is in
|
||||
[`features/phase0-workspace.md`](features/phase0-workspace.md). How the roadmap and
|
||||
`docs/GAMEPLAY.md` compare with the code, and the author's open questions:
|
||||
[`reviews/docs-roadmap-gameplay.md`](reviews/docs-roadmap-gameplay.md).
|
||||
|
||||
## Phase 0 — Foundations
|
||||
|
||||
**Gate open.** The workspace is merged (G0.1–G0.9). Still missing for the gate: the
|
||||
60 sentences (G0.18) and one illustration through the pipeline (G0.24): the pipeline and the
|
||||
board exist, and the first real picture is the author's to make.
|
||||
|
||||
| Id | Gap | Status / evidence |
|
||||
|:--|:--|:--|
|
||||
| ~~G0.1~~ | ~~No workspace, no commands~~ | Closed 2026-11-01 on `feature/phase0-workspace`. Every §3 command except `art:prep` and `cargo test` runs; counts in the review. |
|
||||
| ~~G0.2~~ | ~~Contracts §6.1–6.3 only in prose~~ | Closed 2026-11-01. `packages/schema/schemas/*.json` with generated types; `schemas.test.ts` 15 tests. §6.2's contradictory `act` list resolved (D5). |
|
||||
| ~~G0.3~~ | ~~No single place computes a day~~ | Closed 2026-11-01. `engine/src/time/localDay.ts`; 18 golden, refusal and property tests. The UTC-day trap measured: Anchorage Monday 20:00 is UTC Tuesday. |
|
||||
| ~~G0.4~~ | ~~Engine purity enforced by good intentions~~ | Closed 2026-11-01. ESLint rule in `eslint.config.mjs`; `purity-lint.test.ts` proves 16 bans fire inside the engine and not outside. |
|
||||
| ~~G0.5~~ | ~~No library validator~~ | Closed 2026-11-01. `content/src/validator.ts`, 13 negative fixtures, each rejected with its named rule; every rule proved by a fixture. Mutation: disabling the length cap fails `validate:library`. |
|
||||
| ~~G0.6~~ | ~~No `lint:copy`~~ | Closed 2026-11-01. One forbidden list shared with the validator; 9 files checked, 0 problems. |
|
||||
| ~~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.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.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.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.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. STYLE.md approved by the author 2026-11-01 (S1–S5 kept as drafted; `docs/style-approved`). **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.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. |
|
||||
|
||||
## Design questions — answered
|
||||
|
||||
Raised by GAMEPLAY.md and ROADMAP.md, answered by the author 2026-11-01. Details in
|
||||
[`reviews/docs-roadmap-gameplay.md`](reviews/docs-roadmap-gameplay.md) §2.
|
||||
|
||||
| # | Question | Answer |
|
||||
|:--|:--|:--|
|
||||
| ~~Q1~~ | Fox food with no friends and no Lucerna | A wild bush beside the player's own rose; other roses only add |
|
||||
| ~~Q2~~ | What "real time" counts for bloom | Days on which care helped, never minutes on screen |
|
||||
| ~~Q3~~ | Lucerna and the lantern share a name | Keep both; the lantern never passes through Lucerna |
|
||||
| ~~Q4~~ | "Sent through Amicitia" | "A taste of Amicitia" |
|
||||
| ~~Q5~~ | *No extra creatures* vs visitors | Rule removed from GAMEPLAY §3 |
|
||||
| ~~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 |
|
||||
| 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. |
|
||||
@@ -0,0 +1,101 @@
|
||||
# The art pipeline and the art board
|
||||
|
||||
Status: merged to `main`, reviewed in
|
||||
[`feature-art-board.md`](../reviews/feature-art-board.md). Gap: G0.24. Roadmap: Phase 0, *art/STYLE.md
|
||||
drafted with Mark, art/manifest.json for Phase 1 assets, Claude's SVG placeholders, and the art
|
||||
preparation page working end to end on one asset.* The pipeline itself is [`docs/ART.md`](../../docs/ART.md).
|
||||
|
||||
---
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
The player never sees this feature. They see what it produces: one rose who looks the same in
|
||||
every picture, a garden whose light follows the real day, and nothing that looks copied from
|
||||
the book. Without a pipeline, each picture is a separate gamble. The rose's face drifts
|
||||
between pictures, a glass dome sneaks in from the generator's memory of the book, and a 3 MB
|
||||
PNG lands in the precache.
|
||||
|
||||
For Mark it is a board. Every picture the game needs sits on one page with the prompt that
|
||||
makes it. He copies the prompt and pastes back what the generator made. The board measures the
|
||||
picture, Claude reviews it, and he taps *Accept*. Claude moves it into the game.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
style["art/STYLE.md"]
|
||||
manifest["art/manifest.json"]
|
||||
content["packages/content<br/>findForbidden"]
|
||||
schema["packages/schema<br/>PRODUCT_NAME"]
|
||||
prep["tools/art-prep<br/>manifest.ts · prompt.ts · placeholders.ts<br/>board.ts · accept.ts"]
|
||||
placeholders["art/placeholders/*.svg"]
|
||||
dist["tools/art-prep/dist/board/<br/>index.html · board-data.json · placeholders/"]
|
||||
board["Art board<br/>claude.ai artifact: db + assets"]
|
||||
final["art/final/*.webp"]
|
||||
style --> prep
|
||||
manifest --> prep
|
||||
content --> prep
|
||||
schema --> prep
|
||||
prep -- "pnpm art:board" --> placeholders
|
||||
prep -- "pnpm art:board" --> dist
|
||||
dist -- "Claude publishes" --> board
|
||||
board -- "Claude downloads the accepted picture;<br/>pnpm art:accept" --> final
|
||||
```
|
||||
|
||||
`tools/art-prep` is a workspace package (`@rosea/art-prep`) so that it gets its own tests,
|
||||
typecheck and lint. Nothing imports it: not the app, not the packages.
|
||||
|
||||
### Decisions
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| A1 | The art preparation page is a **private claude.ai artifact**, the Panda Domi board adapted, not a page on 127.0.0.1. | Mark asked for this board. It works from his phone, keeps the pictures between sessions, and Claude can read its rows and images. The roadmap and CLAUDE.md now say so (ROADMAP Phase 0, *Decided 2026-11-01*). |
|
||||
| A2 | Prompts are **built, never typed**: STYLE.md §1 plus the manifest's words. STYLE.md is the only copy of the style prompt and the review points. | The same words describe the rose every time, so she stays the same rose. Changing the style means editing one file. |
|
||||
| A3 | The manifest is **checked before any prompt exists**. That covers sizes generators offer, grids that divide into whole pixels, unique ids, characters with sheets, transparent sprites and layers, and **every forbidden word** from `@rosea/content`. | A prompt naming the book is how a likeness gets in (§8). Prompts are not player copy, so `lint:copy` never reads them. |
|
||||
| A4 | Every prompt ends with a **shared avoid list**: glass dome, folding screen, tiny round planet, desert, scarf, *the look of any existing book's drawings*. | The book's most recognisable images are the ones a generator will reach for when it hears *rose* and *fox*. |
|
||||
| A5 | **The sky is code.** Garden pictures are layers, transparent above a horizon at 40 %. | The sun follows the player's real time and the stars are the real constellations (CLAUDE.md §1). A painted sky could be neither. |
|
||||
| A6 | **Sprite sheets** come with exact pixel geometry: cut lines, cell centres, a safe box at 12 % of the cell's shorter side. Each cell can also be made *one at a time*. | Taken from the Panda Domi board, where a sheet's drift off the grid was the common failure. |
|
||||
| A7 | `art:accept` **refuses rather than guesses**. A sheet with an empty or painted cell is refused whole, a transparent picture with an opaque background is refused, and so is a file still over budget at WebP quality 62. A full picture is cropped to shape, then only ever shrunk. | A cut that "mostly worked" ships a broken picture. Every final picture is precached, so the budget is real bandwidth on a player's phone. |
|
||||
| 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. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Where | Defence |
|
||||
|:--|:--|:--|
|
||||
| **A picture that looks like the book** (copyright, and the product claiming a lineage it promised not to, GAMEPLAY §8) | Prompts; generated pictures | A3, A4. STYLE.md §8 makes likeness Claude's first review check. Mark's eye is the last gate. No automatic likeness check exists (docs/ART.md §5). |
|
||||
| **A rose who looks hurt or sad because of the player** (a lonely person feeling worse, §8 *drift that reads as blame*) | `rose-waiting`, `rose-thirsty`, `rose-overwatered` prompts | Their prompts say *tired, not hurt*, *gently comic, never ill*, *quiet, waiting with patience, never sad, hurt or blaming*. Review point 7 is about exactly this. |
|
||||
| **Words painted into a picture**, bypassing the copy library | Generated pictures | Every prompt forbids text. Claude's review refuses painted words (STYLE.md §8). The petal's words are added in code. |
|
||||
| **Player data leaving the device** | The board | None can. The board holds only generated art and Mark's notes, and the app never talks to it (docs/ART.md §3, *Privacy*). |
|
||||
| **Someone being reachable** | — | Not applicable: no player is involved. |
|
||||
| **A huge bundle on a phone** | `art/final/` | A7's budgets: about 1.4 MB for the four layers, 120 KB per small picture. |
|
||||
| **The board and the repo disagree** | Manifest changes | `art:board` rewrites `art/placeholders/` from the manifest, and the drift test fails until it is run. The board is republished from the same build. |
|
||||
|
||||
## 4. Gap analysis and the designed solution
|
||||
|
||||
| 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 | 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 | Done |
|
||||
| No SVG placeholders | 29 stand-ins, generated and committed | 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 |
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| 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 |
|
||||
| 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 |
|
||||
| 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 |
|
||||
| `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 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 |
|
||||
@@ -0,0 +1,81 @@
|
||||
# The Letter slot
|
||||
|
||||
Status: merged to `main`, reviewed in
|
||||
[`feature-letter-slot.md`](../reviews/feature-letter-slot.md). Gap: G0.25. Roadmap: Phase 0, *a slot for A Letter
|
||||
from the Gardener — the author writes it; agents only scaffold the page.*
|
||||
|
||||
---
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
*A Letter from the Gardener* is the help section. It holds the deeper why, it can be
|
||||
re-read at any time, and it is never needed to play (GAMEPLAY §4). It also holds the
|
||||
quiet door to real help (CLAUDE.md §5.6 rule 5).
|
||||
|
||||
This branch makes the place for it, not the letter itself. The author writes
|
||||
`docs/LETTER.md` in plain Markdown, and the app shows it as a page. **Until the author
|
||||
writes something, the player sees no change at all**: there is no link to an empty
|
||||
page, no "coming soon" and no dead control.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
letter[("docs/LETTER.md<br/>the author's words")]
|
||||
app["apps/rosea<br/>App.svelte<br/>imports it ?raw at build time"]
|
||||
ui["packages/ui<br/>letter/parse.ts → blocks<br/>Letter.svelte, Shell.svelte"]
|
||||
lint["scripts/lint-copy.ts"]
|
||||
letter -- "bundled, precached" --> app --> ui
|
||||
lint -. scans .-> letter
|
||||
```
|
||||
|
||||
### Decisions
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| L1 | `docs/LETTER.md` is the only copy of the letter. The app imports it with Vite's `?raw` at build time. | No runtime fetch, so the letter is in the precached bundle and opens offline. One file means the author edits one place, in Markdown. |
|
||||
| L2 | The scaffold holds only HTML comments: one slot per thing the docs say the letter carries. Comments are dropped when the page is built, so the scaffold renders as nothing. | Agents never write the letter's voice. A heading is voice too, so the slots are comments, not headings. |
|
||||
| L3 | A small Markdown subset is parsed into blocks in `packages/ui/src/letter/parse.ts`: headings, paragraphs, lists, *emphasis* and links. Everything else is shown as plain text. The component renders the blocks with Svelte, **never `{@html}`**. | No HTML is ever built from text, so nothing in the file can inject markup or script, and the CSP stays `'self'`. The parser lives in `ui` because it is presentation, and `ui → content` is not an allowed dependency. |
|
||||
| L4 | Only `https:` and `tel:` become links. Anything else, including `http:`, `javascript:` and `data:`, stays text. External links open in a new tab, with `rel="noopener noreferrer"`. | The support door needs web and phone links. Nothing else does. |
|
||||
| L5 | The page is reached by a link on the home view, at `#letter`. The link exists **only when the letter has content**. With an empty letter, `#letter` shows the home view. | Hash routing works offline without a server rule. An entry point to an empty page is a dead control. |
|
||||
| L6 | `lint:copy` scans `docs/LETTER.md` with the full list, though it lives in `docs/`. | It is player-facing. The `docs/` exemption (§5.6 rule 4) is for design documents, where the words are being discussed. |
|
||||
| L7 | When the view changes, focus moves to the new view's heading. | A screen-reader user hears where they are. A hash change alone announces nothing. |
|
||||
| L8 | `docs/LETTER.md` is in turbo's `globalDependencies`. | Found in review: without it, a changed letter replayed the cached build (`lessons/technical.md`). |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Where | Defence |
|
||||
|:--|:--|:--|
|
||||
| A forbidden or medical word reaches a player through the letter | `docs/LETTER.md` | L6, with a test that the script reads the file. |
|
||||
| The letter names the book | The "one sentence of inspiration" (GAMEPLAY §7) | `lint:copy` refuses *Saint-Exupéry* and the title in the letter as everywhere else. If the author wants the letter to name its source, that is a decision to write down (Q9), not an exemption made by an agent. |
|
||||
| Markup or script injected through the file | The renderer | L3 and L4, with tests for `<script>`, `javascript:` and raw HTML. |
|
||||
| An empty page feels broken or turns the player away | Before the author writes | L5: there is no way to reach it. |
|
||||
| A link sends the player's address somewhere | Support links | `referrer: no-referrer` is already set, and `noreferrer` is on each link. Leaving the app is the player's own choice, made with a tap. |
|
||||
| Someone in crisis cannot find the door | Support lines | Not solved here: the numbers are real-world facts the author must verify. The slot exists, and G0.27 tracks the rest. |
|
||||
|
||||
Guilt, comparison, rejection, dependence: looked for and none found. The page asks
|
||||
nothing and counts nothing.
|
||||
|
||||
## 4. Gap analysis and the designed solution
|
||||
|
||||
| Gap | Solution |
|
||||
|:--|:--|
|
||||
| No page for the letter | `Letter.svelte`, reached at `#letter` (L5) |
|
||||
| No file for the author | `docs/LETTER.md`, slots only (L2) |
|
||||
| The letter escapes `lint:copy` | L6 |
|
||||
| No support lines | Slot only; verified numbers are the author's (G0.27) |
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| The scaffold, being only comments, parses to zero blocks | unit | `packages/ui/test/letter-parse.test.ts` |
|
||||
| Headings, paragraphs across lines, lists, emphasis, links parse as blocks | unit | same |
|
||||
| `<script>` and raw HTML stay text; `javascript:`, `data:`, `http:` links stay text | unit | same |
|
||||
| `https:` and `tel:` links render as links with `noopener noreferrer` | unit | `packages/ui/test/Shell.test.ts` |
|
||||
| Empty letter: no link to it, and `#letter` shows home | unit + e2e | `Shell.test.ts`, `e2e/shell.spec.ts` |
|
||||
| A letter with content: the link appears, opens the page, *Back* returns, focus moves | unit | `Shell.test.ts` |
|
||||
| `lint:copy` reads `docs/LETTER.md` and fails on a forbidden word in it | script, run | the review |
|
||||
| The built app still renders, offline included | e2e, offline | existing suites |
|
||||
| The written-letter branch of the e2e test, with a temporary sample letter | e2e, run once | the review |
|
||||
| A changed letter rebuilds the app (`cache miss`) | e2e, run | the review |
|
||||
@@ -0,0 +1,132 @@
|
||||
# Phase 0 — the workspace
|
||||
|
||||
Status: **merged to `main`** 2026-11-01 (`d11d242`), built, not deployed. This is the
|
||||
workspace part of ROADMAP Phase 0. **The Phase 0 gate is still open** (G0.18, G0.24). Review:
|
||||
[`feature-phase0-workspace.md`](../reviews/feature-phase0-workspace.md).
|
||||
Gates closed and still open: [`GAP_ANALYSIS.md`](../GAP_ANALYSIS.md).
|
||||
|
||||
Written before `docs/ROADMAP.md` existed, so it defined its own scope. It
|
||||
covers what CLAUDE.md §2 calls "confirmed when Phase 0 scaffolds it" and what §3
|
||||
calls "proposed until Phase 0 scaffolds them", and nothing more. **No game code.**
|
||||
`docs/GAMEPLAY.md` was added later; it must be read before any.
|
||||
|
||||
---
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
The player gets nothing they can see. This is deliberate. When they open the link,
|
||||
they get a quiet page with the rose's name, and it still opens with the network off.
|
||||
|
||||
What Phase 0 buys is the ground everything else stands on. It proves four things
|
||||
before anything exists that could hurt a person:
|
||||
|
||||
- **The app opens with no network at all.** It is served from a sub-path, as
|
||||
GitHub Pages will serve it, and checked against the built bundle.
|
||||
- **Nothing leaves the device.** No third-party request, no cookie, no
|
||||
`localStorage`, enforced by a CSP in a `<meta>` tag.
|
||||
- **No word can reach a player that the rules forbid.** `lint:copy` and
|
||||
`validate:library` run, and they are proved to fire.
|
||||
- **The engine cannot read a clock or a die.** A lint rule refuses it, and a
|
||||
test proves the rule refuses it.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph apps
|
||||
app["apps/rosea<br/>@rosea/app<br/>Svelte 5 + Vite + PWA"]
|
||||
end
|
||||
subgraph packages
|
||||
ui["packages/ui<br/>@rosea/ui<br/>copy/ + shell components"]
|
||||
content["packages/content<br/>@rosea/content<br/>library validator, forbidden words"]
|
||||
engine["packages/engine<br/>@rosea/engine<br/>time/localDay.ts"]
|
||||
schema["packages/schema<br/>@rosea/schema<br/>JSON Schemas, generated types, constants"]
|
||||
end
|
||||
lib[("content/library/*.json<br/>content/fixtures/*.json")]
|
||||
scripts["scripts/<br/>lint-copy, validate-library,<br/>git hooks"]
|
||||
e2e["e2e/<br/>Playwright: built bundle,<br/>server killed for offline"]
|
||||
|
||||
app --> ui --> schema
|
||||
engine --> schema
|
||||
content --> schema
|
||||
app --> schema
|
||||
scripts --> content
|
||||
content -. reads .-> lib
|
||||
e2e -. serves .-> app
|
||||
```
|
||||
|
||||
`ui → engine` (CLAUDE.md §2) is not drawn because nothing in `ui` calls the engine yet, and an unused
|
||||
dependency is a dependency nobody tested. It arrives with the first component that renders a value
|
||||
the engine computes. `app → content` likewise.
|
||||
|
||||
### Decisions
|
||||
|
||||
| # | Decision | Why |
|
||||
|:--|:--|:--|
|
||||
| D1 | Create `schema`, `engine`, `content`, `ui` and `apps/rosea` now. **Defer** `storage`, `identity`, `sync`, `services/lucerna` and `tools/art-prep` to their first feature. | An empty package has a test suite that runs nothing and exits 0. That is the `pnpm test` trap (§3) built into the layout on purpose. Each package arrives with the feature that gives it a test. |
|
||||
| D2 | The build's base path is `/Rosea/` by default and `ROSEA_BASE` overrides it. The test server serves `dist/` **under that prefix**, never at `/`. | GitHub Pages serves a project at `/<repo>/` (§8, predicted). If Vite `base`, the manifest `scope`/`start_url` and the service-worker scope disagree, the installed app opens a 404. Testing at `/` would never see it. |
|
||||
| D3 | Engine purity is an **ESLint rule** scoped to `packages/engine/src`, plus a test that lints a deliberately impure snippet and asserts each ban fires. | CLAUDE.md §7 says "lint rule". Ludus said the same and shipped a source-scanning test instead. Here it really is a lint rule, and the test is what keeps it honest. The ban includes `Intl.DateTimeFormat().resolvedOptions()`: it reads the device's time zone, which must be a parameter. |
|
||||
| D4 | `content/library/` ships **empty**. The validator prints its counts and passes on zero entries, but it fails if any fixture passes. | Every sentence needs `verifiedBy` from the author (§6.1). An agent writing "verified" entries would be inventing a fact. The 365-sunset-sentence requirement is a release gate, not a Phase 0 gate. |
|
||||
| D5 | The event schema defines only the `care` kind, with `act: water \| shade \| weed \| petals`. | §6.2 contradicted itself: the example listed `wind \| light` and the comment listed `weed \| petals`. §1 describes weeds and fallen petals, so the comment wins, and CLAUDE.md is corrected in the same branch. The other kinds (`sunset`, `fox`, `harvest`…) wait for `docs/GAMEPLAY.md`, because their fields are game design. |
|
||||
| D6 | One forbidden-word list, in `packages/content/src/forbidden.ts`, used by **both** `lint:copy` and the library validator. Whole-word, case-insensitive. `treat` is banned outright. | Two lists drift. Banning `treat` means the fox's food is always *berries*, never *treats*. That is a little inconvenient and much cheaper than a medical-claim review. |
|
||||
| D7 | The CSP lives in a `<meta>` tag: `default-src 'self'`, no inline script. The service worker is registered from an emitted file, not an inline snippet. | GitHub Pages cannot set headers (§8, predicted). An inline registration script would need `'unsafe-inline'` and quietly widen the policy for everything. |
|
||||
| D8 | No deploy workflow yet. | There is no GitHub remote. A workflow for a host that does not exist is configuration nobody can test. |
|
||||
| D9 | `localDay(epochMs, timeZone)` is the only day computation. It formats with `Intl.DateTimeFormat` for an explicit IANA zone. | §7: one module computes a day. The zone is always passed in. A city the player chooses maps to a zone, and so does the device fallback, which the app reads and the engine never does. |
|
||||
| D10 | `apps/rosea/vite.config.ts` imports the name constants by **relative path** (`../../packages/schema/src/constants.js`), not as `@rosea/schema`. | Vite bundles a config's relative imports but externalises anything under `node_modules`, and Node cannot load a workspace package's `.ts`. `--configLoader runner` fixed `vite build` but not `svelte-check`, which still printed *failed to load config* inside a green run. The constants module is pure and has no imports. |
|
||||
| D11 | Every direct dependency is **pinned exactly** to the version Ludus's lockfile resolved, and `engine-strict` is off. | This machine runs Node 22.11. Fresh resolution pulled `@axe-core/playwright@4.14` (needs ≥ 22.12) and `eslint-visitor-keys@5` (declares ≥ 22.13). Ludus runs the same packages on the same Node. Upgrading Node is G0.20. |
|
||||
| D12 | The trace's `geocell` is capped at 6 characters. | Found in self-review: the first draft allowed 16, and a 16-character geohash is centimetres. Six is ~1.2 × 0.6 km, the ~1 km of CLAUDE.md §4. Anything finer is rejected by the schema, before any code could send it. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
Here "risk" means a person feeling worse, a person's location, or a person being
|
||||
reachable who did not ask to be.
|
||||
|
||||
| Risk | Where it could enter in Phase 0 | Defence |
|
||||
|:--|:--|:--|
|
||||
| A forbidden or medical word reaches a player | Shell copy, manifest description, `index.html` | `lint:copy` scans `packages/ui/src/copy/`, `apps/rosea/index.html`, the manifest fields in `vite.config.ts` and `store/`. Fixtures prove it fires. |
|
||||
| *Lonely* / *loneliness* appears in the product | Same | On the forbidden list (§5.6 rule 4). Allowed only in `.agents/` and `docs/`, which `lint:copy` does not scan. |
|
||||
| A byte leaves the device | Fonts, icons or a CDN pulled in by a dependency | CSP `default-src 'self'`. The e2e suite records every request and fails on any origin other than the test server's. |
|
||||
| Storage outside IndexedDB | A library writing `localStorage` | The e2e suite asserts `localStorage.length === 0` and `document.cookie === ''` after load. |
|
||||
| A day computed in UTC | The engine, later | D9, a purity-lint ban on `toISOString().slice`, and DST golden tests for `localDay`. |
|
||||
| The empty shell feels like a broken app | The placeholder page | One calm line from `copy/`, no spinner, no "coming soon". It says what is true and asks nothing. |
|
||||
|
||||
Looked for and not found in Phase 0: guilt, comparison, rejection, dependence. There
|
||||
is no mechanic yet that could carry any of them.
|
||||
|
||||
## 4. Gap analysis and the designed solution
|
||||
|
||||
| Gap | Solution in this branch |
|
||||
|:--|:--|
|
||||
| No workspace, no commands | `pnpm-workspace.yaml`, `turbo.json` and root scripts for every command in §3 that has something to run. |
|
||||
| `pnpm test` can exit 0 having run nothing | `test` is not cached (`cache: false`). Every package has at least one real test. Counts are quoted in the review. |
|
||||
| No proof the PWA works offline under a sub-path | `e2e/offline.spec.ts` starts a real static server at `/Rosea/`, waits for the worker to control the page, **kills the server**, reloads, and asserts the shell rendered. Ludus learned that `context.setOffline` acts before the service worker and tests the harness, not the cache. |
|
||||
| No guard on commits | `scripts/pre-commit` (5 MB) and `scripts/commit-msg` (AI attribution), installed by `pnpm install`. |
|
||||
| CRLF churn on Windows (`core.autocrlf=true` on this machine) | `.gitattributes` with `* text=auto eol=lf`. |
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| Hope-sentence schema accepts a valid entry | unit | `packages/schema/test/schemas.test.ts` |
|
||||
| Care event rejects an unknown `act`, a missing `localDay`, free text in `messageId` | unit | same |
|
||||
| Trace rejects a timestamp finer than a day and extra properties | unit | same |
|
||||
| `localDay` in Prague on both 2026 DST days, Sydney, Reykjavík, UTC+14, UTC−12 | unit (golden) | `packages/engine/test/localDay.test.ts` |
|
||||
| Monday evening in Anchorage is Monday, though the UTC day is Tuesday (the trap, measured) | unit | same |
|
||||
| An unknown zone throws instead of falling back to UTC | unit | same |
|
||||
| Days never go backwards, always advance within 26 h, are deterministic (8 zones, 2000–2100) | property | same, fast-check |
|
||||
| Each purity ban fires on an impure snippet; clean code passes | unit | `packages/engine/test/purity-lint.test.ts` |
|
||||
| Every fixture in `content/fixtures/` fails with its named message | unit | `packages/content/test/validator.test.ts` |
|
||||
| Forbidden words: whole-word, case-insensitive; no false hit on *treaty*, *healthy*, *patience* | unit | `packages/content/test/forbidden.test.ts` |
|
||||
| `lint:copy` core: strings and markup caught, comments ignored, *Domi* never alone | unit | `packages/content/test/copy-lint.test.ts` |
|
||||
| Shell copy passes `lint:copy` | script | `pnpm lint:copy` |
|
||||
| Shell names the product from the constant, has a `main` landmark and no controls | unit | `packages/ui/test/Shell.test.ts` |
|
||||
| Trace rejects a geocell finer than ~1 km | unit | `packages/schema/test/schemas.test.ts` |
|
||||
| `<meta charset>` stays within the first 1024 bytes after the CSP | e2e | `e2e/shell.spec.ts` |
|
||||
| Hooks block a > 5 MB file and an AI trailer, and pass a clean commit | manual, run | `.agents/reviews/feature-phase0-workspace.md` |
|
||||
| Built app renders its name at `/Rosea/` | e2e | `e2e/shell.spec.ts` |
|
||||
| No request to any other origin; no cookie; no `localStorage` | e2e | same |
|
||||
| Manifest `scope`/`start_url` and service-worker scope equal the base | e2e | same |
|
||||
| CSP meta present; no inline script in the built `index.html` | e2e | same |
|
||||
| No axe violations on the shell | e2e | same |
|
||||
| Shell loads with the server gone | offline | `e2e/offline.spec.ts` |
|
||||
| **Manual**: install from Chrome on a phone; open in airplane mode | manual | not done — needs a hosted build (D8) |
|
||||
@@ -0,0 +1,20 @@
|
||||
# Lessons
|
||||
|
||||
One file per category of problem (CLAUDE.md §5.1b). Read these first when something
|
||||
behaves strangely. Each entry has three parts: **what happened**, **why it bit**,
|
||||
and **how to apply it**.
|
||||
|
||||
| File | Entries | What belongs in 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) | 5 | 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. |
|
||||
|
||||
A file is created with its first real entry. An empty lessons file only looks like
|
||||
knowledge.
|
||||
@@ -0,0 +1,34 @@
|
||||
# Art
|
||||
|
||||
What the image pipeline taught (CLAUDE.md §5.1b).
|
||||
|
||||
## "Never enlarge" also skips the crop
|
||||
|
||||
**What happened.** `art:accept` first resized a full-background picture with sharp's
|
||||
`fit: 'cover'` and `withoutEnlargement: true`. A 900 × 600 picture accepted as the
|
||||
1024 × 1024 app icon came out 900 × 600. Because it was smaller than the target, sharp
|
||||
skipped the whole resize, crop included, and a rectangle would have become the icon. The
|
||||
test *a full-background picture of the wrong shape is cropped from the middle* caught
|
||||
it before the first real picture existed (`tools/art-prep/src/accept.ts`, `middle()`).
|
||||
|
||||
**Why it bit.** One option can switch off two jobs: changing the shape and changing the
|
||||
size. "Don't blow it up" was meant for the size only.
|
||||
|
||||
**How to apply it.** Crop to the target shape first, as its own step, then only ever
|
||||
shrink. Test the small, wrongly shaped input as well as the large one: a generator that
|
||||
ignores the requested size is the normal case, not the edge case.
|
||||
|
||||
## A check on prompt words catches what review would miss
|
||||
|
||||
**What happened.** The first `pnpm art:board` refused its own manifest: the waiting
|
||||
rose's cell said she was "quiet and *patient*", and `patient` is on the forbidden list
|
||||
(§5.6 rule 3). The manifest checker runs `findForbidden` from `@rosea/content` over
|
||||
every word a prompt is built from.
|
||||
|
||||
**Why it bit.** Prompts are not player-facing, so `lint:copy` never reads them. But a
|
||||
prompt that names the book, or a word that drifts in from it, is exactly how a
|
||||
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.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Code
|
||||
|
||||
## An agent's write tool can turn `\u00a0` into a real non-breaking space
|
||||
|
||||
**What happened.** `packages/content/src/copy-lint.ts` was written with the regex
|
||||
`[\s\u00a0]`. On disk the file held `[\s` + the bytes `C2 A0` + `]`: an actual U+00A0.
|
||||
ESLint's `no-irregular-whitespace` caught it. Fixing it with `sed`, then with a
|
||||
`node -e` replace, then with a quoted heredoc each wrote the same character back. The
|
||||
fix that worked built both strings from char codes (`String.fromCharCode(160)`,
|
||||
`String.fromCharCode(92) + 'u00a0'`).
|
||||
|
||||
**Why it bit.** Somewhere between the agent and the file, a single-backslash
|
||||
`\uXXXX` in the input was decoded. A double-backslash `\\u00a0` inside a JS string
|
||||
(`forbidden.ts`) survived. The bug is invisible on screen: the two forms look the same.
|
||||
|
||||
**How to apply it.** Prefer `\s` or a named class over a literal Unicode escape in a
|
||||
regex. When one is needed, check the bytes after writing.
|
||||
This entry was itself written with two literal NBSPs where it named the escape, and was
|
||||
fixed the same way. Check with `grep -n $'\xc2\xa0' file` (the two UTF-8 bytes) or
|
||||
`sed -n Np file | od -c`. Do not use `grep -P '\xA0'`: it matches the last byte of `≠`
|
||||
and other characters, and raised a false alarm on the review document. Keep
|
||||
`no-irregular-whitespace` on.
|
||||
|
||||
## A Svelte 5 effect that short-circuits never tracks what it skipped
|
||||
|
||||
**What happened.** `Shell.svelte` moved focus with
|
||||
`$effect(() => { if (moved) heading?.focus(); })`. `moved` is a plain variable and was
|
||||
`false` on the first run, so the effect never read `heading` and had no dependencies.
|
||||
When the view changed and `heading` was bound to the new `<h1>`, nothing re-ran. The
|
||||
Shell test caught it: the focus stayed on `<body>`.
|
||||
|
||||
**Why it bit.** An effect tracks only the state it actually reads on each run. A
|
||||
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.
|
||||
@@ -0,0 +1,33 @@
|
||||
# Process
|
||||
|
||||
## Never "try" a credential helper to see if it works
|
||||
|
||||
**What happened.** On 2026-10-31 the first push to Gitea failed for lack of
|
||||
credentials. The agent retried with `-c credential.helper=manager`. Git Credential
|
||||
Manager returned a stored login for `gitea.marek-novak.cz`, Gitea rejected it, and git
|
||||
then told GCM to erase that login. The push finally worked once the author copied
|
||||
Ludus's repo-local `credential.helper` into this repository.
|
||||
|
||||
**Why it bit.** Git calls `credential reject` after an authentication failure. With
|
||||
GCM that deletes the stored credential, so a failed probe is not harmless: it can
|
||||
break every other repository that relied on the entry.
|
||||
|
||||
**How to apply it.** When a push needs credentials, ask the author how this machine
|
||||
authenticates for that host. Never probe with a different helper, and never read,
|
||||
print or search for token values. On this machine, each repository carries its own
|
||||
`credential.helper`.
|
||||
|
||||
## Pin to a sibling's lockfile when the machine's Node is old
|
||||
|
||||
**What happened.** The first `pnpm install` resolved the newest versions.
|
||||
`@axe-core/playwright@4.14` needs Node ≥ 22.12, and `typescript-eslint@8.72` pulled in
|
||||
`eslint-visitor-keys@5`, which declares ≥ 22.13. This machine runs 22.11. Pinning every
|
||||
direct dependency to the versions in Ludus's `pnpm-lock.yaml` and turning
|
||||
`engine-strict` off gave an install that every gate passes on.
|
||||
|
||||
**Why it bit.** A caret range is a promise about the future, and the future had moved
|
||||
past this machine's Node. Ludus, a known-good sibling on the same machine, was a
|
||||
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).
|
||||
@@ -0,0 +1,72 @@
|
||||
# Technical
|
||||
|
||||
## A Vite config cannot import a workspace package's TypeScript source
|
||||
|
||||
**What happened.** `apps/rosea/vite.config.ts` imported the name constants from
|
||||
`@rosea/schema`, whose `main` is `src/index.ts`. `vite build` failed with
|
||||
`ERR_UNKNOWN_FILE_EXTENSION ".ts"`. `--configLoader runner` fixed the build. But
|
||||
`svelte-check` loads the same config on its own, still failed, and printed
|
||||
*failed to load config* while reporting 0 errors.
|
||||
|
||||
**Why it bit.** Vite bundles a config's relative imports but externalises anything
|
||||
resolved through `node_modules`. Workspace packages are symlinks there, so Node
|
||||
loads them natively, and Node 22.11 does not strip types. A tool that reads the config
|
||||
for you has its own loader.
|
||||
|
||||
**How to apply it.** In a Vite config, import workspace code by **relative path**
|
||||
to a dependency-free module. Treat a failure message inside a green run as a
|
||||
failure: find which tool printed it.
|
||||
|
||||
## Vite escapes the quotes in an injected `<meta>` CSP
|
||||
|
||||
**What happened.** The built `index.html` carries `content="default-src 'self'…"`.
|
||||
A regex over the raw HTML looking for `'self'` would never match it.
|
||||
|
||||
**Why it bit.** The HTML is valid and the browser decodes the entities. Only a test
|
||||
that reads the bytes sees the difference.
|
||||
|
||||
**How to apply it.** Read attributes from the DOM:
|
||||
`page.locator('meta[http-equiv=…]').getAttribute('content')`. Keep raw-HTML checks for
|
||||
byte-level questions, such as whether there is an inline `<script>` or where `<meta charset>` sits.
|
||||
|
||||
## Svelte 5 needs no preprocessor for `lang="ts"`
|
||||
|
||||
**What happened.** With `vitePreprocess()` in `svelte.config.js`, `svelte-check` tried
|
||||
to load `vite.config.ts` to preprocess styles, and hit the error above. Removing the
|
||||
preprocessor removed the problem, and every component still typechecks.
|
||||
|
||||
**Why it bit.** Svelte 5 strips type annotations natively. A preprocessor is only
|
||||
needed for non-CSS style languages or TS features that emit code (enums, decorators).
|
||||
|
||||
**How to apply it.** Leave `svelte.config.js` as `export default {}` until a component
|
||||
needs SCSS or emitted TS. Add the preprocessor in the same commit as that need.
|
||||
|
||||
## Turbo's cache does not see a file the app imports from outside its package
|
||||
|
||||
**What happened.** The app imports `docs/LETTER.md?raw`. With a sample letter written
|
||||
into the file, `pnpm test:e2e` printed `@rosea/app:build: cache hit` and tested the
|
||||
*old* bundle, so the link to the letter was missing. Turbo hashes a package's own
|
||||
files, and `docs/` belongs to no package. Adding `docs/LETTER.md` to
|
||||
`globalDependencies` in `turbo.json` turned it into a `cache miss`, and the test passed.
|
||||
|
||||
**Why it bit.** A build cache keyed on the wrong inputs gives a stale bundle that looks
|
||||
fresh. This is CLAUDE.md §5.4 again, caused by the build tool and not the service worker.
|
||||
|
||||
**How to apply it.** Any file the app bundles from outside its package goes into
|
||||
`globalDependencies` or the task's `inputs`, in the same commit as the import. To
|
||||
check, change the file, run the build, and look for `cache miss`.
|
||||
|
||||
## A preview on a busy port shows someone else's app
|
||||
|
||||
**What happened.** The art board's local preview was given port 5180. Ludus's dev
|
||||
server already listened on `localhost:5180`, so the preview pane opened **Ludus**,
|
||||
whose page text appeared under the board's tab. Port 5191 was busy too. The board
|
||||
rendered only on 5237, after `netstat` confirmed the port was free.
|
||||
|
||||
**Why it bit.** A server that fails to bind, or binds 127.0.0.1 while another app holds
|
||||
`localhost`, does not always stop loudly, and the browser simply shows whatever is
|
||||
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.
|
||||
@@ -0,0 +1,75 @@
|
||||
# Testing
|
||||
|
||||
## A pipe hides the exit code of the command you are checking
|
||||
|
||||
**What happened.** On 2026-11-01 Phase 0 ran `pnpm -s lint 2>&1 | tail -30; echo "exit=$?"`.
|
||||
It printed one ESLint error and then `exit=0`. The `0` belonged to `tail`, not to ESLint.
|
||||
|
||||
**Why it bit.** Anything piped through `tail`, `grep` or `head` reports the last command's
|
||||
status. A gate read that way can be red and look green. This is the same lie as
|
||||
`pnpm test` exiting 0 having run nothing, one layer further out.
|
||||
|
||||
**How to apply it.** When the exit code matters, redirect to a file and read `$?`
|
||||
before filtering: `cmd > log 2>&1; ec=$?; grep … log; echo "exit=$ec"`. You can also use
|
||||
`${PIPESTATUS[0]}` in bash. Never quote `exit=0` from the far end of a pipe.
|
||||
|
||||
## `setOffline` tests the harness, not the service worker *(imported from Ludus)*
|
||||
|
||||
**What happened.** In Ludus, `context.setOffline(true)` and `route().abort()` both
|
||||
failed the navigation before the service worker was consulted. So an "offline" test
|
||||
passed or failed for reasons that had nothing to do with the cache.
|
||||
|
||||
**Why it bit.** Both mechanisms act at the browser's network layer, which sits in
|
||||
front of service-worker dispatch.
|
||||
|
||||
**How to apply it.** Prove offline by **closing the server**: start it, wait for
|
||||
`navigator.serviceWorker.controller` and for the precache, call `server.close()`,
|
||||
then navigate. `e2e/offline.spec.ts` does this, and also fetches from Node to prove
|
||||
the server really is gone. Not re-measured in Rosea. Strike the "imported" mark once
|
||||
someone has.
|
||||
|
||||
## Put the bug back before you trust the test
|
||||
|
||||
**What happened.** Phase 0 put 13 bugs back one at a time: `clientsClaim: false`, no
|
||||
`navigateFallback`, manifest scope `/`, an inline script, a Google Fonts link, a
|
||||
`localStorage` write, a hard-coded heading, a UTC `localDay`, a disabled length cap
|
||||
(checked twice), a lost word boundary, a removed Domi rule, and both git hooks.
|
||||
Every one was caught. The results are recorded in
|
||||
`.agents/reviews/feature-phase0-workspace.md`.
|
||||
|
||||
**Why it bit.** It didn't, this time. But a guard that has only ever been seen not
|
||||
firing has not been tested. Without the run, a review can only say "I believe".
|
||||
|
||||
**How to apply it.** For every guard a branch adds, apply the inverse change, run the
|
||||
one suite that should catch it, record CAUGHT or MISSED, and restore the file with
|
||||
`git checkout`. Commit first, so the restore is exact.
|
||||
|
||||
## Fill an empty slot for one run, to test the state it will have later
|
||||
|
||||
**What happened.** The Letter's e2e test branches: no link while `docs/LETTER.md` is
|
||||
empty, and the page opens once it is written. Only the empty branch could run, because
|
||||
the author has not written the letter. One run with a temporary sample letter took the
|
||||
other branch. It found the stale-cache bug (`technical.md`), and then passed the
|
||||
written-letter page, axe included, in a real browser. The scaffold was restored
|
||||
afterwards.
|
||||
|
||||
**Why it bit.** A test written for a future state passes trivially until that state
|
||||
arrives. Then it fails for the first time on the author's machine, with the author's words.
|
||||
|
||||
**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.
|
||||
@@ -0,0 +1,97 @@
|
||||
# Review — `docs/roadmap-gameplay`
|
||||
|
||||
The author's `docs/ROADMAP.md` and `docs/GAMEPLAY.md`, added 2026-11-01, read against
|
||||
CLAUDE.md and what is on `main` (`12f5179`). Both documents are the author's: their
|
||||
words are kept as given (GAMEPLAY.md was pasted as plain text and only given Markdown
|
||||
headings and bullets). Where they disagree with each other or with the code, the
|
||||
question is written down here, not resolved by editing them.
|
||||
|
||||
No code changed, so the gates were not re-run.
|
||||
|
||||
## 1. Phase 0 is not done by the roadmap's definition
|
||||
|
||||
What was merged as "Phase 0" (`d11d242`) is the workspace and its contracts. The
|
||||
roadmap's Phase 0 is larger, and its **gate is not met**:
|
||||
|
||||
| Roadmap Phase 0 item | State |
|
||||
|:--|:--|
|
||||
| Repo, `.gitignore`, 5 MB hook, `CLAUDE.md`, this roadmap | Done (roadmap on this branch) |
|
||||
| Remotes | Gitea only; GitHub missing (G0.13) |
|
||||
| `ART.md` | Missing (G0.24) |
|
||||
| Schema contracts, validator with negative fixtures, `lint:copy` | Done (G0.2, G0.5, G0.6) |
|
||||
| **60 sentences**, sourced and verified public domain | **Missing**: 0 entries (G0.18). `verifiedBy` needs a person. |
|
||||
| `art/STYLE.md` drafted with the author, `art/manifest.json`, SVG placeholders, `tools/art-prep` end to end on one asset | **Missing** (G0.24) |
|
||||
| Slot for *A Letter from the Gardener* | Missing (G0.25) |
|
||||
| Decision: how the sunset invitation reaches the player on the web | **Decided** 2026-11-01: in-app only (Q6, G0.26) |
|
||||
|
||||
**Gate:** 60 sentences pass and every fixture fails (half met: the fixtures fail, but
|
||||
there are no sentences); one illustration through the full pipeline into `art/final/`
|
||||
(not started). The status docs now say *workspace merged, Phase 0 gate open* instead
|
||||
of *Phase 0 merged*.
|
||||
|
||||
## 2. Questions only the author can answer
|
||||
|
||||
Each one blocks the feature named in its row. None blocks the rest of Phase 0.
|
||||
|
||||
| # | Where | The conflict | Blocks |
|
||||
|:--|:--|:--|:--|
|
||||
| Q1 | GAMEPLAY §3 vs ROADMAP Phases 2–4, §5 | Berries come from *forgotten roses of other players*, so the fox's food needs other players. But the fox arrives in Phase 2, before friends (Phase 3). Cold start says Phases 1–2 must stand alone, and the Phase 4 gate says deleting `lucerna` leaves Phases 1–3 working. **Where does the fox's food come from with no friends and no Lucerna?** | Phase 2 fox |
|
||||
| Q2 | GAMEPLAY §1–2 vs ROADMAP §2, Phase 1 | *Short visits only hold her; real time brings full bloom*, plus *care hours* in the numbers. If "real time" means minutes on screen, bloom rewards staying in the app: the **dependence** risk, against *the best moments send the player away from the screen*. The roadmap says growth comes from **total days of care**. Proposed reading: calendar days with real care, where a long session is worth no more than a short one with the same care. Confirm. | Phase 1 growth |
|
||||
| Q3 | ROADMAP §1 vs GAMEPLAY §5 | Two lanterns. **Lucerna** (*lantern*) is the server, and the **lantern** is the device-to-device "I'd like to talk". A player, or a later agent, could take the lantern to go through Lucerna. Rename one, or write down that the lantern never touches Lucerna. | Naming; Phase 3–4 |
|
||||
| Q4 | GAMEPLAY §5 | Before a match, sentences carry *"sent through Amicitia"*. If the bytes go over Rosea's own sync, the label is untrue about where data went (Privacy: what was the player told). Either Amicitia carries them, or the wording changes, for example *a taste of Amicitia*. | The Amicitia bridge |
|
||||
| Q5 | GAMEPLAY §3 vs ROADMAP Phase 2 | *No extra creatures* vs visitors who leave mementos, rare visitors, and the sheep album. Is the rule about food and the fox's screen only? | Phase 2 collections |
|
||||
| Q6 | ROADMAP Phase 0 vs CLAUDE.md §8 | The notification decision is due in Phase 0 by the roadmap and in the Phase 1 feature doc by CLAUDE.md. Taken as Phase 0, since the roadmap is newer. An agent can write the options and their privacy cost; the author picks one. | G0.26 |
|
||||
| Q7 | GAMEPLAY §5 vs ROADMAP | The Amicitia bridge has no phase. It needs roads (Phase 3) and swapped keys (`packages/identity`). Phase 3, 5, or its own? | Planning |
|
||||
| Q8 | GAMEPLAY §1 | *Coming back on nearby days gives a little more.* This is not a streak, but a player back after a gap gets less than one back after a day. It is safe only if nobody ever sees what a gap cost them. Recorded for the Phase 1 Soul review; no answer needed now. | Phase 1 Soul review |
|
||||
|
||||
### Answers — the author, 2026-11-01
|
||||
|
||||
Written into `docs/GAMEPLAY.md`, `docs/ROADMAP.md` and CLAUDE.md, each marked
|
||||
*decided 2026-11-01* in the author's docs.
|
||||
|
||||
| # | Answer |
|
||||
|:--|:--|
|
||||
| Q1 | **Own bush first.** A wild bush beside the player's own rose ripens when the care helped. Friends' forgotten roses (Phase 3) and strangers' (Phase 4) add berries, never required. Phase 2 needs no other player and the Phase 4 gate holds. Farming limit: one harvest per bush per local day. |
|
||||
| Q2 | **Days of care.** Calendar days on which the care helped, never minutes on screen. The numbers panel shows *days of care* in place of *care hours* (an agent's reading of this answer; the author can reverse it). |
|
||||
| Q3 | **Keep both names.** The lantern travels device to device only and never passes through `lucerna`. Written in GAMEPLAY §5 and CLAUDE.md §1–2. |
|
||||
| Q4 | **"A taste of Amicitia"**, with the icon. |
|
||||
| Q5 | **The rule is removed.** GAMEPLAY §3 no longer says *no extra creatures*, so Phase 2's visitors stand. |
|
||||
| Q6 | **Phase 0, in-app only.** No push server on the web; local notifications come with the Tauri shell (Phase 6). Recorded in ROADMAP Phase 0 and CLAUDE.md §8. Closes G0.26. |
|
||||
| Q7 | **Phase 3.** Added to ROADMAP Phase 3 with the friends' berries. |
|
||||
| Q8 | No answer needed: a rule for the Phase 1 Soul review. |
|
||||
|
||||
## 3. Notes that need no answer
|
||||
|
||||
- **"treat."** GAMEPLAY §3 calls rose hips *the rare top treat*. That is fine in a
|
||||
design doc. In player copy `treat` is banned (D6), so the in-game words are
|
||||
different. `lint:copy` catches it.
|
||||
- **The planets.** *King*, *lamplighter*, *geographer* and similar are ordinary words
|
||||
and are not on the forbidden list, which is right: §7 allows the echo but never the
|
||||
name or text. *The Geographer's book* and the *sheep album* are the closest echoes.
|
||||
Each planet's feature doc gets a copyright line in its review.
|
||||
- **The drunkard's planet** is a Soul risk for a player who drinks. It goes into that
|
||||
planet's feature doc.
|
||||
- **Sunset from a time zone.** A zone is not a place, and sunset needs coordinates.
|
||||
Fallback: the zone's reference location from the tz database (`zone1970.tab`),
|
||||
bundled offline. This goes into the Phase 1 sun feature doc. It never asks for GPS
|
||||
and never makes a network call.
|
||||
- **Bubble copy** has the same rules as the hope library (GAMEPLAY §4). `lint:copy`
|
||||
already scans `packages/ui/src/copy/`. Whether bubbles also get ids and a validator
|
||||
is decided in Phase 1.
|
||||
|
||||
## 4. What already agrees
|
||||
|
||||
- The care acts *water, shade, weeds, petals* match the `care` schema's `act` enum (D5).
|
||||
- *Berries, never treats*, as in D6.
|
||||
- Book and Tolkien names are already forbidden in copy (`forbidden.ts`), and
|
||||
*Rosea Domi* / *Amicitia Domi* pass the Domi-alone rule.
|
||||
- CLAUDE.md §8 already names the **berry farming** trap (one harvest per forgotten
|
||||
rose per local day) and the **lantern as rejection** trap (one-sided lanterns are
|
||||
invisible).
|
||||
- "Never GPS" matches CLAUDE.md §4.
|
||||
|
||||
## What was NOT done
|
||||
|
||||
- The author's text was not changed, including where §2 shows a conflict.
|
||||
- No game code was written. GAMEPLAY.md now exists, but Phase 1 starts only after
|
||||
the Phase 0 gate (ROADMAP §4: *failing it means the next phase does not start*).
|
||||
@@ -0,0 +1,73 @@
|
||||
# Review — `feature/art-board`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis:
|
||||
[`features/art-pipeline.md`](../features/art-pipeline.md). Reviewed 2026-11-01 on Node 22.11.0,
|
||||
Windows 10. There is no PR: the only remote is Gitea, and this session cannot open one there.
|
||||
|
||||
## Gates — counts, not exit codes
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint` | exit 0 |
|
||||
| `pnpm typecheck` | exit 0, now including `@rosea/art-prep`; `svelte-check` 0 errors, 0 warnings |
|
||||
| `pnpm test` | **180 passed**: schema 15, content 47, **art-prep 50 (new)**, engine 52, ui 16 |
|
||||
| `pnpm lint:copy` | 12 files, 0 problems (the board and prompts are not player copy; A3 covers prompts) |
|
||||
| `pnpm validate:library` | 0 entries; 13 of 13 fixtures rejected |
|
||||
| `pnpm test:e2e` | 7 passed |
|
||||
| `pnpm test:offline` | 1 passed |
|
||||
| `pnpm art:board` | 11 cards, 25 pictures, 29 stand-ins |
|
||||
|
||||
**The app is unchanged** (§5.4). No app file changed, so the bundle is the same; e2e and offline
|
||||
ran to show that. **The board is published**, as a private claude.ai artifact (version 1).
|
||||
Its `art` collection was read back once and is empty, as it should be.
|
||||
|
||||
**The board, rendered once** from `tools/art-prep/dist/board/` on 127.0.0.1:
|
||||
*Rosea Domi Art Board*, 11 cards, 18 cell slots, groups *Character sheet · 1*,
|
||||
*Sprite sheets · 4*, *Garden layers · 4*, *Single pictures · 1*, *App icon · 1*. No stand-in
|
||||
failed to load and nothing overflowed sideways. Served locally, the page has no claude.ai
|
||||
runtime, so it showed its read-only state. Upload and Accept were **not** exercised (see
|
||||
*not verified*).
|
||||
|
||||
## Test honesty — bugs put back
|
||||
|
||||
| Bug put back | Result |
|
||||
|:--|:--|
|
||||
| The forbidden-word check skipped for asset texts | CAUGHT: 3 failed (book name, medical word, forbidden name never reaches the board) |
|
||||
| The shared avoid list dropped from single-picture prompts | CAUGHT: *every one carries the shared avoid list* |
|
||||
| `art:accept` stops refusing a sheet with an empty cell | CAUGHT: *refuses the whole sheet when a cell is empty* |
|
||||
| The board page loses its *Garden layers* group | CAUGHT: *every kind in the manifest has a group on the board page* |
|
||||
| A committed stand-in drifts from the generator | CAUGHT: *art/placeholders/ holds exactly what the generator makes* |
|
||||
| `fit: cover` with `withoutEnlargement` (the first draft) | CAUGHT, as the real finding 1 |
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | **Correctness** | `art:accept` resized full pictures with `cover` + `withoutEnlargement`. A small, wrongly shaped picture skipped the crop too: a 900 × 600 picture accepted as the square app icon stayed 900 × 600. | **Fixed**: crop to shape first (`middle()`), then only shrink. Test asserts 600 × 600. Lesson: `art.md`. |
|
||||
| 2 | **Copyright** | The manifest's own text said the waiting rose is *patient*, a forbidden word, and nothing would have caught a book name in a prompt either, because `lint:copy` does not read prompts. | **Fixed by design**: `checkManifest` runs `findForbidden` over every prompt word, and `art:board` refused its own first draft. Lesson: `art.md`. |
|
||||
| 3 | **Copyright** | No automatic likeness check: a generated picture that looks like the book's drawings is caught only by Claude's review and Mark's eye. | **Accepted for Phase 0**, written down in docs/ART.md §5. The prompts' shared avoid list (A4) lowers the odds, and review point 3 names it. |
|
||||
| 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. | **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). |
|
||||
| 11 | Test honesty | `cli-board.ts` and `cli-accept.ts` (file writing, argument parsing) have no tests. `art:board` was run, and `art:accept` was not run on a real file. | **Accepted**: the logic under them is tested. `art:accept` runs for real with the first accepted picture, the Phase 0 gate. |
|
||||
|
||||
Looked for and found none:
|
||||
|
||||
- **Reachability.** No player is involved.
|
||||
- **Correctness cases from §5.3.** Clock, DST, two tabs and partial writes do not apply to the
|
||||
tool. On the board, a second tab is handled by the store's live snapshot, as in Panda Domi's.
|
||||
|
||||
## What was NOT verified
|
||||
|
||||
- **Uploading, pasting and accepting on the published board.** These need Mark signed in. The
|
||||
page code is Panda Domi's, which works there, adapted only in tokens, groups, wording and the
|
||||
review line.
|
||||
- **Any real generated picture.** Every `art:accept` test uses synthetic pictures made with sharp.
|
||||
- **The style itself.** Whether the gouache direction reads as Rosea and not as the book can only be
|
||||
judged on real pictures.
|
||||
- **Dark mode and phone width of the published board** were not looked at. The local check was one
|
||||
desktop render.
|
||||
@@ -0,0 +1,74 @@
|
||||
# Review — `feature/letter-slot`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis:
|
||||
[`features/letter-slot.md`](../features/letter-slot.md). Reviewed 2026-11-01 on
|
||||
Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea, and this session
|
||||
cannot open one there.
|
||||
|
||||
## Gates — counts, not exit codes
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint` | exit 0 |
|
||||
| `pnpm typecheck` | exit 0; `svelte-check` 0 errors **0 warnings** in ui and app (a bare `href="#"` warning was fixed) |
|
||||
| `pnpm test` | **130 passed**: schema 15, content 47, engine 52, ui 16 (was 3) |
|
||||
| `pnpm lint:copy` | **12 files** checked (was 9: `parse.ts`, `Letter.svelte`, `docs/LETTER.md`), 0 problems |
|
||||
| `pnpm validate:library` | 0 entries; 13 of 13 fixtures rejected |
|
||||
| `pnpm test:e2e` | **7 passed** (was 6), on the scaffold letter |
|
||||
| `pnpm test:offline` | **1 passed** |
|
||||
|
||||
**Built, not deployed** (§5.4): there is no host. The change is **deliberately
|
||||
invisible**: with the scaffold letter, the built page looks exactly as before. The
|
||||
bundle is 8 precache entries, 42.74 KiB.
|
||||
|
||||
**The written-letter branch, run once.** `docs/LETTER.md` was given a temporary sample
|
||||
letter (headings, a paragraph across lines, *emphasis*, an `https:` and a `tel:` link).
|
||||
e2e: 7 passed, including the page opening from the link, axe with no violations, and
|
||||
*Back*. Offline: 1 passed. The scaffold was then restored and both suites ran again
|
||||
green. That run found finding 1.
|
||||
|
||||
## Test honesty — bugs put back
|
||||
|
||||
| Bug put back | Suite | Result |
|
||||
|:--|:--|:--|
|
||||
| `ALLOWED_HREF = /.*/` (any link scheme) | ui unit | CAUGHT: 2 failed |
|
||||
| The letter link shown while the letter is empty | ui unit | CAUGHT: 2 failed |
|
||||
| same | e2e | CAUGHT: `toHaveCount(0)` failed |
|
||||
| The focus effect reads `heading` only after `if (moved)` | ui unit | CAUGHT: focus stayed on `<body>`. This was the first draft's real bug (finding 2). |
|
||||
| *heal* in the body of `docs/LETTER.md` | `lint:copy` | CAUGHT: `docs/LETTER.md:36 'heal' (medical)` |
|
||||
| `docs/LETTER.md` missing from turbo's cache key | e2e, written letter | CAUGHT, as the real finding 1 |
|
||||
|
||||
Not caught by any test: removing `docs/LETTER.md` from `lint:copy`'s file list. Only
|
||||
the quoted file count (12) would show it. See finding 6.
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | **Correctness** | Turbo hashed only the app package, so after the letter changed, `test:e2e` printed `cache hit` and tested the **old bundle**. A deploy from a warm cache would ship the old letter. | **Fixed**: `docs/LETTER.md` is in `globalDependencies` (L8). Shown as `cache miss` after the change. Lesson: `technical.md`. |
|
||||
| 2 | Correctness | The first focus effect returned before reading `heading`, so it never re-ran and focus never moved. | **Fixed** before review, caught by the Shell test. Lesson: `code.md`. |
|
||||
| 3 | **Offline** | The letter opens offline, because it is bundled. A support line given as an `https:` link does **not** work offline, but a `tel:` link does. | **Deferred** to G0.27, with the advice that each support line has a phone number. |
|
||||
| 4 | **Privacy** | An `https:` link in the letter takes the player to another site. Nothing leaves without their tap, the referrer is stripped (`no-referrer` on the page and `noreferrer` on the link), and it opens in a new tab. Which sites the letter links to is the author's choice. | **Accepted.** |
|
||||
| 5 | Correctness | The parser has blind spots. A numbered list (`1. …`) without blank lines collapses into one paragraph, and `snake_case_word` makes *case* italic. | **Accepted.** The scaffold says which Markdown works, and anything else shows as text, never as markup. |
|
||||
| 6 | Test honesty | No test proves `lint:copy` reads `docs/LETTER.md`. It was shown by the *heal* mutation, but deleting the path from `FILES` would pass silently. | **Accepted for now**: the review quotes the file count. Revisit if `lint:copy` grows a file list worth testing. |
|
||||
| 7 | Correctness | *Back* leaves `#garden` in the address bar. A bookmark at `#garden` or any unknown hash opens the garden. | **Accepted**: harmless, and any hash but `#letter` is home by design. |
|
||||
| 8 | **Soul** | Once the letter exists, the home view offers one link, *A Letter from the Gardener*. Looked for guilt, comparison, rejection and dependence: the page asks nothing, counts nothing, and is never required (GAMEPLAY §4). Found none. | — |
|
||||
| 9 | Copyright | The scaffold's comments mention "the book". They are stripped before the page and skipped by `lint:copy`. Whether the letter's own words may name the book is **Q9**, for the author. | **Open**, Q9. |
|
||||
|
||||
Looked for and found none:
|
||||
|
||||
- **Reachability.** The letter is one-way, from the author to every player. There is
|
||||
no input.
|
||||
- **Injection.** No `{@html}` anywhere. Raw HTML and `<script>` stay text (tests), and
|
||||
only `https:` and `tel:` become links (tests, plus a mutation). Svelte escapes
|
||||
attribute values.
|
||||
- **Correctness cases from §5.3.** Clock, DST, partial write and two tabs do not apply:
|
||||
there is no state. A tab closed on `#letter` reopens on the letter (test: *opens
|
||||
straight at #letter*).
|
||||
|
||||
## What was NOT verified
|
||||
|
||||
- **A screen reader.** axe passes on both views, and the focus move is unit-tested.
|
||||
Nobody has listened to it.
|
||||
- **Firefox, WebKit and a phone.** Desktop Chromium only.
|
||||
- **The author's real letter.** Only a sample has rendered.
|
||||
@@ -0,0 +1,103 @@
|
||||
# Review — `feature/phase0-workspace`
|
||||
|
||||
Adversarial self-review (CLAUDE.md §5.3). Analysis:
|
||||
[`features/phase0-workspace.md`](../features/phase0-workspace.md).
|
||||
Reviewed 2026-11-01 on Node 22.11.0, pnpm 9.12.3, Windows 10.
|
||||
|
||||
There is no PR. The only remote is Gitea, and this session has no API access to open
|
||||
one there. The branch is pushed for the author to merge.
|
||||
|
||||
## Gates — counts, not exit codes
|
||||
|
||||
Each exit code was read directly (`cmd > log; ec=$?`), never through a pipe
|
||||
(`lessons/testing.md`).
|
||||
|
||||
| Gate | Result |
|
||||
|:--|:--|
|
||||
| `pnpm lint` | exit 0 |
|
||||
| `pnpm typecheck` | exit 0; 10 turbo tasks, `svelte-check` 0 errors 0 warnings in ui and app, plus root `tsc` over `e2e/` and `scripts/` |
|
||||
| `pnpm test` | **117 passed**: schema 15, content 47, engine 52, ui 3 |
|
||||
| `pnpm lint:copy` | 9 files checked, 0 problems |
|
||||
| `pnpm validate:library` | 0 entries (empty by design, D4); **13 of 13 fixtures rejected** with their named rule |
|
||||
| `pnpm test:e2e` | **6 passed**, against the built bundle under `/Rosea/` |
|
||||
| `pnpm test:offline` | **1 passed**: reload, cold start and a deep link render after the server is closed |
|
||||
|
||||
The bundle was **built** (`apps/rosea/dist`) but **not deployed** (§5.4): there is no
|
||||
host yet (G0.13). No player can see this change.
|
||||
|
||||
## Test honesty — every guard was made to fail
|
||||
|
||||
Each bug was reintroduced one at a time, the one suite that should catch it was run,
|
||||
and the file was restored with `git checkout` after the commit `49c8def`.
|
||||
|
||||
| Bug put back | Suite | Result |
|
||||
|:--|:--|:--|
|
||||
| `clientsClaim: false` (first visit never controlled) | offline | CAUGHT: controller wait timed out |
|
||||
| `navigateFallback: null` | offline | CAUGHT: deep link `ERR_CONNECTION_REFUSED` |
|
||||
| manifest `scope: '/'` | e2e | CAUGHT: scope ≠ `/Rosea/` |
|
||||
| inline `<script>` in `index.html` | e2e | CAUGHT: inline script list not empty |
|
||||
| a Google Fonts `<link>` | e2e | CAUGHT: other-origin request recorded |
|
||||
| `localStorage.setItem` on load | e2e | CAUGHT |
|
||||
| `<h1>Rosea</h1>` instead of the constant | e2e | CAUGHT |
|
||||
| `localDay` returns the UTC day | engine unit | CAUGHT: 11 failed |
|
||||
| length cap never fires | `validate:library` | CAUGHT: `too-long.json` passed, run failed |
|
||||
| length cap never fires | content unit | CAUGHT |
|
||||
| forbidden match loses its trailing word boundary | content unit | CAUGHT: *treaty*, *healthy*, *patiently* flagged |
|
||||
| Domi-alone rule removed | content unit | CAUGHT |
|
||||
| 5.7 MB file staged / `Co-Authored-By: Claude` trailer | hooks, run directly | BLOCKED both; clean input passed both |
|
||||
|
||||
Not mutated: each of the 16 engine-purity bans separately. `purity-lint.test.ts`
|
||||
already lints one impure snippet per ban and asserts it is reported, which is the
|
||||
same check from the other side.
|
||||
|
||||
## Findings
|
||||
|
||||
| # | Area | Finding | Resolution |
|
||||
|:--|:--|:--|:--|
|
||||
| 1 | **Privacy** | The trace schema allowed `geocell` up to 16 characters. A 16-character geohash is centimetres: a house, not a district. | **Fixed** in this branch: capped at 6 (~1.2 × 0.6 km), with a test that 7 and 12 characters are rejected. D12. |
|
||||
| 2 | Correctness | Terms with a hyphen and a space matched the same word twice, so `lint:copy` reported one word twice. Fixing that showed `Middle earth` was redundant with `Middle-earth`. | **Fixed**: one hit per index, and the redundant entry removed. Test added. |
|
||||
| 3 | Correctness | The CSP meta is injected before `<meta charset>`, which must stay within 1024 bytes. Measured at byte 404 in this build. | **Fixed** with a guard: an e2e assertion on the byte offset. The order is kept, because the CSP must precede every script. |
|
||||
| 4 | Correctness | `ROSEA_BASE`'s default `/Rosea/` is written twice, in `vite.config.ts` and `e2e/static-server.ts`. | **Accepted.** If they disagree, every asset 404s and every e2e test fails at once, so drift cannot be silent. |
|
||||
| 5 | Architecture | `vite.config.ts` reaches into `packages/schema/src/constants.ts` by relative path. | **Accepted**, D10. The module is pure and import-free, and the alternative printed a load failure inside a green run. |
|
||||
| 6 | Correctness | `validator.ts` maps Ajv's English error text to the `no-source` / `no-tradition` rules by regex. An Ajv upgrade that rewords them would turn those rules into `schema`. | **Accepted.** The fixtures would fail loudly: `no-source.json` expects `no-source`. Dependencies are pinned (D11). |
|
||||
| 7 | Correctness | `stripComments` treats `//` inside a string as a comment, so `"a // therapy"` would be missed by `lint:copy`. | **Deferred.** A real tokenizer is not worth it while copy is one line. Revisit when `copy/` grows. |
|
||||
| 8 | Privacy | Source maps are built (`sourcemap: true`) and would be published with the site. They are not precached. | **Deferred** to G0.23: depends on whether the repository is public. |
|
||||
| 9 | Technical | `engine-strict` is off and Node 22.11 is below what `eslint-visitor-keys@5` declares. A package could use an API this Node lacks. | **Accepted for now**: every gate ran green on 22.11. Upgrade Node, G0.20. |
|
||||
| 10 | Soul | The shell says *The garden is being prepared.* A first-time visitor finds nothing to do and might feel turned away, or feel asked to come back. | **Accepted.** The line asks nothing and promises no date, and the build is not deployed (D8), so no player sees it. It is replaced by the first real screen. |
|
||||
|
||||
Looked for and found none:
|
||||
|
||||
- **Soul.** No guilt, comparison, rejection or dependence. There is no mechanic, no
|
||||
count, no notification and no streak.
|
||||
- **Reachability.** There is no network feature. The care-event schema refuses free
|
||||
text in `messageId` (a test), and refuses any extra field, so nothing can ride along.
|
||||
- **Offline.** The whole shell works with the server closed (offline suite).
|
||||
- **Privacy.** Every request goes to the serving origin (e2e records all of them).
|
||||
There are no cookies and no Web Storage (e2e), and the CSP is `'self'` only. The
|
||||
only bytes that leave the device are the requests for the app's own files.
|
||||
|
||||
Correctness cases from §5.3: second run, clock change, DST, partial write, tab closed
|
||||
mid-action and two tabs do not apply to a shell with no state. DST is covered for
|
||||
`localDay`, on both 2026 Prague transition days. The rest return with
|
||||
`packages/storage`.
|
||||
|
||||
## What was NOT verified
|
||||
|
||||
- **Real GitHub Pages.** The sub-path is tested against a local server only.
|
||||
- **A phone.** No install, no airplane mode, no iOS Safari. The suites use desktop
|
||||
Chromium only.
|
||||
- **Firefox and WebKit.** Not run.
|
||||
- **Screen reader.** axe passes. No one has listened to the page.
|
||||
- **A fresh clone.** `pnpm install --frozen-lockfile` passed on the merged `main`
|
||||
(`d11d242`), but in the existing checkout, not a new one.
|
||||
|
||||
## After merge
|
||||
|
||||
Merged with `--no-ff` as `d11d242` and pushed. Local `HEAD`, `origin/main` and
|
||||
`git ls-remote origin main` print one hash. Every gate ran again on the merged tree,
|
||||
with the same counts as above: 117 unit, 6 e2e, 1 offline, 13 of 13 fixtures.
|
||||
There is no GitHub remote yet, so no mirror to check (§5.2, G0.13).
|
||||
- **The setOffline lesson** is imported from Ludus and was not re-measured here.
|
||||
- **The rename-in-one-commit property.** Nobody has tried renaming. The name lives
|
||||
in `constants.ts` and `index.html`, the manifest is built from the constants, and
|
||||
the `@rosea/*` scope and database name are as listed in CLAUDE.md.
|
||||
@@ -0,0 +1,8 @@
|
||||
# This machine has core.autocrlf=true. Without this, every text file is
|
||||
# rewritten with CRLF on checkout and diffs fill with line-ending noise.
|
||||
* text=auto eol=lf
|
||||
|
||||
*.webp binary
|
||||
*.avif binary
|
||||
*.png binary
|
||||
*.ico binary
|
||||
@@ -28,3 +28,6 @@ art/exports/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
*.log
|
||||
|
||||
# Generated from JSON Schema by packages/schema build
|
||||
packages/schema/src/generated/
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# As in Ludus. `engine-strict` is deliberately OFF: it fails the install on any
|
||||
# transitive package's declared Node range, and eslint-visitor-keys@5 declares
|
||||
# ^22.13 while running fine on 22.11 (this machine, and Ludus's).
|
||||
auto-install-peers=true
|
||||
strict-peer-dependencies=false
|
||||
@@ -52,12 +52,14 @@ encouraging, never ruling), never a name or a quote.
|
||||
her. Care has a touch of skill: water by feel (too much is as bad as too little), shade her from wind,
|
||||
pull weeds, gather fallen petals. She grows from the **total** time of care, never from a streak.
|
||||
Neglect makes her **drift** — turn away, close a little — never break. Short visits hold her; real
|
||||
time brings full bloom. One tap shows her real numbers (water, warmth, care hours, trend).
|
||||
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).
|
||||
- **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,
|
||||
brush) and food. The rose tells you what he wants today. His food is **berries**, gathered by tending
|
||||
other players' forgotten roses (one harvest per forgotten rose per day, only when the care helped).
|
||||
brush) and food. The rose tells you what he wants today. His food is **berries**: first from the wild bush
|
||||
beside the player's own rose, later also from tending other players' forgotten roses — an addition,
|
||||
never a requirement (one harvest per bush per day, only when the care helped).
|
||||
Your own rose's growth sets berry quality: wild strawberries → blueberries → raspberries →
|
||||
blackberries → rose hips. After the taming he leads the player to real people.
|
||||
- **Teaching in play** — the rose and the fox explain and remind in speech bubbles, with text from the
|
||||
@@ -68,7 +70,8 @@ encouraging, never ruling), never a name or a quote.
|
||||
footprints, then a trail, then a road.
|
||||
- **The bridge to Amicitia** (promoted openly) — once a path is a road, either player may light a
|
||||
**lantern**. A one-sided lantern is invisible; when both are lit, the game says so and the two apps
|
||||
swap anonymous keys device to device. Players are known only by their rose's name. Free conversation
|
||||
swap anonymous keys device to device. The lantern never passes through `lucerna`. Before a match,
|
||||
sentences carry the Amicitia icon and *a taste of Amicitia* — never "sent through Amicitia". Players are known only by their rose's name. Free conversation
|
||||
happens only in Amicitia, never in Rosea. Rosea has no doors: paths only grow, a lit lantern stays lit.
|
||||
- **The shared sky** — every act of care toward someone else adds light to one night sky that all
|
||||
players share. The sky is the **real** sky: real constellations. Every day at local sunset a wave of
|
||||
@@ -110,7 +113,11 @@ feed of anything.
|
||||
|
||||
---
|
||||
|
||||
## 2. Repository layout (proposed — confirmed when Phase 0 scaffolds it)
|
||||
## 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
|
||||
empty package has a test suite that runs nothing ([`phase0-workspace.md`](.agents/features/phase0-workspace.md) D1).
|
||||
|
||||
```
|
||||
pnpm-workspace.yaml
|
||||
@@ -147,7 +154,9 @@ art/
|
||||
final/ # approved, optimised illustrations (WebP/AVIF)
|
||||
|
||||
tools/
|
||||
art-prep/ # the art preparation page (docs/ART.md §3). Local only, 127.0.0.1.
|
||||
art-prep/ # prompts, stand-ins and the art board's files from art/manifest.json;
|
||||
# the accept step into art/final/ (docs/ART.md). The board itself is a
|
||||
# private claude.ai page (decided 2026-11-01, docs/ART.md §3).
|
||||
|
||||
content/
|
||||
library/ # hope sentences, one file per source tradition
|
||||
@@ -157,7 +166,8 @@ content/
|
||||
docs/ # ROADMAP.md, ART.md, numbered milestone feature docs
|
||||
```
|
||||
|
||||
`lucerna` — *lantern*: it only ever shows that someone was there.
|
||||
`lucerna` — *lantern*: it only ever shows that someone was there. The lantern gesture (§1) shares the
|
||||
name and never passes through it.
|
||||
|
||||
**Dependency direction (never violate):**
|
||||
|
||||
@@ -168,7 +178,7 @@ apps/rosea ──► packages/ui ──► packages/engine ──► packages/sc
|
||||
├───────► packages/sync ──► packages/schema
|
||||
└───────► packages/identity ──► packages/schema
|
||||
services/lucerna ──► packages/schema (trace shape only, via generated JSON Schema)
|
||||
tools/art-prep ──► art/manifest.json (never imported by the app)
|
||||
tools/art-prep ──► art/manifest.json, packages/content, packages/schema (never imported by the app)
|
||||
```
|
||||
|
||||
- `packages/engine` is pure. Time and randomness are parameters. This is what makes growth, taming and
|
||||
@@ -192,27 +202,33 @@ Web first is the decision: the game must run from a link, on any phone, with no
|
||||
|
||||
---
|
||||
|
||||
## 3. Commands (proposed until Phase 0 scaffolds them)
|
||||
## 3. Commands
|
||||
|
||||
```bash
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm --filter @rosea/schema build # schema first, always
|
||||
pnpm install --frozen-lockfile # also installs the git hooks (§5.2)
|
||||
pnpm --filter @rosea/schema build # schema first, always (generates the contract types)
|
||||
|
||||
pnpm --filter @rosea/app dev # 127.0.0.1:5173 — never --host (§5.7)
|
||||
pnpm build # turbo: schema -> engine -> content -> ui -> app
|
||||
pnpm build # turbo: schema -> engine/content/ui -> app
|
||||
|
||||
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 and sun golden tests
|
||||
pnpm test:e2e # Playwright against the BUILT app
|
||||
pnpm test:offline # Playwright, network cut after first load
|
||||
pnpm --filter @rosea/engine test # incl. fast-check property tests (sun golden tests: later)
|
||||
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 lint:copy # forbidden words and names (§5.6)
|
||||
pnpm art:board # prompts + stand-ins -> tools/art-prep/dist/board/ (docs/ART.md)
|
||||
pnpm art:accept <id> <file> # an accepted picture -> art/final/*.webp, sheets cut
|
||||
|
||||
pnpm art:prep # opens tools/art-prep on 127.0.0.1
|
||||
|
||||
# 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.
|
||||
|
||||
> **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
|
||||
> package, or do not claim green.**
|
||||
@@ -354,7 +370,7 @@ happened twice.)*
|
||||
- **The engine gets property tests.** `fast-check`: growth is monotonic in total care and never
|
||||
decreases; fox distance never jumps more than one step per day; replaying the same log twice gives
|
||||
byte-identical `derived` state; a missed sunset never changes the rose's stage; an unopened
|
||||
sentence is never lost; at most one harvest per forgotten rose per local day, and none when the care
|
||||
sentence is never lost; at most one harvest per bush per local day, and none when the care
|
||||
did not help; drift never lowers the stage earned.
|
||||
- **Sun maths gets golden tests** against published sunrise/sunset tables for a spread of cities:
|
||||
Prague, Reykjavík, Tromsø (polar day and polar night), Quito, Sydney, Anchorage — including both DST
|
||||
@@ -421,9 +437,11 @@ player can send another player, and the sender picks one.
|
||||
|
||||
```jsonc
|
||||
{ "kind": "care", "ts": 1761500000000, "localDay": "2026-10-24",
|
||||
"from": "<pubkey>", "to": "<pubkey>", "act": "water" | "shade" | "wind" | "light",
|
||||
"from": "<pubkey>", "to": "<pubkey>", "act": "water" | "shade" | "weed" | "petals",
|
||||
"trace": "petal:<colour>", "messageId": "ps-23-4" | null, "clientVersion": "0.1.0" }
|
||||
// act: "water" | "shade" | "weed" | "petals" (own rose or another player's)
|
||||
// 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),
|
||||
// "harvest" (berry kind), "thanks", "lantern" (lit — never unlit)
|
||||
```
|
||||
@@ -452,7 +470,8 @@ No timestamp finer than a day, no precise location, no free text, no link to the
|
||||
- **Svelte 5 runes, no state library.** A component that decides growth, taming or anything in the sky
|
||||
is a layering violation and a review **blocker**.
|
||||
- **Three taps to action, one preferred.** From a cold open, tending the rose is one tap.
|
||||
- **Every string a player reads lives in `packages/ui/src/copy/`**, and passes `lint:copy`. The
|
||||
- **Every string a player reads lives in `packages/ui/src/copy/`**, and passes `lint:copy` — except
|
||||
the Letter, which is the author's Markdown in `docs/LETTER.md` and passes `lint:copy` too. The
|
||||
interface language is plain English (Czech later). Latin is for the brand only.
|
||||
- **Silence is a feature.** Sunset, the thanks visit and the end of a planet have moments with no
|
||||
buttons at all. Do not fill them.
|
||||
@@ -468,14 +487,14 @@ 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. Decide this in the Phase 1 feature doc: in-app sunset only for the web build, and local notifications through the Tauri shell later — or a push design whose privacy cost is written down. |
|
||||
| **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. |
|
||||
| **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. |
|
||||
| **Drift that reads as blame** | A rose turned away can feel like an accusation. Drift is shown as waiting, never as hurt caused; she brightens on the first touch, and no copy ever says *you forgot*. |
|
||||
| **Berry farming** | Tending forgotten roses for food invites mindless tapping. One harvest per forgotten rose per local day, only when the care actually helped — enforced in `engine/forage`, property-tested. |
|
||||
| **Berry farming** | Tending roses for food invites mindless tapping. One harvest per bush per local day — the player's own and each forgotten rose's — only when the care actually helped, enforced in `engine/forage`, property-tested. |
|
||||
| **A lantern as rejection** | A lit lantern that is visibly unanswered is the rejection this game exists to avoid. One-sided lanterns are invisible to the other player, always. |
|
||||
| **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. |
|
||||
@@ -498,7 +517,7 @@ No timestamp finer than a day, no precise location, no free text, no link to the
|
||||
|:--|:--|
|
||||
| Understand why something behaves strangely | `.agents/lessons/` — `soul.md` first |
|
||||
| Know what is planned and which gate we are at | `docs/ROADMAP.md` |
|
||||
| Make or replace an illustration | `docs/ART.md`, then `pnpm art:prep` |
|
||||
| Make or replace an illustration | `docs/ART.md`, then `art/manifest.json` and `pnpm art:board` |
|
||||
| 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 |
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
# Handover
|
||||
|
||||
Rewritten at the end of each session (CLAUDE.md §5.1).
|
||||
|
||||
## Last session — 2026-10-31 to 2026-11-01
|
||||
|
||||
**Done.**
|
||||
|
||||
- **Repository:** the git repo exists, and `origin` is Gitea (`mnovak/Rosea`).
|
||||
`main` holds `CLAUDE.md` and `.gitignore` (`1e4c5a0`).
|
||||
- **Phase 0 workspace:** merged to `main` with `--no-ff` (`d11d242`) and pushed. Local and
|
||||
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.
|
||||
- **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
|
||||
code: [`.agents/reviews/docs-roadmap-gameplay.md`](.agents/reviews/docs-roadmap-gameplay.md).
|
||||
The author answered Q1–Q7, and the answers are written into both docs and CLAUDE.md.
|
||||
Merged to `main`.
|
||||
- **The Letter slot:** merged to `main`. `docs/LETTER.md`
|
||||
holds slots as comments only. Once the author writes in it, a link to the letter
|
||||
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 approved by the author (2026-11-01, S1–S5 kept as drafted). [`art/manifest.json`](art/manifest.json)
|
||||
lists 25 Phase 1 pictures, with 29 stand-ins in `art/placeholders/`. `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).
|
||||
|
||||
**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).
|
||||
The notification decision is made: in-app only on the web (G0.26).
|
||||
|
||||
**Waiting on the author.**
|
||||
|
||||
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:** the style is approved. Make `rose-sheet` on the board and accept it. 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).
|
||||
|
||||
**How this machine works** (not in the code):
|
||||
|
||||
- **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
|
||||
probe other helpers: `lessons/process.md`.
|
||||
- **Hooks:** `pnpm install` installs them. They block files over 5 MB and AI
|
||||
attribution trailers.
|
||||
|
||||
**Read first next time:** [`.agents/GAP_ANALYSIS.md`](.agents/GAP_ANALYSIS.md), then
|
||||
[`.agents/lessons/`](.agents/lessons/README.md).
|
||||
@@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<!-- One of the three places the product name lives (CLAUDE.md preamble). -->
|
||||
<title>Rosea Domi</title>
|
||||
<link rel="icon" href="./icon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="./icon.svg" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="./src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@rosea/app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "The PWA. Renders what the engine returns; contains no growth, taming or sky logic.",
|
||||
"scripts": {
|
||||
"dev": "vite --host 127.0.0.1 --port 5173 --strictPort",
|
||||
"build": "vite build",
|
||||
"typecheck": "svelte-check --threshold error --output human"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rosea/schema": "workspace:*",
|
||||
"@rosea/ui": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "5.1.1",
|
||||
"svelte": "5.56.9",
|
||||
"svelte-check": "4.7.6",
|
||||
"typescript": "5.9.3",
|
||||
"vite": "6.4.3",
|
||||
"vite-plugin-pwa": "1.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<!-- Placeholder icon (CLAUDE.md §2 art/placeholders): form only, not art. Replaced through docs/ART.md. -->
|
||||
<rect width="512" height="512" rx="96" fill="#fbf6f1"/>
|
||||
<circle cx="256" cy="232" r="120" fill="#b4485e"/>
|
||||
<circle cx="256" cy="232" r="64" fill="#d97a8c"/>
|
||||
<rect x="246" y="340" width="20" height="112" rx="10" fill="#5f7a52"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 418 B |
@@ -0,0 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Shell } from '@rosea/ui';
|
||||
// Bundled at build time, so the letter is precached and opens offline (letter-slot.md L1).
|
||||
import letter from '../../../docs/LETTER.md?raw';
|
||||
</script>
|
||||
|
||||
<Shell {letter} />
|
||||
@@ -0,0 +1,8 @@
|
||||
import '@rosea/ui/tokens.css';
|
||||
import { mount } from 'svelte';
|
||||
import App from './App.svelte';
|
||||
|
||||
const target = document.getElementById('app');
|
||||
if (target === null) throw new Error('index.html has no #app element');
|
||||
|
||||
mount(App, { target });
|
||||
@@ -0,0 +1,2 @@
|
||||
/// <reference types="svelte" />
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1 @@
|
||||
export default {};
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"types": ["node", "svelte", "vite/client"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.svelte", "vite.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
||||
import { defineConfig, type Plugin } from 'vite';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
// A relative path, not '@rosea/schema', on purpose. Vite bundles a config's
|
||||
// relative imports but externalises anything under node_modules, and Node cannot
|
||||
// load a workspace package's .ts source, so `vite build` and `svelte-check` both
|
||||
// failed to load this file. The constants module is pure and dependency-free.
|
||||
import { PRODUCT_NAME, PRODUCT_SHORT_NAME } from '../../packages/schema/src/constants.js';
|
||||
|
||||
/**
|
||||
* GitHub Pages serves a project site at `/<repo>/`, not `/` (CLAUDE.md §8). Vite
|
||||
* `base`, the manifest's `scope`/`start_url` and the service worker's scope all
|
||||
* derive from this one value, so they cannot disagree. The e2e and offline
|
||||
* suites serve the build under the same prefix.
|
||||
*/
|
||||
const BASE = process.env['ROSEA_BASE'] ?? '/Rosea/';
|
||||
if (!BASE.startsWith('/') || !BASE.endsWith('/')) {
|
||||
throw new Error(`ROSEA_BASE must start and end with '/', got '${BASE}'`);
|
||||
}
|
||||
|
||||
/**
|
||||
* The content-security policy. GitHub Pages cannot send headers, so it lives in
|
||||
* a <meta> tag (CLAUDE.md §8). It is injected into the BUILT page only, because
|
||||
* the dev server injects inline <style> for hot reload and `style-src 'self'`
|
||||
* would blank it. E2E runs against the build, where the policy is real.
|
||||
*
|
||||
* `'self'` everywhere and nothing else: no CDN, no font host, no analytics
|
||||
* (CLAUDE.md §4). `frame-ancestors` is ignored in a meta tag and is omitted
|
||||
* rather than pretended.
|
||||
*/
|
||||
const 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'"
|
||||
].join('; ');
|
||||
|
||||
function contentSecurityPolicy(): Plugin {
|
||||
return {
|
||||
name: 'rosea-csp',
|
||||
apply: 'build',
|
||||
transformIndexHtml: {
|
||||
order: 'post',
|
||||
handler: () => [
|
||||
{ tag: 'meta', attrs: { 'http-equiv': 'Content-Security-Policy', content: CSP }, injectTo: 'head-prepend' }
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Nothing binds to anything but 127.0.0.1 (CLAUDE.md §5.7).
|
||||
export default defineConfig({
|
||||
base: BASE,
|
||||
plugins: [
|
||||
svelte(),
|
||||
contentSecurityPolicy(),
|
||||
VitePWA({
|
||||
strategies: 'generateSW',
|
||||
// Never swap a running app silently. A new worker waits until the player
|
||||
// is offered a calm refresh control (CLAUDE.md §8, GAP_ANALYSIS G0.10).
|
||||
registerType: 'prompt',
|
||||
// An emitted registerSW.js file, not an inline snippet: the CSP has no
|
||||
// 'unsafe-inline' for scripts.
|
||||
injectRegister: 'script',
|
||||
manifest: {
|
||||
// The web manifest: one of the three places the name lives, built from
|
||||
// the constants in @rosea/schema so the strings exist only there.
|
||||
name: PRODUCT_NAME,
|
||||
short_name: PRODUCT_SHORT_NAME,
|
||||
description: 'A rose to tend, a fox to befriend, and the time we give to people.',
|
||||
id: BASE,
|
||||
start_url: BASE,
|
||||
scope: BASE,
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
background_color: '#fbf6f1',
|
||||
theme_color: '#b4485e',
|
||||
icons: [{ src: 'icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }]
|
||||
},
|
||||
workbox: {
|
||||
// The cache name never contains the build hash; Workbox invalidates
|
||||
// per entry from the precache manifest's revisions.
|
||||
cacheId: 'rosea',
|
||||
globPatterns: ['**/*.{js,css,html,svg,webmanifest}'],
|
||||
navigateFallback: 'index.html',
|
||||
// No runtime caching: the app makes no request it was not asked to make.
|
||||
runtimeCaching: [],
|
||||
cleanupOutdatedCaches: true,
|
||||
// The first worker controls the page that registered it, so a player who
|
||||
// opens the link once and loses signal still has the app.
|
||||
clientsClaim: true,
|
||||
skipWaiting: false
|
||||
},
|
||||
devOptions: { enabled: false }
|
||||
})
|
||||
],
|
||||
server: { host: '127.0.0.1', strictPort: true },
|
||||
preview: { host: '127.0.0.1', strictPort: true },
|
||||
build: { target: 'es2022', sourcemap: true }
|
||||
});
|
||||
@@ -0,0 +1,192 @@
|
||||
# STYLE.md — Rosea Domi art style
|
||||
|
||||
The style system prompt for every picture in Rosea Domi. The pipeline that uses it is
|
||||
[`docs/ART.md`](../docs/ART.md). Every prompt on the art board starts with **§1** word for
|
||||
word, then adds the picture's own part, generated from [`manifest.json`](manifest.json).
|
||||
A picture that is off-style goes back for another try. It is never shipped.
|
||||
|
||||
> **Approved by Mark, 2026-11-01.** Claude drafted this file from CLAUDE.md §1 and GAMEPLAY.md,
|
||||
> and Mark kept the draft as it was: S1–S5 in §0 are decided. The first picture on the board,
|
||||
> the rose's character sheet, is still the test. If it looks wrong, this file changes before
|
||||
> anything else is made, and `pnpm art:board` rebuilds every prompt.
|
||||
|
||||
---
|
||||
|
||||
## 0. The choices, decided 2026-11-01
|
||||
|
||||
| # | Choice | Decided | Why |
|
||||
|:--|:--|:--|:--|
|
||||
| S1 | The medium | Matte gouache on warm paper, with soft brush outlines | It is gentle and hand-made like the rest of Domi. It is also clearly not the book's look, which is a thin pen line with loose, pale watercolour. |
|
||||
| S2 | Where the rose lives | A small garden bed on a hillside meadow, with a low dry-stone wall and a wide sky to the west | The sunset is real, so the scene needs a real horizon. It is an ordinary garden, never a tiny planet. |
|
||||
| S3 | The rose's face | A face in the middle of the bloom: two small eyes, often half-closed, a tiny mouth and a blush | This is the description in CLAUDE.md §1, drawn as written. |
|
||||
| S4 | The palette | §2 | It starts from the app's tokens (`--rose #b4485e`, `--paper #fbf6f1`). |
|
||||
| S5 | The sky | Drawn in code, never painted | The sun moves at the player's real time, and the stars are the real constellations. A painted sky could do neither. |
|
||||
|
||||
---
|
||||
|
||||
## 1. The system prompt (paste word for word)
|
||||
|
||||
> Soft, hand-made 2D storybook illustration painted in matte gouache with a gentle dry-brush
|
||||
> texture on warm off-white paper. Simple rounded shapes built from flat, soft colour areas with
|
||||
> two or three gentle tonal steps; no wet watercolour blooms, no thin scratchy pen line. Outlines
|
||||
> are soft, slightly irregular brush lines in deep plum-brown, never pure black, never a hard
|
||||
> vector line. Light is low and warm, as late in the day, coming from the left. The mood is
|
||||
> quiet, tender and hopeful, with generous calm space that never feels empty or bleak.
|
||||
> Characters are cute but alive, with small gentle eyes, often half-closed, and tiny mouths. No
|
||||
> text, letters or numbers anywhere in the image. No humans, no human figures, hands or faces,
|
||||
> no photographs, no logos, no brand characters. No 3D render look, no glossy highlights, no lens
|
||||
> effects, no gradients that look digital. Original artwork, not in the style of any existing
|
||||
> book, illustrator or film.
|
||||
|
||||
---
|
||||
|
||||
## 2. Palette
|
||||
|
||||
The main tones. Small shades in between are fine.
|
||||
|
||||
| Role | Colour | Hex |
|
||||
|:--|:--|:--|
|
||||
| Petals (main) | rose | `#C85A6E` |
|
||||
| Petal edges and light | pale petal | `#F2B5BE` |
|
||||
| Blush | warm pink | `#E8899B` |
|
||||
| Leaves | sage | `#7FA07A` |
|
||||
| Deep leaves and stem | moss | `#4F6E52` |
|
||||
| Outlines | deep plum-brown | `#3A2730` |
|
||||
| Paper | warm off-white | `#FBF6F1` |
|
||||
| Soil and wall stones | warm umber | `#8A6248` |
|
||||
| Wood | honey | `#B98A5A` |
|
||||
| Meadow by day | soft green | `#A9C48E` |
|
||||
| Sunset light | amber gold | `#F2B860` |
|
||||
| Sunset glow | coral | `#E9846A` |
|
||||
| Night | dusk indigo | `#2E3561` |
|
||||
| Lamps and stars | lamp gold | `#F4D58D` |
|
||||
|
||||
Never use neon, saturated primaries, pure black, pure white or cold greys.
|
||||
|
||||
---
|
||||
|
||||
## 3. The rose
|
||||
|
||||
The rose is the only character in Phase 1. Every rose picture follows the character sheet
|
||||
`rose-sheet`, so she looks the same in every one.
|
||||
|
||||
- **One garden rose** on a single slender stem. She is about three blooms tall, from the bloom
|
||||
down to where the stem meets the soil. She has three leaves, two low and one high, and a few
|
||||
small thorns with rounded tips. The thorns are part of her and never look threatening.
|
||||
- **The bloom is her head.** It is made of soft, layered petals in rose (`#C85A6E`) that turn
|
||||
pale petal (`#F2B5BE`) at the edges. Her face sits in the middle of the bloom: two small dark
|
||||
eyes, often half-closed, and a tiny mouth. When she is tended, a faint blush (`#E8899B`) shows
|
||||
on the petals by her cheeks.
|
||||
- **A little vain.** She holds her head high and keeps her petals neat. Her leaves move like
|
||||
small arms: one raised when she speaks, both lowered when she is thirsty.
|
||||
- **Stages:** a tight bud, an opening bud, a half bloom and a full bloom. Each stage has the same
|
||||
face and the same stem, and only the bloom changes.
|
||||
- **Drift looks like waiting, never like hurt** (CLAUDE.md §8). Turned a little away, petals
|
||||
closed a little, eyes looking down. She is never wilted, broken, crying, dead or losing
|
||||
petals in pain. Fallen petals are a care task, not damage.
|
||||
- **Expressions:** content, sleepy, blushing, speaking, thirsty, too much water, windblown,
|
||||
waiting. Never angry, crying hard, frightened or hurt.
|
||||
|
||||
---
|
||||
|
||||
## 4. The world
|
||||
|
||||
- **The garden:** a small round garden bed on a hillside meadow. A low dry-stone wall sits
|
||||
behind it, with wild grasses and a few small meadow flowers. The horizon is wide and low in
|
||||
the west, on the left, where the sun sets.
|
||||
- **The sky is drawn in code (S5).** Garden pictures are layers: everything above the horizon
|
||||
is transparent. The sky, the sun, the moon and the real stars are drawn behind them.
|
||||
- **Times of day:** morning, day, sunset and night. Each is its own layer, with its own light
|
||||
on the same garden.
|
||||
- **Care things:** a small watering can, a woven willow windbreak, weeds, fallen petals, and
|
||||
the folded petal that holds the day's sentence. The words on a petal are added in code and
|
||||
never painted.
|
||||
- **The chair:** a small, weathered wooden garden chair. It is the one in the in-game sunset
|
||||
("move the chair, watch it again").
|
||||
- **Never in any picture:** a glass dome or bell jar over the rose, a folding screen, a tiny
|
||||
round planet with someone standing on it, a desert, a child, a scarf, a boy with golden hair,
|
||||
or anything that looks like a drawing from the book (GAMEPLAY.md §8: *a direction only —
|
||||
never, ever copying the illustrations*). The willow windbreak is the shelter from the wind,
|
||||
and it must look nothing like a screen.
|
||||
- No flags, religious symbols, buildings, vehicles or people.
|
||||
|
||||
---
|
||||
|
||||
## 5. Sizes and backgrounds
|
||||
|
||||
Image generators offer 1024 × 1024, 1536 × 1024 and 1024 × 1536. Every picture is made at one
|
||||
of those sizes.
|
||||
|
||||
| Kind | Made at (px) | Background | Notes |
|
||||
|:--|:--|:--|:--|
|
||||
| Character sheet | 1536 × 1024 | full, plain paper | A reference only, never shown in the app |
|
||||
| Sprite sheet | 1536 × 1024 | transparent | Cut into cells along its grid (§9) |
|
||||
| Single picture | 1024 × 1024 | transparent | Centred, whole, about 10 % clear on every side, no ground shadow |
|
||||
| Garden layer | 1024 × 1536 | transparent above the horizon | Horizon at 40 % from the top; keep the lower middle calm for the rose and the controls |
|
||||
| App icon | 1024 × 1024 | full | Keep the bloom inside the middle 70 %; phones cut the corners |
|
||||
|
||||
- Accepted pictures go into `art/final/` as WebP, within the size budget in `docs/ART.md` §4.
|
||||
- One subject per picture. Never crop a petal, leaf or stem.
|
||||
- Keep the same outline weight and paper texture in every picture.
|
||||
|
||||
---
|
||||
|
||||
## 6. How a prompt is built
|
||||
|
||||
The art board writes every prompt. Nobody types them by hand. Each prompt is §1, then:
|
||||
|
||||
```
|
||||
Asset: <id>
|
||||
Purpose: <where it appears and what it must say, in one sentence>
|
||||
Subject: <who or what, with the character sheet to attach>
|
||||
Setting / Canvas / Layout: <by kind: see §5 and §9>
|
||||
Size: <made at W × H px, background>
|
||||
Must include: <…>
|
||||
Must avoid: <the picture's own list, then the list every picture shares (§4)>
|
||||
```
|
||||
|
||||
`tools/art-prep` builds the prompts from `art/manifest.json` (`pnpm art:board`), and a test
|
||||
checks that each one starts with §1 word for word.
|
||||
|
||||
---
|
||||
|
||||
## 7. Review points
|
||||
|
||||
The board shows these under each card, and Claude's review checks them. Mark doesn't have to
|
||||
tick them: *Accept* is one tap.
|
||||
|
||||
0. It reads as one living garden rose with a soft face in her bloom: small eyes, a tiny mouth.
|
||||
1. She matches `rose-sheet`: the same bloom, petal colours, three leaves and rounded thorns.
|
||||
2. The colours stay within §2, with soft plum-brown outlines, in matte gouache, not wet watercolour.
|
||||
3. Nothing from the book: no glass dome, screen, tiny planet, desert, child or scarf, and no
|
||||
look of its drawings.
|
||||
4. No text, numbers, logos, people or stray symbols.
|
||||
5. The size and background are right for its kind in §5.
|
||||
6. It reads clearly at the smallest size it is shown.
|
||||
7. It is gentle: nothing blames, frightens or looks hurt, and drift looks like waiting.
|
||||
|
||||
---
|
||||
|
||||
## 8. What Claude checks before Mark sees a picture
|
||||
|
||||
- **Likeness:** the picture is compared with §4's *never* list. A rose under glass, a screen,
|
||||
a planet the size of a house, or a pen-and-wash look means another try, however pretty it is.
|
||||
- **Soul:** CLAUDE.md §8, *drift that reads as blame*. A rose who looks hurt or sad because of
|
||||
the player is refused.
|
||||
- **Words:** a picture with painted letters is refused, because words come from the copy library.
|
||||
|
||||
---
|
||||
|
||||
## 9. Sprite sheets
|
||||
|
||||
A sprite sheet is one prompt that makes several pictures at once on a grid. The board shows the
|
||||
cut lines over the upload. `pnpm art:accept` cuts the sheet apart, and each cell becomes its own
|
||||
picture in `art/final/`.
|
||||
|
||||
- The cells are equal and invisible. They are read like a book: left to right, top row first.
|
||||
- Each drawing stays inside its cell's safe box, which keeps 12 % of the cell's shorter side
|
||||
clear on every side. Nothing crosses a cut line.
|
||||
- The whole sheet uses one scale. The largest drawing fills its safe box, and every other
|
||||
drawing is drawn at that same scale.
|
||||
- When a sheet won't keep to its grid, each cell can be made on its own with its own prompt
|
||||
(*One at a time* on the board). Each one is then accepted separately.
|
||||
@@ -0,0 +1,235 @@
|
||||
{
|
||||
"//": "Every picture Rosea Domi needs, Phase 1 first. tools/art-prep builds the art board's prompts and stand-ins from this file (docs/ART.md). Status lives on the board, not here: this file says what is wanted, never whether it is done.",
|
||||
"characters": {
|
||||
"rose": {
|
||||
"sheet": "rose-sheet",
|
||||
"description": "The rose: one garden rose on a single slender stem, about three blooms tall from the bloom down to where the stem would meet the soil, with three leaves (two low, one high) and a few small thorns with rounded tips that never look threatening. Her bloom is her head: soft layered petals in rose (#C85A6E) turning pale petal (#F2B5BE) at the edges, and in the middle of the bloom a soft face with two small dark eyes, often half-closed, and a tiny mouth; a faint blush (#E8899B) on the petals by her cheeks when she is tended. A little vain: head held high, petals neat. Her leaves move like small arms."
|
||||
}
|
||||
},
|
||||
"avoid": [
|
||||
"text, letters, numbers or labels",
|
||||
"humans, human hands or faces, children",
|
||||
"logos",
|
||||
"pure black outlines or a thin scratchy pen line",
|
||||
"a glass dome or bell jar",
|
||||
"a folding screen",
|
||||
"a tiny round planet",
|
||||
"a desert",
|
||||
"a scarf",
|
||||
"the look of any existing book's drawings"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"id": "rose-sheet",
|
||||
"type": "sheet",
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"background": "full",
|
||||
"shipped": false,
|
||||
"smallest": null,
|
||||
"character": "rose",
|
||||
"usedBy": ["The reference for every rose picture. Make this first: every rose prompt asks for it as the reference picture."],
|
||||
"purpose": "Reference sheet that fixes the rose's look; every later rose prompt points to it. Never shown in the app.",
|
||||
"subject": "The rose at full bloom, as described below. Four full figures: front view, three-quarter view facing left, side view facing left, back view; then three close-ups of the bloom only: content (eyes half-closed, a small smile), sleepy (eyes closed, petals a little folded), blushing (eyes closed happily, blush on the cheek petals).",
|
||||
"setting": "Isolated on plain warm off-white paper (#FBF6F1), no scenery, no soil, no pot.",
|
||||
"composition": "Seven figures on one sheet with even spacing: the four full figures in a row across the top two thirds, the three close-ups in a row below, all full figures at the same scale, nothing overlapping.",
|
||||
"include": ["identical proportions, leaf count and thorns in every view", "the face in the middle of the bloom in every view that shows it"],
|
||||
"avoid": ["a pot, vase or soil", "wilted, drooping or fallen petals", "sharp, menacing thorns"],
|
||||
"checks": [0, 2, 3, 4, 5, 7]
|
||||
},
|
||||
{
|
||||
"id": "rose-stages-sheet",
|
||||
"type": "spritesheet",
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": 160,
|
||||
"character": "rose",
|
||||
"usedBy": ["The rose in the garden as she grows: from total days of care, never from a streak (GAMEPLAY.md §1).", "Not in the app yet: Phase 1 builds her screen"],
|
||||
"purpose": "The rose's four stages of growth, from a tight bud to full bloom, for the garden screen.",
|
||||
"angle": "Every stage seen from the front, standing upright, the whole plant visible, at the same scale: the stem the same length and the face the same size in every cell; only the bloom changes.",
|
||||
"grid": { "cols": 4, "rows": 1 },
|
||||
"cells": [
|
||||
{ "id": "rose-bud", "does": "a tight bud: the bloom closed into a small pointed bud with green sepals around it, the face just visible on its front, eyes closed, calm." },
|
||||
{ "id": "rose-opening", "does": "an opening bud: the outer petals just loosening, the face peeking out, eyes half open, curious." },
|
||||
{ "id": "rose-half-bloom", "does": "a half bloom: petals open halfway in a soft cup, the face clear, a small proud smile." },
|
||||
{ "id": "rose-full-bloom", "does": "a full bloom: petals wide open and layered, head held high, eyes half-closed, content and a little vain." }
|
||||
],
|
||||
"include": ["the same stem, leaves and thorns in all four cells", "the face in every cell"],
|
||||
"avoid": ["soil, a pot or ground", "fallen or drooping petals"],
|
||||
"checks": [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
{
|
||||
"id": "rose-care-sheet",
|
||||
"type": "spritesheet",
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": 160,
|
||||
"character": "rose",
|
||||
"usedBy": ["How the rose shows what she needs, and how she answers care (GAMEPLAY.md §1–2: her face and posture are the surface)."],
|
||||
"purpose": "The rose at full bloom in four moods that care answers: thirsty, too much water, windblown, and blushing after being tended.",
|
||||
"angle": "Every mood at full bloom, seen from the front, the whole plant visible, at the same scale as the stages sheet; only the face, leaves and posture change.",
|
||||
"grid": { "cols": 4, "rows": 1 },
|
||||
"cells": [
|
||||
{ "id": "rose-thirsty", "does": "thirsty: both leaves lowered, the bloom tipped slightly forward, petals a touch dull at the edges, eyes heavy and half-closed, mouth small. Tired, not hurt." },
|
||||
{ "id": "rose-overwatered", "does": "too much water: leaves heavy and drooping outwards, a few water drops on the petals, cheeks a little puffed, eyes squeezed shut as if she had a big gulp. Gently comic, never ill." },
|
||||
{ "id": "rose-windblown", "does": "windblown: the stem bending to the right in a breeze, petals fluttering, eyes squeezed shut, both leaves held up as if holding on. Startled, not frightened." },
|
||||
{ "id": "rose-blushing", "does": "blushing after being tended: head high, eyes closed happily, a clear blush on the cheek petals, one leaf raised to her cheek." }
|
||||
],
|
||||
"include": ["the same plant as rose-full-bloom in every cell"],
|
||||
"avoid": ["soil, a pot or ground", "wilted, broken or crying", "tears"],
|
||||
"checks": [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
{
|
||||
"id": "rose-moments-sheet",
|
||||
"type": "spritesheet",
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": 160,
|
||||
"character": "rose",
|
||||
"usedBy": ["Night, teaching in speech bubbles (GAMEPLAY.md §4), drift as waiting (CLAUDE.md §8), and watching the sunset with the player."],
|
||||
"purpose": "The rose at full bloom in four moments: asleep, speaking, waiting while the player is away, and watching the sunset.",
|
||||
"angle": "Every moment at full bloom, the whole plant visible, at the same scale as the stages sheet. Front view unless the cell says otherwise.",
|
||||
"grid": { "cols": 4, "rows": 1 },
|
||||
"cells": [
|
||||
{ "id": "rose-sleepy", "does": "asleep at night: eyes closed, petals folded in a little, the bloom resting slightly forward, a peaceful small smile." },
|
||||
{ "id": "rose-speaking", "does": "speaking: mouth open as if saying something kind, eyes open and bright, one leaf raised like a small hand explaining." },
|
||||
{ "id": "rose-waiting", "does": "waiting while the player is away: the bloom turned a little to the side, petals closed a little, eyes looking down and half-closed. Quiet, waiting with patience, never sad, hurt or blaming." },
|
||||
{ "id": "rose-watching-sunset", "does": "watching the sunset: seen from behind at a slight three-quarter angle, the bloom turned to the left towards a horizon outside the picture, warm light on her left side." }
|
||||
],
|
||||
"include": ["the same plant as rose-full-bloom in every cell"],
|
||||
"avoid": ["soil, a pot or ground", "wilted, crying or hurt", "a speech bubble or any words"],
|
||||
"checks": [0, 1, 2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
{
|
||||
"id": "care-props-sheet",
|
||||
"type": "spritesheet",
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": 64,
|
||||
"usedBy": ["The care things: water by feel, shade from the wind, pull weeds, gather fallen petals, and the folded petal that holds the day's sentence (GAMEPLAY.md §1)."],
|
||||
"purpose": "Six small things the player uses to care for the rose, each one easy to recognise at 64 px.",
|
||||
"angle": "Each thing in a gentle three-quarter view, the same light from the left, at the scale that makes it fill its safe box.",
|
||||
"grid": { "cols": 3, "rows": 2 },
|
||||
"cells": [
|
||||
{ "id": "watering-can", "does": "a small, round, old tin watering can in soft sage green, its spout pointing left, slightly dented, friendly." },
|
||||
{ "id": "windbreak", "does": "a small curved windbreak of woven willow twigs on two short stakes, honey and brown, like a tiny garden hurdle. It must look nothing like a folding screen." },
|
||||
{ "id": "weed-clump", "does": "a small clump of three weeds with soft jagged leaves and roots showing, as if just pulled, harmless and a little cheeky." },
|
||||
{ "id": "fallen-petals", "does": "three fallen rose petals lying together, rose and pale pink, gently curled, lit softly. Fresh and pretty, not withered." },
|
||||
{ "id": "petal-folded", "does": "one large rose petal folded over itself like a little letter, rose on the outside, pale pink on the inside edge, with a soft glow round it." },
|
||||
{ "id": "petal-open", "does": "the same large rose petal opened flat and seen from above, pale pink, smooth and empty in the middle where words are added in code." }
|
||||
],
|
||||
"include": ["each thing whole and clear at 64 px"],
|
||||
"avoid": ["any writing on the petal", "a folding screen", "sharp tools, scissors or knives"],
|
||||
"checks": [2, 3, 4, 5, 6, 7]
|
||||
},
|
||||
{
|
||||
"id": "garden-chair",
|
||||
"type": "sprite",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": 96,
|
||||
"usedBy": ["The in-game sunset: the player moves the chair and watches the sunset again (CLAUDE.md §1, the sunset)."],
|
||||
"purpose": "A small, weathered wooden garden chair that the player moves to watch the in-game sunset.",
|
||||
"subject": "A small, weathered wooden garden chair in honey wood (#B98A5A), seen from behind at a three-quarter angle, facing left towards the sunset, with a soft cushion in pale petal pink. Empty and inviting.",
|
||||
"include": ["the whole chair, legs included"],
|
||||
"avoid": ["a person or animal on the chair", "a ground shadow"],
|
||||
"checks": [2, 3, 4, 5, 6]
|
||||
},
|
||||
{
|
||||
"id": "garden-morning",
|
||||
"type": "layer",
|
||||
"width": 1024,
|
||||
"height": 1536,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": null,
|
||||
"usedBy": ["The garden from sunrise until mid-morning. The real sunrise sets when it shows (Phase 1, the sun)."],
|
||||
"purpose": "The rose's garden in soft morning light, with the sky left transparent for the sky drawn in code.",
|
||||
"subject": "No characters. The empty garden bed where the rose grows, so the rose picture can stand in it.",
|
||||
"setting": "A small round garden bed of warm umber soil in the lower middle, a low dry-stone wall curving behind it, wild grasses and a few small meadow flowers, the hillside meadow falling away to a wide low horizon. Cool, fresh morning light from the right (east), dew on the grass.",
|
||||
"composition": "Portrait. The horizon line runs straight across at 40 % from the top; above it everything is fully transparent. The garden bed sits in the lower middle with its centre about 72 % down, open and calm, for the rose and the controls.",
|
||||
"include": ["a fully transparent sky above the horizon", "an empty garden bed with nothing growing in it"],
|
||||
"avoid": ["a painted sky, sun, moon, clouds or stars", "buildings, fences with gates, paths with signs", "a rose or any large flower in the bed"],
|
||||
"checks": [2, 3, 4, 5, 7]
|
||||
},
|
||||
{
|
||||
"id": "garden-day",
|
||||
"type": "layer",
|
||||
"width": 1024,
|
||||
"height": 1536,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": null,
|
||||
"usedBy": ["The garden through the day."],
|
||||
"purpose": "The same garden in bright, soft daylight, with the sky left transparent.",
|
||||
"subject": "No characters. The same empty garden bed as garden-morning.",
|
||||
"setting": "The same garden as garden-morning, in soft bright daylight from high on the left, warm and green.",
|
||||
"composition": "Portrait. Exactly the same layout as garden-morning: horizon straight across at 40 % from the top, transparent above, the garden bed in the lower middle about 72 % down.",
|
||||
"include": ["a fully transparent sky above the horizon", "the same wall, bed and grasses as garden-morning"],
|
||||
"avoid": ["a painted sky, sun, moon, clouds or stars", "a rose or any large flower in the bed"],
|
||||
"checks": [2, 3, 4, 5, 7]
|
||||
},
|
||||
{
|
||||
"id": "garden-sunset",
|
||||
"type": "layer",
|
||||
"width": 1024,
|
||||
"height": 1536,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": null,
|
||||
"usedBy": ["The garden at the player's real local sunset, and the in-game sunset with the chair."],
|
||||
"purpose": "The same garden at sunset: low amber and coral light from the left, long soft shadows, the sky left transparent.",
|
||||
"subject": "No characters. The same empty garden bed as garden-morning, with room on the left of the bed for the chair.",
|
||||
"setting": "The same garden as garden-morning in low sunset light from the left (west): amber gold (#F2B860) and coral (#E9846A) on the wall and grasses, long soft shadows to the right.",
|
||||
"composition": "Portrait. Exactly the same layout as garden-morning: horizon straight across at 40 % from the top, transparent above, the garden bed in the lower middle about 72 % down.",
|
||||
"include": ["a fully transparent sky above the horizon", "the warmest light of the four garden layers"],
|
||||
"avoid": ["a painted sky, sun, moon, clouds or stars", "a chair (it is its own picture)", "a rose or any large flower in the bed"],
|
||||
"checks": [2, 3, 4, 5, 7]
|
||||
},
|
||||
{
|
||||
"id": "garden-night",
|
||||
"type": "layer",
|
||||
"width": 1024,
|
||||
"height": 1536,
|
||||
"background": "transparent",
|
||||
"shipped": true,
|
||||
"smallest": null,
|
||||
"usedBy": ["The garden at night, under the real stars drawn in code."],
|
||||
"purpose": "The same garden at night in soft blue moonlight, calm and safe, with the sky left transparent for the real constellations.",
|
||||
"subject": "No characters. The same empty garden bed as garden-morning.",
|
||||
"setting": "The same garden as garden-morning at night: dusk indigo (#2E3561) shadows, soft silver-blue light from above, one or two tiny lamp-gold glow-worms in the grass. Calm and safe, never dark or scary.",
|
||||
"composition": "Portrait. Exactly the same layout as garden-morning: horizon straight across at 40 % from the top, transparent above, the garden bed in the lower middle about 72 % down.",
|
||||
"include": ["a fully transparent sky above the horizon", "enough light that the bed and wall still read clearly"],
|
||||
"avoid": ["a painted sky, moon or stars", "deep black shadows", "a rose or any large flower in the bed"],
|
||||
"checks": [2, 3, 4, 5, 7]
|
||||
},
|
||||
{
|
||||
"id": "app-icon",
|
||||
"type": "icon",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"background": "full",
|
||||
"shipped": true,
|
||||
"smallest": 48,
|
||||
"character": "rose",
|
||||
"usedBy": ["The home-screen icon of the installed app (replaces apps/rosea/public/icon.svg)."],
|
||||
"purpose": "The app icon: the rose's bloom with her face, readable at 48 px on a phone's home screen.",
|
||||
"subject": "Only the rose's bloom and the top of her stem with one leaf, filling the middle of the icon: the face clear, eyes half-closed, a small content smile, a faint blush.",
|
||||
"setting": "A soft dusk background, coral (#E9846A) at the bottom warming into amber (#F2B860), painted with the same gouache texture, no horizon detail.",
|
||||
"composition": "Square, full background. The bloom centred and inside the middle 70 %; nothing important near the corners, which phones cut.",
|
||||
"include": ["a bold, simple silhouette that reads at 48 px"],
|
||||
"avoid": ["fine detail that vanishes when small", "a border or rounded-corner frame"],
|
||||
"checks": [0, 1, 2, 3, 4, 5, 6]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||
<!-- Stand-in for app-icon (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<rect width="1024" height="1024" fill="#e9846a"/><rect y="512" width="1024" height="512" fill="#f2b860" opacity=".6"/> <svg x="153.6" y="122.88" width="716.8" height="778.24" viewBox="0 30 200 230"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M103 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="82" cy="138" r="8" fill="#e8899b"/><circle cx="118" cy="138" r="8" fill="#e8899b"/></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1536 1024" width="1536" height="1024">
|
||||
<!-- Stand-in for care-props-sheet (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<svg x="0" y="0" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><rect x="50" y="80" width="90" height="80" rx="18" fill="#7fa07a" stroke="#3a2730" stroke-width="5"/> <path d="M60 80 q35 -55 70 0" fill="none" stroke="#3a2730" stroke-width="7"/> <path d="M52 110 L12 70" stroke="#3a2730" stroke-width="10" stroke-linecap="round"/><circle cx="12" cy="68" r="10" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g></svg><svg x="512" y="0" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><path d="M30 150 v-90" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M48 143.1116982174284 v-86.1731656763491" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M66 137.27207793864216 v-82.92893218813452" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M84 133.37016841479684 v-80.76120467488713" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M102 132 v-80" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M120 133.37016841479684 v-80.76120467488713" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M138 137.27207793864216 v-82.92893218813452" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M156 143.11169821742837 v-86.1731656763491" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M174 150 v-90" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M24 100 Q100 75 176 100" fill="none" stroke="#8a6248" stroke-width="6"/><path d="M24 128 Q100 103 176 128" fill="none" stroke="#8a6248" stroke-width="6"/> <path d="M30 150 v30 M170 150 v30" stroke="#8a6248" stroke-width="8" stroke-linecap="round"/></g></svg><svg x="1024" y="0" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><path d="M60 140 l-18 -60 l14 12 l4 -30 l8 24 l12 -20 l-6 60z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M100 140 l-18 -72 l14 12 l4 -36 l8 24 l12 -20 l-6 68z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M140 140 l-18 -84 l14 12 l4 -42 l8 24 l12 -20 l-6 76z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M70 140 q10 30 -6 44 M100 140 q-4 26 10 40 M130 140 q8 22 -2 38" fill="none" stroke="#8a6248" stroke-width="4"/></g></svg><svg x="0" y="512" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><ellipse cx="60" cy="110" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(-20 60 110)"/><ellipse cx="110" cy="90" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(25 110 90)"/><ellipse cx="140" cy="130" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(60 140 130)"/></g></svg><svg x="512" y="512" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><circle cx="100" cy="100" r="86" fill="#f4d58d" opacity=".35"/><path d="M100 30 C 170 60, 160 160, 100 170 C 40 160, 30 60, 100 30z" fill="#c85a6e" stroke="#3a2730" stroke-width="5"/> <path d="M100 30 C 120 90, 120 130, 100 170" fill="none" stroke="#f2b5be" stroke-width="6"/></g></svg><svg x="1024" y="512" width="512" height="512" viewBox="0 0 512 512"><g transform="translate(76.8 76.8) scale(1.7920)"><path d="M100 20 C 190 50, 190 160, 100 182 C 10 160, 10 50, 100 20z" fill="#f2b5be" stroke="#3a2730" stroke-width="5"/></g></svg>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for fallen-petals (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><ellipse cx="60" cy="110" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(-20 60 110)"/><ellipse cx="110" cy="90" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(25 110 90)"/><ellipse cx="140" cy="130" rx="34" ry="22" fill="#c85a6e" stroke="#3a2730" stroke-width="4" transform="rotate(60 140 130)"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 650 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||
<!-- Stand-in for garden-chair (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(153.6 153.6) scale(3.5840)"><rect x="60" y="40" width="80" height="70" rx="8" fill="#b98a5a" stroke="#3a2730" stroke-width="5"/> <path d="M70 55 h60 M70 75 h60 M70 95 h60" stroke="#8a6248" stroke-width="4"/> <path d="M50 110 h100 l-10 24 h-80z" fill="#f2b5be" stroke="#3a2730" stroke-width="5"/> <path d="M62 134 v46 M138 134 v46 M80 134 v36 M120 134 v36" stroke="#b98a5a" stroke-width="9" stroke-linecap="round"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 672 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1536" width="1024" height="1536">
|
||||
<!-- Stand-in for garden-day (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<path d="M0 614 Q 307.2 596 563.2 608 T 1024 618 V 1536 H 0z" fill="#b9cfa8"/> <path d="M0 704 Q 512 664 1024 724 V 1536 H 0z" fill="#a9c48e"/> <path d="M122.88 1036 Q 512 956 901.12 1036" fill="none" stroke="#a8957f" stroke-width="44" stroke-linecap="round"/> <ellipse cx="512" cy="1106" rx="307.2" ry="76.80000000000001" fill="#8a6248" stroke="#3a2730" stroke-width="5"/> <circle cx="944" cy="674" r="26" fill="#fff6d8" opacity=".8"/> <path d="M0 614 H 1024" stroke="#3a2730" stroke-width="3" stroke-dasharray="14 10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 749 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1536" width="1024" height="1536">
|
||||
<!-- Stand-in for garden-morning (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<path d="M0 614 Q 307.2 596 563.2 608 T 1024 618 V 1536 H 0z" fill="#c9dbe0"/> <path d="M0 704 Q 512 664 1024 724 V 1536 H 0z" fill="#b8d1a0"/> <path d="M122.88 1036 Q 512 956 901.12 1036" fill="none" stroke="#b4a596" stroke-width="44" stroke-linecap="round"/> <ellipse cx="512" cy="1106" rx="307.2" ry="76.80000000000001" fill="#8a6248" stroke="#3a2730" stroke-width="5"/> <circle cx="944" cy="674" r="26" fill="#ffffff" opacity=".8"/> <path d="M0 614 H 1024" stroke="#3a2730" stroke-width="3" stroke-dasharray="14 10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 753 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1536" width="1024" height="1536">
|
||||
<!-- Stand-in for garden-night (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<path d="M0 614 Q 307.2 596 563.2 608 T 1024 618 V 1536 H 0z" fill="#46557a"/> <path d="M0 704 Q 512 664 1024 724 V 1536 H 0z" fill="#3c4a6a"/> <path d="M122.88 1036 Q 512 956 901.12 1036" fill="none" stroke="#3a4466" stroke-width="44" stroke-linecap="round"/> <ellipse cx="512" cy="1106" rx="307.2" ry="76.80000000000001" fill="#8a6248" stroke="#3a2730" stroke-width="5"/> <circle cx="944" cy="674" r="26" fill="#f4d58d" opacity=".8"/> <path d="M0 614 H 1024" stroke="#3a2730" stroke-width="3" stroke-dasharray="14 10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 751 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1536" width="1024" height="1536">
|
||||
<!-- Stand-in for garden-sunset (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<path d="M0 614 Q 307.2 596 563.2 608 T 1024 618 V 1536 H 0z" fill="#d9a98a"/> <path d="M0 704 Q 512 664 1024 724 V 1536 H 0z" fill="#c9b07a"/> <path d="M122.88 1036 Q 512 956 901.12 1036" fill="none" stroke="#a07b62" stroke-width="44" stroke-linecap="round"/> <ellipse cx="512" cy="1106" rx="307.2" ry="76.80000000000001" fill="#8a6248" stroke="#3a2730" stroke-width="5"/> <circle cx="80" cy="674" r="26" fill="#f2b860" opacity=".8"/> <path d="M0 614 H 1024" stroke="#3a2730" stroke-width="3" stroke-dasharray="14 10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 751 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for petal-folded (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><circle cx="100" cy="100" r="86" fill="#f4d58d" opacity=".35"/><path d="M100 30 C 170 60, 160 160, 100 170 C 40 160, 30 60, 100 30z" fill="#c85a6e" stroke="#3a2730" stroke-width="5"/> <path d="M100 30 C 120 90, 120 130, 100 170" fill="none" stroke="#f2b5be" stroke-width="6"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 556 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for petal-open (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><path d="M100 20 C 190 50, 190 160, 100 182 C 10 160, 10 50, 100 20z" fill="#f2b5be" stroke="#3a2730" stroke-width="5"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 398 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-blushing (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(80 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="82" cy="138" r="8" fill="#e8899b"/><circle cx="118" cy="138" r="8" fill="#e8899b"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-bud (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><path d="M100 82 C 130 100, 130 148, 100 151 C 70 148, 70 100, 100 82z" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/> <path d="M70 150 q30 20 60 0 l-8 18 h-44z" fill="#7fa07a" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M96 144 h8" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-full-bloom (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(-4 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M103 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-half-bloom (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="131.9" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="161.9" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="68.1" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="98.1" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="36.0" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M103 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-opening (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="124.2" cy="130.0" r="24.2" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="107.5" cy="153.0" r="24.2" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="80.4" cy="144.2" r="24.2" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="80.4" cy="115.8" r="24.2" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="107.5" cy="107.0" r="24.2" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="27.3" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M103 124 q6 5 12 0" fill="#3a2730" stroke="#3a2730" stroke-width="3"/><path d="M96 144 h8" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-overwatered (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(10 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-10 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(15 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 120 l12 4 l-12 4" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 120 l12 4 l-12 4" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><circle cx="100" cy="145" r="4" fill="#3a2730"/><circle cx="84" cy="140" r="7" fill="#e8899b" opacity=".7"/><circle cx="116" cy="140" r="7" fill="#e8899b" opacity=".7"/><path d="M64 92 q5 9 0 12 q-5 -3 0 -12z" fill="#9cc3d8" stroke="#3a2730" stroke-width="2"/><path d="M138 104 q5 9 0 12 q-5 -3 0 -12z" fill="#9cc3d8" stroke="#3a2730" stroke-width="2"/><path d="M120 70 q5 9 0 12 q-5 -3 0 -12z" fill="#9cc3d8" stroke="#3a2730" stroke-width="2"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-sleepy (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(10 100 170)"><circle cx="131.9" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="161.9" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="68.1" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="98.1" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="36.0" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 124 q6 6 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M93 142 q7 7 14 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-speaking (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(80 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(0 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><circle cx="91" cy="124" r="4.5" fill="#3a2730"/><circle cx="109" cy="124" r="4.5" fill="#3a2730"/><ellipse cx="100" cy="145" rx="6" ry="5" fill="#3a2730"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-thirsty (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(10 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-10 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(15 100 250)"/><g transform="translate(0 0) rotate(14 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 127 q6 4 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 127 q6 4 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M96 144 h8" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-waiting (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(10 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-10 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(15 100 250)"/><g transform="translate(0 0) rotate(-18 100 170)"><circle cx="131.9" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="161.9" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="152.6" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="68.1" cy="130.0" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="77.4" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="98.1" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="122.6" cy="107.4" r="31.9" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="36.0" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 127 q6 4 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 127 q6 4 12 0" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M96 144 h8" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-watching-sunset (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 100 340 100 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M96 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M104 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M96 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-35 100 400)"/><ellipse cx="130" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(35 100 330)"/><ellipse cx="70" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-30 100 250)"/><g transform="translate(0 0) rotate(-10 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 1024" width="384" height="1024">
|
||||
<!-- Stand-in for rose-windblown (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(46.1 132.6) scale(1.4592)"><path d="M100 520 Q 122 340 135.2 170" fill="none" stroke="#4f6e52" stroke-width="9" stroke-linecap="round"/><path d="M101.65714285714286 430 l-12 -6 l10 -6z" fill="#4f6e52"/><path d="M117.82857142857142 300 l12 -6 l-10 -6z" fill="#4f6e52"/><path d="M114.85714285714286 220 l-12 -6 l10 -6z" fill="#4f6e52"/><ellipse cx="70" cy="400" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-60 100 400)"/><ellipse cx="141" cy="330" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(60 111 330)"/><ellipse cx="92" cy="250" rx="34" ry="14" fill="#7fa07a" stroke="#3a2730" stroke-width="3" transform="rotate(-55 122 250)"/><g transform="translate(35.2 0) rotate(18 100 170)"><circle cx="140.7" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="170.7" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="158.8" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="59.3" cy="130.0" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="71.2" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100.0" cy="89.3" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="128.8" cy="101.2" r="40.7" fill="#c85a6e" stroke="#3a2730" stroke-width="3"/><circle cx="100" cy="130" r="45.9" fill="#f2b5be" stroke="#3a2730" stroke-width="3"/><path d="M85 120 l12 4 l-12 4" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M103 120 l12 4 l-12 4" fill="none" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/><path d="M96 144 h8" stroke="#3a2730" stroke-width="3" stroke-linecap="round"/></g></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for watering-can (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><rect x="50" y="80" width="90" height="80" rx="18" fill="#7fa07a" stroke="#3a2730" stroke-width="5"/> <path d="M60 80 q35 -55 70 0" fill="none" stroke="#3a2730" stroke-width="7"/> <path d="M52 110 L12 70" stroke="#3a2730" stroke-width="10" stroke-linecap="round"/><circle cx="12" cy="68" r="10" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 625 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for weed-clump (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><path d="M60 140 l-18 -60 l14 12 l4 -30 l8 24 l12 -20 l-6 60z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M100 140 l-18 -72 l14 12 l4 -36 l8 24 l12 -20 l-6 68z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M140 140 l-18 -84 l14 12 l4 -42 l8 24 l12 -20 l-6 76z" fill="#7fa07a" stroke="#3a2730" stroke-width="4"/><path d="M70 140 q10 30 -6 44 M100 140 q-4 26 10 40 M130 140 q8 22 -2 38" fill="none" stroke="#8a6248" stroke-width="4"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 740 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<!-- Stand-in for windbreak (art/placeholders, CLAUDE.md §2): form and layout only, not art. Built by tools/art-prep. -->
|
||||
<g transform="translate(76.8 76.8) scale(1.7920)"><path d="M30 150 v-90" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M48 143.1116982174284 v-86.1731656763491" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M66 137.27207793864216 v-82.92893218813452" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M84 133.37016841479684 v-80.76120467488713" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M102 132 v-80" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M120 133.37016841479684 v-80.76120467488713" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M138 137.27207793864216 v-82.92893218813452" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M156 143.11169821742837 v-86.1731656763491" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M174 150 v-90" stroke="#b98a5a" stroke-width="12" stroke-linecap="round"/><path d="M24 100 Q100 75 176 100" fill="none" stroke="#8a6248" stroke-width="6"/><path d="M24 128 Q100 103 176 128" fill="none" stroke="#8a6248" stroke-width="6"/> <path d="M30 150 v30 M170 150 v30" stroke="#8a6248" stroke-width="8" stroke-linecap="round"/></g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"expect": "duplicate-id",
|
||||
"why": "Two entries with one id: a message between players would be ambiguous.",
|
||||
"entries": [
|
||||
{
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
},
|
||||
{
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Another fixture text."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "forbidden-word",
|
||||
"why": "A medical-claim word, inside a hyphenated compound.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text about self-healing."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"expect": "forbidden-word",
|
||||
"why": "A name from The Little Prince, in the Czech text.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence.",
|
||||
"cs": "Fixture text, Malý princ."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "forbidden-word",
|
||||
"why": "A name from Tolkien.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text naming Gandalf."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "forbidden-word",
|
||||
"why": "Names the state the game never names, capitalised to prove case is ignored.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text for the Lonely."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "schema",
|
||||
"why": "An id is what travels between players; it can never be a sentence.",
|
||||
"entry": {
|
||||
"id": "meet me at the station",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"expect": "no-source",
|
||||
"why": "Every sentence names its source.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"expect": "no-tradition",
|
||||
"why": "Missing tradition tag.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "not-public-domain",
|
||||
"why": "A source not verified public domain, and not written by the author for Rosea.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "stoic",
|
||||
"translation": null,
|
||||
"publicDomain": false,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "promises-outcome",
|
||||
"why": "Honestly marked as promising an outcome.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "promises-outcome",
|
||||
"why": "Promises an outcome while marked promisesOutcome: false. Flagged for human review.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture: everything will be fine."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "too-long",
|
||||
"why": "Over the length cap.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text that runs on far past the cap. Fixture text that runs on far past the cap. Fixture text that runs on far past the cap. Fixture text that runs on far past the cap. Fixture text that runs on far past the cap. Fixture text that runs on far past the cap."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "KJV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"expect": "translation-under-copyright",
|
||||
"why": "A modern Bible translation that is still under copyright.",
|
||||
"entry": {
|
||||
"id": "fixture-entry",
|
||||
"text": {
|
||||
"en": "Fixture text, not a real sentence."
|
||||
},
|
||||
"source": {
|
||||
"work": "Fixture",
|
||||
"author": null,
|
||||
"tradition": "biblical",
|
||||
"translation": "NIV",
|
||||
"publicDomain": true,
|
||||
"verifiedBy": "Fixture",
|
||||
"verifiedAt": "2026-11-01"
|
||||
},
|
||||
"use": [
|
||||
"sunset"
|
||||
],
|
||||
"tone": "gentle",
|
||||
"promisesOutcome": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# The hope library
|
||||
|
||||
One JSON file per source tradition (`biblical.json`, `stoic.json`, `rosea.json`, …).
|
||||
Each file is an array of entries in the shape of
|
||||
[`hope-sentence.schema.json`](../../packages/schema/schemas/hope-sentence.schema.json)
|
||||
(CLAUDE.md §6.1).
|
||||
|
||||
**It is empty on purpose.** Every entry carries `verifiedBy` and `verifiedAt`, which
|
||||
record that a person checked the source and its public-domain status. An agent
|
||||
cannot make that check, so agents do not add entries. They may prepare a candidate
|
||||
list elsewhere for the author to verify.
|
||||
|
||||
Run `pnpm validate:library` after any change. The validator also runs every file
|
||||
in [`../fixtures/`](../fixtures/), and **fails if any fixture passes**.
|
||||
|
||||
Before the first release: at least 365 entries with `"use": ["sunset", …]`, so that
|
||||
no sunset sentence repeats within a year.
|
||||
@@ -0,0 +1,123 @@
|
||||
# ART.md — how every picture is made
|
||||
|
||||
Every illustration in Rosea Domi goes through this pipeline. A picture that skipped a step is
|
||||
not shipped, however good it looks (CLAUDE.md §7).
|
||||
|
||||
- **What the pictures look like:** [`art/STYLE.md`](../art/STYLE.md). Mark approved it on
|
||||
2026-11-01 (S1–S5 in its §0).
|
||||
- **Which pictures exist:** [`art/manifest.json`](../art/manifest.json), Phase 1 first.
|
||||
- **The tools:** [`tools/art-prep/`](../tools/art-prep/). It turns those two files into prompts,
|
||||
stand-ins and the board, and moves accepted pictures into `art/final/`.
|
||||
- **The board:** a private claude.ai page, *Rosea Domi Art Board*. It is published from
|
||||
`tools/art-prep/dist/board/`, and Mark works there.
|
||||
|
||||
---
|
||||
|
||||
## 1. The steps
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
style["art/STYLE.md<br/>§1 system prompt, §7 review points"]
|
||||
manifest["art/manifest.json<br/>every picture"]
|
||||
prep["tools/art-prep<br/>pnpm art:board"]
|
||||
board["Art board<br/>(claude.ai, private)"]
|
||||
gen["Mark's image generator"]
|
||||
final["art/final/*.webp"]
|
||||
app["apps/rosea<br/>(Phase 1 onward)"]
|
||||
style --> prep
|
||||
manifest --> prep
|
||||
prep -- "prompts, stand-ins" --> board
|
||||
board -- "copy prompt" --> gen
|
||||
gen -- "paste picture" --> board
|
||||
board -- "accepted: Claude runs pnpm art:accept" --> final
|
||||
final -- "git" --> app
|
||||
```
|
||||
|
||||
1. **Prompt.** `pnpm art:board` builds every prompt from STYLE.md §1 and the manifest. A
|
||||
prompt is never typed by hand, so the rose is described the same way every time. Claude
|
||||
then republishes the board.
|
||||
2. **Make.** Mark copies a prompt into his image generator. He starts with `rose-sheet`, the
|
||||
character sheet, because every rose prompt asks for it as the reference picture.
|
||||
3. **Paste.** Mark pastes or drops the result onto its card. The board measures it at once:
|
||||
its shape, whether the background is transparent, and for a sprite sheet whether each cell
|
||||
holds its own drawing and stays clear of the cut lines.
|
||||
4. **Claude's review.** Claude reads the uploaded picture and checks it against STYLE.md §7
|
||||
and §8: likeness to the book, soul, and painted words. Claude writes the review into the
|
||||
card's row, and it shows on the card as *Claude's review*.
|
||||
5. **Mark's approval.** *Accept* or *Another try*, with an optional note. The note goes into
|
||||
the next prompt for that picture.
|
||||
6. **Into the game.** Claude downloads the accepted picture from the board, runs
|
||||
`pnpm art:accept <id> <file>`, and commits the WebP files on an `art/<set>` branch.
|
||||
`art:accept` cuts sprite sheets apart, checks again and keeps each file within budget
|
||||
(§4). Claude then writes `final` into the row, and the card says *In art/final/*.
|
||||
|
||||
**The Phase 0 gate** is one picture all the way through these six steps (ROADMAP.md, Phase 0).
|
||||
The board starts with `rose-sheet`. The first picture the app will actually show is the app
|
||||
icon.
|
||||
|
||||
## 2. The manifest
|
||||
|
||||
`art/manifest.json` says what is wanted, never whether it is done. Progress lives on the board.
|
||||
Each picture has an id, a kind, the size it is made at, its background, where it is used, and
|
||||
the words its prompt is built from. `tools/art-prep` refuses a manifest with any of these:
|
||||
|
||||
- an id that repeats, or that isn't lower-case words joined by hyphens
|
||||
- a size image generators don't offer
|
||||
- a grid that doesn't match its cells, or doesn't divide the sheet into whole pixels
|
||||
- a character without a sheet
|
||||
- a sprite or layer on a full background
|
||||
- a review point that STYLE.md §7 doesn't have
|
||||
- **any forbidden word or name** from `@rosea/content`, the same list `lint:copy` uses. A prompt
|
||||
that names the book's title, its author or anything in Tolkien never reaches a generator.
|
||||
|
||||
## 3. The board
|
||||
|
||||
The board is the Panda Domi art board, adapted for Rosea. Its source is
|
||||
`tools/art-prep/board/index.html`. `pnpm art:board` fills in the product name from
|
||||
`@rosea/schema` and writes the page, `board-data.json` and the stand-ins to
|
||||
`tools/art-prep/dist/board/`, which is git-ignored.
|
||||
|
||||
- **Stand-ins** are Claude's SVG placeholders from `tools/art-prep/src/placeholders.ts`. They
|
||||
are committed under `art/placeholders/`, and a test fails if they drift from the manifest.
|
||||
- **The board's store** (claude.ai artifact storage) holds one row per picture: the uploaded
|
||||
image's id, its measurements, the status, Mark's note, Claude's review and `final`. Only
|
||||
editors of the board can write.
|
||||
- **All at once:** every picture still to make can go out as one long prompt. Files dropped
|
||||
together are matched to pictures by their names.
|
||||
|
||||
### Decided 2026-11-01: a claude.ai board, not a page on 127.0.0.1
|
||||
|
||||
The roadmap first planned `tools/art-prep` as a page served on 127.0.0.1. Mark asked instead
|
||||
for the board Panda Domi already uses. It works from any device, it keeps the pictures between
|
||||
sessions, and Claude can read it. `tools/art-prep` stays: it builds the board's files and runs
|
||||
the accept step.
|
||||
|
||||
**Privacy.** Only generated art and Mark's notes go to the board. No player data, ever: the
|
||||
app never talks to the board, and pictures reach the app only through git (`art/final/`). The
|
||||
board is private to Mark unless he shares it.
|
||||
|
||||
## 4. The budget per final picture
|
||||
|
||||
Every final picture is precached, so a player downloads all of them once. `art:accept`
|
||||
encodes WebP at quality 82, then 72, then 62, and refuses a picture that is still over its
|
||||
budget.
|
||||
|
||||
| Kind | Budget | Why |
|
||||
|:--|:--|:--|
|
||||
| Garden layer (1024 × 1536) | 350 KB | Four layers: about 1.4 MB, the largest share of the bundle |
|
||||
| Character sheet | 400 KB | A reference only. It is kept in `art/final/` but never shipped |
|
||||
| Single picture, sprite-sheet cell | 120 KB | Small things over the garden |
|
||||
| App icon | 120 KB | Phase 1 also makes the PNG sizes the web manifest needs from it |
|
||||
|
||||
`art:accept` never makes a picture bigger. A picture smaller than its size is kept at its own
|
||||
size, and the step says so.
|
||||
|
||||
## 5. What is not here yet
|
||||
|
||||
- **The app does not show any final picture yet.** Phase 1 builds the rose's screen and swaps
|
||||
the stand-ins for `art/final/` files. The app icon (`apps/rosea/public/icon.svg`) is still a
|
||||
stand-in.
|
||||
- **A likeness check by machine.** Likeness to the book is judged by Claude's review and
|
||||
Mark's eye (STYLE.md §8). No automatic comparison exists.
|
||||
- **Fox, planets and berries.** These are Phase 2. Their pictures join the manifest with the
|
||||
Phase 2 feature docs.
|
||||
@@ -0,0 +1,107 @@
|
||||
# Rosea Domi — gameplay loop (decided 2026-10-28)
|
||||
|
||||
Rosea is still a game: every visit has real things to do. Art serves play, never replaces it. Core
|
||||
purpose: training for real relationships — the habits learned tending the rose and the fox are the
|
||||
habits Amicitia Domi needs with people. Amicitia is promoted openly (§5); its door opens when the fox
|
||||
starts leading to real people.
|
||||
|
||||
## 1. The rose
|
||||
|
||||
- Actions with a touch of skill (feel, not a button): water (pour slowly until the leaves lift; too
|
||||
much is as bad as too little), shade from wind at the right moment, pull overnight weeds, gather
|
||||
fallen petals.
|
||||
- She drifts, never breaks. Neglect makes her turn away and close a little (like a friend drifting to
|
||||
an outer circle in Amicitia). Nothing earned disappears.
|
||||
- Short visits only hold her; real time brings full bloom (mirrors Amicitia: check-ins freeze drift,
|
||||
real time climbs). *Real time* means calendar days on which the care actually helped — never minutes
|
||||
on screen. A long session is worth no more than a short one with the same care (decided 2026-11-01).
|
||||
- The daily sentence comes from the rose, not from the sunset clock. She waits with a folded petal;
|
||||
best given at sunset, but never missed. Coming back on nearby days gives a little more (e.g. an
|
||||
earlier sentence remembered). A gap is never punished; no streak counter exists.
|
||||
|
||||
## 2. Numbers — measured and transparent
|
||||
|
||||
Her face and posture are the surface. One tap opens the real numbers: water, warmth, days of care,
|
||||
trend. Everything measured is visible on request; nothing is hidden, nothing is shouted.
|
||||
|
||||
## 3. The fox
|
||||
|
||||
- Taming is touch and food: pet and brush the fox; feed it.
|
||||
- The rose tells you what the fox wants today.
|
||||
- Food = berries. Before there are friends, a wild berry bush beside the player's own rose ripens when
|
||||
their care actually helped her, so the fox is never hungry without other players (decided
|
||||
2026-11-01). Later, berries also come from tending forgotten roses of other players: friends'
|
||||
(Phase 3) and, with the shared sky, strangers' (Phase 4) — an addition, never a requirement. A
|
||||
forgotten rose stays theirs; tending it ripens the wild berry bush beside it. Anti-farming: one
|
||||
harvest per bush per day, and only when the care actually helped (e.g. water when she truly needed
|
||||
it).
|
||||
- Your own rose's growth decides berry quality: wild strawberries → blueberries → raspberries →
|
||||
blackberries → rose hips (the rare top treat; the rose's own fruit — ties rose and fox together).
|
||||
- No trees, no apples, no hunting. Keep the screen minimal.
|
||||
|
||||
## 4. Teaching the player
|
||||
|
||||
- The game is taught in play: the rose and the fox speak in speech bubbles — "this is what you need to
|
||||
do" — and remind the player when something is forgotten. Never assume the player read anything.
|
||||
- Bubble text comes from the curated copy library (no free text, same rules as the hope library).
|
||||
- A Letter from the Gardener holds the deeper why and can be re-read any time — it is never required
|
||||
to understand how to play.
|
||||
|
||||
## 5. From roses to real people — the bridge to Amicitia (decided)
|
||||
|
||||
- Amicitia Domi is promoted openly as the door to real contact.
|
||||
- Players are known only by the name they give their rose (a nickname; it may be their real name if
|
||||
they choose). Rosea never knows real names.
|
||||
- Lantern: once the path between two roses has grown into a road, either player may light a lantern
|
||||
("I'd like to talk"). A one-sided lantern is invisible to the other. When both have lit one, the
|
||||
game says so. The lantern travels only device to device and never passes through Lucerna, the
|
||||
discovery service, despite the shared name (decided 2026-11-01).
|
||||
- No personal data exchanged: the two apps swap anonymous keys device to device; each appears in
|
||||
Amicitia under their rose's name.
|
||||
- Before a match, curated sentences sent from the rose carry the Amicitia icon and "a taste of
|
||||
Amicitia" — a visible taste, no real contact. (Rosea's own sync carries them, so the label never
|
||||
says Amicitia sent them; decided 2026-11-01.) After a match, free conversation happens only in
|
||||
Amicitia, never in Rosea.
|
||||
- No doors, no closing. Rosea has no "close the door" action; paths only grow. A lit lantern stays
|
||||
lit. Whether a connection lives or fades is Amicitia's concern, not Rosea's.
|
||||
- Safety note (Claude's judgement): Rosea needs no block because it has no free text; Amicitia, where
|
||||
free text begins, must still have a quiet safety block for harassment — not promoted.
|
||||
|
||||
## 6. The first days, and the journey as the second pillar (decided)
|
||||
|
||||
- Main risk (Claude's view, agreed): lonely players are the ones who quietly drop off. The beauty is
|
||||
not the hard part; the first days must be rewarding enough that players stay long enough to be
|
||||
changed by the game.
|
||||
- Tending the rose and the fox alone is not yet enough gameplay. The second pillar is the journey:
|
||||
visiting the lonely grown-ups' planets (king, vain man, drunkard, businessman, lamplighter,
|
||||
geographer), each with its own real things to do — so there is always somewhere to go and something
|
||||
new to discover from day one.
|
||||
- Design rule: every early session ends with visible progress and a reason to return tomorrow (a new
|
||||
place glimpsed, a berry kind closer, the fox a step nearer) — never with guilt.
|
||||
|
||||
## 7. The first minutes — and what Rosea is (decided, corrected 2026-10-28)
|
||||
|
||||
- Rosea Domi is its own game, by purpose: it exists to lead players into Amicitia Domi. It is not a
|
||||
Little Prince game and never presents itself as one.
|
||||
- From Saint-Exupéry it takes one idea: taming/binding someone makes you responsible for them, and
|
||||
tending is how that responsibility is lived. The book is complementary inspiration, nothing more.
|
||||
- The planets and lonely grown-ups stay as a quiet, familiar echo that makes the first minutes feel
|
||||
recognisable — never named, never explained in-game as the book.
|
||||
- No text from the book; no title, names or "you may know this book" prompts in the game, its name,
|
||||
logo or marketing (the estate also holds trademarks on the title).
|
||||
- A Letter from the Gardener is where everything is taught: the one sentence of inspiration, the river
|
||||
of life, why the art looks as it does, and how the game leads to Amicitia.
|
||||
- The Letter is clear about the difference: Rosea's philosophy and many of its small things (berries
|
||||
and rose hips, the lanterns, the paths between roses, the real sunset, the shared sky, Amicitia)
|
||||
were never in the book. The familiarity is a doorway; what lies behind it is Rosea's own.
|
||||
|
||||
## 8. How much comes from the book — stated precisely (decided)
|
||||
|
||||
- Taken as reference: the book's structure and the shape of the gameplay loop (rose, fox, the journey
|
||||
through the lonely grown-ups' planets) — almost the whole book is echoed in the game.
|
||||
- Skipped: the pilot in the desert. It does not translate into play and has no place in Rosea.
|
||||
- Visual style: a direction only — never, ever copying the illustrations (see `art/STYLE.md`).
|
||||
- Rosea's own philosophy: the paths, and the river of life with its whirlpools, drawn from Pascal and
|
||||
Nietzsche and Mark's "vortex of continuum". These are explained in A Letter from the Gardener.
|
||||
- Idea, open: a companion book in which these philosophical concepts are evaluated and written out at
|
||||
length — the Letter is its short form.
|
||||
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
A Letter from the Gardener: the author's own words, signed by the author.
|
||||
Agents scaffold this file and never write in it (CLAUDE.md preamble and §1).
|
||||
|
||||
How it reaches the player: the app bundles this file at build time and shows
|
||||
it at #letter, offline included. While this file holds nothing but comments,
|
||||
the player sees no way to the page.
|
||||
|
||||
Markdown that works: # and ## headings, paragraphs, lists with - or *,
|
||||
*emphasis*, and links to https:// pages or tel: numbers. Anything else is
|
||||
shown as plain text. `pnpm lint:copy` checks every word outside comments,
|
||||
as it does for all player-facing text.
|
||||
|
||||
The slots below are what GAMEPLAY.md and CLAUDE.md say the letter carries.
|
||||
Keep, reorder or delete them as you like: comments never reach the player.
|
||||
-->
|
||||
|
||||
<!-- Slot: the one sentence of inspiration (GAMEPLAY §7). -->
|
||||
|
||||
<!-- Slot: the river of life and its whirlpools (GAMEPLAY §8, CLAUDE.md §1). -->
|
||||
|
||||
<!-- Slot: why the art looks as it does (GAMEPLAY §7). -->
|
||||
|
||||
<!-- Slot: what in Rosea was never in the book: berries and rose hips, the
|
||||
lanterns, the paths, the real sunset, the shared sky, Amicitia (GAMEPLAY §7). -->
|
||||
|
||||
<!-- Slot: every feature and every principle, taught (CLAUDE.md §1). -->
|
||||
|
||||
<!-- Slot: how the game leads to Amicitia Domi (GAMEPLAY §5, §7). -->
|
||||
|
||||
<!-- Slot: the quiet door to real help: verified support lines, as links
|
||||
(CLAUDE.md §5.6 rule 5, G0.27). Not advice, no clinical claim. -->
|
||||
|
||||
<!-- Slot: the signature. -->
|
||||
@@ -0,0 +1,182 @@
|
||||
# Rosea Domi — phase plan
|
||||
|
||||
Working document. Lives at `docs/ROADMAP.md`. Companion to [`CLAUDE.md`](../CLAUDE.md) (the operating
|
||||
manual) and [`ART.md`](ART.md) (the illustration pipeline).
|
||||
|
||||
---
|
||||
|
||||
## 0. The thing to decide before anything else
|
||||
|
||||
Rosea joins a queue that already holds NARTOR, Memoria, Ludus, Panda Domi and others. The failure mode
|
||||
is not "Rosea is a bad idea" — it is many products at 70%.
|
||||
|
||||
So **Phases 0–1 are a spike, not a commitment**: the rose alone, the sunset, the library, offline, on
|
||||
a real phone. At the end of Phase 1 there is one honest question — *did the real sunset become part of
|
||||
my day?* — and a no is a legitimate answer that leaves a reusable sentence library and a sun module
|
||||
behind.
|
||||
|
||||
Solo evenings-and-weekends pace. Durations are calendar estimates, not effort (assumption).
|
||||
|
||||
---
|
||||
|
||||
## 1. Naming
|
||||
|
||||
`Rosea` — Latin *rose-coloured*: the colour of the sky at sunset and of the rose. Working name.
|
||||
In public always **Rosea Domi**; *Domi* never stands alone. Final name, trademark and domain checks are
|
||||
open (§6). The help section is **A Letter from the Gardener**. The discovery service is **Lucerna**
|
||||
(*lantern*).
|
||||
|
||||
---
|
||||
|
||||
## 2. What makes this different
|
||||
|
||||
Most games for lonely people either pretend to be a friend or count everything. Rosea does neither.
|
||||
Its unit of value is **time given to someone else** — and its best moments send the player *away* from
|
||||
the screen: to the real sunset, the real sky, real people.
|
||||
|
||||
Three consequences run through every phase:
|
||||
|
||||
1. **Growth comes from total care, never from a streak.** Nothing earned ever disappears.
|
||||
2. **No free text, no counting of people.** Comfort is chosen from a curated library; friendship is
|
||||
shown as a path, never a number.
|
||||
3. **Every beauty has a real twin.** Sunset, sunrise and constellations are real, computed on device.
|
||||
|
||||
---
|
||||
|
||||
## 3. Architecture in one paragraph
|
||||
|
||||
A pnpm/Turbo monorepo in TypeScript. `packages/schema` holds the contracts and generates the types.
|
||||
`packages/engine` is pure — growth, taming, the shared sky, and the sun maths, with time as a
|
||||
parameter. `packages/content` holds the hope library and its validator. `packages/storage` is the only
|
||||
module that opens IndexedDB, `packages/identity` the only one that holds keys, `packages/sync` the only
|
||||
one that talks to friends (WebRTC, Phase 3). `apps/rosea` is a **Svelte 5 + Vite PWA** — web first,
|
||||
from a link, no store — built by GitHub Actions and hosted on **GitHub Pages**, with a Gitea mirror. **Rust** is used where it earns its place: `services/lucerna`, the optional
|
||||
anonymous discovery service (Axum + SQLite, Phase 4), and later a **Tauri 2** shell for Android and iOS
|
||||
that gives local notifications without a server (Phase 6). All player state is an append-only event log;
|
||||
every visible thing is a pure function of it.
|
||||
|
||||
---
|
||||
|
||||
## 4. Phases
|
||||
|
||||
Each phase has a gate: a question with an observable answer. Failing it means the next phase does not
|
||||
start.
|
||||
|
||||
### Phase 0 — Foundations · ~1–2 weeks
|
||||
|
||||
- Repo, `.gitignore`, the 5 MB pre-commit hook, remotes, `CLAUDE.md`, this roadmap, `ART.md`.
|
||||
- `packages/schema` with the hope-sentence and care-event contracts; the library validator with its
|
||||
**negative fixtures**; `lint:copy` with the forbidden-words list.
|
||||
- The first **60 sentences** of the library, each sourced and verified public domain.
|
||||
- **Art**: `art/STYLE.md` drafted with Mark, `art/manifest.json` for Phase 1 assets, Claude's SVG
|
||||
placeholders, and the **art preparation page** (`tools/art-prep`) working end to end on one asset.
|
||||
*Decided 2026-11-01:* the art preparation page is a private claude.ai art board, like Panda Domi's;
|
||||
`tools/art-prep` builds its files and moves accepted pictures into `art/final/` (`docs/ART.md` §3).
|
||||
- A slot for *A Letter from the Gardener* — the author writes it; agents only scaffold the page.
|
||||
- **Decision recorded:** how the sunset invitation reaches the player on the web (see the notification
|
||||
trap in `CLAUDE.md` §8). *Decided 2026-11-01:* on the web the invitation lives inside the app only —
|
||||
no push server; real local notifications come with the Tauri shell (Phase 6).
|
||||
|
||||
**Gate:** `validate:library` passes on the 60 sentences and **fails on every negative fixture** with a
|
||||
message naming the problem; one illustration has gone through the full pipeline — prompt, paste,
|
||||
automatic checks, Claude's review, Mark's approval — into `art/final/`.
|
||||
|
||||
### Phase 1 — The rose alone · ~3–4 weeks · the spike
|
||||
|
||||
- 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 (`docs/GAMEPLAY.md` §1–2, §4).
|
||||
- **The sun**: real local sunset and sunrise, on device; polar day/night handled. Location: 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.** A finer guess (country from IP or carrier) is an open idea — it costs a network call, so it must be weighed against local-first.
|
||||
- **The in-game sunset** — move the chair, watch it again — as comfort and rehearsal; it tells the
|
||||
player when the real one is tonight.
|
||||
- **The day's sentence comes from the rose** (`docs/GAMEPLAY.md` §1): she waits with a folded petal;
|
||||
sunset is the best moment to open it, but it is never lost and no streak exists.
|
||||
- Installable PWA, fully offline, `navigator.storage.persist()`, export-my-rose.
|
||||
- The offline Playwright suite.
|
||||
|
||||
**Out of scope:** planets, fox, friends, any server.
|
||||
|
||||
**Gate — the spike's real question.** Mark plays it daily for two weeks on his phone. Then: *did he go
|
||||
and look at the real sunset without the game nagging him, and did the rose make him want to come back?*
|
||||
Yes on both is a go. Yes only on the second means a pleasant toy, not Rosea. No on both is a clean stop.
|
||||
|
||||
### Phase 2 — The planets and the fox · ~4–6 weeks
|
||||
|
||||
- The planets of lonely grown-ups, one at a time, each designed in its own feature doc (they need not
|
||||
all work the same way).
|
||||
- The fox follows at a distance and comes closer through **how the player acts**; short taming at the
|
||||
end of the journey. His berries come from the wild bush beside the player's own rose
|
||||
(`docs/GAMEPLAY.md` §3), so nothing here needs another player.
|
||||
- Collections: visitors who leave mementos while the player is away; the "sheep album" of the rose's
|
||||
strange requests; rare visitors with hidden conditions (sunrise-only visitors among them).
|
||||
- The *Geographer's book* — optional, private numbers about the player's own time.
|
||||
|
||||
**Gate:** a player who has never heard of the book finishes the first three planets and can say, in
|
||||
their own words, what one of them felt like.
|
||||
|
||||
### Phase 3 — Friends · ~4–6 weeks
|
||||
|
||||
- Tending a friend's rose; their fox brings them a real trace (a petal in your colour) and, now and
|
||||
then, a comfort line **you chose from the library**.
|
||||
- Thanks as one optional gesture — their fox visits your rose.
|
||||
- Paths between roses: footprints → trail → road.
|
||||
- Friend-to-friend sync over WebRTC: care travels like letters and merges when devices meet.
|
||||
- Invite by link; no account.
|
||||
- Forgotten friends' roses ripen berries for the fox (`docs/GAMEPLAY.md` §3).
|
||||
- The bridge to Amicitia: once a path is a road, lanterns, and the device-to-device key swap
|
||||
(`docs/GAMEPLAY.md` §5).
|
||||
|
||||
**Gate:** five friends, two weeks, no reminders from Mark. *Do they come back on their own, and does
|
||||
at least one of them describe a moment of being cared for?*
|
||||
|
||||
### Phase 4 — The shared sky · ~4–6 weeks · opt-in, separable
|
||||
|
||||
- `services/lucerna` in Rust: anonymous traces only (coarse cell, day bucket, gesture, auto-delete).
|
||||
- The shared night sky made of **real constellations**; acts of care light it; a completed
|
||||
constellation opens a new planet for everyone.
|
||||
- The lamplighter's wave: lamps following the sunset around the globe.
|
||||
- Keeping an absent stranger's rose alive with light — anonymous, no contact.
|
||||
- The consent ladder toward strangers: traces → a light → foxes meet only if both agree.
|
||||
|
||||
**Gate:** deleting `services/lucerna` leaves Phases 1–3 fully working, with no dead controls and no
|
||||
errors.
|
||||
|
||||
### Phase 5 — Real meetings and sharing · ~3–4 weeks
|
||||
|
||||
- One shared daily moment for everyone, and a spoiler-free image of your sky to share.
|
||||
- Group meetings in public places only (in the spirit of community days); never one-to-one.
|
||||
- The yearly moment on the anniversary of the player's first day.
|
||||
|
||||
**Gate:** a share image leaves the device containing nothing that identifies the player or anyone
|
||||
else.
|
||||
|
||||
### Phase 6 — Stores and money · ongoing
|
||||
|
||||
- Tauri 2 shell for Android and iOS: local sunset notifications without a server.
|
||||
- Monetisation — **not decided** (§6). Constraints already set: tending others is always free; no
|
||||
ads, no subscription-only, no sale of data.
|
||||
|
||||
---
|
||||
|
||||
## 5. Risks, stated as risks
|
||||
|
||||
| Risk | Why it could kill this | What reduces it |
|
||||
|:--|:--|:--|
|
||||
| **It makes a lonely person feel worse** | Guilt, comparison or an unanswered gesture hurts most the people this is for. | The Soul section in every review; `soul.md`; no counts, no streaks, no neglect notifications. |
|
||||
| **Cold start** | Phases 3–5 need people; Mark will have few players for months. | Phases 1–2 must stand alone; the fox's path to people comes after the game is already worth playing. |
|
||||
| **Content volume** | 365 sourced sentences and many planets is a lot of careful work. | Start with 60 sentences; library grows by tradition; the validator keeps quality. |
|
||||
| **Web notifications** | The sunset invitation may need a push server on the web, with a privacy cost. | Decided in Phase 0; the Tauri shell later removes the server. |
|
||||
| **Copyright** | The book and Tolkien are protected; a too-close image or line is a legal problem. | Forbidden-names lint; likeness check in the art pipeline; ideas only. |
|
||||
| **Medical-device scope** | Wellbeing claims can pull the app under medical rules. | Forbidden words in all copy, store text included. |
|
||||
| **Safety around strangers** | Lonely people are the people a scammer looks for. | No free text, ever; consent ladder; group meetings in public only. |
|
||||
| **One more product** | It competes for the same evenings as everything else in Domi. | The Phase 1 gate, treated as a real decision. |
|
||||
|
||||
---
|
||||
|
||||
## 6. Open questions
|
||||
|
||||
- **The sunrise mechanic** beyond sunrise-only visitors.
|
||||
- **The visual style.** Decided with Mark in `art/STYLE.md` before any final art is generated.
|
||||
- **The final name**, trademark and domain checks for Rosea Domi.
|
||||
- **Money.** Only the constraints are fixed (Phase 6).
|
||||
- **The Letter from the Gardener** — written by the author; its philosophy is his and is signed by him.
|
||||
@@ -0,0 +1,66 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { PRODUCT_NAME } from '@rosea/schema';
|
||||
import { en } from '@rosea/ui/copy';
|
||||
import { startStaticServer } from './static-server.js';
|
||||
|
||||
/**
|
||||
* The offline suite. CLAUDE.md §3 describes its full shape: tend the rose, walk
|
||||
* a planet, watch a sunset, close the tab, reopen, assert everything survived.
|
||||
* Phase 0 has no rose, so this proves the part everything else will stand on:
|
||||
* the app opens with no server anywhere, under its real base path.
|
||||
*
|
||||
* The server is genuinely CLOSED, not emulated: `context.setOffline` acts before
|
||||
* the service worker and would test the harness instead (imported from Ludus).
|
||||
*/
|
||||
test('the shell opens from the service worker with the server gone', async ({ browser }) => {
|
||||
const server = await startStaticServer();
|
||||
const context = await browser.newContext();
|
||||
let serverOpen = true;
|
||||
|
||||
try {
|
||||
const page = await context.newPage();
|
||||
await page.goto(server.url);
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
|
||||
// `clientsClaim` makes the FIRST worker control the page that registered it.
|
||||
// Without it, a player who opens the link once and loses signal has nothing.
|
||||
await page.waitForFunction(() => navigator.serviceWorker.controller !== null, null, { timeout: 20_000 });
|
||||
await page.waitForFunction(
|
||||
async () => {
|
||||
for (const name of await caches.keys()) {
|
||||
const cache = await caches.open(name);
|
||||
if ((await cache.keys()).some((r) => r.url.includes('index.html'))) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
null,
|
||||
{ timeout: 20_000 }
|
||||
);
|
||||
|
||||
await server.close();
|
||||
serverOpen = false;
|
||||
|
||||
// Proof the network is really gone, from outside the browser.
|
||||
await expect(fetch(server.url)).rejects.toThrow();
|
||||
|
||||
// 1. Reload the open tab.
|
||||
await page.reload();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
await expect(page.getByText(en.shell.preparing)).toBeVisible();
|
||||
|
||||
// 2. Close the tab and open a fresh one: a cold start, the shape of a player
|
||||
// coming back days later with no signal.
|
||||
await page.close();
|
||||
const again = await context.newPage();
|
||||
await again.goto(server.url);
|
||||
await expect(again.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
|
||||
// 3. A deep link inside the scope falls back to the shell, not an error page.
|
||||
await again.goto(`${server.url}somewhere/deeper`);
|
||||
await expect(again.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
} finally {
|
||||
// A test run leaves the machine as it found it (CLAUDE.md §5.7).
|
||||
await context.close();
|
||||
if (serverOpen) await server.close();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
/**
|
||||
* The main e2e suite. Runs against the BUILT bundle (`pnpm test:e2e` builds it
|
||||
* first), served by a server each spec starts on a free port, so there is no
|
||||
* port table to keep and no dev server to mistake for the product (CLAUDE.md §3).
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: '.',
|
||||
testMatch: /shell\.spec\.ts/,
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
retries: 0,
|
||||
reporter: [['list']],
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
trace: 'retain-on-failure'
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
/**
|
||||
* The offline suite — the product's central claim (CLAUDE.md §3). Separate
|
||||
* from the main suite because it asks a different question: not "does it
|
||||
* render" but "does it render with no server in the world".
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: '.',
|
||||
testMatch: /offline\.spec\.ts/,
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
retries: 0,
|
||||
reporter: [['list']],
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
trace: 'retain-on-failure'
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,129 @@
|
||||
import AxeBuilder from '@axe-core/playwright';
|
||||
import { expect, test, type Page } from '@playwright/test';
|
||||
import { PRODUCT_NAME } from '@rosea/schema';
|
||||
import { en } from '@rosea/ui/copy';
|
||||
import { parseLetter } from '@rosea/ui/letter';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { BASE, startStaticServer, type StaticServer } from './static-server.js';
|
||||
|
||||
let server: StaticServer;
|
||||
|
||||
test.beforeAll(async () => {
|
||||
server = await startStaticServer();
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await server.close();
|
||||
});
|
||||
|
||||
/** Opens the app and records every request and every CSP violation on the way. */
|
||||
async function open(page: Page): Promise<{ requests: string[]; cspViolations: string[] }> {
|
||||
const requests: string[] = [];
|
||||
const cspViolations: string[] = [];
|
||||
page.on('request', (r) => requests.push(r.url()));
|
||||
page.on('console', (m) => {
|
||||
if (m.type() === 'error' && /Content Security Policy/i.test(m.text())) cspViolations.push(m.text());
|
||||
});
|
||||
await page.goto(server.url);
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
// Let the worker register and precache, so its requests are counted too.
|
||||
await page.waitForFunction(() => navigator.serviceWorker.ready.then(() => true), null, { timeout: 20_000 });
|
||||
return { requests, cspViolations };
|
||||
}
|
||||
|
||||
test('the built app renders its name and its one line, under the base path', async ({ page }) => {
|
||||
await open(page);
|
||||
await expect(page.getByText(en.shell.preparing)).toBeVisible();
|
||||
await expect(page).toHaveTitle(PRODUCT_NAME);
|
||||
});
|
||||
|
||||
test('nothing is requested from any other origin', async ({ page }) => {
|
||||
const { requests } = await open(page);
|
||||
expect(requests.length, 'the page must have made requests for this to mean anything').toBeGreaterThan(0);
|
||||
expect(requests.filter((url) => !url.startsWith(server.origin + '/'))).toEqual([]);
|
||||
});
|
||||
|
||||
test('nothing is written to cookies or Web Storage', async ({ page }) => {
|
||||
await open(page);
|
||||
const written = await page.evaluate(() => ({
|
||||
cookie: document.cookie,
|
||||
localStorage: localStorage.length,
|
||||
sessionStorage: sessionStorage.length
|
||||
}));
|
||||
expect(written).toEqual({ cookie: '', localStorage: 0, sessionStorage: 0 });
|
||||
expect(await page.context().cookies()).toEqual([]);
|
||||
});
|
||||
|
||||
test('the built page carries the CSP and no inline script, and nothing violates it', async ({ page }) => {
|
||||
const { cspViolations } = await open(page);
|
||||
const html = await (await fetch(server.url)).text();
|
||||
|
||||
// Read from the DOM, not the raw HTML: Vite escapes the quotes as '.
|
||||
const csp = await page.locator('meta[http-equiv="Content-Security-Policy"]').getAttribute('content');
|
||||
expect(csp, 'CSP meta tag in the built index.html').toBeTruthy();
|
||||
expect(csp).toContain("default-src 'self'");
|
||||
expect(csp).not.toContain('unsafe-inline');
|
||||
expect(csp).not.toContain('unsafe-eval');
|
||||
|
||||
const inline = [...html.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script>/g)].filter(
|
||||
([, attrs, body]) => !/\bsrc=/.test(attrs ?? '') && (body ?? '').trim() !== ''
|
||||
);
|
||||
expect(inline.map(([tag]) => tag)).toEqual([]);
|
||||
expect(cspViolations).toEqual([]);
|
||||
|
||||
// The CSP is injected FIRST in <head>, ahead of <meta charset>, so it governs
|
||||
// every script. The charset must still fall in the first 1024 bytes or the
|
||||
// browser may guess the encoding; a CSP that grows can push it out.
|
||||
const charsetAt = Buffer.from(html).indexOf('<meta charset');
|
||||
expect(charsetAt, 'meta charset present').toBeGreaterThan(-1);
|
||||
expect(charsetAt, 'meta charset within the first 1024 bytes').toBeLessThan(1024);
|
||||
});
|
||||
|
||||
test('manifest scope, start_url and the service worker scope all equal the base path', async ({ page }) => {
|
||||
await open(page);
|
||||
|
||||
const manifestHref = await page.locator('link[rel="manifest"]').getAttribute('href');
|
||||
expect(manifestHref, 'manifest link').toBeTruthy();
|
||||
const manifest = (await (await fetch(new URL(manifestHref!, server.url))).json()) as Record<string, unknown>;
|
||||
|
||||
expect(manifest['scope']).toBe(BASE);
|
||||
expect(manifest['start_url']).toBe(BASE);
|
||||
expect(manifest['name']).toBe(PRODUCT_NAME);
|
||||
|
||||
const swScope = await page.evaluate(async () => (await navigator.serviceWorker.ready).scope);
|
||||
expect(swScope).toBe(server.url);
|
||||
|
||||
// The icon the manifest names must exist where the manifest says it is.
|
||||
const icons = manifest['icons'] as { src: string }[];
|
||||
for (const icon of icons) {
|
||||
const res = await fetch(new URL(icon.src, new URL(manifestHref!, server.url)));
|
||||
expect(res.status, icon.src).toBe(200);
|
||||
}
|
||||
});
|
||||
|
||||
test('the shell has no accessibility violations', async ({ page }) => {
|
||||
await open(page);
|
||||
const results = await new AxeBuilder({ page }).analyze();
|
||||
expect(results.violations.map((v) => `${v.id}: ${v.help}`)).toEqual([]);
|
||||
});
|
||||
|
||||
// Tests whichever state docs/LETTER.md is in: empty now, the author's words later.
|
||||
test('the Letter: no way to it while empty, and it opens from the garden once written', async ({ page }) => {
|
||||
const written = parseLetter(readFileSync(new URL('../docs/LETTER.md', import.meta.url), 'utf8')).length > 0;
|
||||
await open(page);
|
||||
const link = page.getByRole('link', { name: en.letter.title });
|
||||
|
||||
if (!written) {
|
||||
await expect(link).toHaveCount(0);
|
||||
await page.goto(server.url + '#letter');
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
await link.click();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(en.letter.title);
|
||||
const results = await new AxeBuilder({ page }).analyze();
|
||||
expect(results.violations.map((v) => `${v.id}: ${v.help}`)).toEqual([]);
|
||||
await page.getByRole('link', { name: en.letter.back }).click();
|
||||
await expect(page.getByRole('heading', { level: 1 })).toHaveText(PRODUCT_NAME);
|
||||
});
|
||||
@@ -0,0 +1,99 @@
|
||||
import { createReadStream, statSync } from 'node:fs';
|
||||
import { createServer, type Server } from 'node:http';
|
||||
import { extname, join, normalize, sep } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
/**
|
||||
* A throwaway static server for the BUILT app, under the test's control.
|
||||
*
|
||||
* It serves `apps/rosea/dist` under the same base path GitHub Pages will use
|
||||
* (`/Rosea/` unless ROSEA_BASE says otherwise), and 404s everything outside it.
|
||||
* Serving at `/` would hide every base-path bug (CLAUDE.md §8).
|
||||
*
|
||||
* It exists for the offline suite too. Playwright's `context.setOffline` and
|
||||
* `route().abort()` both act before the service worker is consulted, so they
|
||||
* test the harness and not the cache (imported from Ludus). The only honest
|
||||
* "no network" is no server: start one, let the worker precache, close it.
|
||||
*
|
||||
* Binds 127.0.0.1 on port 0, so the OS picks a free port (CLAUDE.md §5.7).
|
||||
*/
|
||||
|
||||
export const BASE = process.env['ROSEA_BASE'] ?? '/Rosea/';
|
||||
const DIST = fileURLToPath(new URL('../apps/rosea/dist', import.meta.url));
|
||||
|
||||
const MIME: Record<string, string> = {
|
||||
'.html': 'text/html; charset=utf-8',
|
||||
'.js': 'text/javascript; charset=utf-8',
|
||||
'.css': 'text/css; charset=utf-8',
|
||||
'.json': 'application/json; charset=utf-8',
|
||||
'.webmanifest': 'application/manifest+json; charset=utf-8',
|
||||
'.svg': 'image/svg+xml',
|
||||
'.map': 'application/json; charset=utf-8'
|
||||
};
|
||||
|
||||
export interface StaticServer {
|
||||
/** The app's URL, base path included, e.g. http://127.0.0.1:53211/Rosea/ */
|
||||
readonly url: string;
|
||||
readonly origin: string;
|
||||
readonly close: () => Promise<void>;
|
||||
}
|
||||
|
||||
export async function startStaticServer(): Promise<StaticServer> {
|
||||
try {
|
||||
statSync(join(DIST, 'index.html'));
|
||||
} catch (error) {
|
||||
throw new Error(`No built app at ${DIST}. Run \`pnpm build\` first. (${String(error)})`);
|
||||
}
|
||||
|
||||
const server: Server = createServer((req, res) => {
|
||||
const path = decodeURIComponent((req.url ?? '/').split('?')[0] ?? '/');
|
||||
|
||||
if (!path.startsWith(BASE)) {
|
||||
res.writeHead(404, { 'content-type': 'text/plain' });
|
||||
res.end(`outside ${BASE}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const rel = normalize(path.slice(BASE.length) || 'index.html');
|
||||
const file = join(DIST, rel);
|
||||
// Confine to DIST: a test server is still a server.
|
||||
if (!file.startsWith(DIST + sep) && file !== DIST) {
|
||||
res.writeHead(403).end();
|
||||
return;
|
||||
}
|
||||
|
||||
let target = file;
|
||||
try {
|
||||
if (statSync(target).isDirectory()) target = join(target, 'index.html');
|
||||
statSync(target);
|
||||
} catch {
|
||||
// Not on disk: an honest 404, which is what Pages would send.
|
||||
res.writeHead(404, { 'content-type': 'text/plain' });
|
||||
res.end('not found');
|
||||
return;
|
||||
}
|
||||
|
||||
res.writeHead(200, {
|
||||
'content-type': MIME[extname(target)] ?? 'application/octet-stream',
|
||||
// No HTTP cache, so whatever loads after the server is gone came from the
|
||||
// service worker and not from the browser's own cache.
|
||||
'cache-control': 'no-store'
|
||||
});
|
||||
createReadStream(target).pipe(res);
|
||||
});
|
||||
|
||||
await new Promise<void>((resolve) => server.listen(0, '127.0.0.1', resolve));
|
||||
const address = server.address();
|
||||
if (address === null || typeof address === 'string') throw new Error('static server did not bind a port');
|
||||
|
||||
const origin = `http://127.0.0.1:${address.port}`;
|
||||
return {
|
||||
origin,
|
||||
url: `${origin}${BASE}`,
|
||||
close: () =>
|
||||
new Promise<void>((resolve) => {
|
||||
server.closeAllConnections();
|
||||
server.close(() => resolve());
|
||||
})
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* The linter earns its place on the rules a compiler will not give: the ones
|
||||
* about intent. Types belong to `tsc --strict` and `svelte-check`; formatting
|
||||
* belongs to nobody.
|
||||
*
|
||||
* Two house rules live here:
|
||||
* - CLAUDE.md §7 "never swallow an error": `no-empty` with no empty catch.
|
||||
* - CLAUDE.md §7 "the engine is pure — enforced by a lint rule": the block
|
||||
* scoped to packages/engine/src below. `packages/engine/test/purity-lint.test.ts`
|
||||
* proves each ban fires, because a guard only ever seen not firing is untested.
|
||||
*/
|
||||
import js from '@eslint/js';
|
||||
import ts from 'typescript-eslint';
|
||||
import svelte from 'eslint-plugin-svelte';
|
||||
import svelteParser from 'svelte-eslint-parser';
|
||||
import globals from 'globals';
|
||||
|
||||
const CLOCK = 'Time is a parameter (`now: number`). A clock in the engine makes replaying the event log non-deterministic.';
|
||||
const DICE = 'Randomness is a parameter (`rng: () => number`) so a replay gives byte-identical derived state.';
|
||||
const IO = 'The engine performs no I/O. It returns values; packages/storage, packages/sync and the app do the rest.';
|
||||
const ZONE = 'The time zone is a parameter. The app reads the device zone; the engine never does.';
|
||||
const UTC_DAY = 'That is the UTC day. Days come from engine/src/time/localDay.ts and nowhere else (CLAUDE.md §7).';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
'**/dist/**',
|
||||
'**/node_modules/**',
|
||||
'**/.turbo/**',
|
||||
'**/generated/**',
|
||||
'**/playwright-report/**',
|
||||
'**/test-results/**'
|
||||
]
|
||||
},
|
||||
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs['flat/recommended'],
|
||||
|
||||
{
|
||||
languageOptions: {
|
||||
ecmaVersion: 2023,
|
||||
sourceType: 'module',
|
||||
globals: { ...globals.browser, ...globals.node }
|
||||
},
|
||||
rules: {
|
||||
'no-empty': ['error', { allowEmptyCatch: false }],
|
||||
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrors: 'none' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||
languageOptions: {
|
||||
parser: svelteParser,
|
||||
parserOptions: { parser: ts.parser }
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
// THE ENGINE IS PURE. Scoped to src/: tests may read clocks to build fixtures.
|
||||
files: ['packages/engine/src/**/*.ts'],
|
||||
rules: {
|
||||
'no-restricted-globals': [
|
||||
'error',
|
||||
{ name: 'fetch', message: IO },
|
||||
{ name: 'XMLHttpRequest', message: IO },
|
||||
{ name: 'WebSocket', message: IO },
|
||||
{ name: 'localStorage', message: IO },
|
||||
{ name: 'sessionStorage', message: IO },
|
||||
{ name: 'indexedDB', message: IO },
|
||||
{ name: 'document', message: IO },
|
||||
{ name: 'window', message: IO },
|
||||
{ name: 'globalThis', message: IO },
|
||||
{ name: 'navigator', message: IO },
|
||||
{ name: 'crypto', message: DICE },
|
||||
{ name: 'performance', message: CLOCK },
|
||||
{ name: 'setTimeout', message: CLOCK },
|
||||
{ name: 'setInterval', message: CLOCK },
|
||||
{ name: 'requestAnimationFrame', message: CLOCK },
|
||||
{ name: 'process', message: IO }
|
||||
],
|
||||
'no-restricted-properties': [
|
||||
'error',
|
||||
{ object: 'Date', property: 'now', message: CLOCK },
|
||||
{ object: 'Math', property: 'random', message: DICE },
|
||||
{ property: 'resolvedOptions', message: ZONE }
|
||||
],
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
{ selector: "NewExpression[callee.name='Date'][arguments.length=0]", message: CLOCK },
|
||||
{ selector: "CallExpression[callee.name='Date']", message: CLOCK },
|
||||
{
|
||||
selector: "CallExpression[callee.property.name='slice'][callee.object.callee.property.name='toISOString']",
|
||||
message: UTC_DAY
|
||||
},
|
||||
{ selector: 'ImportDeclaration[source.value=/^node:/]', message: IO },
|
||||
{ selector: 'ImportExpression', message: IO }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
files: ['**/test/**', '**/*.test.ts', '**/*.spec.ts', 'scripts/**', 'e2e/**'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-expressions': 'off'
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "rosea",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@9.12.3",
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "node scripts/install-hooks.mjs",
|
||||
"build": "turbo run build",
|
||||
"typecheck": "turbo run typecheck && tsc -p tsconfig.json --noEmit",
|
||||
"lint": "eslint .",
|
||||
"test": "turbo run test",
|
||||
"test:e2e": "turbo run build --filter=@rosea/app && playwright test --config=e2e/playwright.config.ts",
|
||||
"test:offline": "turbo run build --filter=@rosea/app && playwright test --config=e2e/playwright.offline.config.ts",
|
||||
"validate:library": "tsx scripts/validate-library.ts",
|
||||
"lint:copy": "tsx scripts/lint-copy.ts",
|
||||
"art:board": "tsx tools/art-prep/src/cli-board.ts",
|
||||
"art:accept": "tsx tools/art-prep/src/cli-accept.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@axe-core/playwright": "4.13.0",
|
||||
"@eslint/js": "9.39.5",
|
||||
"@playwright/test": "1.62.1",
|
||||
"@rosea/content": "workspace:*",
|
||||
"@rosea/schema": "workspace:*",
|
||||
"@rosea/ui": "workspace:*",
|
||||
"@types/node": "22.20.1",
|
||||
"eslint": "9.39.5",
|
||||
"eslint-plugin-svelte": "3.23.0",
|
||||
"globals": "16.5.0",
|
||||
"svelte": "5.56.9",
|
||||
"svelte-eslint-parser": "1.8.1",
|
||||
"tsx": "4.23.12",
|
||||
"turbo": "2.10.10",
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.69.0",
|
||||
"vitest": "3.2.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@rosea/content",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "The hope library and planets' scripts as data, the library validator, and the one list of forbidden words.",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./validate": "./src/validator.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"test": "vitest run --reporter=verbose"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rosea/schema": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "3.2.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* The core of `pnpm lint:copy` (CLAUDE.md §5.6, §7): what a player could read in
|
||||
* a file, and what is wrong with it. The script walks files; this decides.
|
||||
*/
|
||||
import { findForbidden } from './forbidden.js';
|
||||
|
||||
export interface CopyProblem {
|
||||
readonly line: number;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes comments, keeping line numbers. Comments are where the rules are
|
||||
* explained, and a rule must be nameable in the file that enforces it.
|
||||
* `//` after a `:` is a URL, not a comment.
|
||||
*/
|
||||
export function stripComments(source: string): string {
|
||||
const blank = (m: string): string => m.replace(/[^\n]/g, ' ');
|
||||
return source
|
||||
.replace(/<!--[\s\S]*?-->/g, blank)
|
||||
.replace(/\/\*[\s\S]*?\*\//g, blank)
|
||||
.replace(/(?<![:\\])\/\/[^\n]*/g, blank);
|
||||
}
|
||||
|
||||
// *Domi* is the ecosystem's word and never stands alone (CLAUDE.md preamble).
|
||||
const DOMI_ALONE = /(?<!(?:Rosea|Panda|Amicitia)[\s\u00a0])\bDomi\b/g;
|
||||
|
||||
/** Problems in one file's player-visible text. */
|
||||
export function lintCopy(source: string): CopyProblem[] {
|
||||
const text = stripComments(source);
|
||||
const lineOf = (index: number): number => text.slice(0, index).split('\n').length;
|
||||
const problems: CopyProblem[] = [];
|
||||
|
||||
for (const hit of findForbidden(text)) {
|
||||
problems.push({ line: lineOf(hit.index), message: `'${hit.term}' (${hit.category}): ${hit.why}` });
|
||||
}
|
||||
|
||||
for (const m of text.matchAll(DOMI_ALONE)) {
|
||||
problems.push({
|
||||
line: lineOf(m.index),
|
||||
message: "'Domi' on its own: the product is always Rosea Domi, and Domi never appears alone"
|
||||
});
|
||||
}
|
||||
|
||||
return problems.sort((a, b) => a.line - b.line);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* The one list of words and names that never reach a player (CLAUDE.md §5.6
|
||||
* rules 3 and 4). `lint:copy` and the library validator both read it, so the two
|
||||
* can never disagree.
|
||||
*
|
||||
* Matching is whole-word and case-insensitive, with inflections spelled out.
|
||||
* A stem match (`heal*`) would also catch *health*, and a rose can be healthy.
|
||||
*
|
||||
* `treat` is banned outright, including the fox's food: he eats *berries*.
|
||||
* `patient` is banned too. Patience is the cure Gandalf's spirit offers, so the
|
||||
* product may say *patience* and *patiently* but never *patient*.
|
||||
*/
|
||||
|
||||
export type ForbiddenCategory = 'medical' | 'unnamed-state' | 'little-prince' | 'tolkien';
|
||||
|
||||
export interface ForbiddenTerm {
|
||||
readonly term: string;
|
||||
readonly category: ForbiddenCategory;
|
||||
readonly why: string;
|
||||
}
|
||||
|
||||
const MEDICAL =
|
||||
'A medical claim pulls the product toward EU medical-device rules (CLAUDE.md §5.6 rule 3). Rosea comforts; it does not treat.';
|
||||
const UNNAMED =
|
||||
'The game never names the state for the player (CLAUDE.md §5.6 rule 4). It lets them feel seen instead.';
|
||||
const PRINCE = 'Nothing from The Little Prince by name or quote: one idea is borrowed, never its text (CLAUDE.md §5.6 rule 3).';
|
||||
const TOLKIEN = "Gandalf's spirit, never a name or a quote from Tolkien's works (CLAUDE.md §5.6 rule 3).";
|
||||
|
||||
const terms = (category: ForbiddenCategory, why: string, list: readonly string[]): ForbiddenTerm[] =>
|
||||
list.map((term) => ({ term, category, why }));
|
||||
|
||||
export const FORBIDDEN: readonly ForbiddenTerm[] = [
|
||||
...terms('medical', MEDICAL, [
|
||||
'therapy', 'therapies', 'therapist', 'therapists', 'therapeutic', 'therapeutically',
|
||||
'treat', 'treats', 'treated', 'treating', 'treatment', 'treatments',
|
||||
'heal', 'heals', 'healed', 'healing', 'healer', 'healers',
|
||||
'cure', 'cures', 'cured', 'curing', 'curative',
|
||||
'diagnose', 'diagnoses', 'diagnosed', 'diagnosing', 'diagnosis', 'diagnostic',
|
||||
'symptom', 'symptoms', 'symptomatic',
|
||||
'patient', 'patients',
|
||||
'disorder', 'disorders'
|
||||
]),
|
||||
...terms('unnamed-state', UNNAMED, ['lonely', 'lonelier', 'loneliest', 'loneliness']),
|
||||
...terms('little-prince', PRINCE, [
|
||||
'Little Prince', 'Petit Prince', 'Malý princ', 'Saint-Exupéry', 'Saint-Exupery', 'Exupéry', 'Exupery', 'B-612', 'B612'
|
||||
]),
|
||||
...terms('tolkien', TOLKIEN, [
|
||||
'Tolkien', 'Gandalf', 'Mithrandir', 'Frodo', 'Bilbo', 'Samwise', 'Aragorn', 'Galadriel', 'Sauron',
|
||||
// 'Middle-earth' also matches 'Middle earth': spaces and hyphens are interchangeable in a term.
|
||||
'Mordor', 'Rivendell', 'Middle-earth', 'hobbit', 'hobbits', 'Lothlórien', 'Lothlorien'
|
||||
])
|
||||
];
|
||||
|
||||
export interface ForbiddenHit {
|
||||
readonly term: string;
|
||||
readonly category: ForbiddenCategory;
|
||||
readonly why: string;
|
||||
/** Index into the scanned text. */
|
||||
readonly index: number;
|
||||
}
|
||||
|
||||
const escape = (s: string): string => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/[\s-]+/g, '[\\s\\u00a0-]+');
|
||||
|
||||
// Letters and digits on either side mean it is part of a longer word: *treaty*
|
||||
// does not contain *treat*. Hyphens and apostrophes are boundaries, so
|
||||
// *self-healing* is caught.
|
||||
const PATTERNS = FORBIDDEN.map((entry) => ({
|
||||
entry,
|
||||
regex: new RegExp(`(?<![\\p{L}\\p{N}])${escape(entry.term)}(?![\\p{L}\\p{N}])`, 'giu')
|
||||
}));
|
||||
|
||||
/**
|
||||
* Every forbidden term in `text`, in order of appearance, once per place.
|
||||
* `Middle-earth` and `Middle earth` both match either spelling, so a second hit
|
||||
* at the same index is the same word and is dropped.
|
||||
*/
|
||||
export function findForbidden(text: string): ForbiddenHit[] {
|
||||
const byIndex = new Map<number, ForbiddenHit>();
|
||||
for (const { entry, regex } of PATTERNS) {
|
||||
regex.lastIndex = 0;
|
||||
for (let m = regex.exec(text); m !== null; m = regex.exec(text)) {
|
||||
if (!byIndex.has(m.index)) byIndex.set(m.index, { ...entry, index: m.index });
|
||||
}
|
||||
}
|
||||
return [...byIndex.values()].sort((a, b) => a.index - b.index);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { lintCopy, stripComments, type CopyProblem } from './copy-lint.js';
|
||||
export { FORBIDDEN, findForbidden, type ForbiddenCategory, type ForbiddenHit, type ForbiddenTerm } from './forbidden.js';
|
||||
@@ -0,0 +1,148 @@
|
||||
/**
|
||||
* The hope-library validator (CLAUDE.md §5.5, §5.6 rule 2, §6.1).
|
||||
*
|
||||
* The schema says what shape an entry has. This says whether it may be shown
|
||||
* to a person: sourced, public domain or the author's own, short enough to
|
||||
* read at sunset, free of forbidden words, and not promising anything.
|
||||
*
|
||||
* Its negative fixtures in `content/fixtures/` ARE the validator: a rule here
|
||||
* without a fixture proving it fires is a review blocker.
|
||||
*/
|
||||
import type { HopeSentence } from '@rosea/schema';
|
||||
import { validateHopeSentence } from '@rosea/schema/validate';
|
||||
import { findForbidden } from './forbidden.js';
|
||||
|
||||
export type Rule =
|
||||
| 'schema'
|
||||
| 'no-source'
|
||||
| 'not-public-domain'
|
||||
| 'translation-under-copyright'
|
||||
| 'too-long'
|
||||
| 'promises-outcome'
|
||||
| 'forbidden-word'
|
||||
| 'no-tradition'
|
||||
| 'duplicate-id';
|
||||
|
||||
export interface Problem {
|
||||
readonly id: string;
|
||||
readonly rule: Rule;
|
||||
readonly message: string;
|
||||
}
|
||||
|
||||
/** Characters per language. A sentence opened at sunset is read on a phone, once. */
|
||||
export const LENGTH_CAP = 240;
|
||||
|
||||
/**
|
||||
* The tradition tag for a line the author wrote for Rosea. Those are not public
|
||||
* domain, and need not be: the author owns them (CLAUDE.md §5.6 rule 2).
|
||||
*/
|
||||
export const AUTHOR_TRADITION = 'rosea';
|
||||
|
||||
/**
|
||||
* Translations known to be in the public domain. Anything else is assumed to
|
||||
* be under copyright until someone checks and adds it here, with the source of
|
||||
* that check in the commit.
|
||||
*/
|
||||
export const PUBLIC_DOMAIN_TRANSLATIONS: ReadonlySet<string> = new Set([
|
||||
'KJV', // King James Version, 1611/1769
|
||||
'Bible kralická', // 1579–1613
|
||||
'ASV', // American Standard Version, 1901
|
||||
'Douay-Rheims', // 1582–1610, Challoner revision 1752
|
||||
'YLT', // Young's Literal Translation, 1862
|
||||
'WEB' // World English Bible, dedicated to the public domain
|
||||
]);
|
||||
|
||||
/**
|
||||
* Phrasings that promise an outcome. A heuristic, so a hit means "a human must
|
||||
* read this", and the entry fails until one does. An honest `promisesOutcome:
|
||||
* true` fails the same way.
|
||||
*/
|
||||
const OUTCOME_PHRASES: readonly RegExp[] = [
|
||||
/\beverything will be\b/i,
|
||||
/\b(it|you|things) will (all )?(be|get) (better|fine|okay|ok|alright|all right|well)\b/i,
|
||||
/\byou will (find|never|always|soon)\b/i,
|
||||
/\bi promise\b/i,
|
||||
/\bguarantee/i
|
||||
];
|
||||
|
||||
const idOf = (input: unknown): string =>
|
||||
typeof input === 'object' && input !== null && typeof (input as { id?: unknown }).id === 'string'
|
||||
? (input as { id: string }).id
|
||||
: '(no id)';
|
||||
|
||||
/** Every reason `input` may not be shown to a player. Empty means it may. */
|
||||
export function validateEntry(input: unknown): Problem[] {
|
||||
const id = idOf(input);
|
||||
const problem = (rule: Rule, message: string): Problem => ({ id, rule, message });
|
||||
const problems: Problem[] = [];
|
||||
|
||||
const schema = validateHopeSentence(input);
|
||||
if (!schema.ok) {
|
||||
for (const error of schema.errors) {
|
||||
if (/^\(root\) .*'source'/.test(error)) {
|
||||
problems.push(problem('no-source', 'has no source: every sentence names where it comes from'));
|
||||
} else if (/^\/source .*'tradition'|^\/source\/tradition /.test(error)) {
|
||||
problems.push(problem('no-tradition', 'has no tradition tag: the library stays mixed, so each line says which one it is from'));
|
||||
} else {
|
||||
problems.push(problem('schema', error));
|
||||
}
|
||||
}
|
||||
return problems;
|
||||
}
|
||||
|
||||
const entry: HopeSentence = schema.value;
|
||||
const { source } = entry;
|
||||
|
||||
if (!source.publicDomain && source.tradition !== AUTHOR_TRADITION) {
|
||||
problems.push(
|
||||
problem('not-public-domain', `source '${source.work}' is not verified public domain, and the author did not write it for Rosea`)
|
||||
);
|
||||
}
|
||||
|
||||
if (source.translation !== null && !PUBLIC_DOMAIN_TRANSLATIONS.has(source.translation)) {
|
||||
problems.push(
|
||||
problem(
|
||||
'translation-under-copyright',
|
||||
`translation '${source.translation}' is not on the public-domain list; a modern translation is usually still under copyright`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
for (const [lang, text] of Object.entries(entry.text)) {
|
||||
if (text === undefined) continue;
|
||||
|
||||
const length = [...text].length;
|
||||
if (length > LENGTH_CAP) {
|
||||
problems.push(problem('too-long', `${lang} text is ${length} characters, over the length cap of ${LENGTH_CAP}`));
|
||||
}
|
||||
|
||||
for (const hit of findForbidden(text)) {
|
||||
problems.push(problem('forbidden-word', `${lang} text contains '${hit.term}' (${hit.category}): ${hit.why}`));
|
||||
}
|
||||
|
||||
const phrase = OUTCOME_PHRASES.find((p) => p.test(text));
|
||||
if (phrase !== undefined) {
|
||||
problems.push(problem('promises-outcome', `${lang} text may promise an outcome (${phrase.source}): needs human review`));
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.promisesOutcome) {
|
||||
problems.push(problem('promises-outcome', 'is marked promisesOutcome: comfort never promises what will happen'));
|
||||
}
|
||||
|
||||
return problems;
|
||||
}
|
||||
|
||||
/** Validates a whole library: every entry, plus ids unique across all of them. */
|
||||
export function validateLibrary(entries: readonly unknown[]): Problem[] {
|
||||
const problems = entries.flatMap(validateEntry);
|
||||
const seen = new Set<string>();
|
||||
for (const entry of entries) {
|
||||
const id = idOf(entry);
|
||||
if (seen.has(id)) {
|
||||
problems.push({ id, rule: 'duplicate-id', message: `id '${id}' is used more than once; a message between players would be ambiguous` });
|
||||
}
|
||||
seen.add(id);
|
||||
}
|
||||
return problems;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { lintCopy, stripComments } from '../src/copy-lint.js';
|
||||
|
||||
describe('lint:copy core', () => {
|
||||
it('reports a forbidden word in a string, with its line', () => {
|
||||
const problems = lintCopy("export const a = 'ok';\nexport const b = 'A gentle therapy';\n");
|
||||
expect(problems).toHaveLength(1);
|
||||
expect(problems[0]?.line).toBe(2);
|
||||
expect(problems[0]?.message).toContain('therapy');
|
||||
});
|
||||
|
||||
it('reports a forbidden word in Svelte markup', () => {
|
||||
expect(lintCopy('<p>For the lonely.</p>')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('ignores comments, where rules are explained', () => {
|
||||
expect(lintCopy('// never say therapy\n/* nor lonely */\n<!-- nor Gandalf -->\nconst ok = 1;')).toEqual([]);
|
||||
});
|
||||
|
||||
it('keeps line numbers when it strips a multi-line comment', () => {
|
||||
const problems = lintCopy("/*\n\n*/\nconst s = 'cure';");
|
||||
expect(problems[0]?.line).toBe(4);
|
||||
});
|
||||
|
||||
it('does not mistake a URL for a comment', () => {
|
||||
expect(stripComments("'https://example.invalid/cure'")).toContain('cure');
|
||||
});
|
||||
|
||||
it("reports 'Domi' standing alone", () => {
|
||||
expect(lintCopy("const title = 'Domi';")).toHaveLength(1);
|
||||
expect(lintCopy("const title = 'Welcome to Domi';")).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("accepts 'Domi' after its first word", () => {
|
||||
expect(lintCopy("'Rosea Domi', 'Panda Domi', 'Amicitia Domi'")).toEqual([]);
|
||||
});
|
||||
|
||||
it('accepts clean shell copy', () => {
|
||||
expect(lintCopy("preparing: 'The garden is being prepared.'")).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { FORBIDDEN, findForbidden } from '../src/forbidden.js';
|
||||
|
||||
const terms = (text: string): string[] => findForbidden(text).map((h) => h.term);
|
||||
|
||||
describe('forbidden words — what is caught', () => {
|
||||
it('catches every listed term on its own', () => {
|
||||
const missed = FORBIDDEN.filter(({ term }) => !terms(`before ${term} after`).includes(term)).map((t) => t.term);
|
||||
expect(missed).toEqual([]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
['A soft THERAPY for the soul', 'therapy'],
|
||||
['self-healing petals', 'healing'],
|
||||
["the rose's lonely planet", 'lonely'],
|
||||
['Loneliness.', 'loneliness'],
|
||||
['a treat for the fox', 'treat'],
|
||||
['be patient with yourself', 'patient'],
|
||||
['Middle-earth', 'Middle-earth'],
|
||||
['Middle earth', 'Middle-earth'],
|
||||
['Malý princ', 'Malý princ'],
|
||||
['Saint-Exupéry wrote', 'Saint-Exupéry']
|
||||
])('"%s" contains %s', (text, term) => {
|
||||
expect(terms(text)).toContain(term);
|
||||
});
|
||||
|
||||
it('reports hits in reading order', () => {
|
||||
expect(terms('cure first, then therapy')).toEqual(['cure', 'therapy']);
|
||||
});
|
||||
|
||||
it('reports one word once, though two spellings of it match', () => {
|
||||
expect(terms('Middle earth')).toHaveLength(1);
|
||||
expect(terms('Middle-earth and Middle earth')).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('forbidden words — what is NOT caught', () => {
|
||||
it.each([
|
||||
'a treaty between two roses',
|
||||
'a healthy rose',
|
||||
'patience, and patiently waiting',
|
||||
'the lamplighter on his planet',
|
||||
'the king, the vain man, the businessman',
|
||||
'a fox among the berries',
|
||||
'Rosea Domi'
|
||||
])('"%s" is clean', (text) => {
|
||||
expect(terms(text)).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,85 @@
|
||||
import { readFileSync, readdirSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { LENGTH_CAP, validateEntry, validateLibrary, type Rule } from '../src/validator.js';
|
||||
|
||||
const fixturesDir = fileURLToPath(new URL('../../../content/fixtures', import.meta.url));
|
||||
|
||||
interface Fixture {
|
||||
readonly expect: Rule;
|
||||
readonly why: string;
|
||||
readonly entry?: unknown;
|
||||
readonly entries?: readonly unknown[];
|
||||
}
|
||||
|
||||
const fixtures = readdirSync(fixturesDir)
|
||||
.filter((f) => f.endsWith('.json'))
|
||||
.sort()
|
||||
.map((file) => ({ file, fixture: JSON.parse(readFileSync(join(fixturesDir, file), 'utf8')) as Fixture }));
|
||||
|
||||
const valid = {
|
||||
id: 'valid-entry',
|
||||
text: { en: 'Fixture text, not a real sentence.', cs: 'Testovací text.' },
|
||||
source: {
|
||||
work: 'Fixture',
|
||||
author: null,
|
||||
tradition: 'biblical',
|
||||
translation: 'KJV',
|
||||
publicDomain: true,
|
||||
verifiedBy: 'Fixture',
|
||||
verifiedAt: '2026-11-01'
|
||||
},
|
||||
use: ['sunset', 'comfort'],
|
||||
tone: 'gentle',
|
||||
promisesOutcome: false
|
||||
};
|
||||
|
||||
describe('library validator — negative fixtures', () => {
|
||||
it('finds the fixtures', () => {
|
||||
// A glob matching nothing would pass every case below.
|
||||
expect(fixtures.length).toBeGreaterThanOrEqual(13);
|
||||
});
|
||||
|
||||
it.each(fixtures)('$file fails with its named rule', ({ fixture }) => {
|
||||
const problems = fixture.entries !== undefined ? validateLibrary(fixture.entries) : validateEntry(fixture.entry);
|
||||
expect(problems.map((p) => p.rule), fixture.why).toContain(fixture.expect);
|
||||
for (const p of problems) expect(p.message.length, 'each problem says what is wrong').toBeGreaterThan(10);
|
||||
});
|
||||
|
||||
it('every rule the validator has is proved by at least one fixture', () => {
|
||||
const proved = new Set(fixtures.map(({ fixture }) => fixture.expect));
|
||||
const RULES: readonly Rule[] = [
|
||||
'schema',
|
||||
'no-source',
|
||||
'not-public-domain',
|
||||
'translation-under-copyright',
|
||||
'too-long',
|
||||
'promises-outcome',
|
||||
'forbidden-word',
|
||||
'no-tradition',
|
||||
'duplicate-id'
|
||||
];
|
||||
expect(RULES.filter((r) => !proved.has(r))).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('library validator — what passes', () => {
|
||||
it('accepts a sourced, public-domain, short, gentle entry', () => {
|
||||
expect(validateEntry(valid)).toEqual([]);
|
||||
});
|
||||
|
||||
it('accepts a line the author wrote for Rosea, though it is not public domain', () => {
|
||||
const own = { ...valid, source: { ...valid.source, tradition: 'rosea', translation: null, publicDomain: false } };
|
||||
expect(validateEntry(own)).toEqual([]);
|
||||
});
|
||||
|
||||
it('accepts text exactly at the length cap, counting characters and not UTF-16 units', () => {
|
||||
const atCap = { ...valid, text: { en: 'ř'.repeat(LENGTH_CAP) } };
|
||||
expect(validateEntry(atCap)).toEqual([]);
|
||||
});
|
||||
|
||||
it('accepts an empty library, and says nothing about it', () => {
|
||||
expect(validateLibrary([])).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "test/**/*.ts"]
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@rosea/engine",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Pure. No I/O, no DOM, no Date.now(), no Math.random(). Time and randomness are parameters.",
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"test": "vitest run --reporter=verbose"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rosea/schema": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "9.39.5",
|
||||
"fast-check": "3.23.2",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "3.2.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { isLocalDay, localDay, type LocalDay } from './time/localDay.js';
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* The ONLY place in the repository where a day is computed (CLAUDE.md §7).
|
||||
*
|
||||
* A day is always local to a named IANA time zone, and the zone is always a
|
||||
* parameter. The engine never asks the device which zone it is in: the app
|
||||
* passes the zone of the city the player chose, or the device's own zone as the
|
||||
* fallback (CLAUDE.md §4 `profile`).
|
||||
*
|
||||
* Never `toISOString().slice(0, 10)`: that is the UTC day, and in Prague it
|
||||
* records Monday-evening care as Tuesday's.
|
||||
*/
|
||||
|
||||
/** A calendar day, `YYYY-MM-DD`, in some player's local time. */
|
||||
export type LocalDay = string;
|
||||
|
||||
const LOCAL_DAY = /^\d{4}-\d{2}-\d{2}$/;
|
||||
|
||||
// Memoised per zone. Constructing a DateTimeFormat costs far more than using one.
|
||||
// This is a cache of a pure function's machinery, not state: the output depends
|
||||
// only on the arguments.
|
||||
const formatters = new Map<string, Intl.DateTimeFormat>();
|
||||
|
||||
function formatterFor(timeZone: string): Intl.DateTimeFormat {
|
||||
let formatter = formatters.get(timeZone);
|
||||
if (formatter === undefined) {
|
||||
// Throws RangeError for an unknown zone, which is the right failure: a
|
||||
// mistyped zone silently falling back to UTC is the bug this module exists
|
||||
// to prevent.
|
||||
formatter = new Intl.DateTimeFormat('en-CA', {
|
||||
timeZone,
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
calendar: 'iso8601',
|
||||
numberingSystem: 'latn'
|
||||
});
|
||||
formatters.set(timeZone, formatter);
|
||||
}
|
||||
return formatter;
|
||||
}
|
||||
|
||||
/** The local calendar day of `epochMs` in `timeZone`. */
|
||||
export function localDay(epochMs: number, timeZone: string): LocalDay {
|
||||
if (!Number.isFinite(epochMs)) {
|
||||
throw new RangeError(`localDay: epochMs must be a finite number, got ${String(epochMs)}`);
|
||||
}
|
||||
|
||||
const parts = formatterFor(timeZone).formatToParts(epochMs);
|
||||
const part = (type: Intl.DateTimeFormatPartTypes): string => {
|
||||
const value = parts.find((p) => p.type === type)?.value;
|
||||
if (value === undefined) throw new RangeError(`localDay: no ${type} for ${epochMs} in ${timeZone}`);
|
||||
return value;
|
||||
};
|
||||
|
||||
const day = `${part('year')}-${part('month')}-${part('day')}`;
|
||||
if (!LOCAL_DAY.test(day)) {
|
||||
// Years before 1000 or after 9999 would not be four digits. No player tends
|
||||
// a rose then; refusing is better than writing an ambiguous day to the log.
|
||||
throw new RangeError(`localDay: ${epochMs} gives an unrepresentable day '${day}'`);
|
||||
}
|
||||
return day;
|
||||
}
|
||||
|
||||
/** Whether `value` has the shape of a LocalDay. Does not check that the date exists. */
|
||||
export function isLocalDay(value: string): value is LocalDay {
|
||||
return LOCAL_DAY.test(value);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import fc from 'fast-check';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { isLocalDay, localDay } from '../src/time/localDay.js';
|
||||
|
||||
const at = (iso: string): number => Date.parse(iso);
|
||||
|
||||
describe('localDay — golden cases', () => {
|
||||
it.each([
|
||||
// Prague, 2026 spring-forward day (29 March, 02:00 CET -> 03:00 CEST).
|
||||
['2026-03-28T23:30:00Z', 'Europe/Prague', '2026-03-29'], // 00:30 CET, first half-hour of the short day
|
||||
['2026-03-29T21:59:00Z', 'Europe/Prague', '2026-03-29'], // 23:59 CEST, last minute of it
|
||||
['2026-03-29T22:00:00Z', 'Europe/Prague', '2026-03-30'],
|
||||
// Prague, 2026 fall-back day (25 October, 03:00 CEST -> 02:00 CET), 25 hours long.
|
||||
['2026-10-24T22:00:00Z', 'Europe/Prague', '2026-10-25'],
|
||||
['2026-10-25T22:59:00Z', 'Europe/Prague', '2026-10-25'], // 23:59 CET
|
||||
['2026-10-25T23:00:00Z', 'Europe/Prague', '2026-10-26'],
|
||||
// Southern hemisphere: Sydney is ahead of UTC, so its morning is UTC's yesterday.
|
||||
['2026-11-01T21:00:00Z', 'Australia/Sydney', '2026-11-02'],
|
||||
// Reykjavík has no DST and sits on UTC: the one zone where UTC days are right.
|
||||
['2026-06-21T23:59:00Z', 'Atlantic/Reykjavik', '2026-06-21'],
|
||||
// The edges of the clock face.
|
||||
['2026-01-01T10:00:00Z', 'Pacific/Kiritimati', '2026-01-02'], // UTC+14
|
||||
['2026-01-01T10:00:00Z', 'Etc/GMT+12', '2025-12-31'] // UTC-12
|
||||
])('%s in %s is %s', (iso, zone, expected) => {
|
||||
expect(localDay(at(iso), zone)).toBe(expected);
|
||||
});
|
||||
|
||||
it('Monday evening in Anchorage is Monday, though UTC already says Tuesday', () => {
|
||||
// 2026-10-26 is a Monday. 20:00 AKDT = 04:00 UTC on Tuesday.
|
||||
const mondayEvening = at('2026-10-27T04:00:00Z');
|
||||
expect(localDay(mondayEvening, 'America/Anchorage')).toBe('2026-10-26');
|
||||
expect(new Date(mondayEvening).toISOString().slice(0, 10)).toBe('2026-10-27'); // the trap, measured
|
||||
});
|
||||
|
||||
it('just after midnight on Tuesday in Prague is Tuesday, though UTC still says Monday', () => {
|
||||
const tuesdayNight = at('2026-10-26T23:30:00Z'); // 00:30 CET on Tuesday 27th
|
||||
expect(localDay(tuesdayNight, 'Europe/Prague')).toBe('2026-10-27');
|
||||
});
|
||||
});
|
||||
|
||||
describe('localDay — refusals', () => {
|
||||
it('throws on an unknown zone instead of falling back to UTC', () => {
|
||||
expect(() => localDay(0, 'Europe/Atlantis')).toThrow(RangeError);
|
||||
});
|
||||
|
||||
it('throws on a non-finite time', () => {
|
||||
expect(() => localDay(Number.NaN, 'Europe/Prague')).toThrow(RangeError);
|
||||
expect(() => localDay(Number.POSITIVE_INFINITY, 'Europe/Prague')).toThrow(RangeError);
|
||||
});
|
||||
});
|
||||
|
||||
describe('localDay — properties', () => {
|
||||
const ZONES = [
|
||||
'Europe/Prague',
|
||||
'Atlantic/Reykjavik',
|
||||
'Europe/Oslo', // Tromsø's zone
|
||||
'America/Guayaquil', // Quito's zone
|
||||
'Australia/Sydney',
|
||||
'America/Anchorage',
|
||||
'Pacific/Kiritimati',
|
||||
'Etc/GMT+12'
|
||||
] as const;
|
||||
|
||||
// 2000-01-01 .. 2100-01-01: every year a player could plausibly be in.
|
||||
const instant = fc.integer({ min: Date.UTC(2000, 0, 1), max: Date.UTC(2100, 0, 1) });
|
||||
const zone = fc.constantFrom(...ZONES);
|
||||
const HOUR = 3_600_000;
|
||||
|
||||
it('always returns a well-formed day', () => {
|
||||
fc.assert(fc.property(instant, zone, (t, z) => isLocalDay(localDay(t, z))));
|
||||
});
|
||||
|
||||
it('never goes backwards in time, across DST changes included', () => {
|
||||
fc.assert(
|
||||
fc.property(instant, fc.integer({ min: 0, max: 72 * HOUR }), zone, (t, dt, z) => {
|
||||
return localDay(t, z) <= localDay(t + dt, z);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it('always advances within 26 hours (no local day is longer than 25)', () => {
|
||||
fc.assert(fc.property(instant, zone, (t, z) => localDay(t, z) < localDay(t + 26 * HOUR, z)));
|
||||
});
|
||||
|
||||
it('is deterministic: the same arguments give the same day', () => {
|
||||
fc.assert(fc.property(instant, zone, (t, z) => localDay(t, z) === localDay(t, z)));
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Proves the engine-purity lint rule (eslint.config.mjs, CLAUDE.md §7) fires.
|
||||
*
|
||||
* A guard that has only ever been seen NOT firing has not been tested. Each
|
||||
* banned construct is linted as if it lived in packages/engine/src, and must be
|
||||
* reported. The same snippet placed outside the engine must not be, which proves
|
||||
* the rule is scoped and not a global ban someone will turn off in anger.
|
||||
*/
|
||||
import { ESLint } from 'eslint';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { beforeAll, describe, expect, it } from 'vitest';
|
||||
|
||||
const repoRoot = fileURLToPath(new URL('../../..', import.meta.url));
|
||||
const eslint = new ESLint({ cwd: repoRoot });
|
||||
|
||||
const ENGINE_FILE = 'packages/engine/src/__purity_probe__.ts';
|
||||
const OUTSIDE_FILE = 'packages/ui/src/__purity_probe__.ts';
|
||||
|
||||
async function messages(code: string, filePath: string): Promise<string[]> {
|
||||
const [result] = await eslint.lintText(code, { filePath });
|
||||
if (result === undefined) throw new Error('ESLint returned no result');
|
||||
return result.messages.map((m) => `${m.ruleId ?? 'fatal'}: ${m.message}`);
|
||||
}
|
||||
|
||||
const IMPURE: readonly [what: string, code: string][] = [
|
||||
['Date.now()', 'export const t = Date.now();'],
|
||||
['new Date() with no argument', 'export const d = new Date();'],
|
||||
['Date() called as a function', 'export const s = Date();'],
|
||||
['Math.random()', 'export const r = Math.random();'],
|
||||
['fetch()', "export const p = fetch('/x');"],
|
||||
['localStorage', "export const v = localStorage.getItem('x');"],
|
||||
['indexedDB', "export const o = indexedDB.open('x');"],
|
||||
['document', 'export const b = document.body;'],
|
||||
['window', 'export const w = window.innerWidth;'],
|
||||
['navigator', 'export const l = navigator.language;'],
|
||||
['crypto', 'export const c = crypto.randomUUID();'],
|
||||
['setTimeout', 'setTimeout(() => 0, 1);'],
|
||||
['performance.now()', 'export const n = performance.now();'],
|
||||
['the device time zone', 'export const z = Intl.DateTimeFormat().resolvedOptions().timeZone;'],
|
||||
['a UTC day', 'export const day = new Date(0).toISOString().slice(0, 10);'],
|
||||
['a Node built-in', "import { readFileSync } from 'node:fs'; export const f = readFileSync;"]
|
||||
];
|
||||
|
||||
describe('engine purity lint rule', () => {
|
||||
// The first lint loads the config and typescript-eslint. On a busy machine that
|
||||
// alone took over vitest's 5 s, failing whichever case ran first. Pay it here.
|
||||
beforeAll(async () => {
|
||||
await messages('export {};', ENGINE_FILE);
|
||||
}, 60_000);
|
||||
|
||||
it.each(IMPURE)('reports %s inside packages/engine/src', async (_what, code) => {
|
||||
const found = await messages(code, ENGINE_FILE);
|
||||
expect(found.filter((m) => m.startsWith('fatal')), 'snippet must parse').toEqual([]);
|
||||
expect(found.some((m) => /^no-restricted-/.test(m)), found.join('\n')).toBe(true);
|
||||
});
|
||||
|
||||
it.each(IMPURE)('does not report %s outside the engine', async (_what, code) => {
|
||||
const found = await messages(code, OUTSIDE_FILE);
|
||||
expect(found.filter((m) => /^no-restricted-/.test(m))).toEqual([]);
|
||||
});
|
||||
|
||||
it('allows a Date built from an explicit instant', async () => {
|
||||
expect(await messages('export const d = new Date(1761500000000);', ENGINE_FILE)).toEqual([]);
|
||||
});
|
||||
|
||||
it('the real engine sources are clean', async () => {
|
||||
const results = await eslint.lintFiles(['packages/engine/src/**/*.ts']);
|
||||
expect(results.length, 'the glob must match engine sources').toBeGreaterThan(0);
|
||||
const problems = results.flatMap((r) => r.messages.map((m) => `${r.filePath}:${m.line} ${m.message}`));
|
||||
expect(problems).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "test/**/*.ts"]
|
||||
}
|
||||