Skip to content

Mark AI-generated files as linguist-generated using .gitattributes to reduce PR noise #1224

@slikts

Description

@slikts

Problem

Many of the files generated for integration with Antigravity (Google), Claude, Copilot, Cursor, etc., are intentionally not gitignored so the tools can read them. This results in a high volume of auto-generated noise in pull request diffs, making code review more difficult.

Solution Proposal

Use the .gitattributes feature on GitHub to mark generated files and folders (such as .agent/rules/, .agent/skills/, .agent/workflows/, CLAUDE.md, etc.) with linguist-generated.

Example:

.agent/rules/** linguist-generated
.agent/skills/** linguist-generated
.agent/workflows/** linguist-generated
CLAUDE.md linguist-generated
.cursor/rules/** linguist-generated
.github/copilot-instructions.md linguist-generated

This will automatically collapse these files/folders in GitHub pull request UI, reducing noise but keeping the files visible and loadable by the relevant tools.

Optionally, rulesync could:

  • Add these entries automatically when running rulesync gitignore or via a new rulesync gitattributes command.
  • Document the approach in the README for advanced users/managers of multi-tool repos.

Related

Benefits

  • Dramatically reduces distraction in code review and PR diffs involving rulesync and agent-tool integrations.
  • Keeps compatibility for all tools (no gitignore-related breakage).
  • No impact on file tracking, agent tool usage, or repository statistics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions