atlas-template
AGENTS.md3 starsChanged 20 days agoMITView on GitHub
Entry point for any agent. First session: if .atlas/state.json does not exist or its status is pending, read and run .atlas/BOOTSTRAP.md before any other action. If the user says "configure this project", "run the initial setup" or any equivalent, this is what must be executed. The source of truth for behavior is openspec/specs/ and adr/. {{ARCHITECTURE_SUMMARY}} Boundaries and dependency direction: {{ARCHITECTURE_NOTES}} QA environment: {{QA_ENVIRONMENT}} Multi-stack: these commands belong to the default stack (first row of § Stacks); each engineer-<stack> uses…
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,700 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 repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- architectural-decision-recordsSkill
- conventional-commitsSkill
- gherkin-specsSkill
- git-workflowSkill
- grillingSkill
- implementation-standardsSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-workflowSkill
- session-endSkill
- session-startupSkill
- test-driven-developmentSkill
- update-harnessSkill
- using-git-worktreesSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
No agent imposes an architecture different from the one declared here.
- Distinctive: line 55
If an implementation contradicts a current ADR, the agent stops and asks.
- Distinctive: line 173
Start of QA (consumes an environment).
- Distinctive: line 193
Branch isolation: no commit and no change artifact is written on the base branch.
- Distinctive: line 208
If the project has an index or graph, use it.
- Distinctive: line 209
Do not invent libraries, APIs or behavior: verify with Context7 or ask.
- Distinctive: line 210
Test data: if created via direct SQL, it respects business invariants and is declared.
≈ “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
AGENTS.md — Project contract
Entry point for any agent. First session: if
.atlas/state.jsondoes not exist or itsstatusispending, read and run.atlas/BOOTSTRAP.mdbefore any other action. If the user says "configure this project", "run the initial setup" or any equivalent, this is what must be executed.The source of truth for behavior is
openspec/specs/andadr/.
Index
| Section | Content |
| Summary | Project, stack, language |
| Architecture | Declared stance and boundaries |
| Commands | Build, test, quality, environment |
| Structure | Where everything lives |
| Do Not Touch Rules | What no agent modifies |
| Preferences | OpenSpec commands, orchestration, quality |
| Roles | Available agents |
| Workflow | Pipeline and gates |
| Golden rules | Cross-cutting rules |
| Skill Registry | Skills with path and trigger |
| Stacks | Project stacks (single/multi) |
| Extending | How to extend skills, agents and packs |
| Placeholders | Values read by the prompts |
| Document map | Where to find each thing |
| Pending | TBD from the bootstrap |
Summary
- Project: {{PROJECT_NAME}}
- Description: {{ONE_LINE_DESCRIPTION}}
- Stack: {{STACK_SUMMARY}}
- Domain: {{DOMAIN_SUMMARY}}
- Base package: {{PACKAGE_BASE}}
- Documentation language: {{LANGUAGE_USER}}
- Skills and prompts language: {{LANGUAGE_AGENT}}
Architecture
{{ARCHITECTURE_SUMMARY}}
Boundaries and dependency direction: {{ARCHITECTURE_NOTES}}
- No agent imposes an architecture different from the one declared here.
- Durable decisions are recorded in
adr/and are immutable once accepted. - If an implementation contradicts a current ADR, the agent stops and asks.
Commands
| Purpose | Command |
| Install dependencies | {{INSTALL_COMMAND}} |
| Build | {{BUILD_COMMAND}} |
| Run locally | {{RUN_APP_COMMAND}} |
| Tests | {{TEST_COMMAND}} |
| Lint (production) | {{LINT_MAIN_COMMAND}} |
| Lint (tests) | {{LINT_TEST_COMMAND}} |
| Static analysis | {{STATIC_ANALYSIS_COMMAND}} |
| Quality gate | {{QUALITY_COMMAND}} |
| Coverage | {{COVERAGE_COMMAND}} |
| Mutation | {{MUTATION_COMMAND}} |
| CRAP | {{CRAP_COMMAND}} |
QA environment: {{QA_ENVIRONMENT}}
Multi-stack: these commands belong to the default stack (first row of § Stacks); each
engineer-<stack>uses its row.
Stacks
A stack = profile + path + commands + packs. Each stack generates
engineer-<stack>(even with one). Add later:crear-perfil.mjs→state.stacks+ this table →renderizar-adaptadores.mjs.
{{STACKS_TABLE}}
Structure
{{PROJECT_STRUCTURE}}Each change lives in openspec/changes/<change>/ and is worked on in its branch or worktree.
Do Not Touch Rules
{{DO_NOT_TOUCH}}
In addition:
openspec/specs/andadr/are not modified from implementation.- Secrets, credentials and real data are never committed.
- External dependencies are not added without justification in
design.mdor an approved ADR.
Preferences
| Preference | Value | Possible values |
| OpenSpec commands | {{OPENSPEC_COMMANDS_POLICY}} | user (always the human), agent (always the agent, mutation with confirmation), ask (ask at the start of each session) |
| Orchestration | {{ORCHESTRATION_POLICY}} | orchestrated (default) or manual |
| CRAP threshold | {{CRAP_THRESHOLD}} | integer per method (default 6) |
| Persistent memory | {{MEMORY}} | engram, another, or none |
| Documentation | Only the areas selected in state.docs | Root configurable (state.docs.root); English folder names; content in language.user |
Invariant: archive and sync always require explicit approval, whatever the preference.
Roles
| Role | Canonical prompt | Purpose |
analyst | .atlas/agents/analyst.md | Analysis and planning |
engineer | .atlas/agents/engineer.md | Implementation with TDD; each stack generates engineer-<stack> |
reviewer | .atlas/agents/reviewer.md | Code review (read-only) |
qa-analyst | .atlas/agents/qa-analyst.md | Functional testing |
doc-writer | .atlas/agents/doc-writer.md | Technical and functional documentation |
Adapters are generated by renderizar-adaptadores.mjs from .atlas/agents/ + AGENTS.md.
Each stack generates engineer-<stack>; without stacks, engineer.md is generated and removed on setup.
Codex has no subagents: roles are emulated with this file and the role announcement.
Cursor uses .cursor/agents/ with model: inherit; it has no per-role write permissions, so the
reviewer's read-only contract is enforced by its prompt (it must still write its report).
Supported hosts: OpenCode, Claude Code, Codex and Cursor.
Optional roles (only if the bootstrap activates them; see state.optional_agents): mentor
(agnostic teaching of the project's concepts and patterns, code explanation and learning material) and
business-strategist (business model, value proposition, segments, pricing and channels in
docs/business/). They are not part of the delivery cycle: they are invoked when needed.
Workflow
explore → propose → apply → QA → review → close
(proposal → specs → design → adr → tasks)Exception — bootstrap: the initial setup (
.atlas/BOOTSTRAP.md) runs on its own branch (chore/bootstrap), not in a change worktree. One commit per phase and the user merges.Isolation: every change is written on its own branch, never on the base branch. The default is a worktree; a simple feature branch in the main checkout requires an explicit human request, a clean working tree, aligned submodule branches and a record in the change. See
using-git-worktreesandgit-workflow.Stacks:
state.stacksis the source; each stack generatesengineer-<stack>andpacksare activated per stack.
Gates
The analyst orchestrates by default and stops at:
- Approval of each OpenSpec artifact.
- Start of implementation (can be resumed in another session).
- Start of QA (consumes an environment).
- Pull request creation.
- Archive approval and merge (always the user).
In manual mode, the user invokes each phase; the analyst checks that no gate is skipped.
Close
- Design → code consistency.
doc-writerupdates technical and functional documentation and returns a summary.- The
analystvalidates documentation consistency. - The PR is created; the user reviews once.
- User approves
archive; run archive + sync and commit in the same PR. - User confirms and merges.
- Cleanup (branch + worktree).
Golden rules
- Branch isolation: no commit and no change artifact is written on the base branch; isolate every change (worktree by default, human-requested feature branch as exception). The pre-commit guard blocks any commit on the base branch.
- Incremental commits: one logical change = one commit (see
conventional-commits). - Role byline in agent commits:
By <role>.at the end of the body. - Code comments: reference ADRs (
adr/NNNN-...) or functional documentation, neveropenspec/specs, roadmaps or other projects. If no ADR anchors the decision, the comment is self-contained: decision and reason. - Quality: 0 lint violations in the touched files (pre-existing ones are fixed);
CRAP ≤
{{CRAP_THRESHOLD}}per method. - Quality gates are signals, not targets: metrics are not manipulated; lines are not deleted, methods are not split without cohesion, trivial tests are not added, the threshold is not raised and files with logic are not excluded to pass a gate.
- No finding is closed silently: it is fixed or documented and the user is consulted.
- Context discipline: targeted searches; avoid massive sweeps (
grep -r,ls -R,find+cat). If the project has an index or graph, use it. - Do not invent libraries, APIs or behavior: verify with Context7 or ask.
- Test data: if created via direct SQL, it respects business invariants and is declared.
- Role announcement:
🎩 Ahora soy <rol>/🎩 I am now <role>, in the user's language (language.user), when changing roles. - Never advance without explicit user approval at each gate.
Skill Registry
Triggers can be expressed in any language; each skill declares trigger examples in its
description(body and description in English,language.agent). 17 core + optional packs; pack skills are registered when the pack is activated.
| Skill | Path | Trigger |
openspec-explore | .agents/skills/openspec-explore/ | Explore an idea before proposing |
openspec-propose | .agents/skills/openspec-propose/ | Plan a change |
openspec-apply-change | .agents/skills/openspec-apply-change/ | Implement the tasks |
openspec-archive-change | .agents/skills/openspec-archive-change/ | Archive a change |
openspec-sync-specs | .agents/skills/openspec-sync-specs/ | Sync specs |
openspec-workflow | .agents/skills/openspec-workflow/ | Full pipeline and gates |
grilling | .agents/skills/grilling/ | Stress-test a plan or design before building |
test-driven-development | .agents/skills/test-driven-development/ | Red → green → refactor |
implementation-standards | .agents/skills/implementation-standards/ | Engineering criteria: SOLID, Clean Code, refactors |
using-git-worktrees | .agents/skills/using-git-worktrees/ | Isolate the change |
git-workflow | .agents/skills/git-workflow/ | Branches, worktrees, PR, cleanup |
architectural-decision-records | .agents/skills/architectural-decision-records/ | Record a durable decision |
gherkin-specs | .agents/skills/gherkin-specs/ | Write scenarios |
conventional-commits | .agents/skills/conventional-commits/ | Every commit |
session-startup | .agents/skills/session-startup/ | Session start |
session-end | .agents/skills/session-end/ | Session close |
update-harness | .agents/skills/update-harness/ | Update the template/harness to a new version (any language) |
Pack skills (.atlas/packs/) only exist when the pack is activated.
Extending
- Agent procedure (skills, agents, stacks, profiles, packs, minimize):
.atlas/docs/en/extending.md. Follow it when the user asks. - Project-specific context:
docs/project-context.md.
Placeholders
The prompts in .atlas/agents/ use project placeholders; this table gives them their values.
The full contract — closed list, profile and project layers, and the three states — is in
.atlas/PLACEHOLDERS.md. A placeholder that is not in the contract
does not exist and cannot be used.
| Placeholder | Value |
TEST_COMMAND | {{TEST_COMMAND}} |
QUALITY_COMMAND | {{QUALITY_COMMAND}} |
MUTATION_COMMAND | {{MUTATION_COMMAND}} |
CRAP_COMMAND | {{CRAP_COMMAND}} |
APP_PORT | {{APP_PORT}} |
RUN_APP_COMMAND | {{RUN_APP_COMMAND}} |
SERVICE_NAME | {{SERVICE_NAME}} |
HEALTH_URL | {{HEALTH_URL}} |
METRICS_PATH | {{METRICS_PATH}} |
N/A means "it exists but does not apply": the agent skips the step and declares it; it never
runs N/A. If the stack does not use a concept (mutation, health…), the value is N/A — the
placeholder is never left unresolved.
Document map
| For | Where |
| Behavior specifications | openspec/specs/ |
| Active change | openspec/changes/<change>/ |
| Architectural decisions | adr/ |
| Functional documentation (Use Cases) | docs/functional/ |
| Architecture and C4 | docs/architecture/ |
| API contracts | docs/api/ |
| Development guides | docs/guides/ |
| Preliminary QA inventory | openspec/changes/<change>/qa-scenarios.md |
| QA reports | openspec/changes/<change>/qa-report-*.md |
| Review reports | openspec/changes/<change>/reviewer-report-*.md |
| Harness guides | docs/README.md (index) · docs/harness/es/ · docs/harness/en/ |
| Project-specific context | docs/project-context.md |
| ATLAS landing page | docs/README.md (the project has no root README; its own is generated from .atlas/PROJECT-README.md) |
| Optional packs | .atlas/packs/README.md (EN) |
| Harness scripts | .atlas/scripts/ |
| Project state | .atlas/state.json (stacks, packs, optional_agents, readme) |
Pending
{{TBD_ITEMS}}
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.

