Document: 11-json-config-system.md
Date: 2026-02-15
Status: Ready for Implementation
Transform from: Markdown agents (hard to parse, no validation, IDE-specific)
Transform to: JSON config + Markdown prompts (type-safe, validated, multi-IDE)
.opencode/ โ SINGLE SOURCE OF TRUTH
โโโ agents/
โ โโโ core/
โ โ โโโ openagent/
โ โ โโโ agent.json โ Config (metadata, permissions, tools)
โ โ โโโ prompt.md โ Prompt (human-readable content)
โ โโโ manifest.json โ Registry
โ OAC CLI converts โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโ
โ OpenCode โ Claude Code โ Cursor โ Windsurf โ
โ (native) โ (convert) โ (flatten)โ (flatten) โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโ
{
"id": "openagent",
"name": "OpenAgent",
"mode": "primary",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": { "file": "./prompt.md" },
"permissions": {
"bash": "approve",
"write": "approve"
},
"tools": {
"bash": true,
"write": true
},
"compatibility": {
"opencode": "full",
"claude": "full",
"cursor": "partial"
}
}
# Convert agent to IDE format
oac convert openagent --to=opencode
oac convert openagent --to=claude
oac convert openagent --to=cursor
# Validate agent config
oac validate openagent
# Apply to IDE (auto-convert)
oac apply openagent --ide=opencode
oac apply --all --ide=claude
# Create new agent
oac create agent --template=subagent
6 weeks total:
---
id: openagent
---
# OpenAgent
You are OpenAgent...
## Tools
- bash (approve)
โ Hard to parse
โ No validation
โ Manual conversion
agent.json:
{
"id": "openagent",
"permissions": { "bash": "approve" }
}
prompt.md:
You are OpenAgent...
โ
Easy to parse
โ
Schema validated
โ
Auto-convert
.tmp/sessions/20250215-context-system-analysis/Ready to implement! ๐