Imported from cortex-tms/cortex-tms (
templates/presets/python/AGENTS.md). Install upstream withnpx skills add cortex-tms/cortex-tms --skill python. Copyright stays with the author.
AGENTS.md — Multi-Agent Governance
Project: [Project Name] Last Updated: TBD Owner: TBD
Purpose
Single source of truth for all AI agents working in this project. Every agent — Claude Code, Cursor, GitHub Copilot, Windsurf, OpenCode, or any other tool — reads this file before taking action.
Precedence: This file takes priority over any tool-specific config (CLAUDE.md,
.cursorrules, Copilot instructions, etc.). If any agent instruction conflicts with
this file, follow AGENTS.md and escalate to a human.
Active Agents & Roles
| Agent | Tool | Primary Role | Trust Level |
|---|---|---|---|
| (agent 1) | |||
| (agent 2) |
Update this table when adding or removing AI tools from the project.
Capabilities Matrix
| Action | Any Agent | Requires Human Approval | Never |
|---|---|---|---|
| Edit feature code | ✓ | ||
| Refactor / rename | ✓ | ||
| Write or update tests | ✓ | ||
| Update documentation | ✓ | ||
| Add / remove Python dependencies | ✓ | ||
| Breaking API or schema changes | ✓ | ||
| Modify CI/CD pipelines | ✓ | ||
| Merge to main / protected branch | ✓ | ||
| Force push | ✓ | ||
| Publish to PyPI | ✓ | ||
| Modify auth or security config | ✓ |
Shared Conventions (All Agents Must Follow)
- Read
docs/core/PATTERNS.mdbefore writing any code - Follow
docs/core/DOMAIN-LOGIC.mdfor business rules - Async/await with asyncio — never block the event loop in
async deffunctions - Centralize config loading in
src/config.py— no scatteredos.environreads - Write tests for all new functionality
- No direct commits to
main - Never skip linting or test runs
Python-specific prohibitions:
- Do not read
os.environoutsidesrc/config.py - Do not modify lock files (
poetry.lock,uv.lock,Pipfile.lock) manually - Do not block the event loop with synchronous I/O in
async deffunctions — useasyncio.run_in_executororanyio.to_thread - Do not use bare
except:— always catch specific exception types
Handoff Protocol
When handing off between agents or sessions:
- Document current state in
NEXT-TASKS.md - Commit or stash in-progress work
- Note any open decisions or blockers as comments in the relevant file
Escalation Rules
Escalate to a human when:
- A change would affect more than 3 unrelated files
- A dependency with a security advisory must be added
- The business rule in
DOMAIN-LOGIC.mdis ambiguous or missing - A breaking change to the public API or database schema is required
Universal Prohibitions
No agent, regardless of tool or trust level, may ever:
- Force push to any branch
- Merge code without human review
- Publish packages to registries independently
- Modify authentication, authorisation, or security configuration
- Commit secrets, credentials, or API keys