A compiler-compiler for cognition Β· open source Β· MIT

Teach your AI a language
it can never break.

Invent a notation. Lock it so the model can't malform it. Turn it into a skill any agent loads on demand. Your agents stop drifting β€” your prompts stop rotting β€” everything you teach, stays taught.

β˜… Get it on GitHub See what it gets you ↓

120 tests passing Β· Python 3.11+ Β· one type: the skill dir Β· content never judged, only syntax

The problem you already feel

Every prompt you write quietly rots.

The model paraphrases your format. Forgets your conventions. Melts your careful structure back into mush three turns later. You re-explain the same scaffold for the hundredth time.

ChainCompiler makes the structure load-bearing β€” checked by code at every seam β€” so the way you taught your AI to think becomes a thing it owns, not a thing it drifts away from.

The engine

Build a thinking-tool once.
Reuse it forever.

Mint a whole cognition-language β€” how to attend, how to reason, how to chain skills together β€” in a single call. It compiles into a skill dir any Claude agent auto-loads. Compose them. Stack them. Organize them into a tree.

β†’ Nothing you make is ever a dead end. The algebra closes, so every piece composes with every other.

chaincompiler demo
# mints a whole 'triage' cognition-language β€”
# attention chain + chain-of-reasoning + skill
# chain β€” in one call, as loadable skills.

🐝 GlyphSteer · the flagship

Search that reads your mind β€”
and never shows its work.

Tag your corpus with a tiny glyph vocabulary, and your search suddenly finds the exact right thing on the first try. The same markers steer keyword search and semantic search at once β€” then vanish before a single character reaches the reader.

0.42 β†’ 1.00
retrieval accuracy (MRR) on the test corpus β€”
from "buried in the results" to "top hit, every time"
You get the precision

An invisible facet pins the result you actually want to the top β€” without you writing a smarter query.

Two regimes, one tag

The marker nudges both the keyword index and the embedding direction. Steer everything from one place.

Your output stays clean

The glyphs steer matching only β€” they're stripped before the text is handed back. A hard, tested invariant.

β†’ The dream: a retrieval layer that quietly knows what you meant, and a generation layer that never sees the machinery.

Read the GlyphSteer code β†’

rulecatcher Β· the gate

Your AI never speaks
malformed again.

Show it a handful of examples and it learns the grammar. From then on, anything off-format is caught: a wrong-order token gets rotated back into place; a foreign token is rejected outright.

β†’ The gate that keeps the model inside its own syntax β€” so the structure you designed is the structure you get.

rulecatcher catch examples.txt --scope mydsl
rulecatcher lint  newtext.txt  --scope mydsl
# non-zero exit on a violation β†’ CI-gateable

honeyc Β· the compiler

Write it once.
Read it as anything.

Express an idea in one compact glyph chain, then render it as prose, triples, Prolog, or a database query β€” whichever the moment needs.

β†’ One source of truth, every shape. Stop maintaining the same idea in four formats by hand.

honeyc render examples/mbr.rune --as prose
honeyc render examples/mbr.rune --as cypher
# πŸŒΈβ€πŸ’§ β†’ 🍯 β†’ 🍹  becomes whatever you need

SkillTree Β· the organization

Give your agent a thousand skills
without drowning it.

A tree you cat your way down: load one root, walk to the exact leaf you need, and nothing else pollutes the context window.

β†’ Progressive disclosure built into the filesystem β€” and validated, so no breadcrumb ever breaks.

skilltree build tree.manifest.json mytree
skilltree validate mytree
# load the root; walk to the one leaf you need

Steward Β· the loop-runner

Automation that only acts
when it's earned the right.

A loop that observes, frames, integrates β€” then locks on a warrant before it commits. Present one steward, run many underneath.

β†’ Headless, gated, and honest about what it's allowed to do. The opposite of an agent that just runs off.

# O β†’ F β†’ I β†’ A β†’ P
# the A-stage is the LOCK:
# warrant-freeze β†’ admit, or reject.

Marketplace Β· Federation

Share what you built.
Build on what others share.

Publish a skill with one call; opt it public when you're ready. Every tool can become its own repo, and marketplaces federate under one another.

β†’ A growing commons of cognition tools β€” untrusted by default, gated on the way in.

# each emitted MCP becomes a repo;
# the marketplace IS a git repo;
# contribute = a gated pull request.
120
tests passing
1
type β€” the skill dir
MIT
free to use & fork
0
content judged β€” syntax only

Where it's going

What's shipped

It's open source. Take it.

Clone it, read it, build your own cognition-languages on it. The pattern is the gift.

git clone https://github.com/sancovp/chaincompiler
./install.sh && chaincompiler demo