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 · PathBehaviour
GET /api/projectsList, optionally filtered by status.
POST /api/projects201 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}/switchSet as current; returns project briefing.
POST /api/projects/{pid}/resumeResume + log a project event.
POST /api/projects/{pid}/advanceRun one task-advancement cycle via advance_once().
GET /api/projects/{pid}/eventsList project events. Query: limit, type.

Task endpoints

Method · PathBehaviour
GET /api/projects/{pid}/tasksList with optional status filter.
POST /api/projects/{pid}/tasks201 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.