Trace repository impact, authored intent and fail-closed migration plans, then verify changes with proof-honest verdicts. Local-first and deterministic.
semctx reads the Git diff of a TypeScript repository and shows which exported contracts, declared
rules and tests the change touches. It ends with one verdict, PASS, WARN or BLOCK. By default BLOCK
exits with code 3, so a Git hook, a CI job or a coding agent can stop the change.
Analysis runs on your machine. It reads your files and your local Git history, and calls no LLM and
no network service. To try it on your own code, start from a clean working tree in a repository
with at least one commit (Bun 1.4.3 or newer):
bunx semctx@latest setup # once: config and local index
# ...edit some code...
bunx semctx@latest verify diff # verdict for your uncommitted edits
The quick start shows the branch check that CI runs.
What a verdict looks like
The first-use demo uses a small repository with no tests.
Take it at its first commit, run semctx setup, then make the demo's three edits. One of them adds
a required field to an exported interface in src/cart.ts:
Verdict: WARN
range : working tree
changed files : 3
impacted nodes: 7
Impacted contracts
Exported interface "CartTotal" is a public, compiler-enforced contract. [statically_verified]
Recommended tests
none
Unknowns
? Could not confirm index binding (STALE: ANALYSIS_INPUT_MISMATCH, WORKING_DIFF_MISMATCH); impact is reported without a freshness proof.
Findings
[WARN ] contract_changed_without_test: exported contract changed without a covering test: CartTotal
In the report
What it tells you
Verdict: WARN
The answer. WARN is advisory, so the exit code is 0.
changed files, impacted nodes
Files in the diff, then the files and declarations whose lines it touches.
Impacted contracts
Exported interfaces and type aliases the change edits.
[statically_verified]
How semctx knows: read from the code's structure. tested means a test file imports it; inferred means it rests on a marker comment.
Recommended tests
Test files that import any symbol declared in a changed file, touched or not. The demo has none.
? Could not confirm index binding
The index was built before the edit. Expected when you check uncommitted work.
[WARN ] contract_changed_without_test
The rule that fired, and the symbol it fired on.
computeCartTotal changed as well, but exported functions raise nothing by default: only exported
interfaces and type aliases count as contracts. The other two edits get no finding either. One
rewords a comment, the other slips an off-by-one into an unexported discount helper;
Limits explains why semctx misses that bug. A
public summary of the demo's evidence is published
online; it shows counts and verdicts, not this raw output.
semctx index reads your code with the TypeScript compiler API and stores a graph of symbols,
imports, tests and markers in a local, git-ignored index. verify diff maps the changed lines onto
that graph, applies the rules, and the most severe finding sets the verdict. The exit codes above
are the defaults (--fail-on block).