Enable kaizen agents to run on a regular cadence against a preselected repo roster, orchestrated by activity-core and prepared by kaizen-agentic — without this repo owning cron, Temporal workers, or an LLM runtime. CLI + module: - src/kaizen_agentic/schedule.py — .kaizen/schedule.yml parse/validate/scaffold - `kaizen-agentic schedule` group: init, validate, list, prepare <agent> (prepare bundles agent prompt + memory + metrics + repo pointers, offline) - tests/test_schedule_cli.py — 15 tests Contract & design: - ADR-005 scheduled agent execution; schema doc + example manifest - discover_kaizen_scheduled_repos resolver spec, state-hub roster fields, kaizen.schedule.prepared event payload, activity-core handoff checklist - INTEGRATION_PATTERNS Pattern 2 extended with roster model ActivityDefinition drafts (enabled: false): - weekly-coach-orientation, weekly-optimization-review Docs: agency-framework, CLI cheat sheet, PACKAGE_RELEASE runner prereqs, EcosystemIntegration, CHANGELOG, TODO. Workplan closed (status: done). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
94 lines
2.9 KiB
Markdown
94 lines
2.9 KiB
Markdown
# `.kaizen/schedule.yml` Schema
|
|
|
|
The schedule manifest declares which kaizen agents run on what cadence in an
|
|
opted-in repo. It is the repo-local half of the scheduled-agent-execution
|
|
contract (ADR-005). activity-core reads it (via the roster resolver) to fire
|
|
recurring tasks; `kaizen-agentic schedule prepare` reads it indirectly by
|
|
preparing per-agent orientation.
|
|
|
|
Canonical example: [`docs/examples/.kaizen/schedule.yml`](../examples/.kaizen/schedule.yml).
|
|
|
|
## Location
|
|
|
|
```
|
|
<project-root>/.kaizen/schedule.yml
|
|
```
|
|
|
|
Lives alongside `.kaizen/agents/` (memory) and `.kaizen/metrics/`. Like those,
|
|
its presence is the **opt-in signal** for fleet scheduling.
|
|
|
|
## Fields
|
|
|
|
| Key | Required | Type | Default | Notes |
|
|
|-----|----------|------|---------|-------|
|
|
| `version` | yes | string | — | Must be `"1"` |
|
|
| `timezone` | no | string | from ActivityDefinition | IANA tz, e.g. `Europe/Berlin` |
|
|
| `agents` | yes | mapping | — | `agent-name → settings` |
|
|
| `agents.<name>.cadence` | yes | enum | — | `daily` \| `weekly` \| `monthly` |
|
|
| `agents.<name>.cron` | no | string | cadence default | 5-field cron expression |
|
|
| `agents.<name>.enabled` | no | bool | `true` | Set `false` to declare but pause |
|
|
|
|
## Example
|
|
|
|
```yaml
|
|
version: "1"
|
|
timezone: Europe/Berlin
|
|
agents:
|
|
coach:
|
|
cadence: weekly
|
|
cron: "0 9 * * 1"
|
|
enabled: true
|
|
optimization:
|
|
cadence: weekly
|
|
cron: "0 10 * * 1"
|
|
enabled: true
|
|
tdd-workflow:
|
|
cadence: monthly
|
|
enabled: false
|
|
```
|
|
|
|
## Validation
|
|
|
|
```bash
|
|
kaizen-agentic schedule validate
|
|
```
|
|
|
|
Errors are emitted with actionable messages and a non-zero exit code:
|
|
|
|
- Missing or non-`"1"` `version`.
|
|
- `agents` not a mapping, or no agents declared.
|
|
- An agent name that is **not** installed or packaged (typo guard).
|
|
- A `cadence` outside `daily` / `weekly` / `monthly`.
|
|
- Duplicate agent entries.
|
|
|
|
Only agents available to the project (installed under `agents/` or packaged in
|
|
the distribution) may appear in a schedule.
|
|
|
|
## Scaffolding
|
|
|
|
```bash
|
|
kaizen-agentic schedule init # defaults: coach + optimization weekly
|
|
kaizen-agentic schedule init --timezone UTC # override timezone
|
|
kaizen-agentic schedule init --force # overwrite existing
|
|
```
|
|
|
|
The default scaffold enables `coach` and `optimization` weekly and declares
|
|
`tdd-workflow` monthly but **disabled** (operator opts in deliberately).
|
|
|
|
## Listing
|
|
|
|
```bash
|
|
kaizen-agentic schedule list # enabled entries only
|
|
kaizen-agentic schedule list --all # include disabled
|
|
```
|
|
|
|
## Relationship to activity-core
|
|
|
|
The `cron` field is an **optional per-repo override**. When omitted, the cadence
|
|
maps to the default cron declared in the matching ActivityDefinition (e.g.
|
|
`weekly-coach-orientation` fires Mon 09:00). This keeps fleet-wide timing in one
|
|
place while letting individual repos shift their slot.
|
|
|
|
See [ADR-005](../adr/ADR-005-scheduled-agent-execution.md) and
|
|
[INTEGRATION_PATTERNS.md Pattern 2](../INTEGRATION_PATTERNS.md).
|