Home/Tutorials/PorkiConsult

Tutorial 03 · PorkiConsult

Give your agent another brain.

Let Codex, Grok Build, or Antigravity CLI ask another local subscription CLI or an explicitly approved Gemini 4 Neon or Baseten Kimi K3 reviewer for a focused second opinion. The answer returns with only the bounded context you approved.

About 6 minutesExplicit approvalRead-only worker

Start with the CLIs you already use

PorkiCoder auto-registers its bundled porkicoder-consult MCP server with Codex and Grok Build (and makes the same MCP tools available to Antigravity CLI). Each subscription-backed tool launches the corresponding local CLI and uses its existing login, alongside explicitly consented managed routes.

  • consult_codex uses your ChatGPT or Codex subscription in a read-only sandbox.
  • consult_grok_build uses your Grok Build subscription with tools denied.
  • consult_gemini and consult_kimi3 provide explicitly consented Gemini 4 Neon and Baseten Kimi K3 reviews.

After installing or updating PorkiCoder, open a fresh master terminal session so the CLI receives the current MCP registration and tool schema.

Make your first PorkiConsult call

Ask the master agent in plain language. Name the reviewer and describe the decision you want challenged:

Ask Grok Build to review this retry design. Pass only the proposed algorithm and the failure cases we listed. Focus on correctness and concurrency.

The master prepares a tool call with a question and optional context. PorkiCoder asks for explicit approval. Once approved, the worker runs in a private temporary workspace and returns advisory markdown to the master.

A strong consult request has three parts: the decision, the evidence the reviewer needs, and a narrow review lens such as correctness, security, architecture, or regression risk.

Choose a different model lineage

A second opinion is most useful when the reviewer brings a different model family from the master:

  • Codex as master: ask Grok Build for an independent architecture challenge, or call consult_gemini on Gemini 4 Neon for UI, design, and large-context analysis.
  • Grok Build as master: ask Codex for focused implementation and correctness pressure, or call consult_kimi3_baseten for deep code-heavy reasoning.
  • Antigravity CLI as master: ask Codex or Grok Build to pressure-test edge cases before landing changes.

The master remains responsible for validating the returned advice against the repository and deciding whether to act on it.

Curate a bounded context packet

The subscription worker cannot inspect the repository. Give it the smallest packet that supports a useful answer:

  1. State the exact question or disputed decision.
  2. Include the relevant function, diff, error, or plan excerpt.
  3. List the invariants and constraints that the answer must preserve.
  4. Ask for findings in a format the master can evaluate, such as severity-ranked issues or a short recommendation with tradeoffs.
Question: Can this idempotency design double-charge after a retry?
Context: [paste the bounded handler, transaction boundary, and retry rules]
Return: High, medium, and low severity findings. Cite the supplied lines.

A focused packet reduces noise, limits disclosure, and makes it easier for the master to verify every claim.

Know what the worker can access

Local subscription tools require explicit approval and run read-only in a private temporary workspace. They receive only the question and context supplied to the call.

  • No repository access.
  • No file editing or shell commands.
  • No web, MCP, plugin, or persistent-session access inside the worker.
  • No paid-API fallback for subscription-backed tools.

They consume the selected provider subscription quota. PorkiCoder's separately named API consult tools (consult_gemini and consult_kimi3) require their own explicit paidApiConsent and server-side billing path.

If the consult tool is missing

  1. Start a fresh master terminal after updating PorkiCoder.
  2. Confirm the target CLI is installed and signed in: codex login status or grok --no-auto-update models.
  3. Ask the master to list its MCP tools and confirm porkicoder-consult is connected.
  4. If a user configuration disabled the server, re-enable the porkicoder-consult entry and restart that CLI session.