Atomic VCS integration for OpenCode.
Automatic turn recording with AI provenance, intent tracking, and knowledge graph skills.
- 1 session = 1 view — a draft view is created automatically when you start OpenCode
- Every turn records with provenance — model, vendor, session, turn number, timing
- Tool executions tracked — reads, edits, bash calls captured in a causal decision graph
- Intent workflow — agent prompt guides problem-first development with vault intents
- Skills on demand —
@atomic-vaultand@code-intelligenceloaded when needed
Add to your global OpenCode config (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["atomic-opencode"]
}OpenCode installs it automatically on next startup.
Then run the setup to link the agent prompt and skills:
npx atomic-opencodegit clone https://github.com/atomicdotdev/atomic-opencode
cd atomic-opencode
./install.shThis symlinks everything into ~/.config/opencode/. Edit files in the repo — changes apply immediately (restart OpenCode for plugin changes).
- Atomic VCS installed and on your PATH (
atomic --version) - A project with an
.atomic/repository (atomic init) - OpenCode installed
cd my-project
atomic init # if not already an atomic repo
opencode # start OpenCode — press Tab to switch to Atomic agentThe Atomic agent:
- Creates an intent for each prompt (
atomic vault intent create) - Reframes your request as a problem statement with success criteria
- Writes the plan into the intent file before coding
- Executes the tasks
- Hooks automatically record with provenance when the turn ends
You never need to run atomic add or atomic record — the hooks handle it.
# Show the causal decision graph (goals → tool calls → patch)
atomic change -p <hash>
# Show inline AI attestation (model, tokens, cost)
atomic change -a <hash>
# Show session-level attestations
atomic agent attest| File | Purpose |
|---|---|
plugins/atomic-hooks.ts |
OpenCode plugin — session lifecycle, turn recording, tool tracking |
agents/atomic.md |
Agent prompt — intent-per-turn workflow |
skills/atomic-vault/SKILL.md |
Vault reference (goals, intents, memory) |
skills/code-intelligence/SKILL.md |
Knowledge graph query patterns |
opencode.json |
Default permissions |
install.js |
Links agent + skills into ~/.config/opencode/ |
install.sh |
Development install (symlinks from local checkout) |
npx atomic-opencode --uninstallRemoves symlinks from ~/.config/opencode/. Your OpenCode config and other plugins are not affected.
OpenCode session start
│
├── Plugin fires session-start → Rust creates haikunator-named draft view
│
├── User sends prompt
│ ├── Plugin fires user-prompt → Rust saves prompt + model on session
│ ├── Agent works (edits, bash, reads)
│ │ ├── Plugin fires before-tool → Rust tracks timing
│ │ └── Plugin fires after-tool → Rust appends to provenance graph
│ └── Turn ends
│ └── Plugin fires stop → Rust adds files, records change with provenance
│
├── User sends another prompt → repeat
│
└── Session ends
└── Plugin fires session-end → Rust creates attestation
Apache-2.0 — same as Atomic VCS.