Multi-agent orchestration framework and universal agent skill coordinating Google Antigravity (
agy), Anthropic Claude Code (claude), and OpenAI Codex (codex).
No single AI coding assistant is optimal for every phase of software engineering. Complex software requires diverse cognitive strengths:
- Google Antigravity (
agy) excels at deep codebase reconnaissance, multimodal architecture design, complex dependency analysis, and adversarial edge-case auditing. - Anthropic Claude Code (
claude) excels at nuanced semantic reasoning, high-taste code craftsmanship, domain modeling, and surgical refactoring. - OpenAI Codex (
codex) excels at rapid execution, test harness generation, terminal build commands, CI/CD pipeline authoring, and deterministic regression fixes.
Tri-Agent Orchestrator connects all three into a synchronized pipeline using standardized inter-agent contracts (HANDOFF.md), preventing hallucination cascades and delivering production-ready, verified code.
flowchart LR
subgraph Phase1["Phase 1: Architecture & Spec"]
AGY["πͺ Google Antigravity\n(Chief Architect & Auditor)"]
end
subgraph Phase2["Phase 2: Core Craftsmanship"]
CLAUDE["π§ Anthropic Claude Code\n(Lead Software Craftsman)"]
end
subgraph Phase3["Phase 3: Reliability & Ops"]
CODEX["β‘ OpenAI Codex\n(Test & Deployment Engineer)"]
end
AGY -->|"docs/tri-agent/SPEC.md\n+ HANDOFF.md"| CLAUDE
CLAUDE -->|"Source Code\n+ HANDOFF.md"| CODEX
CODEX -->|"Verified Tests\n+ GitHub PR"| Production([Production PR])
| Agent CLI | Primary Role | Cognitive Superpower | Responsibilities in Workflow |
|---|---|---|---|
agy (Antigravity) |
Chief Architect & Auditor | Multimodal analysis, dependency graphs, security modeling | β’ System architecture & RFC drafting β’ Adversarial edge-case discovery β’ Visual UI/UX verification |
claude (Claude Code) |
Lead Software Craftsman | Architectural taste, clean abstractions, contextual refactoring | β’ Domain logic & API implementation β’ Technical debt refactoring β’ Clean code patterns & documentation |
codex (Codex CLI) |
Reliability & Ops Engineer | Fast execution, test generation, build systems, bash tooling | β’ Unit & integration test suites β’ Linting & typecheck fixes β’ Git commits & PR preparation |
git clone https://github.com/abhigyan6/tri-agent-orchestrator.git
cd tri-agent-orchestratorCheck if all three agent CLIs and developer tools are ready:
./bin/tri-agent doctorOutput:
=======================================================
πΈ Tri-Agent Orchestrator: Environment Doctor
=======================================================
Coding Agents Status:
β
Google Antigravity (agy) : 1.5.4
β
Anthropic Claude Code (claude) : 2.1.322
β
OpenAI Codex (codex) : 0.167.0
Status Summary:
π All 3 agent CLIs (Antigravity, Claude Code, Codex) are active and ready!
Install or symlink the skill so Antigravity, Claude Code, and Codex can use it natively:
./scripts/install-skill.shpython3 -m unittest discover -s tests -vThe suite uses only the standard library and does not invoke any agent CLI.
Whenever an agent concludes its phase, it produces or updates HANDOFF.md in the repository root:
# Tri-Agent Handoff Contract
## Metadata
- **Workflow ID:** `wf-20261110-a9f3b1`
- **Active Feature:** `auth-middleware`
- **Current Phase:** `Phase 1: Architecture & Specification`
- **Completed By:** `agy`
- **Next Agent:** `claude`
- **Timestamp:** `2026-11-10T16:00:00Z`
## What Was Done
- Designed RS256 token rotation architecture.
- Outlined CSRF defense and SameSite=Strict cookie invariants.
## Key Files & Artifacts
- Specification: `docs/tri-agent/SPEC-auth.md`
## Critical Constraints & Decisions
- Token expiration: 15 minutes access, 7 days refresh.
- No third-party heavy dependencies; use native Web Crypto or jose.
## Verification Checklist for Next Agent
- [ ] Implement `src/middleware/auth.ts` matching `SPEC-auth.md`.
- [ ] Export `AuthRequest` and `TokenPayload` types.
- [ ] Update `HANDOFF.md` and set Next Agent to `codex`.The repository includes a dedicated CLI helper (bin/tri-agent):
# Check system health across all 3 agent CLIs
tri-agent doctor
# Install the skill to ~/.agents/skills, ~/.claude/skills, and ~/.codex/skills
tri-agent install-skill
# Summarize the handoff in the current project (metadata + checklist progress); --raw prints the full file
tri-agent handoff status
# Initialize a new handoff contract
tri-agent handoff create --feature "rate-limiter" --completed agy --next claude
# Run a workflow: relay (default), debate, or audit
tri-agent run --workflow relay --prompt "Build modern auth middleware with JWT rotation"
tri-agent run --workflow debate --prompt "Choose a session store for the cart"
tri-agent run --workflow audit --feature uploads --prompt "Harden the file upload endpoint"
# Preview the exact commands without invoking any agent
tri-agent run --workflow relay --prompt "Build file upload component" --dry-runRequirements: Python 3.9+ (standard library only, no pip install step).
Every stage is checked before the next agent starts. A run stops at the first violation, and tri-agent run exits non-zero so it can gate scripts and CI.
| Check | What it enforces |
|---|---|
| Artifacts | Each step's expected files (for example docs/tri-agent/SPEC-<feature>.md) exist and are non-empty. |
| Handoff | HANDOFF.md was rewritten by this step, with the expected Completed By and Next Agent. A stale file from an earlier run does not count. |
| Write scope | The read-only-by-intent auditor may only change docs/tri-agent/ and HANDOFF.md. Any other git-visible change stops the run. |
| Concurrency | A lock at tmp/tri-agent/run.lock stops a second run in the same repository. A stale lock from a dead process is taken over. |
| Audit trail | Every agent's prompt and output is saved under tmp/tri-agent/runs/<timestamp>-<feature>/. |
The write-scope check is detection, not prevention. An agent can still edit a forbidden file during its turn. The run then stops and reports the path, but the edit stays in the working tree for you to review or revert.
Permissions for headless runs. Each step passes the agent's own permission mode:
| Agent | Edit steps | Command |
|---|---|---|
| Claude Code | --permission-mode acceptEdits |
--print |
| Codex | --sandbox workspace-write |
exec |
| Antigravity | --mode accept-edits |
--print |
Edits are allowed, but shell commands are not auto-approved. Headless Claude Code and Antigravity deny tool calls such as running tests unless you allow them. Antigravity's denial message points to permissions.allow in its settings.json. Granting that is a security decision for you, so this tool does not do it. Before relying on unattended test runs, do one supervised run per agent and confirm the test step actually executes; this has not been verified end to end.
Output size. Each agent call is limited to 600 seconds by default. Change it with --timeout.
tri-agent-orchestrator/
βββ SKILL.md # Universal Agent Skill definition
βββ README.md # Documentation & architecture guide
βββ LICENSE # MIT License
βββ init-repo.sh # Git initialization and GitHub push script
βββ bin/
β βββ tri-agent # Executable CLI orchestrator
βββ lib/
β βββ agents.py # CLI invocation wrappers for agy, claude, codex
β βββ __init__.py
β βββ orchestrator.py # Handoff contracts, skill installation, environment checks
β βββ templates.py # Renders templates/ files with {{PLACEHOLDER}} values
β βββ workflows.py # Relay / debate / audit stage planning and execution
βββ workflows/
β βββ 01-relay-pipeline.md # Research -> Build -> Verify pipeline
β βββ 02-parallel-debate.md # Multi-agent architecture consensus
β βββ 03-redteam-audit.md # Implementation & adversarial red-team audit
βββ templates/
β βββ HANDOFF.template.md # Handoff contract (single source of truth)
β βββ AGENT_SPEC.template.md # Architectural spec schema template
βββ examples/
β βββ auth-middleware-walkthrough.md # Auth middleware walkthrough
β βββ file-upload-spec-walkthrough.md # File upload walkthrough
βββ .github/workflows/
β βββ ci.yml # Tests on Python 3.9 and 3.12, dry-run smoke test
βββ tests/
β βββ test_tri_agent.py # Unit tests (standard library only)
βββ scripts/
βββ install-skill.sh # Cross-agent skill installation (delegates to bin/tri-agent)
Once the skill is active, you can invoke your workflows naturally:
"Run the tri-agent workflow to research and build a modern auth middleware for my app."
"Read HANDOFF.md and implement the components outlined in docs/tri-agent/SPEC.md."
"Check HANDOFF.md, write unit and edge-case tests for the new auth middleware, and verify they all pass."
Distributed under the MIT License.