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>
This commit is contained in:
2026-05-31 21:59:00 -04:00
parent 267eda59e6
commit 569264be11
3 changed files with 212 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// 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)
}