ai-toolkit / project-templates
AGENTS.md3 starsChanged 3 months agoMITView on GitHub
DISCIPLINE 2: Context Engineering — scoped to this project. Tells the agent everything it needs to KNOW about this repo. PLACEMENT: Copy to the root of your project repository (same level as .git/). OpenCode reads it automatically alongside your global AGENTS.md. RELATED FILES (also in this project root): intent.md — what the agent should optimize for constraints.md — musts, must-nots, preferences, escalation triggers evals.md — test cases and CI gate definitions domain-memory.md — dark factory backlog and progress log (if…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository86 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- project-templates/CLAUDE.mdCLAUDE.md
- alembic-migration-managerSkill
- architecture-journalSkill
- architecture-reviewSkill
- automated-code-reviewSkill
- axum-scaffolderSkill
- capture-consolidateSkill
- cargo-package-scaffoldSkill
- code-review-coachSkill
- confluence-guide-writerSkill
- dependency-mapperSkill
- doc-syncSkill
- dotnet-architecture-checklistSkill
- dotnet-controller-api-scaffolderSkill
- dotnet-security-reviewSkill
- dotnet-vertical-sliceSkill
- ef-migration-managerSkill
- email-captureSkill
- environment-healthSkill
- evaluate-testsSkill
- fastapi-scaffolderSkill
- fitness-functionsSkill
- jira-comment-writerSkill
- legacy-migration-analyzerSkill
- minimal-api-scaffolderSkill
- nuget-package-scaffoldSkill
- oss-vettingSkill
- pattern-tradeoff-analyzerSkill
- php-api-scaffolderSkill
- php-architecture-checklistSkill
- php-feature-sliceSkill
- php-migration-managerSkill
- php-package-scaffoldSkill
- php-security-reviewSkill
- pr-feedback-writerSkill
- pypi-package-scaffoldSkill
- python-architecture-checklistSkill
- python-feature-sliceSkill
- python-modernization-analyzerSkill
- python-security-reviewSkill
- qraspi-architectureSkill
- qraspi-graduateSkill
- qraspi-implementSkill
- qraspi-planSkill
- qraspi-questionsSkill
- qraspi-researchSkill
- qraspi-skeletonSkill
- qrspi-implementSkill
- qrspi-planSkill
- qrspi-questionsSkill
- qrspi-researchSkill
- qrspi-specSkill
- react-app-scaffolderSkill
- react-architecture-checklistSkill
- react-component-scaffolderSkill
- react-feature-sliceSkill
- react-modernization-analyzerSkill
- react-security-reviewSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Delete placeholder comments before committing.
- Distinctive: line 81
Add a row every time a significant decision is made.
- Distinctive: line 96
Remove when resolved; add to Persistent Decisions above.
- Very specific: line 128
Read this file (AGENTS.md), intent.md, and constraints.md.
- Distinctive: line 129
Check the active Jira issue for the current task spec and acceptance criteria.
- Very specific: line 130
If dark factory mode: read domain-memory.md.
- Distinctive: line 132
Do NOT begin work until context is confirmed.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
[PROJECT NAME] — Project Context
<!-- ⚠ PROJECT-LEVEL FILE — NOT GLOBAL
This is the project-level AGENTS.md for OpenCode.
It supplements your global opencode/global/AGENTS.md — it does NOT replace it.
Global standards (coding style, security rules, quality gates) live in the global file.
This file contains only what is specific to THIS project.
DISCIPLINE 2: Context Engineering — scoped to this project.
Tells the agent everything it needs to KNOW about this repo.
PLACEMENT: Copy to the root of your project repository (same level as .git/).
OpenCode reads it automatically alongside your global AGENTS.md.
RELATED FILES (also in this project root):
intent.md — what the agent should optimize for
constraints.md — musts, must-nots, preferences, escalation triggers
evals.md — test cases and CI gate definitions
domain-memory.md — dark factory backlog and progress log (if applicable)
Delete placeholder comments before committing. -->Project Overview
- Name: [Project name]
- Purpose: [1–2 sentences: what problem does this solve, and for whom?]
- Phase: [Discovery / Build / Stabilize / Maintain]
- Jira project key: [e.g., PROJ — primary source for task specs and acceptance criteria]
- Confluence space: [e.g., https://yourorg.atlassian.net/wiki/spaces/PROJ]
- Definition of success: [What does "done" look like at the project level?]
Technology Stack
<!-- Be specific — versions matter. The agent uses this to select idioms,
avoid deprecated APIs, and match existing conventions. -->- Language(s): [e.g., C# 13 / .NET 10, TypeScript 5.x]
- Framework(s): [e.g., ASP.NET Core Minimal API, Blazor Server]
- Database: [e.g., PostgreSQL 16 via EF Core 9]
- UI library: [e.g., Telerik UI for Blazor 6.x — see design.md if present]
- Test framework: [e.g., xUnit + FluentAssertions + Testcontainers]
- CI/CD: [e.g., GitHub Actions — see .github/workflows/ci.yml]
- Package manager: [e.g., NuGet / npm / pip]
Architecture
<!-- Enough context for the agent to place any file in the mental model.
Describe what is NOT obvious from reading the code. -->- Pattern: [e.g., Vertical slice architecture — feature folders under src/Features/]
- Entry points: [e.g.,
src/MyProject.Api/Program.cs] - Key directories:
src/— [what lives here]tests/— [test project structure]infra/— [IaC, migrations, scripts]
- Non-obvious constraints: [e.g., "No cross-feature imports — features are siblings, not parents"]
Key Files
<!-- 5–8 files a new agent should read to orient itself.
These are the files that explain the most about how the project works. -->| File | Why It Matters |
[path/to/file] | [What it reveals about the project] |
[path/to/file] | |
[path/to/file] |
Persistent Decisions
<!-- Log architectural and product decisions so the agent does not re-litigate them.
Add a row every time a significant decision is made.
The agent treats logged decisions as settled unless explicitly reopened. -->| Date | Decision | Rationale |
| YYYY-MM-DD | NRT enabled project-wide (<Nullable>enable</Nullable>) | Single source of truth: C# nullability flows directly to EF model and DB schema. |
| YYYY-MM-DD | Optional multi-field data → owned entity on separate table | Vertical decomposition eliminates nullable columns and SQL 3VL from the principal table. |
| YYYY-MM-DD | Semantically distinct absence states → enum, not NULL | NULL collapses distinct states (pending/N/A/unknown) into one value; enums keep them queryable and readable. |
| YYYY-MM-DD | [e.g., Vertical slice over layered architecture] | [Why] |
Open Loops
<!-- Unresolved questions the agent should surface proactively.
Remove when resolved; add to Persistent Decisions above. -->- [e.g., Caching strategy for [feature] not yet decided]
- [Open item]
Team
| Name | Role | Notes |
| [Name] | [e.g., Tech Lead] | [e.g., reviews all PRs] |
| [Name] | [Role] |
Available Tools
<!-- Tools available beyond the global OpenCode defaults.
OpenCode uses boolean tool flags — confirm tools are enabled in settings
before listing here. -->- [e.g., Jira MCP — read/write Jira issues for this project]
- [e.g., Confluence MCP — read Confluence pages in PROJ space]
- [e.g., grounded-code-mcp — local knowledge base; collection map and CLI usage in global AGENTS.md]
Project Boot Ritual
At the start of every session:
- Read this file (AGENTS.md),
intent.md, andconstraints.md. - Check the active Jira issue for the current task spec and acceptance criteria.
- If dark factory mode: read
domain-memory.md. - Confirm context — state: current phase, active Jira issue (if any), top 3 constraints, open loops.
- Do NOT begin work until context is confirmed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

