Skip to content

chore(docs): slim CLAUDE.md from 60KB to 16KB#20

Merged
InstaZDLL merged 1 commit into
mainfrom
chore/slim-claude-md
May 15, 2026
Merged

chore(docs): slim CLAUDE.md from 60KB to 16KB#20
InstaZDLL merged 1 commit into
mainfrom
chore/slim-claude-md

Conversation

@InstaZDLL
Copy link
Copy Markdown
Owner

@InstaZDLL InstaZDLL commented May 15, 2026

Summary

Each `bun run claude` session was burning ~17k tokens just loading CLAUDE.md and triggering the `CLAUDE.md too large (53k tokens, should be < 40k)` warning. This PR cuts the file to ~14k tokens.

The trim is purely structural — every load-bearing rule (the "if you ignore this you break the codebase" stuff) is preserved or rephrased more tightly. The detailed feature notes were already duplicated in `docs/features/*.md`; CLAUDE.md now points there instead of carrying its own copy.

Three sections kept verbatim or tightened:

  • Cross-cutting rules — the contract every conversation needs:

    • Tauri command naming (camelCase ↔ snake_case)
    • `require_profile_pool` discipline
    • Migration immutability (SHA-384 checksum crashes existing installs)
    • Audio callback alloc-free contract
    • Multi-artist GROUP_CONCAT join pattern
    • Album grouping on `(canonical_title, album_artist_id)` with sticky compilation flag
    • Single-writer SQLite + transactional scan
    • Windows file-write safety dance (pause-playback + re-hash)
    • Modal a11y via `useModalA11y`
    • Right-panel flex-sibling layout
    • Offline-mode HTTP gate
    • Player-bar overflow-first rule
  • Feature catalogue — one-liner per feature with pointer to the deeper `docs/features/*.md`

  • Conventions — trimmed but kept the release-please triple-manifest rule, lowercase commit subject (commitlint), and 17-locale key propagation

Test plan

  • `bun run claude` — no longer prints the "CLAUDE.md too large" warning
  • Open a new Claude Code session, ask about migration safety / audio callback rules / album grouping — answers match prior behaviour (rules still loaded)
  • Spot-check the doc pointers: each `docs/features/*.md#anchor` link resolves

Summary by CodeRabbit

  • Documentation
    • Refreshed development guidance documentation with improved project overview and reorganized architecture sections for clarity
    • Consolidated architecture details into comprehensive reference covering frontend and backend organization
    • Updated conventions documentation to reflect current release and contribution workflows
    • Enhanced language and localization guidance documentation

Review Change Stack

Each 'auto-load' of CLAUDE.md was burning ~17k tokens and triggering
Claude Code's 'CLAUDE.md too large' warning. Replaces the long
feature-by-feature bullet wall with three tighter sections:

- Cross-cutting rules (the ones that bite if ignored): Tauri command
  convention, profile-scoped pool, persistence pattern, events, audio
  callback alloc-free contract, migration immutability, multi-artist
  GROUP_CONCAT, single-writer SQLite, Windows file-write safety,
  modal a11y, offline mode, player-bar overflow-first rule, etc.
- Feature catalogue: one-liner per feature grouped by area, each
  pointing to the deeper docs/features/*.md page that already exists.
- Conventions + Language: trimmed but kept the load-bearing rules
  (commit subject case, release-please triple-manifest bump, 17-locale
  propagation).

Detail dropped from CLAUDE.md is preserved in docs/features/*.md
where it already lived in duplicate.
@github-actions github-actions Bot added scope: docs Docs, README, assets type: chore Maintenance size: m 50-200 lines labels May 15, 2026
@InstaZDLL InstaZDLL self-assigned this May 15, 2026
@InstaZDLL InstaZDLL merged commit bb51bb3 into main May 15, 2026
12 of 13 checks passed
@InstaZDLL InstaZDLL deleted the chore/slim-claude-md branch May 15, 2026 19:19
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed0aabef-4e3a-499f-9b0b-c6f1ca5ef706

📥 Commits

Reviewing files that changed from the base of the PR and between ade9f13 and 62fcd41.

📒 Files selected for processing (1)
  • CLAUDE.md

📝 Walkthrough

Walkthrough

CLAUDE.md was restructured to provide clearer, more concise repository guidance. The project overview, development commands, system architecture descriptions, operational rules, feature catalogue, and workflow/localization conventions were all condensed and reorganized for improved clarity and maintainability.

Changes

Repository guidance update

Layer / File(s) Summary
Project overview and development setup
CLAUDE.md
Project overview rewording clarifies the Tauri/React/TypeScript/bun stack; development commands section replaced with structured bun/Vite/Tauri/TS/lint/build breakdown and dedicated frontend-only block.
Frontend and backend architecture
CLAUDE.md
Frontend architecture now explicitly lists React entry points, context/provider hooks, typed Tauri invoke() wrappers (camelCase/snake_case convention), view/layout naming, and mini-player WebviewWindow. Backend architecture summarizes command/domain organization, external API clients, audio engine, DLNA/UPnP, Discord presence, queue/smart playlists, and SQLite/sqlx scope.
Cross-cutting operational rules
CLAUDE.md
Extensive "Key Patterns" material condensed into shorter "Cross-cutting rules" enumerating Tauri command wiring, profile-scoped DB pools, persistence patterns, event emission, audio callback constraints, immutable migrations, virtual scrolling, artist/album grouping, single SQLite writer, Windows file-write safety, useModalA11y accessibility, panel layout expectations, offline mode gating, and player-bar action extension patterns.
Feature overview catalog
CLAUDE.md
Verbose feature descriptions replaced with one-line summaries and documentation pointers organized across playback, library, UI, playlists, integrations, and preferences/maintenance.
Workflow conventions and localization
CLAUDE.md
"Conventions" bullets updated for conventional commits, PR labeling, and release-please workflow; "Language" section clarified with 17-locale i18next setup, French as source of truth, RTL direction handling via document.documentElement.dir, fallback to English, and requirement that every locale includes every key (preserving interpolation tokens).

🎯 1 (Trivial) | ⏱️ ~3 minutes


🐰 A guidance scroll was trimmed and styled anew,
With patterns condensed and clearer what's due,
Stack, rules, and features now shine through the haze—
CLAUDE.md springs forth to light the coder's ways!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/slim-claude-md

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs Docs, README, assets size: m 50-200 lines type: chore Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant