Skip to main content
The first truecourse analyze creates .truecourse/ in your repo. Three files inside it are committable and travel with the repo: Everything else (analyses/, diff.json, history.json, ui-state.json, logs/, .analyze.lock) is local-only and added to .truecourse/.gitignore automatically. See Storage for the full layout.

Setting the baseline

First time, on main:
Refreshing the baseline: re-run truecourse analyze after merging to main and commit the updated LATEST.json.
Don’t commit LATEST.json from feature branches: two PRs both updating it will conflict on a large generated JSON. Commit it only after merging to main.

Diff analysis

analyze --diff compares your working tree against the committed baseline and reports only the violations your changes introduce (and the ones they resolve). The result lands in .truecourse/diff.json (gitignored, per-checkout, overwritten each diff run). This is the same check the pre-commit hook runs on every commit.

Worktrees and fresh clones

LATEST.json is tracked, so git worktree add ../feat-x and fresh clones inherit the baseline through git. truecourse analyze --diff and the pre-commit hook both work on the first commit in a new worktree, with no per-checkout cold-start. Inside a worktree, run truecourse analyze --diff to see what your in-flight changes introduce relative to main’s committed baseline.

Dirty working trees

A full truecourse analyze wants a clean tree so the snapshot maps to a commit. On a dirty tree it prompts before stashing:

Next steps

Git hooks

Block commits that introduce new violations, using this baseline.

Storage

The full committable vs gitignored layout of .truecourse/.