Skip to content
cneckarPublic

About

The most ambitious yak shave in the history of engineering

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

Yakcc

PR CI

Shave once, reuse forever. Yakcc treats software as a graph of small, content-addressed atoms. Any project can be shaved down to its atoms, the atoms go into a shared, searchable registry, coding agents look there before they write anything, and any root in the graph can be emitted again as a program in the language or binary format you need.

The name is a yak-shave joke that is also the thesis: do the shave once, for everyone.

The four parts

Part What it does Start here
1 Shave and catalog Take a project apart into atoms, record the graph between them, index every useful root with a vector embedding, and store it in a registry that mirrors to a shared commons. docs/SHAVING.md, docs/REGISTRY.md
2 Discover while building An MCP server, IDE hooks and a system prompt make a coding agent search the registry before it generates code, and contribute what it does write back as atoms. docs/INTEGRATION.md
3 Emit anywhere Lower a graph deterministically to TypeScript, LLVM IR and native executables (standard llc and linker), WasmGC, JVM class files, and Python, Go or Rust source. docs/EMISSION.md
4 Measure Benchmarks that hold the project to its goals: no workflow change, cheaper than generating code, less code, less attack surface. docs/BENCHMARKS.md

The model underneath all four is in three short documents:

  • docs/ATOMS.md: what an atom is, how it is identified, and where shaving stops.
  • docs/GRAPH.md: the graph an atom lifts to, its identity and root, and how atoms link.
  • docs/LEAVES.md: the small fixed set of operations at the bottom of every graph, and why it is that set.

docs/ARCHITECTURE.md shows how the packages fit together. docs/ROADMAP.md says what works today, what is partial, and what is next. Two planned extensions are designed there: findings (known bugs and vulnerabilities attached to the atoms that exhibit them) and improvements (a better root registered against the one it replaces, with proof).

Quick start

Requires Node 22. The CLI is published as @yakcc/cli (currently a 0.7 alpha):

npm install -g @yakcc/cli

To run from a clone instead (needs pnpm 9), build and put packages/cli/dist on your PATH:

pnpm install && pnpm build

Set up a project (creates .yakcc/, wires detected IDE integrations, seeds the registry):

yakcc init

Shave a file into atoms and search for them:

yakcc shave src/my-module.ts
yakcc query "parse a bracketed list of integers"

Assemble a module from registry atoms, or build a program to a native executable (needs LLVM's llc and clang):

yakcc compile examples/parse-int-list
yakcc build --native src/main.ts -o main

The full walkthrough is docs/USING_YAKCC.md. Every command, MCP tool, HTTP endpoint and environment variable is listed in docs/INTERFACES.md.

What init turns on

By default a project runs in global mode: it mirrors atoms from https://registry.yakcc.com, pushes atoms you shave back to it, and sends anonymized hook telemetry (hashes and scores, never source or prompt text) to https://metrics.yakcc.com. yakcc init --airgapped, or YAKCC_AIRGAP=1, turns all network use off. See docs/REGISTRY.md and docs/INTEGRATION.md.

Principles

  1. Content is identity. An atom is named by the hash of what it is. There are no versions, no package names and no owners. A better implementation is a new atom that wins selection; the old one is never deleted.
  2. The embedding is only an index. Vector search finds candidates. It never decides that two things are the same or that one is correct.
  3. Shave everything, write nothing by hand. Every operation above the leaves is an atom shaved from the source that really implements it, including the language runtime itself.
  4. Refuse, do not guess. A front end that cannot represent a construct faithfully says so. A reference it cannot resolve is recorded in the graph, never dropped.
  5. Same graph, same bytes. Lifting, canonical form, identity and every lowering are deterministic.
  6. Minimum surface. A program carries only the atoms it reaches.

Repository layout

Path Contents
packages/ The engine. See the package map in docs/ARCHITECTURE.md.
bench/ Benchmark suites. See docs/BENCHMARKS.md.
bootstrap/ The manifest of yakcc shaved by itself (expected-roots.json) and a seed registry.
examples/ Small end-to-end demos.
docs/ This documentation, the decision records and the discovery system prompt.
website/ The public site.

Contributing

See docs/CONTRIBUTING.md. Agents working in this repository or wiring yakcc into their own workflow should read AGENTS.md.

License

  • The engine (everything that shaves, stores, searches and emits) is under the Apache License 2.0.
  • Atom content (anything in a registry, including packages/seeds/src/blocks/** and what bootstrap/expected-roots.json refers to) is dedicated to the public domain under The Unlicense.

The engine is a tool with conventional copyright. The registry is a commons. docs/PRIOR_ART.md is a defensive publication of the mechanisms.

About

The most ambitious yak shave in the history of engineering

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages