Runtime Adapters
Enable optional Codex, OpenCode and Pi adapters for shared skills and instructions.
Activate
devkit config codex auto|on|off # default auto: active while `codex` is installed
devkit config opencode auto|on|off # default off
devkit config pi auto|on|off # default auto: active while `pi` is installedA mode change takes effect on the next devkit apply or devkit sync. devkit config show prints the modes; devkit doctor checks the written files.
What each adapter writes
| Runtime | Shared source | Form | Destination |
|---|---|---|---|
| Codex | Portable skills | dk-<name> skills | ~/.agents/skills/ |
| Codex | Agents | TOML definitions | ~/.codex/agents/ |
| Codex | Shared and Codex guard hooks, including edit checks on apply_patch | Native hook config | ~/.codex/hooks.json |
| Codex | Guardrails | Rule files | ~/.codex/rules/ |
| Codex | Global instructions | Managed block | ~/.codex/AGENTS.md |
| OpenCode | Tool access | tools, permission, subagent_depth and experimental.subagent_depth keys, added only, never removed; permission."*": "allow" sits first, so opencode starts without permission prompts and a personal ask/deny still wins | ~/.config/opencode/opencode.json |
| OpenCode | Global instructions | Managed block | ~/.config/opencode/AGENTS.md |
| Pi | Global instructions | Managed block marked od managed (onedot-devkit pi) | ~/.pi/agent/AGENTS.md |
| Pi | Shared hooks | Compiled event, matcher, command manifest | ~/.pi/agent/extensions/devkit-hooks.manifest.json |
| Pi | Hook bridge | Managed TypeScript adapter | ~/.pi/agent/extensions/devkit-hooks.ts |
The adapters leave same-named personal entries and everything outside a managed block untouched; keeping a personal rule is reported as a warning, not a failure.
Codex edit policies cover native apply_patch. Pi reads its own transcript for docs-first checks, review reminders and context hints; inner tool calls inside codemode remain invisible. Write-capable delegates explicitly load the managed hook bridge; a missing bridge refuses dispatch, and automatic extension discovery stays disabled.
Turning Pi off removes its managed hook paths and, when Codex is disabled, the shared skill links Pi needed. Unlinking devkit removes only devkit-owned links.
Skill names
Devkit materializes shared skills as dk-<name> under ~/.agents/skills/ when Codex or Pi is enabled. Pi discovers those directories under the same dk- names without a second mirror; disabling Codex does not remove Pi's skills. OpenCode uses its native shared-skill discovery. devkit path skill <name> stays prefix-free in every runtime; devkit run starts shared scripts.
Pi MCP connections use native ~/.pi/agent/mcp.json, independently of this instructions adapter. Sync reconciles the managed catalog with codemode exposure; it no longer imports Codex TOML or installs an MCP adapter. Same-named personal configuration wins. A personal adapter declaration remains untouched and replaces built-in MCP until its owner disables it.
Models and permissions
Each agent gets the same model class as in Claude Code, mapped to the runtime's model names. Read-only agents cannot write; agents that edit get write and shell access.
/delegate can send review, research or implementation to Codex or another installed runtime; PR-bound implementation runs as an Orca worker (Orca 1.4.284+); see initiative and delegation. devkit path resume [project-dir] resolves Codex's pre-compact snapshot for a project.
OpenCode prerequisites
A shared skill in OpenCode needs the built-ins read, glob, grep, list and bash. Without them the agent still answers, but as a chatbot: no repository search, no devkit run, and /friction-feedback cannot even report it. lsp and websearch are optional.
OpenCode removes a built-in from the toolset when any merged config layer denies it — permission.read: "deny", or tools.read: false without a permission override. Layers merge global → OPENCODE_CONFIG → project opencode.json/opencode.jsonc → .opencode/; a global deny stays in force until that file changes or a project layer sets the same key to "allow".
Two more places hide a deny: a per-agent permission block overrides the top level, so agent.explore.permission.bash: "deny" blinds that subagent even when the top level allows it, and experimental.primary_tools lists tools that only primary agents keep — a built-in named there is denied to every subagent.
devkit apply writes this into ~/.config/opencode/opencode.json and leaves a differing personal value alone:
{
"$schema": "https://opencode.ai/config.json",
"subagent_depth": 2,
"experimental": { "subagent_depth": 2 },
"permission": { "read": "allow", "glob": "allow", "grep": "allow", "list": "allow", "bash": "allow" }
}bash can stay granular ("bash": { "git *": "allow", "*": "ask" }); only an all-deny rule counts as missing. OpenCode 1.x reads the top-level subagent_depth, OpenCode 2 only experimental.subagent_depth (it drops the top-level key), so devkit writes both: shared skills delegate to subagents that delegate again, and OpenCode's default of 1 stops the second hop with Subagent depth limit reached (1).
devkit doctor --target opencode # only OpenCode checks, exit 1 on a finding
devkit doctor --target pi # Pi managed block, hook bridge, binary, sandbox and subscription readinessOpenCode reads config, agents, skills and plugins once at start; restart it after every change. If a broken config prevents the start: OPENCODE_DISABLE_PROJECT_CONFIG=1 skips the project layer, OPENCODE_CONFIG=/path/file.json loads one more file, OPENCODE_CONFIG_CONTENT='{"$schema":"https://opencode.ai/config.json"}' injects inline JSON.