truecourse 0.5.7 → 0.5.8-windows.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -1
- package/cli.mjs +1970 -181
- package/package.json +1 -1
- package/public/assets/{index-DaPvUT-_.js → index-Bw6ucreX.js} +13 -13
- package/public/index.html +1 -1
- package/server.mjs +1776 -116
- package/skills/truecourse/truecourse-analyze/SKILL.md +8 -0
- package/skills/truecourse/truecourse-hooks/SKILL.md +3 -3
package/README.md
CHANGED
|
@@ -52,6 +52,32 @@ No setup step. TrueCourse creates `.truecourse/` in your repo on first analyze a
|
|
|
52
52
|
|
|
53
53
|
TrueCourse uses the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) for LLM-powered rules. If `claude` isn't on your PATH, deterministic rules still run and LLM rules are skipped.
|
|
54
54
|
|
|
55
|
+
## Setup
|
|
56
|
+
|
|
57
|
+
The first `truecourse analyze` creates `.truecourse/` in your repo. Three files inside it are committable and travel with the repo:
|
|
58
|
+
|
|
59
|
+
| File | Purpose |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `LATEST.json` | Most recent analysis snapshot. Doubles as the baseline for `truecourse analyze --diff` and the pre-commit hook. |
|
|
62
|
+
| `config.json` | Per-repo rule categories and LLM toggles. |
|
|
63
|
+
| `hooks.yaml` | Pre-commit hook policy (created by `truecourse hooks install`). |
|
|
64
|
+
|
|
65
|
+
Everything else (`analyses/`, `diff.json`, `history.json`, `ui-state.json`, `logs/`, `.analyze.lock`) is local-only and added to `.truecourse/.gitignore` automatically.
|
|
66
|
+
|
|
67
|
+
**First time, on `main`:**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
truecourse analyze
|
|
71
|
+
git add .truecourse/LATEST.json .truecourse/config.json
|
|
72
|
+
git commit -m "add truecourse baseline"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**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.
|
|
76
|
+
|
|
77
|
+
### Worktrees and fresh clones
|
|
78
|
+
|
|
79
|
+
`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 — 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; the diff result lands in `.truecourse/diff.json` (gitignored, per-checkout).
|
|
80
|
+
|
|
55
81
|
## CLI Commands
|
|
56
82
|
|
|
57
83
|
```bash
|
|
@@ -102,7 +128,7 @@ truecourse hooks status # Show hook status + config
|
|
|
102
128
|
|
|
103
129
|
On every commit the hook runs `truecourse analyze --diff` against the repo's last full analysis and blocks if any newly-introduced violation matches the configured block severities. **Commits will take as long as a full diff analysis** — on large repos that can be tens of seconds per commit. `truecourse hooks install` warns you and requires confirmation before writing the hook.
|
|
104
130
|
|
|
105
|
-
|
|
131
|
+
The hook diffs against `.truecourse/LATEST.json`, so you need a committed baseline first — see [Setup](#setup). Without it the hook has nothing to diff against.
|
|
106
132
|
|
|
107
133
|
**Bypass:** `git commit --no-verify` (standard git).
|
|
108
134
|
|