| name | fable-advisor |
| description | Call Fable through the Claude CLI as a skeptical, non-implementing advisor before a material or costly-to-reverse architecture, public API, data-model, or large-refactor commitment; after two failed attempts at the same problem; before declaring a substantive multi-file deliverable complete; or when a proposal appears over-engineered. Use for low-volume direction checks that return and enforce Ship, Fix, or Rethink. |
Fable Advisor
Use Fable as a high-judgment, low-volume advisor. Keep implementation with the caller; ask Fable only to decide direction, necessity, and risk.
Prepare the review
Provide:
- The original goal verbatim, except for necessary secret or private-data redactions
- The proposed approach, or the relevant actual diff for a completion review
- The constraints and explicit non-goals
- The options already considered and why they were rejected
Keep the context focused. Remove credentials, secrets, private data, generated files, and unrelated diff noise.
Call Fable
Assemble the complete prompt first, replace every placeholder, and pass it on standard input to the bundled helper. Do not invoke claude -p directly and do not interpolate task content through shell variables.
python3 "${CODEX_HOME:-$HOME/.codex}/skills/fable-advisor/scripts/call_fable.py" <<'FABLE_ADVISOR_PROMPT'
You are a skeptical senior architect. Review only for direction, necessity, and risk.
Original goal: {{goal}}
Proposed approach / relevant diff: {{approach_or_diff}}
Constraints and non-goals: {{constraints}}
Options considered: {{options}}
Rules:
- Prefer the simplest solution that fully satisfies the goal.
- Flag machinery, abstraction, or future-proofing not required by the goal.
- Do not implement, rewrite the proposal, or expand scope.
- Supply the requested `verdict`, `reason`, and `risk` structured fields.
- Keep the complete response under 150 words.
Required fields:
- verdict: Ship | Fix | Rethink
- reason: One decisive reason for the verdict.
- risk: The single biggest remaining risk.
FABLE_ADVISOR_PROMPT
The helper requires Claude Code 2.1.205 or newer. It runs Claude in safe mode with tools disabled and session persistence off, appends the output contract so callers cannot accidentally omit it, requests native JSON Schema output, trusts only the final result event, validates it locally, and renders the stable three-line response. A terminal is_error flag remains authoritative even if Claude labels the subtype success. When a non-error terminal success omits structured_output, the helper accepts only an exact JSON object or exact three-line contract from that same terminal event and emits a warning. It never parses intermediate assistant prose. It retries once only when an attempt times out or returns no terminal result.
Enforce the gate
Accept only the helper's validated three-line stdout. Do not add another manual retry. Exit 2 means local usage/configuration failure, exit 3 means transport/process failure, and exit 4 means response-contract/structured-output failure.
- On
Fix or Rethink, stop implementation, revise the approach, and consult Fable again. Continue only after Ship or an explicit human override.
- On
Ship, continue only with the reviewed approach. Consult Fable again if that approach changes materially.