com um clique
com um clique
Run TrueCourse architecture analysis on this repository
Fix TrueCourse violations that have suggested fixes
List TrueCourse violations found in this repository
| name | truecourse-hooks |
| description | Install, configure, or remove the TrueCourse pre-commit hook |
| user_invocable | true |
| triggers | ["install the pre-commit hook","set up truecourse hooks","enable truecourse hook","check hook status","remove pre-commit hook","change what the hook blocks","edit hook config"] |
Install, configure, and manage the pre-commit hook that blocks new violations before they land in git.
npx -y — without -y, npx will hang on the "Ok to proceed?" prompt whenever the user hasn't cached the latest truecourse version.truecourse analyze --diff. On large repos that can be tens of seconds per commit. Make sure the user knows before you install..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.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..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.npx -y truecourse hooks install
.git/hooks/pre-commit (the script git invokes).truecourse/hooks.yaml (starter policy, blocks critical and high by default, LLM off)/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.Run:
npx -y truecourse hooks status
Relay the output. It reports whether the hook is installed, the config path, the block severities, and whether LLM is on.
Run:
npx -y truecourse hooks uninstall
Only removes the git hook script. hooks.yaml is preserved (it's team policy, not install state).
The config lives at <repo>/.truecourse/hooks.yaml. Use the Read and Edit tools — do not shell out through truecourse for edits.
Schema:
pre-commit:
block-on: [critical, high] # valid: info, low, medium, high, critical
llm: false # true = LLM rules on every commit (tokens per commit)
Common edits the user might ask for:
block-on: [critical, high, medium]block-on: [critical]llm: true. Warn the user this spends tokens on every commit — confirm before flipping it.After editing, run npx -y truecourse hooks status so they can verify the parsed values match their intent.
If a user comes to you saying "my commit got blocked" or similar:
/truecourse-fix to apply fix suggestions to those violations.git commit --no-verify (standard git bypass).