Clear ownership for code, assets, references and generated output
Implementation authorized October 14, including deletion of video references and removal from Git history. Preserve gameplay, existing public URLs, attribution, offline behavior and the current deployment process. Migrate one category per reviewed commit; avoid mixing folder moves with simulation or visual changes. The existing refactoring document covers object ownership; this plan covers repository structure and asset lifecycles.
src/simulation, src/rendering, src/audio, src/ui and src/app. Keep these rather than introducing an engine framework.src/game mixes configuration and gameplay helpers. Multiplayer server code imports shared simulation from src, so the browser/server dependency boundary is less obvious than its actual responsibilities.public contains shipped audio, fonts and icons, while docs/assets, docs/models and docs/references contain a mixture of inputs, models, film references and supporting documentation. Some documentation assets are actual runtime dependencies.dist and test-results are ignored; other generated/intermediate assets need an explicit ownership map.| Location | Responsibility |
|---|---|
src/app/ | Browser startup, scene selection, lifecycle and input orchestration |
src/simulation/, src/game/, src/levels/ | Keep current layout initially; mark browser-free modules, then consider moving genuinely shared rules/configuration together into shared/simulation/ |
src/rendering/, src/audio/, src/ui/ | Presentation only; no server or provider dependencies |
src/mcp/, src/multiplayer/ | Browser feature adapters and transport clients |
shared/ | Wire contracts, validation and headless authority; document allowed imports |
server/, workers/ | Local Node adapters and production Cloudflare adapters |
public/assets/{audio,models,fonts,images}/ | Shipped URL-addressable assets; adopt only with URL compatibility and cache migration |
assets/source/{models,audio,fonts,images}/ | Editable upstream inputs, conversion metadata and licenses; not copied into production by default |
references/{film,design}/ | Visual/sound study material, clearly separate from shipped assets; local-only heavyweight material remains outside normal deployment |
tools/{assets,validation,build}/ | Conversion, inspection and build tools; retain script wrappers while commands migrate |
tests/{unit,browser,fixtures}/ | Fast invariants, real-browser lifecycle checks and reproducible fixtures |
docs/ | Authored plans, source/license catalogs and validation reports, plus the current colvmn generated outputs |
dist/, test-results/, .local/ | Ignored reproducible output and local state |
Do not move docs/colvmn: it is an upstream submodule. Keep root Vite entry points until preview-route compatibility is explicitly tested. Leave encrypted credentials and ignored secret handling in place during structural work; never copy secrets into an asset inventory or public documentation.
Create one machine-readable manifest with a stable asset ID, category, source path, runtime URL, author, source URL, license/use constraints, credit ID, transformations, conversion command, output hash and deployment policy. Distinguish original source, approved runtime derivative, reference-only material and retired asset. Film-derived content must retain its actual provenance rather than being labeled open source.
Generate inventory/credit reports from the manifest only after reconciling it with current credits. An unused import search is not proof an asset is unused: inspect runtime fetches, CSS URLs, HTML, Worker requests, preview tools, PWA precache and IndexedDB keys. Keep original model backups until the user explicitly approves removing them.
npm run build output size and the precache inventory. Acceptance: every shipped asset has a source and credit record; unresolved provenance stays visible./fun/TRON/, warm/offline loading works, and previously cached clients recover without losing unrelated data.For each stage, record moved paths, compatibility aliases, commands, browser/hardware, screenshots where relevant and remaining defects in the implementation plan. Deploy separately from unrelated behavior changes. Do not assume a successful build proves audio, camera feel, rendering or multiplayer latency are unchanged.
Start with the asset manifest and directory READMEs, without moving any runtime files. This gives us a trustworthy map and catches accidentally shipped source/reference material before a broader rename. Keep generated documentation beside Markdown for now because colvmn and the documentation copy scripts already depend on that arrangement.
Stages 1–6 are implemented. Tests now live in tests/unit and tests/browser; tools live in tools/assets, tools/build and tools/validation. Previous CLI paths forward to the new modules. The authority imports its browser-free simulation/configuration from shared/simulation; existing source paths remain forwarding modules.
Runtime imports live in assets/runtime, outside Vite public, to preserve content-hashed output filenames. Static URLs use public/assets. Original model inputs live in assets/source, and still-image references in references. All 100 existing user reference renames matched identical content before relocation. Untracked source collections remain untracked and are excluded from the committed catalog.
assets/catalog.json records provenance, hashes, conversion tools and unresolved attribution. assets/path-map.json retains old asset URLs through development middleware, production aliases and service-worker alias resolution. Production copies only authored/generated documentation and explicitly linked media, rather than recursively shipping source collections. The POV-Ray model license remains included.
At the user's request, all 16 local reference videos were deleted, video extensions are ignored case-insensitively, and video paths were removed from Git history. Extraction scripts retain expected ignored input paths for externally supplied footage; those inputs are no longer bundled. Existing audio derivatives remain unchanged. Hosted caches/LFS retention is outside the rewritten branch history.
Validation on macOS/headless Chromium: 531 unit checks, Worker dry run, PWA offline/range/update checks, two-client multiplayer under delivery jitter, and /fun/TRON/ production-path smoke checks passed. Initial production output was 1,805,603,712 bytes; the reorganized build is approximately 289 MiB, with approximately 89.7 MiB precached. Final release validation is recorded in the implementation plan. Automated checks do not establish subjective driving or sound quality.
Stage 7 remains deferred: retain compatibility paths for this release until deployed cached clients and links have been reviewed. Never restore a pre-purge commit as a rollback: it would reintroduce video history. Use the rewritten history or revert code changes on the cleaned branch.