standup

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package standup generates AI-powered daily standup reports for cloop projects. It analyzes recent task activity, current blockers, and upcoming work to produce a concise standup report suitable for sharing with stakeholders or posting to Slack.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDigestPrompt

func BuildDigestPrompt(d *Digest) string

BuildDigestPrompt builds the AI prompt for the team digest.

func BuildPrompt

func BuildPrompt(goal string, r *Report, windowHours int) string

BuildPrompt creates the AI prompt for standup generation.

func FormatDigestEmail

func FormatDigestEmail(d *Digest) string

FormatDigestEmail renders the digest as an HTML email body.

func FormatDigestMarkdown

func FormatDigestMarkdown(d *Digest) string

FormatDigestMarkdown renders the digest as GitHub-flavored Markdown.

func FormatDigestSlack

func FormatDigestSlack(d *Digest) string

FormatDigestSlack renders the digest as a Slack Block Kit JSON payload.

func FormatMarkdown

func FormatMarkdown(r *Report, goal string, windowHours int) string

FormatMarkdown renders the standup as GitHub-flavored Markdown.

func FormatSlack

func FormatSlack(r *Report, goal string, windowHours int) string

FormatSlack renders the standup for Slack (plain text, emoji-friendly).

func FormatText

func FormatText(r *Report, goal string, windowHours int) string

FormatText renders the standup as plain text.

func PostDigestToSlack

func PostDigestToSlack(ctx context.Context, webhookURL string, d *Digest) error

PostDigestToSlack posts the Block Kit payload to the given Slack webhook URL.

Types

type Digest

type Digest struct {
	GeneratedAt time.Time
	WindowHours int
	Goal        string
	Cards       []DigestCard

	// Tasks active in the window but with no micro-standup (completed/failed)
	CompletedTasks []*pm.Task
	FailedTasks    []*pm.Task

	// AI-generated narrative
	AIText string
}

Digest is a team-facing roll-up standup for all active tasks in a window.

func CollectDigest

func CollectDigest(ctx context.Context, workDir string, s *state.ProjectState, windowHours int) (*Digest, error)

CollectDigest gathers DigestCards for every task updated in the given window. In-progress tasks get a full micro-standup card; completed/failed tasks in the window are listed without a card (they are included in the narrative prompt).

func GenerateDigest

func GenerateDigest(
	ctx context.Context,
	prov provider.Provider,
	opts provider.Options,
	workDir string,
	s *state.ProjectState,
	windowHours int,
) (*Digest, error)

GenerateDigest collects per-task context, calls the AI once for a roll-up narrative, and returns a populated *Digest.

type DigestCard

type DigestCard struct {
	Task    *pm.Task
	TaskCtx *microstandup.TaskContext // populated during collection; nil on error
	Card    *microstandup.Card        // populated after AI generation; nil on error
}

DigestCard bundles a micro-standup card with the originating task.

type Report

type Report struct {
	GeneratedAt time.Time
	WindowHours int

	// Tasks active in the window
	CompletedTasks  []*pm.Task
	FailedTasks     []*pm.Task
	StartedTasks    []*pm.Task
	InProgressTasks []*pm.Task
	BlockedTasks    []*pm.Task
	NextTasks       []*pm.Task // top pending, not blocked

	// Metrics
	Metrics *insights.Metrics

	// AI-generated narrative
	AIText string
}

Report holds a generated standup.

func Build

func Build(s *state.ProjectState, windowHours int) *Report

Build computes a standup report from the current project state. windowHours controls how far back "yesterday" looks (default 24).

func Generate

func Generate(ctx context.Context, p provider.Provider, s *state.ProjectState, model string, windowHours int, timeout time.Duration, onToken func(string)) (*Report, error)

Generate calls the AI provider to produce a standup report.

type Sections

type Sections struct {
	Yesterday string
	Today     string
	Blockers  string
	Forecast  string
}

Sections are the parsed sections of a standup.

func ParseSections

func ParseSections(text string) Sections

ParseSections extracts the four standup sections from AI output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL