Commit Graph

410 Commits

Author SHA1 Message Date
Claude
116a0653ac docs: Add gameplay integration guide with Valley Memorial scenario example 2025-11-18 16:46:27 +00:00
Claude
b418625309 docs: Update README with all 11 cell operations (complete) 2025-11-18 14:49:20 +00:00
Claude
be60252d76 feat: Add final 2 cell LORE fragments (AI Singularity and Crypto Anarchists) 2025-11-18 14:46:53 +00:00
Claude
6ac3892d55 feat: Add Ghost Protocol cell LORE fragment (Privacy Apocalypse data dump) 2025-11-18 14:38:55 +00:00
Claude
470c22bcbc feat: Add Supply Chain Saboteurs and Quantum Cabal LORE fragments
Created comprehensive operational reports for 2 more ENTROPY cells (total: 8 of 11):

7. Supply Chain Saboteurs - TRUSTED BUILD Post-Mortem (CELL_OP_SUPPLY_CHAIN_001):
   - 18-month operation compromising enterprise software build pipeline
   - Backdoor (SUNBEAM.dll) distributed to 12,847 organizations via trusted updates
   - SolarWinds-style supply chain attack demonstration
   - Discovered after 8 months, misattributed to nation-state actor
   - Collateral damage: Developer-14 fired, CloudManage lost $2B, software update trust destroyed
   - Copycat attacks likely (techniques now public)
   - Cell refuses Phase 3: "Supply chain attacks cannot be safely constrained"
   - Trojan Horse's realization: Lost control, broke trust irreversibly

8. Quantum Cabal - Tesseract Experiment Lab Notes (CELL_OP_QUANTUM_CABAL_001):
   - Experiment QC-47 "Dimensional Interface Protocol" (Jan-Feb 2024)
   - Blends legitimate quantum computing with Lovecraftian cosmic horror
   - Real science: Quantum entanglement, QKD, superconducting qubits
   - Anomalous results: Room temperature quantum coherence (violates physics)
   - Non-random measurement patterns, mathematical proofs from unknown source
   - Psychological casualties: Dr. Park (whispers, medical leave), Dr. Sharma (resigned)
   - Dr. Kowalski decoded proof of "quantum consciousness"
   - Dr. Cross (Singularity) insists experiments continue despite trauma
   - Ambiguous conclusion: New physics? Collective delusion? Actual contact?
   - Recommendation: Terminate research, some doors should stay closed

Key Themes:
- Supply Chain: Most successful operation becomes most ethically disastrous
- Supply Chain: Lost control of complex attack, trust erosion irreversible
- Quantum Cabal: Unique tone blending serious science with cosmic horror
- Quantum Cabal: Uncertainty is the horror—unclear what's real
- Both cells show fracturing: Members resign/medical leave, refuse Phase 3
- Pattern continues: ENTROPY operations cause uncontrollable consequences

Educational Value:
- Supply Chain: Software build security, SolarWinds-style attacks, trust models
- Supply Chain: Supply chain attack cascading consequences and replication
- Quantum Cabal: Quantum computing, quantum cryptography (all accurate science)
- Quantum Cabal: Observer bias, frontier research ethics, pseudoscience vs breakthrough
- Both maintain high educational rigor while exploring ethical complexity

Narrative Innovation:
- Supply Chain: Post-mortem format shows reflection after disaster
- Quantum Cabal: Lab notes format, ambiguous "horror" without clear conclusion
- Quantum Cabal: First cell where threat isn't clearly defined (existential uncertainty)
2025-11-18 14:34:33 +00:00
Claude
e134f2414c feat: Add 3 more cell-specific LORE fragments (Ransomware Inc, Zero Day, Social Fabric)
Added comprehensive operational reports for 3 additional ENTROPY cells (total: 6 of 11):

4. Ransomware Incorporated - Healthcare Ethics Review (CELL_OP_RANSOMWARE_INC_001):
   - Q3 2024: 8 healthcare ransomware deployments
   - Detailed 3-tier system (Tier 1: NEVER encrypt life-critical systems)
   - Valley Memorial Hospital near-death incident (14-min ICU monitoring gap, patient blood pressure drop)
   - Kill switch activation prevented death (auto-decrypt in 8 minutes)
   - 48-hour auto-decryption prevents permanent damage
   - Cipher King's profound moral crisis ("One death makes us murderers")
   - Measurable impact: Drove $47M security investment across healthcare
   - Phase 3 status: Uncertain participation due to Valley Memorial trauma

5. Zero Day Syndicate - Vulnerability Research Report (CELL_OP_ZERO_DAY_001):
   - Q3 2024: 12 vulnerabilities discovered (7 critical, 5 high severity)
   - Epic EHR disclosed responsibly (protected 250M patient records)
   - SCADA vulnerabilities retained for Phase 3 (enabled Critical Mass)
   - $15M dark web value rejected (ideology over profit)
   - Disclosure dilemma: Protect users vs. demonstrate insecurity
   - Prophet's moral ledger: Epic disclosure protected patients, but SCADA weaponization enabled Valley Memorial
   - 8 zero-days reserved for Phase 3, immediate disclosure after
   - Dead man's switch for auto-disclosure if compromised

6. Social Fabric - Polarization Campaign Analysis (CELL_OP_SOCIAL_FABRIC_001):
   - Operation FRACTURED TRUST (April-Sept 2024)
   - 627 fake personas, 47M impressions, 12 narratives reached mainstream media
   - Measurable harm: Community trust ↓22%, polarization ↑38% in test counties
   - Real victims: 2 candidates harassed off campaigns, communities damaged
   - Psychological toll: 3 member resignations, substance abuse, depression
   - Dissonance's complete ethical collapse: "We've become indistinguishable from the enemy"
   - Cell REFUSES Phase 3 participation (vote: 8-2 against)
   - Leader resigns: "Some problems can't be demonstrated without becoming the problem"

Key Themes Across All 6 Fragments:
- Ethical complexity and genuine moral doubt from all cell leaders
- Safeguards exist but can fail (Valley Memorial proves this)
- Internal dissent and fracturing (2 cells refuse/question Phase 3)
- Measurable real-world impact (both positive reform and negative harm)
- Psychological toll on operators (resignations, moral distress)
- Financial sacrifice for ideology ($15M+ foregone for beliefs)

Updated README:
- Fragment count: 3 → 6 (6 of 11 cells complete)
- Added 3 new cell summaries with player value
- Updated Phase 3 integration (shows cell refusals and doubts)
- Updated recommended reading order (1-6 with progression)
- Revised future additions (5 cells remaining)

Educational Value:
- Ransomware Inc: Healthcare cybersecurity, ethical attack constraints, risk assessment
- Zero Day: Vulnerability disclosure ethics, bug bounty economics, researcher responsibility
- Social Fabric: Information operations, algorithmic manipulation, psychological warfare ethics
2025-11-18 10:42:32 +00:00
Claude
9789e6dad8 feat: Add cell-specific LORE fragments for Critical Mass, Digital Vanguard, and Insider Threat Initiative
Created detailed operational reports from three key ENTROPY cells:

1. Critical Mass - Grid Reconnaissance (CELL_OP_CRITICAL_MASS_001):
   - 847 SCADA systems compromised with Equilibrium.dll
   - 5 insider assets detailed (Switchboard, Kilowatt, Voltage, Megawatt, Blackbox)
   - Hospital/emergency bypass lists (ethical constraints)
   - Phase 3 readiness at 95%
   - Shows Blackout's moral struggle with potential casualties

2. Digital Vanguard - Paradigm Shift Q3 Report (CELL_OP_DIGITAL_VANGUARD_001):
   - Legitimate consulting front ($847K revenue)
   - 10 operations (8 successful, 2 failed)
   - Intelligence hub for other cells
   - 4 corporate insider assets
   - Shows Morpheus questioning ethics of trust exploitation

3. Insider Threat Initiative - Deep State Operation (CELL_OP_INSIDER_THREAT_001):
   - 47 government placements (DOE, CISA, FBI, NSA, FERC, etc.)
   - 10-year infiltration operation (2018-2028)
   - Detailed recruitment and vetting processes
   - Polygraph countermeasures (ideological true believers)
   - Shows Raven's responsibility for recruited civil servants

Features:
- Cross-cell intelligence sharing patterns
- Phase 3 integration and coordination
- Ethical complexity and moral doubt from cell leaders
- Professional competence and OPSEC discipline
- Educational CyBOK alignment (SCADA security, insider threats, social engineering)
- Gameplay integration notes

All fragments align with universe bible 11-cell structure.
2025-11-18 10:10:37 +00:00
Claude
ef9b9f0df3 fix: Update ENTROPY LORE to align with universe bible 11-cell structure
- Remove inconsistent 5-cell (ALPHA/BETA/GAMMA/DELTA/EPSILON) structure
- Update all organizational LORE to reference 11 established cells:
  * Digital Vanguard, Critical Mass, Quantum Cabal
  * Zero Day Syndicate, Social Fabric, Ghost Protocol
  * Ransomware Incorporated, Supply Chain Saboteurs
  * Insider Threat Initiative, AI Singularity, Crypto Anarchists

