How dillonsmart/docket works
Docket is a local-first tool that builds a signed, per-commit evidence record for agent-written code. The principal workflow observes edits and commands, parses agent sessions, replays edits against file history, attributes committed hunks, correlates checks and coverage, then stores the record in Git for review and verification. The README also documents setup hooks, range reviews, and quality gating. Relationships below rely on sampled excerpts, SOURCE INDEX references, or README statements; unsampled build internals are represented at their enclosing directory.
Main entry points: commands.go User Commands · build Record Builder · cer.go Evidence Record · gate.go Quality Gate
Components 21
Session Capture
- Codex Parser
internal/agents/codex/codex.go - OpenCode Parser
internal/agents/opencode/opencode.go - Agent Registry
internal/agents/agents.go - Shell Observer
internal/collect/collect.go - Transcript Model
internal/transcript/edits.go
Provenance Analysis
- Record Builder
internal/build - Edit Timeline
internal/timeline/timeline.go - Hunk Attribution
internal/attribute/attribute.go - Evidence Correlation
internal/evidence/correlate.go - Quality Gate
internal/gate/gate.go
Records and Storage
- Evidence Record
internal/cer/cer.go - Record Signing
internal/cer/sign.go - Git Record Store
internal/store/store.go
CLI and Review
- CLI Dispatcher
internal/cli/cli.go - User Commands
internal/cli/commands.go - Commit Hooks
internal/cli/hooks.go - Repository Setup
internal/cli/init.go - Record Renderer
internal/render/render.go - Markdown Review
internal/render/markdown.go
Other components
- Developer
- Git Repository
Connections 26
- Developer → CLI Dispatcher: runs commands
- CLI Dispatcher → User Commands: dispatches
internal/cli/cli.go - User Commands → Record Builder: builds records
internal/cli/commands.go - Commit Hooks → Record Builder: builds records
internal/cli/hooks.go - Repository Setup → Git Repository: installs hooks
README.md - Repository Setup → Shell Observer: installs agent hooks
README.md - Agent Registry → Codex Parser: registers parser
internal/agents/agents.go - Agent Registry → OpenCode Parser: registers parser
internal/agents/agents.go - Codex Parser → Transcript Model: parses sessions
internal/agents/codex/codex.go - OpenCode Parser → Transcript Model: parses sessions
internal/agents/opencode/opencode.go - Shell Observer → Transcript Model: records edits
internal/collect/collect.go - Record Builder → Edit Timeline: replays edits
- Edit Timeline → Hunk Attribution: provides provenance
internal/attribute/attribute.go - Record Builder → Evidence Correlation: correlates checks
- Evidence Correlation → Evidence Record: adds evidence
internal/evidence/correlate.go - Hunk Attribution → Evidence Record: attributes hunks
- Record Builder → Evidence Record: creates record
- Evidence Record → Record Signing: signs payload
internal/cer/sign.go - User Commands → Git Record Store: reads and writes
internal/cli/commands.go - Git Record Store → Git Repository: stores on ref
internal/store/store.go - User Commands → Record Renderer: renders output
internal/cli/commands.go - User Commands → Markdown Review: renders reviews
internal/cli/commands.go - Quality Gate → Record Builder: loads sessions
internal/gate/gate.go - Quality Gate → Hunk Attribution: measures attribution
internal/gate/gate.go - User Commands → Quality Gate: runs quality gate
internal/cli/commands.go - User Commands → Evidence Record: verifies records
internal/cli/commands.go