Repository navigation
Backlog
Labels
bugSomething isn't workingepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p2Nice to have this cycle
Description
Problem
Two setup gaps mean an agent can get an answer from the wrong Charter, or no gate at all, without knowing.
- The hook can run the wrong CLI.
charter hook print --claudeemitspnpm exec charter context-refresh --once(hook.ts:564). On a fresh clone,pnpm installcan't linknode_modules/.bin/charterbeforedistexists, sopnpm exec charterfalls through to a global install. In the review it printedv2.1.0(the released CLI) against 3.0.0 source. - No local gate on a fresh clone.
git config core.hooksPathis empty after cloning, so the.githookspre-commit evidence gate doesn't run until someone sets it.CLAUDE.mdmentions it only as an environment note.
Expected
- Hook commands resolve the repo's own CLI and say which version answered. Results include
cliVersionand the CLI's source path. A mismatch with the workspace package version warns. charter doctor(andbootstrap) reports an unsetcore.hooksPathwhen.githooks/exists, with the one-line fix.
Acceptance
- With a global older
charteronPATHand an unbuilt workspace, the hook reports the mismatch instead of silently answering with the old CLI. doctoron a fresh clone lists the unsetcore.hooksPathas a finding.
Works on its own. Related to #397 (release gap) and #342 (hook/CI alignment). Part of #437.
Coordination with existing issues
- score: add harness-enforcement dimensions (Claude Code hooks, evals, memory, cost, GitHub hygiene, deploy targets) #311 (score hook dimensions):
score'sdetectHookFilesalready readscore.hooksPath, and score: add harness-enforcement dimensions (Claude Code hooks, evals, memory, cost, GitHub hygiene, deploy targets) #311 extends it to Claude Code hooks. Use one shared hook-detection routine fordoctor(this issue) andscore(score: add harness-enforcement dimensions (Claude Code hooks, evals, memory, cost, GitHub hygiene, deploy targets) #311). Keep it cross-agent: cover each supported vendor's hook config, not only Claude's. - Release needed: published 2.1.0 still overwrites a hardened governance workflow (docs on main say it won't) #397: the version-mismatch warning here is what makes the release gap visible to an agent.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p2Nice to have this cycle
Activity