opencode-hive
AGENTS.md42 starsChanged 4 months agoMITView on GitHub
A multi-agent architecture for OpenCode. This is a template -- not a project to develop, but a system to install into other projects. When a user asks you to "set this up", "install this", or "configure my project": Categorize into three tiers: - SUB: Subscription models -- for routing, planning, review, wiki - MID: Pay-per-token coding models -- for implementation specialists - PREMIUM: Frontier models -- never assign as default, manual override only Ask before overwriting any existing files. Every…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 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.
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, 5 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
When a user asks you to "set this up", "install this", or "configure my project":
- Very specific: line 18
Run opencode models and present the output.
- Distinctive: line 28
Ask the user for the target project path, then scan it:
- Very specific: line 49
Every replacement must be a complete OpenCode model ID in provider/model-id format.
- Very specific: line 60
Do not install _project-dev-template.md under that name.
- Very specific: line 72
Add each implementation agent to <target>/.opencode/agents/orchestrator.md under permission.task (e.g., "frontend-dev": allow).
- Very specific: line 79
Use project/agents/_project-dev-template.md as starting point:
- Distinctive: line 83
Add to the project-local orchestrator's task permissions
- Very specific: line 84
If it needs review coverage, create a separate <project-name>-reviewer.md with edit: deny and add only that reviewer to review-lead
- Very specific: line 94
Keep the built-in explore and scout permissions
- Very specific: line 95
Add every installed specialist to permission.task (e.g., "my-specialist": allow)
- Distinctive: line 96
Add every new project-specific agent the same way
- Distinctive: line 97
Keep the global orchestrator limited to globally installed agents
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
OpenCode Hive
A multi-agent architecture for OpenCode. This is a template -- not a project to develop, but a system to install into other projects.
Directory Structure
global/-- Files to install at~/.config/opencode/(agents, tools, scripts, rules, skills)project/-- Files to install at.opencode/in the target projectexamples/-- Optional specialist agents to pick based on project stackdocs/-- Guides for model selection, adding specialists, architecture
AI Setup Instructions
When a user asks you to "set this up", "install this", or "configure my project":
Step 1: Discover Available Models
Run opencode models and present the output. Ask the user:
- "Which of these providers are subscription/free (no per-token cost)?"
- "Which provider/model do you want for code generation?"
Categorize into three tiers:
- SUB: Subscription models -- for routing, planning, review, wiki
- MID: Pay-per-token coding models -- for implementation specialists
- PREMIUM: Frontier models -- never assign as default, manual override only
Step 2: Detect Target Project Stack
Ask the user for the target project path, then scan it:
ls <target>/*.py <target>/*.ts <target>/*.go <target>/*.rs 2>/dev/null | head -20
ls <target>/package.json <target>/pyproject.toml <target>/go.mod <target>/Cargo.toml 2>/dev/null
ls <target>/Dockerfile <target>/docker-compose* 2>/dev/nullStep 3: Install Global Files
Copy each global/ folder to ~/.config/opencode/:
agents/*.md,tools/*.ts,scripts/*,skills/*/,rules/*.md- Merge
opencode.json— don't overwrite existing MCP, LSP, or plugin config
Ask before overwriting any existing files.
Step 4: Replace Model Placeholders
In all copied files, replace these four placeholders with real model IDs:
YOUR_ROUTING_MODEL-> fast, reliable model for routingYOUR_ANALYSIS_MODEL-> strong model for planning and reviewYOUR_FAST_MODEL-> inexpensive model for titles and summariesYOUR_CODE_MODEL-> strongest available code-generation model
Every replacement must be a complete OpenCode model ID in
provider/model-id format. These role names do not require a particular
provider or billing model.
Step 5: Install Project Files
Copy project/ contents to <target>/.opencode/:
project/agents/orchestrator.md-><target>/.opencode/agents/orchestrator.mdproject/agents/review-lead.md-><target>/.opencode/agents/review-lead.mdproject/rules/*.md-><target>/.opencode/rules/project/wiki/WIKI_SCHEMA.md-><target>/.opencode/wiki/WIKI_SCHEMA.md
Do not install _project-dev-template.md under that name; Step 7 turns it
into a real, project-named agent.
Step 6: Select Example Specialists
Based on detected stack, copy matching agents from examples/specialists/:
- Python -> python-pro already global
- Go -> go-pro already global
- JS/TS -> copy
frontend-dev.mdandfrontend-reviewer.md - Backend -> copy
backend-dev.mdandbackend-reviewer.md - Docker/K8s -> copy
devops-engineer.mdanddevops-reviewer.md - SQL -> copy
database-dev.mdanddatabase-reviewer.md
Add each implementation agent to <target>/.opencode/agents/orchestrator.md
under permission.task (e.g., "frontend-dev": allow). Add its read-only
reviewer to <target>/.opencode/agents/review-lead.md. Never allow an
edit-capable implementation agent from review-lead. Do not add project-only
agents to the global orchestrator.
Step 7: Create Project-Specific Agent
Use project/agents/_project-dev-template.md as starting point:
- Scan target project structure
- Fill in project layout, conventions, dev commands, key files
- Save as
<target>/.opencode/agents/<project-name>-dev.md - Add to the project-local orchestrator's task permissions
- If it needs review coverage, create a separate
<project-name>-reviewer.mdwithedit: denyand add only that reviewer to review-lead
Step 8: Customize Review Lead
Edit <target>/.opencode/agents/review-lead.md:
- Fill in the domain routing table with actual file patterns from the project
- Allow only matching
*-revieweragents inpermission.task
Step 9: Update Project Orchestrator Permissions
Edit <target>/.opencode/agents/orchestrator.md:
- Keep the built-in
exploreandscoutpermissions - Add every installed specialist to
permission.task(e.g.,"my-specialist": allow) - Add every new project-specific agent the same way
- Keep the global orchestrator limited to globally installed agents
- Without these project-local permissions, the orchestrator cannot delegate to your agents
Step 10: Verify Setup
opencode models # Confirm model IDs resolve
ls ~/.config/opencode/agents/ # Global agents present
ls <target>/.opencode/agents/ # Project agents presentReport the final agent inventory with models and cost tiers.
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.

