Skip to content

fix(server): skip duplicate CLAUDE.md in repo conventions - #10

Draft
macodev00 wants to merge 2 commits into
mainfrom
cursor/dedupe-agents-claude-conventions-5fac
Draft

macodev00 wants to merge 2 commits into
mainfrom
cursor/dedupe-agents-claude-conventions-5fac

Conversation

@macodev00

Copy link
Copy Markdown
Owner

What Changed

When Source Control writing style is Repository conventions and the writer is Claude, resolveStylePolicy still reads AGENTS.md and CLAUDE.md, but it now drops the CLAUDE.md block when the two files read as the same text (symlink, hardlink, or copy). Distinct CLAUDE.md content is still included. Non-Claude writers still get only AGENTS.md.

Fork-only change for pingdotgg/t3code#12503. Not intended as an upstream PR.

Why

A very common setup is CLAUDE.md as a symlink or byte-identical copy of AGENTS.md. The writer was then billed twice for the same instructions on every commit / change-request generation. Content equality is the cheapest guard; resolving the symlink alone would miss copies.

UI Changes

None.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

When CLAUDE.md is a symlink or byte-identical copy of AGENTS.md, repository-conventions text generation sent the same instructions twice to Claude writers. Skip the CLAUDE.md block when the read content matches AGENTS.md.

Done with Grok 4.6 in Cursor.

Co-authored-by: maco <macodev00@users.noreply.github.com>
Match the existing GitManager policy fixture so the identical-content and non-Claude cases typecheck.

Done with Grok 4.6 in Cursor.

Co-authored-by: maco <macodev00@users.noreply.github.com>

This branch has not been deployed

No deployments
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