Skip to content

Implement /api/ai/retro-summary endpoint #89

Description

@romahawk

Part of #60

What

Build the API route that generates a retrospective draft from the week's execution data.

Tasks

  • Create app/api/ai/retro-summary/route.ts
  • Input: WeeklyPlan, ExecutionLogs, completed tasks, journal entries from the current week
  • Output: { wins: string[], friction: string[], nextWeekIntentions: string[], summary: string }
  • Keep response under 400 tokens (concise, actionable)
  • Cache per user per week; do not regenerate if user has already saved edits

AC

  • Returns structured JSON matching the Journal section schema
  • Cached response returned if week's data hasn't changed significantly

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiServer-side routes and API layerphase: 5-retrospectiveRetrospective automationpriority: lowNice-to-have; schedule when capacity allowstype: featureNew functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions