Commit Graph

99 Commits

Author SHA1 Message Date
Z. Cliffe Schreuders
0c90e1298c Complete Mission 3 Stage 2 Atmosphere & Locations
- Created comprehensive atmosphere.md (1,085 lines)
- 7 detailed location descriptions with day/night contrasts
- Reception lobby: Corporate facade, company founding plaque (safe PIN clue: 2010)
- Conference room: Victoria meeting location, LORE Fragment 4 (philosophy whiteboard)
- Office hallway: Guard patrol route, server room access
- Server room (PRIMARY): VM terminal, physical evidence, technical challenges
- Victoria's office: LORE Fragment 3 (Architect's email), confrontation location
- James's office: Innocence evidence, moral complexity, warning note option
- Break room: Guard patrol waypoint
- Comprehensive atmospheric design:
  * Day/night transformation philosophy
  * Lighting design (bright professional vs. dark tense)
  * Sound design (corporate ambiance vs. stealth tension)
  * Environmental storytelling (dual nature revelation)
- 7 key atmospheric moments identified
- Complete sensory design for immersion
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
8ddeac37cb Complete Mission 3 Stage 2 Character Profiles
- Created comprehensive characters.md (948 lines)
- Victoria Sterling: True believer villain with economic philosophy
  * Calculated harm (hospital deaths), feels no remorse
  * Articulate evil monologue explaining worldview
  * Strategic double agent offer (not remorseful)
- James Park: Innocent bystander for moral complexity
  * Genuine ethical hacker, family man
  * Unaware of Zero Day criminal operations
  * Player choice: warn or let face consequences
- Agent 0x99: Mission handler with established voice
  * Provides briefing, tutorials, revelation reactions
  * Acknowledges player choices in debrief
  * Advances campaign arc (The Architect)
- Cipher: Referenced Zero Day leader (future antagonist)
- Character relationships matrix
- Discoverable evidence specifications
- Complete dialogue samples for key scenes
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
7fe580aeb6 Complete Mission 3 Stage 1 - Narrative Structure Development
- Created comprehensive story_arc.md (1,546 lines)
- 14 scenes across 3 acts with complete breakdown
- Key story beats identified (opening hook, midpoint twist, climax choice)
- Emotional arc progression mapped with tension curve
- Pacing chart with timeline breakdown (60-75 min playtime)
- Variable tracking specification (tracks actual actions, not vague labels)
- Opening/closing cutscene implementation details
- Mission highlights:
  * Concrete stakes: Zero Day sold hospital ransomware exploit (4-6 deaths)
  * Midpoint twist: M2 connection revelation (Scene 10)
  * Climax: Victoria double agent choice
  * Campaign arc: The Architect introduction
- Educational focus: Network recon (nmap, netcat, distcc), RFID security, multi-encoding
- Ready for Stage 2: Storytelling Elements Development
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
27f04d601d Add Mission 3 Stage 0 completion document
Stage 0 COMPLETE 

All 4 documents created (~2,900+ lines total):
 Scenario initialization (820 lines)
 Technical challenges (812 lines)
 Narrative themes (600+ lines)
 Hybrid architecture plan (700+ lines)

Key Achievements:
- RFID cloning mechanic fully specified
- M2 connection revelation designed
- The Architect introduction planned
- Moral choices defined (Victoria, James)
- Educational objectives mapped (6 CyBOK areas)
- Campaign arc connections documented

Ready for Stage 1: Narrative Structure Development

Status: Stage 0 COMPLETE | Next: Stage 1
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
e70e4cf9dd Complete Mission 3 Stage 0 - Scenario Initialization (4/4 documents, ~2,900 lines)
Stage 0 COMPLETE! All foundation documents created:

Document 1: Scenario Initialization (820 lines) 
- Mission overview (tier, playtime, ENTROPY cell, SecGen scenario)
- CyBOK knowledge areas (NSS, SS, ACS, SOC, HF, AB)
- 3-act structure with scene preview
- Key NPCs (Victoria Sterling, James Park, Cipher, Agent 0x99)
- 4 LORE fragments with campaign significance
- Victory conditions (100%, 80%, 60%)
- Educational objectives
- Campaign arc connections (M1-M2-M4-M6-M7-9)
- Post-mission debrief script
- Critical decisions: RFID (proximity + social eng), scanning (auto + tutorial), double agent (long-term vs immediate), Architect (name only)

Document 2: Technical Challenges (812 lines) 
Break Escape In-Game:
- RFID Cloning (NEW): Proximity (2 GU, 10s), visual feedback, tutorial, alt paths
- Lockpicking: 4 locks (cabinet, office, security, safe PIN 2010)
- Guard Patrol: 60s loop, LOS detection, timing strategies
- Social Engineering: Victoria trust (0-100), James intel, guard cover stories
- Multi-Encoding: ROT13, Hex, Base64, double-encoded (ROT13+Base64)

VM/SecGen Challenges:
- Network Scanning: nmap, flag{network_scan_complete}
- Banner Grabbing: netcat FTP, flag{ftp_intel_gathered}, GHOST codename
- HTTP Analysis: Base64 HTML, flag{pricing_intel_decoded}
- distcc Exploit: CVE-2004-2687, flag{distcc_legacy_compromised}, M2 connection!

Integration: 9 challenges (5 in-game, 4 VM), difficulty scaling, educational rubric

Document 3: Narrative Themes (600+ lines) 
Theme: Corporate Espionage / Intelligence Gathering
Setting: WhiteHat Security Services (Zero Day front company)
- Daytime: Professional corporate facade
- Nighttime: Espionage thriller tension
- Contrast: Same location, two faces

NPCs Detailed:
- Victoria Sterling: Free-market ideologue, true believer, double agent candidate
- James Park: Innocent employee, moral complexity, protection choice
- "Cipher": Cell leader (referenced), future villain setup
- Agent 0x99: Handler, tutorials, debrief narrator

Tone: Espionage thriller (Michael Clayton, Tinker Tailor Soldier Spy)
Stakes: Personal (James), Organizational (SAFETYNET vs Zero Day), Societal (exploit marketplace)
Central Conflict: Player vs Victoria ideology, vs Zero Day operations, vs Architect (background)

Document 4: Hybrid Architecture Plan (700+ lines) 
VM Component (SecGen "Information Gathering: Scanning"):
- Validates network reconnaissance (nmap, netcat, distcc)
- 4 flags represent ENTROPY intercepts
- Stable (pre-built, unchanged for assessment consistency)

ERB Component (Narrative Content):
- Encoded messages (ROT13, Hex, Base64, double-encoded)
- LORE fragments (client list, exploit catalog, Architect directives)
- NPC dialogues (Ink scripts)
- Environmental storytelling

Dead Drop Integration:
- VM flag → submit at drop-site terminal → unlock in-game resource
- flag{network_scan_complete} → workstation access
- flag{ftp_intel_gathered} → client codename list
- flag{pricing_intel_decoded} → pricing spreadsheet, LORE 2 access
- flag{distcc_legacy_compromised} → M2 connection reveal, Agent 0x99 "aha moment"

