Rennding

Day Zero — Design Bible

| 2 Apr 2026 | Muted stat color palette (#5ba3d9, #d96b5b, #5bb88a, #9b7ed8) | Softer tones for prolonged viewing; old bright primaries caused eye strain |

Rennding 1 Updated 2mo ago

Resources

18
GitHub

Install

npx skillscat add rennding/demosim

Install via the SkillsCat registry.

SKILL.md

Day Zero — Design Bible

Human-readable. For session protocol and failure modes, Claude reads RULES.md.


What is Day Zero

Browser-based roguelite, corporate workday survival simulation. Single-file HTML output (dayzero.html), vanilla JS, no framework. Modular src/ files assembled by build.js.

The player survives a 15-day performance review window at a corporate job. Each day is a resource management puzzle: spend energy, manage stress, hit performance targets, maintain stability. Perks, anomalies, and escalating difficulty create emergent runs.


File structure

dayzero/
  src/
    shell.html          ← HTML skeleton ({{STYLES}} and {{SCRIPTS}} placeholders)
    styles.css          ← all CSS
    01_config.js        ← BLOCKS, PERKS, EVENTS, COMMUTE_EVENTS, OUTCOMES, ONBOARDING
    02_state.js         ← G object, initNewRun, watch/phone UI, resetDay
    03_engine.js        ← utils, effects system, pickEvent, scaling functions
    04_ui.js            ← HUD, formatting helpers, setHTML, showTitle, startNewRun
    05_prologue.js      ← PROLOGUE_BEATS, all prologue functions, beginDay1
    06_flow.js          ← day phases, planning, shift, BLOCK_EVENTS, processShiftSlot
    07_minigames.js     ← all 15 minigame functions (mg*)
    08_endgame.js       ← showDaySummary, chooseSleep, showGameOver, showWin
    09_assets.js        ← IMGS, scene helpers, getTimeOfDayFilter
    10_avatar.js        ← AVATAR object — never read directly; contains large base64 blocks
    11_debug.js         ← debug panel, content editor (` or F2)
    12_save.js          ← save/load/resume system, phase checkpoints
  tests/                ← unit tests (Node vm sandbox — no browser needed)
  e2e/                  ← Playwright E2E tests (headless Chromium, runs on Aram's machine)
    helpers.js          ← shared navigation helpers
    server.js           ← zero-dependency static file server for tests
    smoke.spec.js       ← game loads, title renders, no JS errors
    structure.spec.js   ← title → prologue → Day 1 flow
    daycycle.spec.js    ← full day cycle + multi-day endurance
    console.spec.js     ← zero JS errors during full play session
  build.js              ← assembles src/ into dayzero.html
  package.json          ← npm scripts: build, gate, fullgate, test:e2e, etc.
  playwright.config.js  ← Playwright config (headless Chromium, auto-serve, screenshot on fail)
  dayzero.html          ← OUTPUT ONLY — never edit directly
  specs/                ← all SPEC files. Format: SPEC_[QUEUE-ID].md
  DEVLOG.md             ← human changelog: version history, queue status, decisions
  DEVLOG_archive.md     ← historical record: Done items, resolved bugs, session history
  SKILL.md              ← this file (design bible)
  RULES.md              ← Claude's session protocol (machine-readable)

Queue + workflow: GitHub Issues + Projects board at github.com/Rennding/DayZero. GitHub is the single source of truth — no local queue files.


Stats and structure

Five stats: Energy (0–100), Stress (0–100), Performance (0–100), Stability (0–100), Standing (0–100)

Run structure: 15-day demo window. Day Zero prologue → Day 1–15 loop.
Each day: morning → commute → shift blocks → end-of-day summary → sleep choice.

Roguelite mechanics: carry-over fatigue, escalating performance targets, stress/energy threshold debuffs, stability ratchet, sleep trade-offs, perk downsides, performance momentum, anomaly system.


Design rules — non-negotiable

The simulation layer

Hints are environmental breadcrumbs only. Never confirm or resolve the simulation mystery. Any content that "confirms" the layer is a design error.

Reference: Ishiguro's Never Let Me Go — the reader understands before the characters do. The player should feel the wrongness, not be told about it.

Voice

Dry, deadpan, corporate-mundane-as-horror. 1–2 sentences per outcome. Second person ("You…"). No exclamation marks. No overt emotion. Never explain the joke.

✓ Good ✗ Bad
"The meeting ends. Nobody mentions what was decided." "Great job! You navigated that meeting successfully!"
"You submit the report. It is received." "Your hard work paid off! Performance improved."

Location consistency

Every new event needs requiresWFH: true or requiresOffice: true if it's location-specific. Events without a flag can fire anywhere. Ask: can this event logically happen both at office AND WFH? If no → add the flag.

Minigame wiring

Any new minigame type must be wired to at least one core event choice in BLOCK_EVENTS or EVENTS. Wiring only to the wildcard pool (25% chance) means it effectively never fires in normal play.

Failure is emergent

Difficulty comes from compounding pressure and trade-offs, not scripted events. Never add a mechanic that punishes the player arbitrarily — every hard moment should trace back to a choice the player made.


Session types

Type Goal Output
Audit Find problems, catalog them Numbered issue list with P1/P2/P3
Plan Design a solution Structured SPEC file in specs/
Build Implement a spec Updated src/ module(s) + rebuilt dayzero.html
Infra Structural/tooling changes, no game logic impact Updated files + DEVLOG entry

Never mix Plan and Build in the same session.

Infra sessions: file reorganizations, naming changes, build system, test infrastructure, workflow rule updates. No SPEC required. Run npm run gate if the change touches anything that affects the build output or test pipeline.


Role split

Aram = designer + QA. Tests in browser, reports pass/fail. Never writes code.

Claude = implementer. Reads specs, writes code, runs builds, manages GitHub issues.

Future team members: read this file for game context and design rules. Read RULES.md if you're running Claude sessions. Read DEVLOG.md for current status.


Production roadmap (confirmed scope)

  • Run lengths: 15-day (demo), 30-day (standard), 60-day (extended) — parameterized via getEffectiveDay()/getRunProgress()
  • Worlds: World 1 Corporate (built), World 2 Startup (planned), World 3 Campus (planned)
  • Platform: Mobile-first browser. Android packaging via TWA. No iOS commitment yet.
  • Audio: SFX system + background music (both planned, not built)
  • Accessibility: Text scaling, reduced motion, keyboard nav, colour contrast (planned)
  • Monetization: Not decided. No ads in the game. Premium or free TBD.
  • Narrative depth: Simulation layer hints only — never resolved in-game

Decisions log

For full history see DEVLOG_archive.md. Recent decisions only here.

Date Decision Rationale
2 Apr 2026 Cross-run narrative flavor — seedMetaFlags() bridge, returning-player interstitial, prologue variants, NPC memory, veteran events Meta-progression systems are built but the game doesn't acknowledge repeated runs narratively. Bridge pattern: map meta state into G.flags so existing TEXT_VARIANTS + condition() systems work without forking. Interstitial before prologue signals new content to returning players. ~12 prologue variant narratives, ~15 NPC memory TEXT_VARIANTS, 4 veteran-only events. Tone: the world notices, never explains.
2 Apr 2026 Standing warning escalation — 4 threshold events at standing 50/35/20/10, narrative lead-up before termination Standing decay is continuous but PIP is milestone-gated (reorg + low tier + 75-87% progress). Most players hit zero before the warning window. Fix: standalone condition()-gated events with no progress requirement. Tier 1-2 narrative only (signal, not punishment). Tier 3 introduces real choice matrix. Tier 4 is the acceptance moment.
2 Apr 2026 Passive choice rebalance — no passive recovers energy; all cost standing or stability; 3 flag families trigger consequence events at threshold 3 Passive was structurally dominant: energy gain + stress reduction + negligible cost. Rational player always avoids. Fix: passives feel like a loan (comfort now, reputation/stability cost later). Consequence events fire after ~3 passive picks of same type.
2 Apr 2026 Item-gated flavour choices — perks unlock additive bonus choices on shift/commute events Perks were passive stat modifiers only. Now they create contextual actions ("Headphones in, noise out"). Mostly lateral tradeoffs, some rewarding. Stack when player holds multiple qualifying perks. Lean start: 1–2 per original perk. UI: subtle item-attribution tag on swipe card.
2 Apr 2026 Environmental performance pressure — invisible pace tracker, not a progress bar Player should feel behind through tone shifts, not see a number. Calm = silence (ahead/on_pace get no extra flavor). Anxiety emerges from text changes when behind/sinking. Planning shows qualitative workload ("Demanding"/"Light"), never unit forecasts. Delta badges say "units" during shift to connect stat to goal.
2 Apr 2026 Multi-slot save system with IndexedDB + employee numbers localStorage single-slot too fragile and limited. IndexedDB gives persistent, large-quota, per-device storage. 5 save slots identified by employee number (meta-narrative flavor). Export/import for cross-device transfer. Save screen ("Personnel Files") replaces resume/fresh fork on title screen
2 Apr 2026 Precomputed shiftLocations[] replaces G.atOffice toggle Toggle model was semantically inverted after morning commute; broke all location-aware text. Precomputed array is deterministic, handles double-commute mornings, and makes location a build-time property of the shift plan
1 Apr 2026 GitHub = single source of truth for queue/QA state Prevents desync when Aram changes issues between sessions
1 Apr 2026 SKILL.md split into SKILL.md (human) + RULES.md (machine) Reduces session start context burn; cleaner audience separation
1 Apr 2026 needs-aram label = exclusive (no other labels) when awaiting QA Single clean filter for Aram to see what's waiting on him
1 Apr 2026 blocker on upstream issues, dependency on downstream Old "blocked" label retired; direction now explicit
2 Apr 2026 Playwright E2E = mechanical QA only; Aram retains feel/content Regression gate catches JS errors + broken transitions; never tests tone/pacing/aesthetics
2 Apr 2026 npm run gate mandatory before every QA Brief Replaces manual node build.js && node --check; includes unit tests + smoke E2E
2 Apr 2026 Block-level item moments (Tier 2) — guaranteed daily item expression Tier 1 (event-specific ITEM_CHOICES) too rare — base events compete in large pool, fire once per run max, gated by location/time. Tier 2 triggers on block type (deep_work, meeting, rest, etc.), which is guaranteed every shift. Once per perk per day, no double-up with Tier 1, covers all 14 perks.
2 Apr 2026 Smartwatch removed; stats rework via delayed animation + delta badges Watch added UI noise without payoff; delayed animation solves immersion break during screen transitions
2 Apr 2026 Phone Vitals app = detailed stat view (replaces watch overlay) Keeps phone hub useful; thematic as corporate wellness app
2 Apr 2026 Muted stat color palette (#5ba3d9, #d96b5b, #5bb88a, #9b7ed8) Softer tones for prolonged viewing; old bright primaries caused eye strain