See docs/THESIS.md for what TSC is.
spec/— canonical theoryengine/ocaml/— canonical implementationruntime/SELF-MEASURE.md— canonical LLM scoring instructiontargets/— named target declarationsskills/— typed skill modules (self-measurement declaration)schemas/— CUE schemas validating skill frontmatterkatas/— kata framework (pedagogical/regression inputs with expected outcomes)docs/— documentation tree (operator manual, design, governance)examples/— runnable examplestests/— conformance and implementation tests
# Install
curl -fsSL https://raw.githubusercontent.com/usurobor/tsc/main/install.sh | sh
# Measure files locally — no credentials required (mechanical mode)
git clone https://github.com/usurobor/tsc.git && cd tsc
coh --mode mechanical --files spec/ --output .tsc/
# Measure with LLM (semantic + structural, requires credentials)
export LLM_PROVIDER=anthropic
export LLM_MODEL=claude-sonnet-4-20250514
export LLM_API_KEY=sk-ant-your-key
coh --mode hybrid --target spec --registry targets/registry.tsc
# Auto mode: picks hybrid if credentials present, mechanical otherwise
coh --target spec --registry targets/registry.tscSee the full quick start guide for all modes and options.
See the operator manual for configuration and usage.
| Mode | Credentials needed | What it does |
|---|---|---|
mechanical |
No | Deterministic structural-proxy scoring. Works offline and in CI. |
llm |
Yes | Semantic scoring via runtime/SELF-MEASURE.md. |
hybrid |
Yes | Runs both backends; report contains mechanical, llm, and final sub-objects. |
auto |
Optional | hybrid when the full provider configuration (LLM_PROVIDER, LLM_MODEL, LLM_API_KEY) is present; mechanical otherwise — a partial set warns with the missing names and falls back. (Default.) |
Direct file input (--files <glob>) works with any mode. Named targets (--target) require --registry.
TSC measures itself:
coh self --mode mechanical # deterministic, offline, no credentials
coh self # auto: hybrid when the full LLM provider config is presentThe whole procedure — which steps are fully mechanical and exactly what
cognitive work is delegated to an LLM, under what constraints — is declared
in skills/self-measure/SKILL.md. That skill
is the authority: its frontmatter is validated by schemas/skill.cue,
cross-checked against the engine source, and rendered into the coh-self
command and the tsc-self-measure
workflow (mechanical job always on; the LLM witness runs via a pinned
Claude CLI, gated by the presence of the CLAUDE_CODE_OAUTH_TOKEN
secret — no separate toggle to drift out of sync with it). CI proves the
rendered artifacts match the skill byte-for-byte.
Start with spec/c-equiv.md, then tsc-core.md, tsc-oper.md, tsc-observation-dynamics.md, tsc-glossary.md. See the doctrine bundle for reading order.
Run the engine against curated inputs with known expected outcomes:
# Smoke-test: kata-01 is the positive control (should always pass)
coh --kata 01-glider --mode mechanical
# Negative control: kata-02 should score low (expected fail)
coh --kata 02-random-soup --mode mechanicalSee katas/README.md for the framework, kata.toml schema, and how to add katas.
See ARCHITECTURE.md for how theory, targets, katas, and verifier fit together.
Useful contributions fall into four areas: theory, targets, verifier, tests. Keep them aligned.
CC-BY-4.0
@software{tsc2026,
title = {TSC: Triadic Self-Coherence Framework},
author = {Peter Lisovin},
year = {2026},
version = {v0.11.0},
url = {https://github.com/usurobor/tsc}
}- Issues: GitHub Issues
- Email: usurobor@gmail.com