api / projects_routes.py
REST surface over the ProjectStore. Used by the Slack project commands and the web UI's Projects tab.
All endpoints require X-Ghost-Key.
Project endpoints
| Method · Path | Behaviour |
|---|---|
| GET /api/projects | List, optionally filtered by status. |
| POST /api/projects | 201 Create. Required: title; optional: kind (default GENERAL), goal. |
| GET /api/projects/{pid} | Fetch. |
| PATCH /api/projects/{pid} | Update title, goal, kind, status, metadata. |
| DELETE /api/projects/{pid} | Soft delete (status=ARCHIVED). ?hard=true for cascade hard delete. |
| POST /api/projects/{pid}/switch | Set as current; returns project briefing. |
| POST /api/projects/{pid}/resume | Resume + log a project event. |
| POST /api/projects/{pid}/advance | Run one task-advancement cycle via advance_once(). |
| GET /api/projects/{pid}/events | List project events. Query: limit, type. |
Task endpoints
| Method · Path | Behaviour |
|---|---|
| GET /api/projects/{pid}/tasks | List with optional status filter. |
| POST /api/projects/{pid}/tasks | 201 Create. Body: description, parent_id, dependency_type=ALL, alternatives, postconditions. |
| PATCH /api/projects/{pid}/tasks/{tid} | Update. Status transitions go through ProjectPlan.update_status() so postconditions / parent propagation fire. |
| DELETE /api/projects/{pid}/tasks/{tid} | Cascade-delete descendants. |