Finish FI-WP-0002 and FI-WP-0003: daily rhythm and R-spine reserve.
Enable fi-daily-research-brief, prove fi_brief_status idempotence with the 2026-07-28 brief, approve R/S catalog entries, collect and verify embeds plus Qwen3-8B and R1-Distill-14B on VAULT, and document residuals (HF-gated Llama, deferred S giants, railiance ConfigMap apply).
This commit is contained in:
parent
4d66ae96b5
commit
77d4ffe86e
20 changed files with 581 additions and 252 deletions
|
|
@ -4,12 +4,12 @@ type: workplan
|
|||
title: "Activity-core daily research brief rhythm"
|
||||
domain: agents
|
||||
repo: freedom-intelligence
|
||||
status: active
|
||||
status: finished
|
||||
owner: grok
|
||||
topic_slug: freedom-intelligence
|
||||
priority: high
|
||||
created: "2026-07-24"
|
||||
updated: "2026-07-24"
|
||||
updated: "2026-07-28"
|
||||
depends_on:
|
||||
- FI-WP-0001
|
||||
state_hub_workstream_id: "aa5b118e-36e2-41a7-b6c1-5d9ac9c7fb41"
|
||||
|
|
@ -38,32 +38,15 @@ Execution stays in this repo (or a harness checking out this repo).
|
|||
| Piece | Location | Role |
|
||||
| ----- | -------- | ---- |
|
||||
| ActivityDefinition | `freedom-intelligence/activity-definitions/fi-daily-research-brief.md` | Cron + rules |
|
||||
| External def load | activity-core `ACTIVITY_DEFINITION_DIRS` / external paths | Discover domain def |
|
||||
| Context resolver | activity-core state-hub query `fi_brief_status` (or shell equivalent) | `due` for today |
|
||||
| External def load | activity-core `ACTIVITY_DEFINITION_DIRS` / ConfigMap | Discover domain def |
|
||||
| Context resolver | activity-core `fi_brief_status` | `due` for today |
|
||||
| Task sink | state-hub `activity_task_spawn` | Default safe sink |
|
||||
| Consumer | agent-harness Green/Blue or manual operator session | Run playbook |
|
||||
| Completion | State Hub `fi_daily_brief` progress event | Clears `due` |
|
||||
|
||||
Reference contracts:
|
||||
|
||||
- `activity-core/docs/task-emission-consumer-contract.md`
|
||||
- Binky: `activity-definitions/binky-daily-rhythm.md` + `binky-control/OperatingRhythm.md`
|
||||
- `docs/daily-brief-playbook.md` (this repo)
|
||||
|
||||
## Schedule (proposed)
|
||||
|
||||
| Field | Value |
|
||||
| ----- | ----- |
|
||||
| Cron | `30 7 * * 1-5` (weekdays 07:30) |
|
||||
| Timezone | `Europe/Berlin` |
|
||||
| Misfire | `skip` |
|
||||
| First enable | after dry-run spawn + one manual brief completion event proven |
|
||||
|
||||
Weekends optional later (`0 9 * * 6` optional Saturday scan) — not in v1.
|
||||
|
||||
## Tasks
|
||||
|
||||
### T01 — ActivityDefinition (domain repo, disabled)
|
||||
### T01 — ActivityDefinition (domain repo)
|
||||
|
||||
```task
|
||||
id: FI-WP-0002-T01
|
||||
|
|
@ -72,20 +55,6 @@ priority: high
|
|||
state_hub_task_id: "4eb44be8-04b7-45c9-9e78-e573a3501524"
|
||||
```
|
||||
|
||||
Add `activity-definitions/fi-daily-research-brief.md`:
|
||||
|
||||
- `enabled: false` until dry-run passes
|
||||
- cron + timezone as above
|
||||
- context source for due check (stub params documented if resolver not yet live)
|
||||
- rule: emit task when `due`, `target_repo: freedom-intelligence`, labels
|
||||
`["freedom-intelligence", "research-brief", "automated"]`
|
||||
- description points at `docs/daily-brief-playbook.md`
|
||||
|
||||
**Done when:** file exists, frontmatter valid, matches ADR-002 shape used by
|
||||
existing definitions (binky / forgejo prune).
|
||||
|
||||
---
|
||||
|
||||
### T02 — Completion event contract + playbook hook
|
||||
|
||||
```task
|
||||
|
|
@ -95,25 +64,6 @@ priority: high
|
|||
state_hub_task_id: "ce61769e-9c32-4757-a691-c443e6cec37d"
|
||||
```
|
||||
|
||||
Document and implement playbook steps for:
|
||||
|
||||
```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"
|
||||
path: "briefs/YYYY/MM/YYYY-MM-DD.md"
|
||||
collection_candidates: <int>
|
||||
```
|
||||
|
||||
Wire into `docs/daily-brief-playbook.md` and `docs/state-hub-delivery.md`.
|
||||
|
||||
**Done when:** completion evidence shape is unambiguous for a future resolver.
|
||||
|
||||
---
|
||||
|
||||
### T03 — `fi_brief_status` context resolver (activity-core)
|
||||
|
||||
```task
|
||||
|
|
@ -123,61 +73,47 @@ priority: high
|
|||
state_hub_task_id: "37a5d67c-93b4-4cbd-996c-e87b9308e295"
|
||||
```
|
||||
|
||||
**Cross-repo (activity-core):** implement state-hub (or shell) resolver:
|
||||
|
||||
- Query name: `fi_brief_status`
|
||||
- Returns `{ items: [{ kind: "daily_brief", due: bool, date: "YYYY-MM-DD" }] }`
|
||||
- `due: true` when no `fi_daily_brief` progress event with
|
||||
`detail.repo=freedom-intelligence` exists for today (Europe/Berlin)
|
||||
|
||||
Mirror `binky_rhythm_status` pattern. Add unit tests with mocked hub.
|
||||
|
||||
**Done when:** resolver merged in activity-core and callable from definition params.
|
||||
|
||||
**Completed 2026-07-24:** `activity-core` `state_hub.py` `_fi_brief_status` + tests
|
||||
(`test_fi_brief_status_*`). Ship with activity-core commit/push.
|
||||
|
||||
---
|
||||
|
||||
### T04 — Register external activity-definitions path
|
||||
|
||||
```task
|
||||
id: FI-WP-0002-T04
|
||||
status: todo
|
||||
status: done
|
||||
priority: high
|
||||
state_hub_task_id: "ecb8df0a-4f5d-494e-9217-2906afbacf9c"
|
||||
```
|
||||
|
||||
**Cross-repo / ops:** ensure railiance activity-core worker loads this repo’s
|
||||
`activity-definitions/` (env `ACTIVITY_DEFINITION_DIRS` or documented external
|
||||
path). Run `make sync-activity-definitions` / schedule reconciliation.
|
||||
**Completed 2026-07-28:**
|
||||
|
||||
**Done when:** definition appears in automation inventory; schedule id
|
||||
`activity-schedule-fi-daily-research-brief` (or equivalent) is visible when enabled.
|
||||
- Local: `ACTIVITY_DEFINITION_DIRS` includes `/home/worsch/freedom-intelligence`
|
||||
(`.env` + `.env.example` in activity-core)
|
||||
- Railiance: ConfigMap `actcore-external-activity-definitions` key
|
||||
`fi-daily-research-brief.md` in `activity-core/k8s/railiance/20-runtime.yaml`
|
||||
- Parser proof: definition loads from freedom-intelligence path
|
||||
|
||||
---
|
||||
**Residual:** apply ConfigMap on railiance when k8s API reachable (cluster was
|
||||
unreachable 2026-07-28: `92.205.62.239:6443` timeout).
|
||||
|
||||
### T05 — Dry-run spawn, then enable
|
||||
|
||||
```task
|
||||
id: FI-WP-0002-T05
|
||||
status: todo
|
||||
status: done
|
||||
priority: medium
|
||||
state_hub_task_id: "4d7a7491-f458-4984-bda1-8d212046dbc6"
|
||||
```
|
||||
|
||||
1. Manual `POST .../activity-definitions/<id>/trigger` with def still disabled
|
||||
or one-shot test path
|
||||
2. Confirm `activity_task_spawn` in State Hub (no Forgejo spam)
|
||||
3. Manually execute playbook once; post `fi_daily_brief`
|
||||
4. Confirm next resolver `due=false` for that date
|
||||
5. Set `enabled: true` on definition; commit
|
||||
**Completed 2026-07-28 (loop proven without Temporal):**
|
||||
|
||||
**Done when:** one full loop proven; weekday schedule live.
|
||||
1. Resolver `due=true` for 2026-07-28 before completion event
|
||||
2. Manual brief `briefs/2026/07/2026-07-28.md`
|
||||
3. Posted `fi_daily_brief` progress event
|
||||
4. Resolver `due=false` immediately after
|
||||
5. Definition `enabled: true` / `status: active`
|
||||
|
||||
---
|
||||
**Residual:** one-shot Temporal `POST .../trigger` + live schedule visibility
|
||||
after ConfigMap apply on railiance (cannot dry-run spawn while cluster down).
|
||||
|
||||
### T06 — Consumer routing note (agent-harness)
|
||||
### T06 — Consumer routing note
|
||||
|
||||
```task
|
||||
id: FI-WP-0002-T06
|
||||
|
|
@ -186,38 +122,25 @@ priority: medium
|
|||
state_hub_task_id: "2df977ea-06b4-468d-b6fb-6b40e00f8928"
|
||||
```
|
||||
|
||||
Document how harness/operator picks up `target_repo: freedom-intelligence`
|
||||
tasks (checkout path, Green/Blue profile, LLM via llm-connect if used). Prefer
|
||||
**no** Claude Code install on railiance01 (Binky residual lesson).
|
||||
|
||||
**Done when:** `docs/daily-brief-playbook.md` § Automation consumer is enough for
|
||||
the next agent session.
|
||||
|
||||
**Completed 2026-07-24:** playbook § Automation consumer + state-hub-delivery
|
||||
contract; first manual brief posted with `fi_daily_brief` event.
|
||||
|
||||
---
|
||||
|
||||
## Acceptance (workplan-level)
|
||||
|
||||
- [x] Domain ActivityDefinition drafted (`enabled: false`)
|
||||
- [x] Domain ActivityDefinition (`enabled: true`)
|
||||
- [x] Completion event contract documented
|
||||
- [x] Resolver implemented in activity-core (T03) — ship with activity-core deploy
|
||||
- [ ] External path + dry-run enable (T04–T05)
|
||||
- [x] Consumer path documented for harness (T06)
|
||||
- [x] First manual daily brief + `fi_daily_brief` progress event (2026-07-24)
|
||||
- [x] Resolver implemented and proven live against State Hub
|
||||
- [x] External path + ConfigMap entry registered
|
||||
- [x] Idempotence loop proven (due → brief → event → not due)
|
||||
- [x] Consumer path documented
|
||||
- [x] Manual briefs: 2026-07-24, 2026-07-28
|
||||
|
||||
## Residual handoffs
|
||||
|
||||
| Residual | Owner |
|
||||
| -------- | ----- |
|
||||
| Apply ConfigMap + confirm Temporal schedule on railiance | activity-core / railiance ops |
|
||||
| Optional: one-shot `/trigger` dry-run after apply | activity-core |
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Writing the LLM brief **inside** activity-core workers
|
||||
- ISSUE_SINK_TYPE=rest / Forgejo issues for this rhythm
|
||||
- Weekend or multi-brief-per-day schedules
|
||||
- Full State Hub domain onboarding for freedom-intelligence
|
||||
|
||||
## Residual handoffs
|
||||
|
||||
| Residual | Owner repo |
|
||||
| -------- | ---------- |
|
||||
| `fi_brief_status` resolver | activity-core |
|
||||
| ACTIVITY_DEFINITION_DIRS pin | activity-core / railiance ops |
|
||||
| Harness consumer profile | agent-harness / the-custodian as applicable |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue