---
name: grill-agent
description: Grill a Markdown spec against a second agent CLI running live in a visible tmux pane, which stands in for the product owner and defends the spec's strategic intent. Use when a spec, plan or design doc needs relentless refinement but you want an agent — not the human — answering the questions. Trigger on "grill agent", "grill this spec with an agent", "agent-to-agent grilling", "have an agent defend this spec".
disable-model-invocation: true
---

# grill-agent — agent-to-agent grilling

The **`grill-me`** interview, with a **second agent CLI in the interviewee seat**. Claude Code
asks; a configurable agent — running live in a visible tmux split from the same project directory
— answers as the product owner. Both sessions stay alive, so each side keeps its own context for
the whole interview.

**`grill-me` is the source of truth for the interview technique.** Read
`~/.claude/skills/grill-me/SKILL.md` and follow it exactly; this skill changes only *who answers*,
never how the questions are asked.

**The point is not to skip the human.** It is to get a spec grilled by something that has read the
whole repo and will defend the spec's strategic intent without tiring. The interviewee's standing
mandate is that the result must be genuinely useful and fully working — it refuses low-value,
low-effort answers on the owner's behalf.

## Input

A Markdown spec: a design doc, an RFC, a plan, a sprint or milestone goal-file — anything that needs
refining. If the user did not name one, ask which file before doing anything else.

## Setup — DETECT first, then ask. Never guess, never hardcode a roster.

**Step 1 — probe the machine.** Run this before saying anything about options:

```bash
bash ~/.claude/skills/grill-agent/scripts/ga-detect.sh
```

It reports every agent CLI on `PATH` with its version, **whether that CLI is actually logged
in**, how to pin its model and reasoning effort, and the live model list pulled from the
authenticated account. Installed is not usable: a CLI that is on `PATH` but logged out will fail
the moment the interview starts, so only `✅ READY` entries may be offered. For the full model
list of one CLI: `ga-detect.sh --models <cli>`.

**Step 2 — put the choice to the user as a decision**, using whatever the probe returned as the
option set — never a remembered list. Offer the CLI, the model, the reasoning effort, and the
permission level together, with one recommended combination, so a single `go` starts the session.

Choose the recommendation on evidence, in this order:
1. A `✅ READY` CLI whose account exposes a strong reasoning model.
2. Highest reasoning effort that CLI supports — the interviewee's job is to think hard.
3. **FULL AUTONOMY (yolo) — always, whichever CLI.** The interviewee runs unattended in a
   pane: a permission prompt there blocks forever and looks exactly like a thinking agent.
   Use the `yolo :` flag the probe printed for the chosen CLI — e.g. codex
   `--dangerously-bypass-approvals-and-sandbox`, devin `--permission-mode dangerous`,
   claude `--dangerously-skip-permissions`, gemini `--approval-mode yolo`. Never launch an
   interviewee that can stop and ask.
4. **Pane width 50% — an even side-by-side split**, interviewee on the right, unless the user says otherwise.

If the probe finds **no** `✅ READY` CLI, stop and report which ones are installed-but-logged-out
with the exact login command the probe printed. Do not attempt to launch a logged-out CLI.

**Always pin model and effort in the invocation** rather than inheriting them from the CLI's own
config (`~/.codex/config.toml`, `~/.config/devin/config.json`), so an unrelated config edit
elsewhere cannot silently swap who is being interviewed. Shape of a pinned invocation — take the
actual flags from the probe's `pin :` line for the chosen CLI:

```bash
codex -m <model> -c model_reasoning_effort="xhigh" --dangerously-bypass-approvals-and-sandbox
devin --model <model> --permission-mode dangerous
claude --model <alias> --dangerously-skip-permissions
gemini -m <model> --approval-mode yolo
```

Preconditions: you must be inside tmux (`$TMUX` set) and the CLI must be on `PATH`. If not inside
tmux, stop and tell the user to start Claude Code inside a tmux session — do not fall back to a
headless run, because the visible pane is the point.

## Run

1. **Start the pane IN THE PROJECT ROOT.** The interviewee must see the same repo you do —
   launched from a subdirectory it answers from a partial view while sounding confident.
   `--dir` defaults to the git root; pass it explicitly when the project is not a git repo.
   The pane always opens beside this session, in this window — never elsewhere.

   ```bash
   bash ~/.claude/skills/grill-agent/scripts/ga-pane.sh start \
     --cmd '<the pinned invocation the user chose in Setup>' \
     --dir "$(git rev-parse --show-toplevel)" --pct 50 --name grillee
   ```

