103 lines
3.2 KiB
Markdown
103 lines
3.2 KiB
Markdown
# Freedom Intelligence daily brief — activity-core recurrence
|
||
|
||
**Status:** activity-core schedule live; rein-aharness executor on Railiance
|
||
**Do not** use workstation crontab as the primary path (retired anti-pattern).
|
||
|
||
Canonical org playbook: `activity-core/docs/recurring-automations-playbook.md`.
|
||
|
||
---
|
||
|
||
## Design (correct layers)
|
||
|
||
```text
|
||
activity-core (when / what / where)
|
||
Temporal: weekdays 07:30 Europe/Berlin
|
||
context: fi_brief_status → due?
|
||
rule: emit activity_task_spawn target_repo=freedom-intelligence
|
||
│
|
||
▼
|
||
rein-aharness on railiance01 (does the work)
|
||
primary: claim-loop → ops_run → fi-research-brief (REIN-A-0002)
|
||
interim/break-glass: host timer 07:35 → fi-research-brief
|
||
llm-connect drafts brief → commit → fi_daily_brief
|
||
│
|
||
▼
|
||
freedom-intelligence repo
|
||
briefs/YYYY/MM/YYYY-MM-DD.md
|
||
catalog / RESERVE-STATUS updates as needed
|
||
```
|
||
|
||
| Piece | Location |
|
||
| ----- | -------- |
|
||
| Definition (source of truth) | `activity-definitions/fi-daily-research-brief.md` |
|
||
| Cluster projection | ConfigMap `actcore-external-activity-definitions` |
|
||
| GitOps CM copy | `activity-core/k8s/railiance/20-runtime.yaml` |
|
||
| Resolver | activity-core `fi_brief_status` |
|
||
| Sink | `ISSUE_SINK_TYPE=state-hub` → `activity_task_spawn` |
|
||
| Executor | `rein-aharness fi-research-brief` |
|
||
| Claim loop | `rein-aharness claim-loop` (ops_run; REIN-A-0002) |
|
||
| Host timer | `scripts/railiance-rhythm/` (**break-glass** after T05 proof) |
|
||
|
||
---
|
||
|
||
## Verify activity-core (organizer)
|
||
|
||
```bash
|
||
# Definition enabled
|
||
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 "")])'
|
||
|
||
# Schedule (example id — re-check after re-sync)
|
||
# activity-schedule-3169ab1f-882b-59c7-9763-d014dc96f4fc
|
||
# paused=False, 07:30 Mon–Fri Europe/Berlin
|
||
|
||
# Ops UI: activity.coulomb.social → automations
|
||
# Manual fire: POST /activity-definitions/<id>/trigger
|
||
```
|
||
|
||
After definition edits:
|
||
|
||
1. Update ConfigMap key from this repo’s definition file
|
||
2. Wait for volume refresh
|
||
3. `POST /admin/sync?definitions=true&schedules=true`
|
||
|
||
---
|
||
|
||
## Install executor on railiance01
|
||
|
||
```bash
|
||
# On railiance01
|
||
git clone forgejo-remote:coulomb/freedom-intelligence.git ~/freedom-intelligence
|
||
cd ~/freedom-intelligence && ./scripts/railiance-rhythm/install-on-railiance.sh
|
||
|
||
# rein-aharness must expose fi-research-brief (deploy/pull rein-aharness)
|
||
# Logs: ~/.cache/freedom-intelligence/rhythm/
|
||
```
|
||
|
||
Timer is **07:35** Berlin — five minutes after activity-core’s 07:30 schedule.
|
||
|
||
---
|
||
|
||
## Completion event (required for due=false)
|
||
|
||
```yaml
|
||
event_type: fi_daily_brief
|
||
detail:
|
||
repo: freedom-intelligence
|
||
date: "YYYY-MM-DD"
|
||
path: "briefs/YYYY/MM/YYYY-MM-DD.md"
|
||
collection_candidates: <int>
|
||
```
|
||
|
||
Posted automatically by `rein-aharness fi-research-brief` on success.
|
||
|
||
---
|
||
|
||
## What not to do
|
||
|
||
- Workstation `crontab` that writes the brief (bypasses activity-core)
|
||
- Installing Claude Code / Codex on railiance01 for this rhythm
|
||
- Treating host timers as the scheduler of record
|
||
- Skipping the completion event (leaves `due=true` forever)
|