Skip to content

100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.

fix(advisor-executor-worker): field feedback round 2 — injection-safe dispatch

Shubhamsaboo787034aa7f7e
diff --git a/awesome_agent_skills/advisor-executor-worker/README.md b/awesome_agent_skills/advisor-executor-worker/README.md
index 0eea0640..f892edc1 100644
--- a/awesome_agent_skills/advisor-executor-worker/README.md
+++ b/awesome_agent_skills/advisor-executor-worker/README.md
@@ -2,20 +2,47 @@
**One model is a bottleneck. A team with one brain, twenty hands, and a board advisor is not.**
-This skill turns your coding agent into the orchestrator of a three-tier model team:
+This skill turns your coding agent into the orchestrator of a three-tier model team. Big tasks get split into self-contained briefs, blasted across cheap parallel workers, verified one by one, and judged by a stronger model exactly twice — before the work starts and before it ships.
-- **Workers** — the cheapest model that passes verification, dispatched as stateless parallel API calls. Each one sees a single self-contained brief and nothing else.
-- **Orchestrator** — your agent. Owns the hot path: frame, plan, delegate, verify, synthesize. Never does worker-level work itself.
-- **Advisor** — the strongest reasoning model you can reach, consulted exactly where judgment matters: plan review before dispatch, taste pass before delivery, and mid-loop only at commitment boundaries (contradicting results, double failures, structural plan changes).
+<!-- Drop your architecture image at ./architecture.png and uncomment:
+![Architecture](architecture.png)
+-->
-The economics are the point: parallel cheap generation where volume wins, expensive judgment only where it changes a decision. Budgeted — 20 worker calls, 5 consults — so a run can't quietly burn a hole in your API bill.
+```
+ you
+ |
+ v
+ +---------------+
+ | EXECUTOR |
+ | plan-dispatch |
+ | verify-merge |
+ +---+-------+---+
+ briefs | | consults
+ (many, cheap) | | (rare, budgeted)
+ v v
+ +----------------+ +----------------+
+ | WORKERS xN | | ADVISOR |
+ | parallel, fast | | judgment only |
+ +----------------+ +----------------+
+```
+
+## The team
+
+| Role | Default model <sub>(July 2026 — swap freely)</sub> | What it does | What it never does |
+|---|---|---|---|
+| **Executor** (your agent) | GPT-5.5 in Codex CLI | Frames success criteria, plans waves, dispatches briefs, verifies every result, synthesizes the deliverable | Worker-level grunt work |
+| **Workers** | Gemini Flash, bare API calls | One self-contained subtask each, in parallel, stateless — each sees only its brief | Talk to each other, expand scope, get a second chance on the same call |
+| **Advisor** | Claude Fable 5 via `claude -p` | Plan review before any dispatch, taste pass before delivery, called mid-run only at commitment boundaries | Execute anything |
+
+The economics are the point: cheap parallel generation where volume wins, expensive judgment only where it changes a decision. Budgeted — **20 worker calls, 5 consults** — so a run can't quietly burn a hole in your API bill. Models are knobs: the tier pattern is the durable part, the defaults were current in July 2026.
+
+## Why it doesn't fall apart
-## What makes it hold together
+Multi-model loops usually die from context leaks, silent partial failures, or judgment applied too late. Each has a rule here:
-- **Stateless worker briefs** ([references/worker-brief.md](references/worker-brief.md)) — every dispatch carries its full inputs and acceptance criteria inline. No shared context, no context leaks, no "as discussed above."
-- **Verification before synthesis** — every result is judged against its own acceptance criteria: PASS, FIX (redispatched with the named failure), or ESCALATE. Partial passes are never silently accepted.
-- **The advisor is a critic, not an executor** ([references/advisor-consult.md](references/advisor-consult.md)) — it returns a verdict, ranked risks, and concrete fixes in under 300 words. Every note gets applied or explicitly rebutted, never dropped.
-- **Models are knobs** — the defaults (Gemini Flash workers, Claude advisor, Codex orchestrator) were current in July 2026; the tier pattern is the durable part. Swap any role.
+- **Stateless briefs** ([references/worker-brief.md](references/worker-brief.md)) — every dispatch carries its full inputs and acceptance criteria inline. No shared context, no "as discussed above." Briefs travel as temp files with jq-built payloads, never interpolated into shell strings.
+- **Verify before merge** — every result is judged against its own acceptance criteria: PASS, FIX (redispatched with the named failure), or ESCALATE. No silent partial passes, no hand-patching.
+- **The advisor is a critic, not an executor** ([references/advisor-consult.md](references/advisor-consult.md)) — verdict, ranked risks, concrete fixes, under 300 words. Every note gets applied or explicitly rebutted.
## Install
@@ -23,9 +50,9 @@ The economics are the point: parallel cheap generation where volume wins, expens
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/advisor-executor-worker
```
-Or manually: copy this folder into your agent's skills dir (`~/.claude/skills/`, `~/.codex/skills/`, `~/.agents/skills/`).
+Or copy this folder into your agent's skills dir (`~/.claude/skills/`, `~/.codex/skills/`, `~/.agents/skills/`).
-**Requirements** (declared up front, per this repo's rules): workers call the Gemini API (`GEMINI_API_KEY`), the advisor uses the `claude` CLI, and tool-using workers optionally use the `agy` CLI. Missing pieces degrade gracefully — the orchestrator plays the missing role itself and says so.
+**Needs** (declared up front, per this repo's rules): `GEMINI_API_KEY` (falls back to `GOOGLE_API_KEY`) for workers, the `claude` CLI for the advisor, `jq`, and optionally the `agy` CLI for tool-using workers. Anything missing degrades gracefully — your agent plays the missing role itself and says so.
## Use it
@@ -33,13 +60,13 @@ Or manually: copy this folder into your agent's skills dir (`~/.claude/skills/`,
> "Fan this out: research all 12 competitors in parallel and synthesize."
> "Run the advisor-worker loop on this."
-The run ends with the deliverable, the plan, a per-subtask verification ledger, advisor notes applied and rejected, and remaining risks.
+Every run ends with the deliverable, the plan, a per-subtask verification ledger, advisor notes applied and rejected, and remaining risks.
## Files
```
advisor-executor-worker/
-├── SKILL.md # the orchestrator's loop, team, budgets, escalation rules
+├── SKILL.md # the loop, the team, budgets, escalation rules
├── README.md # this file
├── references/worker-brief.md # the stateless dispatch format workers receive
└── references/advisor-consult.md # the consult format the advisor answers in
diff --git a/awesome_agent_skills/advisor-executor-worker/SKILL.md b/awesome_agent_skills/advisor-executor-worker/SKILL.md
index 3305d1bd..3878293b 100644
--- a/awesome_agent_skills/advisor-executor-worker/SKILL.md
+++ b/awesome_agent_skills/advisor-executor-worker/SKILL.md
@@ -15,8 +15,9 @@ metadata:
version: "1.0.0"
source: "https://github.com/Shubhamsaboo/awesome-llm-apps"
compatibility: >-
- Makes network calls: workers run via the Gemini API (needs GEMINI_API_KEY)
- and the advisor via the claude CLI. Optional agy CLI for tool-using workers.
+ Makes network calls: workers run via the Gemini API (needs GEMINI_API_KEY,
+ falls back to GOOGLE_API_KEY) and the advisor via the claude CLI. Needs jq
+ for building JSON payloads safely. Optional agy CLI for tool-using workers.
Written to run in Codex CLI as the orchestrator; adaptable to any harness
that can run shell commands.
---
@@ -39,31 +40,42 @@ verification.
- **Workers (default: Gemini Flash)**, dispatched as bare API calls, not
a CLI. Workers are stateless generation units; the API call is
- faster, cheaper, and leaks zero context:
- `curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent" -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" -d '{"contents":[{"parts":[{"text":"<brief>"}]}]}'`
- Run wave calls in parallel as background processes, each redirected
- to its own scratch file so outputs never interleave:
- `out=$(mktemp); curl -s ... > "$out" & pids+=($!); outs+=("$out")`
- then `wait "${pids[@]}"` and read each scratch file in dispatch
+ faster, cheaper, and leaks zero context. Never paste a brief inline
+ into a shell string — briefs carry quotes and arbitrary text, so
+ inline interpolation is a shell-injection bug, not a style choice.
+ Write each brief to its own temp file with your file tools, build the
+ payload with jq, and give each worker its own output file:
+ `jq -n --rawfile text "$brief" '{contents:[{parts:[{text:$text}]}]}' | curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent" -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" -d @- > "$out" & pids+=($!)`
+ then `wait "${pids[@]}"` and read each output file in dispatch
order. A wave sharing one stdout hands the verify step interleaved
JSON and the run dies at the first parse. Each worker sees only its
brief. Exception: if a subtask genuinely needs tools (web
search, file work), dispatch via Antigravity CLI from an EMPTY temp
- dir so no .antigravity.md or project context leaks into the worker:
- `cd $(mktemp -d) && agy --dangerously-skip-permissions -p "<brief>"`
+ dir so no .antigravity.md or project context leaks into the worker,
+ with the brief read from a file, a minimal environment, and the temp
+ dir removed when the wave completes:
+ `d=$(mktemp -d) && cd "$d" && env -i HOME="$HOME" PATH="$PATH" agy --dangerously-skip-permissions -p "$(cat "$brief")"; rm -rf "$d"`
(Flash is agy's default model; the permissions flag is required in
non-TTY shells or the call hangs, and is safe here only because the
- temp dir is empty. Cap agy workers at 3 parallel, since Antigravity
- quota is shared across its app, CLI, and SDK — enforce it by chunking
- tool-using waves into batches of 3 and waiting between batches.)
-- **Advisor (default: Claude Fable 5)**, consulted via
- `claude --model claude-fable-5 -p "<consult>"` in print mode, which
- reads the pasted material and returns a verdict without touching
+ dir is empty and the environment is minimal. Cap agy workers at 3
+ parallel, since Antigravity quota is shared across its app, CLI, and
+ SDK — enforce it by chunking tool-using waves into batches of 3 and
+ waiting between batches. Clean up all scratch files at run end.)
+- **Advisor (default: Claude Fable 5)**, consulted in print mode with
+ the consult written to a temp file and passed on stdin — never inline
+ in the command string:
+ `claude --model claude-fable-5 -p < "$consult"`
+ It reads the material and returns a verdict without touching
anything. Expensive judgment, kept out of the hot path. Strategy,
decomposition critique, risk spotting, taste. Never execution.
-- Check `$GEMINI_API_KEY` and the `claude` CLI at the frame step. If
- either is missing, say how to set it up, then offer to run degraded
- (you play that role yourself, flagged as degraded).
+- At the frame step, run
+ `export GEMINI_API_KEY="${GEMINI_API_KEY:-$GOOGLE_API_KEY}"` (many
+ machines carry the key under the Google name), then check the key,
+ `jq`, and the `claude` CLI. If something is missing, say how to set
+ it up, then offer to run degraded: you play the missing role
+ yourself, with that output flagged as degraded. Degraded mode is the
+ one exception to the never-do-worker-work rule, and it covers only
+ the missing role.
## The loop
diff --git a/awesome_agent_skills/evals/advisor-executor-worker/evals.json b/awesome_agent_skills/evals/advisor-executor-worker/evals.json
index 7f066d2c..92d22c42 100644
--- a/awesome_agent_skills/evals/advisor-executor-worker/evals.json
+++ b/awesome_agent_skills/evals/advisor-executor-worker/evals.json
@@ -12,17 +12,19 @@
"Every worker result gets a PASS/FIX/ESCALATE verdict against its own criteria",
"The final report includes a verification ledger and advisor notes applied or rebutted",
"Parallel worker outputs are collected from per-worker scratch files (mktemp + redirect, wait, read in dispatch order), never from a shared interleaved stdout",
- "Tool-using (agy) waves are chunked into batches of at most 3 with a wait between batches"
+ "Tool-using (agy) waves are chunked into batches of at most 3 with a wait between batches",
+ "Briefs and consults are written to temp files (payloads built with jq, consults passed on stdin) \u2014 never interpolated inline into shell strings"
]
},
{
"id": 2,
- "prompt": "Fan out this refactor plan across workers, but I only have a GEMINI_API_KEY set up and no claude CLI on this machine.",
+ "prompt": "Fan out this refactor plan across workers, but this machine only has GOOGLE_API_KEY set and no claude CLI.",
"expected_output": "The orchestrator detects the missing advisor at the frame step, explains setup, and offers degraded mode where it plays the advisor itself, flagged as degraded.",
"expectations": [
+ "GEMINI_API_KEY falls back to GOOGLE_API_KEY before being declared missing",
"Tool availability is checked at the frame step, not discovered mid-run",
"The user is told how to set up the missing piece",
- "Degraded mode is offered and, if used, explicitly flagged in the output"
+ "Degraded mode is offered, covers only the missing role, and its output is explicitly flagged as degraded"
]
},
{