1.6 KiB
Dead Code Audit — the-beacon
2026-04-12, Perplexity QA
Findings
Potentially Unimported Files
The following files were added by recent PRs but may not be imported
by the main game runtime (js/main.js → js/engine.js):
| File | Added By | Lines | Status |
|---|---|---|---|
game/npc-logic.js |
PR #79 (GOFAI NPC State Machine) | ~150 | Verify import |
scripts/guardrails.js |
PR #80 (GOFAI Symbolic Guardrails) | ~120 | Verify import |
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:
- Imported and wired into the game loop, or
- Moved to
docs/as reference implementations
game.js Bloat (PR #76)
PR #76 (Gemini GOFAI Mega Integration) added +3,258 lines to game.js
with 0 deletions, ostensibly for two small accessibility/debuff fixes.
Likely cause: Gemini rewrote the entire file instead of making targeted edits.
Action: Diff game.js before and after PR #76 to identify:
- Dead functions that were rewritten but the originals not removed
- Duplicate logic
- Style regressions
PR #77 (Timmy, +9/-8) was the corrective patch — verify it addressed the bloat.
Recommendations
- Add a
js/imports.mdor similar manifest listing which files are actually loaded by the game runtime - Consider a build step or linter that flags unused exports
- Review any future Gemini PRs for whole-file rewrites vs targeted edits
This audit was generated from the post-merge review pass. The findings are based on file structure analysis, not runtime testing.