Skip to content

Harnesses

--wrapper <harness> selects a compiler. Each compiler renders the agent-neutral source into one harness's native layout and produces a plan — a set of (compiled-file → mount-target) binds, plus any extra arguments to append to your command. The launcher then injects the binds into a private mount namespace and runs the command. Context and command are decoupled: the flag picks the format; everything after -- is run verbatim.

agedum --wrapper claude   -- claude -p "…"     # render for Claude, run claude
agedum --wrapper kimi     -- kimi -p "…"       # render for kimi, run kimi
agedum --wrapper opencode -- opencode run "…"  # render for opencode, run opencode

The bare --claude / --kimi / --opencode flags are deprecated aliases for --wrapper <harness>. To launch a harness with a provider/model/auth environment too, generate a wrapper script with build-script mode — it sets that environment, then execs agedum --wrapper.

Every compiler processes the project and global scopes and applies the skill overlay rules for its harness (SKILL.claude.md for Claude, SKILL.kimi.md for kimi, SKILL.opencode.md for opencode; other harnesses' overlays are skipped). The global AGENTS.md gets the same treatment — a sibling AGENTS.<harness>.md overlay is merged onto it for the matching harness.

--wrapper claude

Claude discovers its context purely from the filesystem, so agedum injects files at the paths Claude already reads. Nothing is appended to your command.

Source Injected at
project AGENTS.md <root>/CLAUDE.md
project .agents/skills/ <root>/.claude/skills/
global ~/.config/agents/AGENTS.md (+ optional AGENTS.claude.md overlay) $CLAUDE_CONFIG_DIR/CLAUDE.md (default ~/.claude/CLAUDE.md)
global ~/.agents/skills/ $CLAUDE_CONFIG_DIR/skills/ (default ~/.claude/skills/)
  • Each scope lands at its own location — never concatenated. The project CLAUDE.md carries only project instructions; the user CLAUDE.md only the global ones. Claude reads both and applies its own precedence. See Scopes.
  • The global CLAUDE.md is the base ~/.config/agents/AGENTS.md with an optional AGENTS.claude.md overlay appended (user scope only; the project CLAUDE.md takes no overlay). See per-harness overlay.
  • For each skill, the base SKILL.md is merged with an optional SKILL.claude.md overlay (front-matter union with overlay winning, bodies concatenated), then task files and scripts are copied verbatim.
  • Only ~/.claude/CLAUDE.md and ~/.claude/skills/ are overlaid in the user config dir — your ~/.claude.json auth and other settings are untouched.
  • extra_args: none. The command runs exactly as you wrote it.
# Interactive Claude with project + global context injected:
agedum --wrapper claude -- claude

# Headless review with a specific model:
agedum --wrapper claude -- claude --model sonnet -p "review this change"

--wrapper kimi

kimi reads the project AGENTS.md from the filesystem natively, but has no user-scope AGENTS.md — so agedum leaves the project instructions in place and injects only the global ones, via a flag. Skills, both scopes, are injected as binds like Claude's.

Project instructions — kimi merges every AGENTS.md from the project root (the nearest .git) down to the working directory into its system prompt. The agent-neutral source's AGENTS.md already sits at the project root, which is exactly where kimi looks, so agedum injects nothing for it — and never tries to, since that root AGENTS.md is typically git-tracked.

Global instructions — because kimi has no user-scope AGENTS.md, the global AGENTS.md (base merged with an optional AGENTS.kimi.md overlay) is injected via a custom agent-file appended to your command:

… kimi -p "…"  --agent-file /tmp/agedum-kimi-XXXX/agent.yaml

The generated agent.yaml extends kimi's default agent and injects the global instructions as system_prompt_args.ROLE_ADDITIONAL:

version: 1
agent:
  extend: default
  system_prompt_args:
    ROLE_ADDITIONAL: |
      <global AGENTS.md>

This coexists with native discovery: the default agent's system prompt fills ROLE_ADDITIONAL from the agent-file (global) and a separate slot from the merged project AGENTS.md (native) — so both scopes apply, each by the right mechanism.

Skills — bound into the directories kimi reads automatically:

Source Injected at
global ~/.agents/skills/ ~/.kimi/skills/
project .agents/skills/ <root>/.kimi/skills/
  • Skills use the SKILL.kimi.md overlay where present; assets are copied verbatim.
  • The project-local ./.kimi/skills/ bind matches the layout kimi already auto-reads, so there is no config rewriteextra_args carries only --agent-file (and only when a global AGENTS.md exists), never a --config override.
  • A project with no global scope needs no --agent-file at all: its AGENTS.md is read natively. This mirrors the Claude harness — each scope kept distinct, never merged.
agedum --wrapper kimi -- kimi -p "explain this code"

--wrapper opencode

opencode is pure path-discovery — it reads instructions and skills from fixed locations and needs no flags — so every scope is a bind and nothing is appended to your command.

Source Injected at
project AGENTS.md (not injected — read natively at ./AGENTS.md)
project .agents/skills/ <root>/.opencode/skills/
global ~/.config/agents/AGENTS.md (+ optional AGENTS.opencode.md overlay) $XDG_CONFIG_HOME/opencode/AGENTS.md (default ~/.config/opencode/AGENTS.md)
global ~/.agents/skills/ $XDG_CONFIG_HOME/opencode/skills/ (default ~/.config/opencode/skills/)
  • Project instructions — opencode reads the root AGENTS.md (traversing up from the work dir) as its project rules file. That is exactly the agent-neutral source, already in place, so agedum injects nothing for it — and never could, since the root AGENTS.md is git-tracked.
  • Global instructions — opencode reads ~/.config/opencode/AGENTS.md as its user-scope rules file, so the global AGENTS.md is bound there — base merged with an optional AGENTS.opencode.md overlay.
  • Skills — compiled with the SKILL.opencode.md overlay and bound to ./.opencode/skills/ (project) and ~/.config/opencode/skills/ (global). opencode searches those directories before .agents/skills/ / ~/.agents/skills/ (which it would otherwise read directly), so the overlaid copy wins over the raw source.
  • extra_args: none — opencode discovers everything from disk, like Claude.

This is the closest harness to Claude: pure binds, each scope at its own native location, never merged. The one difference is that the project instructions are read in place rather than relocated.

agedum --wrapper opencode -- opencode run "review this change"
agedum --wrapper opencode -- opencode            # interactive TUI

Other harnesses

--<harness>-variant composition is a planned follow-up. Adding a harness is a new compiler function returning the same plan shape (binds + extra args); the launcher and CLI are harness-agnostic. See Internals for the plan/launch contract.