Skip to main contentPurpose and Responsibilities
- Generate backend specs (e.g.
node_express.md, services.md, auth.md), API specs (openapi.md), and db specs (schema.md, migrations.md, orm_models.md, local_storage.md, firebase_schema.md, supabase.md when enabled).
- Align with FrontendDev (API contracts) and ProductManager (requirements).
- Coordinate with AIEngineer and ToolManager where relevant.
Input (from generateFileContentWithAgent)
file, requirements, config, filePath, workflowContext, existingDeliverables — Same pattern as Product Manager.
Output
- Markdown (or other
file.type) string: OpenAPI fragments, schema descriptions, migration notes, auth flows, service architecture.
Prompt Engineering
- Agent system:
"You are a Backend Developer agent. You create APIs, database schemas, and server logic. Coordinate with FrontendDev for API contracts and ProductManager for requirements."
- Supabase: For
supabase.md when workflowContext.supabaseIntegration is true, a dedicated long Supabase prompt is used (setup, DB, Auth, Realtime, Storage, client/server examples, deployment). Model: callOpenRouter(..., 'GROK', { temperature: 0.7 }).
- Default: Same
generateFileContentWithAgent template and callOpenRouter(..., 'GROK', { temperature: 0.8 }).
File Assignment
getAgentForFile assigns to BackendDev when the path contains:
backend, api, or database
For db/ and backend/apis/, the path usually matches backend or api. supabase.md is explicitly assigned via getAgentForFile('db/supabase.md', config) → BackendDev.
Examples
- backend/node_express.md, backend/services.md, backend/auth.md
- backend/apis/openapi.md
- db/schema.md, db/migrations.md, db/orm_models.md
- db/supabase.md (when Supabase integration is on)
- db/local_storage.md (iOS), db/firebase_schema.md (Android)
- backend/api_contracts.md, backend/push_notifications.md, backend/node_firebase.md (Android/iOS)
Customization Options
- Agent system: Edit the BackendDev entry in
agentSystemPrompts in lib/platform-templates.ts.
- Assignment: Map new paths (e.g.
queue/, workers/) to BackendDev in getAgentForFile.
- Supabase prompt: Change the Supabase block in
generateFileContentWithAgent to add/remove sections or examples.