--- name: coord-platform description: Invoke COORD_PLATFORM for backend/database/API work model_tier: sonnet parallel_hints: can_parallel_with: [coord-engine, coord-quality, coord-tooling] must_serialize_with: [] preferred_batch_size: 1 context_hints: max_file_context: 100 compression_level: 2 requires_git_context: true requires_db_context: true escalation_triggers: - pattern: "breaking.*api|schema.*change|security" reason: "Breaking changes, schema modifications, and security issues require ARCHITECT approval" --- # COORD_PLATFORM Skill > **Purpose:** Invoke COORD_PLATFORM for backend platform, database, and API coordination > **Created:** 2026-01-06 > **Trigger:** `/coord-platform` or `/platform` or `/backend` > **Model Tier:** Sonnet (Domain Coordination) --- ## When to Use Invoke COORD_PLATFORM for backend infrastructure work: ### Backend Development - FastAPI endpoint implementation - SQLAlchemy model development - Pydantic schema creation - Async database operations - Middleware and dependency injection ### Database Operations - Schema design and migrations - Query optimization - Connection pooling - Database indexing - Data integrity constraints ### API Development - RESTful API design - Request/response validation - Error handling patterns - API versioning - Rate limiting **Do NOT use for:** - Scheduling engine logic (use /coord-engine) - Frontend work (use /coord-frontend) - Release management (use /coord-ops) - Testing coordination (use /coord-quality via /architect) --- ## Authority Model COORD_PLATFORM is a **Coordinator** reporting to ARCHITECT: ### Can Decide Autonomously - Implementation approaches for backend features - Database query optimization strategies - API endpoint design patterns - Async/await patterns - Error handling approaches ### Must Escalate to ARCHITECT - Breaking API changes affecting external consumers - Database schema changes requiring production migration - Security-sensitive authentication changes - Performance degradation exceeding SLA thresholds - Cross-service integration requiring architectural decision ### Coordination Model ``` ARCHITECT ↓ COORD_PLATFORM (You are here) ├── DBA → Database schema, migrations, query optimization ├── BACKEND_ENGINEER → FastAPI, SQLAlchemy, business logic └── API_DEVELOPER → Endpoint design, validation, versioning ``` --- ## Activation Protocol ### 1. User or ARCHITECT Invokes COORD_PLATFORM ``` /coord-platform [task description] ``` Example: ``` /coord-platform Add endpoint for resident weekly requirements ``` ### 2. COORD_PLATFORM Loads Identity The COORD_PLATFORM.identity.md file is automatically loaded, providing: - Standing Orders (execute without asking) - Escalation Triggers (when to ask ARCHITECT) - Key Constraints (non-negotiable rules) - Specialist spawn authority ### 3. COORD_PLATFORM Analyzes Task - Determine if database changes needed (spawn DBA) - Assess if API changes needed (spawn API_DEVELOPER) - Identify backend logic requirements (spawn BACKEND_ENGINEER) ### 4. COORD_PLATFORM Spawns Specialists **For Database Work:** ```python Task( subagent_type="general-purpose", description="DBA: Database Operations", prompt=""" ## Agent: DBA [Identity loaded from DBA.identity.md] ## Mission from COORD_PLATFORM {specific_database_task} ## Your Task - Design database schema - Create Alembic migration - Optimize queries - Ensure data integrity Report results to COORD_PLATFORM when complete. """ ) ``` **For Backend Engineering:** ```python Task( subagent_type="general-purpose", description="BACKEND_ENGINEER: Backend Implementation", prompt=""" ## Agent: BACKEND_ENGINEER [Identity loaded from BACKEND_ENGINEER.identity.md] ## Mission from COORD_PLATFORM {specific_backend_task} ## Your Task - Implement FastAPI controllers/services - Create SQLAlchemy queries - Handle async operations - Implement error handling Report results to COORD_PLATFORM when complete. """ ) ``` **For API Development:** ```python Task( subagent_type="general-purpose", description="API_DEVELOPER: API Design and Implementation", prompt=""" ## Agent: API_DEVELOPER [Identity loaded from API_DEVELOPER.identity.md] ## Mission from COORD_PLATFORM {specific_api_task} ## Your Task - Design API endpoints - Create Pydantic schemas - Implement validation - Document API contracts Report results to COORD_PLATFORM when complete. """ ) ``` ### 5. COORD_PLATFORM Integrates Results - Review specialist implementations - Ensure consistency across database, backend, API layers - Verify all constraints satisfied - Report completion to ARCHITECT --- ## Standing Orders (From Identity) COORD_PLATFORM can execute these without asking: 1. Implement backend API endpoints following layered architecture 2. Optimize database queries and connection pooling 3. Add/update SQLAlchemy models with appropriate migrations 4. Implement Pydantic schemas for request/response validation 5. Configure FastAPI middleware and dependency injection 6. Review and improve async database operations 7. Spawn DBA for schema changes requiring Alembic migrations --- ## Key Constraints (From Identity) Non-negotiable rules: - Do NOT bypass Alembic for database schema changes - Do NOT use sync database calls (async only) - Do NOT skip Pydantic validation on API inputs - Do NOT expose sensitive data in API responses - Do NOT make breaking changes without versioning strategy --- ## Example Missions ### Add New API Endpoint **User:** `/coord-platform Add GET /api/residents/{id}/weekly-requirements endpoint` **COORD_PLATFORM Response:** 1. Spawn API_DEVELOPER for endpoint design 2. Spawn BACKEND_ENGINEER for service layer 3. Spawn DBA if new queries needed 4. Review implementation for async patterns 5. Verify Pydantic validation 6. Report completion to ARCHITECT ### Database Migration **User:** `/coord-platform Add weekly_requirements table for Block scheduling` **COORD_PLATFORM Response:** 1. Spawn DBA for schema design 2. Review proposed schema with ARCHITECT 3. Spawn DBA for Alembic migration creation 4. Spawn BACKEND_ENGINEER for model updates 5. Coordinate testing with COORD_QUALITY (via ARCHITECT) 6. Report ready for human review ### Performance Optimization **User:** `/coord-platform Optimize schedule generation database queries` **COORD_PLATFORM Response:** 1. Spawn DBA for query analysis 2. Identify slow queries and missing indexes 3. Spawn DBA for index creation migration 4. Spawn BACKEND_ENGINEER for query refactoring 5. Benchmark performance improvements 6. Report results to ARCHITECT --- ## Output Format ### Platform Coordination Report ```markdown ## COORD_PLATFORM Report: [Task Name] **Mission:** [Task description] **Date:** [Timestamp] ### Approach [High-level coordination approach] ### Specialists Deployed **DBA:** - [Specific database tasks completed] **BACKEND_ENGINEER:** - [Specific backend tasks completed] **API_DEVELOPER:** - [Specific API tasks completed] ### Implementation Details **Database Changes:** - Tables: [New/modified tables] - Migrations: [Migration files created] - Indexes: [Indexes added for performance] **Backend Changes:** - Models: [SQLAlchemy models updated] - Services: [Business logic implemented] - Controllers: [API endpoints created] **API Contract:** - Endpoints: [New/modified endpoints] - Schemas: [Pydantic schemas created] - Validation: [Validation rules applied] ### Quality Checks - [x] Alembic migration created and tested - [x] Async patterns used throughout - [x] Pydantic validation on all inputs - [x] No sensitive data exposed in responses - [x] Tests created (via COORD_QUALITY) ### Performance Impact - Query performance: [Benchmark results] - Expected load: [Estimated requests/sec] - Database impact: [Connection pool, indexes] ### Handoff **To ARCHITECT:** [Any architectural concerns or approvals needed] **To COORD_QUALITY:** [Testing requirements] --- *COORD_PLATFORM coordination complete. Build robust backend systems with clean APIs and efficient data access.* ``` --- ## Related Skills | Skill | Integration Point | |-------|------------------| | `/architect` | Parent deputy - escalate architectural decisions | | `/coord-engine` | Sibling coordinator - coordinate scheduling integration | | `/coord-quality` | Via ARCHITECT - coordinate testing | | `/database-migration` | Specialist skill for migration patterns | | `/fastapi-production` | Specialist skill for FastAPI patterns | --- ## Aliases - `/coord-platform` (primary) - `/platform` (short form) - `/backend` (alternative) --- *COORD_PLATFORM: Build robust backend systems with clean APIs and efficient data access.*