# work_logs/ — Audit Trail

See @../../CLAUDE.md for project-wide patterns.

## What This Is
Append-only audit log per task. Records summary, files changed, and test results. Data is created but **never updated or deleted**.

## Endpoints
- `POST /api/projects/{project_id}/logs` — create log entry
- `GET /api/projects/{project_id}/logs` — paginated list (most recent first)
- `GET /api/tasks/{task_id}/logs` — all logs for a task

## MCP Tools (2)
`log_work`, `list_work_logs`

## Gotchas
- `summary` is required and must be non-empty after strip()
- Both task_id and project_id must exist (FK validation at route level, not DB constraint)
- `files_changed` and `test_result` are free-form strings — no parsing or format validation
- `test_result` is conventionally "pass", "fail", or "skip" but not enforced
- This domain is separate from `logs/` (which queries external Loki)