Changes:
- STRAT_001: Add postscript explaining evolution from 5 to 11 cells
- TECH_TOOL_001: Update to reference Critical Mass (not DELTA)
- ENTROPY_PERSONNEL_001: Update Cascade to match Critical Mass member Dr. Sarah Winters
- ENTROPY_OPS_001: Update to reference Digital Vanguard and Insider Threat Initiative
- ENTROPY_HISTORY_001: Note early cell evolution to specialized structure
- PROTO_CELL_001: Remove specific cell designation examples
- TRAIN_RECRUIT_001/TRAIN_OPSEC_001: Remove cell-specific references
- README_ORGANIZATIONAL_LORE: Remove OPCOM_001, update all references

Deletions:
- OPCOM_001: Removed Phase 3 coordination doc (inconsistent with universe bible)

This brings all organizational LORE into consistency with established universe bible.
2025-11-18 10:02:46 +00:00
Claude
7f1acdd4fc feat: Add ENTROPY organizational LORE fragments revealing internal operations
Created 7 comprehensive internal ENTROPY documents organized into 5 categories, providing deep insight into the organization's structure, methods, philosophy, and operations.

## New Fragment Categories:

### 1. Training Materials (2 fragments)

**TRAIN_RECRUIT_001: Asset Recruitment Fundamentals**
- Complete recruitment methodology manual (3.2, June 2024)
- Four vulnerability categories: Financial (75% success), Ideological (45%), Personal (60%), Career (35%)
- Seven-stage progressive commitment (Week 1: innocent contact → Week 10: full operational)
- Target organization prioritization (Tier 1: Critical infrastructure, Tier 2: Fortune 500, Tier 3: SMB)
- OPSEC protocols for recruiters (cover identity, surveillance detection, compartmentalization)
- Case studies: NIGHTINGALE (success - Sarah Martinez), CARDINAL (failure - security researcher)
- Ethical considerations from The Architect
- **Educational Value:** Social engineering, insider threat vectors, recruitment psychology

**TRAIN_OPSEC_001: Handler Operational Security**
- Golden Rules: You Don't Exist, Trust Is Liability, Assume Surveillance, Compartmentalization Is Sacred
- Handler identity management (codenames, separate devices, digital hygiene)
- Asset communication protocols (Signal for coordination, dead drops for intel, in-person rare)
- Surveillance Detection Routes (SDR) - 60-90min before every meeting
- Payment security (cryptocurrency preferred, cash acceptable, wire transfer avoid)
- Counter-intelligence awareness (detecting flipped assets)
- Capture protocols: "I want a lawyer" (repeat indefinitely)
- Burnout recognition and exit procedures
- **Educational Value:** Covert operations tradecraft, OPSEC principles, countersurveillance

### 2. Operational Communications (1 fragment)

**OPCOM_001: Phase 3 Cell Coordination**
- The Architect's final coordination message (June 28, 2025, T-minus 17 days)
- Recipients: All 5 cell leaders (ALPHA_PRIME through EPSILON_PRIME)
- Cell-specific target assignments:
  - **ALPHA**: Financial systems (banks, stock exchange, cryptocurrency)
  - **BETA**: Healthcare (EHR, medical devices, insurance - life-safety protected)
  - **GAMMA**: Telecommunications (ISP routing, mobile data, DNS)
  - **DELTA**: Energy grid (SCADA, load balancing, brownouts not blackouts)
  - **EPSILON**: Transportation/Logistics (airlines, freight, transit)
- Operational timeline: July 15, 2025, 00:00-14:00 EST (staggered activation)
- Abort criteria: Life safety risk, operational compromise, strategic conditions violated
- Success definition: 40% minimum, 70% target, 100% optimal
- Strategic restraints: Zero casualties, reversible damage, 72-hour window
- **Reveals:** Complete Phase 3 plan, coordination between cells, specific targets

### 3. Cell Protocols (1 fragment)

**PROTO_CELL_001: Cell Structure and Operations**
- Cell hierarchy: Architect → Cell Leaders → Handlers → Technical Specialists → Support Roles
- Typical cell size: 8-15 members (1 leader, 3-5 handlers, 2-3 technical, 2-4 support)
- Cell budget: $500K-$1.5M annually (60% asset payments, 15% equipment, 15% infrastructure, 10% stipends)
- Weekly operational meetings (rotating safe houses, 90min, phones in Faraday bags)
- Burn protocols: Level 1 (individual), Level 2 (cell), Level 3 (network)
- Target selection criteria (centralized systems, avoid small business/life-safety)
- Asset management (recruitment, tasking, payment, termination)
- Inter-cell communication (prohibited except through Architect)
- **Educational Value:** Covert organization structure, compartmentalization, operational security

### 4. Strategic Planning (1 fragment)

**STRAT_001: Ten-Year Vision (2015-2025)**
- Original October 2015 strategic document by The Architect
- Updated January 2023 with postscript for cell leaders
- **Phase 1 (2015-2018)**: Foundation - Build capabilities, recruit founding members
  - Goal: 15-20 members across 3 cells, initial tooling
  - Status: EXCEEDED (5 cells, 60+ members, advanced tools)
- **Phase 2 (2018-2022)**: Expansion - Scale operations, recruit 100+ assets
  - Goal: 5 cells, 100+ assets in critical infrastructure, 20-30 operations
  - Status: ACHIEVED (Equilibrium.dll on 800+ systems, 25 successful operations)
- **Phase 3 (2023-2025)**: Demonstration - Coordinated multi-sector disruption
  - Activation: July 15, 2025
  - Goal: Demonstrate infrastructure fragility at scale
- **Phase 4 (2025-2030)**: Options post-Phase 3 (Dissolve, Continue, Go Public, Pivot to Defense)
- Strategic philosophy: Why 10 years? Why constraints? Why anonymity?
- Risk assessment: Operational, strategic, organizational, moral failures
- **Proves:** Everything was intentional, strategic, part of coherent long-term vision

### 5. Technical Documentation (1 fragment)

**TECH_TOOL_001: Equilibrium.dll Documentation**
- SCADA backdoor malware for power grid load manipulation
- Deployment: 847 systems across 47 power utilities (April 2024)
- Attack vector: DLL side-loading (version.dll proxy in Siemens WinCC)
- Functionality: Intercept load balancing commands, create rolling brownouts
- C2 infrastructure: Domain fronting via CloudFlare (maintenance-updates.scada-systems.com)
- Anti-detection: AV evasion, SIEM evasion, mimics Windows Update traffic
- Bypass lists (ABSOLUTE): Hospitals, emergency services, critical infrastructure (never affected)
- Phase 3 activation: July 15, 2025, 06:00 EST
- Constraints: Max 2-hour brownout per zone, equipment protection maintained, remote kill switch
- Self-destruct: July 20, 2025 (delete all traces)
- **Educational Value:** SCADA vulnerabilities, DLL side-loading, C2 infrastructure, ethical constraints in malware

### 6. Ideology (1 fragment)

**IDEOLOGY_001: On Inevitability Manifesto**
- The Architect's philosophical treatise (March 2016, updated January 2023)
- **Chapter 1**: Entropy and Systems - Thermodynamics, fragility of centralization
- **Chapter 2**: The Illusion of Security - Security theater vs. actual security
- **Chapter 3**: Why We Are Not Terrorists - Constraints, no violence, no demands
  - Zero casualties requirement, reversible damage, institutional targets, no political demands
- **Chapter 4**: The Moral Calculus - Utilitarianism (justified), Deontology (unjustified), Virtue Ethics (depends on execution)
- **Chapter 5**: What Comes After - 3 scenarios (Society learns, ignores, overreacts)
- **Chapter 6**: To Those Who Join - What members are signing up for (prison risk, moral weight, stress)
- The Architect's 2023 postscript: Doubt is constant, but conviction remains
- **Reveals:** ENTROPY's genuine ideological motivation, ethical struggles, principled approach (even if misguided)

### 7. README Documentation

**README_ORGANIZATIONAL_LORE.md**
- Comprehensive guide to all 7 organizational fragments
- Discovery and player integration recommendations
- Cross-references (internal ENTROPY docs, existing LORE fragments, evidence templates)
- Educational value mapped to CyBOK domains
- Fragment statistics (50,000 words total)
- Narrative themes (complexity, fragility/resilience, means/ends, human cost)
- Usage guidelines for game developers
- Recommended discovery order for progressive revelation

## Organizational Structure Revealed:

**ENTROPY Network:**
- 5 operational cells: ALPHA, BETA, GAMMA, DELTA, EPSILON
- Each cell: 8-15 members
- 60+ total members, 120+ recruited assets
- Centralized leadership: The Architect
- Distributed operations: Cell autonomy within strategic framework

**Operational Capabilities:**
- Asset recruitment (4 vulnerability types, proven methods)
- Infrastructure compromise (financial, healthcare, telecom, energy, transportation)
- Advanced malware (Equilibrium.dll + others referenced)
- Secure communications (Signal, dead drops, PGP)
- Financial infrastructure (cryptocurrency, shell companies)

**Ethical Framework:**
- Zero casualty constraint (absolute requirement)
- Reversible damage only (72-hour demonstration window)
- Institutional targets (not individuals)
- Bypass lists for life-safety systems
- Members can exit safely

## Cross-References:

**Links to existing LORE:**
- Sarah Martinez = NIGHTINGALE case study in TRAIN_RECRUIT_001
- Operation Glass House = references in multiple training docs
- Phase 3 directive = expanded detail in OPCOM_001
- The Architect's philosophy = IDEOLOGY_001 manifesto

