You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(claude): improve CLAUDE.md with architecture details
Add service interfaces documentation, daemon architecture section,
CCOtel feature documentation, and streamline existing content for
better Claude Code guidance.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
-`base.go` provides shared functionality across commands
67
-
- Hook management for shell integrations (bash, zsh, fish)
68
-
69
-
-**daemon/**: Daemon service implementation
70
-
- Unix domain socket-based IPC communication with CLI
71
-
- Watermill pub/sub messaging for async command processing
72
-
- Channel-based architecture for concurrent operations
73
-
74
-
-**model/**: Core business logic and data models
75
-
- API client implementations with encryption support
76
-
- Database operations (local SQLite storage)
77
-
- Shell-specific hook implementations
78
-
- System service installers (systemd/launchctl)
79
-
80
-
### Key Architectural Patterns
81
-
82
-
1.**Command Pattern**: Each CLI command implements the `urfave/cli/v2` command interface
83
-
2.**Service Pattern**: Interfaces (ConfigService, AIService, CommandService) with dependency injection via `commands.InjectVar()` and `commands.InjectAIService()`
84
-
3.**IPC Communication**: Unix domain sockets for CLI-daemon communication
85
-
4.**Pub/Sub Messaging**: Watermill GoChannel for internal daemon message routing
86
-
5.**Batch Processing**: Commands are buffered locally and synced in batches
87
-
6.**Encryption**: Hybrid RSA/AES-GCM encryption for secure command transmission
54
+
-**cmd/cli/**: CLI entry point - registers all commands, initializes services via dependency injection
55
+
-**cmd/daemon/**: Daemon entry point - sets up pub/sub, socket handler, and optional CCOtel gRPC server
56
+
-**commands/**: CLI command implementations - each command in its own file, `base.go` holds injected services
0 commit comments