Skip to content

Trim repo-derivable content from CLAUDE.md - #384

Merged
folbricht merged 1 commit into
masterfrom
trim-derivable-claude-md
Aug 5, 2026
Merged

Trim repo-derivable content from CLAUDE.md#384
folbricht merged 1 commit into
masterfrom
trim-derivable-claude-md

Conversation

@folbricht

Copy link
Copy Markdown
Owner

CLAUDE.md is loaded into context at the start of every session, so anything a session can reconstruct by reading the repo is dead weight it pays for each time. This drops the parts that qualify, taking the file from 5627 to 1117 characters.

Removed:

  • Project overview — a paraphrase of README.md and doc.go.
  • Build and Test Commands — the standard go build/test/install/fmt/mod tidy invocations. go fmt, go build and go mod tidy are already enforced mechanically by .pre-commit-config.yaml, and the CI line restates .github/workflows/validate.yaml. The one non-standard rule here, building into cmd/desync/, survives under Code Style where it is stated with its rationale.
  • Architecture — interface signatures copied from store.go, the store implementation and seed file listings, the data pipeline tour, the CLI command list, and the config/env-var inventory.
  • Three generic Key Patterns bullets — interface-driven composition, lazy evaluation, context-based cancellation: descriptions of what the code already shows.
  • Module — the module path from go.mod, which had also gone stale: it claimed Go 1.24.0 while go.mod says 1.25.0. Derivable content goes out of date silently, which is the second reason to drop it.

Kept — the content the code cannot teach on its own:

No code changes.

CLAUDE.md is loaded into context at the start of every session, so
anything a session can reconstruct by reading the repo is dead weight it
pays for each time. Remove the parts that qualify:

- Project overview: a paraphrase of README.md and doc.go.
- Build and Test Commands: the standard go build/test/install/fmt/mod
  invocations. go fmt, go build and go mod tidy are already enforced by
  .pre-commit-config.yaml, and the CI line restates validate.yaml. The
  non-standard build rule survives under Code Style, where it has its
  rationale.
- Architecture: interface signatures copied from store.go, the store
  implementation and seed file listings, the data pipeline tour, the CLI
  command list, and the config/env-var inventory.
- Three generic Key Patterns bullets describing what the code already
  shows.
- The Module section, which was also stale: it claimed Go 1.24.0 while
  go.mod says 1.25.0. Derivable content goes out of date silently, which
  is the second reason to drop it.

What remains is the content the code cannot teach on its own: the
t.Fatal() and recompression gotchas with their PR references, and the
testify and build-output conventions that differ from the Go defaults.

This takes the file from 5627 to 1117 characters.
@folbricht
folbricht merged commit a4bc552 into master Aug 5, 2026
3 checks passed
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