Skip to content

[Adapter] Harden Claude Code compatibility #23

Description

@teseo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions