agentic
AGENTS.md0 starsChanged 26 days agoUnlicenseView on GitHub
This file provides context and instructions for all AI agents working on this project. This project maintains persistent lessons learned from previous sessions. At the start of each session, read the memory index and relevant memory files to benefit from past experience. Read ~/.opencode/memory/MEMORY.md to see all available lessons. This path is a logical home-relative location: on Windows, resolve it through the user's home directory rather than treating /home/... as literal. Individual memory files are stored at: Each memory file…
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,774 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 repository6 other files it gives its agents.
- cavemanSkill
- grillingSkill
- grill-meSkill
- hindsightSkill
- karpathy-guidelinesSkill
- llm-councilSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Read ~/.opencode/memory/MEMORY.md to see all available lessons.
- Very specific: line 22
At session start: Read MEMORY.md to understand what lessons have been learned
- Distinctive: line 23
When relevant: Read specific memory files that relate to your current task
- Distinctive: line 24
Before making decisions: Check if a lesson applies to avoid repeating past mistakes
- Distinctive: line 25
When updating memory: If you learn something new that relates to an existing lesson, update that file rather than creating a duplicate
- Distinctive: line 56
After completing an implementation where iteration or course correction occurred, proactively suggest running a hindsight pass to capture …
- Distinctive: line 63
Do not suggest hindsight for straightforward implementations, non-implementation conversations, or every task.
- Very specific: line 90
Every object maps to exactly one destination.
- Distinctive: line 97
Never hand-edit a deployed copy.
- Distinctive: line 122
If you're unsure about something:
- Distinctive: line 123
Check the memory files for relevant lessons
- Distinctive: line 124
Read the README.md for project documentation
- Distinctive: line 125
Ask the user for clarification rather than guessing
≈ “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 Instructions for AI Agents
This file provides context and instructions for all AI agents working on this project.
Persistent Memory
This project maintains persistent lessons learned from previous sessions. At the start of each session, read the memory index and relevant memory files to benefit from past experience.
Memory Index
Read ~/.opencode/memory/MEMORY.md to see all available lessons. This path is a logical home-relative location: on Windows, resolve it through the user's home directory rather than treating /home/... as literal.
Memory Location
Individual memory files are stored at:
~/.opencode/memory/How to Use Memory
- At session start: Read
MEMORY.mdto understand what lessons have been learned - When relevant: Read specific memory files that relate to your current task
- Before making decisions: Check if a lesson applies to avoid repeating past mistakes
- When updating memory: If you learn something new that relates to an existing lesson, update that file rather than creating a duplicate
Memory Format
Each memory file has this structure:
---
name: lesson-name
description: Brief description of the lesson
metadata:
type: feedback
---
# Lesson Title
## ContentCurrent Lessons
As of this session, the following lessons have been learned:
- Install Infrastructure — Skills, agents and prompts install by file placement;
INSTALL.mdis the mechanism, and it needs no edit when the count changes - Avoid Hardcoding — Don't hardcode provider-specific values in portable agents
- Clarify Requirements — Ask clarifying questions before implementing complex features
- Test Integration — Test agent orchestration integration points early and iterate
- Document Memory — Document memory system conventions for skills clearly
Proactive Hindsight Suggestions
After completing an implementation where iteration or course correction occurred, proactively suggest running a hindsight pass to capture lessons learned. Suggest it only when:
- A concrete plan was followed but required adjustments
- Assumptions turned out wrong and required backtracking
- Unexpected issues required multiple attempts to resolve
- The implementation succeeded but took more iterations than expected
Do not suggest hindsight for straightforward implementations, non-implementation conversations, or every task. Never run hindsight automatically; suggest it and wait for explicit confirmation.
Project Structure
agentic/
├── commands/ # Slash commands (installed as /<name>)
├── agents/ # Opencode agents (frontmatter + prompt body)
├── skills/ # Opencode skills (one dir per skill, plus git submodules)
├── docs/ # AGENTS-PLAN.md — the pre-task checklist this file refers to
├── config/ # Managed config snippet: MCP servers, skill sources, plugins
├── INSTALL.md # The installer. There is no deployment script.
└── AGENTS.md # This fileAgent Orchestration
The design pipeline is the planning path. design (primary, read-only) interrogates the request, emits a brief, then dispatches planner → reviewer → verifier, in that order and each in a fresh context. Only design may launch subagents — the other stages cannot, so it must call every stage itself. reviewer must return APPROVE before verifier runs, and the Reviewer → Verifier pair runs at most 3 times; unresolved concerns are presented rather than looped on.
Implementation happens afterwards in the built-in build agent via /build, which consumes the plan and reports its ## Verification output verbatim.
The four backstage files in agents/ are hidden: true — plan, planner, reviewer, verifier. design is deliberately not hidden, because it has to appear in the agent picker as the entry point. Hidden controls listings only, not launching: design still dispatches the subagents by ID, and plan.md is a no-body override whose only job is to hide the built-in plan agent.
Install Invariants
There is no deployment script. INSTALL.md is the installer, and an agent (or a person) executes it. These rules are what make that safe to repeat, because the global Opencode config directory is shared state that other tools also write to.
- Every object maps to exactly one destination.
INSTALL.md§1 is the authority on where: agents, commands and skills under~/.config/opencode/<kind>/; a projectAGENTS.mdat<project>/AGENTS.md, not.opencode/AGENTS.md. - AGENTS.md is wrapped in a marker pair. A repeat install replaces that block in place; it never appends. Do not spell the full marker strings out anywhere inside this file — the block is located by matching them, and a second occurrence inside the content would truncate the match.
- MCP servers are merged by name from
config/agentic.opencode.jsoninto the target's ownopencode.json(c). OpenCode loads only one extra config file (selected byOPENCODE_CONFIG), so a second*.opencode.jsonfile in the config directory is silently ignored. That snippet is a merge source, never a file to copy. skillsandpluginsentries are ordered unions. Never sort them; later entries win.- When adding a skill, an agent, or a command, add it to the source tree and add a row to
INSTALL.mdif the destination differs from the obvious one. Nothing enumerates these files any more, so nothing needs editing when the count changes — that is the point of dropping the script. - Removing one is not enough on its own: nothing prunes an existing install, so delete the stale file at the destination too.
INSTALL.md§7 has the check. - Commands and agents are separate files with separate bodies. A command that only needs to invoke an agent should delegate with
agent:rather than copy its prompt. A copy drifts: the stale 95-lineplan-mode.mdthis repo deleted was a copy of the planner prompt that kept describing a review loop the planner had since been forbidden to run. - Never hand-edit a deployed copy. Edit the source tree and re-install.
Integrating skills from other repositories
A repository is not a skill just because it is useful. Check its shape first:
- Single-skill repo (a root
SKILL.md): add it as a git submodule underskills/. - Multi-skill plugin repo (skills nested in
skills/or a plugin package): do NOT put it underskills/. Either list its skills directory in the config snippet'sskillsarray, or install it as a plugin when the project ships first-class support for this harness. - You want one or two skills out of a multi-skill repo: vendor those directories individually under
skills/, each keeping its own rootSKILL.md, and record source and licence in the README's provenance table. Vendor the directories, never the repo. This is howcaveman,hindsight,llm-council,grill-meandgrillinggot here.
Before vendoring, check whether the skill is only an entry point to another one. grill-me is seven lines that load grilling; shipping it alone produces a skill that points at nothing, which is how it was broken here before. Copy the pair, and verify the ID the body names actually exists after install.
OpenCode V2 discovers a file named exactly SKILL.md at any depth under a skill source, taking the immediate parent directory name as the skill ID. A multi-skill repository dropped under skills/ therefore does not fail loudly — it registers every nested skill it contains, duplicating the IDs supplied by the plugin or checkout that already provides them. Keep such repos out of skills/.
Config key spellings differ by Opencode version. This repo targets V2: plugins, skills (one array), mcp.servers, disabled. The V1-line spellings plugin (singular) and mcp as a flat map are deprecated in the V2 schema and are ignored when present. A rejected key is logged as a configuration normalization diagnostic, and opencode mcp list does not surface it — start the server to see it.
Key Principles
- Single Responsibility — Each step in a plan should perform a single, clearly defined task
- Grounded Discovery — Use reads, globs, and greps to discover facts, never guess
- Concrete Edits — Every step must specify exact targets and behaviors
- No Assumptions — Mark unverified facts as
unverified — confirm first
When in Doubt
If you're unsure about something:
- Check the memory files for relevant lessons
- Read the README.md for project documentation
- Ask the user for clarification rather than guessing
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.

