Skip to content

Add AGENTS.md and Claude Code rules mirroring Copilot instructions - #20398

Open
xperiandri wants to merge 2 commits into
dotnet:mainfrom
xperiandri:copilot-instructions-for-other-agents
Open

Add AGENTS.md and Claude Code rules mirroring Copilot instructions#20398
xperiandri wants to merge 2 commits into
dotnet:mainfrom
xperiandri:copilot-instructions-for-other-agents

Conversation

@xperiandri

Copy link
Copy Markdown
Contributor

Description

Adds AGENTS.md and CLAUDE.md, plus per-path .claude/rules/*.md mirrors of the existing .github/instructions/*.instructions.md files.

.github/copilot-instructions.md and the path-scoped .github/instructions/*.instructions.md files are currently wired up only for GitHub Copilot (via its own auto-discovery mechanism). Contributors — human or AI agent — who use a different assistant (Claude Code, Codex/AGENTS.md-aware tools, etc.) get none of this guidance unless they know to go looking for it manually.

This PR does not duplicate any content. Every new file is a thin pointer (@-include) back to the corresponding file under .github/, so:

  • AGENTS.md and CLAUDE.md at the repo root both link to .github/copilot-instructions.md, the emerging AGENTS.md/CLAUDE.md convention several tools already auto-load.
  • Each .claude/rules/*.md file mirrors one .github/instructions/*.instructions.md file, carrying over the same paths: glob scoping so Claude Code applies the rule only when relevant files are touched — the same way Copilot's applyTo frontmatter already scopes it.

There is exactly one source of truth (.github/instructions/**); this only adds discovery paths for other tooling so all contributors get the same build/test/coding rules regardless of which agent they use.

Checklist

  • Test cases added
  • Performance benchmarks added in case of performance changes
  • Release notes entry updated

@github-actions

Copy link
Copy Markdown
Contributor

✅ No release notes required

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Agent-Config
Affects-Agent-Config: adds AGENTS.md, CLAUDE.md, and .claude/rules/*.md agent instruction mirrors

Generated by PR Tooling Safety Check · opus46 4.8M ·

@github-actions github-actions Bot added the ⚠️ Affects-Agent-Config Tooling check: PR modifies AI agent instructions or workflows label Aug 30, 2026
@xperiandri
xperiandri force-pushed the copilot-instructions-for-other-agents branch from 365acf9 to 52bc7a0 Compare August 31, 2026 23:05
xperiandri and others added 2 commits September 2, 2026 12:23
Build, diagnostics, navigation, rename and formatting go through the IDE
that already has the solution open, so the agent reads what the compiler
and the symbol graph know rather than what the files say.

Records the traps that cost a wrong edit otherwise: an unsaved VS buffer
outranks the file on disk, build_* follows the IDE's active configuration
rather than Debug, and project_add_file appends without a position so it
cannot place a Compile item in an order-sensitive F# project.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@xperiandri
xperiandri force-pushed the copilot-instructions-for-other-agents branch from 52bc7a0 to 21f33b5 Compare September 2, 2026 10:23
Comment thread CLAUDE.md

`project_add_file` appends without a position, so it cannot place a new `<Compile Include>` correctly in an order-sensitive F# project: add those to the `.fsproj` by hand.

Tests have no IDE path — the `vs` server exposes no Test Explorer tools (https://github.com/Corsinvest/cv4vs-agents/issues/192), so they run through `dotnet test` as described above.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls drop the URL (since it's a link not under our control, its a potential prompt injection vector)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ Affects-Agent-Config Tooling check: PR modifies AI agent instructions or workflows

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants