diff --git a/cookbooks/trees/foundary.yaml b/cookbooks/trees/foundary.yaml index 65462f7..7940098 100644 --- a/cookbooks/trees/foundary.yaml +++ b/cookbooks/trees/foundary.yaml @@ -80,44 +80,49 @@ steps: - sdlc_initialized: .data.initialized # ============================================================ - # SECTION 2: ARCHITECT (Shell Stubs for Future Chat/Blueprint APIs) - # Documents the conversational architect flow that will use - # POST /projects/{id}/chat and GET /projects/{id}/blueprints + # SECTION 2: ARCHITECT + # Conversational product design via architect API. + # Starts a conversation, refines architecture, generates blueprint. # ============================================================ - architect-session: - description: "Simulate architect conversation (stub for future chat API)" + architect-start: + description: "Start architect conversation about product goals" depends_on: [verify-sdlc] - action: shell - command: | - cat <<'ARCHITECT' - ============================================================ - FOUNDARY ARCHITECT SESSION (Future: POST /projects/{id}/chat) - ============================================================ - The architect conversation would: - 1. Discuss product goals for a task management studio - 2. Identify core entities: projects, tasks, labels, assignments - 3. Propose two features for MVP: - - Feature 1: data-models (Core Data Models & Persistence) - - Feature 2: task-management-ui (Task Management UI) - 4. Generate blueprint (Future: GET /projects/{id}/blueprints) + action: api + method: POST + endpoint: "/projects/{{ .outputs.create-project.project_id }}/architect/start" + body: + prompt: "I want to build a task management studio. The product needs: 1) Core data models for Task, Project, Label, and Assignment entities with full CRUD stored in Postgres via studio-db, exposed as REST endpoints on studio-api. 2) A React frontend in studio-ui with a Kanban board (drag-and-drop columns: To Do, In Progress, Done), task creation/edit modals, and filtering by label and assignee. Propose the architecture and identify the two MVP features we should build." + outputs: + - conversation_id: .data.id - Feature definitions for downstream SDLC: - { - "features": [ - { - "slug": "data-models", - "title": "Core Data Models & Persistence", - "requirements": "Define Task, Project, Label, and Assignment entities with full CRUD. Postgres storage via studio-db. REST endpoints on studio-api. Include migrations, repository layer, service layer, and handler tests." - }, - { - "slug": "task-management-ui", - "title": "Task Management UI", - "requirements": "React UI in studio-ui for managing tasks. Kanban board view with drag-and-drop columns (To Do, In Progress, Done). Task creation/edit modal. Filter by label and assignee. Connects to studio-api REST endpoints." - } - ] - } - ARCHITECT - echo "Architect session complete — feature definitions ready" + architect-refine: + description: "Refine architecture with component details" + depends_on: [architect-start] + action: api + method: POST + endpoint: "/projects/{{ .outputs.create-project.project_id }}/architect/continue/{{ .outputs.architect-start.conversation_id }}" + body: + message: "Good. Let's define exactly two features for the MVP: Feature 1 'data-models' covers the persistence layer (Task, Project, Label, Assignment entities, migrations, repository layer, service layer, handler tests). Feature 2 'task-management-ui' covers the React frontend (Kanban board, task CRUD modals, label/assignee filters). Feature 2 depends on Feature 1 being complete since it consumes the API. Please confirm this breakdown and note any architectural considerations." + + architect-generate-blueprint: + description: "Generate structured blueprint from conversation" + depends_on: [architect-refine] + action: api + method: POST + endpoint: "/projects/{{ .outputs.create-project.project_id }}/architect/generate-blueprint/{{ .outputs.architect-start.conversation_id }}" + body: + name: "foundary-studio-mvp" + outputs: + - blueprint_id: .data.blueprint.id + + architect-verify-blueprint: + description: "Verify blueprint was persisted" + depends_on: [architect-generate-blueprint] + action: api + method: GET + endpoint: "/projects/{{ .outputs.create-project.project_id }}/blueprints/{{ .outputs.architect-generate-blueprint.blueprint_id }}" + outputs: + - blueprint_name: .data.name # ============================================================ # SECTION 3: FEATURE 1 — Core Data Models (draft → released) @@ -127,7 +132,7 @@ steps: # --- Phase 1: Draft --- f1-create-feature: description: "Create data-models feature in draft phase" - depends_on: [architect-session] + depends_on: [architect-verify-blueprint] action: api method: POST endpoint: "/projects/{{ .outputs.create-project.project_id }}/sdlc/features"