rusty-hooks 0.1.0

PostToolUse validation hook for Claude Code — blocks Edit/Write when on-disk content diverges from expected
Documentation
## Project: rusty-hooks

This repo contains a small Rust hook validator (`validate-hook`) plus a few standalone demo binaries for generating/replaying high-volume JSONL.

### Common commands

```bash
cargo fmt
cargo test
cargo clippy --all-targets -- -D warnings
```

### Hook validator examples

```bash
./examples/run_examples.sh
```

### Project root selection

`validate-hook` resolves the project root from (in priority order):

1. `CLAUDE_PROJECT_DIR` env var
2. `cwd` field in the hook payload
3. the process working directory

### Demo binaries

```bash
# Generate newline-delimited JSON hook-like events (mixed tool names)
cargo run --quiet --bin demo -- --events 50000 --bytes 256 > /tmp/events.jsonl

# High-volume stdout generator (JSON/text)
cargo run --quiet --bin demo_fast_generate -- --events 250000 --bytes-per-event 512 > /tmp/out.jsonl

# Replay ~/.claude/history.jsonl (or newest transcript) to stdout
cargo run --quiet --bin demo_fast_replay_claude -- > /tmp/replay.jsonl

# Tail the newest ~/.claude transcript (prints new lines as they appear)
cargo run --quiet --bin demo_fast_tail_claude_transcript
```

### Benches

```bash
cargo bench
```

### Safety

- The `demo_fast_replay_claude` and `demo_fast_tail_claude_transcript` binaries print data from `~/.claude` to stdout.
- Treat that output as potentially sensitive (prompts, code, paths, and other personal/project data).