When req.Template is empty, it defaults to 'skeleton' but the check
in createInitialDeployment only matched 'skeleton' explicitly, not
empty string. This caused a broken deployment to be created for
monorepo projects with a non-existent image.
Root cause: slackpath-5 creates project with empty template, which
defaults to skeleton, but createInitialDeployment was still creating
a root deployment that references registry.threesix.ai/{project}:latest
which never gets built (skeleton has no root Dockerfile).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.2 KiB
Technical Reference: Orchard Studio UI
This document maps the Orchard Studio UI requirements to the existing rdev backend architecture and identifies necessary enhancements.
1. Architecture Overview
The UI acts as a control plane over the rdev API. It orchestrates three main domains:
- Project Management: CRUD operations on K8s pods (
claudebox). - SDLC Orchestration: Driving the feature lifecycle via agents.
- Agent Interaction: Conversational interface for requirements gathering.
2. Feature Mapping
2.1 Project List & Dashboard
UI Requirement: "See a list of active projects... go into one project"
Backend Support: GET /api/v1/projects
- Existing:
Projectdomain model (internal/domain/project.go) supports ID, Name, Status (running,pending, etc.). - Missing: Real-time status updates (SSE/WebSocket) for project health are implemented in
internal/handlers/projects_stream.gobut need UI integration.
2.2 Work Queue
UI Requirement: "See the list of work that is queued up"
Backend Support: GET /api/v1/projects/{id}/work (inferred)
- Existing:
WorkTaskmodel (internal/domain/work.go) supports typesbuild,test,deploy,sdlc. - Logic: The
WorkQueueStatsand pagination are supported in the domain. - UI Needs: A polling or SSE mechanism to update the task list as the orchestrator schedules work.
2.3 Conversational Request (The Architect)
UI Requirement: "Enter a flow where you can create a request... conversation creates specs" Backend Support: PARTIAL
- Existing:
SDLCOrchestratorService(internal/service/sdlc_orchestrator.go) can execute agent actions. - Missing:
- Persistent Chat: No
ChatorMessagedomain model exists to store history.AgentRequesthasSessionID, but the backend doesn't seem to persist the conversation for UI retrieval. - Blueprint Model: The "Plan/Blueprint" (JSON structure of requirements) described in the vision is not yet a concrete backend entity.
- Persistent Chat: No
- Proposal:
- Create a
Blueprintentity to store the structured plan (dataModel,endpoints, etc.). - Create a
Conversationentity to store the chat history between User and Architect.
- Create a
2.4 Request Review & Investigation
UI Requirement: "Request goes into a slot to be reviewed... problems investigated... questions raised"
Backend Support: POST /projects/{id}/sdlc/execute
- Existing: The
SDLCServiceandClassifier(implied) determine the next action (ActionBlocked,ActionTransition). - Flow:
- UI sends
executerequest. - Backend runs classification.
- If blocked/question needed, returns
ActionBlockedorActionIdlewith a message. - UI renders this as a "Question" or "Review Item".
- User responds via
resolveendpoint (POST /projects/{id}/sdlc/resolve).
- UI sends
2.5 Execution & OTEL
UI Requirement: "Queues it up... see previous requests and full OTEL" Backend Support:
- Execution:
SDLCOrchestratorServicedispatches actions to agents (executeAgentAction). - OTEL:
internal/telemetryexists. The UI likely needs a proxy endpoint to query Trace/Metric data (e.g., via Jaeger/Prometheus API) or embed a view.
3. Data Model Enhancements (Required)
To support the vision, the backend likely needs these additions:
// Proposed Domain Models
type Blueprint struct {
ID string
ProjectID string
Sections map[string]interface{} // JSON: DataModel, API, UI
Status string // Draft, Approved
}
type ChatMessage struct {
ID string
ProjectID string
Role string // user, system (architect)
Content string
Timestamp time.Time
}
4. API Integration Strategy
| UI Feature | Endpoint | Notes |
|---|---|---|
| Project List | GET /projects |
Polling or SSE for status changes. |
| Chat | POST /projects/{id}/chat |
New Endpoint. Needs to persist msg & invoke Agent. |
| Plan View | GET /projects/{id}/blueprint |
New Endpoint. Returns structured spec. |
| Build/Run | POST /projects/{id}/sdlc/execute |
Triggers the actual work based on current state. |
| History | GET /projects/{id}/work |
List of past WorkTasks. |