T81 Foundation

T81 Foundation: Developer Onboarding

This guide is the deterministic portal: it lays out the ledgered path from cloning the repo to shipping a change, complete with Axion policies, canonical builds, and reproducibility checkpoints.


1. Prerequisites

2. Repository Layout at a Glance

Area Purpose
include/t81/ Public headers (t81::v1) — add APIs that respect Axion and ternary invariants.
src/ Implementation for compiler, VM, tools, and deterministic tooling with canonical builds.
tests/cpp/ Regression proofs; every manifest change gets tests.
docs/ Guides, portal narratives, and quickstarts (Doxygen output is generated under build/api).
spec/ Normative constitution; updates require RFCs under spec/rfcs/.
benchmarks/ Benchmark runners and report generation scripts that feed docs/reference/benchmarks.md.
tools/, scripts/ Utility helpers used in reproducibility workflows (Axion trace capture, policy generation).

Always refer to ../explanation/ARCHITECTURE.md and ../explanation/DESIGN.md before modifying cross-cutting subsystems.

3. Build, Test, and Docs Workflow

git clone https://github.com/t81dev/t81-foundation.git
cd t81-foundation
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release      # this config is the baseline manifest entry
cmake --build build --parallel
ctest --test-dir build --output-on-failure
cmake --build build --target docs                  # regenerates build/api/html

3.1 Canonical Ecosystem Consumer Path

For migration-aligned runtime validation, run the canonical e2e bundle from t81-examples:

scripts/run-canonical-runtime-demo.sh

Use t81-foundation/examples as reference and research demos; contract promotion evidence should use the t81-examples runtime bundle.

4. CLI Cheat Sheet

The primary entrypoint is the t81 binary built under build/.

t81 compile <file.t81> [-o <file.tisc>]
t81 run <file.t81|.tisc>
t81 check <file.t81> (syntax + semantic validation)
t81 benchmark [benchmark flags]
t81 weights import <safetensors|gguf> [...]

5. First Bug Fix / Feature Path

  1. Pick a target: For example, tests/cpp/t81_tensor_* exercises tensors; fixes here have fast feedback loops.
  2. Reproduce: Build t81_tensor_matmul_test and confirm failure with ctest -R tensor_matmul.
  3. Code change: Modify headers under include/t81/types or core/types keeping RAII/no-exceptions rules.
  4. Add regression test: Every semantics change needs a test addition under tests/cpp/.
  5. Docs touch: Update docs/how-to/tensor-guide.md or relevant doc to describe new behavior.
  6. Verify: cmake --build build --target t81_tensor_matmul_test plus ctest -R tensor_matmul and rerun cmake --build build --target docs.

6. Troubleshooting Tips

7. Further Reading

Keeping this guide up-to-date is critical: each release should confirm the commands still work and the CLI workflow matches ../../README.md.