⚙️ Config reference¶
Primary file: .slmcode/config.yaml (created by slmcode init). Knobs. Dials. The cockpit without the fake airplane noises. ✈️
Provider & model 🔌¶
provider: omlx # or ollama, openai, lmstudio, openrouter, …
endpoint: http://127.0.0.1:8000/v1
model: Qwen3-Coder-30B-A3B-Instruct-MLX-4bit
api_key: "" # prefer env vars
| Key | Notes |
|---|---|
provider | Unknown names → OpenAI-compatible ✨ |
endpoint | Auto-defaults per preset if empty |
model | Whatever your gateway serves |
api_key | Avoid committing; use env 🔑 |
Env: SLMCODE_PROVIDER, SLMCODE_MODEL, SLMCODE_ENDPOINT, SLMCODE_API_KEY, OPENAI_API_KEY, OPENAI_BASE_URL, …
Execution shape 🏭¶
backend: slmcode # harness engine
mode: full # full | specialist
specialist: worker # when mode=specialist (any registered / custom id)
pinned_skills:
- atomic-coding
Pipeline graph (separate file)¶
Phases, loop reviewer/corrector, and insertable agent slots live in .slmcode/pipeline.yaml — not in config.yaml.
See Pipeline for the full schema (order, phases, slots, when, placeholders).
Quality & throughput 📊¶
temperature: 0.2
max_tokens: 4096
max_retries: 4
max_parallel: 2
max_context_kb: 32
think_passes: 1
task_timeout: 12m
| Key | SLM tip |
|---|---|
think_passes | Try 2 on 7–14B 🐣 (also deepens board workers) |
max_context_kb | Lower if models wander 🥴 |
max_parallel | 1 on slow local GPUs 🐢 |
max_retries | Critic stubbornness 💪 |
Safety 🛡️¶
dry_run: false
permission: auto # auto | dry-run | review
shell_permission: ask # allow | ask | deny
auto_approve: false
verbose: false
compact_mode: true # quieter TUI/Studio live stream (default)
| Mode | Effect |
|---|---|
permission: review | Stage under .slmcode/pending/ → slmcode apply 👀 |
dry_run: true | Never write code files 🎭 |
shell_permission | Independent of file writes |
QA gate (on by default) ✅¶
clarify_mode: auto # auto | ask | off (Claude Code AskUserQuestion style)
clarify_timeout: 2m # ask mode: wait then apply recommended
scope_judge: true # post-split PRD completeness gate
plan_approve: auto # off | auto | ask (Plan Mode gate before execute)
auto_approve: false # skip plan/shell/clarify HITL waits
shell_permission: allow # allow | ask | deny (ask = interactive approve)
context_compact: true # mid-run CONTEXT.md summarization
react_compact: true # ReAct conversation watchdog (compact at %)
react_compact_at_percent: 80
wave_snapshots: true # per-wave rewind under .slmcode/waves/
file_checkpoints: true # first-write-wins backup before edit/write
shell_whitelist: true # SAFE_PREFIXES for ws_shell (little-coder)
shell_allow: [] # extra prefixes (or SLMCODE_BASH_ALLOW env)
thinking_budget_tokens: 4096
model_profiles: {} # optional per-model skill/knowledge/token budgets
hooks_enabled: true # load .slmcode/hooks.json Pre/PostToolUse
mcp_servers: [] # thin read-only MCP (stdio or HTTP)
qa_gate: true
qa_gate_command: "" # empty = auto-detect (go/pytest/uv/npm/compileall)
qa_gate_max_rounds: 3
post_worker_smoke: true # py_compile / go test after each worker before review
escalate_ask: ask # ask | auto | off — pause on max-retry escalate
escalate_ask_timeout: 30s # timeout → @escalate SLM decides (not blind re_scope)
escalate_timeout_agent: "" # empty = auto (@escalate → @reviewer → @coordinator)
continue_ask: ask # ask | auto | off — after QA exhausted
continue_ask_timeout: 2m
Planning / scope¶
Vague queries get an interviewer pass (options + recommended defaults). - auto — lock recommended decisions into a PRD (no pause) - ask — emit SSE kind=ask, write .slmcode/clarify/ask.json, wait for Studio modal or POST /api/clarify/answer (timeout → recommended) - off — skip interview
scope_judge then checks every task has concrete acceptance/files before execute. plan_approve: ask pauses with a Studio modal / POST /api/plan/approve.
Hooks / MCP / rewind¶
Copy .slmcode-hooks.example.json → .slmcode/hooks.json. PreToolUse non-zero exit blocks the tool. PostToolUse can run compileall after writes.
mcp_servers registers a read-only mcp_call tool. Wave snapshots: TUI /rewind list / /rewind <id>, API GET/POST /api/rewind. Real context compact: /compact context or POST /api/compact.
QA / smoke / acceptance¶
After workers, post_worker_smoke runs a fast deterministic check (python -m py_compile / go test -short) and blocks approve-on-disk-only when it fails.
When a task's acceptance text includes a whitelisted command (python -m pytest, go test, python main.py, …), the harness also runs Acceptance smoke and rejects the task until those commands exit 0. Free-form prose in acceptance is never executed as shell.
worker_critique keeps refining (up to max_retries) while smoke / static / acceptance sections stay red — not just a single self-fix pass.
After the finalize tester, qa_gate runs a real project command (and bootstraps deps when needed: pip install -r requirements.txt, uv sync, go mod tidy). Auto-detect prefers pytest for greenfield Python (main.py + requirements.txt), not compileall. Syntax-only gates cannot alone mark the run successful. On failure, tester diagnoses → corrector patches → re-run.
Embeddings (memory ranking) 🧲¶
embedding_enabled: true
embedding_endpoint: "" # defaults to chat endpoint
embedding_model: ""
embedding_api_key: ""
embedding_top_k: 8
Fallback order: provider embeddings → pure-Go local hashing → lexical TF-IDF. slmcode doctor reports which mode is active.
Pricing display (optional) 💸¶
price_preset: "" # off | local | omlx | openai | anthropic | openrouter | auto
price_prompt_per_mtok: 0
price_completion_per_mtok: 0
TUI /stats shows tokens; dollars only if you configure rates (no fake $). Honesty > theater.
Studio & skills paths 🎨¶
listen: 127.0.0.1:7420
skills_dirs: [] # extra skill roots
claude_code_bin: claude # only if you use that backend
Example: Ollama project 🦙¶
provider: ollama
endpoint: http://127.0.0.1:11434
model: qwen2.5-coder:14b
think_passes: 2
max_context_kb: 16
max_parallel: 1
permission: review
pinned_skills:
- atomic-coding
Related 🔗¶
☀️ Made with ♥ by UnicoLab