feat: advance LOOP-WP-0002/0003/0004 without activity-core blockers

Document event payload contract, draft disabled ActivityDefinitions for
CI/regulator/registry hygiene, initialize loop health snapshots and
regulator dashboard, record DEC-005 kaizen-stack promotion, and close
supplier-independent workplan tasks.
This commit is contained in:
2026-06-18 13:10:59 +02:00
parent f678473892
commit 169a71f3e3
21 changed files with 513 additions and 30 deletions

View File

@@ -1,4 +1,10 @@
loop: quality-escalation
phase: bootstrap
cron: "45 * * * *"
regulator_approval: pending
event_primary: low-success-rate-review
sweep_fallback: hourly-metrics-health-sweep
stabilize_target:
event: enabled
sweep_cron: "0 6 * * *"
regulator_approval: pending
notes: Event path blocked on activity-core R1; hourly sweep ready as fallback

View File

@@ -0,0 +1,60 @@
# Event payload contract — `kaizen.metrics.recorded`
Customer contract for LOOP-WP-0002 T03. Supplier implementation:
`kaizen-agentic metrics record --emit-event` (shipped KAIZEN-WP-0008 T03).
## NATS subject
```
activity.kaizen.metrics.recorded
```
## Envelope (activity-core EventEnvelope)
```json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "kaizen.metrics.recorded",
"version": "1.0",
"timestamp": "2026-06-18T12:00:00Z",
"publisher": "kaizen-agentic",
"attributes": {
"agent": "coach",
"project": "kaizen-agentic",
"summary": {
"success_rate": 0.75,
"execution_count": 12,
"avg_quality": 0.81
}
}
}
```
### Attribute fields
| Field | Type | Notes |
|-------|------|-------|
| `agent` | string | Agent from `metrics record <agent>` |
| `project` | string | Repo slug (`KAIZEN_PROJECT_SLUG` or directory basename) |
| `summary.success_rate` | float | Rolling rate from `summary.json` after append |
| `summary.execution_count` | int | Total executions |
| `summary.avg_quality` | float | From `avg_quality_score` in ADR-004 summary |
## ActivityDefinition binding
`low-success-rate-review` uses `type: event-payload``context.metrics`.
Rule evaluates `context.metrics.summary.success_rate` (requires activity-core R1).
## CLI (target repo)
```bash
kaizen-agentic metrics record coach --success --time 120 --quality 0.9 --emit-event
```
Requires `pip install 'kaizen-agentic[events]'` and `NATS_URL`.
## Related
- Supplier spec: `kaizen-agentic/docs/integrations/kaizen-metrics-recorded-event.md`
- Thresholds: `loops/quality-escalation/thresholds.yml`
- Definition: `activity-definitions/low-success-rate-review.md`

View File

@@ -0,0 +1 @@
{"timestamp":"2026-06-18T10:16:00Z","loop":"quality-escalation","phase":"bootstrap","tasks_created":0,"manual_rescues":0,"false_positive_rate":null,"notes":"Event path blocked on activity-core R1; sweep definition ready, disabled"}