clone

fifteen puzzle games for the terminal, with daily puzzles, weekly ladders and xp, built on bubble tea

chore/app-model-decomp
puzzletea / openspec / specs / hitori / spec.md
spec.md 2.6K rendered
1## Purpose2Document the shipped Hitori built-in game behavior.34## Requirements56### Requirement: Registry Metadata7Hitori SHALL be registered as a built-in game with canonical description "Shade the cells to eliminate duplicates.", aliases `none`, variants `Hitori (default 1800 Elo)`, and daily legacy modes `easy, medium`.89#### Scenario: Resolve Hitori10- **WHEN** the registry resolves the canonical name or any alias11- **THEN** it returns the Hitori entry with help text, import behavior, variant metadata, and legacy mode compatibility1213### Requirement: Variant Elo Creation14Hitori MUST support the current variant plus target Elo creation path, using the variant default Elo when no explicit target is supplied.1516#### Scenario: Spawn Hitori by Elo17- **WHEN** the user selects the Hitori variant and a target Elo from 0 through 300018- **THEN** PuzzleTea spawns a deterministic Hitori puzzle and records target, actual, and confidence metadata when generation reports it1920### Requirement: Legacy Mode Compatibility21Hitori SHALL preserve legacy named modes as compatibility presets that map to the Hitori variant and preset Elo values: Mini (300 Elo), Easy (700 Elo), Medium (1300 Elo), Tricky (1800 Elo), Hard (2300 Elo), Expert (2800 Elo).2223#### Scenario: Use legacy mode title24- **WHEN** the user supplies a legacy Hitori mode title through CLI or deterministic daily metadata25- **THEN** PuzzleTea resolves it to the Hitori variant and the registered preset Elo2627### Requirement: Puzzle Rules28The Hitori runtime MUST let players shade cells so each row and column has no duplicate unshaded numbers, shaded cells are never orthogonally adjacent, and all unshaded cells remain connected.2930#### Scenario: Check solved state31- **WHEN** the player fills the board or word state32- **THEN** Hitori reports solved only when all rule constraints are satisfied3334### Requirement: Save Load And Interaction35Hitori SHALL serialize enough state for resume/import, reset to its initial puzzle, expose debug and full-help data, and support its shipped interaction model. Keyboard shading controls are required, and mouse click-to-focus support MUST be available.3637#### Scenario: Resume saved Hitori38- **WHEN** a saved Hitori payload is imported39- **THEN** the restored game preserves givens, player entries, cursor/selection state where applicable, and solved-state behavior4041### Requirement: Print Export Support42The Hitori print adapter SHALL render puzzle and solution data for JSONL-to-PDF workflows.4344#### Scenario: Export Hitori45- **WHEN** Hitori is included in a JSONL or PDF export flow46- **THEN** PuzzleTea follows the registered print support behavior for that game