Notation

CSL: Caveman Spec Language

A compact notation for specifications and chains of reasoning. A human reads it as terse English; a model reads it as a strict grammar. Apoc, the local model behind Apocrypha, is being trained to think and reply in it.

Not CSSL. CSL is a notation. CSSL is the programming language whose specs are written in it.

What CSL is

CSL is line-oriented. One line is one statement: an optional label (^p1), an optional kind, an optional modal (W! must), an expression, an optional status (ok, hyp; absent means open) and optional annotations in braces ({x source}). Articles, copulas, prepositions and hedging are dropped; nouns, verbs, relations, numbers and gates stay. A document opens with !csl4, moves through blocks from problem to conclusion, and switches register at !ans. The spec leaves what follows as free text; Apoc's rule is that the answer is CSL too. The current version is CSLv4: a 7-bit ASCII core that is always legal, four measured glyphs as the only display sugar (Apoc writes the ASCII profile), and a surface designed against measured BPE token costs on the gpt2, cl100k and o200k vocabularies. Every CSLv4 symbol has since been measured on Apoc's own tokenizer; 70 of its ASCII symbols still cost more than one token when space-led, which is what the vocabulary extension below targets.

Why

Fewer tokens. In self-play round 5b, before any training, a whole CSL document with the then-resident legend ran 0.61 to 1.53 of the English token count (median about 1.08): not cheaper. Across the 97 self-play candidates of rounds 2 to 5b, the 71 that kept every value of the source and finished cleanly had a body, legend excluded, of 0.42 of the English tokens at the median, 0.36 on the 28 sources under 400 tokens. None of the 97 passed the gate, so that is attempted CSL, not canon; the legend was a fixed tax that erased most of the saving on short sources. The canon seeds kept after teacher round 6, written with no legend, have a median CSL to English ratio of 0.62 (min 0.25, max 1.48). Dropping the legend saved 147 tokens per document on Apoc's tokenizer: 8.3 percent of the reference proposal, 49 percent of a short reply. Adding 128 CSL tokens to the vocabulary cut a 40-seed sample from 16,394 to 14,234 tokens, 13.2 percent fewer; those rows are untrained, so that is a tokenizer measurement, not a model.

Exactness. A statement carries at most 9 content words. That cap is Apocky's choice for Apoc's gate, not a rule of the language; it sits at the legitimate maximum of the independent reference document. It rejects 1.3 percent of that document's statements, 0.0 percent of the two canon proposals written in this lane and 10.3 percent of the teacher's statements.

Machine-checkable. A document is canon only when the reference parser returns zero diagnostics of any severity, warnings included.

The grammar in one screen

