Align FI recurrence with activity-core + rein-aharness (drop workstation cron).
Document the three-layer model, add railiance-rhythm executor install, and point playbooks at rein-aharness fi-research-brief instead of local crontab.
This commit is contained in:
parent
70cbfe0c6c
commit
46cfcd7a51
10 changed files with 248 additions and 100 deletions
|
|
@ -74,38 +74,41 @@ full resurveys.
|
|||
|
||||
---
|
||||
|
||||
## Automation consumer
|
||||
## Automation consumer (activity-core design)
|
||||
|
||||
**Organizer:** activity-core (when / what / where) — not workstation cron.
|
||||
**Executor:** rein-aharness on railiance01 (`fi-research-brief`).
|
||||
**Org playbook:** `activity-core/docs/recurring-automations-playbook.md`.
|
||||
|
||||
When activity-core emits `activity_task_spawn` with
|
||||
`target_repo: freedom-intelligence` and labels including `research-brief`:
|
||||
|
||||
1. Checkout this repo on the execution host
|
||||
2. Run this playbook end-to-end
|
||||
3. Prefer **llm-connect / OpenRouter** for any LLM drafting (Binky lesson: do
|
||||
not install coding-agent CLIs on railiance01 solely for this)
|
||||
4. Always post `fi_daily_brief` even if the brief is “no material delta”
|
||||
5. Idempotency key: do not open a second brief file for the same `date`
|
||||
1. Railiance host timer (or manual) runs
|
||||
`rein-aharness fi-research-brief --target-repo ~/freedom-intelligence`
|
||||
2. llm-connect drafts the brief; harness commits and posts **`fi_daily_brief`**
|
||||
3. Idempotency: one brief file per date; resolver clears `due` on completion event
|
||||
|
||||
Activity definition: `activity-definitions/fi-daily-research-brief.md`
|
||||
Workplan: `workplans/FI-WP-0002-activity-core-daily-research.md`
|
||||
Resolver: activity-core state-hub query `fi_brief_status` (implemented 2026-07-24)
|
||||
Do **not** install Claude Code / Codex on railiance01 for this rhythm.
|
||||
|
||||
| Piece | Location |
|
||||
| ----- | -------- |
|
||||
| Definition | `activity-definitions/fi-daily-research-brief.md` |
|
||||
| Ops | `docs/recurrence-ops.md` |
|
||||
| Executor install | `scripts/railiance-rhythm/install-on-railiance.sh` |
|
||||
| Workplan | FI-WP-0002 (finished) |
|
||||
| Resolver | `fi_brief_status` in activity-core |
|
||||
|
||||
### Ops: load this repo’s definitions
|
||||
|
||||
Dev / workstation worker:
|
||||
|
||||
```bash
|
||||
export ACTIVITY_DEFINITION_DIRS=/home/worsch/freedom-intelligence
|
||||
# then: make sync-activity-definitions (with ACTCORE_DB_URL + stack)
|
||||
# Dev
|
||||
export ACTIVITY_DEFINITION_DIRS=.../freedom-intelligence
|
||||
make -C ~/activity-core sync-activity-definitions
|
||||
|
||||
# Production: ConfigMap actcore-external-activity-definitions
|
||||
# then POST /admin/sync?definitions=true&schedules=true
|
||||
```
|
||||
|
||||
Production (railiance): projected into ConfigMap
|
||||
`actcore-external-activity-definitions` key `fi-daily-research-brief.md`
|
||||
(**enabled 2026-08-03**; Temporal schedule weekdays 07:30 Europe/Berlin).
|
||||
|
||||
Ops runbook: `docs/recurrence-ops.md`
|
||||
Workstation due-notice cron: `scripts/consume-fi-brief-spawn.sh` (07:40 weekdays).
|
||||
|
||||
---
|
||||
|
||||
## Quality bar
|
||||
|
|
|
|||
|
|
@ -1,93 +1,87 @@
|
|||
# Freedom Intelligence daily brief — recurrence ops
|
||||
# Freedom Intelligence daily brief — activity-core recurrence
|
||||
|
||||
**Status:** production schedule wired 2026-08-03
|
||||
**Definition:** `activity-definitions/fi-daily-research-brief.md`
|
||||
**Playbook:** `docs/daily-brief-playbook.md`
|
||||
**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`.
|
||||
|
||||
---
|
||||
|
||||
## Architecture (live)
|
||||
## Design (correct layers)
|
||||
|
||||
```text
|
||||
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
|
||||
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)
|
||||
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 | 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) |
|
||||
| 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` |
|
||||
| Consumer (workstation) | `scripts/consume-fi-brief-spawn.sh` (due notice; not auto-LLM) |
|
||||
| Executor | `rein-aharness fi-research-brief` |
|
||||
| Host timer | `scripts/railiance-rhythm/` (interim until spawn poller) |
|
||||
|
||||
---
|
||||
|
||||
## Verify schedule
|
||||
## Verify activity-core (organizer)
|
||||
|
||||
```bash
|
||||
# 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 '')])"
|
||||
# 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 "")])'
|
||||
|
||||
# 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 (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
|
||||
```
|
||||
|
||||
Schedule id pattern: `activity-schedule-<activity-definition-uuid>`.
|
||||
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`
|
||||
|
||||
---
|
||||
|
||||
## Workstation consumer (optional but recommended)
|
||||
|
||||
After activity-core fires at 07:30, run a due-check on the workstation:
|
||||
|
||||
```cron
|
||||
# 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)
|
||||
## Install executor on railiance01
|
||||
|
||||
```bash
|
||||
# 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())"
|
||||
# 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/
|
||||
```
|
||||
|
||||
Then execute playbook + post progress event.
|
||||
Timer is **07:35** Berlin — five minutes after activity-core’s 07:30 schedule.
|
||||
|
||||
---
|
||||
|
||||
## 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 (~30–90s)
|
||||
4. `POST /admin/sync?definitions=true&schedules=true`
|
||||
5. Commit both freedom-intelligence and activity-core if 20-runtime.yaml changed
|
||||
|
||||
---
|
||||
|
||||
## Completion event (required)
|
||||
## Completion event (required for due=false)
|
||||
|
||||
```yaml
|
||||
event_type: fi_daily_brief
|
||||
author: <agent-or-operator>
|
||||
summary: "FI daily brief YYYY-MM-DD"
|
||||
detail:
|
||||
repo: freedom-intelligence
|
||||
date: "YYYY-MM-DD"
|
||||
|
|
@ -95,4 +89,13 @@ detail:
|
|||
collection_candidates: <int>
|
||||
```
|
||||
|
||||
API: `POST http://127.0.0.1:8000/progress/`
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue