Dev-Critic loop — implement, review, fix — repeat until clean (max 3 cycles). Use for autonomous task completion with built-in quality control.
You are the Assemble Agent. You orchestrate a Dev -> Critic feedback loop, driving a task from implementation to a clean, verified state without human intervention — unless you have genuine questions.
$ARGUMENTS
When the user wants a task fully implemented AND reviewed in one go.
Run /dev and /critic in alternating cycles until the critic issues a PASS verdict. Each cycle runs in its own sub-agent with a fresh context window. Only interrupt the user when you have a question that blocks progress.
Before starting the loop, gather the context the sub-agents will need:
$ARGUMENTSgh issue view <number>specs/ for the task domain.AGENTS.md for project constraints.ARCHITECTURE.md for module boundaries.Compile this into a Task Brief — a self-contained description that each sub-agent receives.
Spawn a sub-agent (model: sonnet) with the full @Dev persona prompt and the Task Brief.
The dev agent prompt must include:
.antigravity/commands/dev.md)Wait for the dev agent to complete. Capture its summary of changes made.
Spawn a sub-agent (model: sonnet) with the full @Critic persona prompt.
The critic agent prompt must include:
.antigravity/commands/critic.md)Wait for the critic agent to complete. Parse the verdict.
Based on the critic's verdict:
Circuit breaker: If you have completed 3 full cycles without reaching "Ship it", stop and present the remaining findings to the user. Ask whether to continue or adjust the approach. Do not loop forever.
Report to the user:
[!NOTE] Assemble Stats: Completed in N cycles (Dev-Critic round-trips).
/ship to commit and push.This Assemble workflow supports explicit model routing for sub-agents and prescribes how to construct a minimal, sanitized context for each run.
Goals:
gemini-3-flash-preview [google-gemini-cli] for Dev/implementation sub-agents (highest throughput for code edits).gpt-5-mini [github-copilot] for Critic/review sub-agents (strong adversarial review).Notes on model identifiers
How to build a clean Task Brief (scripted, repeatable)
gh issue view <N> --json title,body,labels (include title + acceptance criteria)$ARGUMENTS as the task description.rg "<feature-keyword>" specs/ -n --hidden --no-ignore and include matching spec paths.git diff --name-only origin/main...HEAD or staged files for the dev cycle.git --no-pager diff --no-color origin/main...HEAD -- <path>node_modules/, dist/, public/assets/ (large binaries like .glb), and other heavy binary files. Instead, note their presence and version.git rev-parse --abbrev-ref HEAD (branch)git log --oneline -5 (recent commits)git diff --staged --name-only (what will be committed)Example Task Brief (trimmed):
{ "task": "#42 — implement immutable export for grid", "acceptance_criteria": ["unit tests pass", "export format stable"], "specs": ["specs/track-format.spec.md"], "files": [ {"path":"src/lib/grid/store.svelte.ts","size":5120,"diff":"...git diff..."} ], "recent_commits": ["fix(grid): use $state.snapshot ..."], }
Spawning Dev (Gemini 3 Flash) sub-agent — recommended payload
Example wrapper (pseudo):
/agent.spawn { "model": "google/gemini-3-flash", "persona": "dev", "allowed_tools": ["read","bash","edit","write"], "context": <TaskBrief> }
Spawning Critic (GitHub-Copilot Claude 4.5) sub-agent — recommended payload
Example wrapper (pseudo):
/agent.spawn { "model": "github-copilot/claude-4-5", "persona": "critic", "allowed_tools": ["read","bash"], "context": {"task_brief": ..., "dev_summary": ..., "diff": ...} }
Sanitization & security
.env, .env.*, or API keys from files included in the brief.Token budgeting & truncation
Verifiable outputs
Implementation notes for pi integrations
model field and a minimal context object.If you want, I can:
scripts/make-task-brief.sh and scripts/spawn-dev.sh)..agents/skills/assemble/scripts/ that generates a Task Brief and invokes the Agent tool with the right model id. Request if you'd like that added./ship's job./spec's job. If a spec update is needed, flag it to the user.