How dirac-run/dirac works
Dirac is a multi-interface AI coding agent for long-running engineering tasks. Users submit or steer a task through VS Code, the CLI, or an ACP client; task orchestration uses configured model providers and codebase context/tools to produce changes that users can review. The README also documents goal-driven work, subagents, structural inspection and editing, permissions, hooks, and repository guidance. The graph preserves those product branches using paths visible in the tree; sampled excerpts do not establish every runtime call, so uncertain wiring is omitted.
Main entry points: TaskController.ts Task control · DiracAgent.ts Agent runtime · CommentReviewController.ts Review interface · goal Goal runtime
Components 21
User interfaces
- VS Code
src/hosts/vscode - Terminal CLI
cli/src - ACP client
cli/src/acp
Task execution
- Task control
src/core/controller/task/TaskController.ts - Agent runtime
cli/src/agent/DiracAgent.ts - Provider selection
src/core/api/modelProviderSelection.ts - Model adapters
src/core/api/providers
Codebase work
- Context management
src/core/context - Code tools
src/core/prompts/system-prompt/tools - Permission controls
src/core/permissions - Hooks
src/core/hooks
Long-running work
- Goal runtime
src/core/goal - Goal controls
src/core/controller/goal
State and review
- Storage context
src/shared/storage/storage-context.ts - Task records
src/core/storage/taskStorage.ts - Checkpoints
src/integrations/checkpoints/CheckpointStorageManager.ts - Review interface
src/integrations/editor/CommentReviewController.ts - VS Code review
src/hosts/vscode/review/VscodeCommentReviewController.ts - CLI review
cli/src/controllers/CliCommentReviewController.ts
Other components
- Engineer
- Model services
Connections 24
- Engineer → VS Code: submits tasks
- Engineer → Terminal CLI: submits tasks
- Engineer → ACP client: submits tasks
- VS Code → Task control: task requests
- Terminal CLI → Task control: task requests
- ACP client → Task control: task requests
- Task control → Agent runtime: runs tasks
- Agent runtime → Provider selection: selects provider
- Provider selection → Model adapters: configures adapter
- Model adapters → Model services: sends requests
- Agent runtime → Context management: assembles context
- Agent runtime → Code tools: uses tools
- Agent runtime → Permission controls: checks actions
- Agent runtime → Hooks: runs hooks
- Task control → Task records: persists task data
- Storage context → Task records: provides storage
- Task control → Checkpoints: manages checkpoints
- Agent runtime → Review interface: reports review comments
- Review interface → VS Code review: renders comments
- Review interface → CLI review: renders comments
- Task control → Goal runtime: coordinates goals
- Engineer → Goal controls: steers goals
- Goal controls → Goal runtime: controls goals
- Goal runtime → Task control: creates tasks