openers   !csl4 start   !def codebook   !ans answer follows   !. close
blocks    #P problem  #D decompose  #T trace  #S synth  #C conclude   (in order; the gate requires #P and #C)
modals    W! must  N! never  M? may  R! should  I> intent  P> plan  D> decide  Q? ask   (one, at line start)
statuses  ok verified  part partial  rep reported  X refuted  unk unknown  hyp hypothesis  dep deprecated  law immutable   (absent = open)
annos     {t time} {x source} {s sign-off} {c constraint}   (after the status)
operators : bind  :: type  = set  -> then  <- from  => so  ~> cause  |> pipe  <-> eq  <: sub  . of  + and  - sans  * x  @ at  ! not
statement [^label] [#kind] [modal] expr [status] {anno}   one proposition per line; the gate caps a statement at 9 content words

One real seed, verbatim. The teacher model wrote it from one of Apoc's English reasoning traces; the gate and the value check selected it, and no one edited it. 95 tokens against 174 for the English source, both counted by the teacher server's tokenizer (the base Qwen3.8-27B vocabulary; the teacher is the same base model Apoc is quantized from, at higher precision).

!csl4
#P continue task
Q? prior context <- user ok {x user}
D> ask for source text ok {x user}
N! run subagents ok {x user}
R! reply concise ok {x user}
#C no prior state
prior state = !present ok {x env}
!ans
no_prior_context = !present ok {x env}
Q? paste last part
!.

How Apoc learns it

The gate. csl_strict checks the surface rules of the canon digest and runs the CSLv4 reference parser as oracle; any diagnostic fails the candidate, and the lines after !ans are re-parsed as statements too. Proposal 24, the one authored reasoning document in the spec repo that the parser accepts with zero diagnostics, calibrates the parser layer. Under the live word rules (cap 9, and no drop words inside the parts of a symbol) six of its 75 statements fail; a six-line repair is drafted and checked (0 findings on the repaired copy), and the proposal file itself stays unchanged until Apocky applies it.

The grammar. A GBNF grammar generated from the gate's own constants constrains decoding in llama.cpp, so grammar and gate cannot drift apart unnoticed. 377 of 377 test rows pass on two engine builds; 300 of 300 documents derived from the grammar show no syntactic or surface finding under the gate. The grammar cannot see duplicate labels or unresolved references, so those stay with the gate. In an A/B on 3 sources, 6 candidates per arm, with the first grammar revision, unconstrained Apoc produced 0 canon documents and the grammar 1, at a median 17.7 instead of 27.2 tokens/s.

The teacher. Self-play on the untrained model gave 0 canon in 97 candidates. An open-weight teacher (Qwen3.8-27B at Q6_K on two Kaggle T4s, grammar on) rewrote Apoc's English traces: round 6, 123 of 160 candidates canon (77 percent), 96 kept; round 7, 395 of 480 (82 percent), 324 kept after the value check. 423 canon seeds in all: 96 and 324 from the teacher, 3 from Apoc's own engine. Claude selects by gate and value check and never authors or edits a line.

The adapter. SFT run 1: 79 rows, 150 steps, held-out loss 1.3225 to 0.9513. On 20 unseen prompts with the grammar off, canon went from 0 of 20 to 9 of 20; replies grew from 135 to 188 median tokens. In production, tool-free CSL-mode turns since the adapter: 1 of 1 canon on the previous model file, 1 of 1 on the current one; tool turns not measured yet. Run 2, on 394 training rows built from the 423 seeds with the extended tokenizer, finished: on 20 new unseen prompts the extended arm reached canon on 4 of 20 (see the status table). Run 3, run 2's recipe on the production model file, 300 steps, train-only, started on Kaggle on 2026-10-24; as of 2026-10-25 11:55 its output has not been built into a model file or evaluated on our engine, so it has no result yet.

Versions

CSLv3, the first public version, was a glyph notation: 74 symbols for modals, evidence, relations and blocks, written for humans and models alike. Its full reference is in github.com/Apocky/CSLv3. CSLv4, the current version and the one described on this page, keeps the ideas but puts a 7-bit ASCII core underneath: every glyph has an ASCII spelling that is always legal, and the surface was redesigned against measured token costs. Apoc writes the ASCII profile.

Where it lives

What Apoc trains against is on Kaggle: apoc-csl-tools (the gate and its tests, the generator, the grammar, the CSLv4 key and the reference parser, with machine paths replaced by environment variables and arguments; public, Apache 2.0) and apoc-csl-seeds (the canon seeds and eval prompts, minus the rows a privacy scan or a content read withheld, plus the runtime instruction and the 128-token extension list; public, Apache 2.0). The model file Apoc runs on is the public dataset apocrypha-qwen27b-l110-q2k. The session traces the seeds were rewritten from, the calibration captures and the working training set stay private.

Status

ItemStateMeasuredSource
Strict gate (csl_strict v2)measuredzero reference-parser diagnostics of any severity; cap 9 content words; no legend; answer lines re-parsedcsl_strict.py; CSL-IMPROVEMENT-PROGRAM D7, D8, D10
Grammar v2 (cslv4_strict.gbnf, 366,455 bytes)measured377 of 377 test rows pass on two llama.cpp builds; 300 of 300 derived documents show no syntactic or surface finding under the gateGBNF_REPORT-2026-10-22 section 1
Grammar on vs off, same 3 sources, 6 candidates per arm (first grammar revision)measuredcanon 0 of 6 unconstrained, 1 of 6 constrained; 27.2 to 17.7 tokens/s medianGBNF_AB-2026-10-23
Canon seedsmeasured423 documents; teacher round 7: 395 of 480 candidates canon (82 percent), 324 kept after the value checkSEEDSET teacher v7 note, 2026-10-24; canon/ listing
SFT adapter v1 (79 rows, 150 steps)measuredheld-out loss 1.3225 to 0.9513; canon 0 of 20 to 9 of 20 on unseen prompts, grammar offSFT_RUN1-2026-10-23
Production CSL mode (adapter + grammar)measured, small n1 of 1 tool-free turn canon on the previous model file (2026-10-23), 1 of 1 on the current file (2026-10-24); tool turns not measuredAPOC-END-TO-END-PLAN status 2026-10-23 22:2x and 2026-10-24 08:5x
Vocabulary extension (128 tokens)measured at the tokenizer16,394 to 14,234 tokens on 40 seeds (13.2 percent fewer); the new rows are untrainedEXTEND_VOCAB_PLAN-2026-10-23
SFT run 2 (394 training rows from 423 seeds, extended tokenizer, three arms)measuredon 20 new unseen prompts: base 0, adapter alone 0, adapter + extended vocabulary 4 of 20 canon; 271.4 vs 323.5 tokens per 1,000 characters (16 percent fewer than base); run 1 adapter on the same prompts 1 of 40 (our engine)Kaggle apoc-csl-sft2-eval results.json; csl-crosscheck-2026-10-24
SFT run 3 (run 2 recipe on the production file, 300 steps, train-only)not measuredstarted on Kaggle 2026-10-24 (apoc-csl-sft3-run v2); output not yet built into a model file or evaluated on our engine as of 2026-10-25 11:55APOC-TASKS-2026-10-24 item R3; GOAL-APOC-2026-10-25 plan
Faithfulness beyond the value check; answer correctness vs Englishnot measuredno human or model read-back yetSEEDSET; SFT_RUN1

Every number above comes from a measured run in the lane's own reports; dates are 2026-10-22 to 2026-10-25. A row marked running claims nothing yet.