How tomasz-tomczyk/crit works
Crit is a local review tool for agent-authored plans, code diffs, static HTML, and running web apps. The main workflow starts with a CLI invocation, selects or prepares review content, serves an interactive browser review, and stores comments for the agent to act on in an iterative loop. It also supports story-mode diff explanations, forge-based reviews, sharing, and agent integrations. Some relationships below follow README-documented behavior; unsampled implementation links are omitted rather than inferred.
Main entry points: cli_handlers.go Command Handlers · session Review Sessions · server.go Review Server · main.go CLI Entry
Components 21
CLI and Sessions
- CLI Entry
cmd/crit/main.go - Command Handlers
cmd/crit/cli_handlers.go - Review Sessions
internal/session - Review Daemon
internal/daemon
Review Experience
- Review Files
internal/review/review_file.go - Review Server
internal/server/server.go - Browser Review UI
web/app.js - Comment Commands
internal/comment/comment_cli.go
Review Modes
- Change Detection
internal/vcs/git.go - Diff Processing
internal/diff/diff.go - Story Mode
internal/story/ingest.go - Forge Reviews
internal/forge/forge.go - Live Proxy
internal/live/live.go - Static Preview
internal/preview/preview.go
Collaboration
- Review Sharing
internal/share/share.go - Share Authentication
internal/auth/auth.go - Agent Integrations
integrations
Other components
- Reviewer
- AI Agent
- GitHub Service
- GitLab Service
Connections 28
- Reviewer → CLI Entry: starts review
README.md - AI Agent → CLI Entry: launches review
README.md - CLI Entry → Command Handlers: dispatches commands
cmd/crit/main.go - CLI Entry → Review Sessions: starts default review
cmd/crit/main.go - Command Handlers → Review Sessions: runs session commands
cmd/crit/cli_handlers.go - Command Handlers → Live Proxy: starts live mode
cmd/crit/cli_handlers.go - Command Handlers → Static Preview: starts preview
cmd/crit/cli_handlers.go - Command Handlers → Forge Reviews: runs forge actions
cmd/crit/cli_handlers.go - Review Sessions → Review Daemon: manages sessions
internal/session/stale_reviews.go - Change Detection → Diff Processing: uses diff engine
internal/vcs/git.go - Reviewer → Browser Review UI: reviews output
README.md - Review Server → Browser Review UI: serves review UI
internal/server/server.go - Browser Review UI → Review Server: submits comments
- Review Server → Review Sessions: reads session state
internal/server/server.go - Review Server → Review Files: reads review data
internal/server/server.go - Review Files → Review Sessions: persists review JSON
internal/review/review_file.go - AI Agent → Comment Commands: adds programmatic comments
README.md - Comment Commands → Review Files: updates review file
internal/comment/comment_cli.go - Command Handlers → Story Mode: ingests story
- Story Mode → Review Sessions: stores story data
internal/story/ingest.go - Command Handlers → Review Sharing: runs share commands
cmd/crit/cli_handlers.go - Review Sharing → Review Sessions: uses session state
internal/share/share.go - Command Handlers → Share Authentication: runs auth commands
cmd/crit/cli_handlers.go - AI Agent → Agent Integrations: uses agent commands
README.md - Forge Reviews → GitHub Service: supports pull requests
README.md - Forge Reviews → GitLab Service: supports merge requests
README.md - Live Proxy → Review Server: serves proxied review
- Static Preview → Review Server: serves static review