Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,89 @@ CLK_TELEGRAM_ENABLED=false
CLK_TELEGRAM_SKIP=false
# Default workspace the bot operates on when /workspace has not been set.
CLK_TELEGRAM_WORKSPACE=

# ----------------------------------------------------------------------
# Robustness loops (see README "Robustness loops" section)
# ----------------------------------------------------------------------
# Every layer below has an off-switch so you can dial cost. All values
# are forwarded into .clk/config/clk.config.json by kickoff.sh; you can
# also edit that file directly to override per project.

# Auto-consensus fan-out: every "careful" dispatch fans into N parallel
# stochastic samples + chief coalescing, instead of a single dispatch.
# off — only PROPOSE_CONSENSUS triggers fan-out (legacy)
# on_careful — fan out stages marked careful=true (default)
# always — fan out every non-chief dispatch (×N cost)
# Cost: ~×consensus.max_samples per affected dispatch.
CLK_ROBUSTNESS_AUTO_CONSENSUS=on_careful

# Critic-judge refinement: draft -> critic -> revise inner loop.
# off — only explicit refine: blocks in workflow YAML
# careful_only — careful=true stages get one critic pass (default)
# all — every non-chief, non-qa stage gets one critic pass
# Cost: +1 critic dispatch + up to refine_max_rounds-1 worker revisions
# per affected stage.
CLK_ROBUSTNESS_AUTO_REFINE=careful_only

# After every dispatch the response is scored for emptiness, malformed
# ACTION/POST blocks, missing declared outputs, and low confidence;
# recoverable failures re-dispatch with a repair preamble, escalating
# to consensus on the final retry. Set to 0 to disable.
CLK_ROBUSTNESS_MAX_QUALITY_RETRIES=2

# Responses shorter than this many characters are treated as suspect-empty.
CLK_ROBUSTNESS_MIN_RESPONSE_CHARS=40

# Critic-judge inner loop bounds.
CLK_ROBUSTNESS_REFINE_MAX_ROUNDS=3
CLK_ROBUSTNESS_REFINE_ACCEPT_THRESHOLD=0.8

# Inter-agent Q&A protocol: POST: question TO: <peer> URGENCY: blocking.
# qa_parallel_judges optionally dispatches multiple peers in parallel.
# max_qa_depth caps the chain length (peer A asks B asks C ...).
CLK_ROBUSTNESS_QA_PARALLEL_JUDGES=1
CLK_ROBUSTNESS_MAX_QA_DEPTH=3

# Ralph / autoresearch plateau detection. After plateau_window
# consecutive iterations without improvement, the loop escalates +
# reframes; failing that, it terminates gracefully with done.md.
# off — never auto-terminate (legacy behavior)
# escalate_only — force consensus on next iterations only
# reframe_only — only ask chief to re-cast
# escalate_then_reframe — both, then terminate (default)
CLK_ROBUSTNESS_PLATEAU_WINDOW=3
CLK_ROBUSTNESS_PLATEAU_ACTION=escalate_then_reframe

# ----------------------------------------------------------------------
# Prior-knob reference (already supported; documented here for parity)
# ----------------------------------------------------------------------
# Provider invocation timeout, seconds. 0 = use harness default (300s).
CLK_PROVIDER_TIMEOUT_S=0
# Per-provider-invocation no-output watchdog (kill if no stdout for N s).
CLK_PROVIDER_NO_OUTPUT_TIMEOUT_S=0
# Provider-level retry policy (transient errors: rate limits, timeouts, ...).
CLK_PROVIDER_RETRY_MAX_RETRIES=10
CLK_PROVIDER_RETRY_BACKOFF_S=5
# Stage-level retry policy (whole stage repeats with a larger backoff).
CLK_PROVIDER_RETRY_STAGE_MAX_RETRIES=10
CLK_PROVIDER_RETRY_STAGE_BACKOFF_S=30
# Chief supervise loop: cap on cycles before warning and stopping.
CLK_SUPERVISE_MAX_CYCLES=20
# Stochastic consensus caps (same scope as the auto-consensus knob).
CLK_CONSENSUS_MAX_SAMPLES=6
CLK_CONSENSUS_MAX_PARALLEL=4
# Dynamic-roles cap (chief cannot mint more than this many dynamic agents).
CLK_CASTING_MAX_DYNAMIC_ROLES=12
# Auto-commit per agent-run after successful ACTION application.
CLK_AUTO_COMMIT=true
# File-action batch caps (per agent response).
CLK_VALIDATION_MAX_FILES_PER_BATCH=25
CLK_VALIDATION_WARN_FILES_PER_BATCH=5
# Meta-prompt drafting (chief tightens worker prompts before dispatch).
# off | careful_only (default) | always
CLK_META_PROMPT_DISPATCH=careful_only
CLK_META_PROMPT_ROLE=careful_only
# Per-stage checkpoint (chief CONTINUE/REDIRECT/ABORT after every stage).
CLK_REVIEW_PER_STAGE=false
# Recovery on unmet deps: chief recovery passes per stage.
CLK_RECOVERY_MAX_PER_STAGE=3
Loading
Loading