SPB Git

Repository Public License

MISSIONS.md 4.4 KB 49 lines markdown

1<!--2ORIX Alarm3File: docs/MISSIONS.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Wake missions89A mission starts after the system alarm has been stopped. It never keeps the alarm ringing and never blocks the system controls: it is the user's own commitment, with an emergency exit that is always available and always recorded.1011## Common contract1213- **Engine** in `AlarmCore/Missions`: `generate(level:round:seed:)` and `validate(_:answer:)`, pure and deterministic. The same seed gives the same puzzle, which is how tests and bug reports reproduce a morning.14- **View** in `App/Features/Missions`: `XMissionView(mission: ResolvedMission, onFinish:)`, reporting one `MissionOutcome` (completed with mistakes, duration and rounds, or `unavailable`).15- **Levels** 1 (easy) to 4 (expert). A step is `easy`, `normal`, `hard`, `expert` or `adaptive`.16- **Runner** (`MissionRunnerView`): progress across steps, "Switch to an alternative mission" (accessibility), automatic fallback when a mission is unavailable, emergency exit, wake confirmation, summary.1718| # | Mission | What the user does | Levels | Engine guarantees (tested) |19|---|---|---|---|---|20| 1 | **Math Blitz** | answers on a large keypad; estimation questions are multiple choice | 1: + and − · 2: adds × and exact ÷ · 3: larger numbers, missing number, sequences, estimation · 4: multi-step with parentheses | one correct integer answer, no division by zero, prompts re-evaluated by an independent parser |21| 2 | **Memory Matrix** | memorises lit cells, then taps them | 3×3, 4×4, 5×5; ordered sequences at higher levels; length grows each round | cells inside the grid, distinct, reproducible |22| 3 | **QR Escape** | walks to a QR code registered earlier and scans it | — | only a SHA-256 digest of the code is stored; wrong codes are rejected |23| 4 | **Step Challenge** | walks 20 to 300 steps (pedometer, not shaking) | goal set per step | monotonic progress, implausible jumps rejected |24| 5 | **Pattern Lock** | watches a path through a constellation of nodes and redraws it (drag or tap) | 3×3 then 4×4, longer paths | distinct nodes, adjacent moves only |25| 6 | **Word Scramble** | rebuilds a word from letter tiles, English or French | three vocabulary tiers, longer words at level 4 | scramble never equals the word, any anagram present in the list is accepted, accents exact |26| 7 | **Logic Gates** | flips switches so the lamp reaches its goal | 1 to 5 gates (AND, OR, NOT, XOR) | always solvable, never already solved |27| 8 | **Maze Escape** | guides a light to the exit (swipe, arrows, optional tilt) | 6×6 to 12×12; keys to collect at levels 3 and 4 | perfect maze, exit and keys reachable (BFS over thousands of seeds) |28| 9 | **Color Sequence** | repeats a growing sequence of panels, each with its own colour and shape | 4 panels, 6 at level 4 | each round extends the previous one |29| 10 | **Morning Combo** | a sequence of up to six of the missions above | — | order kept, one outcome per step |3031## Difficulty3233`AdaptiveEngine` is a documented rule, not a model: it looks at the last five completed steps of the same mission. Four fast and clean ones raise the level by one; three slow or error-ridden ones lower it; otherwise the median level is kept. With fewer than three results the level is 2. A snooze policy can add one level per snooze. Insights shows the rule's reasoning, and suggestions never change a setting by themselves.3435## When a mission cannot run3637| Situation | Behaviour |38|---|---|39| No camera, camera permission denied, tag deleted | the QR mission explains why and the runner offers Math Blitz |40| No pedometer, motion permission denied | the runner offers Memory Matrix |41| The user cannot do a gesture or see a colour | "Switch to an alternative mission" in the runner menu; panels and wires also differ by shape and thickness |42| The user must leave | emergency exit: confirmed, recorded as a bypass, never counted as a wake-up |4344An alarm whose mission is invalid (a QR step without a tag) cannot be saved from the editor, but an alarm already scheduled keeps ringing whatever happens to its mission.4546## Verification4748Engines: 2 500 to 12 000 generated puzzles per level in unit tests. Views: Math (levels 1 to 4), Memory, Pattern, Word, Logic Gates and Maze were played to the summary by UI tests; Color Sequence at level 1. The real camera, the real pedometer, tilt control, VoiceOver and Reduce Motion paths have not been exercised on a device.49
Files main
Menu

Theme