BINKY-WP-0006: retarget Railiance rhythm to llm-connect/OpenRouter
Some checks failed
Work Records / validate (push) Has been cancelled
Some checks failed
Work Records / validate (push) Has been cancelled
Reject Claude Code (or any coding agent) on railiance01. Mail-scan stays deterministic; triage/briefs use llm-connect HTTP → structured JSON → deterministic apply. Document in integrations/railiance-llm-rhythm.md and rewrite WP-0006 tasks accordingly; timers no longer require_claude.
This commit is contained in:
parent
5011e53090
commit
88a4886ea7
9 changed files with 252 additions and 63 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
id: BINKY-WP-0006
|
||||
type: workplan
|
||||
title: "Railiance rhythm: continuous intake + agentic runtime on host"
|
||||
title: "Railiance rhythm: llm-connect execution (no host coding agent)"
|
||||
domain: infotech
|
||||
repo: binky-control
|
||||
status: ready
|
||||
|
|
@ -12,19 +12,44 @@ updated: "2026-07-21"
|
|||
state_hub_workstream_id: "1c068209-c3f7-4445-82ed-f762a095120c"
|
||||
---
|
||||
|
||||
Close the residual gaps after BINKY-WP-0004 cutover so rhythm is fully
|
||||
unattended on Railiance without host-timer dual scheduling.
|
||||
Close residual gaps after BINKY-WP-0004 cutover so Binky rhythm runs
|
||||
**unattended on Railiance without installing Claude Code or any coding
|
||||
agent/harness shell on the host.**
|
||||
|
||||
## Context
|
||||
## Architectural decision (founder direction 2026-07-21)
|
||||
|
||||
- activity-core `ISSUE_SINK_TYPE=state-hub` posts **progress** events on emit
|
||||
(not claimable issue-core issues). agent-harness intake still polls issue-core.
|
||||
- agent-harness k8s deploy is `sleep infinity` (placeholder).
|
||||
- railiance01 host timers call task files directly (interim).
|
||||
- Agentic daily/review need `claude` CLI on railiance01 (absent as of 2026-07-21);
|
||||
mail-scan works via AppRole without Claude.
|
||||
| Wrong | Right |
|
||||
| --- | --- |
|
||||
| Install Claude CLI / coding agent on railiance01 | Use **llm-connect** (already in `activity-core` ns on railiance) via **OpenRouter** |
|
||||
| AgenticClaudeCodeAdapter as default on server | **Hosted text adapter** + **deterministic apply** of structured results |
|
||||
| Re-implement policy in every client | Keep Green/Blue rules in harness apply layer; model only classifies/drafts |
|
||||
|
||||
## Task: Choose emission → execution contract
|
||||
### Two-phase mail path (already half-built)
|
||||
|
||||
1. **Deterministic scan** (`agent-harness mail-scan`) — IMAP via AppRole, CSV
|
||||
under `mailmeta/reports/`, hub `binky_mail_intake` counts. **No LLM.**
|
||||
Proven on railiance01 2026-07-21.
|
||||
2. **Triage** — today wrongly defaults to Claude Code agentic session.
|
||||
**Target:** call in-cluster
|
||||
`http://llm-connect.activity-core.svc.cluster.local:8080` (OpenRouter,
|
||||
cost-efficient open-weights or cheap hosted model) → **JSON triage plan** →
|
||||
deterministic applier commits metadata-only queue/log updates.
|
||||
|
||||
Daily brief / weekly review follow the same pattern (structured draft →
|
||||
apply → commit), not a full IDE agent on the node.
|
||||
|
||||
### Existing platform assets
|
||||
|
||||
- llm-connect Deployment live on railiance01 (`LLM_CONNECT_PROVIDER=openrouter`,
|
||||
model currently `google/gemini-2.5-flash` in ConfigMap — may retarget to
|
||||
open-weights for cost).
|
||||
- OpenBao lane for OpenRouter key already used by that service
|
||||
(`llm-connect-provider-secrets` / CCR path under activity-core).
|
||||
- activity-core `llm_client.py` is the HTTP client pattern to reuse.
|
||||
- agent-harness `runner.py` already accepts an injected `adapter=` (swap
|
||||
default off Claude Code for server profiles).
|
||||
|
||||
## Task: Spec llm-connect mail-triage contract
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T01
|
||||
|
|
@ -33,17 +58,21 @@ priority: high
|
|||
state_hub_task_id: "912a8802-e80f-4c04-aecd-9586c3b7a4b0"
|
||||
```
|
||||
|
||||
Decide with activity-core / harness owners:
|
||||
Write `integrations/railiance-llm-rhythm.md` (or extend cutover runbook):
|
||||
|
||||
A) Restore opt-in `ISSUE_SINK_TYPE=rest` for Binky labels only, or
|
||||
B) Teach agent-harness to claim work from a state-hub work-record / task queue, or
|
||||
C) Keep host timers as the durable executor and demote activity-core schedules
|
||||
to observability-only for Binky.
|
||||
- Input: newest `mailmeta/reports/*.csv` (metadata columns only; no bodies).
|
||||
- Output JSON schema: log entries, queue candidates, suspicious flags
|
||||
(sender/subject/date only).
|
||||
- Model profile: OpenRouter **cost-efficient** default (prefer open-weights;
|
||||
name candidates + fallback); max tokens; temperature low.
|
||||
- Apply rules: Blue lane, no push, no network from apply step; suspicious
|
||||
mail never acted on.
|
||||
- Where it runs: railiance Job/CronJob or host timer calling
|
||||
`agent-harness mail-triage` (new subcommand), **not** Claude.
|
||||
|
||||
Record decision (DEC if founder-relevant) and update
|
||||
`integrations/executor-cutover-runbook.md`.
|
||||
Done when: doc reviewed against AutonomyPolicy + mailscan two-phase design.
|
||||
|
||||
## Task: Continuous consumer on Railiance
|
||||
## Task: Implement hosted triage path in agent-harness
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T02
|
||||
|
|
@ -52,10 +81,18 @@ priority: high
|
|||
state_hub_task_id: "00439d4e-d6ee-4cbc-98e2-431eca4651fe"
|
||||
```
|
||||
|
||||
Implement the chosen path: systemd/k8s poller loop, not `sleep infinity`.
|
||||
Health metrics + logs under `~/.cache/binky-control/rhythm/`.
|
||||
In **agent-harness** (implementation repo; this WP tracks binky integration):
|
||||
|
||||
## Task: Agentic runtime on railiance01
|
||||
1. `LlmConnectHttpAdapter` (or client matching activity-core `llm_client.py`)
|
||||
using `LLM_CONNECT_URL`.
|
||||
2. `mail-triage` command: read report → prompt → parse JSON → apply to
|
||||
`mailmeta/mail-log.md` + queues → local commit → hub event.
|
||||
3. Server profile default: **never** require `claude` CLI.
|
||||
4. Tests with fixture CSV + mock HTTP llm-connect.
|
||||
|
||||
Done when: unit tests green; dry-run docs for railiance.
|
||||
|
||||
## Task: Wire OpenRouter model profile on railiance llm-connect
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T03
|
||||
|
|
@ -64,11 +101,21 @@ priority: high
|
|||
state_hub_task_id: "1f82c8e0-945e-44b6-a5dc-22dd055e751d"
|
||||
```
|
||||
|
||||
Install and auth Claude Code (or approved hosted agentic adapter) on
|
||||
railiance01 so `run-daily.sh` / `run-review.sh` exit 0 unattended. Document
|
||||
in `integrations/executor-worker-secrets.md` if new secret lanes appear.
|
||||
On railiance01 activity-core llm-connect ConfigMap (and optional dedicated
|
||||
profile env for rhythm):
|
||||
|
||||
## Task: Retire dual scheduling
|
||||
- Confirm OpenRouter secret still healthy (no values in git/chat).
|
||||
- Choose cost-efficient model (open-weights preferred; document choice and
|
||||
$/MTok rationale).
|
||||
- Smoke: in-cluster request from a Job to llm-connect with a tiny prompt.
|
||||
- Expose URL to host timers if host-run:
|
||||
`LLM_CONNECT_URL=http://…` via cluster DNS or port-forward service policy
|
||||
(prefer **in-cluster CronJob** over host if possible).
|
||||
|
||||
Done when: smoke OK; ConfigMap change committed in llm-connect/activity-core
|
||||
overlays as appropriate.
|
||||
|
||||
## Task: Railiance schedule uses llm path; drop Claude residual
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T04
|
||||
|
|
@ -77,17 +124,33 @@ priority: medium
|
|||
state_hub_task_id: "2093bf62-20ef-4d3e-9b91-be77a38603f7"
|
||||
```
|
||||
|
||||
Once T01–T03 proven for three business days: remove host timers **or**
|
||||
disable redundant activity-core schedules so only one cadence owner remains.
|
||||
Update OperatingRhythm.md.
|
||||
Update `scripts/railiance-rhythm/run-mail.sh` to call `mail-scan` then
|
||||
`mail-triage` (llm-connect), remove `require_claude` for mail. Prefer
|
||||
migrating daily/review similarly or keep them laptop-optional until T05.
|
||||
|
||||
## Task: Closure
|
||||
Update OperatingRhythm.md + executor-cutover-runbook residual section:
|
||||
**no coding agent on railiance**.
|
||||
|
||||
## Task: Daily/review via llm-connect (optional same WP if small)
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T05
|
||||
status: todo
|
||||
priority: low
|
||||
priority: medium
|
||||
state_hub_task_id: "503ff56b-ac38-44b0-911e-937e0c2fc089"
|
||||
```
|
||||
|
||||
Mark finished; log milestone; `statehub fix-consistency`.
|
||||
Extend the same pattern to daily brief + weekly review prep: structured
|
||||
generation via llm-connect + deterministic markdown apply + commit. If scope
|
||||
grows, spawn BINKY-WP-0007 and mark this task done with handoff.
|
||||
|
||||
## Task: Closure
|
||||
|
||||
```task
|
||||
id: BINKY-WP-0006-T06
|
||||
status: todo
|
||||
priority: low
|
||||
```
|
||||
|
||||
Three clean unattended mail cycles on railiance (scan+triage); milestone;
|
||||
`statehub fix-consistency`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue