Practicing spec driven development across Cursor, Claude Code, and GitHub Copilot requires solving a subtle multi-agent coordination problem before writing code. When developers hand an identical feature request to these three assistants, they often receive three incompatible implementations. This discrepancy occurs not because underlying foundation models disagree, but because each assistant reads a different configuration file: Cursor inspects .cursor/rules, GitHub Copilot evaluates .github/copilot-instructions.md, and Claude Code processes CLAUDE.md.
When local instruction files drift apart, agent output diverges immediately. Spec-driven development succeeds in multi-assistant environments only when one approved specification governs all three agents. By establishing a central AGENTS.md file at the repository root, Cursor and Copilot ingest constraints natively while Claude Code links directly via a single import directive.
Key Takeaways
- Configuration fragmentation causes divergence: AI coding agents load distinct instruction files by default. Writing an isolated specification in one editor guarantees divergence when colleagues use alternative assistants.
- The universal layer:
AGENTS.mdserves as the portable standard supported natively by Cursor and GitHub Copilot, and easily linked to Claude Code via an@AGENTS.mdimport line.- Keep per-agent files minimal: Place feature scope, acceptance criteria, and architecture rules in the universal spec. Reserve tool-specific files solely for editor mechanics like file globs or mode switches.
- Automated generation via Spec Kit: Tools like GitHub Spec Kit automate the transition from specification to execution across 30+ coding agents using structured slash commands.
- Multi-repo enterprise scaling: While file-based specifications function well within single repositories, multi-repo microservices require cross-repository governance and joint sign-offs, as explored in spec-driven development for teams.
Why spec-driven development splinters across multiple agents
When AI coding assistants receive an underspecified prompt, they resolve missing details using whatever context is currently loaded. If your team has configured separate instructions in different formats across multiple tools, each assistant starts from a different baseline.
Workflow summary: Unsynchronized instruction files cause Cursor, Claude Code, and Copilot to generate divergent implementations from the same feature request.
The solution is not crafting elaborate prompts for each individual tool. Instead, teams must establish a single authoritative specification layer that all assistants resolve against, accompanied by minimal editor-specific overrides.
The portable foundation: one universal AGENTS.md
The most effective way to unify specifications across tools is AGENTS.md, an open standard hosted under the Linux Foundation. Both Cursor and GitHub Copilot natively support AGENTS.md, making it the common denominator for repository instructions.
A well-structured AGENTS.md file reflects the core sections of an AI-ready spec template: business objective, boundary constraints, existing system context, and testable acceptance criteria:
# AGENTS.md
## System Context
- Service: Payments and Reconciliation Engine
- Stack: TypeScript, Node.js, PostgreSQL, Stripe API
- Repository: 1 of 8 interconnected services in payment-mesh
## Architecture Rules
- Financial values must always be represented as integer cents, never floating-point numbers.
- All ledger mutations must route through `lib/ledger.ts`. Direct SQL writes to `ledger_entries` are strictly prohibited.
- Every modified endpoint requires an integration test under `tests/integration/`.
## Active Specification: Partial Refund Support
- **Objective**: Allow customer operations to execute partial refunds against settled transactions.
- **In-Scope**: Idempotent POST /v1/refunds endpoint, ledger balance balancing.
- **Out-of-Scope**: Chargeback automation, currency exchange, disputes.
- **Acceptance Criteria**:
- Given a settled charge of $100.00
- When a partial refund of $30.00 is submitted with idempotency key
- Then ledger balance updates to $70.00 and refund transaction record is created
To include Claude Code, place a CLAUDE.md file in your repository root that imports AGENTS.md:
# CLAUDE.md
@AGENTS.md
## Claude Code Specific Directives
- Always run in plan mode (`/plan`) for tasks modifying `lib/ledger.ts`.
- Summarize proposed database schema alterations before modifying migration files.
By leveraging this import syntax, your team maintains exactly one canonical specification while allowing assistant-specific execution guidelines.
Configuring assistant-specific layers
Each AI coding assistant offers unique features, such as path-scoped rules or interactive planning modes. To avoid specification drift, follow this rule: place all feature definitions in the universal spec, and use tool configuration files exclusively for editor execution behavior.
Workflow summary: The central AGENTS.md specification file feeds all three coding assistants while preserving tool-specific scoping capabilities.
1. Cursor: scoped rules with .cursor/rules/*.mdc
Cursor supports modular project rules stored as .mdc files in .cursor/rules/. The key advantage is glob-based path scoping, ensuring rules activate only when an engineer edits matching files:
---
description: Ledger integrity constraints
globs: ["lib/ledger.ts", "app/api/refunds/**"]
alwaysApply: false
---
- Verify double-entry balancing before committing transaction rows.
- Ensure all refund mutations log the original parent transaction ID.
2. Claude Code: plan-mode verification
Claude Code provides interactive terminal execution. Its standout capability is plan mode, accessible via the /plan command. When prompted with a task, Claude Code outlines the intended sequence of file changes and test runs before modifying any source code. This verification step enables developers to confirm that the assistant interpreted the specification correctly before code is generated.
3. GitHub Copilot: path instructions with applyTo
GitHub Copilot reads repository-wide guidance from .github/copilot-instructions.md and supports path-scoped instructions within .github/instructions/*.instructions.md using the applyTo field:
---
applyTo: "tests/contract/**"
---
- Integration tests must execute against local wiremock fixtures in `tests/mocks/`.
- Never initiate live network calls to third-party payment gateways during testing.
Automating multi-agent setups with GitHub Spec Kit
Manually maintaining configuration files across multiple assistants can be time-consuming. GitHub Spec Kit streamlines this process by generating tool-specific configuration files from a centralized specification.
Spec Kit structures the development lifecycle into a four-stage workflow:
# Initialize project scaffolding and select target agents
specify init my-project
# 1. Define business outcomes and constraints
/specify "Implement idempotent partial refunds for payment ledger"
# 2. Architect the technical implementation plan
/plan "TypeScript, PostgreSQL ledger, isolated contract fixtures"
# 3. Decompose work into independently testable tasks
/tasks
# 4. Direct AI assistants to implement the approved plan
/implement
By generating consistent instructions for Cursor, Claude Code, and Copilot from single /specify and /plan artifacts, Spec Kit ensures all assistants operate from the same technical requirements.
Scaling spec-driven development across teams and repositories
While managing a local AGENTS.md file works effectively for an individual developer in a single repository, engineering organizations encounter organizational friction as soon as work scales:
Workflow summary: Manually copying markdown files across repositories causes cross-service contract divergence during implementation.
When a real-world feature touches a payment API, a background ledger worker, and an analytics webhook across three distinct repositories, duplicating markdown files creates drift. If an engineer updates a schema in one repository without synchronizing downstream consumers, integration testing breaks. This synchronization bottleneck is a core challenge across the agentic SDLC.
Solving this challenge requires a unified governance layer. Rather than maintaining disconnected markdown files, teams need an authoritative specification that synchronizes across all repositories and passes context directly to AI assistants.
Platforms like Enact address this challenge by constructing a persistent structural knowledge graph across your entire microservice fleet using tree-sitter parsers. Product managers and engineering leads review and sign off on specifications jointly, ensuring scope and API contracts are locked before AI coding agents execute. Approved specifications are served directly to Cursor, Claude Code, and Copilot via the Model Context Protocol (MCP), eliminating the need for manual copy-pasting.
To understand how teams establish cross-functional governance around AI coding workflows, review our guide to spec approval workflows for AI coding agents and quantify the productivity gains of eliminating rework with our rework ROI calculator.
One approved plan. Every agent. Every repo.
See how Enact maintains a single approved specification across Cursor, Claude Code, Copilot, and every service in your architecture.
Watch the demo →