Files
Agent-System-Dev/AGENT-EXECUTION.md
T
weichen 16913620d8 Merge authoritative main into the task branch
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=f1866dc3bb4537ac6446fdd26e696cb636b543ef.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
2026-10-20 07:47:29 +00:00

5.4 KiB

Project Agent Execution

Project-local execution routing configuration. This document is the single authority for which Agent CLI profiles may implement, repair, test, or review bounded units. Human-readable notes may appear outside the machine block; the 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. Implementation, repair, test, and review all use the candidates Cursor, Antigravity (agy), PI with GLM (pi-glm), PI with MiniMax (pi), and Codex. Each candidate may be attempted up to max_attempts_per_profile (3) times on safe recoverable failures (unavailable, failed-clean); after that the controller moves to the next candidate automatically, and the host does not ask the user. The order of the non-Codex candidates may differ per role, but Codex must stay the last candidate in every role list. There is no emergency_profile. fallback_to_host is never: the controller does not emit host-fallback-authorized and does not increment host fallback authorizations. When every candidate is safely exhausted the run ends unavailable or blocked; the host pauses that unit and asks the user whether to retry, and does not write the unit. The legacy value all-unavailable remains parseable and likewise grants no host write authority. Cursor uses cursor-agent-stable. model: auto makes Cursor receive an explicit --model auto; the other CLIs omit the model flag and use their configured default. Any other value is passed to that CLI as its model selector. The integration block declares the host-exempt paths and the transport, admission, and cleanup entry points.

schema: agent-execution/v1

execution:
  fresh_process_per_unit: true
  permission: run-everything
  fallback_to_host: never
  max_parallel: 3
  timeout_seconds: 7200
  idle_timeout_seconds: 600
  summary_bytes: 16384
  raw_output_bytes: 10485760
  max_attempts_per_profile: 3

roles:
  implementation: [cursor, antigravity, pi-glm, pi, codex]
  repair: [cursor, antigravity, pi-glm, pi, codex]
  test: [pi-glm, pi, antigravity, cursor, codex]
  review: [pi-glm, pi, antigravity, cursor, codex]

profiles:
  cursor:
    adapter: cursor
    executable: cursor-agent-stable
    model: auto
    # Re-enabled 2026-10-20: the earlier disable was based on a misreading
    # of ActionRequiredError — the real cause was the DM executor not
    # passing --model auto (cursor fell back to a quota-limited model).
    # Fixed by PR #644 (deps/development-manager pin); quota itself is fine.
    enabled: true

  antigravity:
    adapter: antigravity
    executable: agy
    model: gemini-3.8-flash-high
    enabled: true

  pi-glm:
    adapter: pi
    executable: pi
    model: zai-coding-cn/glm-5.3-flash
    enabled: true

  pi:
    adapter: pi
    executable: pi
    model: minimax-cn/MiniMax-M3
    enabled: true

  codex:
    adapter: codex
    executable: codex
    model: gpt-6.1-sol
    enabled: true

integration:
  exempt_paths: [".task/**", "docs/superpowers/specs/**", "docs/superpowers/plans/**"]
  transport:
    command: scripts/agent-exec apply
  admission:
    command: scripts/agent-exec admit
  cleanup:
    command: make task-finish

Model preferences (project choice)

Generic rules for bounded packets, context budgeting, phase handoff and requested-versus-effective model identity live in the shared standards/agent-execution.md and workflows/handoff.md; project procedure is in policy/delivery.md. This section records only this project's choices.

  • Planning, design and implementation plans: Codex or Claude when available, in the host or a fresh CLI session. This is a preference, not a routing role.
  • Bounded implementation, repair, test and review units: the candidates in the configured role order above, with Codex last. Requested models:
    • Cursor: auto, passed explicitly as --model auto (Cursor Auto).
    • agy: gemini-3.8-flash-high. agy models listed it on 2026-10-20 and a one-line smoke run answered; the effective identity is still taken from each run's events.
    • PI GLM profile (pi-glm): zai-coding-cn/glm-5.3-flash, passed as --model provider/id.
    • PI MiniMax profile (pi): minimax-cn/MiniMax-M3, passed as --model provider/id. PI actual events have reported minimax-cn / MiniMax-M3 and the local offline catalog lists that profile; each run still records the effective model from that run's events.
    • Codex: gpt-6.1-sol, always the last candidate.
  • Assigning a different candidate or model to a unit needs a concrete, task-specific reason recorded in the task record, and stays within the existing roles and candidate lists. It is not a silent permission or routing change. Role lists, attempt limits, timeouts, output limits, Codex as the last candidate, stage isolation and fallback_to_host: never are unchanged by these preferences.
  • A requested model is prompt/config intent. Only the model reported in a run's actual event envelope counts as effective; when the CLI does not report it, record not-observable. Unknown context capacity, a missing agy login or missing automatic compaction are recorded facts, not global fail-closed conditions.