SLM-first coding harness β blazingly fast, embarrassingly parallel.
Plan β split β parallel specialists β self-critic β test β learn
Powered by GoLangGraph
Β· defaults to oMLX Β· works with any OpenAI-compatible endpoint
LLMs are incredible. Coding with them β inside a well-adapted harness β feels like magic.
And the industry noticed. Claude Code, Antigravity, Pi, and a growing wave of specialized coding agents were all designed around frontier models: huge context windows, strong tool-calling, and enough judgment to survive messy repos.
That is fantastic⦠until you run out of tokens. And eventually, you will.
Then you try the same harness on an SLM β a 7Bβ30B local model β and the magic evaporates. The model wanders. JSON breaks. Context overflows. Reviewers hallucinate green lights.
SLMCode exists to fill those gaps β and to stay useful when you plug a bigger model back in.
It is a public baseline for reaching the same quality of outcome with small models (sometimes with longer passes and extra feedback loops) β motivated by a personal need to ship with SLMs over the summer, offline, private, and cheap.
Fork it. Break it. Point it at whatever LLM you have. Push the idea further. π
curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bashSystem-wide:
curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash -s -- --systemirm https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install.ps1 | iexbrew install --formula https://raw.githubusercontent.com/UnicoLab/smlcode/main/Formula/slmcode.rbFull matrix (CMD, pin versions, uninstall): docs/INSTALL.md
slmcode version
slmcode doctor
cd your-project && slmcode init && slmcodeSLM-first defaults. Generic harness underneath.
| You have⦠| Try⦠|
|---|---|
| Apple Silicon local | provider=omlx (default) |
| Ollama | --provider ollama --model qwen2.5-coder:14b |
| LM Studio / vLLM | --provider lmstudio --endpoint http://127.0.0.1:1234/v1 |
| OpenAI / Groq / DeepSeek / Mistral | built-in presets |
| OpenRouter / corporate gateway | any name + --endpoint + API key |
slmcode run --provider ollama --model qwen2.5-coder:14b \
--endpoint http://127.0.0.1:11434 "fix the flaky test"
export SLMCODE_PROVIDER=openrouter
export SLMCODE_MODEL=anthropic/claude-3.5-sonnet
export SLMCODE_API_KEY=β¦
slmcode run -v "β¦"Deep dive: docs/PROVIDERS.md
ββββββββββ Prepare ββββββββββ βββββ Design βββββ ββββ Build ββββ βββ Verify βββ ββ Finish ββ
β init β skills β context β β architect β β coord β β polish β β memory β
β β explore β docs β β β clarify β β β execute β β β test β β β done β
β β β β plan β β β learn β β β β β
β context β₯ explore β‘ β β β split β β β β β β β
βββββββββββββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ ββββββββββββββ ββββββββββββ
β‘ = parallel phases β
context+explorerun concurrently;architect+clarifyrun concurrently
| Feature | Description |
|---|---|
| β‘ 6 parallel paths | Workers, QA, self-critique, review, phases, and speculative races all run concurrently |
| π― Atomic task split | Plan broken into file-scoped tasks sized for 7-30B SLMs |
| π Review β correct loop | Reviewer catches issues β corrector fixes β up to N retries β escalate to human |
| π¨ Wave fast-path | When ALL tasks have clean QA + disk evidence, skip reviewer LLM entirely |
ποΈ fast_model |
Dual-model routing β 8B for light agents (reviewer, planner), 30B for heavy (worker, tester) |
| Agent | Role | Tools |
|---|---|---|
π§ explorer |
Codebase deep-dive | β |
ποΈ architect |
Design structure & components | β |
π planner |
High-level execution plan | β |
βοΈ splitter |
Break plan into atomic tasks | β |
π€ interviewer |
Ask clarifying questions (HITL) | β |
π οΈ worker |
Implement scoped changes | β |
π¨ deep |
Multi-step complex worker | β |
ποΈ reviewer |
Self-critic / approve | β |
π§ corrector |
Fix review issues | β |
π§ͺ tester |
Verify with real shell commands | β |
π§© placeholder |
Fill stubs & flag gaps | β |
π context |
Maintain CONTEXT.md | β |
π docs |
Read documentation | β |
π§ memory |
Distill MEMORY.md | β |
π learner |
Wave lessons for future packs | β |
ποΈ coordinator |
Manage board & task flow | β |
πΌ orchestrator |
High-level coordination | β |
π¨ escalate |
Arbitrate max-retry failures | β |
Custom agents & per-language specialists (Go, Python, React) via YAML blocks
| Kind | Purpose | Built-in |
|---|---|---|
| π¦ Pack | Composes pipeline + quality + agents + skills | go, python, react |
| βοΈ Pipeline | Phase graph with language-specific slots | go, python, react |
| π€ Agent | Custom specialist or builtin override | go-worker, python-tester, β¦ |
| β Quality | Lint/test/build commands per language | go, python, react |
slmcode blocks list # browse marketplace
slmcode blocks show pipeline go # inspect Go pipeline
slmcode blocks apply go # apply Go language pack
slmcode blocks validate # validate custom blocksAuto-detection on
init: detectsgo.mod/pyproject.toml/package.jsonand auto-applies the right pack π―
| Page | What it does |
|---|---|
| π Live | SSE-streaming pipeline progress, event log, task board, HITL popups |
| π Board | Full kanban β add/edit/delete tasks, inject context, set agent hints |
| βοΈ Pipeline | Edit phase graph, slots, execute loop config |
| π€ Agents | Create, edit, delete custom agents with full prompt editor |
| π§± Blocks | Browse & apply pipeline/agent/quality/pack blocks |
| π Files | Full workspace tree browser with syntax highlighting & per-line comments |
| π§© Skills | Manage SKILL.md skill packs |
| π Docs | Edit CONTEXT.md, PLAN.md, TASKS.md, SCRATCH.md |
| β‘ Settings | Provider, model, stacks, HITL modes, parallel config |
slmcode studio β http://127.0.0.1:7420 (auto-opens browser)
slmcode studio --kill β force-kill existing + restart
slmcode studio --port-auto β auto-switch if port is busy
| Gate | Default | What it does |
|---|---|---|
| π€ Clarify | auto |
Interview agent asks about language/stack/framework |
| β Plan approve | auto |
Human reviews plan before workers execute |
| π Continue | ask |
Ask when retries exhausted β another wave or stop? |
| π¨ Escalate | ask |
Task hit max retries β retry / re-scope / abort? |
| π Shell | allow |
Approve shell commands before execution |
# .slmcode/config.yaml β all configurable per-project
plan_approve: ask # off | auto | ask
clarify_mode: ask # off | auto | ask
auto_approve: false # false = respect per-gate settings# Speed & parallelism
max_parallel: 4 # concurrent tasks per wave
fast_model: "LFM2.5-8B" # smaller model for light agents (3-4x faster!)
think_passes: 1 # 2+ enables speculative digs
# Quality gates
qa_gate: true # iterate test/smoke until green
qa_gate_max_rounds: 1 # rounds before escalate
post_worker_smoke: true # go vet / pytest after each worker
# Guardrails
write_guard: true # prevent writes outside focus files
read_before_edit: true # force ws_read before ws_edit
claims_gate: true # reject hallucinated file paths
static_quality: true # reject stub/placeholder code| π Large-model habit | π SLMCode approach |
|---|---|
| Stuff the repo into chat | Incremental .slmcode/*.md memory |
| One free-form agent | Plan β atomic tasks β 19 specialists |
| Re-scan every turn | Reuse CONTEXT/MEMORY; skip deep explore |
| Hope the model self-corrects | Reviewer β corrector + multipass |
| Opaque progress | Live CLI + Studio SSE stream |
| Burn tokens until it sticks | Early-exit streams, lean packs, speculative cancel |
cd your-project
slmcode init # auto-detects language & applies pack
# edit .slmcode/PROJECT.md
slmcode # premium TUI
slmcode run -v "add JWT validation"
slmcode board # live kanban
slmcode studio # http://127.0.0.1:7420Useful knobs:
slmcode stack list
slmcode stack apply deepseek # switch to DeepSeek
slmcode config set fast_model LFM2.5-8B-A1B-MLX-4bit # speed boost!
slmcode run --parallel 6 --think-passes 2 "refactor auth"
slmcode config set plan_approve ask # require human plan approval
slmcode blocks apply python # apply Python language pack| Command | Purpose |
|---|---|
init / doctor / config |
Workspace + provider health |
stack list / stack apply |
Model presets |
agent list / agent show |
Inspect agent specialists |
blocks list / blocks apply |
Browse & apply building blocks |
skills list / skills new |
Manage skill packs |
run -v |
Full pipeline + live stream |
tui / bare slmcode |
Premium interactive TUI |
chat |
Classic REPL |
board / watch |
Colored kanban |
studio / studio --kill |
Web GUI + SSE API |
diff / commit |
Git integration |
update |
Refresh install |
TUI: /compact, /models, /mcp, /auth, /schema, /sessions, /stats, /permission, /agents, /stop, /resume.
| Feature | Capability |
|---|---|
| β‘ Parallel execution | 6 concurrent paths: workers, QA, critique, review, phases, speculative races |
| ποΈ Dual-model | fast_model routes light agents (reviewer, planner) to smaller/faster LLM |
| π¨ Wave fast-path | Tasks with clean QA + disk evidence skip reviewer LLM entirely |
| π QA gate | Single-round gate, auto-fixes gofmt/ruff, skips when no test files |
| π§ͺ Smart smoke | Uses go vet (instant) when no *_test.go files exist |
| π¦ Auto-pack | Detects go.mod / pyproject.toml / package.json on init |
Premium + playful site (MkDocs Material β GitHub Pages): βοΈ unicolab.github.io/smlcode
| Section | Pages |
|---|---|
| π Getting started | π¦ Install Β· β±οΈ Quick start Β· π§ Concepts Β· π Providers |
| π Handbook | π§ Guide Β· π₯οΈ TUI Β· π¦ Skills Β· π¨ Studio Β· π§© Agents Β· π§ͺ Recipes |
| π Reference | β¨οΈ CLI Β· βοΈ Config Β· β Testing Β· β FAQ |
| π§ Internals | ποΈ Architecture Β· π€ Contributing Β· π AGENTS.md (for AI agents) |
Local preview: make docs-serve β http://127.0.0.1:8000 β bring snacks. πΏ
git clone https://github.com/UnicoLab/smlcode.git && cd smlcode
make ui-react # build Vite/React Studio UI first
make tidy && make lint && make test
make docs-build # MkDocs strict build
make install-system # build from source onto PATHThe Studio UI is a Vite + React + TypeScript SPA in web/. Build it with make ui-react (runs npm run build, syncs to cmd/slmcode/ui/). The cmd/slmcode/ui/ output is embedded via go:embed at compile time. For UI development:
cd web && npm install && npm run dev # Vite dev server with HMRimport "github.com/UnicoLab/slmcode/pkg/harness"
h, _ := harness.New("/path/to/project")
_ = h.Init()
res, err := h.Run(ctx, "refactor pkg/auth")Public baseline on purpose. Bring better prompts, tighter gates, smarter scheduling, new specialists, and evals β especially ones that make small models more reliable.
- Fork & branch
make ui-react && make lint && make test- Conventional commits (
feat:,fix:,docs:, β¦) - Open a PR
AI agents: read AGENTS.md for complete architecture, conventions, and contribution guide.
MIT β use it, remix it, ship with it.
Made with β₯ by UnicoLab
Summer coding with SLMs should feel like a superpower, not a compromise. βοΈ
