From 8c98635dfd5a53197750f85e963b3f93f2afd055 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 15 Oct 2026 06:48:06 +0000 Subject: [PATCH] Route project work through Cursor agy and PI Why: make the three approved CLIs the only active implementation and test routes Evidence: adapter unit tests, configuration validation, diff check, and real marker probes for all three profiles Impact: narrows project routing and fixes agy prompt binding for noninteractive execution Refs: feature/goal-first-delivery --- AGENT-EXECUTION.md | 39 +++++++------------------------ scripts/agent_exec_adapters.py | 8 +++++-- tests/test_agent_exec_adapters.py | 8 +++++-- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/AGENT-EXECUTION.md b/AGENT-EXECUTION.md index eab0483a..1a8f2023 100644 --- a/AGENT-EXECUTION.md +++ b/AGENT-EXECUTION.md @@ -7,9 +7,10 @@ parser accepts exactly one `agent-execution` fenced block. U3's execution controller and U4's project wiring are integrated. This file is the execution-routing authority for implementation, repair, test, and review. -Installed CLI identity stays unproven until a host runs the U5 probes one -profile at a time. A provider that makes no successful stdin write or -stdout/stderr read for `idle_timeout_seconds` is stopped before +Active routes are intentionally limited to Cursor, Antigravity (`agy`), and +PI. `model: auto` lets each CLI use its configured default model; PI therefore +uses the operator-selected MiniMax default. A provider that makes no successful +stdin write or stdout/stderr read for `idle_timeout_seconds` is stopped before `timeout_seconds`. ```agent-execution @@ -26,10 +27,10 @@ execution: raw_output_bytes: 10485760 roles: - implementation: [cursor, antigravity, claude, codex, pi, kimi, opencode] - repair: [cursor, antigravity, codex, claude] - test: [pi, antigravity, codex] - review: [claude, codex, pi] + implementation: [cursor, antigravity, pi] + repair: [cursor, antigravity, pi] + test: [pi, antigravity, cursor] + review: [pi, antigravity, cursor] profiles: cursor: @@ -44,33 +45,9 @@ profiles: model: auto enabled: true - claude: - adapter: claude - executable: claude - model: auto - enabled: true - - codex: - adapter: codex - executable: codex - model: auto - enabled: true - pi: adapter: pi executable: pi model: auto enabled: true - - kimi: - adapter: kimi - executable: kimi - model: auto - enabled: true - - opencode: - adapter: opencode - executable: opencode - model: auto - enabled: true ``` diff --git a/scripts/agent_exec_adapters.py b/scripts/agent_exec_adapters.py index 61290b55..12fdbda0 100644 --- a/scripts/agent_exec_adapters.py +++ b/scripts/agent_exec_adapters.py @@ -121,7 +121,7 @@ BUILTIN_SPECS: dict[str, AdapterSpec] = { ), "antigravity": AdapterSpec( name="antigravity", - noninteractive_argv=("--print",), + noninteractive_argv=(), run_everything_argv=( "--dangerously-skip-permissions", "--mode", @@ -130,7 +130,7 @@ BUILTIN_SPECS: dict[str, AdapterSpec] = { workspace_flag=None, model_flag="--model", output_argv=("--output-format", "stream-json"), - prompt_transport="positional", + prompt_transport="print", ), "claude": AdapterSpec( name="claude", @@ -289,6 +289,10 @@ def build_invocation( elif spec.prompt_transport == "flag": argv.extend(["--prompt", prompt]) prompt_values.add(prompt) + elif spec.prompt_transport == "print": + # agy 1.3.5 consumes the argv item immediately after --print. + argv.extend(["--print", prompt]) + prompt_values.add(prompt) else: raise ValueError(f"unsupported prompt_transport: {spec.prompt_transport!r}") diff --git a/tests/test_agent_exec_adapters.py b/tests/test_agent_exec_adapters.py index c836eefd..1171aa84 100644 --- a/tests/test_agent_exec_adapters.py +++ b/tests/test_agent_exec_adapters.py @@ -224,10 +224,9 @@ class AgentExecAdapterTests(unittest.TestCase): profile, cfg, self.workspace, self.unit_packet, self.result_path ) self.assertEqual( - inv.argv[:-1], + inv.argv[:-2], ( "agy", - "--print", "--dangerously-skip-permissions", "--mode", "auto", @@ -235,9 +234,14 @@ class AgentExecAdapterTests(unittest.TestCase): "stream-json", ), ) + self.assertEqual(inv.argv[-2], "--print") _assert_bounded_prompt(self, inv.argv[-1], self.packet_body) + self.assertNotIn("--model", inv.argv) + self.assertIsNone(inv.stdin) self.assertEqual(inv.cwd, self.workspace) self.assertEqual(inv.sanitized_display[-1], UNIT_PACKET_MARKER) + self.assertEqual(inv.sanitized_display[-2], "--print") + self.assertNotIn(self.packet_body, " ".join(inv.sanitized_display)) def test_claude_run_everything_argv(self) -> None: _write_fake_cli(self.bindir, "claude", help_text=CLAUDE_HELP)