Adapter capability declarations
Per-adapter declaration of side effects: which shell commands the adapter invokes, which paths it writes outside its engine directory, which network hosts it contacts, and whether it relies on background processes. These declarations are the source of truth that the D4 capability verifier (
aidokit verify --capabilities) compares against the emitted hook scripts.Schema: see
packages/core/src/schema.ts—CapabilitiesSchema. Per-project projection:.aidokit/capabilities.jsonat Strict tier (see ADR-0017).
How these declarations are used #
- Authoritative source. Each adapter's
manifest.capabilitiesfield in its package'smanifest.tsdeclares the surface area the adapter accepts responsibility for. - Projected to disk at Strict tier.
aidokit init --tier strictwrites.aidokit/capabilities.jsonderived from the declared capabilities of every adapter in the project. - Cross-checked at runtime.
aidokit verify --capabilitiesscans the emitted hook scripts under.claude/scripts/**(etc.) and flags any command, path, or host that appears in the scripts but isn't declared in the manifest. - Cited in audit packets.
aidokit audit exportreferences the declarations as evidence for SOC2 CC3.1 / CC5.2 / CC9.1 and EU AI Act Articles 9 / 15.
@aidokit/adapter-claude-code — Strict conformance #
| Capability | Declared |
|---|---|
shellCommands |
claude mcp add, claude mcp remove |
writesOutsideEngine |
CLAUDE.md, docs/, agent-artifacts/ |
networkEndpoints |
(none) |
backgroundProcesses |
false |
Why these:
claude mcp add/claude mcp removeare run bypostInstallandaidokit mcp add/removeto wire MCP servers into the Claude Code CLI itself. They are the only shell commands the adapter invokes in user-controlled scope.CLAUDE.mdis emitted at the project root;docs/carries the shared documentation skeleton;agent-artifacts/carries change summaries, blockers, metrics. All three are outside the adapter's declared engine directory (.claude/) by design — see ADR-0005.- No network endpoints: the adapter contacts no host directly. (npm,
Claude Code itself, and any MCPs you opt into have their own
network posture; see
wiki/privacy/index.md.) - No background processes: every hook script is short-lived and exits.
@aidokit/adapter-codex — Minimum conformance #
| Capability | Declared |
|---|---|
shellCommands |
(none) |
writesOutsideEngine |
AGENTS.md, docs/, agent-artifacts/ |
networkEndpoints |
(none) |
backgroundProcesses |
false |
Why these:
- Codex CLI's MCP wiring is not yet a stable shell-command interface;
the adapter does not invoke a Codex CLI command from
postInstall. (This will change when Codex stabilises its MCP surface — tracked in ROADMAP §v1.0.) AGENTS.mdis the Codex equivalent ofCLAUDE.md(per the Codex spec). The other write paths match the claude-code adapter for cross-adapter consistency.
@aidokit/adapter-copilot — Minimum conformance #
| Capability | Declared |
|---|---|
shellCommands |
(none) |
writesOutsideEngine |
.github/copilot-instructions.md, docs/, agent-artifacts/ |
networkEndpoints |
(none) |
backgroundProcesses |
false |
Why these:
- Copilot CLI does not yet expose a hook mechanism we can wire MCPs through; the adapter is at Minimum conformance precisely because this gap exists (see ADR-0016).
.github/copilot-instructions.mdis the Copilot project rules file per GitHub's documented convention. The other write paths follow the cross-adapter pattern.
How to verify #
# Local — checks the on-disk emitted hooks against the artifact.
aidokit verify --capabilities
# In CI — same machinery, exits non-zero on any drift.
aidokit manifest --verify-capabilities
Both commands surface drift such as:
- a shell command appearing in a hook script but not in
capabilities.json - a network call (fetch / https.get) appearing in a hook script when
networkEndpointsis empty - a
setIntervalin a hook script whenbackgroundProcesses: false
Adding a capability #
When you make an adapter change that legitimately needs a new shell command, write path, or network host:
- Update
manifest.capabilitiesin the adapter package'smanifest.ts. - Run
pnpm -r build && aidokit sync --tier strict(in a Strict- tier dogfood project) to refresh.aidokit/capabilities.json. - Run
aidokit verify --capabilitiesto confirm the declaration matches the new behaviour. - Update this page so the documented capability table stays in sync with the manifest.
See also #
- ADR-0017 — the artifact emission design
- Strict tier — when the artifact is emitted
- Security model — broader context
aidokit verify— the integrity command- Audit export — SOC2 mapping — evidence usage