docs: move migration and api guidance out of always-loaded CLAUDE.md - #564
Open
abdulrafey1 wants to merge 1 commit into
Open
docs: move migration and api guidance out of always-loaded CLAUDE.md#564abdulrafey1 wants to merge 1 commit into
abdulrafey1 wants to merge 1 commit into
Conversation
The root CLAUDE.md loads into every session, so each line is resident context for the whole session. Three sections were paying that cost without needing to be always available. The Alembic procedure (autogenerate mechanics, the two app/analytics lineages, the continuous-aggregate backfill, resolving split heads) becomes a skill that loads on invocation. The domain-exception-to-HTTP mapping rules move to sparkth/api/CLAUDE.md, which loads only when working under that directory. Safety-critical prohibitions deliberately stay in the root file, where they are always loaded: "never edit an existing migration file" and "never use bare except Exception" are unchanged, as are the general exception rules that apply outside the API layer. Also drops the Red-Green-Refactor enumeration, which restates a generic practice the superpowers:test-driven-development skill already covers, and folds the duplicate GitHub Project Management section into the commit-conventions section that already pointed at the same skill. Root CLAUDE.md drops from 14821 to 11003 characters. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
What
Trims the always-loaded root
CLAUDE.mdby moving two self-contained procedures into files that load on demand, cutting resident context in every session from ~14.8k to ~11.0k characters.Changes
docs: move the Alembic procedure (autogenerate mechanics, the two app/analytics lineages, the continuous-aggregate backfill, resolving split heads) into a newdatabase-migrationsskill that loads on invocationdocs(api): move the domain-exception-to-HTTP mapping rules into a newsparkth/api/CLAUDE.md, which loads only when working under that directorydocs: drop the Red-Green-Refactor enumeration — it restates a generic practice already covered by thesuperpowers:test-driven-developmentskill; the TDD directives themselves are unchangeddocs: fold the duplicate## GitHub Project Managementsection into the commit-conventions section that already pointed at the same skilldocs: add both new files to the Additional Documentation tableSafety-critical prohibitions stay in the root file, always loaded.
Never edit an existing migration file. No exceptions.andNever use bare except Exception blocks.are untouched, as are the general exception rules that apply outside the API layer (services, plugins, MCP tools). Only the procedural detail moved.How to Test
/context;database-migrationsshould appear in the skill listing with its description.sparkth/api/— open a session, work with a file outside that directory, and check thatsparkth/api/CLAUDE.mdis not in context.Notes
No migration, no breaking change, no env var, no dependency change. Documentation and agent-guidance files only — no runtime code is touched.
This is deliberately standalone and based directly on
main, so it can merge independently of the in-flight permission-groups / org-tree PR stack.This description was written with the assistance of an LLM (Claude).