GitHub - Doorman11991/smallcode: AI coding agent optimized for small LLMs. 87% benchmark with 4B-active model.

https://github.com/Doorman11991/ · article · 2026-05-21 source ↗ Reader 🖥️

Agent HarnessAgent Planning ArtifactsAgent Tool ManagementAshby's Law (Requisite Variety)Coding AgentsContext EngineeringLocal AIModel RoutingRiding Model Improvements
A well-engineered harness — context budgeting, forgiving tool-call parsing, patch-first editing, two-stage tool routing, decomposed planning, and per-model profiles — can extract production-grade agentic coding work from small (7B-20B), locally-hosted LLMs that would otherwise be considered too weak for the task, making local, private, frontier-free coding agents viable.

practical · mixed — A GitHub README that is primarily practical (argues for adoption: install it, use it) but mixes expository description of architecture with an implicit theoretical claim that harness design can compensate for small model capability. The titular benchmark number ('87% with 4B-active model') is a marketing hook used to make the practical argument but is never substantiated in the body.

Structure

PartRole
Title and lead claim (87% benchmark with 4B-active model)Marketing hook intended to establish credibility before the reader evaluates the architecture
OpenCode vs SmallCode comparison tableFrames the design as an oppositional reaction to frontier-model-assuming agents; sets up each architectural choice as a small-model accommodation
Quick Start / Install / RequirementsReduces adoption friction; emphasizes one-line install, prebuilt binaries, optional native compilation
Configuration sectionDemonstrates local-first design (SMALLCODE_BASE_URL points to localhost), with optional cloud escalation
Architecture file treeEstablishes engineering legitimacy by showing modular structure; lists ~18 tools and named subsystems (governor, escalation, model_client)
Key Features section (MarrowScript, BoneScript, context budget engine, 2-stage tool routing, early-stop detection, forgiving parser, patch-first editing, TODO planning, model profiles, working memory)Enumerates the specific harness components that compensate for small-model weaknesses; each feature is paired with a small-model failure mode
Model escalation list (Claude 4.5/4.6, GPT-5.4, DeepSeek V4)Cloud-model fallback option for hard failures, opt-in only
Observability section (token monitor, traces, /eval, trace-to-test)Shows the project takes measurement seriously
Programmatic API and tool listLibrary-mode usage and capability surface
License (MIT)Lowest-friction license choice

Key terms

Propositions

Arguments

A small local model with the SmallCode harness can do real coding work that would otherwise require a frontier model. strength: low
Explicit premises:
Implicit premises:
Inferences:
Locality (no network calls) is a sufficient reason to prefer SmallCode for users with privacy or sovereignty concerns. strength: medium
Explicit premises:
Implicit premises:
Inferences:
Narrowing the agent's output space (via DSLs like BoneScript) is a generalizable strategy for getting small models to work. strength: medium
Explicit premises:
Implicit premises:
Inferences:
Heterogeneity of small-model tool-call formats is best handled at the parser, not the prompt. strength: high
Explicit premises:
Implicit premises:
Inferences:

Narratives

Questions addressed

Gaps

Closes gaps elsewhere

Related documents