agentleFS
michaelalbermichaelalber/ai-toolkit/project-templates/AGENTS.md

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…

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
  1. Distinctive:

    Delete placeholder comments before committing.

    line 20
  2. Distinctive:

    Add a row every time a significant decision is made.

    line 81
  3. Distinctive:

    Remove when resolved; add to Persistent Decisions above.

    line 96
  4. Very specific:

    Read this file (AGENTS.md), intent.md, and constraints.md.

    line 128
  5. Distinctive:

    Check the active Jira issue for the current task spec and acceptance criteria.

    line 129
  6. Very specific:

    If dark factory mode: read domain-memory.md.

    line 130
  7. Distinctive:

    Do NOT begin work until context is confirmed.

    line 132

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

[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. -->
FileWhy 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. -->
DateDecisionRationale
YYYY-MM-DDNRT enabled project-wide (<Nullable>enable</Nullable>)Single source of truth: C# nullability flows directly to EF model and DB schema.
YYYY-MM-DDOptional multi-field data → owned entity on separate tableVertical decomposition eliminates nullable columns and SQL 3VL from the principal table.
YYYY-MM-DDSemantically distinct absence states → enum, not NULLNULL 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

NameRoleNotes
[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:

  1. Read this file (AGENTS.md), intent.md, and constraints.md.
  2. Check the active Jira issue for the current task spec and acceptance criteria.
  3. If dark factory mode: read domain-memory.md.
  4. Confirm context — state: current phase, active Jira issue (if any), top 3 constraints, open loops.
  5. Do NOT begin work until context is confirmed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.