rdev/ai-lookup/index.md
jordan 39df51defd feat: Add multi-provider code agent interface with Claude Code and OpenCode adapters
Implements weeks 1-4 of the multi-provider architecture:

Week 1 - Foundation:
- Add domain models (AgentProvider, AgentRequest, AgentEvent, AgentResult)
- Define CodeAgent port interface with Execute, Cancel, Capabilities
- Create thread-safe provider registry with first-registered default

Week 2 - Claude Code Adapter:
- Extract kubectl exec logic into CodeAgent implementation
- Parse stream-json output format (init, message, tool_use, result)
- Support session continuation via --resume flag

Week 3 - OpenCode Adapter:
- HTTP/SSE client for opencode serve API
- Session management (create, send message, abort)
- Event streaming with documented buffer rationale

Week 4 - Quality & Polish:
- Fix race condition in OpenCode Cancel method
- Add AgentRequest.Validate() with ErrPromptRequired, ErrInvalidTimeout
- Document DefaultAvailabilityTimeout constants
- Add HTTP error context for debugging

Also includes:
- Work queue system with PostgreSQL adapter
- Credential store for infrastructure secrets
- Project templates with Woodpecker CI integration
- Comprehensive test coverage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 09:25:51 -07:00

2.1 KiB

AI Lookup Index

Quick reference for rdev concepts and facts.

Topic File Confidence Updated Summary
Architecture
Hexagonal Architecture patterns/hexagonal.md High 2025-01 Ports/adapters pattern, layer separation
Core Services
Project Service services/project-service.md High 2025-01 Business logic for project operations
API Keys services/api-keys.md High 2025-01 Authentication, scopes, restrictions
Webhooks services/webhooks.md High 2025-01 Event subscriptions and delivery
Worker Infrastructure (Planned)
Work Queue services/work-queue.md High 2025-01 Task queue for worker pool
Worker Pool services/worker-pool.md High 2025-01 Shared claudebox workers
CI Provider services/ci-provider.md High 2025-01 Woodpecker auto-activation
Template Provider services/template-provider.md High 2025-01 Project template seeding
Features
Command Execution features/command-execution.md High 2025-01 Claude/shell/git command flow
SSE Streaming features/sse-streaming.md High 2025-01 Real-time output streaming
Infrastructure Management features/infrastructure.md High 2025-01 Gitea, Cloudflare, deployment
Build Orchestration features/build-orchestration.md High 2025-01 Bot-driven build specs

Roadmap Reference

See k3s-fleet/tmp/address-the-gaps.md for the full threesix.ai platform roadmap:

  • Gap 1: Woodpecker Auto-Activation → CI Provider
  • Gap 2: Project Templates → Template Provider
  • Gap 3: Work Queue → Work Queue service
  • Gap 4: Worker Pool Management → Worker Pool
  • Gap 5: Bot Communication → Webhook callbacks
  • Gap 6: Build Orchestration → Build service