dog
September 7, 2026 · View on GitHub
dog is the beagle shared layer between abc and the verb dogs (sniff/keeper/graf/spot/bro): the .be/ store conventions, the URI/branch vocabulary, the ULOG event log, the hunk wire format, and the ragel tokenizers that paint syntax. Naming follows abc; a u8s arg is consumed, a u8sp assigned. DOG*FromBe split a .be-anchor, *Pup* manage file stacks, tok32 packs a tag + side. Prose in DOG.md, ULOG.md, DEF.md, BRCT.md.
Core conventions
DOG.h — URI grammar, .be layout, path hashes
The shared vocabulary every dog speaks: parse/canonicalise a CLI URI, split a .be-anchor path into repo/project/branch, hash a tree path. Full prose in DOG.md; the puppy stacks of the same header are the next section.
DOGParseURI/NormalizeArg/PromoteBareword— parse a CLI arg with dog rules (bareword:path→ remote alias).DOGCanonURI/CanonURIFeed— the chokepoint every ULOG/REFS writer canonicalises and serialises a URI through.DOGIsProjector/ProjectorDog/IsTransport/IsGitTransport— classify a URI scheme against the tables.DOGDebangSlice/Debang/DebangFeed— the!reader: tail-shed + OR the per-component force bits.DOGRepoFromBe/ProjectFromBe/BranchFromBe— split a row-0 anchor path on/.be/into the wt root.DOGRefDrain/QueryBranchOnly/StripProject/QueryProject/CanonQueryParse— split a ref query.DOGIsHashlet/IsFullSha/RefIsBranch— syntactic tests: a 6..40-hex sha prefix, a full 40/64-hex object id.DOGPathHash/ChildPathHash(ROOT) — positional tree-node id: root is ron60("ROOT").DOGutf8sFeedDate— a unix ts as a 7-column relative date (12:34/Tue05/01Jan) for status columns.DOG_BE_NAME/REFS_NAME/WTLOG_NAME/CONFIG_NAME— the source of truth for.befilenames.
DOG.h — the puppy file stacks (DOG-032, DOG-035, DOG-046)
The same header's LSM-ish persistence: a per-handle memtable, sealed runs, a 1/8 ladder. Lane roles ride every call and are never dicted. Run and ToC formats in DOG.md.
DOGPupOpenAll/OpenAside/Create/CreateAt/ThinTail/DropAt/Close— open/load/append/trim/drop one/close.DOGPupCount/CountAll/Data/DataAll/AllData/Seqno— the read views over the stack.DOGPupDataRow/DataAllRow/AllDataRow/PupToc/TocRows(DOG-035) — the row-aware twins over the ToC block.- The ToC is a sparse page index, CHECKED per file and clipped by every read, so merge, ladder and dedup never see a cell.
dogpuplane(dogpupsync/dogpupmerge/row) — the family's sort/dedup/collapse + merge roles, passed DOWN per call.DOGPupPut/Commit/Ladder— append to the memtable; seal it into a run; keep the 1/8 ladder every seal ends in.DOGPupPutMem/CommitAs(DOG-032) — the sized twins: memtable in wholeFILESysPage()pages, the fsync the caller's.- Run names are 10-char RON64 only —
DOGPupOpenAllSKIPS any other name (jab's retired 8-wide JS names), never unlinks it. - The memtable is
~<10-RON64-owner><ext>, one per HANDLE (DOG-046): pid + dict address, so two rw writers on one dir never share an inode. It still ends in<ext>(bee's sweep), but~+ an 11-wide seqno never parse as a run; a crashed writer's orphan is skipped by the run scan and left for its owner to sweep. - Every seal and every ladder re-scans
dirfirst (DOG-046), mapping in the runs other writers sealed; only merged runs are unlinked, and an entry whose file someone else unlinked keeps its mapping untilClose. - A run never overwrites a name:
Createbumps its key past any file there,CreateAtrefuses (its key is the caller's). DOGPupAllRuns/AllRunsToc— query view: committed runs oldest→newest, then the memtable's PAST and DATA.
DPATH.h — tree-entry names & branch-path normalization
Validate a single tree-entry segment and put branch paths into the one canonical form (.be/ sharding) so they compare by byte equality.
DPATHu8sDrainSeg/DPATHVerify— drain/verify one filename segment (no slashes, valid UTF-8, rejects).DPATHBranchNormFeed— feed the canonical branch form: trunk aliases → empty, else the body + a trailing/.DPATHBranchAncestor/DPATHBranchLcaLen/DPATHBranchResolveRel— ancestor (prefix) test.
HOME.h — per-process ambient workspace (&HOME)
home is cwd-derived ambient state, so the process holds exactly one live home — the &HOME singleton. The top of each dog's call chain opens it once and pairs it with one close; everything downstream reads &HOME.
HOMEOpen/HOMEOpenAt/HOMEClose— populate / release&HOMEfrom an anchor URI (path=root, query=branch).HOMEFind/HOMEFindDogs/HOMEResolveSibling— walk cwd up to the nearest.beanchor.HOMEOpenBranch/SetCurBranch/WriteBranch/BranchVisible— claim/retarget/read a branch + test scope.HOMEBeDir/HOMEMakeBeDir/HOMEBranchDir/HOMEProjectExists— compose.be/branch/shard dirs.HOMEGetConfig/HOMEHost— read a dotted key from.be/config(TOML).
CLI.h — argv → cli, flag access, output mode
Parse dog [verb] [--flags] [URI...] into a cli whose slices borrow argv; URIs are stored raw and parsed on demand.
CLIParse(cli) — fill verb / interleavedflags/ rawurisfrom argv against a verb-name and value-flag list.CLIUriLen/CLIUriRawAt/CLIUriSetRaw/CLIUriParse/CLIUriAt— count, read, rewrite.CLIFlag/CLIHas/CLIAtURI— read a flag's value, test a boolean flag.CLISetHUNKMode— resolve the process-globalHUNKModefrom--tlv/--color/--plain(default keys off).
VERSN.h — compile-time build metadata (version / hash / date)
Build stamp every binary can report on --version. dog/version.cmake writes the three literals into a generated VERSN_BUILD.h (rewritten only on change, so only VERSN.c recompiles); off a git checkout the version/hash read "unknown".
VERSNVersion/VERSNHash/VERSNDate—git describe/ short hash / source date (ISO-8601 UTC) as constu8csslices.VERSNu8sFeed— feed<prog> <version> (<hash>) <date>into a slice (emptyprogskipped; propagates SNOROOM).VERSNReport— print that one-line banner to stdout; the--versionconvenience for a dog's MAIN.
Event log & reporting
ULOG.h — append-only URI event log + sidecar index
Each row is <ron60-ms>\t<verb>\t<uri>\n, strictly monotonic; a wh128 sidecar (<dir>/.<base>.idx) indexes ts→offset with a 20-bit verb prefilter and a tail sentinel for stale detection. Format in ULOG.md.
ULOGOpen/ULOGOpenRO/ULOGOpenBooked/ULOGClose(ULOGTORN) — open rw / read-only / sized.ULOGu8sFeed/ULOGu8sDrain(ulogrec) — the stateless row codec; one parsed row carries ts, verb.ULOGAppend/ULOGAppendAt— append with a clock-clamped or explicit ts (ULOGCLOCKon a non-monotonic stamp).ULOGRow/ULOGSeek/ULOGFind/ULOGHead/ULOGTail/ULOGCount/ULOGHas— random access by index.ULOGFindLatest/FindVerb/eachLatest/eachLatestKey— reverse scans: latest row per predicate/verb/key.ULOGCompactLatest/ULOGTruncate— rewrite keeping the latest row per key (atomic tmp+rename), or keep a prefix.ULOGu8ssDrainHeap/ULOGMergeWalk(ULOGu8csZbyTs/ZbyUri) — K-way heap merge + fan-out.ULOGu8bScanWt/ULOGu8sRelFromFull— walk a worktree emitting one<mtime>\t<verb>\t<rel>?<mode>row per leaf.ULOGVerbColor/ULOGVerbTag(ULOG_VERB_COLORS) — the shared verb→ansi64/ verb→theme-tag palette every status.HUNKu8sFeedRec/HUNKTablePrintRow— theulogrecconveniences over HUNK's table; they live here, HUNK.h being circular.
HUNK.h — the code-hunk wire format, renderers, and status table
A hunk is {ts, verb, uri, text, toks} DATA; the renderers own all presentation, through the once-chosen global HUNKMode. BE-007 folded dog/ROWS in here as a status/action TABLE — no row types, a process-global accumulator armed by HUNKTableOpen.
hunk/hunkZ/HUNKcb— the record (location is oneuri,toksaretok32+ side), ordering, callback.HUNKu8sFeed/HUNKu8sDrain(HUNKTOKLEN/HUNKTOKOOB) — the nested-TLV codec.HUNKu8sFeedOut/FeedText/FeedColor/FeedHtml(HUNKMode) — render via the global mode, or forced.HUNKu8sFeedBanner— the ONE header drawer (BRO-002): the date + verb + uri banner every hunk gets.HUNKu8sRebaseURI/Relay— prefix a hunk URI's path with a submodule mount (an empty child uri stays bannerless).HUNKTableOpen/Close/Fd— arm / flush an mmap-backed module table; mode-keyed stream-or-buffer (batch).HUNKu8sFeedRow/HUNKTableSummary(HUNK_NAV_*) — serialize ONE event row / a summary tail; nav is plainron60.HUNKTableText/HUNKTableToks— the active table's buffers for a rich multi-tok summary tail (be status).HUNKu32bTokenize/u32sClip/u8sMakeURI/u8sFragSplit— tokenize, clip toks, compose/split apath#symbol:lineURI.
CFOLD.h — the APPEND-ONLY weave (DIS-082), replaces the columnar WEAVE.h
One file's whole DAG history in four streams: 'B' body bytes in append order, 'E' a tokv32 index, 'C' commits, 'G' the ignore pool. DELETION IS AN APPENDED ENTRY, so a token's identity, rank and blame key are all ONE number, its body offset.
tokv32/tokv32Z/CFOLDPar(CFOLD_TAG_*) — the (parent, child) index record;parnames the parent by body offset.CFOLDParse(CFOLD_TLV*,CFOLDFAIL/BIG/NOCM/TORN/PLEN) — zero-copy view over a'V'blob.cfold/cfcommit/CFOLDNCommits/CommitAt/FindCommit— the streams, and one commit's(id, body range, L, P, ignore).CFOLDProduce/Alive/cfstat— DFS materialization at any commit, checked againstP;cfstatcounts its bsearches.CFOLDBlame— body offset → commit, one binary search over the'C'range table;why:needs no per-token inserter.CFOLDFold/FoldStat/cffold— fold one commit: append body + entries, merge the sorted batch into the index.CFOLDMerge— a contentless merge: appends NOTHING, takes the laterLand the INTERSECTED ignore-set.CFOLDEmitDiff/EmitFull— windowed / whole-file diff between two commit INDICES, as HUNK records (DIS-080).- CLI:
dogcfold FILE...folds each file as a linear commit, reports both streams, materializes every rev back.
BRAM.h, NEIL.h — token-level diff core (patience + EDL cleanup)
The two passes that sharpen a raw token-level Myers edit list (e32g EDL): line-coherent anchoring, then whitespace cleanup. Packed u32/u64 tokens over abc/DIFF gauges, no graf/keeper dependency (DOG-002).
BRAMu64s(BRAM.h) — Bram Cohen patience diff over u64 token-hash arrays: anchor on unique lines, recurse between.NEILCleanup/NEILShift/NEILCanon(NEIL.h) — semantic EDL cleanup: drop false EQs, slide, collapse to INS+DEL.NEILIsWS/NEIL_MAX_KILL/NEILBAD(NEIL.h) — the whitespace-token test, the killable-EQ knob, the error code.
THEME.h — tag-letter colour palette
A 32-slot ansi64 table indexed by tag letter (tag - 'A'); the renderer ORs an fg-tag and a bg-tag lookup into each cell's SGR.
theme/THEMEActive/THEMEAt— the palette type, the always-non-NULL active pointer.THEMESelect(THEME_16/THEME_DARK/THEME_LIGHT) — pick a palette by name (falling back to$BRO_THEMEthen "16").THEME_BANNER(THEME_BANNER_FG/_BG) — the fixed black-on-pale-yellow SGR the one hunk-banner drawer uses.
WHIFF.h — packed tagged words & SHA-1 hashlets
wh64 packs type4 | off40 | id20 (the type leads, so words of one kind form one contiguous range — DOG-047); wh128 is a (key,val) pair. Backs the ULOG sidecar index and the abc.index wh128 lanes.
wh64/wh64Pack/wh64Type/wh64Id/wh64Off(wh64Z) — pack / unpack the three fields and the value comparator.WHIFFKeyPack/WHIFFKeyType/WHIFFKeyHashlet— the canonical index keytype4 | hashlet60.wh128/wh128Z/wh128hash/wh128hashEq(+wh128cs*) — the pair, its full-field ordering.WHIFFHashlet40/Hashlet60/HexFeed40/HexFeed60/HexHashlet40/HexHashlet60— the 40/60-bit hashlet twins.
git interoperability (dog/git/)
SHA1.h — git SHA-1 type, hashing (sha1dc), and sha1hex
The git sha1 (20 bytes) plus collision-detecting hashing and the 40-hex text form. CODE-019 folded the hex-text struct in here beside sha1.
sha1/sha1Z/sha1empty— the 20-byte record, its memcmp ordering, and the all-zero test.SHA1Sum/SHA1Open/SHA1Feed/SHA1Close(SHA1state) — one-shot/streaming hashing overdog/sha1dc.sha1FromBin/FromHex/Drain/slice/SHA1u8sFeedHex/FeedHashlet/a_sha1hex— decode + render sha1 hex.sha1hex/hexZ/hexeq/hexFromSha1/sha1FromSha1hex/hexFromHex/hexSlice— the 40-hex key struct.
GIT.h — git object & refname parsers
Pull-mode drains for tree / commit / ident bytes, and the single translation point between be-style refs and git's refs/heads/… wire form.
GITParseRef/GITFeedRef/GITTypeName(gitref_kind) — parse a refname into (kind, name) + emit its wire form.GITu8sDrainTree/GITu8sFileSplit— drain one tree entry (mode+name, raw SHA-1) and split the<mode> <name>field.GITTreeDiff(DOG-030) — one linear merge scan over two RAW git-sorted trees into a caller buffer, itself in tree FORMAT.- A changed name rides as an adjacent PAIR (NEW first), a zero sha spells "absent here", equal shas and gitlinks are dropped.
- A DIFF encoding: valid tree bytes but non-canonical (duplicate names, zero shas), so never hashed and never stored.
GITu8sDrainCommit/ParseCommit/CommitTree/GITu8sIdent(git_commit) — drain/parse commit headers + tree + ident.GIT_FIELD_*/GIT_REFS_*/GIT_PKT_*/GIT_TYPE_*— the wire fixed strings (incl. beagle-onlyfoster/picked).
PACK.h, DELT.h, ZINF.h — packfile, delta, zlib
The packfile codec, the git delta instruction parser/applier, and the zlib inflate/deflate wrappers under them.
PACKu8sFeedHdr/DrainHdr/DrainObjHdr/FeedObjHdr/PACKInflate— write/parse the header + object entry.PACKu8sFeedObj— GIT-002 raw|OFS_DELTA object writer (caller log + base); shared by keeper + JABC, never REF_DELTA.PACKRecordEnd— GIT-007 record extent (offset → next record start, inflating into BASS scratch); keeper + JABC walk it.PACKResolveOfs— GIT-004 OFS-only delta chase (offset → inflated object);PACKREFon a stray REF_DELTA.PACKResolve— KEEP-006: the same chase plus a REF_DELTA arm,findresuming it in whatever log holds the base.- So a rotated log's cross-log bases resolve, every hop remembering its own pack;
find == NULLISPACKResolveOfs. PACKResolveCached(packcache,PACKCacheArm/Free/Get/Put) — DOG-031: git's delta_base_cache in ABC shape.- Keyed (pack, offset); the chase probes it every hop and fills it per apply, so a chain resolves from the nearest hop.
- Trees and commits only, 64 MiB, objects over 1 MiB skipped; a FIFO ring arena plus a fixed slot table, no per-entry malloc.
- Its memory is the DECLARER's —
odbarms it on first pack read and frees it inODBClose, never BASS. - A
PutCOPIES, so the ring never aliases the DOG-014 ping-pong scratch;cache == NULLISPACKResolve. DELTApply/DELTEncode(DELT.h) +ZINFInflate/ZINFDeflate(ZINF.h) — the delta codec and the zlib wrappers.
PIDX.h — pack-log index-EMIT (GIT-010)
The pack-log owns NO index; these ENTRY PRODUCERS emit (sha→offset) wh128 rows into a caller Bwh128 and hold nothing (JABC rule #4). Sort, merge, persist and query stay the caller's. Key is WHIFFKeyPack(type, hashlet60), val the bare offset.
PIDXScan(pack, from_off, out, base, delta)— walk one OFS-only pack, git-sha each object, emit one entry apiece.PIDXScan(pack, from_off, out, base, delta)— walk one OFS-only pack, git-sha each object, emit an entry apiece.- PACK-001:
from_off > 0tail-scans from a byte boundary (an earlier OFS base still resolves);0walks the whole pack. PIDXScanRef(…, find, user)— KEEP-006: the same scan over a log that MAY carry REF_DELTA,findfinding the base.- A rescan in file-id order answers from what it already emitted: a REF base always sits in a log BEFORE the one citing it.
PIDXFeedEmit— index-on-append: git-sha the content the caller JUST fed (no resolve) and append its(sha, offset)entry.PIDXObjSha/PIDXEntry— the loose-object framing sha (keeper'sKEEPObjShatwin) and the canonical wh128 entry builder.
DIRC.h — the .git/index (staging area) reader (GIT-032)
What is STAGED and what conflicts, plus git's stat cache. IDX.h shape: the whole mapped file, const, pure, caller's map and scratch. READ-ONLY. v2/v3/v4; split index and SHA-256 refused whole.
DIRCOpen(idx, scratch, cur)— validate the whole file, open a drain at entry 0; a hostile one never walks off the slice.DIRCDrain(cur, entry)— one entry per call, index order,GITu8sDrainTreeshape; a conflicted path is stages 1/2/3.dirc_entry—path,sha,mode,stage, the stat cache (size/mtime/mtime_ns/ctime), rawflags/xflags.- Racily clean is reported, not solved: mtime == the index's own mtime means the caller must hash it; this reader never stats.
DIRCBADFMT/DIRCSPLIT/DIRCFAIL— unreadable layout, split index, inconsistency; quickjabdirc.csays them plainly.
REPACK.h — stream-ingest a git pack into capped logs (KEEP-006, JAB-020)
ONE call repacks a whole fetch: the source is CONSUMED from an fd, never stored and never seeked. Per record — parse, inflate once, resolve against OUR ALREADY-WRITTEN log, re-emit with the base rewritten, rotate at the cap.
REPACKRun(fd, buf, shard, conf, idx, st)(repack_conf/_stat/_watch) — the whole loop;REPACK_LOG_MAXcaps a log.REPACKLogPath(path, shard, id)—<shard>/NNNNNNNNNN.keeper; readers use the writer's namer, never re-derive the padding.REPACKFAIL/TORN/BIG/BASE/ROOM/LOGS/HDR— io, torn source, oversize record, unseen base, full index, no header.- CLIs:
dogrepack <pack|-> <shard> [cap]writes a shard,dogscan <shard> [--print]reads one back.
PKT.h, CFG.h, SUBS.h, IGNO.h — protocol & config
git pkt-line framing, the gitconfig-family parser, the .gitmodules submodule parser, and the .gitignore matcher.
PKTu8sDrain/PKTu8sFeed/PKTu8sFeedFlush(PKTFLUSH/PKTDELIM) — drain/emit one pkt-line.CFGu8sFeed/CFGu8sDrain(CFGstate) — the gitconfig pull parser:Feedadvances to the next section/assignment.SUBSu8sParse/SUBSu8sFind/SUBSu8bSynth(subs_cb) — drain.gitmodulessections firingcb(path,url).IGNOLoad/IGNOMatch/IGNOFree(igno/igno_set/igno_pat) — load the.gitignorechain, match with git precedence.IGNOSetOpen/SetDecide/SetClose— STATUS-020's per-FILE surface over ONEigno_set: mmap+parse, decide, unmap.FILEMapOnce(ABC-023) means the map holds no fd and no FILE slot, so one scan may open thousands of them.SetDecideis a tristate —-1no match,0negated,1ignore — and knows thedir/parent-prefix rule.- Nothing here walks, chains or hops dirs: the chain, the shallow→deep fold and the
.git/.betest are the caller's.
sha1dc/ — vendored SHA-1 collision detection
dog/sha1dc/sha1.h and ubc_check.h are the upstream sha1collisiondetection library, vendored. SHA1.h builds SHA1Sum/SHA1Open… on its SHA1DCInit/SHA1DCUpdate/SHA1DCFinal/SHA1DCSetSafeHash C API; do not edit, external dependency.
Tokenizers (dog/tok/)
TOK.h — the tokenizer framework & tok32
The shared dispatch and the packed token every tokenizer emits. A tok32 packs a 5-bit syntax tag (tag - 'A'), a 1-bit display-scratch custom bit, a 2-bit diff side, and a 24-bit end offset.
tok32/tok32Pack/Offset/Side/Tag/SetSide/SetCustom/tok32Val(tok32Z) — build/decode a token.TOKLexer/SplitText/KnownExt/SameLexer/TOKExtAt(TOKstate/TOKcb) — dispatch by ext, split a blob.TOK.wasm.c— the browser entry (DOG-048):tok_parse/tok_alloc/tok_freeover a static BASS arena, built intodogtok.wasmby theWASIbranch of the top-levelCMakeLists.txt;test/wasm/run.shdiffs it against nativedogtok.
KEYW.h, DEF.h, FREE.h, BRCT.h, MDBLK.h — tokenizer infra
The per-language .c lexers share these: a keyword-set probe, a definition-marking second pass, a free-text scanner, bracket matching, and the Markdown block-cursor helpers.
KEYWOpen/KEYWHas(keyw) — the 256-slot open-addressing keyword set each language builds once.DEFMark(DEF_TAG='N',CALL_TAG='C') — second pass over a tok array: enrich tags, run per-language NFA patterns.FREELexer/FREEu8sFeed(FREEstate) — the natural-language scanner for comment bodies and docstrings.- It also lexes StrictMark inline spans (code→
H, emph/strike/link→G), kept sticky withFthrough the overlay (DOG-006). FREECommentFeed/FeedN— split the comment delimiter (its ownDtoken, never parsed) from the StrictMark-scanned body.- The
Nform takes fixed widths instead: a line//is 2,0, a block/* */is 2,2. BRCTMatch/BRCTInner/BRCTOuter/BRCTCheck/BRCTDepth— bracket matching: partner, region, balance, depth.MDBLKu8csSkipSpaces/SkipIndents/Run/AllBlank/DrainLine— the slice-cursor Markdown block idioms.MDFM.h— MARK-017: a.mdYAML front matter, split off a file's head and read as pairs.MDFMFind— split a file into{open, body, close, rest}; NONE when there is no preamble.MDFMEach/MDFMGet— walk the flatkey: valuepairs (one fire per sequence element), or look one up.MDFMLine/MDFMu8csDrainElem— the ragel leaves: classify one preamble line, drain one[a, b]element.
Tag alphabet
Tags a tok32 carries, painted by dog/THEME.h: D comment, G string, L number, H preproc, R keyword, P punctuation, S default, W whitespace, U URI. DEF adds N name and C call; F is a filename, T a StrictMark meta key.
Per-language tokenizers — roster
Each *T.h is one ragel-generated <LANG>Lexer registered in dog/tok/TOK.c's TOK_TABLE by extension. Languages (from that table):
- Systems:
CT→C,CPPT→C++,GOT→Go,RST→Rust,DT→D,ZIGT,ODNT,SOLT,VERT→Verilog,GLST→GLSL. - JVM / .NET:
JAT→Java,KTT→Kotlin,SCLT→Scala,CST→C#,FSHT→F#,CLJT→Clojure. - Scripting:
PYT,JST,TST,RBT→Ruby,PRLT→Perl,LUAT,PHPT,SHT→Bash,PWST,RT→R,JLT→Julia. - Functional / ML:
HST→Haskell,MLT→OCaml,ELXT→Elixir,ERLT→Erlang,NIMT→Nim,GLMT→Gleam,AGDT→Agda. - Mobile / app:
SWFT→Swift,DARTT→Dart. - Markup / web:
HTMT→HTML,CSST→CSS,SCSST→SCSS,TYST→Typst,LAXT→LaTeX. - Data / config:
JSONT→JSON,YMLT→YAML,TOMLT→TOML,SQLT→SQL,GQLT→GraphQL,PRTT→Protobuf,HCLT,NIXT. - Build / ops:
CMKT→CMake,MAKT→Makefile,DKFT→Docker,VIMT→VimL,FORT→Fortran,LLT→LLVM IR. - Prose:
MDT→Markdown (two-pass),MKDT→StrictMark,RSTT→reST (RSTis Rust),TXTT→plain text, the fallback.
To regenerate a lexer: ragel -C XXT.c.rl -o XXT.rl.c -L.
To eyeball one: doghili FILE (tok/HILI.cli.c) reprints the source token-painted, every other token underlined, with a per-row ruler naming each char's tag. dogtok FILE dumps the same stream as tag<TAB>token lines.
Test harness
test/TESTBE.h — hermetic-store test setup
TESTBEmkdtemp/TESTBErmrf create and tear down a .be-free scratch dir under /tmp so a C test's HOMEOpen cwd-walk can never escape into a real $HOME/.be; TESTBEShieldTmp loudly removes a stray leaked /tmp/.be.