2. **Send the interviewee brief.** Take `~/.claude/skills/grill-agent/INTERVIEWEE-BRIEF.md`,
   substitute `{{SPEC_PATH}}`, `{{REPO_ROOT}}`, `{{EXTRA_CONTEXT}}`, write it to
   `.scratch/grill-agent/grillee/brief.md`, and send it. Wait for `READY`. If the reply is not
   READY plus a strategic-intent statement, send one correction; if it still is not, stop and
   report — an interviewee that did not read the repo will waste the whole session.

   ```bash
   bash ~/.claude/skills/grill-agent/scripts/ga-pane.sh send \
     --name grillee --file .scratch/grill-agent/grillee/brief.md --timeout 900 --quiet 10
   ```

3. **Read the spec yourself.** You are the interviewer; you must know the material as well as the
   interviewee does. Read the repo areas the spec touches too.

4. **Run the `grill-me` flow, unchanged** — read `~/.claude/skills/grill-me/SKILL.md` and follow
   it: interview relentlessly about every aspect until shared understanding, walk each branch of
   the design tree resolving dependencies between decisions one-by-one, provide your recommended
   answer for every question, ask one question at a time, and explore the codebase yourself when
   a question can be answered that way. The only substitution is the respondent.

5. **Per question:** write it to a temp file under `.scratch/grill-agent/grillee/`, send it with
   `ga-pane.sh send`, and read the captured pane output. That output **is the user's answer** —
   treat it exactly as you would a human reply.

6. **Between questions, keep the human in the loop.** After each turn, print a compact line to the
   human: the question, the decision that came back, and where it moved the design. The human can
   interject at any time, and their word **overrides the interviewee without argument**.

## Handling the interviewee's answers

- **A non-answer is a failed turn, not a decision.** "Up to you", "either works", silence: re-ask
  once, quoting the brief's requirement to decide. Still nothing → record the decision as OPEN and
  escalate it to the human at the end rather than inventing consensus.
- **`NEEDS-REAL-WORLD: x`** — a genuine dependency on a real user, live data, price, or ruling.
  Record it, do not grind on it, move to the next branch.
- **Verify claims about the repo.** The interviewee can be confidently wrong. If an answer rests
  on a factual claim about the code, check the code before building on it. A wrong premise
  silently propagates through every later decision.
- **Do not let it design by delegation back to you.** If it answers with "whatever you recommend",
  that is a non-answer — push once, then mark OPEN.

## Stop condition

Stop when either holds, and say which:

- **Resolved** — every branch of the decision tree has a decision, and nothing material is left to
  decide before someone builds it.
- **Only real-world validation remains** — every open item is a `NEEDS-REAL-WORLD` that no amount
  of further interviewing can settle.

Do not stop merely because the answers got agreeable — agreement without remaining tension usually
means the questions stopped being hard, not that the design converged.

**Stopping the interview never means stopping the agent.** The pane stays open past the end of the
session; see Output rule 3.

## Output

1. **Write the agreed design back.** Default: update the source spec in place so it now carries
   the resolved decisions. If the user prefers a separate artifact, write
   `<spec-dir>/<spec-name>-grilled.md`. Every decision, the reasoning that survived, and the
   constraints agreed.
2. **List the open items** — OPEN decisions and every `NEEDS-REAL-WORLD`, each with what would
   settle it.
3. **LEAVE THE AGENT PANE OPEN — always.** The session ending does not end the pane. Never run
   `ga-pane.sh stop`, never `tmux kill-pane`, never close it "to tidy up", not even when the
   design is fully resolved and the output is written. The interviewee keeps its whole context,
   so the user can carry on talking to it directly in that pane — reopening later would start a
   blank agent that has read none of this. Closing it is the user's call alone: tell them
   `ga-pane.sh stop --name grillee` is how, and let them decide when.
4. **Point at the transcript** — full turn-by-turn Q&A is under `.scratch/grill-agent/grillee/turns/`.

## Failure modes worth naming

- **Not inside tmux** — stop; the visible pane is the feature.
- **Pane died mid-interview** (`__GA_STATE__=PANE_GONE`) — report the turn it died on, keep the
  transcript, ask the user whether to restart. Never fabricate the missing answer.
- **`__GA_STATE__=TIMEOUT`** — the interviewee is still thinking or is stuck. Capture, report, and
  ask; do not silently move on.
- **Interviewee starts interviewing you** — redirect once to the brief; it answers, you ask.
