{ "$schema": "https://json.schemastore.org/claude-code-settings.json", "_comment": [ "dsh-proof x Claude Code — hook wiring for the evidence-driven completion proof.", "Paste the `hooks` object into .claude/settings.json (project) or ~/.claude/settings.json (user);", "keep this file pure JSON — JSON has no comment syntax, so guidance lives here in _comment (an", "unknown key the schema ignores) instead.", "", "The tool surface (the thirteen MCP conformance tools: proof_status, proof_baseline,", "proof_verify, proof_claim, proof_bundle, proof_publish, proof_log_verify, proof_delegate,", "proof_delegate_submit, proof_task, proof_training_export, proof_economics, proof_sla_quote)", "does NOT ride these hooks — register it once per project with MCP instead:", " claude mcp add proof -- dsh-proof-mcp", "", "The hooks below add what MCP cannot give: the PreToolUse gates (evidence-store guard + baseline", "gate), PostToolUse provenance observation, Stop drift detection with a one-shot no-baseline", "reminder, and SessionStart policy context. They assume `dsh-proof-cc ` resolves on PATH", "(the package ships that bin); from a checkout, substitute the explicit node invocation instead:", " node /path/to/dsh-proof/src/adapters/claude-code/entry.ts pre-tool-use", "", "Matched tools: Write/Edit/MultiEdit/NotebookEdit mutate via tool_input.file_path; Read reads via", "file_path. Bash is matched so the gates can classify it: shell commands naming the evidence", "store or trust artifacts are refused textually (conservative substring), while a shell command", "naming an ordinary workspace path extracts nothing for attribution — a Bash-written file keeps", "no fingerprint and no drift attribution; prefer Write/Edit for changes you want attributed.", "", "Configuration (environment of the hook processes):", " DSH_PROOF_ROOT workspace root (default: the hook's cwd, i.e. the project dir)", " DSH_PROOF_TRUST_DIR trust root for keys/anchors (default: $DSH_HOME/proof)", " DSH_PROOF_EVIDENCE_STORE 'host' (default, store outside the workspace) | 'workspace' (.proof)", " DSH_PROOF_EVIDENCE_DIR workspace-relative evidence dir (default '.proof')", " DSH_PROOF_REQUIRE_BASELINE 'off' | 'warn' (default) | 'ask'", " DSH_PROOF_DRIFT '0' disables Stop drift detection (default: on)", " DSH_PROOF_ENFORCE_TURN_END '0' disables the turn-end reminder (default: on)", "Set them once in the environment every hook inherits (the shell that launches Claude Code, or a", "wrapper). If you must set them per hook via the `command` strings, set the SAME values on ALL", "four hooks — a variable applied to only some hooks splits the deployment: the store one face", "writes and another face guards are different directories, and the gates end up watching a", "phantom store while the real log sits unguarded." ], "hooks": { "PreToolUse": [ { "matcher": ["Write", "Edit", "MultiEdit", "NotebookEdit", "Bash"], "hooks": [ { "type": "command", "command": "dsh-proof-cc pre-tool-use" } ] } ], "PostToolUse": [ { "matcher": ["Write", "Edit", "MultiEdit", "NotebookEdit", "Bash", "Read"], "hooks": [ { "type": "command", "command": "dsh-proof-cc post-tool-use" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "dsh-proof-cc stop" } ] } ], "SessionStart": [ { "hooks": [ { "type": "command", "command": "dsh-proof-cc session-start" } ] } ] } }