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! 🚀