Skip to content

docs(rules): capture full-surface-rename codemod traps (Composer rename close-out)#85

Merged
wmadden-electric merged 1 commit into
mainfrom
claude/rename-closeout
Jul 15, 2026
Merged

docs(rules): capture full-surface-rename codemod traps (Composer rename close-out)#85
wmadden-electric merged 1 commit into
mainfrom
claude/rename-closeout

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

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/.cursor trees are regenerated symlink mirrors, gitignored). Captured traps, each of which passed a naive sweep during this project:

  • Boundary grep, not literalgit grep '@prisma/compose' matches @prisma/composer as a substring; verify with old-token([^r]|$).
  • Escaped separators — regex-escaped @prisma\/compose-prisma-cloud in a test assertion evades both a literal-slash replace rule and a literal-slash grep; recheck \/ variants.
  • Every emit site — the COMPOSE_ prefix was assembled from a bare 'COMPOSE' array literal in serializer.ts configKey(), separate from the RESERVED_SECRET_PREFIX constant; grep the bare token too.
  • Excluded files still lose inbound links — ADR-0026/0027 kept their filenames but the sweep rewrote ~10 cross-reference link paths into 404s.
  • .agents/rules/*.mdc can be silently skipped by perl -pi; verify they were rewritten, then pnpm rules:sync.
  • Rebase by redo, not hand-resolve — a full-tree rename conflicts with every concurrent merge; re-run the deterministic codemod on the fresh base and land fast.

pnpm rules:sync + pnpm lint:rules:symlinks green.

…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-electric
wmadden-electric merged commit 702b9c7 into main Jul 15, 2026
12 of 13 checks passed
@wmadden-electric
wmadden-electric deleted the claude/rename-closeout branch July 15, 2026 16:53
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.

2 participants