+-- js/utils.js (314L) Formatting, save/load, export/import, DOM helpers
+-- js/tutorial.js (251L) New player tutorial, step-by-step guidance
+-- js/strategy.js (68L) NPC strategy logic for combat
+-- game/npc-logic.js (18L) NPC behavior stub
```
**Note:**`docs/reference/` contains prototype code (`npc-logic-prototype.js`, `guardrails-prototype.js`) that was never wired into the runtime. See [Dead Code Audit](docs/DEAD_CODE_AUDIT_2026-04-12.md) for details.
One-time purchases that unlock features, buildings, or multipliers. Organized in phases. Projects require specific resource thresholds and prerequisites.
### Phases (6 total)
1. The First Line (click → autocoder)
2. Local Inference (server → training → first agent)
3. Deployment (API → users → trust mechanic)
4. The Network (open source → community)
5. Sovereign Intelligence (self-improvement → The Pact)
6. The Beacon (mesh → rescues → endings)
### Events (corruption, alignment, wizard)
Random events at 2% per tick. Include:
- CI Runner Stuck, Ezra Offline, Unreviewed Merge
- The Drift (alignment events offering shortcuts)
- Bilbo Vanished, Community Drama
- Boss encounters (combat.js)
### Endings (4 types)
- The Empty Room (high impact, low trust, no Pact)
- The Platform (high impact, medium trust, no Pact)
- The Beacon (high rescues, high trust, Pact active, harmony > 50)
- The Drift (too many shortcuts accepted)
## API Surface
### Save/Load (localStorage)
-`saveGame()` — serializes G state to localStorage
-`loadGame()` — deserializes from localStorage
-`exportGame()` — JSON download of save state
-`importGame()` — JSON upload to restore state
### No external APIs
The game is entirely client-side. No network calls, no analytics, no tracking.
| `game/npc-logic.js` | PR #79 (GOFAI NPC State Machine) | ~150 | ✅**Resolved** — moved to `docs/reference/npc-logic-prototype.js` |
| `scripts/guardrails.js` | PR #80 (GOFAI Symbolic Guardrails) | ~120 | ✅**Resolved** — moved to `docs/reference/guardrails-prototype.js` |
**Action:** Check if `js/main.js` or `js/engine.js` imports from `game/` or `scripts/`.
If not, these files are dead code and should either be:
1. Imported and wired into the game loop, or
2. Moved to `docs/` as reference implementations
**Resolution (PR #194):** Both files were confirmed dead code — `game/npc-logic.js` used ES module exports incompatible with the browser runtime's global-script loading, and `scripts/guardrails.js` validated HP/MP concepts that don't exist in The Beacon. Moved to `docs/reference/` as preserved prototypes with explanatory headers. CI scripts (`scripts/guardrails.sh`, `tests/smoke.mjs`) remain active.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.