Triggers
- foundation phase
- scaffolding
- project setup
- CI/CD pipeline
- infrastructure setup
- design system implementation
- database setup
- API scaffold
- environment setup
- monitoring setup
- dev environment
- project scaffolding
- component library
- theme system
- deployment pipeline
Instructions
Phase 2 builds the technical and operational foundation that all subsequent work depends on. Get the skeleton standing before adding muscle. After this phase, every developer has a working environment, a deployable pipeline, and a design system to build with. Duration: 3-5 days.
Pre-Conditions
Verify before starting:
- Phase 1 Quality Gate passed (Architecture Package approved)
- Phase 1 Handoff Package received
- All architecture documents finalized
Workstream A: Infrastructure (Day 1-3, Parallel)
Use organization_spawn or swarm_spawn to activate in parallel:
DevOps Automator — CI/CD Pipeline + Infrastructure:
- Input: Backend Architect system architecture + deployment requirements
goal_create: CI/CD Pipeline (security scanning, testing, build/containerization, deployment, rollback)
goal_create: Infrastructure as Code (environment provisioning, container orchestration, network/security config)
goal_create: Environment Configuration (secrets management, env vars, multi-environment parity)
- Files to create: .github/workflows/ci-cd.yml, infrastructure/ templates, docker-compose.yml, Dockerfiles
- Timeline: 3 days.
Infrastructure Maintainer — Cloud Infrastructure + Monitoring:
- Input: DevOps Automator infrastructure + Backend Architect architecture
goal_create: Cloud Resource Provisioning (compute, storage, networking, auto-scaling, load balancer)
goal_create: Monitoring Stack (Prometheus/DataDog, Grafana dashboards)
goal_create: Logging and Alerting (centralized logs, alert rules, on-call notifications)
goal_create: Security Hardening (firewall rules, SSL/TLS, access control policies)
- Timeline: 3 days.
Studio Operations — Process Setup:
- Input: Sprint Prioritizer plan + coordination needs
goal_create: Git Workflow (branch strategy, PR review process, merge policies)
goal_create: Communication Channels (team channels, notification routing, status cadence)
goal_create: Documentation Templates (PR template, issue template, decision log)
goal_create: Collaboration Tools (project board, sprint tracking configuration)
- Timeline: 2 days.
Workstream B: Application Foundation (Day 1-4, Parallel)
Frontend Developer — Project Scaffolding + Component Library:
- Input: UX Architect CSS Design System + Brand Guardian identity
goal_create: Project Scaffolding (framework setup, TypeScript, build tooling, testing framework)
goal_create: Design System Implementation (CSS tokens, base components, theme system, responsive utilities)
goal_create: Application Shell (routing, layout components, error boundary, loading states)
- Timeline: 3 days.
Backend Architect — Database + API Foundation:
- Input: System Architecture Specification + Database Schema Design
goal_create: Database Setup (schema deployment/migrations, indexes, seed data, connection pooling)
goal_create: API Scaffold (framework setup, route structure, middleware stack, health checks)
goal_create: Authentication System (auth provider, JWT/session management, RBAC scaffold)
goal_create: Service Communication (API versioning, serialization, error standardization)
- Timeline: 4 days.
UX Architect — CSS System Implementation:
- Input: Brand Guardian identity + Phase 1 CSS Design System spec
goal_create: Design Tokens Implementation (CSS custom properties, brand palette, typography scale)
goal_create: Layout System (container system, grid patterns, flexbox utilities)
goal_create: Theme System (light/dark variables, system preference detection, theme toggle, smooth transitions)
- Timeline: 2 days.
Verification Checkpoint (Day 4-5)
Use organization_delegate to an Evidence Collector for verification with screenshot evidence:
- CI/CD pipeline executes successfully
- Application skeleton loads in browser (desktop + mobile)
- Theme toggle works (light + dark)
- API health check responds
- Database is accessible (migration status)
- Monitoring dashboards are active
- Component library renders
Gate Decision
Dual sign-off: DevOps Automator (infrastructure) + Evidence Collector (visual)
- PASS: Working skeleton with full DevOps pipeline -> Phase 3
- FAIL: Specific infrastructure or application issues -> Fix and re-verify
Use knowledge_write to persist all foundation artifacts and verification evidence.
Deliverables
Success Metrics
- CI/CD pipeline builds, tests, and deploys without errors
- Database schema deployed with all tables and indexes
- API scaffold responding on health check endpoint
- Frontend skeleton renders in browser (desktop + mobile)
- Monitoring dashboards showing metrics
- Design system tokens implemented and component library rendering
- Theme toggle functional (light/dark/system)
- Git workflow and processes documented
Verify
- The deliverable for this phase exists as a concrete artifact (doc, ticket, board, repo) and its location is shared, not described
- Each commitment has an owner name, a due date, and a definition-of-done that someone other than the author could check
- Risks are listed with likelihood/impact and a named mitigation, not as a generic 'risks: TBD' bullet
- Dependencies on other teams/vendors/agents are explicit; an ack from each dependency is recorded or marked 'pending'
- Success criteria for the next phase are numeric or otherwise objectively testable
- A rollback / kill-switch / 'we will stop if X' criterion is written down before work starts
1---2name: agency-phase-2-foundation3description: Foundation and scaffolding phase — build technical and operational foundation before feature development. Adapted from msitarzewski/agency-agents.4---56## Triggers78- foundation phase9- scaffolding10- project setup11- CI/CD pipeline12- infrastructure setup13- design system implementation14- database setup15- API scaffold16- environment setup17- monitoring setup18- dev environment19- project scaffolding20- component library21- theme system22- deployment pipeline2324## Instructions2526Phase 2 builds the technical and operational foundation that all subsequent work depends on. Get the skeleton standing before adding muscle. After this phase, every developer has a working environment, a deployable pipeline, and a design system to build with. Duration: 3-5 days.2728### Pre-Conditions2930Verify before starting:311. Phase 1 Quality Gate passed (Architecture Package approved)322. Phase 1 Handoff Package received333. All architecture documents finalized3435### Workstream A: Infrastructure (Day 1-3, Parallel)3637Use `organization_spawn` or `swarm_spawn` to activate in parallel:3839**DevOps Automator — CI/CD Pipeline + Infrastructure**:40- Input: Backend Architect system architecture + deployment requirements41- `goal_create`: CI/CD Pipeline (security scanning, testing, build/containerization, deployment, rollback)42- `goal_create`: Infrastructure as Code (environment provisioning, container orchestration, network/security config)43- `goal_create`: Environment Configuration (secrets management, env vars, multi-environment parity)44- Files to create: .github/workflows/ci-cd.yml, infrastructure/ templates, docker-compose.yml, Dockerfiles45- Timeline: 3 days.4647**Infrastructure Maintainer — Cloud Infrastructure + Monitoring**:48- Input: DevOps Automator infrastructure + Backend Architect architecture49- `goal_create`: Cloud Resource Provisioning (compute, storage, networking, auto-scaling, load balancer)50- `goal_create`: Monitoring Stack (Prometheus/DataDog, Grafana dashboards)51- `goal_create`: Logging and Alerting (centralized logs, alert rules, on-call notifications)52- `goal_create`: Security Hardening (firewall rules, SSL/TLS, access control policies)53- Timeline: 3 days.5455**Studio Operations — Process Setup**:56- Input: Sprint Prioritizer plan + coordination needs57- `goal_create`: Git Workflow (branch strategy, PR review process, merge policies)58- `goal_create`: Communication Channels (team channels, notification routing, status cadence)59- `goal_create`: Documentation Templates (PR template, issue template, decision log)60- `goal_create`: Collaboration Tools (project board, sprint tracking configuration)61- Timeline: 2 days.6263### Workstream B: Application Foundation (Day 1-4, Parallel)6465**Frontend Developer — Project Scaffolding + Component Library**:66- Input: UX Architect CSS Design System + Brand Guardian identity67- `goal_create`: Project Scaffolding (framework setup, TypeScript, build tooling, testing framework)68- `goal_create`: Design System Implementation (CSS tokens, base components, theme system, responsive utilities)69- `goal_create`: Application Shell (routing, layout components, error boundary, loading states)70- Timeline: 3 days.7172**Backend Architect — Database + API Foundation**:73- Input: System Architecture Specification + Database Schema Design74- `goal_create`: Database Setup (schema deployment/migrations, indexes, seed data, connection pooling)75- `goal_create`: API Scaffold (framework setup, route structure, middleware stack, health checks)76- `goal_create`: Authentication System (auth provider, JWT/session management, RBAC scaffold)77- `goal_create`: Service Communication (API versioning, serialization, error standardization)78- Timeline: 4 days.7980**UX Architect — CSS System Implementation**:81- Input: Brand Guardian identity + Phase 1 CSS Design System spec82- `goal_create`: Design Tokens Implementation (CSS custom properties, brand palette, typography scale)83- `goal_create`: Layout System (container system, grid patterns, flexbox utilities)84- `goal_create`: Theme System (light/dark variables, system preference detection, theme toggle, smooth transitions)85- Timeline: 2 days.8687### Verification Checkpoint (Day 4-5)8889Use `organization_delegate` to an Evidence Collector for verification with screenshot evidence:901. CI/CD pipeline executes successfully912. Application skeleton loads in browser (desktop + mobile)923. Theme toggle works (light + dark)934. API health check responds945. Database is accessible (migration status)956. Monitoring dashboards are active967. Component library renders9798### Gate Decision99100Dual sign-off: DevOps Automator (infrastructure) + Evidence Collector (visual)101102- **PASS**: Working skeleton with full DevOps pipeline -> Phase 3103- **FAIL**: Specific infrastructure or application issues -> Fix and re-verify104105Use `knowledge_write` to persist all foundation artifacts and verification evidence.106107## Deliverables108109- [ ] Working CI/CD pipeline (builds, tests, deploys)110- [ ] Database schema deployed with all tables/indexes111- [ ] API scaffold responding on health check112- [ ] Frontend skeleton renders in browser113- [ ] Monitoring dashboards showing metrics114- [ ] Design system tokens implemented115- [ ] Theme toggle functional (light/dark/system)116- [ ] Git workflow and processes documented117- [ ] Evidence Collector verification screenshots118119## Success Metrics120121- CI/CD pipeline builds, tests, and deploys without errors122- Database schema deployed with all tables and indexes123- API scaffold responding on health check endpoint124- Frontend skeleton renders in browser (desktop + mobile)125- Monitoring dashboards showing metrics126- Design system tokens implemented and component library rendering127- Theme toggle functional (light/dark/system)128- Git workflow and processes documented129130## Verify131132- The deliverable for this phase exists as a concrete artifact (doc, ticket, board, repo) and its location is shared, not described133- Each commitment has an owner name, a due date, and a definition-of-done that someone other than the author could check134- Risks are listed with likelihood/impact and a named mitigation, not as a generic 'risks: TBD' bullet135- Dependencies on other teams/vendors/agents are explicit; an ack from each dependency is recorded or marked 'pending'136- Success criteria for the next phase are numeric or otherwise objectively testable137- A rollback / kill-switch / 'we will stop if X' criterion is written down before work starts