dInfinity

TODO

The implementation plan. Steps run in order; within a step the boxes are roughly ordered too. Finished items are deleted, not ticked — git history and docs/STATUS.md are the record, and a step that is wholly done is removed. Keep the file a plan, not a diary.

Everything here builds the specification in README.md, docs/ and the prototype in design/. Where a step says device, it cannot run on CI (see .claude/CLAUDE.md).

Step 2 — CI

Everything a machine can check, on every PR. Emulator and device suites are Step 5 and stay off CI.

Done. A pull request shows a green check per concern, Sonar decorates it with coverage, and v0.0.1 produced a signed dInfinityApp-0.0.1.apk. The three boxes above are not blocking anything: two wait on other projects and one is optional.

Step 3 — Foundations

The shared layer every screen sits on. Built bottom-up, each piece tested to completion before the screens start, because a bug here is a bug in every screen.

Done when a formula can be parsed, planned, simulated headless and scored from a unit test, with no UI in the picture, and Sonar reports ≥ 80 % on these modules.

Step 4 — Screens

One section per screen. Each is a vertical slice: state, UI, tests, and the device check it needs. The design option ids (1a, 9c, …) are the labels on the canvas — open design/ beside the code.

Every screen follows the same four steps, so they are written out once here rather than repeated below:

  1. State — a ViewModel over the Step 3 foundations. No logic that belongs in core/ leaks into the screen.
  2. UI — Compose, Modernist tokens, matching the design option. Light and dark, phone widths from 360 dp up.
  3. Tests — unit tests for the state machine; Robolectric/Compose tests for rendering, interaction, empty and error states; accessibility (labels, touch targets, TalkBack order).
  4. Docs — update the matching document in the same PR if behaviour, limits or defaults move.

4.1 Roll screen — feature/roll

Home. Design 1a1j, 2a, 3a3c, 4a, 4b, 6d, 6f, 9a, 9c, 1z. Spec: docs/dice-notation.md, docs/tables.md, docs/physics-and-rendering.md.

The state behind the screen is built: RollMachine turns a typed formula into a throw and a throw’s faces into a result, refuses what the table cannot hold before a body exists, and throws an exploding die again through the simulator. What is left below is the screen itself.

Done when every example in docs/dice-notation.md can be typed, rolled and read here, and the same seed gives the same result with the renderer on and off.

4.2 Outcome graph — feature/graph

Design 1k1m, 2c, 7a. Spec: docs/probability.md.

4.3 Saved rolls — feature/saved

Design 1n1p, 1r, 6e, 7b, 9b, 9d, 9f, 9g. Spec: docs/dice-notation.md (Saved rolls).

4.4 Dice sets — feature/sets

Design 1s, 1t, 5a, 6a, 6b, 8c, 9h, 9i. Spec: docs/dice-sets.md.

4.5 Table picker — feature/tables

Design 1u, 9j. Spec: docs/tables.md.

4.6 Face designer — feature/designer

Design 1v, 4c, 8d. Spec: docs/face-designer.md.

4.7 Statistics — feature/stats

Design 1w, 5b, 5c, 8b, 9e. Spec: docs/statistics.md.

4.8 History — feature/history

Design 1x. Spec: docs/statistics.md.

4.9 Sessions — feature/sessions

Design 6c. Spec: docs/statistics.md.

4.10 Settings and menu — feature/settings

Design 1q, 1y, 2d. Spec: README.md, docs/architecture.md.

Step 5 — Physics and rendering on a real phone

Reserved, and none of it can run on CI. This is where the app either convinces or does not: a roll has to look like dice landing, not like an animation of a random number. Runs first as soon as 4.1 renders, then again after every physics change.

5.1 Harness

5.2 Fairness and determinism

5.3 Capacity and corner cases

5.4 Collisions

5.5 Stacking and cocking — and no invisible hand

The two failures to hunt, per docs/physics-and-rendering.md:

5.6 Feel — the user’s call, not a metric

5.7 Performance on the Pixel 10a

Done when every target above is met on the Pixel 10a and the user agrees the dice look right. Numbers that turn out wrong become the new numbers in docs/physics-and-rendering.md and docs/tables.md — the docs follow the device, not the other way round.

Step 6 — v1 release

After v1

Written down so the format need not change later. Not v1 scope.

Open questions