55<h1 align =" center " >⚡ SLMCode</h1 >
66
77<p align =" center " >
8- <strong >A coding harness that loves SLMs — and works with any LLM .</strong ><br />
9- Plan → atomic tasks → parallel specialists → self-critic → learn<br />
8+ <strong >SLM-first coding harness — blazingly fast, embarrassingly parallel .</strong ><br />
9+ Plan → split → parallel specialists → self-critic → test → learn<br />
1010 Powered by <a href =" https://github.com/piotrlaczkowski/GoLangGraph " >GoLangGraph</a >
11- · defaults to <strong >oMLX</strong > · plug in Ollama, OpenAI, OpenRouter, vLLM, …
11+ · defaults to <strong >oMLX</strong > · works with any OpenAI-compatible endpoint
1212</p >
1313
1414<p align =" center " >
1515 <a href =" https://unicolab.ai " ><img alt =" UnicoLab " src =" https://img.shields.io/badge/Made%20with%20%E2%99%A5%20by-UnicoLab-0f6e8c?style=flat-square " /></a >
16- <a href =" https://unicolab. github.io/ smlcode/ " ><img alt =" docs " src =" https://img.shields.io/badge/docs-MkDocs-0ea5e9 ?style=flat-square " /></a >
16+ <a href =" https://github.com/UnicoLab/ smlcode/releases/latest " ><img alt =" release " src =" https://img.shields.io/github/v/release/UnicoLab/smlcode ?style=flat-square&color=2dd4bf&label=v0.12.1 " /></a >
1717 <a href =" https://github.com/UnicoLab/smlcode/actions/workflows/ci.yml " ><img alt =" CI " src =" https://img.shields.io/github/actions/workflow/status/UnicoLab/smlcode/ci.yml?branch=main&style=flat-square&label=CI " /></a >
18- <a href =" https://github.com/UnicoLab/smlcode/releases/latest " ><img alt =" release " src =" https://img.shields.io/github/v/release/UnicoLab/smlcode?style=flat-square&color=2dd4bf " /></a >
1918 <img alt =" go " src =" https://img.shields.io/badge/go-1.23+-00ADD8?style=flat-square&logo=go&logoColor=white " />
2019 <img alt =" license " src =" https://img.shields.io/badge/license-MIT-0ea5e9?style=flat-square " />
2120 <img alt =" platform " src =" https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-2dd4bf?style=flat-square " />
@@ -104,67 +103,170 @@ Deep dive: **[docs/PROVIDERS.md](docs/PROVIDERS.md)**
104103
105104---
106105
107- ## 🎯 Why this loop exists
106+ ## 🧬 Pipeline (16 phases · 5 groups)
108107
109- | 🐘 Large-model habit | 🐭 SLMCode approach |
110- | ----------------------| ---------------------|
111- | Stuff the repo into chat | Incremental ` .slmcode/*.md ` memory |
112- | One free-form agent | Plan → atomic tasks → specialists |
113- | Re-scan every turn | Reuse CONTEXT/MEMORY; skip deep explore |
114- | Hope the model self-corrects | Reviewer ↔ corrector + multipass |
115- | Opaque progress | Live CLI + Studio stream |
116- | Burn tokens until it sticks | Early-exit streams, lean packs, speculative cancel |
108+ ``` text
109+ ┌───────── Prepare ─────────┐ ┌──── Design ────┐ ┌─── Build ───┐ ┌── Verify ──┐ ┌─ Finish ─┐
110+ │ init → skills → context │ │ architect │ │ coord │ │ polish │ │ memory │
111+ │ → explore → docs │ │ → clarify │ │ → execute │ │ → test │ │ → done │
112+ │ │ │ → plan │ │ → learn │ │ │ │ │
113+ │ context ∥ explore ⚡ │ │ → split │ │ │ │ │ │ │
114+ └───────────────────────────┘ └─────────────────┘ └─────────────┘ └────────────┘ └──────────┘
115+ ```
116+
117+ > ⚡ = parallel phases — ` context ` + ` explore ` run concurrently; ` architect ` + ` clarify ` run concurrently
117118
118119---
119120
120121## ✨ Highlights
121122
122- - 🧭 Planning + atomic split sized for ~ 30B models (works for larger ones too)
123- - 🗂️ Coordinator + live kanban board
124- - 🧩 14 specialists (explorer, docs, architect, worker/deep, reviewer, corrector, tester, …)
125- - 🔁 Self-critic loop with auto-correct retries
126- - 🧠 Evolving CONTEXT / MEMORY / skills flywheel
127- - ⚡ Token-stream early-exit + SLM JSON repair
128- - 🖥️ Premium TUI + offline Studio GUI (` http://127.0.0.1:7420 ` )
129- - 🔐 Shell permission modes: ` allow ` | ` ask ` | ` deny `
130- - 📦 ** Stacks** — ` slmcode stack apply omlx-local|deepseek|… ` (global + optional per-agent pins)
131- - 🔑 ** Auth store** — ` .slmcode/auth.json ` + Studio/TUI ` /auth ` (keep keys out of config)
132- - 🔎 ** Model catalog** — ` find_models ` + Studio costs / enabled models
123+ ### 🚀 Engine
124+
125+ | Feature | Description |
126+ | ---------| -------------|
127+ | ⚡ ** 6 parallel paths** | Workers, QA, self-critique, review, phases, and speculative races all run concurrently |
128+ | 🎯 ** Atomic task split** | Plan broken into file-scoped tasks sized for 7-30B SLMs |
129+ | 🔁 ** Review ↔ correct loop** | Reviewer catches issues → corrector fixes → up to N retries → escalate to human |
130+ | 💨 ** Wave fast-path** | When ALL tasks have clean QA + disk evidence, skip reviewer LLM entirely |
131+ | 🏎️ ** ` fast_model ` ** | Dual-model routing — 8B for light agents (reviewer, planner), 30B for heavy (worker, tester) |
132+
133+ ### 🧩 Agents (19 specialists)
134+
135+ | Agent | Role | Tools |
136+ | -------| ------| -------|
137+ | 🧭 ` explorer ` | Codebase deep-dive | ✅ |
138+ | 🏗️ ` architect ` | Design structure & components | ❌ |
139+ | 📋 ` planner ` | High-level execution plan | ❌ |
140+ | ✂️ ` splitter ` | Break plan into atomic tasks | ❌ |
141+ | 🎤 ` interviewer ` | Ask clarifying questions (HITL) | ❌ |
142+ | 🛠️ ` worker ` | Implement scoped changes | ✅ |
143+ | 🔨 ` deep ` | Multi-step complex worker | ✅ |
144+ | 👁️ ` reviewer ` | Self-critic / approve | ❌ |
145+ | 🔧 ` corrector ` | Fix review issues | ✅ |
146+ | 🧪 ` tester ` | Verify with real shell commands | ✅ |
147+ | 🧩 ` placeholder ` | Fill stubs & flag gaps | ✅ |
148+ | 📝 ` context ` | Maintain CONTEXT.md | ❌ |
149+ | 📚 ` docs ` | Read documentation | ✅ |
150+ | 🧠 ` memory ` | Distill MEMORY.md | ❌ |
151+ | 🎓 ` learner ` | Wave lessons for future packs | ❌ |
152+ | 🗂️ ` coordinator ` | Manage board & task flow | ❌ |
153+ | 🎼 ` orchestrator ` | High-level coordination | ❌ |
154+ | 🚨 ` escalate ` | Arbitrate max-retry failures | ❌ |
155+
156+ > Custom agents & per-language specialists (Go, Python, React) via YAML blocks
157+
158+ ### 🧱 Building Blocks (marketplace-ready YAML)
159+
160+ | Kind | Purpose | Built-in |
161+ | ------| ---------| ----------|
162+ | 📦 ** Pack** | Composes pipeline + quality + agents + skills | ` go ` , ` python ` , ` react ` |
163+ | ⚙️ ** Pipeline** | Phase graph with language-specific slots | ` go ` , ` python ` , ` react ` |
164+ | 🤖 ** Agent** | Custom specialist or builtin override | ` go-worker ` , ` python-tester ` , … |
165+ | ✅ ** Quality** | Lint/test/build commands per language | ` go ` , ` python ` , ` react ` |
133166
134- ---
167+ ``` bash
168+ slmcode blocks list # browse marketplace
169+ slmcode blocks show pipeline go # inspect Go pipeline
170+ slmcode blocks apply go # apply Go language pack
171+ slmcode blocks validate # validate custom blocks
172+ ```
135173
136- ## 🧬 Pipeline
174+ > Auto-detection on ` init ` : detects ` go.mod ` / ` pyproject.toml ` / ` package.json ` and auto-applies the right pack 🎯
137175
138- ``` text
139- query → skills → context → explore|reuse → [docs] [architect]
140- → plan → split → coordinator → parallel execute
141- → review/correct → learn → test → memory → evolve skills
176+ ### 🖥️ Studio (Web GUI)
177+
178+ | Page | What it does |
179+ | ------| -------------|
180+ | 🏠 ** Live** | SSE-streaming pipeline progress, event log, task board, HITL popups |
181+ | 📋 ** Board** | Full kanban — add/edit/delete tasks, inject context, set agent hints |
182+ | ⚙️ ** Pipeline** | Edit phase graph, slots, execute loop config |
183+ | 🤖 ** Agents** | Create, edit, delete custom agents with full prompt editor |
184+ | 🧱 ** Blocks** | Browse & apply pipeline/agent/quality/pack blocks |
185+ | 📁 ** Files** | Full workspace tree browser with syntax highlighting & per-line comments |
186+ | 🧩 ** Skills** | Manage SKILL.md skill packs |
187+ | 📝 ** Docs** | Edit CONTEXT.md, PLAN.md, TASKS.md, SCRATCH.md |
188+ | ⚡ ** Settings** | Provider, model, stacks, HITL modes, parallel config |
189+
190+ ```
191+ slmcode studio → http://127.0.0.1:7420 (auto-opens browser)
192+ slmcode studio --kill → force-kill existing + restart
193+ slmcode studio --port-auto → auto-switch if port is busy
194+ ```
195+
196+ ### 👤 Human-in-the-Loop (HITL)
197+
198+ | Gate | Default | What it does |
199+ | ------| ---------| -------------|
200+ | 🎤 ** Clarify** | ` auto ` | Interview agent asks about language/stack/framework |
201+ | ✅ ** Plan approve** | ` auto ` | Human reviews plan before workers execute |
202+ | 🔄 ** Continue** | ` ask ` | Ask when retries exhausted — another wave or stop? |
203+ | 🚨 ** Escalate** | ` ask ` | Task hit max retries — retry / re-scope / abort? |
204+ | 🐚 ** Shell** | ` allow ` | Approve shell commands before execution |
205+
206+ ``` yaml
207+ # .slmcode/config.yaml — all configurable per-project
208+ plan_approve : ask # off | auto | ask
209+ clarify_mode : ask # off | auto | ask
210+ auto_approve : false # false = respect per-gate settings
211+ ` ` `
212+
213+ ### ⚙️ Config highlights
214+
215+ ` ` ` yaml
216+ # Speed & parallelism
217+ max_parallel : 4 # concurrent tasks per wave
218+ fast_model : " LFM2.5-8B" # smaller model for light agents (3-4x faster!)
219+ think_passes : 1 # 2+ enables speculative digs
220+
221+ # Quality gates
222+ qa_gate : true # iterate test/smoke until green
223+ qa_gate_max_rounds : 1 # rounds before escalate
224+ post_worker_smoke : true # go vet / pytest after each worker
225+
226+ # Guardrails
227+ write_guard : true # prevent writes outside focus files
228+ read_before_edit : true # force ws_read before ws_edit
229+ claims_gate : true # reject hallucinated file paths
230+ static_quality : true # reject stub/placeholder code
142231` ` `
143232
144233---
145234
235+ ## 🎯 Why this loop exists
236+
237+ | 🐘 Large-model habit | 🐭 SLMCode approach |
238+ |----------------------|---------------------|
239+ | Stuff the repo into chat | Incremental ` .slmcode/*.md` memory |
240+ | One free-form agent | Plan → atomic tasks → 19 specialists |
241+ | Re-scan every turn | Reuse CONTEXT/MEMORY; skip deep explore |
242+ | Hope the model self-corrects | Reviewer ↔ corrector + multipass |
243+ | Opaque progress | Live CLI + Studio SSE stream |
244+ | Burn tokens until it sticks | Early-exit streams, lean packs, speculative cancel |
245+
246+ ---
247+
146248# # 🚀 Quick start
147249
148250` ` ` bash
149251cd your-project
150- slmcode init
252+ slmcode init # auto-detects language & applies pack
151253# edit .slmcode/PROJECT.md
152254
153- slmcode # premium TUI
154- slmcode run -v " add validation to the login handler "
155- slmcode board
156- slmcode studio # http://127.0.0.1:7420
255+ slmcode # premium TUI
256+ slmcode run -v "add JWT validation "
257+ slmcode board # live kanban
258+ slmcode studio # http://127.0.0.1:7420
157259` ` `
158260
159261Useful knobs :
160262
161263` ` ` bash
162264slmcode stack list
163- slmcode stack apply omlx-local # or: deepseek, openai, ollama-local, …
164- slmcode run --think-passes 2 --parallel 3 --retries 2 " … "
165- slmcode run --agent explorer " Where is auth handled? "
166- slmcode run --skill atomic-coding " Refactor helpers "
167- slmcode config set dry_run false
265+ slmcode stack apply deepseek # switch to DeepSeek
266+ slmcode config set fast_model LFM2.5-8B-A1B-MLX-4bit # speed boost!
267+ slmcode run --parallel 6 --think-passes 2 "refactor auth "
268+ slmcode config set plan_approve ask # require human plan approval
269+ slmcode blocks apply python # apply Python language pack
168270` ` `
169271
170272---
@@ -174,18 +276,34 @@ slmcode config set dry_run false
174276| Command | Purpose |
175277|---------|---------|
176278| `init` / `doctor` / `config` | Workspace + provider health |
177- | ` stack ` / ` agent ` | Apply model stacks; inspect agent pins |
279+ | `stack list` / `stack apply` | Model presets |
280+ | `agent list` / `agent show` | Inspect agent specialists |
281+ | `blocks list` / `blocks apply` | Browse & apply building blocks |
282+ | `skills list` / `skills new` | Manage skill packs |
178283| `run -v` | Full pipeline + live stream |
179284| `tui` / bare `slmcode` | Premium interactive TUI |
180285| `chat` | Classic REPL |
181286| `board` / `watch` | Colored kanban |
182- | ` studio ` | GUI + SSE API |
183- | ` update ` | Refresh install (binary or source) |
287+ | `studio` / `studio --kill` | Web GUI + SSE API |
288+ | `diff` / `commit` | Git integration |
289+ | `update` | Refresh install |
184290
185291TUI : ` /compact` , `/models`, `/mcp`, `/auth`, `/schema`, `/sessions`, `/stats`, `/permission`, `/agents`, `/stop`, `/resume`.
186292
187293---
188294
295+ # # 📊 Performance
296+
297+ | Scenario | Without optimizations | With v0.12.1 |
298+ |----------|----------------------|-------------|
299+ | Simple Go calculator | ~8-10 LLM calls × 30B | ~3 heavy + ~6 fast (8B) calls |
300+ | QA gate | 3 rounds of gofmt→vet→test→build | 1 round, auto-fix gofmt, skip if no tests |
301+ | Review timeout | 12 min default | 3 min when disk evidence present |
302+ | Smoke on Go | `go test ./...` (slow) | `go vet` (instant) when no test files |
303+ | Pack setup | Manual `blocks apply` | Auto-detected on `init` |
304+
305+ ---
306+
189307# # 📚 Docs
190308
191309**Premium + playful site (MkDocs Material → GitHub Pages):**
@@ -196,7 +314,7 @@ TUI: `/compact`, `/models`, `/mcp`, `/auth`, `/schema`, `/sessions`, `/stats`, `
196314| 🚀 Getting started | 📦 Install · ⏱️ Quick start · 🧠 Concepts · 🔌 Providers |
197315| 📘 Handbook | 🧭 Guide · 🖥️ TUI · 🦋 Skills · 🎨 Studio · 🧩 Agents · 🧪 Recipes |
198316| 📚 Reference | ⌨️ CLI · ⚙️ Config · ✅ Testing · ❓ FAQ |
199- | 🔧 Internals | 🏗️ Architecture · 🤝 Contributing |
317+ | 🔧 Internals | 🏗️ Architecture · 🤝 Contributing · 📋 AGENTS.md (for AI agents) |
200318
201319Local preview : ` make docs-serve` → http://127.0.0.1:8000 — bring snacks. 🍿
202320
@@ -231,6 +349,8 @@ new specialists, and evals — especially ones that make **small models** more r
2313493. Conventional commits (`feat:`, `fix:`, `docs:`, …)
2323504. Open a PR
233351
352+ AI agents : read **[AGENTS.md](AGENTS.md)** for complete architecture, conventions, and contribution guide.
353+
234354---
235355
236356# # 📜 License
0 commit comments