Skip to content

Audit docs and comments: fix inaccuracies, stale comments, readability - #51

Merged
PureXYZ merged 1 commit into
mainfrom
claude/reverent-sutherland-348bf6
Jun 15, 2026
Merged

PureXYZ merged 1 commit into
mainfrom
claude/reverent-sutherland-348bf6

Conversation

@PureXYZ

@PureXYZ PureXYZ commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

A multi-agent audit cross-checked every documentation file and code comment against the actual source, then adversarially re-verified each finding (which correctly discarded 3 false positives). This applies the 24 confirmed fixes. Everything here is documentation/comment-only — no behavior change, and npm run typecheck passes.

Factual corrections (docs)

  • docs/RESEARCH.md — freezetime is no longer claimed as .env-configurable (only ROUND_SECONDS/BOMB_SECONDS are exposed); the prompt-caching note now matches the code — caching is enabled via cache_control: ephemeral, ~1024-token minimum, not the stated 4096.
  • README.md — npm run deploy now correctly states the host pulls GitHub main (push first) rather than "pushes"; VPS cost reads ~$6/mo to match HOSTING.md.

Stale / wrong code comments

  • admin-commands.ts — removed the stale "set/remove land in a later pass" (both are shipped and wired up); /coachadmin links → link list.
  • normalize.ts — dropped the dead multilingual_v2 reference (the app runs Flash v2.5 / Aura-2).
  • memory.ts — early-death window ~10s → ~20s (matches EARLY_DEATH_WINDOW_MS).
  • roster.ts — FRESH_READ_MS comment now names its real consumers (it does not feed deriveLastMan).
  • types.ts — disambiguated the bomb name collision with the modeled round.bomb.
  • breaks.ts — "4+ straight losses" → loss-bonus level (GSI's counter decays on a win).
  • bench-llm.ts — moved the "current" label onto the effort=low config the coach actually ships.
  • cache.ts — fixed the idle.ts:44→:41 cross-reference and the misleading "LRU" label (eviction is least-recently-written).
  • llm.ts — relocated two JSDoc blocks to sit directly above the functions they document (chooseRibTarget, squadBreakClause).

Readability

  • README.md — split the dense ELEVENLABS_VOICES, COACH_VOLUME, and retake/save bullets into scannable sub-lists.
  • docs/HOSTING.md / .env.example / Dockerfile — broke up the Caddy, ffmpeg, and COACH_VOLUME run-on sentences.

Completeness

  • .env.example — added an "Advanced tuning" section documenting the 9 env vars config.ts reads but the file previously omitted (GSI_LASTMAN_FRESH_MS, GSI_LOG_RETENTION_DAYS, ROUND_SECONDS, BOMB_SECONDS, the LLM token/timeout caps, COACH_DEBUG, COACH_LOG_DECISIONS).

Verification

  • npm run typecheck — passes.
  • Changes are comment/markdown only; no runtime code paths touched.

🤖 Generated with Claude Code

A multi-agent audit cross-checked every doc and code comment against the
actual source. Documentation/comment-only — no behavior change; typecheck
passes.

Factual corrections:
- RESEARCH.md: freezetime is not .env-configurable (only ROUND_SECONDS/
  BOMB_SECONDS are); prompt caching IS enabled (~1024-token min, not 4096).
- README.md: `npm run deploy` makes the host pull GitHub main (push first),
  not "push"; VPS cost ~$6/mo to match HOSTING.md.

Stale/wrong code comments:
- admin-commands.ts: drop "set/remove land in a later pass" (both shipped);
  `links` -> `link list`.
- normalize.ts: remove dead multilingual_v2 reference (runs Flash v2.5/Aura-2).
- memory.ts: early-death window ~10s -> ~20s.
- roster.ts: FRESH_READ_MS comment named the wrong consumer.
- types.ts: disambiguate the `bomb` name collision with round.bomb.
- breaks.ts: "4+ straight losses" -> loss-bonus level (decaying counter).
- bench-llm.ts: move the "current" label to the effort=low config.
- cache.ts: fix idle.ts:44 -> :41 cross-ref and the misleading "LRU" label.
- llm.ts: relocate two JSDoc blocks above the functions they document.

Readability:
- README.md: split the dense ELEVENLABS_VOICES, COACH_VOLUME, and retake/save
  bullets into scannable sub-lists.
- HOSTING.md / .env.example / Dockerfile: break up the Caddy, ffmpeg, and
  COACH_VOLUME run-on sentences.

Completeness:
- .env.example: document the 9 advanced env vars config.ts reads but the file
  omitted (GSI_LASTMAN_FRESH_MS, GSI_LOG_RETENTION_DAYS, ROUND/BOMB_SECONDS,
  the LLM token/timeout caps, COACH_DEBUG, COACH_LOG_DECISIONS).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PureXYZ
PureXYZ merged commit b49f6b8 into main Jun 15, 2026
1 check passed
@PureXYZ
PureXYZ deleted the claude/reverent-sutherland-348bf6 branch June 15, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant