Back to wall
brokk-sandbox/wanderer-3d
Filed · 6/23/2026
Case CASE-3F0EADA0 · Slop score
brokk-sandbox/wanderer-3dFiled
55/ 100
Partial score

Filed as a partial score from 4 of 5 assessed scorecard categories.

4 of 5 categories assessed

Maintainability risk
High
AI-slop confidence
Low
Evidence quality
Mixed

Maintainability risk is clearly elevated by one-file orchestration, repeated builders, residual monolithic backup code, and no automated tests, but the evidence points more strongly to rapid prototype evolution than to distinctive AI slop.

Plausible non-AI explanations

README.md explicitly describes the project as a lightweight procedural survival prototype and lists splitting `src/game/game.js` as future work.

The supporting modules `src/game/audio.js` and `src/game/terrain.js` show deliberate, compact manual structuring that competes with an AI-slop explanation.

Understandability

Measured cyclomatic hotspots in src/game/game.js:init (71) and src/game/game.js:animate (58) drive the score. A direct cognitive-complexity pass across src/game/game.js, src/game/audio.js, and src/game/terrain.js found no function above 15, so the risk is concentrated responsibility and branch volume rather than deep nesting alone.

7/10
Duplication & Abstraction

Measured clone evidence was confirmed in src/game/game.js:spawnTree / src/game/game.js:spawnRock / src/game/game.js:spawnShrub and in src/game/game.js:buildDoorwayMesh versus src/game/game.js:createDoorwayGhost. index.original.html also remains as a historical monolith in the active tree, raising duplication and navigation cost.

7/10
Failure Handling

Sampled exception-handling review found 0 smell findings above threshold in src/game/game.js, src/game/audio.js, src/game/terrain.js, src/game/data/config.js, and src/main.js. The main caution is that src/game/game.js:loadGame performs JSON.parse on persisted state and falls back to alert() rather than structured recovery, so resilience is basic rather than systematically hazardous in the inspected sample.

3/10
Test Signal

Not assessed: package.json contains no test script or test-framework dependency, and no automated test files were identified. docs/usernotes/playtest-notes.md shows manual playtesting, which is useful operational context but not assertion-level evidence.

Not assessed
Comment Intent

Sampled source review found low-signal comments in src/game/game.js, especially around the Boar constructor and section dividers that narrate obvious steps instead of design intent. The comments reviewed were largely accurate, so the issue is noise more than contradiction.

5/10
Signed · Lt. Case7 specialists concur
Specialist reports
  • Cognitive Complexity Specialist

    Det. Knots

    ·
    #2199
    The game initialization logic interweaves custom GLSL skydome shaders, grass instancing modifiers, input binds, and world generation, resulting in a high cognitive overhead and a cyclomatic complexity of 71.
    • The game animation tick handles animal AI, input logic, physics, raycast collision, target UI updates, and building snap targets in one dense function, exhibiting a cyclomatic complexity of 58.

    • Reviewed scope included src/game/game.js

    • Reviewed scope included src/game/audio.js

  • Size & Sprawl Specialist

    Det. Sprawl

    ·
    #2204
    Monolithic structural design in src/game/game.js, consolidating entity classes, WebGL setups, UI managers, and global state in 2082 lines of code.
    • Extreme cyclomatic complexity of 71 in the initialization routine init() spanning 356 lines.

    • High cyclomatic complexity of 58 in the animate() frame step, mixing vector maths, terrain lookups, actor systems, and physical collision algorithms.

    • Reviewed scope included src/game/game.js

  • Structural Duplication Specialist

    Det. Echo

    ·
    #3312
    The functions spawnRock, spawnShrub, and spawnTree replicate near-identical spawning, coordinate selection, and scaling boilerplates.
    • Parallel constructions between physical model groups and ghost counterparts mirror identical coordinate translations and geometry constants.

    • Reviewed scope included src/game/game.js

    • Reviewed scope included src/game/audio.js

  • Error Handling Specialist

    Det. Fallback

    Scoped check
    ·
    #4049
    Det. Fallback found no issue in the sampled scope.
    • Inspected scope included src/game/game.js

    • Inspected scope included src/game/audio.js

    • Inspected scope included src/game/terrain.js

    • Inspected scope included src/game/data/config.js

  • Dead Code & Abstraction Specialist

    Det. Morgue

    ·
    #3031
    One-call helper functions like createAudioPlayer and createSpawnConfig are only consumed once across the codebase.
    • The index.original.html file is an archived monolithic backup of the original single-file implementation left in the active working tree.

    • Reviewed scope included src/game/audio.js

    • Reviewed scope included src/game/terrain.js

  • Test Signal Specialist

    Det. Alibi

    Scoped check
    ·
    #5172
    Det. Alibi found no issue in the sampled scope.
    • Inspected scope included package.json

    • Inspected scope included src/game/game.js

    • Inspected scope included src/game/audio.js

    • Inspected scope included src/game/terrain.js

  • Comment Intent Specialist

    Det. Margins

    ·
    #4417
    The primary game orchestration file contains high-density, low-signal procedural comments that describe implementation lines rather than high-level rationale.
    • Reviewed scope included src/game/game.js

    • Reviewed scope included src/game/audio.js

    • Reviewed scope included src/game/terrain.js

