Agentic Provenance for AI-Assisted Development
diachron (from Greek dia "through" + chronos "time")
Diachron automatically tracks every code change made by AI coding assistants, creating a queryable timeline of your project's evolution.
When AI agents like Claude Code make changes to your codebase:
- Git commits contain technical jargon you may not understand
- The AI's reasoning and intent isn't captured anywhere
- You lose visibility into when bugs were introduced or features built
- There's no human-readable narrative of what happened
Diachron uses Claude Code 2.1's hook architecture to transparently capture every file modification. No manual logging required.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Code Session β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ PostToolUse ββββββββββββββββββββββββ β
β β Write/Edit β βββββββββββββββββΊ β diachron-hook β β
β β Bash Tools β ~12ms β (Rust binary) β β
β ββββββββββββββββ ββββββββββββ¬ββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββ β
β β .diachron/ β β
β β βββ events.db β β
β β βββ config.json β β
β ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Automatic Capture - Every Write, Edit, and Bash command logged
- Git Integration - Captures branch name and commit SHAs
- Web Dashboard - Real-time timeline visualization with filtering (v1.0)
- VS Code Extension - Inline blame on hover with gutter icons (v0.8)
- Hash-Chain Integrity - SHA256 tamper-evidence for every event (v0.3)
- PR Narratives - Generate evidence packs for pull request comments (v0.3)
- Semantic Blame - Find which AI session wrote specific code lines (v0.3)
- Semantic Bash Parsing - Categories: git, test, build, deploy, file_ops
- AI Summaries - On-demand summaries via Anthropic Claude API (optional)
- Multi-Assistant Support - Track Codex CLI alongside Claude Code (v0.7)
- Fast - Rust hook adds only ~12ms latency per operation
- Privacy-First - All data stored locally, never uploaded
# One-liner install (recommended)
curl -fsSL https://raw.githubusercontent.com/wolfiesch/diachron/main/install.sh | bashThe installer automatically:
- Clones to
~/.claude/skills/diachron/ - Configures the PostToolUse hook in your settings
- Detects your architecture and selects the optimal hook (Rust or Python)
- Verifies the installation
After install: Restart Claude Code to activate the hook.
Alternative: Manual installation
# Clone to Claude Code skills directory
git clone https://github.com/wolfiesch/diachron ~/.claude/skills/diachron
# Run the installer
~/.claude/skills/diachron/install.shSee INSTALL.md for complete manual installation instructions.
-
Initialize in your project:
/diachron init -
Work normally - changes are captured automatically
-
View your timeline:
/timeline /timeline --since "1 hour ago" /timeline --file src/ /timeline --stats /timeline --summarize
| Command | Description |
|---|---|
/diachron init |
Initialize Diachron for this project |
/diachron status |
Show tracking status and stats |
/diachron config |
View/edit configuration |
/timeline |
View change timeline |
/timeline --stats |
Show database statistics |
/timeline --watch |
Watch for new events in real-time (Ctrl+C to stop) |
/timeline --summarize |
Generate AI summaries (requires ANTHROPIC_API_KEY) |
/timeline --export markdown |
Export to TIMELINE.md |
| Command | Description |
|---|---|
diachron verify |
Verify hash chain integrity |
diachron export-evidence |
Generate JSON evidence pack |
diachron pr-comment --pr <N> |
Post PR narrative comment via gh CLI |
diachron blame <file:line> |
Semantic blame for a code line |
diachron maintenance |
Run database VACUUM/ANALYZE, prune old data |
diachron daemon start |
Start the background daemon |
diachron daemon stop |
Stop the daemon |
diachron daemon status |
Check daemon status |
diachron dashboard start |
Start web dashboard at localhost:3947 |
diachron dashboard stop |
Stop web dashboard |
diachron dashboard status |
Check dashboard and daemon status |
π Timeline for my-project
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π 01/08/2026 08:25 AM PST
ββ Tool: βοΈ Edit
ββ File: src/auth/login.ts
ββ Branch: πΏ feature/oauth
ββ Operation: modify (+12/-3 lines)
ββ Summary: Added OAuth2 refresh token handling
π 01/08/2026 08:20 AM PST
ββ Tool: π₯οΈ Bash [test]
ββ Branch: πΏ feature/oauth
ββ Operation: npm test
ββ Summary: Ran test suite (all passed)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Show recent changes:
/timeline
Filter by time:
/timeline --since "yesterday"
/timeline --since "1 hour ago"
/timeline --since "2026-01-01"
Filter by file:
/timeline --file src/components/
/timeline --file package.json
Filter by tool:
/timeline --tool Edit
/timeline --tool Write
/timeline --tool Bash
Generate AI summaries:
/timeline --summarize # Summarize unsummarized events
/timeline --summarize --limit 50 # Limit batch size
Export:
/timeline --export markdown
/timeline --export json
Every event is cryptographically linked to the previous event using SHA256:
$ diachron verify
β
Chain integrity verified
Events: 296 (12 checkpoints)
First event: 2026-01-01 00:00:00
Last event: 2026-01-11 00:45:00
Chain root: 8f3a2b...If tampering is detected:
$ diachron verify
β Chain broken at event #142
Expected: 8f3a2b...
Actual: deadbeef...
Timestamp: 2026-01-10 14:30:00Generate evidence packs showing which AI sessions contributed to a PR:
# Export evidence to JSON
$ diachron export-evidence --output diachron.evidence.json
# Post comment directly to PR (requires gh CLI)
$ diachron pr-comment --pr 142Example PR comment:
## PR #142: AI Provenance Evidence
### Intent
> Fix the 401 errors on page refresh
### What Changed
- **Files modified**: 2
- **Lines**: +45 / -10
- **Tool operations**: 3
- **Sessions**: 1
### Evidence Trail
- **Coverage**: 100.0% of events matched to commits
**Commit `abc1234`**: Fix OAuth2 refresh (HIGH)
- `Write` create β src/auth.rs
- `Edit` modify β src/auth.rs
### Verification
- [x] Hash chain integrity
- [x] Tests executed after changes
- [x] Build succeeded
- [ ] Human reviewFind which AI session wrote specific code:
$ diachron blame src/auth/login.ts:42
Line 42: const token = await refreshToken(user.id);
π Source: Claude Code (Session abc123)
β° When: 01/10/2026 10:32 AM PST
π¬ Intent: "Fix the 401 errors on page refresh"
π Confidence: HIGH (explicit tool call linkage)Use --json for CI/IDE integration:
$ diachron blame src/auth/login.ts:42 --json | jqAutomatically post evidence to PRs:
# .github/workflows/diachron.yml
name: Diachron PR Narrative
on: [pull_request]
jobs:
post-evidence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wolfiesch/diachron/github-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}A real-time web interface for exploring your AI provenance timeline.
# Start the dashboard (opens browser automatically)
$ diachron dashboard start
π Starting Diachron dashboard...
Proxy: http://localhost:3947
Daemon: Connected (uptime: 6576s, 871 events)
β
Dashboard running at http://localhost:3947
# Check status
$ diachron dashboard status
Dashboard: Running (http://localhost:3947)
Daemon: Connected (uptime: 1h 49m)
Events: 871
# Stop the dashboard
$ diachron dashboard stop
β
Dashboard stopped| Page | URL | Description |
|---|---|---|
| Dashboard | / |
Overview with stat cards, recent activity, quick actions |
| Timeline | /timeline |
Filterable event list with virtual scrolling |
| Sessions | /sessions |
Browse AI sessions and their events |
| Search | /search |
Semantic + keyword search across events |
| Blame | /blame |
Interactive code attribution lookup |
| Evidence | /evidence |
PR evidence pack viewer |
| Diagnostics | /doctor |
Daemon health, database stats |
- Real-time updates via WebSocket - new events appear automatically
- Virtual scrolling - handles 10K+ events smoothly
- Time filters - Last hour, 24h, 7 days, 30 days, all time
- Tool filters - Claude, Codex, Bash, or all
- File path search - Filter events by file/directory
- Event detail drawer - Slide-in panel with full event details
The dashboard uses a "Terminal Noir" dark theme optimized for developers:
- Dark background (
#0a0a0b) with subtle accents - Confidence colors: Green (HIGH), Amber (MEDIUM), Gray (LOW), Purple (INFERRED)
- JetBrains Mono for code, Inter for UI text
- Framer Motion animations for smooth transitions
Get AI provenance directly in your editor with inline blame on hover.
# From marketplace (coming soon)
code --install-extension wolfiesch.diachron
# Or install local VSIX
code --install-extension ~/.claude/skills/diachron/vscode-extension/diachron-0.8.0.vsix- Hover blame - See AI provenance when hovering over code lines
- Gutter icons - Visual indicators for AI-written lines (green/yellow/gray)
- Timeline sidebar - Browse recent events in the Explorer panel
- Session details - View full session context in dedicated panel
When you hover over AI-modified code:
ββββββββββββββββββββββββββββββββββββββββββ
β π€ Claude Code β
β Session: abc123 β’ 2 hours ago β
ββββββββββββββββββββββββββββββββββββββββββ€
β π¬ "Fix the 401 errors on page refresh"β
ββββββββββββββββββββββββββββββββββββββββββ€
β π HIGH confidence β
β ββ Content hash match β
β ββ Same session context β
ββββββββββββββββββββββββββββββββββββββββββ
Edit .diachron/config.json:
{
"ai_summaries": false, // AI-generated change descriptions
"retention_days": 90, // How long to keep events
"exclude_patterns": [ // Files to ignore
"node_modules/**",
"*.lock"
]
}- Hook Capture - A Rust binary hook fires after Write, Edit, or Bash tools (~12ms)
- Context Extraction - Captures file path, operation, git branch, and diff summary
- SQLite Storage - Events stored in
.diachron/events.dbfor fast querying - Timeline Generation - Query by time, file, or tool to see your project's history
- AI Summaries - Optional on-demand summaries via Anthropic Claude Haiku
| Requirement | Version | Notes |
|---|---|---|
| Claude Code | 2.1+ | Required for PostToolUse hook support |
| Python | 3.8+ | For timeline CLI and database operations |
| macOS/Linux | Any | Windows is untested |
Optional:
- Anthropic API key (for AI-powered summaries via
/timeline --summarize) - Rust 1.70+ (only if building from source)
| Hook Type | Latency | Notes |
|---|---|---|
| Rust (default) | ~12ms | Pre-built binary for macOS ARM64 |
| Python (fallback) | ~300ms | Use if Rust binary doesn't work |
The Rust hook is 26x faster than Python, achieved through:
- No interpreter startup overhead
- Bundled SQLite (no external dependencies)
- Optimized release build with LTO
- All data stored locally in your project's
.diachron/directory - Added to
.gitignoreby default (not committed) - No cloud sync or external services
- You control your provenance data
See TROUBLESHOOTING.md for common issues and solutions.
Quick diagnostics:
# Run installer diagnostics
~/.claude/skills/diachron/install.sh --doctor
# Check project status
/diachron status
# Verify database
sqlite3 .diachron/events.db "SELECT COUNT(*) FROM events"install.sh # Install or update
install.sh --update # Pull latest and rebuild
install.sh --doctor # Run diagnostics
install.sh --uninstall # Remove completelyDiachron can track file changes from multiple AI assistants, not just Claude Code. Currently supported:
When using Claude Code's /handoffcodex skill to delegate work to Codex, provenance is captured automatically after execution completes. Events appear in your timeline with tool_name: "Codex".
For direct Codex usage without Claude Code orchestration:
# Build the wrapper
cd ~/.claude/skills/diachron/rust
cargo build --release -p diachron-codex
# Use instead of `codex exec`
diachron-codex exec "implement the login feature"This transparently wraps Codex, capturing all file operations to Diachron.
To capture a completed Codex session manually:
# Capture most recent Codex session
python3 ~/.claude/skills/diachron/lib/codex_capture.py --latest
# With git branch correlation
python3 ~/.claude/skills/diachron/lib/codex_capture.py --latest --git-branch "feature/auth"
# Preview without sending to daemon
python3 ~/.claude/skills/diachron/lib/codex_capture.py --latest --dry-run --verboseThe IPC API (see docs/IPC-API.md) enables community integrations for:
- Cursor - Hook into Cursor's file modification events
- GitHub Copilot - VS Code extension integration
- Aider - Parse session logs similar to Codex
-
AI-powered change summaries(v0.1) -
Git branch/commit correlation(v0.1) -
Semantic Bash command parsing(v0.1) -
Semantic search + conversation memory(v0.2) -
Hash-chain tamper evidence(v0.3) -
PR narrative generation(v0.3) -
Semantic blame(v0.4) -
Intent extraction from conversations(v0.5) -
Log rotation + database maintenance(v0.6) -
Multi-assistant support (Codex)(v0.7) -
VS Code extension with inline blame(v0.8) -
Web dashboard visualization(v1.0) - Team sync (cloud option)
- Multi-project support
MIT License - do what you want with it.
Built with β€οΈ for vibe coders everywhere.