Current implementation status of airiscode architecture.
Last Updated: 2025-01-09 Version: 0.1.0 (Pre-Alpha)
-
Proto Definitions (packages/api/proto/)
- common.proto - PolicyProfile, SemVer, UUID, Timestamp
- events.proto - EventKind, Event (10 event types)
- model_driver.proto - ModelDriver service (chat, streaming)
- adapter.proto - AdapterProcess service (spawn, execute, shell proxy)
- runners.proto - Runners service (git, test)
-
Build System
- buf.yaml configuration
- buf.gen.yaml (TS/Go codegen)
- Makefile integration
- pnpm workspace setup
- turbo.json pipeline
-
Security Layer (packages/sandbox/)
- Shell Guard implementation
- Denylist (7 rules)
- Rewrites (2 rules)
- Timeout enforcement
- Filesystem validation
- guard.schema.yaml
- Shell Guard implementation
-
Policy System (packages/policies/)
- profiles.yaml (5 profiles)
- restricted (read-only)
- sandboxed (default)
- untrusted (full access)
- auto-gemini (12s auto-approve)
- quality (test-focused)
- profiles.yaml (5 profiles)
-
Event System (apps/airiscode-cli/src/events/)
- EventEmitter (TUI/JSON unified)
- Event-to-UI bindings
- JSON Lines output
-
TUI Framework (apps/airiscode-cli/src/ui/)
- Main App layout
- Header component
- DiffPanel component
- TestPanel component
- LogPanel component
- StatusBar component
- Hotkey definitions
-
Adapter Contracts
- plugin.json schema
- claude-code/plugin.json
- codex/plugin.json
- gemini-cli/plugin.json
- Adapter README.md guide
-
Claude Code Adapter (packages/adapters/claude-code/)
- Type definitions
- Skeleton structure
- gRPC server implementation
- Child process management
- Action routing (plan/explain/review/implement)
- Shell Guard integration
-
Codex Adapter (packages/adapters/codex/)
- plugin.json
- Implementation skeleton
- Action routing (implement/test/commit)
-
Gemini CLI Adapter (packages/adapters/gemini-cli/)
- plugin.json
- Implementation skeleton
- Large context handling
- Auto-approve integration
- Command Implementation (apps/airiscode-cli/src/commands/)
- code.ts (partial - existing)
- code-tui.ts (TUI launcher)
- Session management integration
- Adapter orchestration
- Policy enforcement
- Auto-approve timeout logic
-
Proto Codegen Execution
make codegen
- Generate TS/Go stubs
- Verify import paths
- Fix compilation errors
-
Dependency Installation
pnpm install
- Resolve workspace dependencies
- Fix version conflicts
-
Build Verification
pnpm build
- Fix TypeScript errors
- Ensure all packages compile
-
Adapter gRPC Server
- Implement basic gRPC server in claude-code adapter
- Test Spawn/Execute/Terminate RPCs
- Verify Shell Guard proxy
-
TUI Event Wiring
- Connect EventEmitter to UI components
- Implement hotkey handlers
- Test event flow (emit → UI update)
-
MCP Gateway Integration
- Lazy tool metadata loading
- Tool schema caching
- MindBase connection
-
Session Management
- SessionManager implementation
- Session persistence (MindBase)
- Conversation history
-
Workflow Orchestration
- Multi-adapter coordination
- Confidence gating
- Error retry logic
-
Runners Implementation
- git-runner (apply patches, commit)
- docker-runner (service startup)
- test-runner (execute test suites)
-
Auto-Approve Logic
- Timeout implementation
- Hint-based filtering (diff/test/all)
- TUI approval prompts
-
Model Drivers
- OpenAI driver
- Anthropic driver
- Google driver
- Ollama/MLX driver
-
Integration Tests
- E2E workflow tests
- Guard policy tests
- Adapter contract tests
-
Documentation
- API reference (generated from proto)
- Architecture diagrams (Mermaid)
- Video tutorials
-
CI/CD
- GitHub Actions workflows
- Automated tests
- Release automation
-
Observability
- Metrics collection
- Performance profiling
- Error tracking
-
Issue #1: buf codegen not yet executed
- Impact: No generated TS/Go stubs
- Blocker: Requires buf CLI installation
- Fix: Run
make codegenafterbrew install buf
-
Issue #2: Import paths may need adjustment
- Impact: TypeScript compilation errors
- Blocker: Generated code paths unknown
- Fix: Update tsconfig.json after codegen
-
Gap #1: Adapter gRPC server stubs incomplete
- Impact: Cannot spawn adapters
- Blocker: gRPC service implementation needed
- Fix: Implement AdapterProcess service in each adapter
-
Gap #2: Event handlers not wired to TUI
- Impact: TUI doesn't update on events
- Blocker: EventEmitter → UI component connection
- Fix: Wire handlers in App.tsx useEffect
-
Gap #3: Shell Guard execution path not integrated
- Impact: Commands not vetted
- Blocker: RequestShell RPC implementation
- Fix: Implement shell proxy in adapters
| Category | Total | Completed | In Progress | TODO | % Done |
|---|---|---|---|---|---|
| Proto Definitions | 5 | 5 | 0 | 0 | 100% |
| Security (Guard) | 1 | 1 | 0 | 0 | 100% |
| Policy Profiles | 5 | 5 | 0 | 0 | 100% |
| Event System | 3 | 3 | 0 | 0 | 100% |
| TUI Components | 6 | 6 | 0 | 0 | 100% |
| Adapters | 3 | 0 | 3 | 0 | 30% |
| CLI Commands | 4 | 2 | 2 | 0 | 50% |
| Drivers | 4 | 0 | 0 | 4 | 0% |
| Runners | 3 | 0 | 0 | 3 | 0% |
| Tests | 15 | 0 | 0 | 15 | 0% |
| Docs | 5 | 3 | 0 | 2 | 60% |
| TOTAL | 54 | 25 | 5 | 24 | 46% |
- All proto files defined
- Build system configured
- Documentation framework
- Shell Guard implemented
- Policy profiles defined
- Trust/approval levels enforced
- Basic Ink layout
- Event system
- Component structure
- Claude Code adapter functional
- Spawn/Execute/Terminate working
- Shell Guard integration verified
- 3 adapters coordinated
- Workflow execution
- Error handling
- Tool discovery
- Conversation persistence
- Session management
- All tests passing
- CI/CD pipeline
- Documentation complete
- ✅ Install buf CLI:
brew install bufbuild/buf/buf - ✅ Run codegen:
make codegen - ✅ Install dependencies:
pnpm install - ⏳ Fix build errors:
pnpm build - ⏳ Implement gRPC server in claude-code adapter
- ⏳ Wire TUI event handlers
- ⏳ Test end-to-end: spawn → execute → terminate
- ⏳ Add integration tests
- Architecture Decision: All shell execution MUST go through Shell Guard (no exceptions)
- Policy Enforcement: PolicyProfile propagates through all layers (CLI → Adapter → Guard)
- Event-Driven: TUI and JSON modes share same Event stream
- No Upstream Forks: Adapters wrap existing CLIs, never modify source
Status Legend:
- ✅ Completed
- 🚧 In Progress
- 📋 TODO
- ⏳ Blocked/Waiting