Files
CASAN/packages/casan-devkit/templates/claude/README.md
T

1.8 KiB

CASAN Claude Code adoption template (Plan-20)

Drop settings.json into the target repo as .claude/settings.json (the installer does this). It wires the four Claude Code lifecycle hooks (UserPromptSubmit, PreToolUse, PostToolUse, Stop) to the CASAN agentic bridge so a developer can type prompts normally while every certified turn still carries an H1→H7 trace and an H6 record.

Claude Code shares these project settings across its CLI, official VS Code extension, and JetBrains integration. Claude Desktop and claude.ai are separate products and are not covered by this local project-hook integration.

  • The hook command resolves the repo root via $CLAUDE_PROJECT_DIR, so no machine-specific path is committed.
  • It invokes .casan/casan-hook.py. That bootstrap reads project config, resolves the pinned global harness, verifies its live hash, then dispatches the thin Claude renderer. The bridge never runs a model.
  • This is a project_hook integration: strong for a trusted project, but a member who can edit .claude/settings.json can disable it. For organization enforcement use a managed/pinned deployment (managed_hook) — see docs/casan/CASAN_AGENTIC_CLIENT_SECURITY.md.

Install (cross-platform)

cd <repo>
casan init --client claude --mode enforce
casan doctor --client claude

Feature flags (environment)

Variable Default Meaning
CASAN_AGENTIC_BRIDGE_ENABLED 1 Master on/off.
CASAN_AGENTIC_ENFORCEMENT_MODE enforce via init observe (telemetry-only) or enforce.
CASAN_AGENTIC_INTEGRATION_MODE project_hook project_hook / managed_hook / casan_owned.
CASAN_AGENTIC_CLIENT_ALLOWLIST (unset) Comma list; clients outside it are observed_only.