freedom-intelligence/docs/recurrence-ops.md
tegwick 70cbfe0c6c Catch up field brief, catalog Kimi K3, and wire live daily recurrence.
Add 2026-08-03 week catch-up brief with Kimi K3 as S1 strategic (collection
deferred on ~1454 GiB vs 850 GiB soft quota), document recurrence ops, and add a
workstation due-notice consumer cron helper. Production schedule was applied to
railiance ConfigMap and Temporal (weekdays 07:30 Europe/Berlin).
2026-08-03 17:37:53 +02:00

3.3 KiB
Raw Blame History

Freedom Intelligence daily brief — recurrence ops

Status: production schedule wired 2026-08-03
Definition: activity-definitions/fi-daily-research-brief.md
Playbook: docs/daily-brief-playbook.md


Architecture (live)

Temporal schedule (railiance activity-core)
  cron: 30 7 * * 1-5  Europe/Berlin
  → fi_brief_status (state-hub)
  → if due: activity_task_spawn (state-hub sink)
  → workstation consumer notice (optional cron)
  → operator/agent executes playbook in freedom-intelligence
  → progress event fi_daily_brief  → next day due=false
Piece Where
Source of truth (def) freedom-intelligence/activity-definitions/fi-daily-research-brief.md
Production projection ConfigMap actcore-external-activity-definitions key fi-daily-research-brief.md
GitOps copy activity-core/k8s/railiance/20-runtime.yaml (keep in sync)
Resolver activity-core fi_brief_status
Sink ISSUE_SINK_TYPE=state-hubactivity_task_spawn
Consumer (workstation) scripts/consume-fi-brief-spawn.sh (due notice; not auto-LLM)

Verify schedule

# Definition present + enabled on API
kubectl -n activity-core exec deploy/actcore-api -- \
  python3 -c "import urllib.request,json; d=json.loads(urllib.request.urlopen('http://localhost:8010/activity-definitions/').read());
print([x for x in d if 'Freedom Intelligence' in (x.get('name') or '')])"

# After def change: re-project ConfigMap then
kubectl -n activity-core exec deploy/actcore-api -- \
  python3 -c "import urllib.request; print(urllib.request.urlopen(urllib.request.Request('http://localhost:8010/admin/sync?definitions=true&schedules=true', method='POST')).read().decode())"

Schedule id pattern: activity-schedule-<activity-definition-uuid>.


After activity-core fires at 07:30, run a due-check on the workstation:

# crontab -e  (Europe/Berlin host clock or TZ=Europe/Berlin)
40 7 * * 1-5  /home/worsch/freedom-intelligence/scripts/consume-fi-brief-spawn.sh

This writes .local/consumer-logs/DUE-YYYY-MM-DD.txt when a brief is still due. An agent session or operator then runs the playbook and posts fi_daily_brief.


Manual one-shot (if schedule missed)

# Resolve activity id from API list, then:
kubectl -n activity-core exec deploy/actcore-api -- \
  python3 -c "import urllib.request; print(urllib.request.urlopen(urllib.request.Request('http://localhost:8010/activity-definitions/<id>/trigger', method='POST')).read().decode())"

Then execute playbook + post progress event.


Update definition

  1. Edit activity-definitions/fi-daily-research-brief.md in this repo
  2. Copy content into ConfigMap key (or re-apply from activity-core 20-runtime.yaml)
  3. Wait for volume refresh (~3090s)
  4. POST /admin/sync?definitions=true&schedules=true
  5. Commit both freedom-intelligence and activity-core if 20-runtime.yaml changed

Completion event (required)

event_type: fi_daily_brief
author: <agent-or-operator>
summary: "FI daily brief YYYY-MM-DD"
detail:
  repo: freedom-intelligence
  date: "YYYY-MM-DD"
  path: "briefs/YYYY/MM/YYYY-MM-DD.md"
  collection_candidates: <int>

API: POST http://127.0.0.1:8000/progress/