Skip to content

M6: gpui-agent run --goal runner + GATE-L - #66

Merged
hexuria merged 1 commit into
mainfrom
instinct/m6-run-goal
Oct 17, 2026
Merged

hexuria merged 1 commit into
mainfrom
instinct/m6-run-goal

Conversation

@hexuria

@hexuria hexuria commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

M6: gpui-agent run --goal — the full agent loop over the wire protocol, feature instinct (opt-in; default builds unchanged).

  • Runner (gpui-agent-policy): observe → ActionSpace → UiPolicy::decide → expect_fingerprint gate → dispatch → revision-aware snapshot since re-observe → verify → history. RunOutcome done / abstained / blocked / cap_hit; deterministic RunReceipt (goal, clauses, steps, candidates, final rev, protocol call count, engine).
  • Clause model: then sequential splits, and wait (for|until) splits, it/them resolve to the last typed literal, wait … is a WaitFor clause that advances without dispatching.
  • New evidence channels (clause-level, fail-closed):
    • unplaced_literal withholds verb evidence and strips the verb token from residue — Add "Pay rent" cannot fire Add on an empty draft; Delete "Walk dog" scores every wrong row ~0.
    • Literal words are scored by their own channel and removed from residue (long payload titles can't dilute coverage; fixes the 850-vs-849 TYPE/CLICK near-tie).
    • Operation keywords match the unquoted residue only — "Call Ana" is payload, not invoke.
    • target_phrase drops the verb-position word after a quoted payload (no more Add→Add exact match).
    • nav_locatives — a locative is spent once its page is shown; the full list still excludes it from the clause's object words.
    • toggle_intent + checkbox + object_covered promotes to exact — Toggle Item 137 beats Delete Item 137 by margin in a 200-row list.
    • clause_effect_done — semantic completion (object covered / target gone / payload landed), so navigation alone can't satisfy Turn on X in Settings.
  • Fixes found by the loop: todo-core bumps the revision on every observable mutation (draft type/set_value/backspace, nav, settings toggle); diff_trees no longer emits descendant AddedNodes under a newly added/moved parent; apply_diff skips duplicate grafts; bench judge reads resp.tree, flattens nested nodes, and follows the visible wire default.

Test plan

  • cargo test --workspace --all-features — all suites green (23)
  • cargo test --workspace (feature-free) — green; run subcommand absent
  • gpui-agent-bench local --arm a2 — GATE-L: 16/16, wrong=0, incl. missing-target refusal (exit 2, state unchanged) and 200-row exact select
  • A3 (--escalate-cmd) — blocked on ANTHROPIC_API_KEY

Stacked on #65 (instinct/m5-fingerprint). Gates: GATE-L green; GATE-T blocked on ANTHROPIC_API_KEY.

Generated with Devin

- runner: observe -> ActionSpace -> policy -> fingerprint gate ->
  dispatch -> observe_since (diff/unchanged/full) -> verify -> history;
  clause model: then-splits, and-wait splits, it/them pronoun
  substitution, WaitFor clauses advance without dispatch; post-clause
  break returns Done.
- evidence channels: unplaced_literal withholds verb evidence and
  strips the verb token from residue; literals scored by their own
  channel and removed from residue; operation keywords matched on
  unquoted residue only ("Call Ana" is payload, not invoke);
  target_phrase drops the verb-position word after a quoted payload;
  nav_locatives for spent locatives; toggle+checkbox+object_covered
  promotes to exact; clause_effect_done is semantic.
- todo-core: revision bump on draft type/set_value/backspace, page
  navigation, settings toggle.
- diff: suppress descendant AddedNodes under a newly added or moved
  parent; apply_diff skips duplicate grafts.
- bench judge: snapshot reads resp.tree, tree checks flatten nested
  nodes, visible follows the wire default.
- GATE-L: A2 16/16 pass, wrong=0 (incl. missing-target refusal and
  200-row exact select).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@hexuria
hexuria changed the base branch from instinct/m5-fingerprint to main October 17, 2026 19:01
@hexuria
hexuria merged commit 8e82d33 into main Oct 17, 2026
5 checks passed
@codeitlikemiley
codeitlikemiley deleted the instinct/m6-run-goal branch October 17, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants