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.mdcarries only project instructions; the userCLAUDE.mdonly the global ones. Claude reads both and applies its own precedence. See Scopes. - The global
CLAUDE.mdis the base~/.config/agents/AGENTS.mdwith an optionalAGENTS.claude.mdoverlay appended (user scope only; the projectCLAUDE.mdtakes no overlay). See per-harness overlay. - For each skill, the base
SKILL.mdis merged with an optionalSKILL.claude.mdoverlay (front-matter union with overlay winning, bodies concatenated), then task files and scripts are copied verbatim. - Only
~/.claude/CLAUDE.mdand~/.claude/skills/are overlaid in the user config dir — your~/.claude.jsonauth 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:
The generated agent.yaml extends kimi's default agent and injects the global
instructions as system_prompt_args.ROLE_ADDITIONAL:
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.mdoverlay where present; assets are copied verbatim. - The project-local
./.kimi/skills/bind matches the layout kimi already auto-reads, so there is no config rewrite —extra_argscarries only--agent-file(and only when a globalAGENTS.mdexists), never a--configoverride. - A project with no global scope needs no
--agent-fileat all: itsAGENTS.mdis read natively. This mirrors the Claude harness — each scope kept distinct, never merged.
--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 rootAGENTS.mdis git-tracked. - Global instructions — opencode reads
~/.config/opencode/AGENTS.mdas its user-scope rules file, so the globalAGENTS.mdis bound there — base merged with an optionalAGENTS.opencode.mdoverlay. - Skills — compiled with the
SKILL.opencode.mdoverlay 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.