kaizen-agentic/docs/integrations/activity-core-handoff-wp0006.md
tegwick d691135c4a
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
docs: consolidate agent execution and custody
2026-08-20 22:43:55 +02:00

4.6 KiB
Raw Blame History

activity-core Handoff — Scheduled Agent Execution (WP-0006)

Historical supplier handoff, completed for the initial resolver/pilot path. The current production composition is activity-core durable ops_run work claimed by rein-aharness through its generic agent-session approach. The resolver and preparation contracts below remain compatible inputs.

Coordination checklist for the activity-core team to enable kaizen scheduled agent runs. kaizen-agentic owns the schedule contract, the prepare CLI, and the ActivityDefinition drafts; activity-core owns the resolver, schedule firing, and durable work creation (repo boundary, ADR-005); rein-aharness owns governed execution.

Open this as an activity-core issue/PR titled "Enable kaizen scheduled agent execution (WP-0006)" and track the boxes there.

What kaizen-agentic ships (done in this repo)

What activity-core must do

  • Implement resolver discover_kaizen_scheduled_repos per the spec (activity_core/context_resolvers/kaizen.py).
  • Add resolver unit teststests/test_kaizen_context_resolver.py (7 passed).
  • Copy custodian weekly definitions from docs/integrations/activity-definitions/ (weekly-coach-orientation.md, weekly-optimization-review.md) into the activity-core catalog path (per ACT-ADR-002). Deferred: coulomb-loop engagement ships customer-owned daily bootstrap definitions instead (LOOP-WP-0001).
  • Register weekly definition slugs in the activity-core index (when custodian fleet moves off coulomb engagement copies).
  • Run make sync-activity-definitions — coulomb-loop definitions synced (coulomb-hourly-coach-orientation, coulomb-hourly-optimization-review, etc.).
  • Wire cron triggers — daily stabilize chain on pilot roster (08:0010:00).
  • Smoke test — resolver dry-run returns 6 scheduled_runs on coulomb roster; schedule prepare coach succeeds on kaizen-agentic and the-custodian.
  • Enable gradually — coulomb bootstrap definitions enabled: true on pilot.
  • Verify runner prerequisiteskaizen-agentic on PATH; KAIZEN_RUNNER_HOST set on worker (bnt-lap001).

Supplier closure evidence (2026-06-18)

Check Result
Resolver dry-run (coulomb roster, cadence: daily) 6 runs across 3 pilot repos
tests/test_kaizen_context_resolver.py 7 passed
schedule validate + prepare coach OK on kaizen-agentic, the-custodian, activity-core
Live definitions using resolver f234bb1a coach, 097fc027 optimization (enabled)

Remaining activity-core item: optional custodian-fleet weekly templates (enabled: false in kaizen-agentic drafts) when engagement moves beyond coulomb-loop bootstrap copies.

State Hub team (the-custodian)

  • Optional: add kaizen_schedule_enabled repo flag + GET /repos/ filter (v2 pre-filter; the repo file remains the source of truth).

Smoke test (manual reference path)

cd /path/to/pilot-repo
kaizen-agentic schedule init            # if not already present
kaizen-agentic schedule validate        # exit 0
kaizen-agentic schedule list            # shows coach + optimization enabled
kaizen-agentic schedule prepare coach   # non-empty orientation bundle

Then in activity-core: run the resolver (dry-run) and confirm one scheduled_run per enabled (repo, agent) with a correct prepare_command. For unattended operation, confirm the resulting ops_run is claimable and the rein-aharness worker selects the agent-session approach before enabling the schedule broadly.

Pilot roster

  • kaizen-agentic (dogfood)
  • the-custodian (hub operator)
  • one additional custodian-domain repo with .kaizen/ state (TBD at pilot time)