跳到正文

自动方案拷问

grill-autopilot

让一个 AI 拷问方案、另一个 AI 先查现成方案再替你回答,你只需要回答少数真正要你拍板的问题。

版本 1.1.0更新于 在 GitHub 查看源码
本页目录9
  1. 什么时候用它
  2. Grill Autopilot
  3. Contract
  4. 0. Preflight (one tool round)
  5. 1. Pairing
  6. 2. Round loop
  7. 3. Red-team (only when needed)
  8. 4. Escalations and close
  9. Report

什么时候用它

  • 在 Antigravity 宿主运行或任选 Claude Code、Codex、Grok、pi 账号一问一答拷问设计,拿到附证据的决策日志。
  • 选库、选模式前先查仓库、GitHub 和网上的成熟做法,能复用就不重写。
  • 在浏览器里像看群聊一样实时看提问、回答和判定,不占用 agent 的上下文。

技能说明

Grill Autopilot

A thin orchestrator. It composes existing skills and adds only a deterministic ledger and a read-only Watch Page:

PieceComes from
Questions, design tree, glossary, decision recordsgrill-with-docs (grilling + domain-modeling)
Headless peers, multi-round sessions, fallback, web researchagentic-review-handoff → review-loop consult (--resume, --web, --raw)
Answer format check, classification, stop rulesscripts/grill-ledger.mjs (this skill)
Live read-only Watch Page of the sessionscripts/grill-watch.mjs + assets/watch.html (this skill)
Hand-off after the grillwriting-plans, goal-gate, task-completion-loop

Vocabulary is in GLOSSARY.md next to this file: Interviewer, Proxy, Judge, Escalation, Assumption, Decision Log, Pairing, Watch Page.

Contract

  • Delegation. Invoking this skill delegates every grill answer to the Proxy. This overrides grilling's "decisions are the user's" and its closing confirmation. Never ask the user mid-session; the only user contact is one batch of Escalations at the end.
  • Escalation, and nothing else, reaches the user: side effects (safety, external send, payment, deletion); facts only the user knows that block later branches; hard-to-reverse choices whose evidence is weak; an answer that changed twice; a hard-to-reverse choice the Proxy and the red-team still disagree on. Changing product behaviour is not an Escalation here: every decision is proposed and nothing is implemented.
  • Writes. The Interviewer and Proxy are read-only. Only this host session writes, and only: GLOSSARY.md, decision records (status proposed), docs/grill/YYYY-MM-DD-<topic>.md, and run state under .review-handoff/runtime/grill/<topic>/. No commit, push, install or message. The Watch Page server is local and read-only (127.0.0.1, it only reads the run directory).
  • The ledger holds every decision. A decision enters or changes only through a Proxy answer that passed the Gate, or the user's answer to an Escalation. Never edit a decision yourself, in the ledger or in the log; the decision log only restates the ledger.
  • Watching is free. The Watch Page derives everything from the run files below. Never read, fetch, screenshot or poll it; that would spend the tokens it exists to save.
  • Speed budget. One Proxy call per round; 10-minute round timeout; at most 8 rounds, the red-team re-answer included; target under 15 minutes for the whole session.

0. Preflight (one tool round)

  1. Confirm the skills are installed: grilling, domain-modeling (or grill-with-docs) and agentic-review-handoff. Missing → stop and give the one install line: npx skills add mattpocock/skills --skill grill-with-docs --skill grilling --skill domain-modeling / npx skills add adonis0123/adonis-skills --skill agentic-review-handoff.
  2. RL=<agentic-review-handoff dir>/scripts/review-loop.mjs, LEDGER=<this skill dir>/scripts/grill-ledger.mjs, WATCH=<this skill dir>/scripts/grill-watch.mjs, REPO=<repo root>, TOPIC=<kebab-case topic>, RUN=$REPO/.review-handoff/runtime/grill/$TOPIC. Export REVIEW_LOOP_TIMEOUT_MS=600000.
  3. Read GLOSSARY.md, docs/ decision records and AGENTS.md/CLAUDE.md for binding rules (decision-record location and naming follow the repo; default docs/adr/).
  4. Parse options: --interviewer <account>, --proxy <account>, --then plan|goal|loop. External --interviewer and --proxy launchers come from claude, codex, grok (or pi for Interviewer only), such as cc002, codex003, grok002, pi-…. Antigravity (agy) is supported as the current Interviewer host session or as an opt-in --proxy agy, not as an external --interviewer agy launcher; if --interviewer agy is requested from another host, fail cleanly up front with that role limit instead of passing agy into consult --raw.

