KeiSeiKit-1.0/hooks/_lib/policy-chain.toml
KeiSei84 3099a58dd9 feat(phase-C): cross-CLI hook enforcement + v0.40.0 release (#48)
Mirror of keigit 596e0b20. Phase C cross-CLI hook enforcement (kei_bash/kei_edit/kei_write MCP tools + 3-tier model). Release v0.40.0.
2026-05-26 17:10:14 +07:00

32 lines
941 B
TOML

# policy-chain.toml — SSoT for which hooks gate which MCP tool.
#
# Consumed by `kei-mcp::handlers::safe_tools` to enforce KeiSeiKit's safety
# rules on non-Claude CLIs (Grok / Agy / Copilot / Kimi) via the
# `kei_bash` / `kei_edit` / `kei_write` MCP tools.
#
# Hooks live in ~/.claude/hooks/ (overridable via $KEI_HOOKS_DIR).
# Exit codes: 0 = pass, 2 = block, other non-zero = treat as block + log.
# The dispatcher iterates `chain` IN ORDER and aborts on first non-zero.
#
# Constructor Pattern: ONE chain for all CLIs. Per-CLI override deferred
# until proven necessary. To extend, append a hook basename (no .sh) to
# the relevant chain — the hook script must already exist in ~/.claude/hooks/.
[bash]
chain = [
"no-github-push.sh",
"safety-guard.sh",
"destructive-guard.sh",
]
[edit]
chain = [
"citation-verify.sh",
"numeric-claims-guard.sh",
]
[write]
chain = [
"citation-verify.sh",
"numeric-claims-guard.sh",
]