Skip to content

feat(hooks): Wire pre-flight into hooks and MCP - #374

Merged
harshsinghmp merged 1 commit into
devfrom
feat/preflight-hooks-mcp
Nov 9, 2026
Merged

harshsinghmp merged 1 commit into
devfrom
feat/preflight-hooks-mcp

Conversation

@harshsinghmp

Copy link
Copy Markdown
Owner

Adds a matcher-scoped PreToolUse hook and read-only MCP tool; claims regenerated to 119 tools. Gate 1497/0; tsc clean; build 434.

Why: W26-3. Pre-flight was CLI-only; agents could not use it, and the
hook pack had no edit-time surface.

What:
- src/hooks/pack.ts: PreToolUse hook (matcher-scoped) that emits anchored
  invariants, risk and a read-only context pack.
- src/mcp.ts + src/connect.ts: read-only `muse_preflight` tool (files,
  symbols, branch, project, budget).
- CLI hooks dispatch: `memory hooks pre-tool-use`.
- Tests: hook entry shape, MCP payload, no access-count writes; hook pack
  count updated to four; claims regenerated (119 tools).
- W26-3 struck in debt.

Verification: bun test 1497 pass / 0 fail; tsc clean; build 434 modules;
secret scan clean.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@harshsinghmp
harshsinghmp merged commit 2f762ad into dev Nov 9, 2026
@harshsinghmp
harshsinghmp deleted the feat/preflight-hooks-mcp branch November 9, 2026 07:33
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.

1 participant