Files
antidrift/internal/tasks/tasks.go
T
felixm 569264be11 Add tasks port and Amazing Marvin adapter
The tasks.Provider port answers "what should I be doing?". The Marvin
adapter shells out to ampy's `am --json` and parses today's open tasks,
dropping done/empty-title entries. Leaf package mirroring ai.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:59:00 -04:00

20 lines
578 B
Go

// Package tasks is the Tasks port: it answers "what should I be doing?" by
// listing the open to-do items due today or earlier. It imports nothing from
// the rest of the app, so it stays a leaf package.
package tasks
import "context"
// Task is one to-do item. Primitives only, so tasks stays a leaf package.
type Task struct {
ID string
Title string
Day string // "YYYY-MM-DD", or "" if unscheduled
}
// Provider answers "what should I be doing?" — the open tasks due today or
// earlier.
type Provider interface {
Today(ctx context.Context) ([]Task, error)
}