consultation17.1 KB
View saved version →
---
name: consultation
description: Consult for ordinary material architecture, interface, data-model, or explicit advisor, generic-advisor, authorization, challenge, second-opinion, or architecture-review choices; or, when targeted evidence still leaves unresolved cross-module or system design, compatibility or concurrency boundaries, competing diagnoses, security, privacy, or trust boundaries, recovery, irreversible-state migration, or data-loss decisions; and the completion consultation that complex multi-phase or multi-file work takes before it is declared complete. Skip factual/status/summarization work, fully determined mechanical edits, formatting/renaming/docs synchronization, settled-plan execution, final review owned elsewhere, explicit no-delegation/root-only requests, and every borderline case.
---
# Advisor consultation
Use one fresh, read-only, zero-tool advisor only when the task has a concrete material
decision. The root owns architecture, implementation routing, verification, and acceptance.
Before consultation, the root performs any repository or web research and supplies
enough relevant evidence and source references in the five-section decision packet for
the advisor to recommend a path.
The root may assign bounded evidence gathering to separate research workers before assembling the decision packet; the consulted advisor still uses zero tools and never delegates.
If that evidence cannot settle the question, a valid
advisor result may instead identify a concrete research-first next step, missing
evidence, research questions, or bounded brainstorming areas. The advisor does not
inspect files, call tools, fetch the web, or conduct independent research.
## Declare the route
Read-only discovery may ground the decision. For a consult candidate, inspect the
parent identity before the first implementation write and before its decision record:
```sh
sh <absolute-installed-plugin-root>/scripts/inspect-parent-runtime.sh
```
The preflight uses only `CODEX_THREAD_ID` and the caller-supplied/default sessions
root. It accepts an unambiguous persisted parent with a recognized sandbox policy;
the parent itself need not be read-only because the consultation runs in a distinct
explicitly read-only Codex process. A missing, ambiguous, malformed, or conflicting
parent runtime is unavailable. Do not use `CODEX_SESSION_ID` as a fallback. Emit
exactly one record:
```text
ADVISOR DECISION
route: consult | skip | unavailable
reason: <one task-specific sentence>
question: <bounded decision question, or none>
```
Consult when at least one positive trigger in the description applies. Skip when all
applicable work is routine, the user forbids delegation, or eligibility is borderline.
General quality is not a decision question.
Complex work takes one completion consultation before it is declared complete. This
applies when the task already took `route: consult`, or when it spans multiple phases,
files, or sessions. Emit a second `ADVISOR DECISION` and consult before reporting the
work done. The bounded question is whether the finished work meets its stated contract
and what evidence would falsify that. It is not a final diff review or release
verification, which stay outside this plugin and with their existing owner: the root
still owns verification and acceptance, and the advisor still uses zero tools and sees
only the packet. Routine, single-step, and already-skipped work takes no completion
consultation.
An identified parent uses `route: consult`, including a normal `workspace-write`
root. An unavailable parent uses `route: unavailable`, emits no `ADVISOR CALL`,
starts no consultation process, and does not block the root's own work. The ordinary
`route: skip` path is unchanged.
A non-Codex surface has no supported local transport, so it takes `route: unavailable` and emits no `ADVISOR CALL` or `ADVISOR RESULT`.
## Explicit configuration is separate
The bundled installed `advisor.toml` is live configuration for normal `-
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.