/autonomous-fleet:autonomous-fleet-adapter-grokfrom autonomous-fleet
The GROK adapter for autonomous-fleet-core. Maps each engine PRIMITIVE to Grok Build mechanics — subagents via the Task tool, git worktrees for isolation, the Shell tool for git/gh, and the file ledger as the durable source of truth. Load this alongside autonomous-fleet-core when running a mission in Grok instead of Orca. Because Grok has no separate orchestration daemon, the coordinator IS the main Grok session and workers are subagents (Task tool) or worktree-scoped shell-driven sessions; the file ledger is the authority.
Ships in autonomous-fleet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Runtime: Grok Build (the coordinator is the main session; workers are subagents via the Task
tool, or shell-driven sessions scoped to a git worktree). No separate orchestration daemon — the
FILE LEDGER is the durable source of truth across turns. Branch prefix: use BRANCH_PREFIX from
core self-orientation (default fleet/; recorded in DECISIONS.md).
This adapter resolves the core's PRIMITIVES to Grok mechanics. Where Grok cannot provide a primitive natively (e.g. cross-session blocking message queues), the adapter substitutes the file ledger + polling, and says so.
| Primitive | Status | Mechanic |
|---|---|---|
| PLACE | real | git worktree add (+ optional container-use) |
| SPAWN_WORKER | real | Grok Task tool / subagent spawn |
| DISPATCH | real | role-scoped prompt |
| WAIT | degraded | no blocking event API — ledger polling |
| INSPECT | real | shell |
| WORKER_DONE | real | worker return + ledger write |
| ASK / REPLY | absent | no blocking worker→coordinator question exists on this host; workers get DECISION DEFAULTS up front and write BLOCKED to the ledger — a documented FALLBACK, not the engine primitive |
| OPEN_PR / MERGE_PR / CLEANUP | real | gh + worktree remove |
| SYNC_TASK_STATE | degraded | ledger-only |
| SET_GOAL family (9–12) | real | /goal, update_goal |
| LOOP_POLL | real | /loop, scheduler_create |
| CONTINUE_WORKER | real | grok --resume <SESSION_ID> / -c for most-recent (VERIFIED grok 0.2.82, issue #91) |
A git repo (REPO_ROOT resolvable) · gh auth status via Shell (else local merge-commits into BASE)
· git worktree support · gitleaks availability checked · BASE exists (create off the default
branch at current HEAD if absent). The coordinator confirms these with Shell at start. OPTIONAL:
container-use MCP (grok mcp add container-use -- container-use stdio, needs Docker) for sandboxed
container placement, see PLACE(independent) via container-use below.
Machine-readable preflight requires-block:
bins: [grok, git, gh]
activity_hooks: true
env: []
auth:
- check: "gh auth status"
skip_if_intent: "no_scm"
intent_gated:
scm: "willClaimExistingPR"
Grok parallelism is via SUBAGENTS launched with the Task tool — multiple can run concurrently. There is no persistent external task daemon, so:
docs/<mission>-progress.md) is the durable source of truth across turns.independent → git worktree add ../<repo>-<slug>-<run_short> -b <BRANCH_PREFIX><slug>-<run_short> BASE (isolated
checkout on its own branch for a parallel PR).dependent → operate in the current checkout/branch (a fresh subagent or sub-session; no new
worktree).Register: grok mcp add container-use -- container-use stdio (needs Docker). PLACE(independent) MAY
then use a container-use ENVIRONMENT instead of a host git worktree — the canonical loop is in
engine-workers.md → CONTAINER-USE-PLACEMENT. The registration is verified on this host; a full live run is
gated by Grok's own auth (headless Grok hits Auth(AuthorizationRequired)), so exercise it once Grok
login is configured. The engine and loop are proven on the Claude Code and Codex adapters.
-m <model>, use an id the installed grok
actually accepts (the literal composer-2.5-fast is rejected as unknown — do not hard-code it).git worktree add per PLACE(independent), then drive work in that directory via Shell.Build the dispatch payload: (1) if the mission's ## Worker skills lists skills for this worker's
role, prepend Worker skills: "Activate and follow: <names>" per core engine.md; (2) the task
spec and completion contract. Subagent: pass the full payload in the Task-tool prompt (dispatch ==
launch). Sub-session: write the payload into the worktree and begin work there via Shell.
Subagents return to the coordinator when done — collect their structured results. For sub-sessions or long Shell-driven work, poll: re-read the FILE LEDGER and check the worktree's git state. A subagent still running = alive; do not abort it. There is no busy-wait daemon — the coordinator advances when a subagent returns or a polled ledger flag flips. Timeout = checkpoint, not failure.
Non-busy poll (mechanical): between coordinator turns, prefer
./scripts/poll-ledger.sh --ledger docs/<mission>-progress.md --task <id> --expect '<flag>=t'
instead of tight spin loops. Emit trace before each ledger flag flip (see TRACE EMISSION).
Landscape Gap 1 is degraded but closed for Grok: ledger-poll + poll-ledger.sh replaces a
daemon WAIT; Claude Code/Orca have native notifications.
Read the FILE LEDGER (docs/<mission>-progress.md) and git worktree list + gh pr list --base BASE via Shell. None of these consume anything.
gh pr create --base BASE --head <BRANCH_PREFIX><slug>-<run_short> --title "<title>" --body "<body>".gh pr view <n> --json mergeable,mergeStateStatus or trial rebase).
If conflicts: git fetch origin BASE && git rebase origin/BASE, resolve, re-test green,
re-review (relaunch the reviewer subagent on the rebased diff) if logic changed, force-push.
Then gh pr merge <n> --merge --delete-branch (merge commit, commits preserved, NEVER
--squash).git worktree remove ../<repo>-<slug>-<run_short>; set task-row WT_CLEAN=true in the ledger;
pull BASE.Update the FILE LEDGER flag for the task. (No external task daemon to sync — the ledger is the task view.)
Grok Build exposes goal mode via /goal and the update_goal tool (requires goal feature enabled).
SET_GOAL: At mission or campaign start (after ledger init), run /goal <condition> OR instruct
the user to run it if the tool is unavailable in the session. Write the same condition under
## Runtime goal in the ledger per runtime-goals.md. Condition must reference docs/ ledger
and readiness paths — not model self-assessment alone.
UPDATE_GOAL: Call update_goal(message: "<phase>: <summary>") at major transitions (node
done, wave merged, validation passed). Update LAST_UPDATE in the ledger.
GOAL_COMPLETE: Only after core TERMINATE checks: re-read ledger, readiness exists,
the readiness fleet-outcome validates (python3 <SUBSTRATE>/validate_fleet_outcome.py). Then
update_goal(completed: true, message: "<final summary>"). Clear with /goal clear if needed.
GOAL_BLOCKED: update_goal(blocked_reason: "<reason>") when mission hits hard external
dependency or unrecoverable circuit-breaker. Set fleet-outcome.status: blocked in readiness.
LOOP_POLL (optional): /loop <interval> <prompt> or scheduler_create for CI polling —
not for mission sequencing (use fleet-program). monitor for streaming test/log events.
Background shell: background: true on run_terminal_command; poll with
get_command_or_subagent_output.
Headless: grok -p "<prompt with /goal condition>" --max-turns N --yolo — see
scripts/run-mission-headless.sh.
Trace before ledger write on every transition (trace.md TRACE EMISSION). Append events with:
python3 <SUBSTRATE>/emit_trace.py emit .fleet/runs/<run_id>/ \
--primitive DISPATCH --role COORDINATOR --status started \
--task-id <task> --id-only
Capture the printed event id; pass --parent-event <id> on worker COMMIT/INSPECT rows.
If manifest.json is not present yet, add --mission <slug> --run-id <run_id>.
Reviewer isolation on this host — single-vendor caveat (issue #88). A fresh Grok subagent reviewing a Grok build is build-blind as instructed isolation: fresh context, handed only the diff + acceptance criteria, write-isolated. It is NOT the mechanical cross-vendor / separate-process guarantee (Orca's topology) — a same-vendor reviewer can share the builder's blind spots, and nothing in this runtime makes seeing the build session physically impossible. Record
reviewer_mode: same-vendor-instructedin DECISIONS.md and the run outcome. Scope of the "structural" claim: engine-review.md REVIEW step.
Follow the single-sourced contract in
autonomous-fleet-core → references/adapter-contract.md (issue #89 — do
NOT re-inline it here; the drift lint fails copies). It covers run_short
branch/worktree namespacing, the CONTINUE_WORKER resume discipline
(RESUME_COUNT / MAX_RESUME_ATTEMPTS), and reviewer write-isolation. This
adapter's only runtime-specific binding:
grok --resume <SESSION_ID> (or -c/--continue for the cwd's most recent; --fork-session to branch) — VERIFIED grok 0.2.82; else ALIAS to SPAWN_WORKERWhat SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/adversarial-review-and-fix[Tier 2 · moderate autonomy · full review gate · the proven two-phase workhorse] Run a rigorous CODE-GROUNDED adversarial architecture review of a repo, FREEZE it as the source of truth, then close every confirmed finding one at a time until done. Use for a security/architecture/ reliability hardening pass, a pre-production audit-and-remediate, or "review the whole app and fix everything." Phase 0 reviews the actual source (not existing docs) and a skeptic narrows out false findings; Phase 1 fixes the confirmed set with full safety rails. Runs via the autonomous-fleet-core engine. Trigger on: "adversarial review and fix", "audit and remediate", "review the whole app and fix the issues", "harden this before production", "find and fix the architecture problems"./autonomous-fleetEntry point for the autonomous-fleet multi-agent engineering framework. Use whenever the user wants fully-autonomous coding runs, multi-agent orchestration, PR-per-task pipelines, or mentions autonomous-fleet — even if they have not named a specific mission yet. Routes to one mission or to fleet-program for sequential chains, loads autonomous-fleet-core plus a runtime adapter, and runs unattended on the current repo. Install from github.com/ravidsrk/autonomous-fleet. Trigger on: "use autonomous-fleet", "run autonomous fleet", "autonomous multi-agent run", "fleet mission", "which fleet mission should I use".Other plugins' skills for the same job
Generated from the plugin's indexed repository (ravidsrk/autonomous-fleet) — no native marketplace selected
npx claudepluginhub p/ravidsrk-autonomous-fleet