Skip to content

Hook can answer with the wrong Charter CLI, and a fresh clone has no local gate #450

Backlog

Description

@stackbilt-admin

Problem

Two setup gaps mean an agent can get an answer from the wrong Charter, or no gate at all, without knowing.

  1. The hook can run the wrong CLI. charter hook print --claude emits pnpm exec charter context-refresh --once (hook.ts:564). On a fresh clone, pnpm install can't link node_modules/.bin/charter before dist exists, so pnpm exec charter falls through to a global install. In the review it printed v2.1.0 (the released CLI) against 3.0.0 source.
  2. No local gate on a fresh clone. git config core.hooksPath is empty after cloning, so the .githooks pre-commit evidence gate doesn't run until someone sets it. CLAUDE.md mentions it only as an environment note.

Expected

  • Hook commands resolve the repo's own CLI and say which version answered. Results include cliVersion and the CLI's source path. A mismatch with the workspace package version warns.
  • charter doctor (and bootstrap) reports an unset core.hooksPath when .githooks/ exists, with the one-line fix.

Acceptance

  • With a global older charter on PATH and an unbuilt workspace, the hook reports the mismatch instead of silently answering with the old CLI.
  • doctor on a fresh clone lists the unset core.hooksPath as a finding.

Works on its own. Related to #397 (release gap) and #342 (hook/CI alignment). Part of #437.

Coordination with existing issues

Activity

  1. added
    bug
    priority:p2
    epic:preflight
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugepic:preflightpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions