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
|
@@ -54,3 +54,11 @@ When the command finishes, read the printed summary and relay the key numbers:
|
|
|
54
54
|
Tell the user they can:
|
|
55
55
|
- Run `/truecourse-list` to see the full violation list.
|
|
56
56
|
- Run `/truecourse-fix` to apply suggested fixes.
|
|
57
|
+
|
|
58
|
+
If the run was a **full analyze on `main`** (not a feature branch, not `--diff`), also suggest committing `.truecourse/LATEST.json`:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
git add .truecourse/LATEST.json && git commit -m "refresh truecourse baseline"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
That's the baseline `--diff` and the pre-commit hook read. Committing it on `main` lets fresh clones and `git worktree add` checkouts use the hook without re-running analyze. Don't suggest this on feature branches — `LATEST.json` updates from multiple PRs will conflict on a large generated JSON.
|
|
@@ -20,7 +20,7 @@ Install, configure, and manage the pre-commit hook that blocks new violations be
|
|
|
20
20
|
|
|
21
21
|
- **Always invoke via `npx -y`** — without `-y`, npx will hang on the "Ok to proceed?" prompt whenever the user hasn't cached the latest `truecourse` version.
|
|
22
22
|
- **The hook makes commits slower.** Every commit runs `truecourse analyze --diff`. On large repos that can be tens of seconds per commit. Make sure the user knows before you install.
|
|
23
|
-
- **Baseline required.** The hook needs
|
|
23
|
+
- **Baseline required.** The hook diffs against `.truecourse/LATEST.json`. The user needs `truecourse analyze` to have run at least once. On `main`, they should also commit the resulting `LATEST.json` so the hook works in fresh clones and `git worktree add` checkouts without a per-checkout cold-start. If no baseline exists yet, suggest `/truecourse-analyze` first.
|
|
24
24
|
- **`hooks.yaml` is the single source of truth.** Installation creates `<repo>/.truecourse/hooks.yaml` with defaults; edit it to change policy. The file is meant to be committed so the whole team shares one hook config.
|
|
25
25
|
|
|
26
26
|
## Instructions
|
|
@@ -34,7 +34,7 @@ Install, configure, and manage the pre-commit hook that blocks new violations be
|
|
|
34
34
|
|
|
35
35
|
### 2. Install flow
|
|
36
36
|
|
|
37
|
-
1. Tell the user the tradeoff upfront: commits will be slower;
|
|
37
|
+
1. Tell the user the tradeoff upfront: commits will be slower; the hook needs a `.truecourse/LATEST.json` baseline (run analyze on `main` and commit the file so it propagates to clones and worktrees); policy lives in `.truecourse/hooks.yaml` which they should also commit.
|
|
38
38
|
2. Run:
|
|
39
39
|
```
|
|
40
40
|
npx -y truecourse hooks install
|
|
@@ -42,7 +42,7 @@ Install, configure, and manage the pre-commit hook that blocks new violations be
|
|
|
42
42
|
3. Relay the output. Two files get created:
|
|
43
43
|
- `.git/hooks/pre-commit` (the script git invokes)
|
|
44
44
|
- `.truecourse/hooks.yaml` (starter policy, blocks `critical` and `high` by default, LLM off)
|
|
45
|
-
4. If the user hasn't run a full analysis in this repo, suggest `/truecourse-analyze` — without
|
|
45
|
+
4. If the user hasn't run a full analysis in this repo, suggest `/truecourse-analyze` — without a baseline, the hook has nothing to diff against. After analyze on `main`, also remind them to commit `.truecourse/LATEST.json` so fresh worktrees/clones inherit it.
|
|
46
46
|
|
|
47
47
|
### 3. Status flow
|
|
48
48
|
|