[docs] Thorns: Analysis, review, and G1.7 closed

This commit is contained in:
2026-11-02 09:33:57 +01:00
parent 1070017d2c
commit 87375c72d4
5 changed files with 117 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
| Workspace, contracts, gates, PWA shell | 0 | Merged to `main` 2026-11-01 (`d11d242`); built, not deployed. Phase 0 gate still open | [phase0-workspace.md](features/phase0-workspace.md) | [feature-phase0-workspace.md](reviews/feature-phase0-workspace.md) |
| Roadmap and gameplay docs, read against the code | 0 | Merged 2026-11-01; Q1–Q7 answered by the author | — | [docs-roadmap-gameplay.md](reviews/docs-roadmap-gameplay.md) |
| The Letter slot: page at `#letter`, empty `docs/LETTER.md` | 0 | Merged to `main`; built, not deployed. Invisible until the author writes | [letter-slot.md](features/letter-slot.md) | [feature-letter-slot.md](reviews/feature-letter-slot.md) |
| Thorns: touch her; a rush of taps, and she says she has thorns | 1 | Merged to `main`; built, not deployed | [thorns.md](features/thorns.md) | [feature-thorns.md](reviews/feature-thorns.md) |
| The day's sentence: her folded petal, one a day, never lost, best at sunset; candidates and `library:verify` | 1 | Merged to `main`; built, not deployed. Invisible until the author verifies sentences | [day-sentence.md](features/day-sentence.md) | [feature-day-sentence.md](reviews/feature-day-sentence.md) |
| The in-game sunset: move the chair, half a minute of silence, then the real sunset's time | 1 | Merged to `main`; built, not deployed | [chair-sunset.md](features/chair-sunset.md) | [feature-chair-sunset.md](reviews/feature-chair-sunset.md) |
| A calm refresh: a waiting new version is offered in one line, never swapped in by itself | 0 | Merged to `main`; built, not deployed | [calm-refresh.md](features/calm-refresh.md) | [feature-calm-refresh.md](reviews/feature-calm-refresh.md) |
+1
View File
@@ -58,6 +58,7 @@ sentences). Nothing in Phase 1 is visible to the player yet.
| ~~G1.4~~ | ~~No rose~~ | Closed 2026-11-02 on `feature/rose-care`: care with a touch of skill (water by holding, shade, weeds, petals), growth from days of care, drift, moods, her numbers; the care log in IndexedDB, replayed by the engine. Tuning R2/R4/R5/R6 is the author's. 7 of 7 put-back bugs caught after two test holes were closed. |
| ~~G1.5~~ | ~~The day's sentence and the folded petal~~ | Closed 2026-11-02 on `feature/day-sentence`, for the code: `engine/petal` (5 properties: never lost, verified-later never swaps it, one a day, no repeat until all opened), the `sentence-opened` event, the rose file v2, the petal in the garden; e2e opens one in a fixture build and reloads. 9 of 9 put-back bugs caught. **The shipped app shows no petal until the author verifies sentences (G0.18).** |
| ~~G1.6~~ | ~~The in-game sunset: move the chair, watch it again~~ | Closed 2026-11-02 on `feature/chair-sunset`: half a minute with nothing to press, then the real sunset's time; Escape and a tap leave; the offline suite watches one with the server gone. 4 of 4 put-back bugs caught. |
| ~~G1.7~~ | ~~Thorns were on the roadmap but undesigned~~ | Closed 2026-11-02 on `feature/thorns`, as the author chose: thorns teach gentleness. `engine/touch` (2 properties: spaced taps are never a rush; one blush a visit); a tremor is one touch; nothing recorded. 6 of 6 put-back bugs caught. |
| G1.3 | Towns have no Czech names (*Vídeň*) | Open. Natural Earth has none; arrives with Czech copy. |
## Design questions — answered
+63
View File
@@ -0,0 +1,63 @@
# Thorns — touching her gently
Status: built on `feature/thorns`. ROADMAP Phase 1: *one rose with her face: … moods, thorns …*.
CLAUDE.md §1: *alive and a little vain, with thorns that are part of her.* STYLE.md: *the thorns are
part of her and never look threatening.* Decided by the author 2026-11-02: **thorns teach gentleness.**
Review: [`feature-thorns.md`](../reviews/feature-thorns.md).
## 1. Why and what, in the player's terms
The player can touch her: tap her picture (or Tab to it and press Enter).
- **A touch** — she answers fondly: *Oh. Hello.*, then *That tickles.* The first touch of a visit makes
her blush (seen in full bloom, where her face shows moods).
- **A rush of touches** — three quick taps within two seconds — she says *Gently. I have thorns.* and
rests for a few seconds; taps meanwhile do nothing. Then she is as before.
- **Nothing is recorded.** No event, no number, no penalty, nothing she remembers. A touch is not care:
it does not water her, does not count as a day of care, does not move anything she has earned.
Why: the fox (Phase 2) is tamed by touch, and taming needs patience. The rose rehearses it first, kindly,
in the one place where getting it wrong costs nothing.
## 2. Technical architecture
```mermaid
flowchart LR
ui["packages/ui<br/>Rose.svelte: a Touch her button over her picture"] -->|"now, state"| engine["packages/engine<br/>touch/touch.ts: touch()"]
engine -->|"fond | thorns | resting, next state"| ui
```
| # | Decision | Why |
|:--|:--|:--|
| T1 | The rule lives in `engine/touch` as a pure function of the visit's recent touches and the clock. | Components decide nothing (CLAUDE.md §7); the fox reuses it. |
| T2 | **A rush** is `TOUCH.rushCount` (3) touches within `TOUCH.rushMs` (2 s). Touches closer than `TOUCH.sameMs` (250 ms) to the one before count as one. | A tremor, a bounce or a double tap must never be told *gently*. Three separate, deliberate taps in two seconds is fussing. |
| T3 | After the thorns line she **rests** `TOUCH.restMs` (4 s): touches change nothing, then all is as before. | A boundary, kept briefly and then let go; no grudge. |
| T4 | **Nothing is stored**, so the blush comes on the first touch of a *visit* (the author's option said *once a day*; a day would need a record, and the option also said nothing is recorded — the second wins). | *Progress never disappears* has nothing to act on; no number can grow from touching. |
| T5 | Her picture stays an image with its description; the touch is a separate button laid over it, labelled *Touch her*. | The picture keeps its meaning for a screen reader; the touch is keyboard-operable. |
| T6 | Her touch words take the speech bubble for the rest time, then her usual line returns. | One line at a time. |
## 3. Risk analysis
| Risk | Answer |
|:--|:--|
| **Being scolded**: *Gently* read as a reproach, for someone already fragile. | It needs three deliberate taps (T2), is said once, never repeated while she rests, never mentioned again, never recorded. It is her voice about herself (*I have thorns*), not about the player. |
| A player with a tremor or a motor difficulty. | T2: taps within 250 ms are one touch. Keyboard repeat (holding Enter) is ignored too. |
| **Dependence**: touching as a fidget loop. | It gives nothing: no blush after the first, no number, no reward for more. |
| Privacy, reachability, offline | Nothing stored or sent; works offline as everything else. |
## 4. Gap analysis
Closes the last Phase 1 roadmap item without a design (*thorns*). Tuning in `TOUCH` is the author's.
## 5. Verification matrix
| Case | Kind | Where |
|:--|:--|:--|
| One touch: fond; second: fond; first of a visit: blush | unit | `engine/test/touch.test.ts`, `ui/test/touch.test.ts` |
| Three taps within 2 s: thorns; then resting for 4 s; then fond again | unit | same |
| Taps within 250 ms count as one; three such bursts spaced out are not a rush | unit | engine |
| **Property:** taps a second or more apart are never a rush (three span at least 2 s) | property | engine |
| **Property:** the state never grows past `rushCount` touches | property | engine |
| Keyboard: the button is reachable; held Enter (repeat) is one touch | unit | ui |
| A touch appends no event | unit | ui |
| Built app: touch, rush, axe | e2e | `e2e/shell.spec.ts` |
+43
View File
@@ -0,0 +1,43 @@
# Review — `feature/thorns`
Adversarial self-review (CLAUDE.md §5.3). Analysis: [`features/thorns.md`](../features/thorns.md).
Reviewed 2026-11-02 on Node 22.11.0, Windows 10. There is no PR: the only remote is Gitea.
## Gates
Counts are on the merge; HANDOVER repeats them. New: engine +7 (2 properties), ui +4, e2e +1
(touch, rush, axe with the touch focused).
**The app changed** (CLAUDE.md §5.4): a *Touch her* button over her picture. Rebuilt by the e2e and
offline runs; **not deployed** (G0.13). Seen in the built app at phone width: a touch answered
*That tickles.*, three taps 400 ms apart gave *Gently. I have thorns.*, and the keyboard focus ring
is a rounded frame round her picture.
## Bug drills
| Put back | Result |
|:--|:--|
| A tremor counts as fussing | CAUGHT |
| A rush never brings the thorns | CAUGHT: 3 |
| She never rests | CAUGHT |
| Every touch makes her blush | CAUGHT: 2 |
| A touch is written as care | CAUGHT: 2 |
| A held key is a rush | CAUGHT |
## Findings
| # | Area | Finding | Resolution |
|:--|:--|:--|:--|
| 1 | Soul | *Gently* can be read as a reproach by someone already fragile. | Three separate, deliberate taps in two seconds; said once; she rests and then it is gone; nothing remembers it. Her words are about herself. Accepted for the author's play test; the line is in `copy/en.ts`. |
| 2 | Accessibility / soul | A tremor or a bouncing finger could be told *gently*. | Taps within 250 ms are one touch (T2), and a held key is one; both drilled. Not tried with a real tremor or switch access. |
| 3 | Design | The author's option said *a blush once a day*, and also *nothing is recorded*. Those cannot both hold. | Nothing is recorded; the blush is once per visit (T4). Said plainly in the analysis. |
| 4 | Design | The blush shows on her face only in full bloom, as every mood does; before that only her words answer. | Accepted: the stand-ins draw moods for the full bloom only (STYLE.md). |
| 5 | Correctness | The clock moved back while she rests. | She never rests longer than `restMs` (tested). |
| 6 | Correctness | Two tabs: each has its own touches. | Nothing is shared or stored; harmless. |
| 7 | Test honesty | A frozen e2e clock (`setFixedTime`) would make three clicks one touch, and the rush test would fail for the wrong reason. | The e2e drives the clock with `clock.install` and `runFor`. |
| 8 | Dependence | Touching as a fidget. | It gives nothing after the first blush; no number grows. |
| — | Privacy, reachability, offline | Looked; nothing is stored, sent or shared. | — |
## What was not verified
- A screen reader announcing the bubble change; switch access; a real phone's touch timing.
+9 -2
View File
@@ -12,8 +12,8 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
Gitea hashes match. Analysis: [`.agents/features/phase0-workspace.md`](.agents/features/phase0-workspace.md).
Review, with counts and the mutation results:
[`.agents/reviews/feature-phase0-workspace.md`](.agents/reviews/feature-phase0-workspace.md).
- **Gates:** all pass on this machine. Unit tests: 447 (cpu-guard 13, identity 5, schema 19,
content 80, storage 58, art-prep 56, engine 161, ui 55). E2E: 18. Offline: 1. `lint:copy`: 21 files, 0 problems.
- **Gates:** all pass on this machine. Unit tests: 458 (cpu-guard 13, identity 5, schema 19,
content 80, storage 58, art-prep 56, engine 168, ui 59). E2E: 19. Offline: 1. `lint:copy`: 21 files, 0 problems.
`validate:library`: 13 of 13 fixtures rejected; 78 candidates pass.
- **Built, not deployed:** there is no host yet.
- **Roadmap and gameplay docs:** `docs/ROADMAP.md` and `docs/GAMEPLAY.md` are on
@@ -88,6 +88,13 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
`pnpm library:verify <id…> --by Mark`. Analysis:
[`.agents/features/day-sentence.md`](.agents/features/day-sentence.md). Review:
[`.agents/reviews/feature-day-sentence.md`](.agents/reviews/feature-day-sentence.md).
- **Thorns (Phase 1):** merged to `main`, as the author chose (thorns teach gentleness). *Touch her*
over her picture: a fond answer, a blush on the first touch of a visit; three quick taps and she
says *Gently. I have thorns.* and rests four seconds. A tremor's taps count as one. Nothing is
recorded. Tuning in `TOUCH` (`packages/engine/src/touch/touch.ts`). Review:
[`.agents/reviews/feature-thorns.md`](.agents/reviews/feature-thorns.md).
- **Phase 1 is built in code.** What remains of it is the author's: verified sentences (the petal
appears with them), hosting (G0.13), and the gate itself — two weeks of daily play on a phone.
**Phase 0 is not finished.** The roadmap's Phase 0 is more than the workspace. Its
gate needs 60 verified sentences (G0.18) and one illustration through the art