Kind
fix
Goal
Move the existing Claude Code integration behind the neutral adapter contract without regressing current behavior.
Non-goals
- Adding unrelated Claude Code features.
- Replacing the current wrapper/hook workflow in one migration.
- Changing policy defaults.
Invariants
- Existing install.sh and uninstall.sh workflows remain compatible.
- Existing Claude paths and settings are preserved during migration.
- Existing tests continue to pass.
- Legacy state remains readable until the migration issue is complete.
Behavioral contract / States
Claude Code hooks and wrappers translate into canonical events, receive canonical decisions, and retain current user-facing messages and exit behavior.
Scope surface
install.sh, uninstall.sh, guard/hook.sh, guard/wrapper.bash, guard/wrapper.zsh, and adapter tests.
Acceptance
- Run: bash tests/test.sh and bash tests/test_install.sh.
- Run: python3 -m pytest tests/test_guard.py -v and node --test tests/test_guard.mjs.
- Verify install, session start, blocked tool, allowed tool, and uninstall flows in a temporary home.
- Document compatibility and rollback steps.
Split triggers
- A current behavior is not representable by the neutral contract.
- Migration requires a persisted state format change.
Dependencies / Parent
Blocked by: #1, #2, #3
Parent Epic: #15
Kind
fix
Goal
Move the existing Claude Code integration behind the neutral adapter contract without regressing current behavior.
Non-goals
Invariants
Behavioral contract / States
Claude Code hooks and wrappers translate into canonical events, receive canonical decisions, and retain current user-facing messages and exit behavior.
Scope surface
install.sh, uninstall.sh, guard/hook.sh, guard/wrapper.bash, guard/wrapper.zsh, and adapter tests.
Acceptance
Split triggers
Dependencies / Parent
Blocked by: #1, #2, #3
Parent Epic: #15