docs: consolidate agent execution and custody
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
ci / test (push) Successful in 52s

This commit is contained in:
tegwick 2026-08-20 22:43:55 +02:00
parent 6ed5708c21
commit d691135c4a
19 changed files with 372 additions and 64 deletions

View file

@ -37,14 +37,36 @@ end-to-end flow:
```
activity-core cron
→ context resolver (roster ∩ repos with schedule.yml)
task per (repo, agent)
coding-agent session runs `kaizen-agentic schedule prepare <agent>`
durable work per (repo, agent)
governed runner executes `kaizen-agentic schedule prepare <agent>`
→ session executes the agent instructions in that repo
```
kaizen-agentic's responsibilities are exactly two: **declare** the schedule
(`.kaizen/schedule.yml`) and **prepare** an orientation bundle for a run. It
does **not** fire cron, create tasks, or invoke Claude.
does **not** fire cron, own the durable work queue, or invoke an LLM.
### Current runtime realization (2026-08-20)
The initial contract above remains valid, but the generic word “task” now has a
specific durable implementation:
```
activity-core Temporal schedule/event
→ rule evaluation and eligibility
→ unique, idempotent ops_run with lease/retry state
→ rein-aharness claim loop
→ agent-session approach and governed runtime/profile resolution
→ kaizen-agentic schedule prepare <agent>
→ bounded coding-agent session
→ ops_run result + State Hub progress + .kaizen metrics/artifact evidence
```
`activity-core` owns schedule and durable work state. `rein-aharness` owns
claiming, execution policy, credential routing, runtime selection, and bounded
session operation. Kaizen Agentic continues to own declaration, agent craft,
preparation, and improvement evidence. A human-started coding-agent session
remains a supported execution mode and reference smoke path.
### 1. Schedule manifest — `.kaizen/schedule.yml`
@ -123,10 +145,13 @@ kaizen-agentic schedule prepare <agent> [--target PATH] [--format markdown|json]
## Boundaries
- **No scheduling code** in kaizen-agentic. Cron and task creation belong to
activity-core; the roster query belongs to state-hub.
- **No scheduling or durable-queue code** in kaizen-agentic. Temporal schedules,
rule evaluation, and `ops_run` state belong to activity-core; the roster query
belongs to State Hub.
- **No LLM invocation.** `prepare` produces a runner-agnostic bundle; a human or
automated coding-agent session executes it.
rein-aharness-governed coding-agent session executes it.
- **No runtime authority or credentials.** Those remain with rein-aharness and
the ecosystem credential/authorization owners.
- **State-hub schema changes** (roster opt-in flag) are designed here but
implemented in `the-custodian` (repo boundary).
@ -134,7 +159,7 @@ kaizen-agentic schedule prepare <agent> [--target PATH] [--format markdown|json]
- Operators declare per-repo schedules and a fleet roster without tribal
knowledge.
- activity-core can fire recurring tasks referencing `schedule prepare`.
- activity-core can fire recurring durable work referencing `schedule prepare`.
- A scheduled session opens with full orientation (prompt + memory + metrics).
- The existing `weekly-metrics-optimize` definition (ADR-004 / WP-0004) remains
complementary; an `optimization` agent run may chain `schedule prepare

View file

@ -127,16 +127,21 @@ should amend this ADR (or a successor), not re-open DEC-FDA-001 silently.
### Negative / trade-offs
- Pilot vault currently sits in the supplier repo (`engagements/pilots/`) — must
still be treated as client confidential; export to client repo is recommended
before multi-tenant growth
- activity-core automation for host duties is optional Phase 3 (manual prepare OK)
- Pilot vault currently sits in the supplier repo (`engagements/pilots/`) under
transitional custody. The Railiance01 receiving authority is
`railiance-infra`; transfer requires explicit receiver acceptance before the
supplier copy is removed or reduced to a pointer.
- Manual preparation remains supported. Unattended host duties require an
engagement-specific activity-core definition and a rein-aharness execution
profile in addition to the generic `ops_run`/`agent-session` path.
- Kai is not a payment processor; EUR path remains future work
### Follow-ups
- Export pilot vault to client-owned path when railiance ops repo is ready
- Optional activity-core ActivityDefinitions for daily host-operator prepare
- Complete the proposed pilot transfer to the client-owned `railiance-infra`
evidence path and record its accepted commit
- Register engagement-specific activity-core definitions and rein-aharness
profile for daily host-operator preparation when unattended operation is desired
- EUR commercial FX after 23 engagement calibration cycles
## Pilot evidence