Akashic is a schema/code-gen package with breaking change detection
Find a file
Dunemask e81ff83168
Some checks failed
CI / Typecheck & test (push) Has been cancelled
CI / Cross-language byte-match (7/7, Docker) (push) Has been cancelled
[CHORE] update HOURS log: imports optimization + code dedup
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-17 09:04:04 -06:00
.github/workflows [FEATURE] full-matrix Docker image for cross-language byte-match; switch CI 2026-09-12 18:05:06 -06:00
docker [FEATURE] docker harness: cas+https remote servers under injected latency 2026-09-17 08:22:10 -06:00
docs [CHORE] doc: transitive resolution + full-graph lock + CAS publish-time flatten 2026-09-17 08:57:19 -06:00
examples [FEATURE] transitive imports + full-graph akc.lock + shared cross-ref emission 2026-09-17 08:22:10 -06:00
src [FEATURE] CAS publish-time transitive flatten: self-contained cas+ artifacts 2026-09-17 08:45:05 -06:00
test [FEATURE] CAS publish-time transitive flatten: self-contained cas+ artifacts 2026-09-17 08:45:05 -06:00
.dockerignore [FEATURE] full-matrix Docker image for cross-language byte-match; switch CI 2026-09-12 18:05:06 -06:00
.gitignore [FEATURE] incremental C# generator (byte-identical wire, single-file-per-shard) 2026-09-13 01:43:58 -06:00
biome.json [CHORE] Move demos to examples/, add biome 150-width config 2026-09-08 14:24:42 -06:00
bun.lock Initial akashic platform: model, store, resolve, codegen, CLI 2026-09-04 22:22:14 -06:00
bunfig.toml [FIX] Scope bare bun test to the package's own test/ dir 2026-09-08 14:34:27 -06:00
DESIGN.md [CHORE] add final-project docs: DESIGN, FINAL_REPORT, HOURS 2026-09-17 08:22:10 -06:00
FINAL_REPORT.md [CHORE] add final-project docs: DESIGN, FINAL_REPORT, HOURS 2026-09-17 08:22:10 -06:00
HOURS.md [CHORE] update HOURS log: imports optimization + code dedup 2026-09-17 09:04:04 -06:00
LICENSE [FEATURE] Evolution engine: change classifier, gate, two removal modes 2026-09-10 06:57:52 -06:00
package.json [FEATURE] Evolution engine: change classifier, gate, two removal modes 2026-09-10 06:57:52 -06:00
README.md [FEATURE] add Java + Kotlin code generators (byte-identical wire) 2026-09-12 17:39:03 -06:00
tsconfig.build.json [CHORE] Add lib + all-platform binary build; split akashic verb to gen 2026-09-08 14:42:45 -06:00
tsconfig.json Initial akashic platform: model, store, resolve, codegen, CLI 2026-09-04 22:22:14 -06:00

Akashic

A git-native, language-agnostic contract/schema platform. Define your contract primitives — objects, enums, errors, localizations, constants, routes, events, well-known types — once, in a normalized language-neutral model; version them as git-friendly NDJSON; resolve them with a fast memoized engine; and generate real per-language packages that other teams install.

Producer runs akashic to EMIT a native package; consumers just install it — they never run akashic.

contracts (NDJSON source, git)  ──►  resolve (memoized O(n+e))  ──►  generate installable package
        git-versioned                  structural sharing               per language, native deps

Language targets

TypeScript (zod), Python (pydantic), Rust (serde), Go (stdlib), Dart (SDK), Java (JDK-only), Kotlin (stdlib-only) — all seven shipped and full: core contract + HTTP client + socket channels + runtime constraint enforcement + the byte-identical cross-language wire envelope. The Java/Kotlin generators use no reflective JSON library (hand-ordered JSON), so plain javac / kotlinc prove byte-identity — see docs/breakdown/generators.md for the interop toolchain matrix.

Quick start

bun install

# Build the bundled example contract into examples/contracts/example/dist/
bun run src/cli/index.ts build examples/contracts/example

# Build a project to a custom output directory
bun run src/cli/index.ts build examples/contracts/zeus --out zeus-out-ts

# Pick a target language
bun run src/cli/index.ts build examples/contracts/zeus --lang python --out zeus-out-py

# Scaffold a fresh project, then build it
bun run src/cli/index.ts init my-contracts
bun run src/cli/index.ts build my-contracts

build reads the NDJSON source, validates it, resolves the graph, writes the binary cache, and emits an installable package (default target TypeScript, under dist/ts/). See docs/breakdown/build-pipeline.md.

Bundled examples

  • examples/contracts/example/ — a small synthetic contract exercising every feature.
  • examples/contracts/zeus/ — a hand-translated slice of a real production contract set.
  • examples/contracts/apple/ — a peer project in two versions, for multi-version imports.
  • examples/typescript/thunderbolt/ — a runnable TS consumer of the generated @akc/zeus package.
  • examples/python/consumer/ — a runnable Python consumer.
  • examples/interop/ — cross-language byte-identical wire proofs.

Details: docs/breakdown/examples.md.

Module map

path role
src/model/ the locked contract types, builders, and a structural validator
src/store/ NDJSON (git source) + sharding + the derived binary cache
src/resolve/ the resolver, reverse index, and incremental re-resolve — the core engine
src/codegen/ the Generator interface + seven generators (TS/Python/Rust/Go/Dart/Java/Kotlin)
src/imports.ts cross-project import resolver — bundle mode, closure-only vendoring
src/import/ inbound schema importers — jsonschema.ts (JSON Schema -> Model), openapi.ts (OpenAPI 3.x -> Model + services, reuses the JSON Schema importer for components.schemas)
src/cli/ the init / build / import command-line entry point
src/project.ts akc.yaml config + the end-to-end build pipeline
src/index.ts the public programmatic API
test/ unit + conformance tests on the safety-critical paths
examples/ contracts, per-language consumers, cross-language interop proofs

Documentation

Full docs live in docs/:

  • docs/design/ — the WHY: git-as-substrate, two-layer model, null-only semantics, the locked schema, the resolve engine, storage format, measured evidence, positioning vs protobuf/gRPC.
  • docs/breakdown/ — the WHAT/WHERE: module map, build pipeline, record kinds, the five generators, tests, examples, roadmap.
  • docs/integrations/ — WITH THIRD PARTIES: installing & using the generated package, HTTP client + transports, socket channels + adapters, cross-project git imports, well-known types.

Development

bun run tsc     # type-check (must pass clean)
bun run test    # unit + conformance tests