Skip to main content
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:
/config quality
Typical output:
✨ AGENT HARNESS/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
  CHATCLI_QUALITY_REFINE_CONVERGENCE_ENABLED   : enabled
  CHATCLI_QUALITY_REFINE_CONVERGENCE_EMBEDDING : disabled
  CHATCLI_QUALITY_REFINE_CONVERGENCE_STRICT    : disabled
  CHATCLI_QUALITY_REFINE_CONVERGENCE_CHAR_HIGH : 0.99
  CHATCLI_QUALITY_REFINE_CONVERGENCE_JACCARD_HIGH: 0.95
  CHATCLI_QUALITY_REFINE_CONVERGENCE_EMBEDDING_SIM: 0.92

  ── 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
  CHATCLI_QUALITY_REFLEXION_QUEUE_ENABLED : enabled
  CHATCLI_QUALITY_REFLEXION_QUEUE_WORKERS : 2
  CHATCLI_QUALITY_REFLEXION_QUEUE_CAPACITY: 1000
  CHATCLI_QUALITY_REFLEXION_QUEUE_MAX_ATTEMPTS: 5
  CHATCLI_QUALITY_REFLEXION_QUEUE_STALE_AFTER : 168h0m0s
  Runtime state                         : queue=0 dlq=0

  ── 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_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 task>                   # arm + enter agent mode and execute
/plan agent <task>                  # explicit equivalent of the previous form
/plan coder <task>                  # enter coder mode (software engineer) and execute
/plan preview <task>                # dry-run: generate and render the plan WITHOUT executing
/plan dry <task>                    # alias of preview
Recommended flow for large changes: /plan preview <task> β†’ review the plan β†’ /plan coder <same task> to execute.
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 β€” durable lesson queue

/reflect <free text of the lesson>
# Ex: /reflect when editing large Go files use Edit, not full rewrite
/reflect <free text> writes directly to memory.Fact (category=lesson, trigger=manual) without an LLM call. The queue subcommands (list/failed/retry/purge/drain) show and operate on automatic triggers (error, hallucination, low quality) buffered in the WAL awaiting async processing.
/reflect retry and /reflect purge feature dynamic autocomplete: Tab pulls live IDs from the DLQ with task preview + last error.
Full details: #3 Reflexion β†’ Durable Queue.

Env vars β€” full reference

Master switch

Env varDefaultValuesEffect
CHATCLI_QUALITY_ENABLEDtruetrue|falseTurn off the whole pipeline. false = Pipeline.Run β†’ agent.Execute direct, zero overhead

Self-Refine (#5)

Env varDefaultValuesEffect
CHATCLI_QUALITY_REFINE_ENABLEDfalsetrue|falseEnable RefineHook
CHATCLI_QUALITY_REFINE_MAX_PASSES1int β‰₯ 1Hard cap on passes
CHATCLI_QUALITY_REFINE_MIN_BYTES200int β‰₯ 0Skip outputs smaller than N bytes
CHATCLI_QUALITY_REFINE_EPSILON50int β‰₯ 0Char-level fallback threshold
CHATCLI_QUALITY_REFINE_EXCLUDEformatter,deps,refiner,verifierCSVAgents that don’t pass through refine

Semantic convergence cascade

Env varDefaultValuesEffect
CHATCLI_QUALITY_REFINE_CONVERGENCE_ENABLEDtruetrue|falseCascade master switch (char→Jaccard→embedding)
CHATCLI_QUALITY_REFINE_CONVERGENCE_EMBEDDINGfalsetrue|falseInclude embedding scorer (opt-in β€” costs $)
CHATCLI_QUALITY_REFINE_CONVERGENCE_STRICTfalsetrue|falseStrict: refuse convergence without embedding
CHATCLI_QUALITY_REFINE_CONVERGENCE_CHAR_HIGH0.990.0-1.0Char short-circuit CONVERGED
CHATCLI_QUALITY_REFINE_CONVERGENCE_CHAR_LOW0.30.0-1.0Char short-circuit DIVERGED
CHATCLI_QUALITY_REFINE_CONVERGENCE_JACCARD_HIGH0.950.0-1.0Jaccard short-circuit CONVERGED
CHATCLI_QUALITY_REFINE_CONVERGENCE_EMBEDDING_SIM0.920.0-1.0Final embedding cosine threshold
CHATCLI_QUALITY_REFINE_CONVERGENCE_CACHE_SIZE256intLRU cache size
CHATCLI_QUALITY_REFINE_CONVERGENCE_CACHE_TTL_MIN5intCache TTL (minutes)
CHATCLI_QUALITY_REFINE_CONVERGENCE_BREAKER_THRESHOLD3intFailures before breaker opens

CoVe (#6)

Env varDefaultValuesEffect
CHATCLI_QUALITY_VERIFY_ENABLEDfalsetrue|falseEnable VerifyHook
CHATCLI_QUALITY_VERIFY_NUM_QUESTIONS3int 1-7Number of verification questions
CHATCLI_QUALITY_VERIFY_REWRITEtruetrue|falseRewrite output on discrepancy
CHATCLI_QUALITY_VERIFY_EXCLUDEformatter,deps,shell,refiner,verifierCSVAgents that don’t pass through verify

Reflexion (#3)

Env varDefaultValuesEffect
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

Durable queue (WAL + worker pool + DLQ)

Env varDefaultValuesEffect
CHATCLI_QUALITY_REFLEXION_QUEUE_ENABLEDtruetrue|falseEnable the queue (default). false = legacy mode (goroutine)
CHATCLI_QUALITY_REFLEXION_QUEUE_WORKERS2int β‰₯ 1Workers processing in parallel
CHATCLI_QUALITY_REFLEXION_QUEUE_CAPACITY1000intIn-memory cap
CHATCLI_QUALITY_REFLEXION_QUEUE_DROP_OLDESTfalsetrue|falsetrue = drop oldest; false = block
CHATCLI_QUALITY_REFLEXION_QUEUE_BLOCK_TIMEOUT5sdurationEnqueue timeout when queue is full
CHATCLI_QUALITY_REFLEXION_QUEUE_MAX_ATTEMPTS5int β‰₯ 1Total retries
CHATCLI_QUALITY_REFLEXION_QUEUE_INITIAL_DELAY1sdurationFirst retry delay
CHATCLI_QUALITY_REFLEXION_QUEUE_MAX_DELAY5mdurationCap on exponential backoff
CHATCLI_QUALITY_REFLEXION_QUEUE_JITTER0.20.0-0.5Fractional jitter
CHATCLI_QUALITY_REFLEXION_QUEUE_JOB_TIMEOUT2mdurationPer-job timeout
CHATCLI_QUALITY_REFLEXION_QUEUE_STALE_AFTER168hdurationOld records discarded on replay
CHATCLI_QUALITY_REFLEXION_QUEUE_BASE_DIRβ€”pathQueue directory override

Plan-and-Solve (#2)

Env varDefaultValuesEffect
CHATCLI_QUALITY_PLAN_FIRST_MODEautooff|auto|alwaysWhen to fire
CHATCLI_QUALITY_PLAN_FIRST_THRESHOLD6int 0-10Minimum score for auto to fire

RAG + HyDE (#4)

Env varDefaultValuesEffect
CHATCLI_QUALITY_HYDE_ENABLEDfalsetrue|falseEnable phase 3a (keyword expansion)
CHATCLI_QUALITY_HYDE_USE_VECTORSfalsetrue|falseEnable phase 3b (vector search)
CHATCLI_QUALITY_HYDE_NUM_KEYWORDS5int β‰₯ 1Hypothesis keyword cap

Embedding providers (used by HyDE 3b)

Env varDefaultValuesEffect
CHATCLI_EMBED_PROVIDERnullvoyage / openai / bedrock / nullEmbedding backend picker
CHATCLI_EMBED_MODELprovider defaultstringVoyage: voyage-3. OpenAI: text-embedding-3-small / -large. Bedrock: amazon.titan-embed-text-v2:0 (default), amazon.titan-embed-text-v1, cohere.embed-english-v3, cohere.embed-multilingual-v3.
CHATCLI_EMBED_DIMENSIONSmodel nativeintOpenAI: truncate via Matryoshka (text-embedding-3-small=1536, -large=3072 native). Bedrock Titan v2: accepts 256 / 512 / 1024 (rejects others). Bedrock Titan v1 / Cohere v3: fixed dim, ignored.
VOYAGE_API_KEYβ€”stringRequired for provider=voyage
OPENAI_API_KEYβ€”stringRequired for provider=openai (uses the same chat key)
BEDROCK_REGION / AWS_REGION / AWS_PROFILE / AWS credentialsper chat Bedrockβ€”Required for provider=bedrock β€” reuses the same chain as the AWS Bedrock feature (IAM role, SSO, assume-role, profile).
Bedrock embeddings support Titan (single text per call β€” parallelized internally with an 8-worker pool) and Cohere v3 (native batch). Family dispatch is automatic from the model id prefix. See RAG + HyDE for the full architecture.

Reasoning Backbone (#7)

Env varDefaultValuesEffect
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,reflexionCSVList for mode=auto

Per-agent overrides (apply to any built-in)

Env varEffect
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-8"
export CHATCLI_AGENT_VERIFIER_EFFORT="max"

# 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.

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 harness/quality pipeline does not conflict with, nor replace:
FeatureRelationship
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 orchestrationDispatcher stays identical; pipeline only wraps each worker
Policy (CODER policy rules)Applied inside the worker, independent of refine/verify/reflexion
MCP toolsResult 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.