RELEASE
planning/2.8.0/audits/FILE_AUDIT.md
sha256 960856908ef4c675 · 7973 bytes ·
original held in the private archive
# File Audit — Unused / Leftover / Orphaned Files
> **[ARCHIVE-class snapshot — not current truth.]** Per the 2.8.5 U-B1 doc-maintenance model (see `CLAUDE.md`'s
> Reference Pointer Index), this doc is frozen as of the date below and is never updated to track current code. It
> audited a codebase roughly 30% smaller than today's (pre-`test-console.js`, pre-OCR, pre-Diagnostic-Shell,
> pre-CHASSIS/Overseer). Reuse its structural reasoning as historical input only — re-verify every measurement and
> file-split proposal against current code before acting on it.
**Date:** 2026-07-01
**Branch:** `dev` @ `90ff0f4` (synced to `origin/dev`, clean)
**Mode:** READ-ONLY inventory. Nothing was changed, deleted, staged, committed, or pushed.
---
## Bottom line
**The repo is exceptionally clean.** There is **zero untracked junk** — no `.bak`/`.tmp`/`.orig`/swap files, no OS cruft, no stray logs, no accidental copies, no dead build dirs. Every file on disk is git-tracked and (almost) all are actively referenced.
Only **3 things** are worth the owner's attention, and **none are "safe to delete" without a decision** — all are tracked files or documentation, so per the rules the owner decides:
1. One genuinely orphaned tracked doc (`docs/REVIEW-living-os.md`).
2. Documentation drift — `ARCHITECTURE.md` cites 3 source files that no longer exist (they were split).
3. A gitignore hygiene mismatch — `CLAUDE.md` + `RULES.md` are on GitHub despite being listed in `.gitignore`.
---
## Category 1 — Untracked junk → **NOTHING FOUND** ✅
`git status --porcelain --ignored` and a full disk glob show the working tree is spotless. The only untracked/ignored entries are the 4 intentional directories:
| Path | Status | Verdict |
| --- | --- | --- |
| `.claude/` | ignored | intentional (agent files) — keep |
| `.vscode/` | ignored | intentional (IDE) — keep |
| `node_modules/` | ignored | intentional (deps) — keep |
| `planning/` | ignored | intentional (working docs) — keep |
No `*.bak`, `*.tmp`, `*.orig`, `*.swp/.swo`, `~$*`, `.DS_Store`, `Thumbs.db`, `desktop.ini`, `*.log`, `* copy.js`, `foo (1).js`, `foo-old.js`, `foo2.js`, or stray `dist/` / `_site/` output anywhere.
---
## Category 2 — Orphaned source / assets
### Fully verified as IN USE (do not touch)
- **All 12 `js/*.js` files load.** 7 are direct `<script>` tags in `index.html` (`ui-audio`, `ui-render`, `ui-saves`, `ui-account`, `ui-core`, `api`, `cloud`); the other 6 load via the dynamic `GAME_FILES` boot manifest in `index.html` (`db_nv`/`db_fo3`, `state`, `reg_nv`/`reg_fo3`, `registry-core`).
- **`css/terminal.css`** — linked in `index.html`.
- **All 5 PNG icons** (`icon.png`, `comm-link-icon.png`, `inventory-icon.png`, `stats-icon.png`, `new-campaign-icon.png`) — referenced by both `manifest.json` (app + shortcut icons) and precached in `sw.js` `ASSETS`.
- **`sw.js` `ASSETS` precache list** matches the on-disk served set exactly (plus `CHANGELOG.md`, which is added at runtime with `cache.add(...).catch(...)` — intentional, not a missing precache).
- **All `tests/` helpers are wired:** `browser-shared.mjs` is imported by `render-check`, `boot-smoke`, `a11y-check`, and `test-html-check`; `browser-server.mjs` is the shared-Chromium subprocess it spawns. `run-tests.bat` correctly invokes the renamed `robco-diagnostics.ps1` (updated 2026-06-30 for the WU-REN rename — maintained, not stale).
- **All `scripts/` are wired:** `gate.js` (npm `gate`), `install-hooks.js` (npm `prepare`), `cf-staging-build.mjs` (staging workflow), `rollback.sh` (npm `rollback`), `pre-commit`/`pre-push` (installed by `install-hooks.js`).
### ORPHANED (tracked — owner judgment)
| Path | Size | Tracked | Why it looks orphaned | Confidence |
| --- | --- | --- | --- | --- |
| `docs/REVIEW-living-os.md` | ~46 KB | tracked | Referenced by **nothing** — no code, doc, workflow, or config links to it. `docs/` contains only this one file. Last touched at the **v2.0.1** release (commit `73a16e4`); untouched since. Reads as a one-off "living OS" review write-up that served its purpose. | **Probably orphaned** — needs owner judgment (it's a tracked file; the rules say don't auto-recommend deleting tracked files). |
---
## Category 3 — Duplicate / obsolete → **NOTHING FOUND** ✅
No parallel/duplicate implementations on disk. The historical monolith splits are **fully complete** — none of the old single-file versions linger:
- `ui.js` → split into `ui-audio` / `ui-render` / `ui-saves` / `ui-account` / `ui-core` (no `ui.js` on disk).
- `database.js` → `db_nv.js` / `db_fo3.js` (no `database.js`).
- `registry.js` → `reg_nv.js` / `reg_fo3.js` / `registry-core.js` (no `registry.js`).
No `*New()`-style or `*V2` duplicate files, no superseded scripts, no dead test fixtures.
---
## Category 4 — Untracked-but-intentional (flagged, **keep**)
- **`planning/`** — the whole folder is gitignored working docs (MASTER_PLAN, `*_AUDIT.md`, `*_SLATE.md`, `*_DESIGN.md`, etc.). **This report lives here too** — it's gitignored and never committed. Keep untouched.
- **`.claude/`, `.vscode/`, `node_modules/`** — standard ignored tooling/deps. Keep.
---
## Category 5 — Referenced-but-missing / stale references
These are **documentation drift**, not files to delete. The docs cite source files that no longer exist because the code was split into per-game / per-concern modules.
| Where | Stale reference | Reality | Confidence |
| --- | --- | --- | --- |
| `ARCHITECTURE.md` (~30+ mentions across load-order, file-structure, storage table, checklists, mermaid diagrams) | `js/ui.js`, `js/database.js`, `js/registry.js` | Split into `ui-*.js` (×5), `db_nv/db_fo3.js`, `reg_nv/reg_fo3/registry-core.js`. The files named do not exist on disk. | **Needs owner judgment** — `ARCHITECTURE.md` is an in-use tracked doc; the fix is an update, not a deletion. |
| `CLAUDE.md` (Architecture Quick Reference, lines ~581–596) | same three old names | Same split. Lower priority — this is the private agent doc and maps old→new as conceptual layers. | Low priority (informational). |
No code (JS/HTML/JSON/workflow) references any missing file — the stale citations are confined to Markdown docs.
---
## Bonus — Gitignore hygiene mismatch (not junk, but worth knowing)
`.gitignore` lists `CLAUDE.md` and `RULES.md` under **"Private / AI-agent files — keep off GitHub."** But both are **already tracked** (`git ls-files -i -c` reports them as ignored-yet-committed) and therefore **are published on GitHub**. `.gitignore` cannot untrack files that were committed before the ignore rule was added.
- If the intent is truly "keep off GitHub," the owner would need `git rm --cached CLAUDE.md RULES.md` (a deliberate tracked-file change — **out of scope for this read-only audit**).
- If they're intentionally published, the `.gitignore` comment is misleading and could be updated.
**Confidence:** definite mismatch; **the resolution is the owner's call** (deliberate `git rm --cached` vs. edit the comment).
---
## Safe-to-delete vs. ask-owner
**Safe to delete outright:** *(nothing)* — there is no untracked junk to sweep.
**Ask owner (all tracked / all a judgment call):**
1. `docs/REVIEW-living-os.md` — orphaned one-off review doc (~46 KB), referenced by nothing since v2.0.1.
2. `ARCHITECTURE.md` (+ `CLAUDE.md`) — update the stale `ui.js` / `database.js` / `registry.js` references to the current split filenames. *(Edit, not delete.)*
3. `CLAUDE.md` + `RULES.md` — decide whether they should really be `git rm --cached` (they're gitignored yet live on GitHub).
---
## Confirmation
**No files were changed, deleted, moved, staged, committed, or pushed.** The only write performed was creating this report at `planning/FILE_AUDIT.md`, which is gitignored (matched by both the `planning/` folder rule and the `*_AUDIT.md` pattern) and is therefore invisible to git. `git status` remains clean.
STAMP · generated for RELEASE v2.8.5 commit 06e5180 (06e51801b38a) · archive input-tree hash c07fbfbdd2e1ddeb · 754 files · no wall-clock timestamp (regenerates identically when nothing changed).