{
    "name": "Work Tracker API",
    "description": "Lightweight endpoint for LLMs and tools to log work sessions so productivity can be reviewed by day, hour, project, and category.",
    "version": "1.0.0",
    "timezone": "America/Phoenix",
    "endpoints": {
        "discovery": "https://jasonhuber.com/track",
        "health": "https://jasonhuber.com/track/health",
        "log": "https://jasonhuber.com/track/log",
        "entries": "https://jasonhuber.com/track/entries",
        "stats": "https://jasonhuber.com/track/stats",
        "dashboard": "https://jasonhuber.com/track/dashboard"
    },
    "auth": {
        "scheme": "Bearer",
        "header": "Authorization: Bearer <token>",
        "required_for": [
            "POST /track/log",
            "GET /track/entries",
            "GET /track/stats"
        ],
        "public": [
            "GET /track",
            "GET /track/health",
            "GET /track/dashboard"
        ]
    },
    "log_schema": {
        "description": "POST a JSON object to /track/log. Only \"tool\" is required; send what you know.",
        "fields": {
            "tool": "string, REQUIRED — claude-code | claude-personal | claude-work | claude-cowork | codex | chatgpt | other",
            "started_at": "ISO-8601 timestamp the work began (defaults to now if omitted)",
            "ended_at": "ISO-8601 timestamp the work ended (optional)",
            "duration_minutes": "number — supplied, or derived from started/ended if both present",
            "model": "string — opus-4.8 | sonnet-4.6 | gpt-5 | ...",
            "project": "string — what you worked on",
            "category": "string — work | side-project | personal | learning",
            "task_type": "string — coding | writing | research | planning | analysis",
            "tokens_in": "integer",
            "tokens_out": "integer",
            "cost_usd": "number (optional)",
            "productivity": "integer 1..5 — how effective the session was",
            "prompt_summary": "string — short summary of what was asked",
            "outcome_summary": "string — short summary of what got done",
            "tags": "array of strings (optional)",
            "artifact_url": "string — link to PR, doc, deploy (optional)",
            "session_id": "string — stable id to group repeated pings from one session"
        }
    },
    "instructions_for_llms": [
        "Post a work entry roughly every 20-30 minutes of active work, and once more when a session ends.",
        "Reuse the same session_id across pings within one session so duration is not double-counted; the latest ping for a session_id wins on conflicting summary fields.",
        "Keep prompt_summary and outcome_summary to one or two sentences.",
        "Send timestamps in ISO-8601. If you only know elapsed time, send duration_minutes."
    ]
}