KeiSeiKit-1.0/hooks
KeiSei84 abae256c1d feat(install): opt-in hook packs + stack profiles (public posture)
A fresh install now activates only the safety pack; discipline hooks and
agents are opt-in via an onboarding step (step 6) or `kei configure`.
"People don't need Rust-only" — they pick their own stack.

- _primitives/hook-packs.toml: SSoT mapping pack -> hooks, stack -> packs +
  agent groups. safety always on; evidence/observability/epistemic/
  orchestration/git-guard/stack-rust opt-in. rust-first/no-python only under
  the systems stack; git-guard (no-github-push) opt-in only, pulled by no stack.
- lib-profile: extract generic _toml_array (reused by lib-packs); profile_members
  becomes a thin wrapper (no behavior change).
- lib-packs: pack/stack/agent resolvers + selection loader.
- lib-hooks: filter_snippet_by_packs (install-time allowlist) + prune_kit_hooks
  (reconfigure removes deselected kit hooks, keeps foreign ones); activate_hooks
  rewired to prune + filter + merge. No custom settings.json fields (/doctor safe).
- lib-agents: install_manifests filters by stack agent set (empty = install all).
- onboarding: pick_stack step (reuse _onb_read_choice), persists stack_profile +
  enabled_packs to onboarding.toml; i18n STR_* added.
- bin/kei configure -> scripts/kei-configure.sh (re-pick without reinstall);
  install stamps ~/.claude/.kei-kit-dir.
- numeric-claims-guard: money regex no longer matches shell positionals ($1..$9);
  requires decimal / unit / 2+ digits / tilde. Real money + time still caught.
- gate one-liner added to 8 discipline hooks (runtime toggle via hooks-control).

Verified end-to-end (scratch HOME): fresh=safety only; evidence pack adds
numeric+citation; systems stack wires rust-first + 14 base/systems agents (no
data-science/swift); reconfigure-shrink prunes kit hooks but keeps a foreign
hook; settings schema clean; assembler golden 3/3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:27:14 +08:00
..
_lib KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
affect-live-scan.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-capability-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-capability-verify.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-event-done.sh fix(live-graph): tool_use events properly attribute to spawning agent 2026-05-02 14:43:42 +08:00
agent-event-spawn.sh fix(live-graph): tool_use events properly attribute to spawning agent 2026-05-02 14:43:42 +08:00
agent-fork-done.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-fork-logger.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-heartbeat-tick.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
agent-outcome-backfill.sh fix(audit-batch): CI green + RULE 0.4/0.16/0.18 honesty pass 2026-05-03 19:09:59 +08:00
agent-stub-scan.sh fix(security): cortex /term env_clear + bind guard, agent-stub-scan stdin, magiclink revoke 2026-05-03 15:38:23 +08:00
alignment-check.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
assemble-agents.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
assemble-validate.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
auto-dev-guard.sh feat(frontend-loop): kei-db-contract primitive + frontend-validator agent + auto-dev-guard hook 2026-05-01 15:34:39 +08:00
auto-encyclopedia-refresh.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
auto-register-on-edit.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
block-dangerous.sh fix(hooks): post-audit hook chain hardening + 4 new defensive hooks 2026-05-02 21:38:47 +08:00
chat-numeric-postflag.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
chat-numeric-prewarn.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
check-error-patterns.sh chore(public-prep): scrub author identity + private-IP references 2026-05-25 15:00:07 +08:00
citation-verify.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
decompose-rules-on-edit.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
destructive-guard.sh fix(hooks): post-audit hook chain hardening + 4 new defensive hooks 2026-05-02 21:38:47 +08:00
disk-headroom-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
disk-reclaim.sh fix(hooks+install): disk-reclaim Guard 3 + secrets per-line + sha256 fail-closed 2026-05-03 15:37:57 +08:00
error-spike-detector.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
extract-task-durations.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
first-run-onboard.sh feat(install): first-run is a full guided onboarding (agents + sleep + cortex) 2026-05-22 21:27:01 +08:00
graph-export-watcher.sh chore(public-prep): scrub author identity + private-IP references 2026-05-25 15:00:07 +08:00
hooks.json feat(frontend-loop): kei-db-contract primitive + frontend-validator agent + auto-dev-guard hook 2026-05-01 15:34:39 +08:00
mailbox-inject.sh feat(kei message): persistent inter-session mailbox + pull-inbox hook 2026-05-23 15:00:10 +08:00
milestone-commit-hook.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
no-downgrade.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
no-github-push.sh chore(public-prep): scrub author identity + private-IP references 2026-05-25 15:00:07 +08:00
no-hand-edit-agents.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
no-python-without-approval.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
numeric-claims-guard.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
numeric-claims-record.sh feat(tracking): close 3 last observability gaps — toolStats + skill-record + numeric-claims journal 2026-05-02 03:42:09 +08:00
orchestrator-branch-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
orchestrator-dirty-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
phase-b-rem.sh feat(sleep): cloud-agent reasoning + Telegram delivery to whitelist 2026-05-02 04:38:52 +08:00
post-commit-audit.sh fix(hooks): post-audit hook chain hardening + 4 new defensive hooks 2026-05-02 21:38:47 +08:00
post-write-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
recurrence-suggest.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
rust-first.sh feat(install): opt-in hook packs + stack profiles (public posture) 2026-05-25 17:27:14 +08:00
safety-guard.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
secrets-pre-guard.sh fix(hooks+install): disk-reclaim Guard 3 + secrets per-line + sha256 fail-closed 2026-05-03 15:37:57 +08:00
session-end-dump.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
site-wysiwyd-check.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
skill-record.sh feat(live-graph): WebSocket activity stream — orchestrator-centric live view 2026-05-02 13:30:24 +08:00
sleep-report-tg.sh chore(sleep-tg): minor prompt tightening (compress reasoning output) 2026-05-02 19:25:33 +08:00
stop-verify.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
task-timer.sh fix(hooks): post-audit hook chain hardening + 4 new defensive hooks 2026-05-02 21:38:47 +08:00
tomd-preread.sh KeiSeiKit-public — clean state 2026-05-01 12:09:03 +08:00
tool-use-event.sh fix(live-graph): tool_use events properly attribute to spawning agent 2026-05-02 14:43:42 +08:00