Skip to content

fix(hooks): remove Claude-specific helper guidance - #92

Merged
intel352 merged 1 commit into
mainfrom
fix/hook-host-neutral-guidance
Jun 23, 2026
Merged

intel352 merged 1 commit into
mainfrom
fix/hook-host-neutral-guidance

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

  • Make completion-claim-guard print the resolved sibling scope-lock-complete helper path instead of CLAUDE_PLUGIN_ROOT guidance.
  • Replace current scope-lock helper docs/guidance with host-neutral bash hooks/<helper> instructions from the autodev checkout/plugin root.
  • Add a hook contract regression that fails if Stop-hook completion guidance mentions CLAUDE_PLUGIN_ROOT.

TDD proof

With fix reverted:

$ bash tests/hook-contracts.sh
FAIL: completion-claim-guard: helper guidance must not assume Claude host env vars: ... run bash "${CLAUDE_PLUGIN_ROOT:-.}/hooks/scope-lock-complete" ...
1 hook contract test(s) failed.

With fix restored:

$ bash tests/hook-contracts.sh
PASS: completion-claim-guard: helper guidance is host-neutral
All hook contract tests passed.

Verification

$ git diff --check
$ bash tests/hook-contracts.sh
All hook contract tests passed.
$ rg -n 'CLAUDE_PLUGIN_ROOT' hooks/*.sh skills README.md | cat
# no output

Copilot AI review requested due to automatic review settings June 23, 2026 02:33
@intel352
intel352 merged commit 48dab91 into main Jun 23, 2026
11 checks passed
@intel352
intel352 deleted the fix/hook-host-neutral-guidance branch June 23, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes Claude-specific environment variable guidance (CLAUDE_PLUGIN_ROOT) from scope-lock helper documentation and from the Stop-hook continuation messaging, and adds a regression test to ensure the completion guidance remains host-neutral.

Changes:

  • Add a new hook contract test asserting completion-claim-guard guidance does not mention CLAUDE_PLUGIN_ROOT and still points to scope-lock-complete.
  • Update scope-lock and alignment-check skill documentation (and README workflow docs) to use host-neutral bash hooks/<helper> instructions.
  • Update completion-claim-guard to compute hook_dir once and use it to print a resolved path to the sibling scope-lock-complete helper.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/hook-contracts.sh Adds a regression test ensuring completion helper guidance is host-neutral.
skills/scope-lock/SKILL.md Replaces Claude-specific helper invocation guidance with host-neutral bash hooks/... commands.
skills/alignment-check/SKILL.md Simplifies scope-lock helper instructions to avoid host-specific env var guidance.
README.md Updates scope-lock workflow documentation to use host-neutral helper invocation.
hooks/pre-tool-scope-guard Updates .scope-lock write-block guidance to remove CLAUDE_PLUGIN_ROOT references.
hooks/completion-claim-guard Uses a resolved hooks directory to reference scope-lock-complete instead of CLAUDE_PLUGIN_ROOT.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 160 to 162
Only stop if one of these is true:
- The entire locked design is complete and verified; run bash \"\${CLAUDE_PLUGIN_ROOT:-.}/hooks/scope-lock-complete\" <plan> --evidence \"<verification>\" to mark it complete and remove lock traces.
- The entire locked design is complete and verified; run bash \"${hook_dir}/scope-lock-complete\" <plan> --evidence \"<verification>\" to mark it complete and remove lock traces.
- There is a hard blocker that requires human input.
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.

2 participants