B4: harness-reframe prototype (experiment iteration → score + deterministic driver) - #120
Open
aarontrowbridge wants to merge 1 commit into
Open
B4: harness-reframe prototype (experiment iteration → score + deterministic driver)#120aarontrowbridge wants to merge 1 commit into
aarontrowbridge wants to merge 1 commit into
Conversation
Prove one experiment iteration can run driven by a score + deterministic TS driver rather than an LLM orchestrator (spec-20260708-112732 §3.2/§4.3, plan slice B4, amicode#109). Stands on amicode#107's G-1 ruling: score-first for flow + a thin TS driver only where the stage model can't express iteration. What lands: - `amico-run` harness module (src/harness/): an iteration-score parser (the data-defined flow) + `runExperimentIteration`, the deterministic control-flow loop that replaces the orchestrator prompt for one iteration — select target → dispatch ONE flat/depth-1 experimenter leaf → launch via the amico-run CLI → re-rollout verify → record + gate promotion on `agree`. The single model seam (`dispatchExperimenter`) is pluggable; production wires it to `opencode run --agent experimenter`. - Re-rollout gate extended to TIER-2 (composed), not just tier-3/free (§4.3): `isVerifiedTier` is the single source of truth; cli.ts gates on it. - Example harness score at extension/scores/experiment-iteration/ITERATION.toml (ignored by the interview repertoire loader, which only reads SCORE.md). - Runnable demo (`pnpm --filter @amicode/amico-run demo:harness`) + tests that run the iteration with NO LLM and NO Julia (deterministic fakes), asserting: exactly one flat leaf, tier-2 re-rollout runs, promotion gated on agree. - s31 grep-guard now recurses src/ so it covers the new harness subdir (no fetch/MCP/HTTP in the tool layer). amico-run: 115 tests pass (was 106); typecheck clean; demo PASS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 9, 2026
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.
Part of #109. Prototype for review — not a full close of the issue.
What this proves
One experiment iteration runs end-to-end driven by a score + deterministic TS driver, not an LLM orchestrator:
The trust-tier, source exemplar, env, and promote decision are all data or code — the only judgment call in the loop is the single flat leaf that authors the script. That is the orchestrator dissolving, for one iteration.
Stands on #107 (G-1)
Per #107's recorded ruling: score-first for flow + a thin TS driver only for what the stage model can't express. The experiment-iteration loop is exactly that exception, so the flow lives as data (an
ITERATION.tomlharness score) and the loop lives as a thin driver in theamico-run(CLI) lineage. Blocked-by #107.Acceptance criteria (#109)
agreerunExperimentIteration, TS)What changed
packages/amico-run/src/harness/—iteration_score.ts(parse/validate the data-defined flow) +experiment_iteration.ts(the deterministic loop; the single model seamdispatchExperimenteris pluggable — production wires it toopencode run --agent experimenter).isVerifiedTier()inverify.tsis the single source of truth;cli.tsgates on it.packages/extension/scores/experiment-iteration/ITERATION.toml— the example harness score (data). It is not aSCORE.md, so the interview repertoire loader ignores it by design.s31grep-guard now recursessrc/so it also covers the new harness subdir (tool layer stays CLI/spawn: no fetch/MCP/HTTP).What a reviewer runs
Verified locally:
amico-runtypecheck clean, 115/115 tests pass, demo printsPASS. Extension scores/lint tests unaffected (the new dir is ignored by the interview loader).Design choices a human should confirm
amico-run(CLI lineage), not the VS Code extension. Rationale: spec §7.3 makes the deterministic harness "call the CLI directly — no LLM," and the driver shellsamico-run --specso the launch gate + re-rollout are reused, not re-implemented. The example score still lives underextension/scores/. If reviewers want the driver in the extension proper, that's a move, not a rewrite.promote_on = "agree"gates verified tiers on the re-rollout; avetted(tier-1) target has no re-rollout, so the driver promotes oncompleted(template-trusted). Confirm that's the desired tier-1 behavior.isVerifiedTier= {free, composed}. This is the §4.3 tier-2 extension (G-7 leaned default-on). Confirm default-on for composed vs per-score opt-in.Notes
🤖 Generated with Claude Code