rdev/app-vision-gaps.md
jordan 853ec4cf81 fix: go.work race condition with batch components and idempotent provisioning
Three coordinated fixes for CI pipeline race conditions:

1. Woodpecker step dependencies: Added depends_on: [deps] to all 6 component
   templates (service, worker, cli, app-astro, app-react, app-nextjs) so build
   steps wait for go work sync to complete.

2. Idempotent resource provisioning: Modified provisionResources() to check
   for existing database/cache before creating, preventing "already exists"
   errors on component re-adds.

3. Batch component endpoint: POST /projects/{id}/components/batch enables
   atomic multi-component additions in a single git commit. Validates all
   components upfront, provisions infra sequentially, commits code components
   atomically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 12:31:40 -07:00

2.7 KiB

App Vision Gaps

To realize Orchard Studio (the "Deploy First, Talk Later" UI), rdev needs to evolve from a CLI/Script-driven engine into a Reactive Platform API.

1. The Interactivity Gap (State Management)

  • Current State: tree-runner.sh manages state in a local JSON file (.checkpoints/). The process is synchronous and blocking.
  • Vision Requirement: The UI needs to query "What is the status of the current build?" asynchronously.
  • Gap: We need to move the "Tree Runner" logic into the rdev-api.
    • Missing: GET /projects/{id}/operations (List active builds/deploys).
    • Missing: Database schema for operations (replacing local checkpoints).

2. The Feedback Loop Gap (Streaming)

  • Current State: We see logs in the terminal where tree-runner is running.
  • Vision Requirement: The user sees "Designing Schema..." -> "Running Tests..." in the web UI.
  • Gap: We need a WebSocket / SSE pipe from the Agent/CI -> rdev-api -> orchard-studio.
    • Missing: rdev-api endpoint for agents to push progress updates (POST /operations/{id}/log).
    • Missing: Frontend subscription endpoint (GET /operations/{id}/stream).

3. The "Draft Mode" Gap (Blueprint API)

  • Current State: We define features by immediately calling /sdlc/features and POST /builds. It's "fire and forget".
  • Vision Requirement: The user and Architect iterate on a plan before commitment.
  • Gap: We need a staging area for requirements.
    • Missing: POST /projects/{id}/blueprint/draft.
    • Missing: POST /projects/{id}/blueprint/commit (Triggers the build).

4. The Template Gap (Genesis)

  • Current State: We have a few raw templates (go-api, astro-landing).
  • Vision Requirement: Rich "Seeds" (SaaS, Social, E-comm).
  • Gap: Our templates are too primitive.
    • Missing: A "Meta-Template" system that can combine go-api + auth-pkg + postgres + react-admin into a single "SaaS Starter" deployable.

5. The "Architect Persona" Gap

  • Current State: We prompt Claude with /implement-feature.
  • Vision Requirement: An agent that asks clarifying questions instead of just coding.
  • Gap: We lack the "Consultant" system prompt.
    • Missing: .claude/agents/architect.md.
    • Missing: A workflow where the API returns a Question to the user instead of a Result.

Summary of Work

  1. Port Tree Runner to Go: Move orchestration logic into rdev-api.
  2. Build Event Bus: Implement SSE/Websockets for real-time logs.
  3. Define Blueprint Resource: Create DB tables for "Draft Features".
  4. Create Architect Agent: Define the persona that interviews users.