1. Pairing

  • Interviewer: this host session, running grill-with-docs itself (including when running natively inside Antigravity agy). With --interviewer <account> (from claude, codex, grok, or pi — never agy), an external session driven by references/interviewer-brief.md through consult --raw with its own --resume chain.
  • Proxy: a product different from the Interviewer's, so one model does not grade its own questions.
    • --proxy <account> → --peer=<family> --peer-command=<account> (for claude, codex or grok; if the user names agy, use the agy Proxy flow below).
    • Otherwise, when the Interviewer host is Antigravity (agy), pass --host=agy --skip-host to review-loop consult so the saved Reviewer preference (review-loop prefs) chooses the Proxy.
    • Otherwise, when the Interviewer is pi, read review-loop prefs, choose the first product in its saved order (claude, codex or grok), and pass it explicitly as --peer=<product>. Do not pass --host=pi: preference routing picks only from the three reviewer products and does not accept pi as --host. Pass the remaining saved products in order as --fallback=<product,product>; omit this flag when none remain. Read preferences with node "$RL" prefs, without changing them.
    • For other Interviewer products, --host=<Interviewer product> --skip-host lets the saved Reviewer preference pick it (review-loop prefs).
    • pi has no web search; it can be the Interviewer but not the Proxy.
    • agy (Antigravity) as Proxy is strictly opt-in and only used when the user explicitly names it: never pick it automatically, by default or as a recommendation. It is not a review-loop consult peer, so invoke it via command agy -p ... --conversation <id> (following agent-dispatch references/accounts.md § Antigravity (agy)), save its response as the round's answers, and resume the same conversation ID every round.
  • Red-team (step 3): a third product used by neither role, or skipped when none is installed.

State the pairing in one line when starting, then start the Watch Page in the same tool round and keep going:

bash
node "$WATCH" start --run="$RUN" --topic="$TOPIC" --interviewer=<product:account> --proxy=<product:account> --redteam=<product:account|none>

It opens the page in the browser and prints one line with the URL; pass the URL to the user once. Add --no-open when the user asked for no browser. A page that fails to start never blocks the grill. The server exits by itself 15 minutes after the run is done and the tab is closed, or after 45 quiet minutes.

Run files. The page reads only these names under $RUN, so keep them exact:

FileWritten by
round-<n>.mdthe Interviewer's questions in grilling's round format (round 1 also holds the Proxy brief)
proxy-<n>.logthe consult's stderr (progress heartbeats), via 2>"$RUN/proxy-<n>.log"
answers-<n>.md, answers-<n>-retry.mdthe Proxy's reply text, first try and re-ask
reask-<n>.mdthe re-ask prompt
gate-<n>.json, gate-<n>-retry.json, ledger.jsongrill-ledger.mjs check --out=… (redteam also updates ledger.json)
redteam-question.md, redteam.mdthe red-team prompt and reply
events.jsonlnode "$WATCH" event (prints nothing)

2. Round loop