**Links to evidence templates:**
- TEMPLATE_001-006 identify specific assets
- Organizational LORE shows recruitment and management methods
- Combined: Complete picture of ENTROPY operations

## Educational Value (CyBOK):

**Training Materials:**
- Social engineering principles and insider threat recruitment
- Operational security for covert activities
- Psychological profiling and vulnerability exploitation

**Operational Communications:**
- Critical infrastructure protection priorities
- Coordinated attack response
- Multi-sector incident coordination

**Cell Protocols:**
- Organizational compartmentalization
- Covert communication methods
- Counterintelligence awareness

**Strategic Planning:**
- Long-term adversary planning
- Strategic vs. tactical threat analysis
- Risk assessment methodologies

**Technical Documentation:**
- SCADA security vulnerabilities
- Malware analysis (DLL side-loading, C2 infrastructure)
- Anti-forensics and detection evasion

**Ideology:**
- Threat actor psychology and motivation
- Hacktivism vs. terrorism distinctions
- Ethical hacking debates

## Gameplay Integration:

**Progressive Revelation:**
- Early: Training materials, cell protocols (structure)
- Mid: Operational comms, technical docs (capabilities)
- Late: Strategic planning, ideology (philosophy)

**Mission Design:**
- Phase 3 deadline creates urgency (July 15, 2025)
- Cell targets enable focused counter-ops
- Technical docs provide defensive intelligence

**Moral Complexity:**
- ENTROPY presented as principled antagonists
- Genuine ideological motivation (not pure malice)
- Ethical constraints (zero casualties, reversible damage)
- Players must grapple: Are they entirely wrong?

All fragments maintain narrative consistency, educational alignment with CyBOK security domains, and interconnected storytelling across the ENTROPY universe.
2025-11-18 09:07:18 +00:00
Claude
dff8a221b6 feat: Add TEMPLATE_006 (Message Logs) and comprehensive template documentation
Created Template 006 for encrypted messaging app evidence (Signal/Wickr) showing ENTROPY handler-asset communications, plus comprehensive README documentation for the entire template system.

## New Files:

### TEMPLATE_AGENT_ID_006_message_logs.md
- **Evidence Type:** Signal/Wickr encrypted messaging app logs
- **Key Feature:** Handler uses subject's REAL NAME 8 times in operational comms
- **Direct Identity Confirmation:** Definitive proof of NPC as ENTROPY asset
- **Evidence Strength:** 75% alone → 99% combined with other templates
- **High Cooperation Potential:** 85% base (subject wants out, shows coercion)

**5 Message Threads Included:**
1. Initial Tasking - Handler assigns data theft, uses real name
2. Operational Concerns - Subject worried, handler reassures
3. Coordination with Cell - Payment confirmed, second asset mentioned
4. Internal ENTROPY Comms - Handler briefs cell leader, confirms recruitment method
5. Escalation and Pressure - Subject wants out, handler threatens and coerces

**What Makes This Template Unique:**
- Only template with direct real name confirmation via ENTROPY internal comms
- Shows subject is KNOWN ENTITY within ENTROPY organization
- Reveals handler's OPSEC failure (using real names)
- Documents coercion and victimization (subject tried to quit)
- Provides intelligence beyond subject: handler contact, cell structure, operations
- Creates moral complexity: perpetrator who is also victim

**Substitution Variables (17 total):**
- [SUBJECT_NAME], [SUBJECT_CODENAME], [HANDLER_CODENAME]
- [CELL_DESIGNATION], [OPERATION_NAME]
- [HANDLER_PHONE], [SUBJECT_PHONE]
- [TARGET_ORGANIZATION], [DATA_TYPE], [SYSTEM_NAME]
- [AMOUNT], [MEETING_LOCATION], [DEADLINE_DATE]
- [DATE_1] through [DATE_5], [TIME_1] through [TIME_5]
- [PRESSURE_DETAIL], [SUBJECT_CONCERN]
- [SECOND_ASSET_CODENAME], [CELL_LEADER_CODENAME]

**Gameplay Integration:**
- Discovery: RARE (server compromise or handler device seizure)
- Unlocks: Handler arrest, second asset ID, cell mapping
- Interrogation approaches: Overwhelming evidence (85%), Empathetic victim-focused (90%), Strategic flip (90%)
- Intelligence yield: Cell structure, handler contact, dead drops, payment methods

**Educational Value (CyBOK):**
- Encrypted messaging security & limitations
- OPSEC failures in operational communications
- Mobile device forensics
- Digital evidence authentication
- Insider threat psychology and coercion tactics
- Counterintelligence and asset flipping

### README.md (Comprehensive Template System Guide)
- **Purpose:** Complete documentation for using all 6 evidence templates
- **Sections:** Quick start, substitution guide, best practices, examples

**Key Content:**
- Quick Start Guide (4 steps: Choose templates → Gather values → Substitute → Deploy)
- Complete 6-template overview with summaries
- **Complete Substitution Variable Reference Table:**
  - Core Identity (3 variables - used in ALL templates)
  - ENTROPY Operational (7 variables)
  - Financial (4 variables)
  - Technical/System (3 variables)
  - Communication (3 variables)
  - Location (3 variables)
  - Temporal (5 variables)
  - Contextual (4 variables)
