Skip to content

Spec: four more Harnesses (agy, Grok Build, Muse Code, OpenCode) - #442

Merged
JacobStephens2 merged 28 commits into
mainfrom
issue-432
Oct 6, 2026
Merged

JacobStephens2 merged 28 commits into
mainfrom
issue-432

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Spec #432 adds Antigravity CLI (agy), Grok Build (grok), Muse Code (muse) and OpenCode (opencode) alongside Claude Code and Codex. The command line, User config and installed-only Setup select all six; a Command keeps its Harness, Model and Effort through child Runs, Base fixes, Repairs and Resumes.

Command / User config / Setup
  Harness adapter
    Model and Effort check
    instruction fallback + Factory skills
    unattended session / Resume
    stream progress + final message + usage + outcome
    whole-process-tree stop
  • Each Harness owns its protocol in one adapter. Model and Effort checks use agy/Grok catalogs, Muse's cache or minimal call, and an OpenCode standalone call. Setup proposes Muse's non-contributor Model and no OpenCode Model.
  • Sessions and Resumes use fixed unattended flags, trust and self-update overrides from ADR 0013. Factory skills use the CLI's prompt style; Muse/OpenCode warn in progress and the Command log when the required skill was not loaded. agy/OpenCode receive excluded instruction-file fallback links where needed.
  • Each stream supplies progress, session id, failure and final text, with the full stream retained in its Session log. Muse's session log recovers the last reply and usage; OpenCode's export recovers text, usage and outcome, including failed outcomes with exit 0. Missing/unreadable reads retain stream fallbacks. Logs, PRs and Run notifications identify the Harness, Model and Effort.
  • Whole-process-tree interruption covers all six Harnesses, escaped process groups and commands started during the grace period. Whole-Spec review also fixed interruption during Muse checks and OpenCode exports, kept pipe draining interruptible after CLI exit, added Grok error progress, shared fake-CLI helpers and corrected the prerequisites.

Closes #432

Evidence

  • Before: interrupting_a_muse_check_stops_its_whole_process_tree_before_work, interrupting_an_opencode_export_stops_its_whole_process_tree, and interrupting_a_muse_check_after_cli_exit_stops_the_command_holding_its_stream each failed: interruption waited over nine seconds for the command.
    After: each regression passes; the Command exits promptly, its recorded child is stopped, and interrupted checks make no Claim or worktree.
  • Before: error_events_are_condensed_to_progress_with_groks_failure_text failed with [] instead of error: backend unavailable.
    After: standalone error frames and failed result frames emit error progress while retaining Grok's failure text.
  • Final Linux validation: cargo fmt --check; cargo clippy --all-targets -- -D warnings; cargo test (1,170 passed, 0 failed); all four red/green regressions pass. Scenario tests use recorded CLI protocols with fake CLIs; no live paid model calls.
  • Final focused rerun: cargo test --test process_tree --test muse_sessions --test opencode_sessions (34 passed, 0 failed).

Seams under test

  • A real thirdshift Command against fake CLIs on PATH: configuration, Setup, session flags/environment/stdin, skills/instruction links, Resume, logs, PRs, Architecture review outcomes, failures and interruption of escaped commands, including Muse's Model check, output draining after CLI exit and OpenCode's standalone export.
  • Pure parsing of recorded CLI streams, catalogs, Muse session logs and OpenCode exports, including Grok error progress.

Unaddressed findings

Standards

  • Test-only compatibility methods and re-exports retain the old argument/prompt test interface. Kept because Spec story 51 and Ticket 1's testing decision explicitly require the existing Claude/Codex tests to pass unchanged; scenario coverage exercises the production adapter interface.

Spec

None. All four initial Spec findings and the follow-up pipe-draining interruption finding were addressed.

Merge Danger

Door: two-way

Code and configuration additions can be reverted; no data migration.

Blast Radius: sessions

Harness choice, Setup, session launch/recovery and interruption affect all six Harnesses. Unattended permissions and trust follow ADR 0013.

Built with codex · gpt-6.1-sol · xhigh

Tickets

Gather Claude and Codex into Harness adapters
Stop every Harness session process tree on interruption
# Conflicts:
#	README.md
#	src/harness.rs
#	tests/fakes.rs
#	tests/support/fakes.rs
# Conflicts:
#	src/harness.rs
#	tests/fakes.rs
#	tests/support/fakes.rs
Add the agy Harness (Antigravity CLI)
Preserve agy's catalog validation and instruction fallback alongside Muse's skill loading and final-reply recovery. Combine both Harnesses in registration, Setup, User config, documentation and scenario fakes.

Validated with cargo check --locked --all-targets, cargo test --locked --quiet (1127 passed), cargo clippy --locked --all-targets -- -D warnings, cargo fmt --check and git diff --check.
Preserve Grok Build and Muse Code registrations, configuration, Setup, docs and test support. Adapt Grok to the prompt-aware stream interface and cover Muse in the process-tree interruption scenarios.

Validation: cargo check --all-targets; cargo test (1143 passed); cargo clippy --all-targets -- -D warnings; cargo fmt --check; git diff --check.
# Conflicts:
#	README.md
#	src/args.rs
#	src/config.rs
#	src/harness/adapter.rs
#	src/setup.rs
#	tests/process_tree.rs
#	tests/setup.rs
#	tests/support/fakes.rs
@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 6, 2026 18:29
@JacobStephens2
JacobStephens2 merged commit 1a6f21e into main Oct 6, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-432 branch October 6, 2026 18:36
This was referenced Oct 6, 2026
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.

Spec: four more Harnesses (agy, Grok Build, Muse Code, OpenCode)

1 participant