Summary
Introduce repository-level custom AI instruction files to standardize AI-assisted development across tools. These files define shared coding guidelines, architectural constraints, and project conventions so that AI agents generate consistent, context-aware responses without repeated prompt context.
Reference:
https://code.visualstudio.com/docs/copilot/customization/custom-instructions
Establish a canonical-source and anti-drift policy to prevent instruction files from becoming stale as dependencies, CI, or configuration evolve.
Objective
Ensure consistent AI behavior across:
- GitHub Copilot (VS Code Chat)
- Multi-agent workflows
- Claude-based tools
Instruction files must:
- Reflect project coding standards
- Capture architectural patterns and constraints
- Define testing philosophy and enforcement expectations
- Encode dependency policies at a policy level (not version level)
- Document project-specific constraints
- Avoid drift-prone configuration duplication
Canonical Source & Anti-Drift Policy
To minimize maintenance overhead:
AGENTS.md is the canonical, tool-agnostic source of AI development rules.
- Tool-specific files are derived, concise artifacts.
- Volatile configuration data must never be embedded directly.
Prohibited Hardcoding
The following must not be statically embedded in tool-specific files:
- Exact dependency versions
- Version ranges or pinned constraints
- Minor Python versions (unless policy-level)
- CI matrix versions
- Tool configuration values
- Counts of modules, drivers, or files
- Experimental feature states
When necessary, reference authoritative sources instead:
pyproject.toml
pre-commit-config.yaml
- GitHub Actions workflows
- Source code defaults
Structural Over Quantitative
Prefer:
- Architectural rules
- Design principles
- Capability-based descriptions
- Policy-level constraints
Avoid:
- Numeric counts
- Enumerations of dynamic structures
- Repetition of dependency specifications
Regeneration Requirement
Tool-specific files must remain valid if dependencies or CI configurations change.
They must be safely regenerable without manual synchronization edits.
Requirements
AGENTS.md (Canonical)
.github/copilot-instructions.md
- Located under
.github/
- Applies automatically to Copilot Chat
- Concise and enforceable
- Derived from
AGENTS.md
- Must not introduce configuration drift
- Must remain independently effective
.claude/CLAUDE.md
- Located under
.claude/
- Compatible with Claude Code and related tools
- Concise and enforceable
- Derived from
AGENTS.md
- Must remain independently effective (not solely cross-referential)
Acceptance Criteria
Design Clarification
AGENTS.md is the single source of truth.
- Tool-specific files are concise extracts derived from it.
- Tool-specific files may reference
AGENTS.md, but must contain sufficient guidance to function independently.
- Avoid unnecessary duplication.
- Avoid embedding values that can drift over time.
Notes
Instructions must be:
- Concise
- Enforceable
- Structural rather than configuration-specific
- Regenerable without ongoing manual maintenance
The goal is consistent AI-assisted development with minimal long-term operational overhead.
Summary
Introduce repository-level custom AI instruction files to standardize AI-assisted development across tools. These files define shared coding guidelines, architectural constraints, and project conventions so that AI agents generate consistent, context-aware responses without repeated prompt context.
Reference:
https://code.visualstudio.com/docs/copilot/customization/custom-instructions
Establish a canonical-source and anti-drift policy to prevent instruction files from becoming stale as dependencies, CI, or configuration evolve.
Objective
Ensure consistent AI behavior across:
Instruction files must:
Canonical Source & Anti-Drift Policy
To minimize maintenance overhead:
AGENTS.mdis the canonical, tool-agnostic source of AI development rules.Prohibited Hardcoding
The following must not be statically embedded in tool-specific files:
When necessary, reference authoritative sources instead:
pyproject.tomlpre-commit-config.yamlStructural Over Quantitative
Prefer:
Avoid:
Regeneration Requirement
Tool-specific files must remain valid if dependencies or CI configurations change.
They must be safely regenerable without manual synchronization edits.
Requirements
AGENTS.md(Canonical)Located at repository root
Single source of truth
Tool-agnostic
Documents:
Must not embed volatile configuration values
.github/copilot-instructions.md.github/AGENTS.md.claude/CLAUDE.md.claude/AGENTS.mdAcceptance Criteria
AGENTS.mdexists at repository root and is canonical..github/copilot-instructions.mdexists and aligns with canonical rules..claude/CLAUDE.mdexists and aligns with canonical rules.Design Clarification
AGENTS.mdis the single source of truth.AGENTS.md, but must contain sufficient guidance to function independently.Notes
Instructions must be:
The goal is consistent AI-assisted development with minimal long-term operational overhead.