5 Commits

Author SHA1 Message Date
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