feat(opencode): dispatch recipes + model flag#157
Open
slowdini wants to merge 1 commit into
Open
Conversation
Wire the two #153 enhancements together (descriptor validation ties the judge template's $model_arg to a declared model flag): a [dispatch] block (exec/parallel/judge/next-steps/manifest templates, capture_prefix = "opencode") plus [model] flag = "-m", so RUNBOOK.md, dispatch-manifest.md, and the post-run/post-ingest handoffs carry copy-pasteable opencode run recipes and --agent-model/--judge-model actually select models instead of recording provenance only. - Recipes run `opencode run --dir <eval-root> --format json --auto` with stdin detached (piped stdin is appended to the message) and JSONL/stderr captures; there is no --output-last-message, so the final message comes from the text events via transcript ingest. CLI facts verified against opencode v1.18.3. - Golden fixtures re-blessed (runbook/manifest/next-steps) plus a new opencode judge-recipe golden; the dispatchless and modelflag-less preflight-warning pins move from opencode to a BYOH user descriptor (every built-in now wires both). - README support table flips Dispatch recipes and Model flag to ✅ (footnote ¹ removed); opencode-notes.md records the verified CLI facts; help.rs drops the stale "assemble records manually" OpenCode example. - Live-verified: one opencode run per the recipe discovers and invokes the staged skill (skill tool event under the staged slug), the events file ingests to a full run record, and a bogus -m fails (the flag is plumbed). Operator edit:deny rules stay enforced under --auto; record-runs then falls back to the transcript's final text. Closes #153
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User-facing change
run --harness opencodenow generates copy-pasteable dispatch recipes everywhere the codex/claude harnesses already did:RUNBOOK.md,dispatch-manifest.md, the post-runnext steps, and the post-ingestjudge handoff all carryopencode run --dir <eval-root> --format json --autocommands (including the shared jq/xargs parallel and judge variants).--agent-model/--judge-modelnow actually select models via-minstead of being recorded as provenance only.Before:
After:
What changed
harnesses/opencode.toml: full[dispatch]block (exec_template,parallel_command_template,judge_command_template,next_steps_template,manifest_template,capture_prefix = "opencode") plus[model] flag = "-m"— landed together because descriptor validation ties the judge template's$model_argto a declared model flag. No schema changes (all fields pre-existing). No{guard_args}references — the guard stays with feat(opencode): write guard via project plugin (opencode-plugin engine) #155.opencode/judge-recipe.golden.md(opencode added to the judge golden sweep).has_dispatch_recipespin; the dispatchless and modelflag-less preflight-warning pins moved from opencode to a BYOH user descriptor (every built-in now wires both); new unit pin for the exec recipe's--dir/--auto/-msplicing; newrun_writes_headless_runbook_for_opencodeintegration test; deletedopencode_run_warns_missing_dispatch_recipe.docs/opencode-notes.mdrecords the verified CLI facts (v1.18.3) including the--auto/explicit-deny interaction;src/cli/help.rsdrops the stale "assemble records manually" OpenCode example (leftover from before feat(opencode): transcript ingest via the opencode-events parser #156).Verification
cargo test— 479 lib + 99 cli + 81 run, 0 failurescargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleaneval-magic harness lint opencode— all checks passedopencode runper the recipe exited 0; the events file shows the staged skill discovered and invoked under its staged slug via the nativeskilltool;eval-magic ingestassembledrun.json(3 invocations) +timing.json(tokens/duration from the transcript) and the__skill_invokedmeta-check passed viatranscript_check;-m definitely/bogus-modelexits 1 (flag plumbed). An operator-leveledit: denyrule stayed enforced under--autoand blockedfinal-message.md— record-runs fell back to the transcript's final text, as designed (noted in opencode-notes.md).Closes #153