Skip to content

stack-research/deterministic-compiler-for-thought

Repository files navigation

dct

Deterministic Compiler for Thought.

DCT compiles TSpec v0 into canonical IR, graph analysis artifacts, a deterministic text report, and a tamper-evident provenance chain.

Why

DCT is built as a deterministic system:

  • same input + same version + same lockfile => byte-identical artifacts
  • canonical JSON for all machine-readable outputs
  • provenance hash chaining for tamper evidence

Install

uv sync --dev

CLI

dct build examples/onboarding.tspec --out out
dct parse examples/onboarding.tspec --out out
dct validate out/20_normalized_ir/artifact.json
dct repro examples/onboarding.tspec --runs 5
dct verify out
dct fingerprint

Output Layout

out/
  00_input/
    artifact.json
    artifact.sha256
  10_ir/
    artifact.json
    artifact.sha256
  20_normalized_ir/
    artifact.json
    artifact.sha256
  30_analysis/
    artifact.json
    artifact.sha256
  40_report/
    artifact.txt
    artifact.sha256
  provenance.jsonl

Development

uv run ruff check .
uv run ruff format --check .
uv run pytest

About

Deterministic Compiler for Thought (DCT): compiles TSpec into canonical IR, analysis artifacts, and a hash-chained provenance log with byte-identical, reproducible outputs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages