Repository navigation
feat(profile): record hooks, and report one added, removed or changed - #986
Merged
sandstream merged 2 commits intoNov 23, 2026
Merged
Conversation
kit profile listed skills, MCP servers and plugins. A hook was in none of the lists, although the harness runs it outside every gate. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
… complexity limit Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
sandstream
deleted the
claude/web-kit-status-sync-p6fg9a-profile-hooks
branch
November 23, 2026 03:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner decision 3 from kit-research
agent-platform-2027-vs-kit: yes.Why
kit profile checkreported a skill or an MCP server that was added afterkit profile freeze. Hooks were not in the profile, although the harness runs a hook on its own, outside every tool-call gate.What
src/profile/hooks.ts: reads the hooks of the project's.claude/settings.json.<event>: <command>, with the matcher when there is one (PreToolUse[Bash]: …).kit profile freezewrites them as[[hooks]], and counts them in its summary line.kit profile checkcompares them like the other kinds:ADDEDREMOVED(andADDEDfor the new command)Existing profiles
A profile frozen before this has no
hookslist. Its hooks are not judged, so no existing--gaterun starts failing. The output says: "hooks: present, but this profile was frozen before kit recorded them; run kit profile freeze. Not judged." The JSON output gainsdrift.notRecorded. A signed profile keeps its signature until it is frozen again.An older kit rejects a profile that holds
hooks(the schema is strict), as it does for any key it does not know.Not covered
.claude/settings.local.jsonand~/.claude/settings.jsonare not in the profile: they belong to one machine and the profile travels.kit checkand the gates cover those two.Verification
src/profile/hooks.test.ts: seven tests, one through the real CLI (freeze, add a hook,check --gatefails).contracts/kit.opencli.jsonregenerated for the changed help text.node scripts/prepush.mjs: build, format, lint, tests of the changed files, self-audit pass.kit reviewand the new-source-file check fail locally for container reasons. Semgrep did not run (not installed here).Generated by Claude Code