# Investigation Report: Missing Source Code — Classical AI Commits Disappearing **Issue:** #1145 **Date:** 2026-04-10 **Investigator:** mimo-v2-pro swarm worker ## Summary **The classical AI code is NOT missing. It is fully present in root `app.js` (3302 lines).** The perception of "disappearing code" was caused by agents writing to the WRONG file path (`public/nexus/app.js` instead of root `app.js`), creating corrupt duplicate files that were repeatedly overwritten and eventually deleted. ## Root Cause **Explanation #1 confirmed: Duplicate agents on different machines overwriting each other's commits.** Multiple Google AI Agent instances wrote GOFAI implementations to `public/nexus/app.js` — a path that does not correspond to the canonical app structure. These commits kept overwriting each other: | Commit | Date | What happened | |--------|------|---------------| | `8943cf5` | 2026-03-30 | Symbolic reasoning engine written to `public/nexus/app.js` (+2280 lines) | | `e2df240` | 2026-03-30 | Phase 3 Neuro-Symbolic Bridge — overwrote to 284 lines of HTML (wrong path) | | `7f2f23f` | 2026-03-30 | Phase 4 Meta-Reasoning — same destructive overwrite | | `bf3b98b` | 2026-03-30 | A* Search — same destructive overwrite | | `e88bcb4` | 2026-03-30 | Bug fix identified `public/nexus/` files as corrupt duplicates, **deleted them** | ## Evidence: Code Is Present on Main All 13 classical AI classes/functions verified present in root `app.js`: | Class/Function | Line | Status | |----------------|------|--------| | `SymbolicEngine` | 82 | ✅ Present | | `AgentFSM` | 135 | ✅ Present | | `KnowledgeGraph` | 160 | ✅ Present | | `Blackboard` | 181 | ✅ Present | | `SymbolicPlanner` | 210 | ✅ Present | | `HTNPlanner` | 295 | ✅ Present | | `CaseBasedReasoner` | 343 | ✅ Present | | `NeuroSymbolicBridge` | 392 | ✅ Present | | `MetaReasoningLayer` | 422 | ✅ Present | | `AdaptiveCalibrator` | 460 | ✅ Present | | `PSELayer` | 566 | ✅ Present | | `setupGOFAI()` | 596 | ✅ Present | | `updateGOFAI()` | 622 | ✅ Present | | Bitmask fact indexing | 86 | ✅ Present | | A* search | 231 | ✅ Present | These were injected by commit `af7a4c4` (PR #775, merged via `a855d54`) into the correct path. ## What Actually Happened 1. Google AI Agent wrote good GOFAI code to root `app.js` via the correct PR (#775) 2. A second wave of Google AI Agent instances also wrote to `public/nexus/app.js` (wrong path) 3. Those `public/nexus/` files kept getting overwritten by subsequent agent commits 4. Commit `e88bcb4` correctly identified the `public/nexus/` files as corrupt and deleted them 5. Alexander interpreted the git log as "classical AI code keeps disappearing" 6. The code was never actually gone — it just lived in root `app.js` the whole time ## Prevention Strategy 1. **Add `public/nexus/` to `.gitignore`** — prevents agents from accidentally writing to the wrong path again 2. **Add canonical path documentation to CLAUDE.md** — any agent reading this repo will know where frontend code lives 3. **This report** — serves as the audit trail so this confusion doesn't recur ## Acceptance Criteria - [x] Git history audited for classical AI commits - [x] Found the commits — they exist, code was written to wrong path - [x] Root cause identified — duplicate agents writing to `public/nexus/` (wrong path) - [x] Prevention strategy implemented — `.gitignore` + `CLAUDE.md` path guard - [x] Report filed with findings (this document)