docs(rules): capture full-surface-rename codemod traps (Composer rename close-out)#85
Merged
Merged
Conversation
…me close-out) Lands the hard-won lessons from the Compose -> Composer rename as a repo-tracked agent rule, so they're not stuck in one session's private notes. Covers the traps that pass a naive sweep: boundary-vs-literal verification grep, regex-escaped separators evading both the sweep and the grep, multiple token emit sites (a bare 'COMPOSE' array literal alongside the RESERVED_SECRET_PREFIX constant), excluded files still losing inbound links, .agents/rules/*.mdc silently skipped by perl -pi, and rebasing a full-tree rename by redo rather than hand-resolve. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
wmadden
approved these changes
Jul 15, 2026
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.
Close-out for the Compose → Composer rename (#80, #83): lands the reusable rename-codemod traps as a tracked rule so the lessons aren't stuck in one session's memory.
New canonical rule:
.agents/rules/full-surface-rename.mdc(the.claude/.cursortrees are regenerated symlink mirrors, gitignored). Captured traps, each of which passed a naive sweep during this project:git grep '@prisma/compose'matches@prisma/composeras a substring; verify withold-token([^r]|$).@prisma\/compose-prisma-cloudin a test assertion evades both a literal-slash replace rule and a literal-slash grep; recheck\/variants.COMPOSE_prefix was assembled from a bare'COMPOSE'array literal inserializer.tsconfigKey(), separate from theRESERVED_SECRET_PREFIXconstant; grep the bare token too..agents/rules/*.mdccan be silently skipped byperl -pi; verify they were rewritten, thenpnpm rules:sync.pnpm rules:sync+pnpm lint:rules:symlinksgreen.