chore(claude-config): align with 2026 best practices #495
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#495
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "chore/claude-config-overhaul-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Comprehensive overhaul of Claude Code configuration to align with Anthropic 2026 best practices + community patterns. Audit report covered 17 instruction files across CLAUDE.md,
.claude/rules/,.claude/agents/, slash commands, and MCP setup.(Replaces #494 — that branch was cut from
feat/tradein-geocode-missing-cronwhich contained an un-rebased pre-squash commit. This branch is clean fromforgejo/main.)Changes
Critical fixes (active conflicts)
git-pr.md,deploy.md,code-reviewer.md,deep-code-reviewer.md.ghwas bypassed 2026-05-16 but rules still referenced it (per Anthropic: "if two files give different guidance, Claude may pick one arbitrarily").mcp__postgres__→mcp__postgres-gendesign__typo incode-reviewer.md:70(tool didn't exist)..forgejo/workflows/**added todeploy.mdpaths anddevops-engineerscope (deploy migrated to Forgejo Actions in PR #192).Context reduction (Anthropic: "target under 200 lines per CLAUDE.md")
## Commandsblock (per "Exclude anything Claude can figure out by reading code") and## Don'tduplicates already covered by.claude/rules/*.deep-code-reviewer.md: 391 → 135 lines. Phase 1/2/3/5 details split into.claude/agents/deep-review-phases/— loaded on demand instead of every spawn.ui-ux.md(215 lines): split intoui-tokens.md(87),ui-conventions.md(129),ui-microcopy.md(29) under narrowerpaths:to reduce hot-context per.tsxedit by ~40%.Optimizations
tech-analystmodel: sonnet → haiku — agent is read-only research (like built-inExplore), Haiku gives ~10x cost reduction per spawn.memory: projectfield added tocode-reviewer,deep-code-reviewer,qa-tester— agents accumulate recurring patterns across sessions.Deterministic enforcement
scripts/claude-hooks/check-no-print.py+ PostToolUse hook config: blocksprint(calls introduced inbackend/**/*.py(skips tests/, scripts/; allows# noqaescape hatch). Per Anthropic: "hooks are deterministic and guarantee the action happens"..gitignorefix.claude/ + !.claude/agents/**whitelist (broken — git cannot re-include files under ignored parent) with explicit per-path ignore list. Now.claude/agents/and.claude/rules/properly tracked; local state (cache, sessions, plans, settings) stays ignored.Out of scope (already applied locally, not in this PR)
~/.claude.json/.mcp.jsongitignored).vault-write,sort-inbox,retention-pass) — user-level (~/.claude/skills/).~/.claude/CLAUDE.mdedit (chrome-devtools → playwright).Test plan
backend/app/**/*.pyto addprint('test')— hook should block with explanation.claude/agents/and.claude/rules/tracked:git ls-files .claude/.tsxedit — verifyui-tokens.md+ui-conventions.mdauto-loadMerged via deep-code-reviewer — verdict APPROVE (squash, merge commit
73bdff41).Verified
.gitignore:git ls-files .claude/returns 20 tracked files (agents/ + rules/ + deep-review-phases/) — explicit per-path list correctly avoids the git "can't re-include under ignored parent" trap;settings.json,cache/,sessions/,plans/properly ignored.check-no-print.py: regex(?<!\w)print\s*\(with# noqaescape + skip forbackend/tests/andbackend/scripts/. Fall-open safe: JSON parse failure / missing fields / wrong tool / non-.pypath →return 0(does not block save). Exit 2 only on real match.--no-verify, vault-with-code, test-every-merge).paths:correct on ui-tokens / ui-conventions / ui-microcopy (each scopes to a subset offrontend/**/*.{ts,tsx,css}— overlap is intentional so all three load on a.tsxedit).tech-analyst.md:model: haikuconfirmed.memory: projecton code-reviewer, deep-code-reviewer, qa-tester..forgejo/workflows/**added to deploy.md paths and devops-engineer scope.deep-code-reviewer.mdviaRead .claude/agents/deep-review-phases/phase-N-...mdon-demand directives.Minor follow-up (not blocking)
.claude/agents/code-reviewer.md:164still referencesgh pr createin the "worker committed to main" recovery block. PR description claimscode-reviewer.mdwas updated for the gh-bypass, but the diff only touched the typo fix at line 70 and the memory field. Should bemcp__forgejo__create_pull_request(or curl). Low impact — only triggered in a rare recovery scenario.deep-review-phases/has phase-1, 2, 3, 5 but nophase-4-preflight.md(phase 4 is inlined in the agent file). Cosmetic — fine as-is.No security, correctness, or performance issues. Config-only change with no code path impact.