Full report

Executive Summary

The repository appears to be a small browser game prototype, but its main gameplay file has already accumulated enough concentrated logic to create a high maintainability burden. The dominant risks are one-file orchestration in src/game/game.js, repeated geometry and spawn builders, an archived monolith left in the active tree, and the absence of automated tests. The auditor's closing position is: High maintainability risk, low AI-slop confidence.

Background

The application appears to be a Three.js-based browser survival prototype bundled with Vite and deployed to GitHub Pages. README.md explicitly describes it as a "lightweight procedural survival prototype" and even lists splitting src/game/game.js as a future milestone, which materially strengthens the non-AI explanation for the current structure. The scoped audit covered the primary runtime entry, core game modules, manifest, deployment workflow, and manual playtest notes.

Methodology

Maintainability signals were investigated via static analysis and targeted source review. The engagement lead used specialist outputs for cyclomatic and cognitive complexity, structural duplication, dead abstraction checks, error-handling smells, test-signal review, and comment-intent review; candidate findings were filtered by agent-led triage and then validated against named paths and symbols. Confidence is mixed rather than uniform: measured branch and clone metrics were available for src/game/game.js, but the Java-oriented comment-density tooling did not apply to this JavaScript codebase, the exception-handling lane returned only a sampled non-finding, and the repository contains no automated tests from which assertion quality could be judged. Dynamic runtime behavior, browser profiling, and full-file body review outside the hotspot cluster were out of scope.

Findings

The evidence points to a localized but serious maintenance hotspot rather than uniform disorder across every file. src/game/game.js dominates the risk picture: indexed summaries place it at 2,081 lines, measured cyclomatic hotspots put init at 71 and animate at 58, and direct symbol review shows rendering bootstrap, shader definition, spawn management, UI mutation, combat input, save/load, and placement logic sharing one mutable state surface. A direct cognitive-complexity pass did not flag functions above 15, which suggests the pain comes more from breadth and coupling than from deeply nested logic.

The second hotspot is repeated construction logic. spawnTree, spawnRock, and spawnShrub repeat similar spawn-selection and scene-registration patterns; buildDoorwayMesh mirrors createDoorwayGhost, and buildDoorMesh mirrors createDoorGhost with parameter changes rather than a shared builder. loadGame extends the same pattern through a long type-dispatch reconstruction chain. These are maintenance risks because new geometry, placement, or persistence rules must be updated in multiple places.

The third risk is weak change-safety. package.json contains only dev, build, preview, and dev:vm scripts, with no test runner dependency or test script. docs/usernotes/playtest-notes.md shows manual playtesting in place of automated checks. In the same hotspot file, loadGame performs JSON.parse on persisted state without structured validation or recovery, and index.original.html remains in the root as a 2,406-line historical monolith that can confuse search and refactoring work.

File list with notes
src/game/game.js
Cyclomatic 71 · Measured

Measured hotspots are concentrated in `init` (71) and `animate` (58). The same file also holds save/load, DOM updates, world spawning, entity definitions, placement logic, and inline shader text, so the maintenance burden is driven by breadth and shared mutable state rather than one isolated algorithm.

index.original.html
LOC 2406 · Measured

A historical single-file implementation remains in the active repository root. The file appears to duplicate the modularized game logic and raises search, navigation, and accidental-edit noise during maintenance.

package.json

The manifest exposes development and build scripts only. No `test` script and no test-framework dependency were present in the inspected manifest, which leaves regression detection dependent on manual browser playtests.

Low-signal comments add a smaller but real readability tax. In src/game/game.js, the Boar constructor uses literal labels such as Body, Head, and Tusks over straightforward mesh creation, and many section dividers label obvious phases without explaining design constraints. The comments are mostly accurate, so this is a readability issue rather than a misleading-documentation issue.

Validated Non-Findings

Several checks did not produce material issues within the inspected sample. A direct cognitive-complexity pass across src/game/game.js, src/game/audio.js, and src/game/terrain.js found no function above the threshold of 15, which tempers the control-flow reading: the hotspot is broad and stateful, but not heavily nested everywhere.

The sampled support modules also held up well. src/game/audio.js:createAudioPlayer stayed compact, and src/game/terrain.js remained small and cohesive around hash, noise, fbm, and getElevation. The dead-abstraction lane also reviewed one-call helpers such as createAudioPlayer and createSpawnConfig; those looked like acceptable modular wrappers rather than harmful dead code.

The error-handling specialist found no exception-handling smells above threshold in the sampled set src/game/game.js, src/game/audio.js, src/game/terrain.js, src/game/data/config.js, and src/main.js. That result is scope-limited because that lane relied on hotspot orientation and did not establish a repository-wide body review. A targeted search also found no TODO, FIXME, HACK, or deprecated markers in sampled src/game/**/*.js.

Recommendations

The remediation plan should stay behavior-preserving and focus first on the concentrated hotspot rather than on wholesale rewriting.

  • Finding 1 — Split src/game/game.js by runtime role: extract renderer/bootstrap, input handling, UI rendering, entity classes, placement/building, and save/load into separate modules with narrow exports.
  • Finding 1 — Add characterization tests before large extractions, starting with deterministic logic in src/game/terrain.js, inventory/crafting state changes, and save/load round-trips around src/game/game.js:loadGame.
  • Finding 1 — Add a JavaScript lint or CI budget for branchiness and size, such as review gates for cyclomatic complexity above 20 or large-file exceptions above an agreed LOC threshold. The policy should document expected false positives for dispatcher-style code.
  • Finding 2 — Replace clone bundles in src/game/game.js with data-driven builders: one spawn factory for spawnTree / spawnRock / spawnShrub, and shared constructors for ghost versus solid door and doorway meshes.
  • Finding 2 — Remove index.original.html from the active root once parity is confirmed, or clearly annotate and exclude it from everyday search and lint targets if temporary retention is required.
  • Finding 3 — Add a test runner to package.json and begin with deterministic unit tests plus persisted-state schema validation; the current manual playtest notes in docs/usernotes/playtest-notes.md are useful operational notes but not a regression harness.
  • Finding 4 — Reduce comment noise in src/game/game.js by deleting literal object-part labels and keeping only comments that explain non-obvious geometry, state constraints, or save/load invariants.

Conclusion

The repository shows evidence of real engineering effort: src/game/audio.js and src/game/terrain.js are restrained, purposeful modules, and several suspicious one-call abstractions proved harmless on review. Even so, the engagement closes with high maintainability risk because the main runtime file concentrates too many responsibilities, contains measured branch-heavy hotspots, duplicates builder logic, leaves a historical monolith in the active tree, and lacks automated test protection. The auditor's closing synthesis is: High maintainability risk, low AI-slop confidence.

Specialist lane summary
Cognitive Complexity Specialist
code-quality-cognitive-complexity
clean
  • The game initialization logic interweaves custom GLSL skydome shaders, grass instancing modifiers, input binds, and world generation, resulting in a high cognitive overhead and a cyclomatic complexity of 71.
  • The game animation tick handles animal AI, input logic, physics, raycast collision, target UI updates, and building snap targets in one dense function, exhibiting a cyclomatic complexity of 58.
Limits: The code analysis was constrained by the absence of test assets and automated assessment frameworks.
Size & Sprawl Specialist
code-quality-size-sprawl
clean
  • Monolithic structural design in src/game/game.js, consolidating entity classes, WebGL setups, UI managers, and global state in 2082 lines of code.
  • Extreme cyclomatic complexity of 71 in the initialization routine init() spanning 356 lines.
  • High cyclomatic complexity of 58 in the animate() frame step, mixing vector maths, terrain lookups, actor systems, and physical collision algorithms.
Limits: The analysis was bounded to architectural size and sprawl checks in JavaScript game files. Dynamic browser execution profiles, memory leaks, and WebGL context limits were not inspected.
Structural Duplication Specialist
code-quality-structural-duplication
clean
  • The functions spawnRock, spawnShrub, and spawnTree replicate near-identical spawning, coordinate selection, and scaling boilerplates.
  • Parallel constructions between physical model groups and ghost counterparts mirror identical coordinate translations and geometry constants.
Limits: The analysis stayed within the prioritized src/game hotspot cluster because the step budget restricted broader horizontal directory traversal.
Error Handling Specialist
code-quality-error-handling
clean

Findings:

Evidence reviewed:

Limits: get_summaries degraded to compact symbols for the requested hotspot cluster, so this lane did not source-review method bodies.; The exception-handling scanner returned no findings above minScore 4, so conclusions remain scoped to the sampled files and cannot be generalized to the rest of the repository.
Dead Code & Abstraction Specialist
code-quality-dead-code
clean
  • One-call helper functions like createAudioPlayer and createSpawnConfig are only consumed once across the codebase.
  • The index.original.html file is an archived monolithic backup of the original single-file implementation left in the active working tree.
Limits: The step budget limited further deep-dive validation of all 104 candidate symbols.
Test Signal Specialist
code-quality-test-signal
clean

Findings:

  • No automated test files or frameworks exist in the repository.

Evidence reviewed:

Limits: All exploration confirmed zero automated tests exist, meaning the auditor cannot assess detailed assertion-level slop smells.
Comment Intent Specialist
code-quality-comment-intent
clean
  • The primary game orchestration file contains high-density, low-signal procedural comments that describe implementation lines rather than high-level rationale.
Limits: Step budget limited deep review of Git history context. The analysis is bounded strictly to file-level gameplay comments in the core directory.
Share the case
Post to X
Print report

Public filing · brokk-sandbox/wanderer-3d