1.4 KiB
1.4 KiB
MASTER CONTRACT
1. Unified Response Envelope
- Success:
{ "code": 0, "message": "success", "data": {...} } - Failure:
{ "code": <non-zero>, "message": "<error>", "data": null }
2. Cross-Stack Contract Ownership
- Backend source:
backend/app/api/,backend/app/schemas/ - Frontend source:
frontend/src/api/,frontend/src/types/ - Routing source:
backend/.openclaw/pmflow-routing-rules.json - Architecture docs source:
docs/architecture/
3. Sync Rules
- Any backend API/schema change must update:
docs/architecture/API_CONTRACTS.md- frontend TypeScript interfaces (if impacted)
- Any routing/function-name change must update:
backend/.openclaw/pmflow-routing-rules.jsondocs/architecture/DATAFLOW.md
- Any new module/page/API must update:
CLAUDE.mdstructure/reference sections
4. Current Core Contracts
- Signal Planner function name:
signal_planner_analyze - Signal planner storage fields:
signals.planner_statussignals.planner_analyzed_atsignals.planner_assignee_user_idsignals.strategic_analysis.ai_planner
- Model routing config persistence:
integrations(type='model_routing') - Task brief center persistence:
integrations(type='task_briefs')
5. Delivery Checklist
- API envelope unchanged and validated
- Backend schema + frontend type synced
- Dataflow doc synced
- Routing rule synced
- CLAUDE.md synced