A minimal .agent/ setup to make AI coding workflows more predictable.
Works with:
- Claude Code
- Codex / OpenAI agents
- Gemini CLI
- Google Antigravity
- Cursor
- Any custom agent setup
Most AI workflows look like:
prompt → retry → tweak → retry
This repo shows a better way:
define behavior + rules + workflows → get consistent output
This is the missing layer between prompts and production AI systems!
-
Copy
.agent/into your repo, plus the loader file(s) for your tool:CLAUDE.md— Claude CodeAGENTS.md— Codex / OpenAI agents / AntigravityGEMINI.md— Gemini CLI.cursor/rules/— Cursor
-
Start with:
behavior.mdrules/base.md- one workflow
-
Use your AI tool as usual
- fewer random changes
- less repetition in prompts
- more predictable outputs
.
├── CLAUDE.md # Claude Code loader (imports AGENTS.md)
├── GEMINI.md # Gemini CLI loader (imports AGENTS.md)
├── .cursor/rules/ # Cursor loader (points to AGENTS.md)
├── AGENTS.md # canonical load order — Codex / Antigravity read this directly
├── .agent/ # the pattern: instructions
│ ├── behavior.md
│ ├── rules/
│ ├── workflows/
│ ├── skills/
│ └── memory/
└── .claude/ # optional: Claude Code permissions (not part of .agent/)
├── settings.json # team defaults
└── settings.local.json.example # personal template
The .agent/ pattern covers instructions, not permissions. Bash and action permissions belong in each tool's native settings — they're not part of .agent/.
Claude Code uses a two-file pattern:
.claude/settings.json— team defaults, committed. Hard blocks every contributor should share (rm -rf /*, reading.env, etc.)..claude/settings.local.json— personal layer, gitignored. Your ownallow/asklists. Copy.claude/settings.local.json.exampleto activate.
Other tools use their own user-level or IDE-level config.
Prompts tell the AI what to do. This defines how it behaves while doing it.
Don't use everything.
Start with:
- behavior
- rules
- one workflow
Add more only when needed.
This repo separates:
- intent (prompts)
- behavior (system structure)
📖 Full blog: https://medium.com/@nerdapplabs/the-agent-pattern-a-simple-anatomy-for-ai-systems-76a4d30a9a9b