.claude/skills/review-memory/SKILL.md
Audit CLAUDE.md and .claude/rules/ for stale references, outdated architecture claims, and rules now redundant with static analysis checks
npx skillsauth add cwilliams5/Alt-Tabby review-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enter planning mode. Audit the project's persistent AI context files for factual accuracy against the current codebase. The goal is to find landmines — stale knowledge that would actively mislead a future session.
These files are terse by design. Every line costs context tokens every session. Brevity was hard-won. This skill does NOT:
This skill ONLY checks: is what's written here still true?
CLAUDE.md — main project instructions.claude/rules/*.md — domain-specific knowledge filesCLAUDE.md that indexes the rules filesFor every concrete identifier referenced in these files, verify it exists in the current codebase.
src/gui/gui_data.ahk, src/shared/config_registry.ahk, etc. Do they exist at those paths?WL_UpsertWindow(), Blacklist_IsWindowEligible(), _WS_GetOpt(), etc. Do they exist? Use query_function_visibility.ps1.gGUI_DisplayItems, StorePipeName, etc. Do they exist? Use query_global_ownership.ps1.query_config.ps1.check_globals.ps1, query_global_ownership.ps1, shader_bundle.ps1, etc. Do they exist at the referenced location?check_critical_leaks). Do they exist as standalone scripts or sub-checks in batch bundles?--gui-only, --pump, --config, etc. Are they still handled in the entry point?IPC_MSG_* referenced. Do they exist?The rules files make factual claims about how the system works. Verify the significant ones against actual code.
architecture.md match alt_tabby.ahk's mode routing? Are all modes listed? Any new ones missing?gui_effects.ahk / gui_paint.ahk?config_registry.ahk actually works? Are the registry entry fields (s, k, g, t, default, d, min, max, fmt) still accurate?keyboard-hooks.md still present in the code?Don't verify every claim — focus on structural claims that, if wrong, would lead an AI to make incorrect architectural decisions.
Rules that are now mechanically enforced by static analysis checks are the best candidates for removal — the check does the job better and costs zero context.
For each rule in CLAUDE.md and the rules files that describes a coding pattern to follow or avoid:
check_*.ps1 (or sub-check in a batch bundle) enforces this mechanicallyThe rule should still exist if it explains why (the AI needs to understand the principle to write correct code). But if the rule is purely "do X, don't do Y" with no judgment component, and a check enforces it, the rule can likely go.
Examples of what this catches:
check_globals in check_batch_functions.ps1 catches this, the rule is redundant as enforcement (though the explanation of AHK v2 scoping may still be needed)_Private() functions cross-file" — if query_function_visibility.ps1 -Check enforces this, the rule is redundantCLAUDE.md has a table mapping .claude/rules/ files to their contents:
| File | Contents |
|------|----------|
| `ahk-patterns.md` | AHK v2 syntax, race conditions, ... |
Verify:
.md file in .claude/rules/ is listed in the tableReport the line count of each file:
| File | Lines |
|------|-------|
| CLAUDE.md | N |
| .claude/rules/ahk-patterns.md | N |
| ... | ... |
No threshold — just surface the numbers so the human can spot gradual bloat. Flag any file over 150 lines as worth a glance, since these load every session.
Run in parallel by file — each rules file is independent:
CLAUDE.md (identifiers, architecture claims, rules index table)ahk-patterns.md + keyboard-hooks.md (identifiers, patterns vs checks)architecture.md + komorebi.md (architecture claims, producer list, state machine)testing.md + debugging.md + workflow.md + installation.md (identifiers, tool references)After agents report, do Phase 3 (redundancy check) yourself — it requires cross-referencing rules against check scripts.
Objectively wrong — identifiers, paths, names.
| File | Reference | Type | Status | Details |
|------|-----------|------|--------|---------|
| architecture.md | src/gui/gui_store.ahk | File path | Renamed | Now src/gui/gui_data.ahk |
| CLAUDE.md | _WS_GetOpt() | Function | Broken | Function no longer exists |
| ahk-patterns.md | check_globals.ps1 | Script | Moved | Now a sub-check in check_batch_functions.ps1 |
Claims that contradict or lag behind the current code.
| File | Claim | Reality | Impact |
|------|-------|---------|--------|
| architecture.md | Compositor has 7 layers | Code shows 9 layers | AI will miss layers when reasoning about paint order |
| architecture.md | "EnrichmentPump" section missing stats flush | Stats flush now runs in pump | AI may put stats work in MainProcess |
Rules now enforced by static analysis. Human decides whether the explanation is still worth the context cost.
| File | Rule | Enforced by | Recommendation |
|------|------|-------------|----------------|
| CLAUDE.md | Global declaration requirement | check_globals in check_batch_functions.ps1 | Keep explanation of why, remove the "must do" directive |
| ahk-patterns.md | No cross-file _Func() calls | query_function_visibility.ps1 -Check | Rule is pure enforcement — check handles it |
| File | Lines | Note |
|------|-------|------|
| CLAUDE.md | N | |
| .claude/rules/ahk-patterns.md | N | |
| ... | ... | |
Any mismatch between the rules index in CLAUDE.md and the actual .claude/rules/ directory.
Order all tables by impact: broken references that cause wrong decisions first, cosmetic issues last.
Ignore any existing plans — create a fresh one.
tools
Create a new git worktree and switch the session into it
tools
Spawn agent to trace code flow via query tools — answer only, no context cost
tools
Commit, push, and create a PR for the current branch
tools
Retire a shader by moving its files to legacy/shaders_retired