Files
Rosea/.agents/reviews/feature-planet-garden.md
T

69 lines
6.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Review — `feature/planet-garden`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/planet-garden.md`](../features/planet-garden.md).
Reviewed 2026-11-17 on Node 22.23.4, Windows 10. There is no PR: the only remote is Gitea.
## What the author decided, and what was built
Mark, on 2026-11-17: *a game, with a proper planet, a character who does the care with animations,
taps on the rose and swiped patterns; weeds tapped and swiped out.* He chose a **round tiny planet**,
a **human gardener, a boy or a girl, customised at the beginning**, and **all four gesture sets**.
- The first open asks **Who tends her?**: boy or girl, skin tone, hair style and colour, clothes
colour, a hat, with a live preview; kept on the device (`profile.gardener`, a JSON Schema of
fixed lists). *Change gardener* reopens it.
- The garden is **her planet** (SVG): the real sky's light (engine `lightAt`), the meadow world, her
bed, the wall, the chair, the watering can, the day's weeds and fallen petals (engine
`weedsToday`, `petalsToday`), the windbreak on a windy hour, and **the gardener**, who walks round
the world to the work and takes a pose for it (stand-ins until art).
- **Tap her** (or Enter on her) opens **the ring** of what she needs, plus *Touch her* and *Close*;
Escape closes it, focus returns to her. **Press the can and tilt** to pour (the tilt sets the
rate); **swipe each weed up**; **sweep across the petals**; **drag the windbreak** to her
windward side; **stroke her petals** slowly. Every gesture has its button in the ring.
- The art board gains the gardener's sheet and eight poses, and her home planet in three lights;
STYLE.md records S2 (reversed) and S6 with their guards and review points 10–11.
Also on this branch: the tap-highlight fix (seen on the real tablet) and `pnpm test:android`.
## Bug drills
| Put back | Result |
|:--|:--|
| A sideways swipe pulls a weed | **MISSED at first**, then CAUGHT: the "sideways" tests were also too short, so the distance rule hid the direction rule; a long diagonal test added |
| Every pulled weed is written as care, not only the last | CAUGHT |
| The sweep need not cover every petal | CAUGHT |
| The windbreak counts wherever it is dropped | CAUGHT |
| Tilt is ignored (pours at the steady rate) | CAUGHT |
| A stroke opens the ring instead of touching her | CAUGHT |
| The gardener question is not shown at the first open | CAUGHT: 2 |
| The gardener's look accepts any value | CAUGHT: 2 |
| Reduced motion still walks | **MISSED at first**, then CAUGHT: the test checked a CSS class, not where the gardener stands; it now reads his angle straight after an act |
The first rerun of the reduced-motion drill reported CAUGHT against a test that was failing on its own (it looked before the garden loaded); fixed, then every drill was run again against a green suite.
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Likeness / legal | A child tending a rose on a small round planet is the book's most recognisable image. | The author's decision, made knowingly. Guards: the gardener is the player's own, in work clothes; nothing to choose recreates the book's boy (tested on the option lists); the planet is a cultivated garden; review points 10–11; **G6.1: a legal check of the look before any public release.** |
| 2 | Soul | A child gardener for players who are mostly grown-ups. | Recorded as a question for the author's two-week play; a grown-up option is one list entry away (`gardener.schema.json`). |
| 3 | Soul | Gestures can feel like failing. | Generous thresholds; a missed gesture does nothing and says nothing; every act also has a button. |
| 4 | Accessibility | Gestures are not keyboard or screen-reader operable. | The ring's buttons do every act; the rose target is a focusable `role=button` with `aria-expanded`; one polite line says what the gardener did; axe passes on the choice, the scene and the ring (e2e). |
| 5 | Motion | Walking and swaying. | `prefers-reduced-motion`: the gardener is placed at once (tested); the global rule shortens the rest. |
| 6 | Two tabs | A gardener changed in one tab is not shown in another until reload (storage announces `gardener`, the UI does not listen yet). | Deferred: harmless (nothing is lost) and rare; noted for the next touch of the Shell. |
| 7 | Correctness | Half the weeds pulled, then the tab closed: nothing written, the weeds come back. | By design (G3): care is the finished job; nothing earned is lost. |
| 8 | Testing | jsdom has no `PointerEvent`: test pointers carried no coordinates, and `svelte/motion` read `matchMedia` at import, failing every file. | A `PointerEvent` polyfill in the planet tests; the walk is a small interval instead of `Tween`. Lessons in `testing.md` and `code.md`. |
| 9 | Process | The first look in the browser was the **old** garden: the preview's service worker served the cached build, as a player's would until *Refresh*. | Cleared for the check; it is exactly what calm-refresh exists for. |
| 10 | Design | The first stand-in had a shading arc that read as a smile on the planet. | Removed after looking. |
| 11 | Art | Painted art cannot simply be recoloured for every skin tone, hair and clothes choice the way the code stand-in is. | The board makes the first look; **how the other looks are drawn is open for the author** (STYLE.md §3b). |
| 12 | Testing | The first tablet run failed to connect while Chrome cold-started, and the connect sat **before** the `try`: Chrome was left running on the tablet. | Stopped by hand at once; the script now opens `try` before the first adb command, retries the connect for 30 s and tolerates half-done setup. Lesson in `testing.md`. |
| — | Privacy | The gardener's look stays in `profile`; it is not in the rose file (tested); nothing is sent. | — |
## Gates and devices
Counts are on the merge (HANDOVER). The tablet (WAVE 10C, 2026-11-17): `pnpm test:android` **7 of 7**
by real touch: the gardener question (a boy, a cap), the town, the ring opened by a tap on her and
closed, pouring by tilting the can, a stroke across her petals, and offline with the server
unreachable. Afterwards Chrome was stopped (`pidof` empty) and both adb mappings removed. **Not verified:** a screen reader; Safari; a phone smaller
than the tablet; weeds and petals by real touch on the device (their days depend on the key).