Skip to content

fix(hook): resolve printed Claude hooks through the local CLI - #412

Merged
stackbilt-admin merged 1 commit into
mainfrom
fix/issue-400-local-claude-hook
Nov 2, 2026
Merged

stackbilt-admin merged 1 commit into
mainfrom
fix/issue-400-local-claude-hook

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

hook print --claude emitted a bare charter, which does not resolve from the recommended project-local install. Generate the command with the repository's package manager: pnpm exec charter, yarn run charter, or npm exec --no --package=@stackbilt/cli -- charter. A valid packageManager declaration wins; lockfiles and Yarn PnP markers provide the fallback. Printing never changes Claude settings or installs the CLI.

Closes #400. The existing UserPromptSubmit event, matcher, and context-refresh --once behavior remain unchanged; changing the event is a separate decision.

Validation in isolated issue-400 worktree, Windows Node24.19.0 / pnpm9.15.9:

  • pnpm install --frozen-lockfile: pass.
  • pnpm run build, pnpm run typecheck: pass.
  • pnpm exec vitest run packages/cli/src/__tests__/hook-claude-local.test.ts packages/cli/src/__tests__/hook.test.ts packages/cli/src/__tests__/hook-pm.test.ts: 129/129 pass, including 15 new regressions.
  • Real npm integration executes a local CLI fixture with no global Node bin directory on PATH; missing local CLI fails with an empty offline npm cache and writes no installed package/lockfile.
  • pnpm run docs:check: pass (docs-sync skipped absent optional config; papers-lint passed).
  • git diff --check, LF preservation, smart-commit dry-run, TypeScript and ADF pre-commit gates: pass.
  • Full pnpm run test: 1,940 passed and four failed (1,944 total). The failures exactly match the known Windows baseline: bootstrap POSIX premise, context-refresh/serve path separators, and Ctrl-D fake TTY.

Main CI currently fails the dependency audit before build/tests. Compatible repairs are tracked in PR #404 and the separately approved major Zod migration under #310; this PR does not weaken those gates. No merge, publication, deployment, production-data change, tag/main push, or remote deletion performed.

@stackbilt-admin
stackbilt-admin merged commit 1e9d82b into main Nov 2, 2026
6 of 7 checks passed
@stackbilt-admin
stackbilt-admin deleted the fix/issue-400-local-claude-hook branch November 27, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook print --claude emits bare charter, which won't resolve with the recommended local install

2 participants