- Evidence Combination Strategies (5 strategic paths)
- Interrogation Approaches by Evidence Collected (clear unlocks)
- Best Practices (DO/DON'T lists)
- Rarity and Discovery Recommendations (progression table)
- Success Metrics and Gameplay Impact (evidence count → outcomes)
- Customization Examples (3 complete NPC scenarios with all substitutions)
- Educational Value Summary (CyBOK alignment)
- Quick Reference Checklist

**DO/DON'T Best Practices:**
✓ Replace ALL placeholders
✓ Keep values consistent across templates for same NPC
✓ Match timeline chronologically
✓ Consider cooperation potential
✗ Don't leave [BRACKETS] in final version
✗ Don't require 100% collection
✗ Don't over-punish coerced NPCs

## Updated Files:

### TEMPLATE_CATALOG.md
- Updated template count: 5 → 6
- Updated section title: "The Five Evidence Templates" → "The Six Evidence Templates"
- Added complete Template 006 entry with:
  - Full substitution variable list (17 variables)
  - Message thread summaries
  - Real name usage pattern analysis
  - 9 red flags documented
  - Evidence strength progression
  - Gameplay integration details
  - Forensic & legal assessment
  - Cross-references to other templates
  - Discovery scenarios and timing
- Updated Evidence Chain diagram to include Message Logs
- Updated Confidence Thresholds table: Added 6-template row (99.9% confidence, 95% cooperation)
- Added 2 new combination strategies:
  - "Real Name Confirmation + High Cooperation" (Templates 006 + 005 + 002 = 99%, 95% cooperation)
  - "Complete Cell Mapping" (Templates 006 + 004 + 002 + 003 = 99.9%, enables handler arrest)
- Added Template 006 to Discovery Placement Recommendations (Very Hard, Late investigation)
- Updated Expansion Opportunities: Renumbered future templates 007-011 (was 006-010)
- Updated Version History: Added v2.0 entry
- Updated Quick Reference Card: Added Template 006 with  NEW marker

## System Impact:

**Template System v2.0:**
- Total Templates: 6 (was 5)
- Total Substitution Variables: 32+ unique placeholders
- Evidence Chain: 6-step progression from suspicion → definitive proof
- Maximum Confidence: 99.9% (all 6 templates)
- Cooperation Range: 50% (1 template) → 95% (all 6 with empathetic approach)

**New Capabilities:**
- Direct real name confirmation via ENTROPY internal comms
- Handler identification and arrest enablement
- Cell structure mapping
- Second asset discovery at same organization
- Coercion documentation for cooperation agreements
- Highest cooperation potential (85-95%)

**Documentation Completeness:**
- Quick start guide for new users
- Complete variable reference (32+ variables documented)
- 5 evidence combination strategies
- 8 interrogation approach unlocks
- 3 complete NPC customization examples
- Educational value mapped to CyBOK

## Integration Notes:

**Template 006 Cross-References:**
- Corroborates Template 002 (payment amounts match message discussions)
- Corroborates Template 003 (data extraction dates align with tasking)
- Corroborates Template 004 (dead drop timing/location matches messages)
- Corroborates Template 005 (emotional arc: trapped, wants out)
- Connects to RECRUITMENT_001 (financial pressure methodology)
- Connects to TACTICAL_001 (if operation is infrastructure attack)
- Connects to LEVERAGE_001 (pressure detail as leverage point)

**Recommended Discovery:**
- Rarity: RARE (Very Hard)
- Timing: Late game (Mid-game for major operation rewards)
- Prerequisites: Server compromise OR handler device seizure
- Value: Very High (real name confirmation + handler intel + cell mapping)

All templates maintain narrative consistency, CyBOK educational alignment, and infinite reusability through [PLACEHOLDER] substitution system.
2025-11-18 08:17:42 +00:00
Claude
e7244b74e9 feat: Add reusable evidence template system for ENTROPY agent identification
Created 5 comprehensive evidence templates with [PLACEHOLDER] substitution system that enable infinite NPC agent identification across scenarios.

## New Files:
- TEMPLATE_AGENT_ID_001_encrypted_comms.md
  * Intercepted PGP-encrypted communications
  * 40% confidence alone, 90% combined
  * Red flags: Policy violations, ProtonMail, after-hours timing

- TEMPLATE_AGENT_ID_002_financial_records.md
  * Bank transactions & cryptocurrency forensics
  * 60% confidence alone, 98% combined
  * Red flags: Unexplained cash, ENTROPY wallet, shell companies

- TEMPLATE_AGENT_ID_003_access_logs.md
  * IT audit showing unauthorized system access
  * 70% confidence alone, 98% combined
  * Documents 5 incidents: Reconnaissance → Exfiltration → Cover-up

- TEMPLATE_AGENT_ID_004_surveillance_photos.md
  * 14-day surveillance op with 7 photo scenarios
  * 50% confidence alone, 95% combined
  * Handler identification, dead drops, countersurveillance

- TEMPLATE_AGENT_ID_005_physical_evidence.md
  * Handwritten 3-page emotional confession
  * 80% confidence alone, 99.9% combined
  * Enables 95-98% cooperation through empathetic approach
  * Arc: Willing participant → Trapped → Desperate for help

- TEMPLATE_CATALOG.md
  * Complete template system documentation
  * Substitution guide & best practices
  * Evidence chain methodology
  * Integration strategies & success metrics

## Template System Features:
- [PLACEHOLDER] format for runtime substitution
- Evidence chain: Single evidence (40-80%) → All 5 (99.9%)
- Cooperation likelihood scales with evidence quality
- Multiple interrogation approaches unlocked by different combinations
- Infinite reusability across NPCs and scenarios

## Integration:
- Updated GAMEPLAY_CATALOG.md with template section
- Evidence Prosecution category expanded from 1 to 6 fragments
- Total gameplay-focused fragments: 13 (8 unique + 5 templates)
- Templates work standalone or combine for overwhelming cases

## Educational Value (CyBOK):
- Digital forensics (email analysis, blockchain tracing)
- Insider threat detection (behavioral indicators)
- Investigation methodology (evidence corroboration)
- Legal process (admissibility, chain of custody)
- Psychological profiling & ethical interrogation

## Gameplay Impact:
Each template enables different player actions and unlocks specific interrogation approaches based on evidence collected. System designed to reward thorough investigation while not requiring 100% collection for success.
2025-11-18 07:47:03 +00:00
Claude
c8c107d126 feat: Add gameplay-function LORE fragments with mission integration
Created 8 gameplay-focused LORE fragments organized by what players
can DO with the information, not just narrative content. Each fragment
enables specific mission objectives, player choices, and success metrics.

**Organization by Gameplay Function:**

📋 Evidence Prosecution (1 fragment):
- ALPHA_07 criminal conspiracy communication
- Enables: Federal prosecution, arrest warrants, 95% conviction rate
- Unlocks: Protection for Sarah Martinez, tactical arrests

🎯 Tactical Intelligence (1 fragment):
- 48-hour countdown to power grid attack
- Enables: Time-pressure mission, 3 tactical approaches
- Unlocks: Grid defense, prevents Phase 3 backdoor installation
- Branching: Hard takedown / Insider flip / Extended surveillance

💰 Financial Forensics (1 fragment):
- Complete crypto trail from Sarah's payment to master wallet
- Enables: $8.2M asset seizure, funding disruption
- Unlocks: The Architect identity clues, shell company network
- Impact: -60% ENTROPY operational capacity if successful

🎣 Recruitment Vectors (1 fragment):
- ENTROPY's internal asset recruitment playbook
- Enables: Prevention programs, counter-recruitment, sting ops
- Unlocks: At-risk employee identification, pipeline disruption
- Impact: -30% to -50% future insider threats

🔓 Technical Vulnerabilities (1 fragment):
- SCADA zero-day Equilibrium.dll complete analysis
- Enables: Detection scripts, patch deployment, infrastructure hardening
- Unlocks: Grid protection before Phase 3, honeypot strategies
- Success metric: 100% patched = no Phase 3 grid failures

📍 Asset Identification (1 fragment):
- Complete surveillance package on 3 CELL_DELTA_09 subjects
- Enables: Coordinated arrests, tactical planning, insider cooperation
- Unlocks: Robert Chen flip opportunity, optimized approach
- Success: 85-95% based on intel collected

👥 Victim Testimony (1 fragment):
- Hospital administrator emotional testimony (patient death from ransomware)
- Enables: Emotional investment, motivation, dialog options
- Unlocks: Moral context, interrogation appeals, "Remember Why We Fight"
- Impact: Player engagement, meaningful success/failure consequences

🔄 Leverage Materials (1 fragment):
- Cascade's mother cancer treatment leverage analysis
- Enables: Operative turning, 4 distinct ethical approaches
- Unlocks: CELL_BETA complete intelligence, redemption arc
- Choices: Compassionate (85% success) / Manipulative (45%) /
  Ethical refusal / Anonymous help

**Key Integration Features:**

Mission-Critical Intel:
- TACTICAL_001 triggers 48-hour countdown mission
- ASSET_ID_001 required for optimal tactical planning
- TECHNICAL_001 enables infrastructure protection
- All fragments improve success probability measurably

Branching Player Choices:
- Evidence: Prosecution vs. plea deals
- Tactical: 3 arrest strategies with different risk/reward
- Financial: Seizure priorities and timing
- Recruitment: Prevention vs. counter-recruitment vs. sting
- Technical: Patch race vs. honeypot vs. shutdown
- Leverage: Compassion vs. manipulation vs. ethical stance

Cross-Fragment Integration:
- Operation Glass House appears across 5 functions
- Power Grid Attack requires 3 fragments for optimal success
- The Architect identity clues scattered across all functions
- Success metrics compound (more intel = better outcomes)

Educational Value:
- All fragments teach CyBOK-aligned security concepts
- Real-world attack methodologies and defenses
- Legal, technical, financial, and human factors
- Ethical considerations in security operations

**Gameplay Catalog:**
Complete cross-reference system showing:
- Fragment interconnections and mission integration
- Success probability calculations
- Branching path outcomes
- Player progression through game
- Design principles for future fragments

Each fragment answers "What can I DO with this?" rather than
just "What does this tell me?" - making LORE collection
functionally valuable, not just completionist.

See story_design/lore_fragments/by_gameplay_function/GAMEPLAY_CATALOG.md
for complete integration guide and mission design examples.
2025-11-18 07:09:44 +00:00
Claude
f7ff3cb691 feat: Add comprehensive ENTROPY LORE fragments system
Created interconnected LORE fragment collection revealing ENTROPY's
world through discoverable artifacts. Organized by content type and
artifact format for progressive player discovery.

**Structure:**
- 4 content categories: ENTROPY Intelligence, The Architect,
  Character Backgrounds, Location History
- 7 artifact types: encrypted comms, intelligence reports, text notes,
  emails, voice messages, corporate docs, personal items
- Progressive revelation: early game intro → mid game connections →
  late game master plan

**10 Seed Fragments Created:**

ENTROPY Intelligence (5):
- Operation Glass House completion report (cell communication)
- Dead drop server list (compromised infrastructure)
- Thermite.py tool analysis (The Architect's signature)
- Operative "Cascade" profile (true believer)
- Complete organizational history (2015-2025, Phase 3 timeline)

The Architect (2):
- Philosophical manifesto on inevitability (ideology revealed)
- Phase 3 activation directive (July 15, complete master plan)

Character Backgrounds (3):
- Sarah Martinez confession email (insider threat desperation)
- Marcus Chen final voice message (civilian courage, survived!)
- Agent 0x99 axolotl philosophy (regeneration vs entropy)

Location History (1):
- Vanguard Financial complete history (25 years, breach, recovery)

**Key Features:**
- Interconnected narrative web (fragments reference each other)
- Educational value (CyBOK-aligned security lessons)
- Moral complexity (sympathetic characters on both sides)
- Emotional impact (personal stories, real consequences)
- Progressive mystery (builds understanding over time)
- Master catalog tracking all connections and discovery timing

**Thematic Elements:**
- ENTROPY: "For entropy and inevitability" - thermodynamic philosophy
- SAFETYNET: "For regeneration and resilience" - axolotl metaphor
- Phase 3: July 15, 2025 - infrastructure-wide coordinated attack
- Moral gray areas: desperate people, true believers, ethical constraints

Fragments demonstrate sophisticated threat actor (ENTROPY) with
decade-long planning, ideological commitment, and custom tooling,
opposed by dedicated defenders (SAFETYNET) who regenerate after
every setback.

See story_design/lore_fragments/MASTER_CATALOG.md for complete
interconnection map and expansion guidelines.
2025-11-18 01:40:41 +00:00
Z. Cliffe Schreuders
147c4af225 feat: Add comprehensive features reference and enhanced Ink scripting guide
Add two critical enhancements to scenario development prompts:

1. FEATURES_REFERENCE.md - Complete game features documentation
   - All available object types (notes, PC, phone, tablet, etc.)
   - All lock types (key, pin, password, bluetooth, rfid, lockpick)
   - NPC system (physical, phone, patrol, event mappings)
   - RFID security protocols (EM4100, MIFARE variants, DESFire)
   - Ink dialogue system with tags and patterns
   - Event system for reactive dialogue
   - Room system and connections
   - Complete examples and best practices
   - Quick reference tables

2. Enhanced 07_ink_scripting.md - Detailed Ink guide with actual structure
   - THREE-ACT STRUCTURE AS ACTUALLY IMPLEMENTED:
     * Act 1: Interactive cutscene (Ink-heavy, 2-5 min, choices)
     * Act 2: Puzzle chain gameplay (game-heavy, 15-40 min, NPC support)
     * Act 3: Resolution and debrief (Ink-heavy, 2-5 min, consequences)
   - Complete templates for opening cutscene with choices
   - NPC dialogue patterns (hub pattern, guards, phone contacts)
   - Closing cutscene with variable callbacks
   - Event-driven dialogue examples
   - Ink tags reference (#speaker, #display, #hostile, etc.)
   - Testing and validation guidance
   - Common errors and solutions

These documents provide the concrete technical details needed for AI agents
to write scenarios with proper features, constraints, and narrative structure.

Based on analysis of existing scenarios:
- scenarios/ceo_exfil.json
- scenarios/test-npc-patrol.json
- scenarios/test-rfid-multiprotocol.json
- scenarios/ink/security-guard.ink
- scenarios/ink/alice-chat.ink
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
fd434762fe feat: Add complete AI prompt system for scenario development (Stages 0-7)
Add comprehensive prompts for all 9 stages of Break Escape scenario development:

- Stage 0: Scenario Initialization - Technical challenges and narrative themes
- Stage 1: Narrative Structure - Three-act story arc development
- Stage 2: Storytelling Elements - Characters, atmosphere, dialogue
- Stage 3: Moral Choices - Player agency and ethical decisions
- Stage 4: Player Objectives - Goals and win conditions
- Stage 5: Room Layout - Physical design with technical constraints
- Stage 6: LORE Fragments - Collectible universe-building content
- Stage 7: Ink Scripting - Interactive dialogue and cutscenes

These prompts guide AI agents (or human designers) through a structured
process to create complete, validated Break Escape scenarios that combine
cybersecurity education with compelling narrative gameplay.

Each prompt includes:
- Role definition and responsibilities
- Required inputs from previous stages
- Essential reference documentation
- Process guidelines and templates
- Quality checklists
- Common pitfalls to avoid
- Tips for success

This completes the story development prompt system alongside the previously
committed README.md and Stage 8 (Review) prompt.
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
4ffb9e2a07 feat: Add scenario review and README for story development prompts
Add comprehensive scenario review and validation prompt (Stage 8) plus
README overview for the story development prompt system.

Note: Files for stages 0-7 need to be recreated - they appear to have
not persisted despite Write tool calls during the session.
2025-11-18 01:22:08 +00:00
Z. Cliffe Schreuders
bbb99cf935 fix: Add teleportation collision boxes for doors to enable bi-directional teleportation 2025-11-17 20:08:07 +00:00
Z. Cliffe Schreuders
56917474fd fix: Add full tile collision boxes above and below side doors for improved player interaction 2025-11-17 19:47:55 +00:00
Z. Cliffe Schreuders
975e9fa069 fix: Update side door dimensions and add collision boxes for east/west connections 2025-11-17 15:53:24 +00:00
Z. Cliffe Schreuders
09cd416d02 fix: Adjust east/west door positioning for consistent alignment and visual display 2025-11-17 15:48:36 +00:00
Z. Cliffe Schreuders
0cf2f0fae3 fix: Standardize east and west door positioning for consistency with north/south doors 2025-11-17 15:40:16 +00:00
Z. Cliffe Schreuders
1947ff3ad4 fix: Adjust door placement to flush with walls for east and west doors 2025-11-17 14:55:29 +00:00
Z. Cliffe Schreuders
d10db55213 feat: Reorganize and expand Break Escape Universe Bible into modular structure
This commit transforms the single universe bible document into a comprehensive,
organized set of reference materials across 74 files in 10 major sections.

Major Changes:
- Split original universe bible into chapter-based documents
- Expanded all content by 50-100% with additional lore and details
- Created modular directory structure for easy navigation
- Added extensive cross-referencing between documents

New Structure:
01. Universe Overview - Setting, premise, and tone
02. Organisations - SAFETYNET and ENTROPY detailed profiles
03. ENTROPY Cells - All 11 cells with expanded operations
04. Characters - SAFETYNET operatives and ENTROPY antagonists
05. World Building - Rules, technology, society, timeline
06. Locations - Environment types and notable locations
07. Narrative Structures - Mission types, arcs, player agency
08. LORE System - Collectibles, progression, writing guides
09. Scenario Design - Framework, templates, and examples
10. Reference - Quick reference, checklists, glossary, style guide

Content Expansions:
- SAFETYNET: 28 Field Operations Handbook rules (from 3)
- ENTROPY Cells: 8 key members per cell (from 4)
- Characters: 8 additional SAFETYNET agents created
- Locations: 7 environment type guides
- Scenario Templates: 4 complete templates + 3 full examples
- LORE System: 220 fragments mapped across 6 categories
- Reference: Comprehensive glossary, checklists, and CyBOK guide

Benefits:
- Easier to find specific information
- Consistent universe across all scenarios
- Supports continuous discovery as players progress
- Comprehensive reference for scenario designers
- Expanded lore enables richer storytelling

Total Documentation: ~500KB across 74 markdown files
2025-11-17 12:41:36 +00:00
Z. Cliffe Schreuders
c3440986a3 fix: Correct side door (E/W) placement, sprites, and animations
This commit fixes several issues with East/West side doors:

1. **Sprite Flipping**: Changed flip direction - East doors are now flipped
   horizontally instead of West doors (opposite direction as requested)

2. **Door Positioning**: Updated E/W door placement from 2 tiles to 3 tiles
   from the top corner for better alignment with room layout

3. **Wall Passage Cutout**: Increased wall tile removal area for side doors
   from 1 tile to 3 tiles vertically, creating a wider passage (matching the
   inset spacing used for N/S doors)

4. **Side Door Animation**:
   - Added `isSideDoor` property to doorProperties to track door type
   - Created new 'door_side_open' animation using frames 1-4 (frames 2-5
     in 1-indexed notation) of door_side_sheet_32 sprite
   - Updated animated door creation to use side door sprite and animation
     for E/W doors

5. **Sprite Alignment**: Door sprites now properly align with the tile grid
   at 3 tiles from corner position

Changes made in:
- js/systems/doors.js: Door placement, sprite creation, and animations
- js/systems/collision.js: Wall tile removal for wider passages
- js/core/game.js: Side door animation definition

Tested with: scenarios/test_horizontal_layout.json
2025-11-17 12:28:19 +00:00
Z. Cliffe Schreuders
aef6e97df0 fix: Update item spawn positioning to respect room GU boundaries and padding
- Modified createSpriteAtRandomPosition() to accept map parameter
- Items now use actual room dimensions based on tilemap (respects room GU)
- Applied correct padding constraints:
  * 1 tile (32px) from left and right sides
  * 2 tiles (64px) from top and bottom
- Random item placement now works correctly with variable room sizes
- Ensures items stay within playable room bounds

Related to new room layout system (Grid Unit based positioning)
2025-11-17 11:19:43 +00:00
Z. Cliffe Schreuders
150e3a6d43 fix: Ensure each connecting room has minimum 1 GU overlap with parent
Updated room positioning to verify overlap for EACH connected room
after grid alignment, not just the group as a whole. This fixes
layouts like:

  122
  00

Where room 1 was previously positioned with no overlap to room 0.

Changes:
- positionNorthMultiple/positionSouthMultiple: After centering and
  aligning group, check first and last room overlap. If insufficient,
  shift entire group to ensure minimum overlap for each room.
- positionEastMultiple/positionWestMultiple: Same approach for
  vertical stacking along east/west edges.

The algorithm now:
1. Centers the group of connecting rooms over parent
2. Aligns starting position to grid
3. Checks if first room has >= 1 GU overlap, adjusts if not
4. Checks if last room has >= 1 GU overlap, adjusts if not
5. Positions all rooms from the adjusted aligned start

This guarantees each connecting room overlaps with the parent room
by at least one Grid Unit, ensuring proper door placement and room
connectivity.
2025-11-17 11:04:52 +00:00
Z. Cliffe Schreuders
0442139236 fix: Align connecting rooms to grid with minimum 1 GU overlap
Updated room positioning algorithm to ensure all connecting rooms are
properly aligned to the grid and have at least one Grid Unit overlap
with the connecting edge of the parent room.

Changes:
- positionNorthMultiple/positionSouthMultiple: Position rooms as a group,
  align the starting position to grid, then place rooms side-by-side
  without individual alignment to prevent gaps
- positionEastMultiple/positionWestMultiple: Similar approach for vertical
  stacking of rooms along east/west edges

This ensures:
- All rooms maintain proper grid alignment
- Connected rooms have guaranteed minimum overlap
- No gaps between adjacent rooms in multi-room connections
- Room layouts match the examples in planning notes

Addresses alignment issues described in new_room_layout documentation
where rooms need to be positioned against the connecting edge with
at least one GU overlap.
2025-11-17 11:04:52 +00:00
Z. Cliffe Schreuders
5f64e728ba Universe & Scenario Design Guide 2025-11-17 10:27:09 +00:00
Z. Cliffe Schreuders
302449d8e1 fix: Resolve room layout issues for mixed sizes and east/west doors
This commit addresses three critical issues identified during testing:

1. **Fixed mixed room size door alignment (Issue #1)**
   - Updated room positioning logic in positionNorthMultiple, positionSouthMultiple,
     positionEastMultiple, and positionWestMultiple functions
   - Rooms are now positioned centered on their corresponding door positions
   - Ensures doors align properly between different-sized rooms (e.g., 1×1 GU closet
     connecting to 2×1 GU hallway)
   - Uses same door spacing logic as door placement (edgeInset + doorSpacing)

2. **Implemented East/West single-tile doors (Issue #2)**
   - Changed door_side_sheet_32 from image to spritesheet (6 frames, 32×32px each)
   - Updated door sprite creation to use single tile per room for east/west doors
   - West-facing doors (left room) now properly flip horizontally
   - Doors positioned 3 tiles down from top (TILE_SIZE * 2) as specified
   - Updated wall tile removal and animated door creation to use correct dimensions
   - Both sides of east/west connections now use matching door system

3. **Added connection limit validation (Issue #3)**
   - Created validateMultipleConnections function to check if connections fit
   - Validates that multiple connections won't cause rooms to overhang excessively
   - Logs detailed error messages with recommendations when connections don't fit
   - Example: 2GU room can't have 3 north connections (not enough width)
   - Helps developers identify invalid room layouts during scenario design

Files modified:
- js/core/game.js: Load door_side_sheet_32 as spritesheet
- js/core/rooms.js: Fix positioning, add validation
- js/systems/doors.js: Single-tile east/west doors with flipping
- js/systems/collision.js: Update wall tile removal for single-tile doors
2025-11-17 08:49:50 +00:00
Z. Cliffe Schreuders
d92a8a5f18 fix: Correct room type keys in test scenarios and add new room types to preload
Fixed issue where test scenarios couldn't load rooms:

1. Added new room types to game preload:
   - small_room_1x1gu (1×1 GU closet)
   - hall_1x2gu (2×1 GU wide hallway)

2. Corrected room type keys in all test scenarios:
   - room_reception2 → room_reception
   - room_office2 → room_office
   - room_ceo2 → room_ceo
   - room_servers2 → room_servers

The issue was that scenarios referenced room file names (room_reception2)
instead of the Phaser cache keys (room_reception). The game preloads rooms
with specific keys that map to the JSON files:
  this.load.tilemapTiledJSON('room_reception', 'assets/rooms/room_reception2.json')

Scenarios must use the key ('room_reception'), not the filename.

Files updated:
- js/core/game.js: Added preload for new variable-sized rooms
- scenarios/test_vertical_layout.json
- scenarios/test_horizontal_layout.json
- scenarios/test_complex_multidirection.json
- scenarios/test_multiple_connections.json
- scenarios/test_mixed_room_sizes.json

All test scenarios should now load correctly.
2025-11-17 08:49:50 +00:00
Z. Cliffe Schreuders
d21084f6cf feat: Update mixed room sizes test scenario with actual variable-sized rooms
Updated test_mixed_room_sizes.json to use the new room files merged from main:
- Changed hall from placeholder to hall_1x2gu.json (2×1 GU - 10×6 tiles)
- Changed closet from placeholder to small_room_1x1gu.json (1×1 GU - 5×6 tiles)
- Updated all scenario text to reflect actual room dimensions
- Corrected layout diagram (hall is 2×1 GU wide hallway, not 1×2 GU vertical)

Updated TEST_SCENARIOS_README.md:
- Marked small_room_1x1gu.json and hall_1x2gu.json as available (✓)
- Updated scenario #5 description with actual rooms used
- Clarified that this scenario now demonstrates real size variety

This scenario now provides a complete test of the grid system with:
- 1×1 GU closet (smallest valid room)
- 2×1 GU wide hallway (horizontal connector)
- 2×2 GU standard rooms (reception, CEO office)
- Proper door alignment between all different sizes
2025-11-17 08:49:50 +00:00
Z. Cliffe Schreuders
e9eb9d96c8 docs: Update room layout documentation and add comprehensive test scenarios
Updated README_scenario_design.md with new grid-based room layout system:
- Documented Grid Unit (GU) system: 5×4 tiles base unit
- Added valid room size specifications (widths: multiples of 5, heights: 2+4N)
- Replaced old north/south-only constraints with four-direction support
- Updated door placement rules for N/S/E/W connections
- Added room positioning algorithm documentation
- Revised scenario design guidelines for grid system flexibility

Created 5 comprehensive test scenarios:
1. test_vertical_layout.json - Traditional N/S stacking
2. test_horizontal_layout.json - E/W connections
3. test_complex_multidirection.json - All four directions
4. test_multiple_connections.json - Multiple doors per direction
5. test_mixed_room_sizes.json - Different room sizes (1×1, 1×2, 2×2 GU)

Added TEST_SCENARIOS_README.md documenting:
- Grid system overview and room size specifications
- Detailed test scenario descriptions with layout diagrams
- Testing procedures and validation checks
- Expected console output examples
- Troubleshooting guide

Note: Scenarios reference hall_1x2gu.json and small_room_1x1gu.json which
need to be created in assets/rooms/. Currently using 2×2 GU placeholders.

All test scenarios include:
- Visual layout diagrams in scenario_brief
- Progressive difficulty with locks and keys
- Documentation of what each scenario tests
- Notes explaining grid system concepts
2025-11-17 08:49:50 +00:00
Z. Cliffe Schreuders
8ea391eab8 Add hall and small rooms 2025-11-16 10:20:00 +00:00
Z. Cliffe Schreuders
7cec8b2e17 feat(validation): Add comprehensive room layout validation system
- Add validateRoomSize() to check room dimensions match grid units
- Add validateGridAlignment() to verify positions align to grid
- Add validateNoOverlaps() to detect room collisions
- Add validateRoomLayout() as main validation entry point
- Integrate validation into calculateRoomPositions (Phase 5)
- Store roomPositions globally for cross-system access
- Log validation errors/warnings but don't block game load

Validation checks:
✓ Room width is multiple of 5 tiles (grid unit)
✓ Room stacking height is multiple of 4 tiles (grid unit)
✓ Room positions align to 160px × 128px grid
✓ No rooms overlap (AABB collision detection)

Warnings: Room size mismatches (for backwards compatibility)
Errors: Grid misalignment, overlaps (critical issues)
2025-11-16 08:45:06 +00:00
Z. Cliffe Schreuders
0325412342 refactor(collision): Use shared door placement logic in removeTilesUnderDoor
- Export calculateDoorPositionsForRoom from doors.js for reuse
- Import and use shared function in collision.js
- Remove duplicate door positioning logic (130+ lines)
- Ensures perfect alignment between door sprites and wall tile removal
- Both systems now use identical door placement calculations

This eliminates code duplication and guarantees that wall tiles are
removed at exactly the same positions where door sprites are created.
2025-11-16 08:45:06 +00:00
Z. Cliffe Schreuders
2e62a4e62b feat(room-layout): Implement new grid-based room layout system with critical bug fixes
- Add grid unit constants (5x4 tiles) to constants.js
- Create comprehensive grid conversion helper functions
- Implement 4-direction room positioning (N/S/E/W) with breadth-first algorithm
- Add door placement functions with CRITICAL fixes:
  * Negative modulo fix: ((sum % 2) + 2) % 2 for deterministic placement
  * Asymmetric alignment fix: single-door rooms align with multi-door rooms
  * Consistent grid alignment using Math.floor() for negative coordinates
- Rewrite calculateRoomPositions to support variable room sizes
- Update createDoorSpritesForRoom to use new placement system
- Store room dimensions globally for cross-system access

This implements the comprehensive room layout redesign as specified in
planning_notes/new_room_layout with all critical fixes from review2.

Addresses: Variable room sizes, proper door alignment, and grid-based positioning
2025-11-16 08:45:06 +00:00
Z. Cliffe Schreuders
57d9b8f5d8 docs: Remove critical action required for room dimension audit from implementation plan -- these are older rooms replaced by 2.0 rooms 2025-11-16 02:17:39 +00:00
Z. Cliffe Schreuders
128727536e docs: Complete comprehensive review2 of room layout plans with critical bug fixes
Performed detailed validation of room layout implementation plans against
ceo_exfil.json scenario, identifying and fixing 3 critical bugs that would
have caused implementation failure.

## Critical Bugs Fixed

1. **Negative Modulo Bug** (CRITICAL)
   - JavaScript modulo with negatives: -5 % 2 = -1 (not 1)
   - Affected all rooms with negative grid coordinates
   - Fixed: Use ((sum % 2) + 2) % 2 for deterministic placement
   - Applied to all door placement functions (N/S/E/W)

2. **Asymmetric Door Alignment Bug** (CRITICAL)
   - Single-door rooms connecting to multi-door rooms misaligned
   - Example: office1 (2 doors) ↔ office2 (1 door) = 64px misalignment
   - Fixed: Check connected room's connection array and align precisely
   - Applied to all 4 directions with index-based alignment

3. **Grid Rounding Ambiguity** (CRITICAL)
   - Math.round(-0.5) has implementation-dependent behavior
   - Fixed: Use Math.floor() consistently for grid alignment
   - Applied to all positioning functions

## Scenario Validation

- Traced ceo_exfil.json step-by-step through positioning algorithm
- Simulated door placements for all rooms
- Verified office1↔office2/office3 connections (key test case)
- Result: Would fail without fixes, will succeed with fixes

## Documents Updated

- DOOR_PLACEMENT.md: Added asymmetric alignment + negative modulo fix
- POSITIONING_ALGORITHM.md: Changed Math.round() to Math.floor()
- GRID_SYSTEM.md: Added grid alignment rounding clarification
- README.md: Updated critical fixes status, added Phase 0

## Review Documents Created

- review2/COMPREHENSIVE_REVIEW.md: Full analysis (400+ lines)
- review2/SUMMARY.md: Executive summary and status

## Confidence Assessment

- Before fixes: 40% success probability
- After fixes: 90% success probability

## Status

 Plans are self-contained and actionable
 All critical bugs fixed in specifications
 Validated against real scenario
 Ready for implementation (after Phase 0 audit)

Remaining risk: Room dimension validation (must audit before coding)
2025-11-16 02:13:21 +00:00
Z. Cliffe Schreuders
019986ceef docs: Add comprehensive room layout system redesign plan
Created detailed implementation plan for redesigning the room layout system
to support variable room sizes and four-direction connections.

Core Concepts:
- Grid unit system (5×4 tiles base, excluding 2-tile visual top)
- Valid room heights: 6, 10, 14, 18, 22, 26... (formula: 2 + 4N)
- Breadth-first room positioning from starting room
- Deterministic door placement with alignment for asymmetric connections
- Comprehensive scenario validation

Documents Created:
- OVERVIEW.md: High-level goals and changes
- TERMINOLOGY.md: Definitions and concepts
- GRID_SYSTEM.md: Grid unit system specification
- POSITIONING_ALGORITHM.md: Room positioning logic
- DOOR_PLACEMENT.md: Door placement rules and algorithms
- WALL_SYSTEM.md: Wall collision system updates
- VALIDATION.md: Scenario validation system
- IMPLEMENTATION_STEPS.md: Step-by-step implementation guide
- TODO_LIST.md: Detailed task checklist
- README.md: Quick start and overview

Review & Critical Fixes:
- review1/CRITICAL_REVIEW.md: Identified 4 critical issues
- review1/RECOMMENDATIONS.md: Solutions for all issues
- UPDATED_FILES_SUMMARY.md: Integration of review feedback

Critical Issues Identified & Resolved:
1. Grid height calculation (now: 6, 10, 14, 18...)
2. Door alignment for asymmetric connections (solution documented)
3. Code duplication (shared module approach specified)
4. Disconnected rooms (validation added)

Implementation Strategy:
- Incremental approach with feature flag
- Phase 1: Constants and helpers
- Phase 2a: North/South positioning
- Phase 2b: East/West support
- Phase 3: Door placement with critical fixes
- Phase 4: Validation
- Phase 5-6: Testing and documentation

Estimated time: 18-26 hours
Confidence: 9/10 (all critical issues addressed)

Ready for implementation.
2025-11-15 23:58:19 +00:00
Z. Cliffe Schreuders
32d5bbfab5 fix(chat-helpers): Correctly handle NPC hostility event in game action tags 2025-11-15 23:54:25 +00:00
Z. Cliffe Schreuders
c4622f2dee feat(rfid): Enhance hex generation with improved hash-based approach for realistic card data 2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
ab18e2a5b5 refactor(rfid): Update references from Flipper Zero to RFID Flipper for consistency 2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
08ed220618 Enhance RFID system interactions and NPC conversations
- Updated door sprite creation to support lock properties from both doors and connected rooms.
- Added RFID cloner interaction logic to handle minigame initiation from inventory.
- Implemented inventory variable synchronization for NPC conversations, including RFID card details.
- Introduced new scenarios for RFID guards with varying security levels and interactions.
- Revised test scenarios to include comprehensive RFID protocol testing with detailed notes and NPC interactions.
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
bff4a6a31a docs(rfid): Add corrected scenario patterns and multi-protocol test
Created proper RFID scenario examples following project patterns
(hub structure, #exit_conversation tags, card_id format).

## Issues Found in Existing Files:

### test-rfid.json (Not modified - reference only):
 Uses legacy format (rfid_hex, rfid_facility, key_id)
 All EM4100 - no protocol variety
 Door requires not array format
 No protocol testing variety

### rfid-security-guard.ink (Not modified - reference only):
 Uses -> END instead of #exit_conversation
 Doesn't return to hub after exits
 No proper hub pattern
 Clone tag uses hex instead of card_id

## New Corrected Files:

### 1. scenarios/RFID_SCENARIO_PATTERNS.md (NEW)
Comprehensive guide showing:
-  Correct hub pattern with #exit_conversation
-  Proper card_id JSON format
-  Protocol-specific examples
-  Common mistakes to avoid
- Complete working examples

### 2. scenarios/test-rfid-multiprotocol.json (NEW)
Test scenario with ALL 4 protocols:
- EM4100 (instant clone)
- MIFARE_Classic_Weak_Defaults (dictionary)
- MIFARE_Classic_Custom_Keys (Darkside attack)
- MIFARE_DESFire (UID only)

Features:
- 4 NPCs, each with different protocol
- 4 test rooms demonstrating each security level
- Proper card_id format throughout
- Array-based door requirements
- acceptsUIDOnly flag demonstrated

### 3. scenarios/ink/rfid-security-guard-fixed.ink (NEW)
Fixed version showing:
- Proper hub structure
- #exit_conversation on choice lines
- All paths return to hub
- Card protocol variables declared
- Uses {card_card_id} in clone tags

### 4. scenarios/ink/rfid-guard-low.ink (NEW)
Simple EM4100 example:
- Instant clone pattern
- Proper exit handling
- Minimal complexity for learning

### 5. scenarios/ink/rfid-guard-custom.ink (NEW)
MIFARE Custom Keys example:
- Shows attack requirement
- Player feedback for encrypted cards
- Proper state management

## Key Patterns Documented:

### Correct Ink Pattern:
```ink
+ [Leave] #exit_conversation
  # speaker:npc
  Goodbye!
  -> hub  // Return to hub, NOT END
```

### Correct JSON Pattern:
```json
{
  "type": "keycard",
  "card_id": "employee_badge",
  "rfid_protocol": "EM4100",
  "name": "Employee Badge"
}
```

### Door Configuration:
```json
{
  "lockType": "rfid",
  "requires": ["card1", "card2"],
  "acceptsUIDOnly": false
}
```

## Testing Checklist Added:
- [ ] Uses #exit_conversation tag
- [ ] All knots return to hub
- [ ] Card variables declared
- [ ] Uses card_id format
- [ ] Door requires is array
- [ ] No manual hex entry

## Files Added:
- scenarios/RFID_SCENARIO_PATTERNS.md
- scenarios/test-rfid-multiprotocol.json
- scenarios/ink/rfid-security-guard-fixed.ink
- scenarios/ink/rfid-guard-low.ink
- scenarios/ink/rfid-guard-custom.ink

These serve as reference implementations for scenario designers.
Original files (test-rfid.json, rfid-security-guard.ink) left
unmodified as they may be in use.
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
2a4ee59e4f docs(rfid): Add Ink integration and comprehensive variable documentation
Add Ink integration for RFID card protocols, allowing conversation scripts
to detect and respond to different card security levels and protocols.

## Ink Integration (Phase 5):

### 1. Added syncCardProtocolsToInk() Method
- Location: js/minigames/person-chat/person-chat-conversation.js
- Auto-syncs when syncItemsToInk() is called
- Generates rfid_data if card uses card_id pattern
- Syncs variables for each keycard NPC holds

### 2. Per-Card Variables Synced:
- {prefix}_protocol - Protocol name
- {prefix}_name - Card display name
- {prefix}_card_id - Logical identifier
- {prefix}_security - "low", "medium", "high"
- {prefix}_instant_clone - Boolean (EM4100, weak MIFARE)
- {prefix}_needs_attack - Boolean (custom key MIFARE)
- {prefix}_uid_only - Boolean (DESFire)
- {prefix}_uid - Card UID (MIFARE)
- {prefix}_hex - Card hex ID (EM4100)

### 3. Prefix Pattern:
- First card: card_protocol, card_name, card_card_id, etc.
- Second card: card2_protocol, card2_name, card2_card_id, etc.

## Documentation:

### scenarios/ink/README_RFID_VARIABLES.md (NEW)
Comprehensive guide for scenario designers covering:

1. **Variable Declarations** - Required Ink variable setup
2. **Variable Reference** - Complete table of all variables
3. **Protocol Characteristics** - Details for each of 4 protocols
4. **Usage Examples**:
   - Simple EM4100 clone
   - Multi-protocol detection
   - Conditional dialogue based on protocol
5. **Ink Tags** - Suggested tag patterns for RFID actions
6. **Scenario JSON Format** - How to define keycards
7. **Tips for Scenario Designers** - Best practices
8. **Complete Example Scenario** - Full working Ink script
9. **Troubleshooting** - Common issues and solutions

## Example Ink Usage:

```ink
VAR card_protocol = ""
VAR card_security = ""
VAR card_instant_clone = false

{card_security == "low":
  "This is a low-security card. Easy to clone!"
  # clone_keycard:{card_card_id}
  -> cloned
}

{card_needs_attack:
  "Need to run Darkside attack..."
  # save_uid_and_start_attack:{card_card_id}|{card_uid}
  -> wait_for_attack
}
```

## Benefits:

1. **Scenario designers** can write protocol-aware dialogue
2. **NPCs** can react realistically to card security levels
3. **Players** get different experiences based on card type
4. **Automatic** - no manual variable management needed

## Files Modified:
- js/minigames/person-chat/person-chat-conversation.js
- scenarios/ink/README_RFID_VARIABLES.md (NEW)

## Next Steps:
- Create test scenarios for each protocol
- Add Ink tag handlers for suggested patterns
- Test with various card combinations

Phase 5 (Ink Integration) complete!
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
7ecda9d39d feat(rfid): Implement multi-protocol RFID system with 4 protocols
Implement comprehensive multi-protocol RFID system with deterministic
card_id-based generation, MIFARE key attacks, and protocol-specific UI.

## New Protocol System (4 protocols):
- EM4100 (low security) - Instant clone, already implemented
- MIFARE_Classic_Weak_Defaults (low) - Dictionary attack succeeds (95%)
- MIFARE_Classic_Custom_Keys (medium) - Requires Darkside attack (30s)
- MIFARE_DESFire (high) - UID only, forces physical theft

## Key Features:

### 1. Protocol Foundation
- Created rfid-protocols.js with protocol definitions
- Added protocol detection, capabilities, security levels
- Defined attack durations and common MIFARE keys

### 2. Deterministic Card Generation
- Updated rfid-data.js with card_id-based generation
- Same card_id always produces same hex/UID (deterministic)
- Simplified scenario format - no manual hex/UID needed
- getCardDisplayData() supports all protocols

### 3. MIFARE Attack System
- Created rfid-attacks.js with MIFAREAttackManager
- Dictionary Attack: Instant, 95% success on weak defaults
- Darkside Attack: 30 sec (10s on weak), cracks all keys
- Nested Attack: 10 sec, uses known key to crack rest
- Protocol-aware attack behavior

### 4. UI Enhancements
- Updated rfid-ui.js with protocol-specific displays
- showProtocolInfo() with color-coded security badges
- showAttackProgress() and updateAttackProgress()
- Protocol headers with icons and frequency info
- Updated showCardDataScreen() and showEmulationScreen()

### 5. Unlock System Integration
- Updated unlock-system.js for card_id matching
- Support multiple valid cards per door (array)
- Added acceptsUIDOnly flag for DESFire UID emulation
- Backward compatible with legacy key_id format

### 6. Minigame Integration
- Updated rfid-minigame.js with attack methods
- startKeyAttack() triggers dictionary/darkside/nested
- handleCardTap() and handleEmulate() use card_id arrays
- UID-only emulation validation for DESFire
- Attack manager cleanup on minigame exit

### 7. Styling
- Added CSS for protocol headers and security badges
- Color-coded security levels (red=low, teal=medium, green=high)
- Attack progress styling with smooth transitions
- Dimmed menu items for unlikely attack options

## Scenario Format Changes:

Before (manual technical data):
```json
{
  "type": "keycard",
  "rfid_hex": "01AB34CD56",
  "rfid_facility": 1,
  "key_id": "employee_badge"
}
```

After (simplified with card_id):
```json
{
  "type": "keycard",
  "card_id": "employee_badge",
  "rfid_protocol": "MIFARE_Classic_Weak_Defaults",
  "name": "Employee Badge"
}
```

Technical data (hex/UID) generated automatically from card_id.

## Door Configuration:

Multiple valid cards per door:
```json
{
  "lockType": "rfid",
  "requires": ["employee_badge", "contractor_badge", "master_card"],
  "acceptsUIDOnly": false
}
```

## Files Modified:
- js/minigames/rfid/rfid-protocols.js (NEW)
- js/minigames/rfid/rfid-attacks.js (NEW)
- js/minigames/rfid/rfid-data.js
- js/minigames/rfid/rfid-ui.js
- js/minigames/rfid/rfid-minigame.js
- js/systems/unlock-system.js
- css/rfid-minigame.css
- planning_notes/rfid_keycard/protocols_and_interactions/03_UPDATES_SUMMARY.md (NEW)

## Next Steps:
- Phase 5: Ink integration (syncCardProtocolsToInk)
- Test with scenarios for each protocol
- Add Ink variable documentation

Estimated implementation time: ~12 hours (Phases 1-4 complete)
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
d697eef3ca docs(rfid): Add multi-protocol RFID system planning & review
Created comprehensive planning for adding multiple RFID protocols with
different security levels and attack capabilities.

Planning Documents:
- 00_IMPLEMENTATION_SUMMARY.md: Complete implementation guide (14h estimate)
- 01_TECHNICAL_DESIGN.md: Protocol specs, data models, UI design
- 02_IMPLEMENTATION_PLAN.md: Detailed file-by-file implementation plan
- CRITICAL_REVIEW.md: Pre-implementation review with 12 improvements

Protocol System (Simplified from Original):
 EM4100 (low security) - Instant clone, already implemented
 MIFARE Classic (medium) - Requires key attacks (Darkside/Nested/Dictionary)
 MIFARE DESFire (high) - UID only, forces physical theft
 HID Prox - Removed (too similar to EM4100, saves 2h)

Key Features:
- Protocol detection with color-coded security levels
- MIFARE key cracking minigames (30s Darkside, 10s Nested, instant Dictionary)
- Ink integration for conditional interactions based on card protocol
- Dual format support (no migration needed)
- UID-only emulation for DESFire with acceptsUIDOnly door property

Review Improvements Applied:
- Merged "attack mode" into clone mode (simpler state machine)
- Removed firmware upgrade system (can add later)
- Dual format card data support instead of migration (safer)
- Added error handling for unsupported protocols
- Added cleanup for background attacks
- Documented required Ink variables

Time Estimate: 14 hours (down from 19h)
- Phase 1: Protocol Foundation (3h)
- Phase 2: Protocol Detection & UI (3h)
- Phase 3: MIFARE Attack System (5h)
- Phase 4: Ink Integration (2h)
- Phase 5: Door Integration & Testing (1h)

Next Steps: Begin implementation starting with Phase 1
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
0210a12c64 docs(rfid): Add comprehensive post-implementation review
Added three review documents analyzing the completed RFID system:

- POST_IMPLEMENTATION_REVIEW.md: Full technical analysis of implementation
  - Reviewed 4 core files, 6 integration points, CSS, and test scenario
  - Found 0 critical issues, 2 medium priority improvements (optional)
  - Confirmed production-ready status
  - Verified correct conversation return pattern
  - Validated EM4100 protocol implementation

- ISSUES_SUMMARY.md: Quick reference for identified issues
  - 7 total issues (all minor/optional)
  - Action items with code examples
  - Testing checklist

- README.md: Review overview and quick status

Key findings:
 Clean modular architecture following established patterns
 Authentic Flipper Zero UI with smooth animations
 Robust error handling and validation
 Seamless integration with all game systems
 Comprehensive test scenario created

Recommended improvements (optional):
- Use hex ID for key_id to prevent collisions
- Add cardToClone validation in clone mode
- Extract timing constants for maintainability

Overall assessment: Production ready with minor improvements recommended
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
af11d420e0 fix(rfid): Create proper .ink source file and add compilation instructions
Created proper Ink source file for Security Guard NPC:

Ink Story File:
- Created scenarios/ink/rfid-security-guard.ink (proper Ink format)
- Follows equipment-officer.ink pattern
- Uses # speaker:npc and # speaker:player tags
- Implements hub dialogue structure
- Contains clone_keycard tag: # clone_keycard:Master Keycard|FF4A7B9C21
- Multiple dialogue branches and paths

Story Structure:
- start knot → hub knot
- ask_keycard knot with multiple choices
- cloned knot for post-clone conversation
- Proper conversation flow with END points

Removed:
- Deleted placeholder rfid-security-guard.json (incorrect format)
- JSON must be compiled from .ink source using inklecate or Inky

Updated README:
- Added compilation instructions section
- Option 1: Inky editor (recommended, GUI)
- Option 2: inklecate command line
- Warning that .json needs compilation before use
- Links to download tools

The .ink file is the source of truth and must be compiled to .json
before the scenario will work properly.
2025-11-15 23:48:15 +00:00
Z. Cliffe Schreuders
5d010e98d7 fix(rfid): Update test scenario to match proper JSON format
Fixed test scenario to match reference format from npc-sprite-test2.json:

JSON Format Changes:
- Changed holdsItems → itemsHeld (correct property name)
- Changed storyJSON → storyPath (points to Ink file)
- Added position: { x, y } for NPC placement
- Changed map → type for room definition
- Added connections object for room linking
- Added readable: true to notes objects
- Added observations field to all items
- Added scenario_brief field
- Removed description field from doors

New Ink Story File:
- Created scenarios/ink/rfid-security-guard.json
- Security Guard conversation with clone_keycard tag
- Multiple dialogue branches
- Proper Ink JSON format with content array

NPC Configuration:
- Security Guard at position {x: 6, y: 4}
- Uses hacker-red sprite with idle animation
- Holds Master Keycard in itemsHeld
- References rfid-security-guard.json story
- Starts at 'start' knot

Test scenario now fully compatible with game's scenario loading system.
2025-11-15 23:48:15 +00:00