Skip to content
faberlinePublic

About

The Snippet-Oriented Model: a code generator that assembles programs from a verified snippet instruction set.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

100 Commits

Folders and files

Repository files navigation

som

Goal

SOM's end goal is code for four scenarios: backend, frontend, SRE, and AI.

Scenario Python Rust TypeScript React
BE supported supported planned (#65) —
SRE planned (#66) planned planned —
AI planned (#67) planned planned —
FE — — — planned (#68)

FE starts with React only. Read the goal and the scenario roadmap.

Current state

The new Rust compiler passed independent acceptance and is the local default. It was promoted at 2026-10-15T03:08:08.737006+00:00 and serves 127.0.0.1:8765 without loading a model. The root post-switch check passed 76/76. Commit 3ced191137 published it to main. Issues #38–#44 are closed as completed, and milestones 7 and 8 are closed. The legacy M2 runtime, model and block links remain saved for rollback.

CNL → Rust parser and fixed rules → complete DSL bundle → existing Rust backend → Python files

CNL uses fixed English clauses. Data strings can include Chinese. The caller supplies each business choice. The compiler does not guess missing facts. The new production path does not load models or start Python. Python remains the output language and an independent test tool. Rust output with axum and sqlx is planned in milestone 9. Read the Rust output roadmap.

The fresh complete gates passed 127 public products and 544 historical jobs. Read the guide, the status, the acceptance report, and the roadmap.

Historical model roadmap and retained legacy service

The following reports describe the previous model roadmap and retained M2 service. They do not instruct new M3 training. The old M3 automation remains paused. Old failures and local assets stay saved. The model milestone statements below are historical snapshots from before the 2026-10-13 roadmap reset. All six old milestone records were archived and deleted. The M1 closeout passed on 2026-10-02. The rules and model paths produced the same files on 214 regression cases. All 214 services and the old 100 PostgreSQL cases passed. The M2 closeout passed on 2026-10-05. Issues #4–#6 and milestone 2 are closed on GitHub. The development flow contract is som.prompt.v7 / som.dsl.v3. All 218 normal products pass strict quality and Python/Rust byte parity. All 114 formal flow cases and 12 capability supplements pass full behavior. All old 100 cases and 214 service regressions pass. All 314 fresh native legacy outputs match the sealed archive. All 12 seen-fixture model chains pass Rust Metal, HTTP and CLI checks. These model checks prove the seen-input path. Full model training is M3 work. Final output bytes are observations. File, block and token limits remain fixed. See the M3 handoff. The local development default is now the accepted M2 flow candidate. The switch receipt passes 12 native flow chains and 314 exact legacy outputs. M3 remains open. The r6 round uses the r10 dataset and v3 input bindings. It has 2,400 training, 300 development and 300 formal cases. All 2,700 training and development reference products passed admission. Training stopped after an interruption. The last complete checkpoint is step 74,000. Its raw development check passed 3/300 complete sequences. The formal model test has not started. The M2 default pointers stay fixed. See the current M3 status for evidence and next tasks.

SOM is a local code generation service. Codex or Claude Code decides the program logic and sends a versioned JSON prompt. The default accepts v1–v7. M2 v7 model evidence covers twelve seen fixtures. New combinations need M3. A local model turns that request into a versioned DSL. The Rust assembler expands approved code blocks and returns complete files. The agent places and tests those files.

The service and CLI use Rust. Python trains the model and checks assembler correctness. A production request does not start Python or write project files.

Project What it is
som-rs Rust HTTP service, model inference, CLI, DSL validation, and assembler.
som-core Python training and reference assembler. Older experiments remain as research code.
som-code-python Approved code blocks and the older Python corpus.

The first target is a FastAPI CRUD package with SQLAlchemy, PostgreSQL, unittest, and an Alembic migration. The local pilot model passed 50 frozen PostgreSQL cases through the Rust service. Four paired tasks across all four field shapes cut total flagship tokens by 59.5% for Codex and 54.6% for Claude Code. Both exceeded the 30% target in this measured v1 scope. See the Rust service guide.

The v2 task family adds exact string filtering and limit/offset pagination. Its model kept the same small architecture and served the first two prompt versions. It matched 100 frozen outputs byte for byte. All 50 new query tasks passed independent PostgreSQL checks. The model is 0.532 MB, and the loaded service's warm sequential p95 was 26.173 ms. See the query contract and the budget receipt.

Four paired query tasks then passed independent PostgreSQL checks for both agents and both methods. Codex used 47.9% fewer total tokens with SOM. Claude Code used 57.5% fewer. This is a four-task sample, so savings can vary by task. See the paired receipt.

The earlier standalone service model generated FastAPI services with PostgreSQL, Alembic, unittest, app startup, and instructions. The Todo example has a default page size of 20 and a maximum of 100. All 50 new services passed isolated PostgreSQL checks. All 150 old and new outputs matched the Python reference byte for byte. The model is 0.538 MB. Warm request p95 was 48.209 ms under the measured run. Four paired service tasks passed for both agents. Codex saved 64.9% of total tokens; Claude Code saved 83.1%. See the v3 service contract and paired receipt.

An additional 50 new field combinations passed without retraining or changing the blocks. The stress evaluation measured 48.17 ms warm p95 and kept the same 0.538 MB model.

The current development service adds an optional date field and an exclusive before list filter. It matched 200 old and new outputs byte for byte. All 50 new services passed isolated PostgreSQL checks. Its model directory is 0.541 MB, and warm request p95 was 34.247 ms in that run. The same v4 service also passed a combined 100-case regression: the prior 50 structural stress tasks and the new 50 date tasks all passed isolated PostgreSQL checks. som serve now loads this model and its 34-block library by default. The completed date-task comparison measured 55.6% fewer tokens for Codex and 75.7% fewer for Claude Code across four paired tasks each. See the date-task results.

The business candidate adds related resources, authentication, object storage, MongoDB, and business workflows. Its fourteen standard and boundary applications passed 273 local behavior checks through both Python and Rust. The 120-job token comparison used fresh actual Codex and Claude Code sessions. All 60 Codex services passed. Codex used 13,497,433 tokens directly and 14,221,471 with SOM, an increase of 5.36%. No app met the required 30% median saving. The previous model remains the default. See the Codex results and the candidate work record. Claude completed 52 services before interruption. Its follow-up work is deferred by user request. All completed work and failed attempts are retained. The latest scope direction prioritizes complete business correctness. Resource use and response time are measured before new limits are chosen. Prompt wording should be concise; the local DSL remains complete.

The new composable candidate adds som.prompt.v6. Its model emits the complete block plan with typed references and dependencies. Its evaluation helper delivers full source in one tool result when it fits. Its correctness checks passed. The latest twenty-job Codex round saved 58.21% of total tokens and 88.51% of elapsed time. Nine apps met the token target. Recipes saved 4.39%, so candidate acceptance did not pass. The current default stays unchanged. See the complete report.

License

MIT — see LICENSE.

M2 output size policy, 2026-10-04

The human changed compact M2 output bytes to an observation. The file, block, token, quality and function gates remain fixed. Legacy output behavior and current remain unchanged. See the acceptance ledger. M2 has passed. See the closeout.

About

The Snippet-Oriented Model: a code generator that assembles programs from a verified snippet instruction set.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages