Add CLAUDE.md self-correction + investigate-where-pointed rules - #2
Open
VideoGameTips wants to merge 2 commits into
Open
Add CLAUDE.md self-correction + investigate-where-pointed rules#2VideoGameTips wants to merge 2 commits into
VideoGameTips wants to merge 2 commits into
Conversation
…istakes Two new work-habit rules: - When a bug report names a feature/area, grep that exact code path first instead of exploring the whole codebase. - After making the same mistake 3+ times, append it to the Hard-won gotchas section so it stops recurring. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
…orrect # Conflicts: # CLAUDE.md
VideoGameTips
added a commit
that referenced
this pull request
Aug 22, 2026
Removed 22 weapons that were stat twins of something else in the same role, keeping one of each family. ak20/ak30/an94/m4a1 were the clearest case: four assault rifles at 22-25 dmg and 130-150 ms, which is one gun with four names. How the families were chosen, because "similar" needs a definition: same slot and same role (AR / SMG / Shotgun / Sniper / MG / Launcher / sidearm variants), then complete-linkage clustering where EVERY pair in a family must be within 20% DPS, 25% damage, 25% fire rate and 60% magazine. Complete linkage matters — a first attempt with greedy chaining put minigun and solar_lance in the same family as ak20, which is obviously wrong. The keeper is the cheapest member, tie-broken by roster order, so the survivors are the familiar cheap ones. Gone (-> survivor): ak30, an94, m4a1 -> ak20 incendiary_shotgun -> sg8 thermal_lmg -> rpd royal_minigun -> minigun magnet_rifle -> freeze_gun lazy_laser -> painter_beam pulse_disc -> glassmaker phase_driver -> quantum_repeater rpg -> grenade_launcher coin_gun, traffic_cone, cream_pie -> snub_revolver phase_pistol, ion_revolver -> revolver emp_pistol, shuriken -> pistol pocket_rocket -> throwing_axes blowgun -> boomerang mini_uzi -> machine_pistol ppk -> m1911 Every reference was followed, not just the roster entry. WEAPONS and weaponModels stay index-aligned (gotcha #2) — the models array is rebuilt from the surviving order and now carries each entry's id as a trailing comment, so a future mismatch is visible instead of silent. WEAPON_COSTS, BUNDLES and WEAPON_DAMAGE cleaned on BOTH client and server (gotcha #4). Live code paths that would otherwise have handed out a weapon that no longer exists, all repointed at the survivor: a forcePlayerWeapon('cream_pie') event, 9 lobby bot loadouts, 8 "Best Loadouts" presets, and the SILENTAGENT unlock code on the server. Dead sound-profile branches for removed guns deleted; blowgun dropped out of DOUBLE_JUMP_IDS with it. Safe for existing accounts: purchases are plain ids in u.purchased, and across all 17 local accounts nobody owns anything on the drop list. A stale id there is ignored rather than fatal. Verified at runtime: 99 weapons / 99 models, aligned; every model non-empty and still carrying _flash; and zero dangling ids across bundles, presets and bot loadouts. The 12 weapons with no cost entry are the free admin guns — costless before this change too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two new work-habit rules added to
CLAUDE.md(no code/runtime changes):Why
The gotchas list is the project's accumulated debugging memory. These rules make investigation faster (start at the named area) and keep the gotchas list self-feeding (log recurring errors automatically).
Note for reviewer
This session's actual code fixes — the 3v3→6v6 matchmaking cap, wall-climbing movement, the bot wall-clipping fix, and the mobile fire+aim fix — were already committed and pushed directly to
main, so this PR contains only theCLAUDE.mddoc changes.🤖 Generated with Claude Code