fix: working end-to-end todo API from spec
Fixed three issues:
1. DB sharing: strengthened architecture prompt to forbid new Database(),
require import from ../../db.js
2. Route consolidation: simplified spec to one section per resource,
producing 1 IU instead of 6 fragmented modules
3. Data model context: prompt builder now includes DEFINITION/CONTEXT
nodes from other sections so LLM sees full schema
All CRUD operations verified working:
- POST /todos → 201 with Zod validation
- GET /todos → 200, ordered by created_at
- GET /todos/:id → 200 or 404
- PATCH /todos/:id → updates title/completed
- DELETE /todos/:id → 204
- Validation: empty title → 400, missing todo → 404
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.