Correlation Matrix:
- FTP banner (VM) "GHOST" ↔ Hex client list "Ransomware Inc" ↔ distcc log "ProFTPD sale"
- ROT13 whiteboard "THE ARCHITECT" ↔ Double-encoded USB "Architect directives"
- Base64 email "$12,500 ProFTPD" ↔ distcc log "ProFTPD sale $12,500" (exact match!)

Educational Integration:
- Agent 0x99 tutorials (RFID, nmap, netcat, encoding)
- Drop-site terminal annotations (port explanations)
- CyberChef workstation hints (after failed attempts)

Key Mission Features:
🆕 RFID Keycard Cloning (2 GU proximity, 10s clone, progress bar, tutorial)
🎯 M2 Revelation (ProFTPD sold to Ghost for $12,500, hospital ransomware connection)
🎯 Architect Introduction (First direct communication, Q4 priorities, cell coordination)
⚖️ Moral Choices (Victoria: arrest vs double agent | James: protect vs ignore)
📚 Educational (NSS: nmap/netcat, SS: distcc CVE, ACS: multi-encoding, SOC: correlation)

Victory Conditions:
- 100%: All 4 VM flags + 4 encoded messages + 3 LORE + choices + stealth
- 80%: 3 VM flags + 3 messages + 2 LORE + choices
- 60%: 2 VM flags + 2 messages + choices

Campaign Impact:
- Confirms ENTROPY coordination (not independent cells)
- Reveals The Architect as real coordinator (not myth)
- Proves Zero Day is central exploit supplier
- Sets up M4 (Critical Mass SCADA), M6 (Crypto Anarchists), M7-9 (Architect hunt)

Stage 0 Status:  COMPLETE (4/4 documents, ~2,900 lines)
Next: Stage 1 - Narrative Structure Development (scene-by-scene breakdown)
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
e93aa1e876 Add Mission 3 Stage 0 progress summary
Created comprehensive Stage 0 development summary document:

Progress: 50% Complete (2/4 documents)

 Completed Documents:
1. Scenario Initialization (820 lines)
   - Mission overview, CyBOK areas, 3-act structure
   - NPCs, LORE fragments, victory conditions
   - Educational objectives, campaign connections
   - Critical decisions made (RFID, scanning, choices)

2. Technical Challenges (812 lines)
   - 5 in-game challenges (RFID cloning NEW, lockpicking, guards, social eng, encoding)
   - 4 VM challenges (nmap scan, FTP banner, HTTP/Base64, distcc CVE-2004-2687)
   - Integration matrix, difficulty scaling, assessment rubric
   - Implementation priority (3 phases)

🔄 In Progress:
3. Narrative Themes - NEXT
4. Hybrid Architecture Plan - PENDING

Key Achievements:
 RFID cloning mechanic fully specified (proximity, tutorial, alternatives)
 Campaign arc advanced (Architect first communication, M2 connection)
 Educational value defined (9 challenges → 6 CyBOK areas)
 Moral complexity created (Victoria double agent, James protection)
 LORE framework set (4 fragments connecting Season 1 cells)
 NPC voices established (Victoria ideologue, James innocent, Cipher mystery)

Mission Features Defined:
- New Mechanic: RFID cloning (2 GU, 10s, visual feedback, tutorial)
- M2 Revelation: ProFTPD sold to Ghost for $12,500 (hospital ransomware)
- Architect Reveal: First direct communication (Q4 priorities, coordination)
- Moral Choices: Victoria (arrest vs double agent), James (protect vs ignore)
- 3 Acts: Daytime recon (20-30%) → Nighttime infiltration (50-55%) → Choice (20-25%)

Educational Objectives:
- Network reconnaissance (nmap, netcat, service enumeration)
- Service exploitation (distcc CVE-2004-2687, Metasploit)
- Multi-encoding (ROT13, Hex, Base64, nested ROT13+Base64)
- Intelligence correlation (physical + digital evidence)
- RFID security vulnerabilities, social engineering

Victory Conditions:
- 100%: All flags, all LORE, both choices, stealth
- 80%: 3/4 flags, 2/3 LORE, choices made
- 60%: 2/4 flags, server accessed, choice made

Next Steps:
- Complete narrative_themes.md (setting details, NPC voices, tone)
- Complete hybrid_architecture_plan.md (VM + ERB integration spec)
- Proceed to Stage 1 (Narrative Structure Development)

Status: Stage 0 - 50% COMPLETE
Target: Ready for Stage 1 by end of session
2026-01-14 09:46:32 +00:00
Z. Cliffe Schreuders
7c9d471eaf Complete Mission 3 Stage 0 technical challenges specification
Added comprehensive technical challenges breakdown (600+ lines):

Break Escape In-Game Challenges:

1. RFID Keycard Cloning (NEW MECHANIC)
   - Proximity-based (2 GU range, 10-second window)
   - Visual feedback: Progress bar, particle effects, audio cues
   - Success: Cloned keycard added to inventory
   - Alternative: Social engineering (victoria_trust >= 40)
   - Tutorial: Agent 0x99 pre-mission briefing
   - Educational: RFID vulnerabilities, proximity attacks
   - Implementation: Proximity detection, progress tracking, inventory integration

2. Lockpicking (Reinforced from M1-M2)
   - 4 locks: IT cabinet (easy), executive office (medium), security room (medium), safe (PIN)
   - Safe combo: 2010 (WhiteHat founding year)
   - Clues: Reception plaque, computer file
   - Skill reinforcement, no tutorial needed
   - Contains: LORE Fragment 2 (Exploit Catalog)

3. Guard Patrol Stealth (Reinforced from M2)
   - Night security guard, 4-waypoint patrol (60s loop)
   - LOS: 150px range, 120° cone
   - Detection states: Unaware → Alert → Suspicious → Hostile
   - Strategies: Timing-based stealth, social engineering, distraction
   - Educational: Operational security, pattern recognition

4. Social Engineering (Advanced)
   - Victoria Sterling: Influence system (50 start, 40+ for bypasses)
   - Trust unlocks: Office info (30+), server access (40+), double agent (80+)
   - James Park: Information extraction (office layout, schedules, security)
   - Night Guard: Cover story validation
   - Educational: Trust exploitation, corporate infiltration