Each round:

  1. Interviewer turn. Produce the frontier exactly as grilling says (❓ **Q<n>** - **<title>**: <body> then ➡️ <recommendation>), numbering questions Q<n> across the whole session (re-asked questions keep their id). Treat Decided and Assumption answers as the user's; treat Escalation questions as open and do not ask what depends on them.
  2. Proxy turn. Write the questions to $RUN/round-<n>.md.
    • Round 1: fill references/proxy-brief.md with the plan, repo root and binding rules, append the questions, then node "$RL" consult --repo "$REPO" <pairing flags> --web --raw --question-file "$RUN/round-1.md" 2>"$RUN/proxy-1.log".
    • Later rounds: node "$RL" consult --repo "$REPO" --resume <recordPath> --web --raw --question-file "$RUN/round-<n>.md" 2>"$RUN/proxy-<n>.log" (same recordPath every round).
    • The heartbeats go to the log instead of your context; read the log only when the consult fails.
    • Save the result's text to $RUN/answers-<n>.md.
  3. Gate. node "$LEDGER" check --answers="$RUN/answers-<n>.md" --ledger="$RUN/ledger.json" --round=<n> --out="$RUN/gate-<n>.json".
    • Exit 1 with reask: write the re-ask to $RUN/reask-<n>.md and resume the Proxy once with only those ids and their fix lines; save its reply to $RUN/answers-<n>-retry.md and rerun the check on it with --attempt=2 --out="$RUN/gate-<n>-retry.json". A block still broken becomes an UNVERIFIED Assumption, except a recognized escalation condition (side-effect, fact, OPEN, or costly with low confidence) remains an UNVERIFIED Escalation; never ask a third time.
  4. Record inline. Resolved terms go into GLOSSARY.md now (domain-modeling rules: no implementation details). Offer a decision record only when domain-modeling's three conditions hold; write it with status proposed.
  5. Stop when the Interviewer's frontier is empty or the ledger's stop is non-empty.

Failures.

ResultAction
fallbacks present or contextLost: trueThe new Proxy session cannot see earlier rounds: start the next prompt with a short ledger summary (id, decision, status). Chain node "$WATCH" event --run="$RUN" --kind=fallback --text="<from> → <to>".
Timeout with no fallback leftStop the loop and report DELIVERY_UNKNOWN; preserve the session for inspection. Do not resubmit to the same product or switch accounts within its family. Only the consult script may advance its configured fallback products.
Any other failureStop the loop, report it, keep the ledger.

On either stop, chain node "$WATCH" event --run="$RUN" --kind=failed --text="<one line>" so the page shows it.

3. Red-team (only when needed)

If totals.hardToReverseDecided is non-empty, run one advisory consult (not --raw, with --web) on the red-team product with --question-file "$RUN/redteam-question.md". Give it only those decisions with their reason and evidence, and ask for one Q<n>: hold or Q<n>: overturn: <why> line per id. Save its text to $RUN/redteam.md, then record the verdicts: node "$LEDGER" redteam --verdicts="$RUN/redteam.md" --ledger="$RUN/ledger.json". No hard-to-reverse decisions → skip; say so in the log.

An overturn is not a reason to ask the user: the Proxy answers it once more and the ledger rules. When the result's reopen is non-empty:

  1. Write $RUN/round-<n>.md (n = the result's nextRound) with only the reopen questions in the round format, keeping each id and title. The body is the red-team's reason and the instruction to answer again in the answer format: change the decision, or keep it and say why the red-team is wrong.
  2. Resume the Proxy once with that file and run the Gate on the reply as a normal round, re-ask included.
  3. The Gate settles it. A changed decision is classified by the usual rules and marked amended in the ledger. An unchanged one becomes an Escalation: two models disagree on a hard-to-reverse choice.

With no round left under the cap, redteam turns the overturned ids into Escalations itself and reopen is empty. There is no second red-team pass.

4. Escalations and close

  1. Write the decision log from references/decision-log-template.md, every decision and red-team line taken from ledger.json, then node "$WATCH" event --run="$RUN" --kind=done --text="<decision log path>".
  2. No Escalations → done, no question to the user.
  3. Escalations → one batch through the host's question tool, at most 4 per call, ranked costly first, then low confidence. Each shows the Proxy's recommendation as the first option; Antigravity's ask_question tool supports multi-question batches cleanly (up to 4 per call, recommended option first). No question tool → a 需要你拍板 heading followed by the numbered questions.
  4. Answers that unblock the frontier → up to 2 more rounds, then update the log. These answers are the user's, so record them as Decided.
  5. --then: plan → writing-plans with the log as the spec; goal → goal-gate; loop → task-completion-loop. Those skills apply their own gates; the delegation here does not carry over to implementation side effects.

Report

One short block: pairing, rounds and stop reason, duration, counts of Decided / Assumption / Escalation, red-team result, files written, the Watch Page URL, anything UNVERIFIED or skipped.

查看该组