rdev/cookbooks/trees/composable-app.yaml
jordan 56e3f83955 feat: add auth scopes, OpenAPI docs, SDLC guides, and code quality improvements
- Add auth.RequireScope() to all handler routes for proper authorization
- Add SDLC OpenAPI endpoint documentation (state, features, tasks, branches, merge, archive, orchestrator)
- Add SDLC documentation guides (getting-started, cli-reference, api-reference, command-catalog)
- Add artifact_test.go for SDLC artifact coverage
- Add CLAUDE.md rules: auth scopes requirement, error wrapping with %w
- Fix error wrapping to use %w instead of %v throughout codebase
- Improve CLI merge command with conflict detection and resolution
- Fix handler tests to include auth middleware for RequireScope
- Add cookbook tree runner scripts for automated testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:55:50 -07:00

90 lines
2.4 KiB
YAML

name: composable-app
description: Deploy a composable app with backend service and frontend
version: 1
vars:
project_name: "" # Required
service_name: "api"
frontend_name: "web"
steps:
create-project:
description: Create project with monorepo skeleton
action: api
method: POST
endpoint: /project
body:
name: "{{ .vars.project_name }}"
description: "Composable app E2E test"
outputs:
- project_id: .data.name
- domain: .data.domain
add-service:
description: Add backend service component
depends_on: [create-project]
action: api
method: POST
endpoint: "/projects/{{ .outputs.create-project.project_id }}/components"
body:
type: service
name: "{{ .vars.service_name }}"
template: service
outputs:
- service_path: .data.path
- service_port: .data.port
add-frontend:
description: Add frontend app component (app-react)
depends_on: [create-project]
action: api
method: POST
endpoint: "/projects/{{ .outputs.create-project.project_id }}/components"
body:
type: app-react
name: "{{ .vars.frontend_name }}"
template: app-react
outputs:
- frontend_path: .data.path
- frontend_port: .data.port
verify-components:
description: Verify all components were added
depends_on: [add-service, add-frontend]
action: api
method: GET
endpoint: "/projects/{{ .outputs.create-project.project_id }}/components"
outputs:
- component_count: ".data.components | length"
wait-pipeline:
description: Wait for CI pipeline to complete
depends_on: [verify-components]
action: wait_pipeline
project_id: "{{ .outputs.create-project.project_id }}"
max_attempts: 60
poll_interval: 5
on_error: continue
verify-site:
description: Verify site is accessible
depends_on: [wait-pipeline]
action: wait_site
domain: "{{ .outputs.create-project.domain }}"
project_id: "{{ .outputs.create-project.project_id }}"
max_attempts: 30
poll_interval: 5
test-api-health:
description: Test API health endpoint
depends_on: [verify-site]
action: shell
command: "curl -s 'https://{{ .outputs.create-project.domain }}/api/health' 2>/dev/null || echo '{\"error\":\"connection failed\"}'"
on_error: continue
teardown:
- description: Delete project
action: api
method: DELETE
endpoint: "/project/{{ .outputs.create-project.project_id }}"