All the quality-pipeline configuration in one place. Three channels: env vars (persistent), slashes (session), /config quality (inspection).
/config quality
Single command that lists the full pipeline state:
Typical output:
✨ AGENT QUALITY PIPELINE ───────────────────────────
CHATCLI_QUALITY_ENABLED : enabled
Hooks registered : pre=0, post=2
── Self-Refine (#5)
CHATCLI_QUALITY_REFINE_ENABLED : disabled
CHATCLI_QUALITY_REFINE_MAX_PASSES : 1
CHATCLI_QUALITY_REFINE_MIN_BYTES : 200
CHATCLI_QUALITY_REFINE_EPSILON : 50
CHATCLI_QUALITY_REFINE_EXCLUDE : formatter, deps, refiner, verifier
── Chain-of-Verification / CoVe (#6)
CHATCLI_QUALITY_VERIFY_ENABLED : disabled
CHATCLI_QUALITY_VERIFY_NUM_QUESTIONS : 3
CHATCLI_QUALITY_VERIFY_REWRITE : enabled
CHATCLI_QUALITY_VERIFY_EXCLUDE : formatter, deps, shell, refiner, verifier
── Reflexion (#3)
CHATCLI_QUALITY_REFLEXION_ENABLED : enabled
CHATCLI_QUALITY_REFLEXION_ON_ERROR : enabled
CHATCLI_QUALITY_REFLEXION_ON_HALLUCINATION: enabled
CHATCLI_QUALITY_REFLEXION_ON_LOW_QUALITY : disabled
CHATCLI_QUALITY_REFLEXION_PERSIST : enabled
── Plan-and-Solve / ReWOO (#2)
CHATCLI_QUALITY_PLAN_FIRST_MODE : auto
CHATCLI_QUALITY_PLAN_FIRST_THRESHOLD : 6
── RAG + HyDE (#4)
CHATCLI_QUALITY_HYDE_ENABLED : disabled
CHATCLI_QUALITY_HYDE_USE_VECTORS : disabled
CHATCLI_QUALITY_HYDE_PROVIDER : (none)
CHATCLI_EMBED_PROVIDER : (not set)
CHATCLI_EMBED_MODEL : (not set)
CHATCLI_QUALITY_HYDE_NUM_KEYWORDS : 5
Vector index : (not attached)
── Reasoning backbone (#7)
CHATCLI_QUALITY_REASONING_MODE : auto
CHATCLI_QUALITY_REASONING_BUDGET : 8000
CHATCLI_QUALITY_REASONING_AUTO_AGENTS: planner, refiner, verifier, reflexion
Slash commands
/thinking — reasoning override
/thinking # show current state
/thinking auto # clear override
/thinking off # force no-thinking for next turn
/thinking on # alias for /thinking high
/thinking low | medium | high | max
/thinking budget=N # nearest tier to N tokens
Details: #7 Reasoning Backbone .
/plan — force Plan-and-Solve
/plan # arm flag; next /agent or /coder uses Plan-First
/plan < free tas k > # arm + enter agent mode with that task
Details: #2 Plan-and-Solve .
/refine — Self-Refine session toggle
/refine # current state
/refine on # enable for session
/refine off # disable
/refine once | next # enable (today identical to on)
/refine auto | clear # clear override → use /config
Details: #5 Self-Refine .
/verify — CoVe session toggle
/verify # current state
/verify on # enable
/verify off # disable
/verify once # enable once
/verify auto # clear override
Details: #6 CoVe .
/reflect — persist a manual lesson
/reflect < free text of the lesso n >
# Ex: /reflect when editing large Go files use Edit, not full rewrite
Writes directly to memory.Fact (category=lesson, trigger=manual) without an LLM call . Useful to capture real-time learnings.
Details: #3 Reflexion .
Env vars — full reference
Master switch
Env var Default Values Effect CHATCLI_QUALITY_ENABLEDtruetrue|falseTurn off the whole pipeline. false = Pipeline.Run → agent.Execute direct, zero overhead
Self-Refine (#5)
Env var Default Values Effect CHATCLI_QUALITY_REFINE_ENABLEDfalsetrue|falseEnable RefineHook CHATCLI_QUALITY_REFINE_MAX_PASSES1int ≥ 1 Hard cap on passes CHATCLI_QUALITY_REFINE_MIN_BYTES200int ≥ 0 Skip outputs smaller than N bytes CHATCLI_QUALITY_REFINE_EPSILON50int ≥ 0 Convergence threshold in chars CHATCLI_QUALITY_REFINE_EXCLUDEformatter,deps,refiner,verifierCSV Agents that don’t pass through refine
CoVe (#6)
Env var Default Values Effect CHATCLI_QUALITY_VERIFY_ENABLEDfalsetrue|falseEnable VerifyHook CHATCLI_QUALITY_VERIFY_NUM_QUESTIONS3int 1-7 Number of verification questions CHATCLI_QUALITY_VERIFY_REWRITEtruetrue|falseRewrite output on discrepancy CHATCLI_QUALITY_VERIFY_EXCLUDEformatter,deps,shell,refiner,verifierCSV Agents that don’t pass through verify
Reflexion (#3)
Env var Default Values Effect CHATCLI_QUALITY_REFLEXION_ENABLEDtruetrue|falseEnable ReflexionHook CHATCLI_QUALITY_REFLEXION_ON_ERRORtruetrue|falseFire on worker error CHATCLI_QUALITY_REFLEXION_ON_HALLUCINATIONtruetrue|falseFire on verified_with_discrepancy CHATCLI_QUALITY_REFLEXION_ON_LOW_QUALITYfalsetrue|falseFire on refine_low_quality CHATCLI_QUALITY_REFLEXION_PERSISTtruetrue|falseWrite to memory.Fact
Plan-and-Solve (#2)
Env var Default Values Effect CHATCLI_QUALITY_PLAN_FIRST_MODEautooff|auto|alwaysWhen to fire CHATCLI_QUALITY_PLAN_FIRST_THRESHOLD6int 0-10 Minimum score for auto to fire
RAG + HyDE (#4)
Env var Default Values Effect CHATCLI_QUALITY_HYDE_ENABLEDfalsetrue|falseEnable phase 3a (keyword expansion) CHATCLI_QUALITY_HYDE_USE_VECTORSfalsetrue|falseEnable phase 3b (vector search) CHATCLI_QUALITY_HYDE_PROVIDER— string Display-only (use CHATCLI_EMBED_PROVIDER to activate) CHATCLI_QUALITY_HYDE_NUM_KEYWORDS5int ≥ 1 Hypothesis keyword cap
Embedding providers (used by HyDE 3b)
Env var Default Values Effect CHATCLI_EMBED_PROVIDERnullvoyage|openai|nullBackend picker CHATCLI_EMBED_MODELprovider default string E.g. voyage-3, text-embedding-3-small CHATCLI_EMBED_DIMENSIONSprovider default int OpenAI only (supports dimensional reduction) VOYAGE_API_KEY— string Required for provider=voyage OPENAI_API_KEY— string Required for provider=openai (uses the same chat key)
Reasoning Backbone (#7)
Env var Default Values Effect CHATCLI_QUALITY_REASONING_MODEautooff|auto|onAuto-attach policy CHATCLI_QUALITY_REASONING_BUDGET8000int (tokens) Thinking budget (Anthropic); mapped to tier on OpenAI CHATCLI_QUALITY_REASONING_AUTO_AGENTSplanner,refiner,verifier,reflexionCSV List for mode=auto
Per-agent overrides (apply to any built-in)
Env var Effect CHATCLI_AGENT_<NAME>_MODELForce specific model for that agent CHATCLI_AGENT_<NAME>_EFFORTForce effort tier (low|medium|high|max)
<NAME> is the uppercase name. For the new ones: REFINER, VERIFIER.
# Examples
export CHATCLI_AGENT_REFINER_MODEL = "claude-haiku-4-5"
export CHATCLI_AGENT_VERIFIER_MODEL = "claude-opus-4-7"
export CHATCLI_AGENT_VERIFIER_EFFORT = "max"
Recommended presets
Cheap dev (default)
Rigorous code review
Technical docs
Incident investigation
Batch autopilot
# No adjustments: chatcli out-of-the-box is already cheap.
# ReAct + Reasoning auto for Planner + Reflexion on (only on errors)
Extra cost per turn: zero normally; +1 LLM call on rare errors.export CHATCLI_QUALITY_REFINE_ENABLED = true
export CHATCLI_QUALITY_REFINE_MAX_PASSES = 2
export CHATCLI_QUALITY_VERIFY_ENABLED = true
export CHATCLI_QUALITY_VERIFY_NUM_QUESTIONS = 5
Extra cost: +3-4 calls per worker with non-mechanical output. Use in critical PR reviews.export CHATCLI_QUALITY_REFINE_ENABLED = true
export CHATCLI_QUALITY_VERIFY_ENABLED = true
export CHATCLI_QUALITY_HYDE_ENABLED = true
# Optional: HyDE vectors for max recall
export CHATCLI_QUALITY_HYDE_USE_VECTORS = true
export CHATCLI_EMBED_PROVIDER = voyage
export VOYAGE_API_KEY = pa- ...
Extra cost: +1 HyDE hypothesis + refine + verify per doc generation. Polished and factually-checked output.export CHATCLI_QUALITY_REASONING_MODE = on
export CHATCLI_QUALITY_REASONING_BUDGET = 16384
export CHATCLI_QUALITY_REFLEXION_ON_LOW_QUALITY = true
Extra cost: max thinking across all agents + generous lesson generation. Use in root-cause analysis.export CHATCLI_QUALITY_PLAN_FIRST_MODE = always
export CHATCLI_QUALITY_REFINE_ENABLED = true
export CHATCLI_QUALITY_VERIFY_ENABLED = true
export CHATCLI_QUALITY_REASONING_MODE = on
Extra cost: all patterns always on. Use in workflows without a user in front (cron, CI).
Turn everything off
If something breaks in production and you need to return to pre-pipeline behavior instantly:
export CHATCLI_QUALITY_ENABLED = false
This makes Pipeline.Run degenerate to return agent.Execute(...) — byte-identical to pre-PR chatcli. Zero hooks, zero reasoning auto-attach, zero HyDE.
The master switch is the emergency exit. Individual toggles are for tuning scenarios; the master is for rollback.
Interaction with other configs
The quality pipeline does not conflict with, nor replace:
Feature Relationship Skills (with frontmatter effort:) Wins over applyAutoReasoning (skill hint already on ctx) Personas (custom agents) Can have effort: in their .md; per-agent override still works Multi-agent orchestration Dispatcher stays identical; pipeline only wraps each worker Policy (CODER policy rules) Applied inside the worker, independent of refine/verify/reflexion MCP tools Result of MCP tools goes through the pipeline like any other worker output
See also
Seven patterns overview Back to the hub.
Environment Variables (full) The whole ChatCLI env var matrix.
Command Reference Every slash.
/config (hierarchical) How /config <section> was structured.