label = "opencode"
skills_dir = ".opencode/skills"
config_dirs = [".opencode"]
[run]
supports_guard = true
[staging]
slug_capability = "opencode"
stage_name_pattern = "^[a-z0-9]+(-[a-z0-9]+)*$"
stage_name_max_len = 64
stage_name_invalid_message = 'OpenCode skill name "{name}" is invalid; names must be 1-64 lowercase alphanumeric characters separated by single hyphens'
rewrites_frontmatter_name = true
advertises_staged_slug_name = true
surface_phrase = "as an OpenCode skill"
unresolved_phrase = "If it does not load as an OpenCode skill"
[skills_block]
header = "<available_skills>"
item = "\n <skill>\n <name>{name}</name>\n <description>{description}</description>\n </skill>"
footer = "\n</available_skills>"
[tools]
write = ["edit", "write"]
patch = ["apply_patch"]
shell = ["bash"]
read = ["read", "glob", "grep"]
[transcript]
events_filename = "opencode-events.jsonl"
parser = "opencode-events"
surfaces_skill_invocation = true
skill_tool = "skill"
skill_arg = "name"
[model]
flag = "-m"
[guard]
engine = "opencode-plugin"
plugin_file = ".opencode/plugins/slow-powers-eval-guard.js"
verdict_template = '{"decision":"block","reason":"{reason}"}'
armed_message = '''
🛡 Write guard armed: a project plugin is staged in .opencode/plugins/slow-powers-eval-guard.js
and will block writes/installs outside the eval sandbox during OpenCode dispatches.
Each `opencode run` dispatch auto-loads the plugin from the env cwd it runs in.
It auto-expires in 6h and is removed on the next run; to remove it now:
eval-magic teardown-guard'''
[shadow]
preflight = "opencode-skills"
[dispatch]
capture_prefix = "opencode"
next_steps_template = '''
Next: iterate the tasks[] array in dispatch.json and dispatch each task with:
{exec_command}
Then run `ingest{target_args} --iteration {iteration} --harness opencode`.'''
exec_template = '''
opencode run --dir <eval-root> --format json --auto{model_arg} \
"Read the file at <dispatch_prompt_path> and follow its instructions exactly. When you finish, make your final response your closing summary." \
</dev/null \
> <outputs_dir>/opencode-events.jsonl \
2> <outputs_dir>/opencode-stderr.log'''
parallel_command_template = '''
opencode run --dir "$eval_root" --format json --auto{model_arg} \
"Read the file at $prompt_path and follow its instructions exactly. When you finish, make your final response your closing summary." \
</dev/null \
> "$outputs_dir/opencode-events.jsonl" \
2> "$outputs_dir/opencode-stderr.log"'''
judge_command_template = ' opencode run --dir "{cwd}" --format json --auto $model_arg \'
manifest_template = '''
After all dispatches (OpenCode):
Run one fresh `opencode run --format json --auto` per task. Detach stdin with `</dev/null` so piped input is not appended to the message; capture stdout as `outputs/opencode-events.jsonl` and stderr as `outputs/opencode-stderr.log`.
```bash
{exec_command}
```
Parallel dispatch from this iteration directory:
```bash
{parallel_recipe}
```
Then run `eval-magic ingest --harness opencode`; OpenCode transcript ingest reads each task's `outputs/opencode-events.jsonl`.
'''
[conversation]
resume_exec_template = '''
opencode run --dir <eval-root> --session {session_arg} --format json --auto{model_arg} \
{prompt_arg} \
</dev/null \
> <outputs_dir>/opencode-events.jsonl \
2> <outputs_dir>/opencode-stderr.log'''