2.2 KiB
2.2 KiB
TASK: COS morning briefing — discourse client + harness brief (Redmine 495)
Context
Spec: docs/SPEC-20260829-charles-brief.md. Target: first live 3-COS briefing 2026-09-01 06:30 CST (beta 8/31 0600). Briefing = daily digest via Discourse (fallback Redmine note) assembled from: Redmine activity (scope), Gitea PR inbox, quota usage. Exact format TBD by Charles — ship a clean v0 format he can react to.
Part A — mopac-discourse-go client (new repo)
- Create repo via Gitea API if absent (PMO pattern: tea token from ~/.config/tea/config.yml, POST /api/v1/orgs/ukrrs/repos), clone to ~/projects/meta/MOPAC/discourse-go. AGPLv3 LICENSE.
- Stdlib-only Go client: categories (list/create), topics (create/list), posts (create/update), raw JSON passthrough for anything else. API key via key_ref/env (never logged). Fake-server tests. Docs standard. (Current Discourse key 403s on category creation — client supports it, live verification may wait for the admin-scoped key; note in REPORT.)
Part B — harness brief subcommand
- Digest window: since last briefing marker (state/brief/brief.jsonl).
- Sources (read-only): Redmine issues in scope created/updated/closed in window (reuse intake client); Gitea open PRs across ukrrs repos (API); quota snapshot summary (internal/quota if landed).
- Render: clean markdown — per-vertical sections: shipped (closed), moved (updated w/ status), incoming (new), PRs awaiting review, quota line. Beautiful tables (docs standard).
- Delivery v0: post to Discourse category (configurable id/slug); if Discourse fails (403 etc.), fallback = journal note on a configured Redmine "briefing" issue — NEVER silently drop; log delivery path.
- Scheduling v0:
harness briefis one-shot (cron/loop calls it at 0630); config[brief]section (category, redmine fallback issue, window tz CST). Idempotent: one briefing per window (marker). - TDD (fake servers for both), docker dev, docs, push.
Deliverable
REPORT-20260829-1100-briefing.md in ~/.coordinate/inbox-pmo/: client
surface, the v0 briefing format (render a sample with fake data in the
REPORT), delivery verification status, what Charles should tweak.