Architecture Overview
Drevon follows a simple but powerful pattern: single source of truth → compile → native agent configs.The Compilation Pipeline
When you rundrevon sync, the following happens:
1
Load Config
Reads
drevon.config.json and validates it against the Zod schema. If the config is invalid, you get clear error messages.2
Resolve Skills
Reads
skills-lock.json to find all installed skills and their descriptions. Skills are injected as a formatted table into each agent’s instructions.3
Iterate Enabled Agents
For each agent with
enabled: true, the compiler instantiates the appropriate adapter.4
Generate Content
Each adapter builds the agent-specific config by combining:
- Identity — role, description, posture
- Memory protocol — instructions for reading/writing memory files
- Custom instructions — your project-specific rules
- Skills — installed skill descriptions and usage instructions
- Workspace rules — workspace organization (hub mode)
- Prompts — available workflow templates
5
Diff & Write
The compiler compares generated content against existing files. Only changed files are written, avoiding unnecessary Git noise.
The Adapter Pattern
Each supported agent has a dedicated adapter that knows its native config format:
All adapters extend a shared
BaseAdapter class that provides common content generation methods. This means every agent receives the same instructions, just formatted differently.
Write-Only-If-Changed
The compiler intelligently diffs each generated file against the existing one on disk. This means:- Running
drevon syncrepeatedly is safe — it won’t create noisy Git diffs - The output tells you exactly what was
created,updated, orunchanged - You can commit agent config files to Git without churn
The Self-Evolution Loop
Drevon doesn’t just generate static config files — it creates a feedback loop where agents improve over time:- Session start — agents read only
INDEX.mdto restore context, then load individual topic files on demand - During work — agents make decisions informed by past context
- Session end — agents write back what they learned (decisions, patterns, discoveries)
- Over time — repeated workflows get extracted into reusable prompts