5. Multi-Encoding Puzzle
   - Message 1: ROT13 whiteboard ("MEET WITH THE ARCHITECT...")
   - Message 2: Hex client list (Ransomware Inc, Critical Mass, Social Fabric)
   - Message 3: Base64 email (ProFTPD exploit pricing)
   - Message 4: Double-encoded USB (ROT13 + Base64 nested - Architect's directives)
   - Discovery: Conference room, Victoria's computer, email, desk drawer
   - Educational: Pattern recognition, multi-stage decoding, persistence
   - CAMPAIGN REVEAL: First direct Architect communication!

VM/SecGen Challenges (Information Gathering: Scanning):

1. Network Port Scanning
   - Tool: nmap
   - Target: 192.168.100.50
   - Output: Ports 21 (FTP), 22 (SSH), 80 (HTTP), 3632 (distcc)
   - Flag: flag{network_scan_complete}
   - Educational: Port scanning, service enumeration
   - Difficulty: Easy

2. Banner Grabbing (FTP)
   - Tool: netcat, ftp
   - Banner reveals: Client codename "GHOST" (M2 connection!)
   - Flag: flag{ftp_intel_gathered}
   - Educational: Intelligence from banners, netcat fundamentals
   - Difficulty: Easy

3. HTTP Service Analysis
   - HTML contains Base64 in comment
   - Encoded: ZmxhZ3twcmljaW5nX2ludGVsX2RlY29kZWR9
   - Decoded: flag{pricing_intel_decoded}
   - Educational: Web reconnaissance, Base64 (reinforced)
   - Connects: Victoria's pricing email
   - Difficulty: Medium

4. distcc Exploitation (CVE-2004-2687)
   - Vulnerability: distcc daemon RCE
   - Tools: Metasploit or manual exploitation
   - Shell access → operational logs
   - CRITICAL REVEAL: ProFTPD sold to Ghost for $12,500 (M2 hospital!)
   - Flag: flag{distcc_legacy_compromised}
   - Educational: Legacy exploitation, CVE research, RCE
   - Difficulty: Advanced

Challenge Integration Matrix:
- 9 challenges total (5 in-game, 4 VM)
- Difficulty: Easy → Advanced scaling
- Educational: NSS, SS, ACS, SOC, HF, AB knowledge areas
- Unlocks: Server access, intel, LORE, M2 connection, Architect reveal

Difficulty Scaling:
- Easy: 5s RFID, slower guard, tutorial VM
- Normal: 10s RFID, standard guard, all encoding types
- Hard: 15s RFID, fast guard, additional obfuscation

Educational Assessment Rubric:
 Network reconnaissance (port scanning, service enumeration)
 Service exploitation (distcc CVE-2004-2687, Metasploit)
 Encoding analysis (ROT13, Hex, Base64, nested decoding)
 Intelligence correlation (physical + digital evidence)
 Physical security (RFID, lockpicking, stealth, social engineering)

Implementation Priority:
- Phase 1: RFID, guard, VM challenges, drop-site integration
- Phase 2: Social engineering, encoding puzzle, LORE, safe
- Phase 3: Tutorials, scaling, alternative paths, feedback

Status: Stage 0 technical challenges COMPLETE 
Next: narrative_themes.md, hybrid_architecture_plan.md
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
88e00f4a8d Begin Mission 3 'Ghost in the Machine' - Stage 0 Initialization
Created comprehensive Stage 0 scenario initialization for Mission 3:

Mission Overview:
- Title: "Ghost in the Machine"
- Tier: Intermediate (Mission 3 of Season 1)
- ENTROPY Cell: Zero Day Syndicate
- SecGen Scenario: "Information Gathering: Scanning"
- Playtime: 60-75 minutes
- New Mechanic: RFID keycard cloning

Key Features:
 Undercover operation at WhiteHat Security Services (Zero Day front company)
 RFID cloning mechanics (proximity-based, 10-second window)
 Network reconnaissance integration (nmap, netcat, distcc exploitation)
 Multi-encoding puzzle (ROT13, Hex, Base64, double-encoded)
 Major revelation: Zero Day sold M2 hospital ransomware exploit
 First direct mention of "The Architect" (campaign arc progression)
 Double agent vs. arrest moral choice

Technical Challenges:
- VM: Network scanning (nmap), banner grabbing (netcat), distcc CVE-2004-2687
- In-Game: RFID cloning, lockpicking, guard patrol, social engineering, multi-encoding
- Hybrid: Dead drop system integrates VM flags with ERB narrative content

CyBOK Areas:
- NSS: Port scanning, service enumeration, banner grabbing
- SS: distcc exploitation, legacy service targeting
- ACS: ROT13, Hex, Base64 encoding, multi-stage decoding
- SOC: Intelligence correlation, systematic investigation
- HF: Undercover operations, social engineering
- AB: Exploit marketplace economics, threat actor coordination

3-Act Structure:
- Act 1 (20-30%): Undercover infiltration, daytime recon, clone RFID card
- Act 2 (50-55%): Nighttime infiltration, network scan, evidence collection
- Act 3 (20-25%): M2 connection reveal, Architect discovery, moral choice

Key NPCs:
- Victoria Sterling (Zero Day sales lead) - Professional, ideological, arrest/double agent target
- James Park (Innocent pen tester) - Moral complexity, optional protection choice
- "Cipher" (Cell leader) - Referenced but not seen, future villain setup
- Agent 0x99 (Handler) - Briefing, tutorials, debrief

LORE Fragments:
1. Zero Day Client List (Hex-encoded) - Shows all ENTROPY cells coordinating
2. Exploit Catalog (Safe, PIN 2010) - ProFTPD sale to Ghost for $12,500
3. The Architect's Requirements (Double-encoded) - First direct communication
4. Victoria's Manifesto (Whiteboard) - Free market ideology

Campaign Connections:
- M1: Social Fabric appears in client list
- M2: ProFTPD exploit sold to Ghost revealed (MAJOR "aha moment")
- M4: Critical Mass client, SCADA exploits referenced
- M6: Crypto Anarchists mentioned in Architect's requirements
- M7-9: The Architect introduction, coordination revealed

Educational Objectives:
- Network reconnaissance (port scanning, service enumeration)
- Banner grabbing for intelligence gathering
- Multi-stage encoding/decoding
- Intelligence correlation (physical + digital evidence)
- RFID security vulnerabilities

Victory Conditions:
- Full (100%): 4 VM flags, 4 encoded messages, 3 LORE, moral choices, stealth
- Standard (80%): 3 VM flags, 3 encoded messages, 2 LORE, moral choices
- Minimal (60%): 2 VM flags, 2 encoded messages, moral choice

Moral Choices:
1. Victoria Sterling: Arrest (disrupt cell) vs. Double Agent (long-term intel)
2. James Park: Protect innocent vs. Focus on mission
3. Consequences tracked in global variables, reflected in debrief

Critical Decisions Made:
 RFID cloning: Proximity (10s) + social engineering alternative
 Network scanning: Automated flags + educational tutorial
 Double agent: Long-term intelligence vs. immediate disruption
 Architect reveal: Name only (identity reserved for M7-9)
 Setting: WhiteHat Security corporate office
 Structure: Daytime recon → nighttime infiltration

Next Steps:
Stage 1 - Narrative Structure Development (scene-by-scene breakdown)

Status: Stage 0 COMPLETE 
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
3b367f75a2 Add Mission 3 'Ghost in the Machine' preparation document
Mission 3: Intelligence Gathering & Network Reconnaissance
- ENTROPY Cell: Zero Day Syndicate
- SecGen Scenario: Information Gathering: Scanning
- New Mechanics: RFID keycard cloning, network reconnaissance
- Difficulty: Intermediate (Mission 3 of Season 1)
- Playtime: 60-75 minutes

Key Features:
- Undercover operation at WhiteHat Security Services (Zero Day front)
- RFID cloning mechanics introduction
- Network scanning integration (nmap, netcat, distcc exploitation)
- Multi-encoding puzzle (ROT13, Hex, Base64)
- Major revelation: Zero Day sold M2 hospital ransomware exploit
- First direct mention of "The Architect" (campaign arc progression)
- Double agent vs. arrest moral choice

Campaign Connections:
- Reveals cross-cell coordination (M2 hospital attack traced to Zero Day)
- Sets up Zero Day as recurring antagonist
- Introduces The Architect as mysterious coordinator
- Client list connects M1 (Social Fabric), M2 (Ransomware Inc), M4 (Critical Mass)

CyBOK Areas:
- Network Security (port scanning, service enumeration, banner grabbing)
- Systems Security (distcc exploitation CVE-2004-2687)
- Applied Cryptography (multiple encoding types, pattern recognition)
- Security Operations (intelligence correlation, systematic investigation)

README includes:
- Executive summary and mission overview
- 9-stage development workflow (same as M1, M2)
- Technical challenges breakdown (RFID, network recon, encoding)
- Narrative arc (3 acts: undercover → infiltration → revelation)
- Key NPCs (Victoria Sterling, James Park, Cipher references)
- LORE opportunities (client lists, exploit catalog, Architect requirements)
- Good practices from M1 & M2
- Critical decisions needed before Stage 0
- Risk assessment
- Development timeline estimate (70-97 hours design)

Status: Ready for Stage 0 initialization
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
c0765a4861 Complete Mission 2 'Ransomed Trust' Stages 8-9: Validation and Assembly
Stage 8: Scenario Review and Validation
- Comprehensive validation report (08_validation_report.md)
- Validated completeness across all 8 stages (0-7)
- Technical validation: room dimensions, Ink syntax, item placement
- Educational quality: CyBOK alignment, technical accuracy
- Narrative quality: character consistency, choice impact
- Player experience: no soft locks, clear objectives
- Overall assessment: PASS WITH MINOR RECOMMENDATIONS
- No critical fixes required, scenario ready for assembly

Stage 9: Scenario Assembly
- Logical flow validation (09_logical_flow_validation.md)
  - All objectives completable with multiple valid paths
  - Progressive unlocking validated (no soft locks)
  - Resource access validated (items, keycards, NPCs)
  - Spatial logic validated (all coordinates within bounds)
  - Hybrid integration validated (VM flags, terminal interfaces)
  - Complete 12-step walkthrough (50-70 minutes)
  - VALIDATION PASSED

- Assembly guidance (09_assembly_guidance.md)
  - Phase-by-phase implementation roadmap (6 phases)
  - Complete JSON templates and ERB structure
  - All 9 room definitions with connections
  - NPC configurations with Ink script references
  - Complete items list (12 items)
  - LORE fragments JSON (3 fragments)
  - VM integration configuration
  - Validation checklists
  - Estimated implementation time: 12-18 hours

Mission 2 planning (Stages 0-9) now complete and ready for developer implementation.
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
30f0e686d9 Add Mission 2 Stage 7: Complete Ink Script Suite
Created 8 comprehensive Ink scripts for Mission 2 "Ransomed Trust":

1. m02_opening_briefing.ink
   - Act 1 emergency briefing with Agent 0x99
   - Player choice tracking (cautious/aggressive/adaptable approach)
   - Mission objectives and stakes establishment (47 patients, 12-hour window)
   - 3-line dialogue rule adherence throughout

2. m02_npc_sarah_kim.ink
   - Dr. Kim (Hospital CTO) NPC with hub dialogue pattern
   - Guilt revelation about budget cuts ($85K security vs $3.2M MRI)
   - Trust/influence system (0-100 scale)
   - Ransom decision input and scapegoating protection options

3. m02_npc_marcus_webb.ink
   - Marcus Webb (IT Admin) social engineering target
   - Trust-based access (keycard vs lockpicking paths)
   - Password hints and server room access progression
   - Vindication storyline (protect from scapegoating)

4. m02_terminal_dropsite.ink
   - VM flag submission interface (4 flags)
   - Hybrid architecture integration (VM → in-game unlocks)
   - Progressive intel unlocking system
   - Ghost manifesto horror reveal integration

5. m02_terminal_ransom_interface.ink
   - Critical moral choice interface (pay ransom vs manual recovery)
   - Ghost's persuasion vs Agent 0x99's analysis
   - Consequence visualization (1-2 vs 4-6 patient deaths)
   - Secondary decision: hospital exposure
   - Global variable tracking for debrief callbacks

6. m02_phone_agent0x99.ink
   - Handler support and tutorial guidance
   - Contextual hints (guard patrols, lockpicking, passwords, PIN safe)
   - Encoding tutorial (Base64, ROT13)
   - Ransom decision counseling (neutral presentation)
   - Event-triggered knots for game events

7. m02_phone_ghost.ink
   - Antagonist communication (cold, calculated ideology)
   - ENTROPY philosophy explanation
   - Patient death calculation justification
   - Unrepentant true believer characterization
   - Post-decision responses (paid vs refused ransom)

8. m02_closing_debrief.ink
   - Comprehensive outcome acknowledgment
   - Patient death statistics (2 vs 6 fatalities)
   - NPC fate tracking (Dr. Kim, Marcus protected/unprotected paths)
   - Ransom choice validation (utilitarian vs consequentialist ethics)
   - Hospital exposure consequences
   - Mission 3 setup (Zero Day Syndicate)
   - The Architect tease

Key Features:
- All scripts follow 3-line dialogue rule for pacing
- Hub patterns for replayable conversations
- Trust/influence systems for NPCs
- Proper #exit_conversation tags
- Variable tracking for choice callbacks
- External variable integration
- Event-triggered knot support
- Moral complexity without "right" answers

Stage 7 Complete: All narrative content ready for implementation.
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
bacb2b7308 Add Mission 2 Stages 5-6: Room Layout and LORE Fragments
Stage 5 - Room Layout and Spatial Design:
- Hospital floor plan with 7 rooms (hub-and-spoke layout)
- 3 locked doors with progressive difficulty (easy → medium → medium-hard)
- 60-second guard patrol with predictable waypoints
- Detailed container placement (11 total containers)
- PIN puzzle design with multiple clues and fallback device
- Server Room as central hub for VM/encoding challenges
- Multiple solution paths for player agency

Stage 6 - LORE Fragments:
- Fragment 1: Ghost's Manifesto (VM discovery, patient death calculations)
- Fragment 2: CryptoSecure Services (filing cabinet, front company operations)
- Fragment 3: ZDS Invoice (safe puzzle, exploit procurement and cross-cell coordination)
- Campaign connections to M3 (Zero Day Syndicate) and M6 (Crypto Anarchists)
- The Architect coordination role revealed

These planning documents complete the foundational design for Mission 2
"Ransomed Trust" room layout, spatial design, and narrative LORE integration.
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
92db4b3cfe Complete Mission 2 'Ransomed Trust' Stages 0-4 development
Stage 0: Scenario Initialization
- Complete mission overview with hospital ransomware crisis
- Ransomware Incorporated cell integration
- Hybrid architecture plan (VM ProFTPD exploitation + ERB narrative)
- Concrete stakes: 47 patients, 12-hour deadline, $87K ransom
- Ghost as true believer antagonist (calculated patient deaths)
- 3 LORE fragments planned (manifesto, CryptoSecure, ZDS invoice)

Stage 1: Narrative Structure
- Complete 3-act structure (18 scenes)
- Act 1: Infiltration (Dr. Kim, Marcus, guard tutorial)
- Act 2: Exploitation (VM challenges, safe puzzle, LORE discoveries)
- Act 3: Impossible choices (ransom dilemma, hospital exposure)
- Emotional beat timeline with intensity mapping
- Tutorial integration for new mechanics (guards, PIN safe, ROT13)

Stage 2: Character Development
- Dr. Sarah Kim: Desperate CTO with guilt over budget cuts
- Marcus Webb: Defensive IT admin, scapegoat victim
- Ghost: Unrepentant ENTROPY operative, true believer
- Agent 0x99: Supportive handler, growing ENTROPY concern
- Voice examples with 3-line dialogue rule
- Character arcs defined (Marcus varies by player choice)

Stage 3: Moral Choices and Consequences
- Choice 1: Marcus trust building (sympathize/professional/blame)
- Choice 2: Marcus protection (warn/plant evidence/ignore)
- Choice 3: Ransom payment (pay/independent recovery) - NO RIGHT ANSWER
- Choice 4: Hospital exposure (public/quiet) - transparency vs pragmatism
- Optional: Ghost confrontation (argue/acknowledge/silent)
- All choices have meaningful campaign consequences (M6 financial trail)
- Utilitarian vs Consequentialist ethical frameworks
- Debrief variations reflect all choices (4 ransom+exposure combos)

Stage 4: Player Objectives and Tasks
- 5 required aims, 3 optional aims
- 23 required tasks, 4 optional tasks (27 total)
- Hybrid objectives: VM flag submissions + in-game tasks
- Success tiers: 60% minimal, 80% standard, 100% perfect
- Progressive unlocking validated (no soft locks)
- Ink tag integration (#complete_task, #unlock_aim, #give_item)
- Optional achievements: Ghost Hunter, Code Breaker, Ethical Hacker

Technical Challenges (Detailed Breakdown):
- New mechanics: Patrolling guards (60s predictable), PIN safe puzzle
- Reinforced mechanics: Lockpicking (4 doors), social engineering, Base64
- New encoding: ROT13 (Caesar cipher introduction)
- VM: ProFTPD CVE-2010-4652 exploitation, SSH brute force, Linux nav
- CyBOK coverage: Malware, Incident Response, Cryptography, Human Factors

Key Design Decisions:
- Ransom dilemma has no 'right' answer (both ethically valid)
- Ghost remains unrepentant (true believer, no redemption arc)
- Marcus's fate controllable by player (justice possible)
- Guard patrols beginner-friendly (forgiving, predictable, alternate paths)
- PIN puzzle accessible (multiple clues, hint system, fallback device)
- Campaign integration: M3 ZDS connection, M6 financial trail

Ready for Stage 5: Room Layout Design
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
b01ed30968 Add Mission 2 'Ransomed Trust' development preparation document
- Created comprehensive preparation doc for M02 development
- Extracted mission details from Season 1 arc plan
- Documented 9-stage development workflow
- Applied Mission 1 good practices and lessons learned
- Identified new mechanics: patrolling guards, PIN cracking
- Outlined moral choices: ransom payment, hospital exposure
- Documented campaign connections to M1 and M6
- Included risk assessment and success criteria
- Ready for Stage 0: Scenario Initialization
2026-01-14 09:46:31 +00:00
Z. Cliffe Schreuders
adbd7a64b0 Revise Mission 1: First Contact to enhance narrative depth and urgency
- Updated the story premise to introduce "Operation Shatter," detailing the coordinated mass panic attack targeting vulnerable populations.
- Expanded the room layout to include additional rooms and NPC interactions, enhancing player exploration and engagement.
- Added critical LORE fragments revealing casualty projections and targeting demographics, emphasizing the stakes of the mission.
- Revised dialogue and choices to reflect player actions and moral implications, ensuring a more impactful closing debrief.
- Improved scenario structure and flow, aligning with best practices for narrative clarity and player agency.
2025-12-08 00:20:50 +00:00
Z. Cliffe Schreuders
d327380fac Enhance scenario validation and improve timed conversation structure
- Updated `validate_scenario.rb` to enforce correct usage of `targetKnot` in timed conversations, ensuring compliance with new requirements.
- Added checks for missing properties in timed conversations, including `delay` and `targetKnot`, to improve scenario integrity.
- Enhanced logging for validation issues, providing clearer feedback on scenario configuration errors.
- Updated relevant scenarios to align with the new validation rules, ensuring consistency across gameplay elements.
2025-12-04 23:15:03 +00:00
Z. Cliffe Schreuders
996a4ab6ce Add lab conversion prompt documentation for Break Escape scenarios
- Introduced a comprehensive guide for converting existing lab Ink files into Break Escape scenarios, detailing each step of the process.
- Included instructions for determining lab configuration, creating new scenario directories, and editing Ink files to align with gameplay requirements.
- Provided guidelines for updating scenario JSON, managing objectives, and ensuring compliance with best practices for dialogue and influence tracking.
- Emphasized the importance of validating scenarios and maintaining consistency with SecGen XML metadata for CyBOK entries.
2025-12-04 23:13:50 +00:00
Z. Cliffe Schreuders
47eaffa4c3 Scenario development WiP 2025-12-01 08:48:43 +00:00
Z. Cliffe Schreuders
2b766c6000 Add SecGen Scenario Summaries for BreakEscape mission design
- Created a comprehensive document detailing various SecGen lab scenarios, including setup, user accounts, vulnerabilities, and CTF steps.
- Each scenario provides insights into player experiences and objectives, aiding mission designers in understanding gameplay dynamics.
- Scenarios cover a range of topics, including Linux and Windows security labs, malware exploitation, information gathering, and post-exploitation techniques.
2025-11-30 02:26:28 +00:00
Z. Cliffe Schreuders
92330b04dc Enhance flag handling and XML integration for standalone mode
- Updated `GamesController` to support XML flag hints for standalone mode, improving backward compatibility with legacy flag input.
- Introduced `parse_flag_hints_xml` method in `Mission` model to extract flags from XML content.
- Enhanced `Game` model to incorporate `flags_by_vm` from player state for better flag management.
- Modified `new.html.erb` to update UI for flag hints input, replacing the previous comma-separated flags format.
- Improved `FlagStationMinigame` to display accepted VM flags and handle flag submissions more effectively.
- Adjusted scenario JSON to include flag stations with VM-specific flag handling.
2025-11-29 20:57:39 +00:00
Z. Cliffe Schreuders
3a64ffe8f1 Finalize implementation plan for VM and CTF Flag Integration following Review 4
- Updated last modified date and added new review document reference.
- Added policy methods for `GamePolicy#submit_flag?` and `MissionPolicy#create_game?`.
- Fixed authorization in `games#create` to use `:create_game?` and removed redundant `VmSet` authorization.
- Clarified loading of `hacktivity-cable.js` with CSP nonce.
- Included fallback for non-Hacktivity mode in VM set validation.
- Documented minor amendments and verification checklist for implementation readiness.
2025-11-28 15:00:13 +00:00
Z. Cliffe Schreuders
0c25124967 feat: Update VM console integration to use ActionCable for async file delivery 2025-11-28 14:23:39 +00:00
Z. Cliffe Schreuders
752fb2c4f9 Implement Review 3 updates for VM and CTF Flag Integration
- Added detailed review documentation for Hacktivity compatibility.
- Addressed critical issue: implemented missing `games#create` action in GamesController.
- Updated `MissionsController#show` to handle VM-required missions differently.
- Clarified deployment order for migration to remove unique index.
- Added recommendations for strong parameters in `games#create`.
- Documented necessary changes for flag submission and VM set display.
- Verified compatibility of model structures and updated flag submission logic.
2025-11-28 14:00:27 +00:00
Z. Cliffe Schreuders
dd720130c7 update plans 2025-11-27 23:44:51 +00:00
Z. Cliffe Schreuders
a3690b6a68 Implementation plan for VMs 2025-11-27 23:28:44 +00:00
Z. Cliffe Schreuders
9d6d7709c3 feat: Implement Objectives System with UI and Server Sync
- Added ObjectivesManager to track mission objectives and tasks.
- Created ObjectivesPanel for displaying objectives in a collapsible HUD.
- Integrated objectives state restoration from the server during game initialization.
- Implemented task completion and unlocking mechanisms via game actions.
- Added CSS styles for the objectives panel with a pixel-art aesthetic.
- Developed a test scenario to validate the objectives system functionality.
- Updated database schema to include fields for tracking completed objectives and tasks.
2025-11-26 00:50:32 +00:00
Z. Cliffe Schreuders
150518b4c4 feat: Include objectives state in server response and implement event emissions for door unlocks and key pickups 2025-11-25 23:19:11 +00:00
Z. Cliffe Schreuders
575dc9aad0 Add updated TODO checklist and corrected code snippets for objectives system
- Created an updated TODO checklist outlining phases and tasks for the objectives system implementation.
- Added corrected code snippets for critical fixes, including door unlock event emission and key pickup event handling.
- Documented necessary changes to ensure proper event emissions for objectives tracking.
- Reviewed and approved the implementation plan with minor corrections regarding door unlock events.
2025-11-25 23:13:58 +00:00
Z. Cliffe Schreuders
3cc9fafcec feat: Enhance mission management with CyBOK integration and collection filtering
- Added `Cybok` model to manage CyBOK entries associated with missions.
- Implemented `by_collection` scope in `Mission` model for filtering missions by collection.
- Updated `missions_controller` to filter missions based on the selected collection.
- Introduced `CybokSyncService` for syncing CyBOK data from mission metadata to the database.
- Created new views and partials for displaying CyBOK information with tooltips using Tippy.js.
- Added metadata fields to `break_escape_missions` for `secgen_scenario` and `collection`.
- Enhanced mission seeding logic to support new metadata and CyBOK entries.
- Added multiple new mission scenarios with associated metadata.
2025-11-25 15:20:05 +00:00
Z. Cliffe Schreuders
797b075cbe feat: Add mission metadata and CyBOK integration with JSON schema and example files 2025-11-25 14:59:57 +00:00
Z. Cliffe Schreuders
2c8757de3e Add character registry and NPC management features
- Implemented a global character registry to manage player and NPC data.
- Added methods for setting the player, registering NPCs, and retrieving character information.
- Integrated character registry updates into the NPC manager for seamless NPC registration.
- Created test scenarios for line prefix speaker format, including narrator modes and background changes.
- Developed comprehensive NPC sprite test scenario with various NPC interactions and items.
2025-11-24 02:21:31 +00:00
Z. Cliffe Schreuders
48e7860e0f Add comprehensive review and implementation plan for line prefix speaker format
- Created COMPREHENSIVE_REVIEW.md detailing architecture, risk assessment, and recommendations for the line prefix speaker format implementation.
- Developed README.md summarizing the implementation plan assessment, key findings, and integration of the Background[] feature.
- Included detailed risk assessment, updated timeline estimates, and success criteria for the implementation.
- Recommended enhancements for security, performance, reliability, and deployment strategies.
- Established a phased approach for implementation with clear priorities and next steps for the team and content creators.
2025-11-24 00:07:38 +00:00
Z. Cliffe Schreuders
843879cd62 feat: Enhance NPC chat system with narrator character support, default speaker behavior, and improved NPC behavior tags
- Implemented narrator syntax to display character portraits during narration.
- Changed default speaker behavior to default to the main NPC for unprefixed lines.
- Enhanced NPC behavior tags to support no parameters, comma-separated lists, wildcard patterns, and an "all" keyword.
- Added comprehensive testing requirements for narrator, default speaker, and NPC behavior tags.
- Updated documentation to reflect new features and usage examples.
- Addressed critical and high-priority issues from REVIEW1, including function naming conflicts, regex security, and empty dialogue validation.
- Improved code organization and backward compatibility.
2025-11-23 22:52:20 +00:00
Z. Cliffe Schreuders
fbb69f9c53 Implement comprehensive server-side validation and client integration for inventory and container management
- Added server-side validation for inventory actions, ensuring items are validated before being added to the player's inventory.
- Updated client-side `addToInventory()` function to include server validation and error handling for inventory actions.
- Implemented container loading logic to fetch contents from the server, handling locked containers appropriately.
- Enhanced player state initialization to ensure starting items are correctly added to the inventory.
- Clarified NPC `itemsHeld` structure and updated validation logic to match the expected item format.
- Improved error handling for room access and container interactions, including transaction safety for state mutations.
- Introduced new endpoints for scenario mapping and bulk inventory synchronization.
- Added performance optimizations, including caching filtered room data and implementing JSON schema validation for item structures.
- Established a detailed implementation plan with phased priorities and testing gaps identified for future work.
2025-11-21 15:27:54 +00:00
Z. Cliffe Schreuders
87fae7cb07 refactor: Simplify unlock loading UI dramatically
User correctly pointed out the loading UI was over-engineered.

## Simplifications:

### Before (over-complicated):
- Complex timeline management
- Success/failure flash effects (green/red)
- Spinner alternatives
- Stored references on sprites
- Timeline cleanup logic
- ~150 lines of code

### After (simple):
- startThrob(sprite) - Blue tint + pulsing alpha
- stopThrob(sprite) - Kill tweens, reset
- ~20 lines of code

## Why This Works:

1. **Door sprites get removed anyway** when they open
2. **Container items transition** to next state automatically
3. **Game already shows alerts** for success/error
4. **Only need feedback** during the ~100-300ms API call

## API Changes:

- showUnlockLoading() → startThrob()
- clearUnlockLoading() → stopThrob()
- No success/failure parameter needed
- No stored references to clean up

## Result:

From 150+ lines down to ~30 lines total.
Same UX, much simpler implementation.

User feedback: "Just set the door or item to throb, and remove when
the loading finishes (the door sprite is removed anyway), and if it's
a container, just follow the unlock with a removal of the animation."
2025-11-20 15:37:38 +00:00
Z. Cliffe Schreuders
266bc7a7ca docs: Clarify CSRF token handling for Hacktivity integration
User correctly noted that Hacktivity's application layout already includes
csrf_meta_tags, so we don't need to add them again.

## Changes:

### Section 9.3.1: Layout Strategy
- Split into Option A (Hacktivity layout - recommended) and Option B (standalone)
- **Option A (Recommended):** Read from existing meta tag
  - Uses Hacktivity's csrf_meta_tags (already present in layout)
  - No duplicate meta tags needed
  - Reads via: document.querySelector('meta[name="csrf-token"]')?.content
- **Option B:** Standalone layout
  - For when engine needs separate layout
  - Must add <%= csrf_meta_tags %> to engine layout
  - Can use <%= form_authenticity_token %> directly

### Section 9.3.3: Token Reading Logic
- Updated config.js to try multiple sources:
  1. window.breakEscapeConfig.csrfToken (if explicitly set)
  2. meta[name="csrf-token"] tag (from Hacktivity layout)
- Better error messages showing all sources checked
- Logs which source provided the token

### Section 9.3.5: Issue #2 Solution
- Updated to reference the fallback logic in 9.3.3
- Added debugging console commands
- Shows how to check all meta tags

## Key Points:

-  Hacktivity layout csrf_meta_tags are reused (don't duplicate)
-  Fallback chain ensures token found from either source
-  Clear guidance for both integration scenarios
-  Better debugging when token is missing

This aligns with Rails best practices and Hacktivity's existing setup.
2025-11-20 15:37:38 +00:00
Z. Cliffe Schreuders
cece95cd7f feat: Add critical implementation details based on review
Based on comprehensive codebase review, enhanced implementation plans with:

## Phase 3 Updates (Scenario Conversion):
- Complete bash script to convert all 26 scenarios to ERB structure
- Explicit list of 3 main scenarios (ceo_exfil, cybok_heist, biometric_breach)
- List of 23 test/demo scenarios for development
- Instructions to rename .json to .erb (actual ERB code added later in Phase 4)
- Preserves git history with mv commands
- Both automated script and manual alternatives provided

## Phase 9 Updates (CSRF Token Handling):
NEW Section 9.3: "Setup CSRF Token Injection"
- Critical security implementation for Rails CSRF protection
- Complete view template with <%= form_authenticity_token %>
- JavaScript config injection via window.breakEscapeConfig
- CSRF token validation and error handling
- Browser console testing procedures
- 5 common CSRF issues with solutions
- Fallback to meta tag if config missing
- Development vs production considerations

## Phase 9 Updates (Async Unlock with Loading UI):
ENHANCED Section 9.5: "Update Unlock Validation with Loading UI"
- New file: unlock-loading-ui.js with Phaser.js throbbing tint effect
- showUnlockLoading(): Blue pulsing animation during server validation
- clearUnlockLoading(): Green flash on success, red flash on failure
- Alternative spinner implementation provided
- Complete unlockTarget() rewrite with async/await server validation
- Loading UI shows during API call (~100-300ms)
- Graceful error handling with user feedback
- Updates for ALL lock types: pin, password, key, lockpick, biometric, bluetooth, RFID
- Minigame callback updates to pass attempt and method to server
- Testing mode fallback (DISABLE_SERVER_VALIDATION)
- Preserves all existing unlock logic after server validation

## Key Features:
- Addresses 2 critical risks from review (CSRF tokens, async validation)
- Solves scenario conversion gap (26 files → ERB structure)
- Maintains backward compatibility during migration
- Comprehensive troubleshooting guidance
- Production-ready security implementation

Total additions: ~600 lines of detailed implementation guidance
2025-11-20 15:37:38 +00:00
Z. Cliffe Schreuders
d2e3524b6b docs: Add comprehensive migration review (review1)
Complete codebase review against Rails Engine migration plans:

EXECUTIVE_SUMMARY.md (7KB, 243 lines):
- Overall assessment: READY FOR MIGRATION (95% confidence)
- Timeline: 10-12 weeks, ~64 hours total effort
- Zero blocking issues identified
- Key metrics and risk assessment
- Go/No-Go checklist

COMPREHENSIVE_REVIEW.md (47KB, 1,676 lines):
- Detailed current state analysis (95+ JS files, 800MB assets)
- Gap analysis with specific file references
- Risk matrix: 2 critical, 4 high, 3 medium (all mitigatable)
- Phase-by-phase recommendations with code examples
- Complete testing strategy
- Implementation checklists

Key Findings:
- Minimal client changes needed (~100 lines across 4 files)
- No architectural conflicts with current code
- All existing code well-organized and modular
- Clear path forward with realistic timeline

Recommendation: PROCEED WITH MIGRATION
2025-11-20 15:37:38 +00:00
Z. Cliffe Schreuders
5d22db5f69 docs: Add API reference and testing guide
Complete documentation for:
- 04_API_REFERENCE.md: All 9 API endpoints with examples
- 05_TESTING_GUIDE.md: Minitest strategy with fixtures and tests

These complete the documentation set along with the Hacktivity integration guide.
2025-11-20 15:37:38 +00:00
Z. Cliffe Schreuders
6e912eecec docs: Add Hacktivity integration guide (Phase 12)
Complete step-by-step guide for mounting BreakEscape engine in Hacktivity:
- Gemfile and bundle installation
- Route mounting at /break_escape
- Database migration installation
- User model compatibility verification
- Static asset configuration
- Session and CSRF setup
- Content Security Policy (CSP) configuration
- Testing integration
- Deployment to staging
- Troubleshooting guide
- Verification checklist
- Performance monitoring
- Rollback plan

This completes the full documentation set (7 files, ~140KB total)
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
48c9669925 docs: Add comprehensive README with navigation and quick start
- Complete documentation structure guide
- Quick start instructions
- Phase checklist for progress tracking
- Architecture summary with diagrams
- Troubleshooting section
- Philosophy and success criteria
- Technology stack overview
- Before/after comparison

Documentation set complete: 5 core files, fully self-contained
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
95ef8c654d docs: Add complete implementation plan (Phases 1-12)
Part 1 (Phases 1-6):
- Rails Engine setup with explicit commands
- Move files with mv (preserve git history)
- Create ERB scenario templates
- Database migrations and models
- Seed data (metadata only)
- Controllers with JIT Ink compilation

Part 2 (Phases 7-12):
- Pundit authorization policies
- Mission and game views
- Client API integration
- Comprehensive test suite
- Standalone mode support
- Final integration and deployment

Total: 78 hours, 12 phases, completely actionable with explicit bash/rails commands
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
27bd4e9760 docs: Add simplified 2-table schema (missions + games)
Added comprehensive planning docs:
- 00_OVERVIEW.md: Project aims, philosophy, all decisions
- 01_ARCHITECTURE.md: Complete technical design
- 02_DATABASE_SCHEMA.md: Full schema reference with examples

Key simplifications:
- 2 tables instead of 3-4
- Files on filesystem, metadata in database
- JIT Ink compilation
- Per-instance scenario generation via ERB
- Polymorphic player (User/DemoUser)
- Session-based auth
- Minimal client changes (<5%)

Next: Implementation plan with step-by-step TODO list
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
0eca2fac4c docs: Add JIT Ink compilation approach (Issue #3 eliminated)
Benchmarked bin/inklecate compilation speed:
- Small files: ~300ms
- Large files: ~400ms
- Average: 330ms (fast enough for JIT!)

Controller now:
- Compiles .ink files on-demand when requested
- Only compiles if .json missing or .ink file is newer
- Caches compiled .json files on filesystem
- No build step, Rake tasks, or CI/CD setup needed
- Development-friendly: edit .ink, refresh browser
- Production-safe: optional pre-compilation

Issue #3 (Ink Compilation) eliminated entirely - 0 hours P0 work!
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
6da63c650d docs: Add simplified 2-table schema (missions + games)
Major simplification to migration plan:
- Remove NpcScript model entirely
- Reduce to 2 tables: missions (metadata) + games (state + scenario snapshot)
- Serve ink files directly from filesystem via game endpoints
- Move scenario_data to game instances (enables per-instance randomization)
- Eliminates Issue #2 (NPC schema complexity)
- Reduces P0 fixes from 10 hours to 2-3 hours
- Much simpler seed process (metadata only)
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
e871d6df84 docs: Add comprehensive review of Rails Engine migration plan
- Identify 5 critical issues requiring fixes before implementation
- Validate architecture decisions (mostly solid)
- Provide corrected database schema for shared NPCs
- Document P0 fixes needed: Ink compilation, file structure, NPC schema
- Recommend 1.5 days of prep work to save 3-5 days of rework
- Total review: 6 documents covering issues, architecture, and solutions
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
50eba12238 docs: Add Hacktivity integration validation and setup guide 2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
15fbadecb2 docs: Add complete Rails Engine migration plan (JSON-centric approach)
Comprehensive implementation plan for converting BreakEscape to a Rails Engine.

DOCUMENTATION CREATED:
- 00_OVERVIEW.md: Project aims, philosophy, decisions summary
- 01_ARCHITECTURE.md: Technical design, models, controllers, API
- 02_IMPLEMENTATION_PLAN.md: Phases 1-6 with bash/rails commands
- 02_IMPLEMENTATION_PLAN_PART2.md: Phases 7-12 with client integration
- 03_DATABASE_SCHEMA.md: 3-table JSONB schema reference
- 04_TESTING_GUIDE.md: Fixtures, tests, CI setup
- README.md: Quick start and navigation guide

KEY APPROACH:
- Simplified JSON-centric storage (3 tables vs 10+)
- JSONB for player state (one column, all game data)
- Minimal client changes (move files, add API client)
- Dual mode: Standalone + Hacktivity integration
- Session-based auth with polymorphic player
- Pundit policies for authorization
- ERB templates for scenario randomization

TIMELINE: 12-14 weeks (vs 22 weeks complex approach)

ARCHITECTURE DECISIONS:
- Static assets in public/break_escape/
- Scenarios in app/assets/scenarios/ with ERB
- .ink and .ink.json files organized by scenario
- Lazy-load NPC scripts on encounter
- Server validates unlocks, client runs dialogue
- 6 API endpoints (not 15+)

Each phase includes:
- Specific bash mv commands
- Rails generate and migrate commands
- Code examples with manual edits
- Testing steps
- Git commit points

Ready for implementation.
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
b1356c1157 docs: Add simplified Rails Engine migration approach
RECOMMENDED APPROACH: 12-14 weeks instead of 22 weeks

KEY SIMPLIFICATIONS:
- Use JSON storage for game state (already in that format)
- 3 database tables instead of 10+
  - game_instances (with player_state JSONB)
  - scenarios (with scenario_data JSONB)
  - npc_scripts (Ink JSON)

- 6 API endpoints instead of 15+
  - Bootstrap game
  - Load room (when unlocked)
  - Attempt unlock
  - Update inventory
  - Load NPC script (on encounter)
  - Sync state (periodic)

VALIDATION STRATEGY:
- Validate unlock attempts (server has solutions)
- Validate room/object access (check unlocked state)
- Validate inventory changes (check item in unlocked location)
- NPCs: Load Ink scripts on encounter, run conversations 100% client-side
- NPC door unlocks: Simple check (encountered NPC + scenario permission)

WHAT WE DON'T TRACK:
- Every event (client-side only)
- Every conversation turn (no sync needed)
- Every minigame action (only result matters)
- Complex NPC permissions (simple rule: encountered = trusted)

BENEFITS:
- Faster development (12-14 weeks vs 22 weeks)
- Easier maintenance (JSON matches existing format)
- Better performance (fewer queries, JSONB indexing)
- More flexible (easy to modify game state structure)
- Simpler logic (clear validation rules)

Updated README_UPDATED.md to recommend simplified approach first.
Complex approach documentation retained for reference.
2025-11-20 15:37:37 +00:00
Z. Cliffe Schreuders
1e775ef89c docs: Update Rails Engine migration plans for current codebase
Updated migration plans to reflect significant codebase evolution:

NEW SYSTEMS DOCUMENTED:
- NPC system (fully implemented with NPCManager, conversation state, events)
- Event system (80+ events across codebase)
- Global game state management (window.gameState.globalVariables)
- Multiple scenarios (24 total, up from 1 originally planned)

KEY UPDATES:
- UPDATED_MIGRATION_STATUS.md: Comprehensive status of what's changed
  - What's implemented vs what still needs server-side integration
  - Updated timeline: 22 weeks (was 18 weeks)
  - New database schema requirements
  - Updated risk assessment

- CLIENT_SERVER_SEPARATION_PLAN.md: Added 3 new systems
  - System 5: NPC System (hybrid approach confirmed)
  - System 6: Event System (selective logging)
  - System 7: Global Game State (server as source of truth)
  - Updated migration checklist: 9 phases (was 7)
  - Updated timeline: 18-22 weeks

- README_UPDATED.md: New master index document
  - Quick start guide
  - Document index
  - What's changed summary
  - Timeline breakdown
  - Architecture decisions
  - Success metrics

MIGRATION APPROACH:
- Hybrid NPC approach: Scripts client-side, validation server-side
- Selective event logging: Critical events only
- State sync: Server as source of truth, client cache for performance
- Incremental rollout with dual-mode support

TIMELINE: 22 weeks (~5.5 months)
- Added 4 weeks for NPC, Event, State integration
- Original: 18 weeks → Updated: 22 weeks (+22%)

All plans are complete, self-contained, actionable, and feature-focused.
Ready for team review and implementation.
2025-11-20 15:37:37 +00:00