2.4 KiB
2.4 KiB
AGENTS.md Templates
Key Principles
- Concise: dense, human-readable content; one line per concept when possible.
- Actionable: commands should be copy-paste ready.
- Project-specific: document patterns unique to this repo.
- Current: reflect the actual codebase and active tooling.
- Scoped: put broad rules at the repo root; put narrow rules in nested
AGENTS.mdorAGENTS.override.md.
Recommended Sections
Use only sections that matter for the project.
Commands
## Commands
| Command | Purpose |
| --- | --- |
| `<install command>` | Install dependencies |
| `<dev command>` | Start development server |
| `<build command>` | Production build |
| `<test command>` | Run tests |
| `<lint command>` | Lint or format |
Architecture
## Architecture
/
/ # / # / # ``` ```Key Files
## Key Files
- `<path>` - <purpose>
- `<path>` - <purpose>
Code Style
## Code Style
- <project-specific convention>
- <preference over alternative>
Environment
## Environment
Required:
- `<VAR_NAME>` - <purpose>
Setup:
- <setup step>
Testing
## Testing
- `<test command>` - <what it tests>
- <testing convention or pattern>
Gotchas
## Gotchas
- <non-obvious issue, prerequisite, or ordering dependency>
Workflow
## Workflow
- <when to do X>
- <preferred approach for Y>
Minimal Project Root Template
# <Project Name>
<One-line description>
## Commands
| Command | Purpose |
| --- | --- |
| `<command>` | <description> |
## Architecture
Gotchas
## Comprehensive Project Root Template
```markdown
# <Project Name>
<One-line description>
## Commands
| Command | Purpose |
| --- | --- |
| `<command>` | <description> |
## Architecture
Key Files
<path>-
Code Style
Environment
<VAR>-
Testing
<command>-
Gotchas
## Nested Override Template
Use this for a subdirectory whose rules differ from the repo root.
```markdown
# <Directory> Instructions
## Scope
- Applies to `<path>/`.
## Local Rules
- <specific rule that differs from root guidance>
## Verification
- `<command>` - <focused check for this directory>