chore: optimize CLAUDE.md and add agent config#447
Open
MarioCadenas wants to merge 1 commit into
Open
Conversation
Trim CLAUDE.md from 421 to 125 lines, keeping only non-obvious, high-signal guidance per Claude Code best practices: - fix stale generate-schema-types.ts reference (now generate-json-schema.ts) - correct the pnpm build description (also syncs template + gens doc banners) - drop command/release-pipeline duplication that lives in package.json/workflows Add a permission allowlist for safe project commands (build/test/check/ typecheck/docs, read-only git) to reduce approval prompts. Add a PostToolUse Biome hook (.claude/hooks/biome-format.sh) that runs `biome check --write` on each edited file, making formatting deterministic instead of advisory. Gitignore .claude/worktrees/ so knip and git skip the worktree-setup nested checkouts. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.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
Optimizes
CLAUDE.mdand adds repo-level Claude Code config, following the Claude Code best practices guidance thatCLAUDE.mdis loaded every session and should hold only high-signal, non-obvious content.Changes
CLAUDE.md— 421 → 125 lines (~58% smaller)generate-schema-types.ts→generate-json-schema.ts(the old name no longer exists).pnpm builddescription — it also runssync:template+ doc-banner generation.tools/enumeration with a pointer topackage.json/tools/so it can't drift again.package.json/.github/workflows/).docsCLI "run the index first" rule, the analytics.sqlvs.obo.sqlexecution-context convention, interceptor order,--filterdependency commands, DCO + conventional commits, and the "after making changes" workflow.Permission allowlist (
.claude/settings.json)pnpm build/test/check/lint/format/typecheck/docs:build,pnpm exec biome/tsc,npx appkit, read-onlygit) to cut approval prompts.Verification hook (
.claude/hooks/biome-format.sh)PostToolUsehook (Edit/Write/MultiEdit) runsbiome check --writeon the single edited file, making formatting deterministic rather than advisory. Non-blocking; respectsbiome.jsonignores. Fulltypecheckstays manual (too slow to run per-edit across the monorepo)..gitignore.claude/worktrees/sogitandpnpm knipskip the worktree-setup nested checkouts.Test plan
pnpm knipandlint-staged(Biome) pass in the pre-commit hook.settings.jsonvalidated as well-formed JSON.PostToolUsepayload, gates by extension (skips.mdand non-Biome files), exits cleanly.