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

@@ -0,0 +1,2 @@
{"timestamp":"2026-06-18T10:06:00Z","loop":"kaizen-improvement-stack","phase":"bootstrap","tasks_created":12,"tasks_completed":null,"manual_rescues":0,"false_positive_rate":0.0,"agent_success_rate":0.85,"mean_session_time_sec":104,"cost_signal":12,"notes":"3/3 E2E cycles; final cycle metrics 6+3+3 tasks"}
{"timestamp":"2026-06-18T10:16:00Z","loop":"kaizen-improvement-stack","phase":"stabilize","tasks_created":null,"tasks_completed":null,"manual_rescues":0,"false_positive_rate":0.0,"agent_success_rate":0.85,"mean_session_time_sec":103,"cost_signal":null,"notes":"Promoted to daily 08/09/10 per DEC-005"}

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"}

View File

@@ -0,0 +1,6 @@
loop: registry-hygiene
phase: bootstrap
cron: "20 * * * *"
batch_size: 3
regulator_approval: pending
notes: Hourly round-robin on custodian pilot slice; delegate SBOM to activity-core job

View File

@@ -0,0 +1 @@
{"timestamp":"2026-06-18T10:16:00Z","loop":"registry-hygiene","phase":"bootstrap","tasks_created":0,"manual_rescues":0,"notes":"T01 signals/rollout committed; sweep disabled pending shell resolver"}

View File

@@ -0,0 +1,25 @@
version: "1"
batch_size_hourly: 3
domains:
- slug: custodian
phase: pilot
repos:
- kaizen-agentic
- the-custodian
- activity-core
- slug: helix_forge
phase: queued
repos:
- reuse-surface
- slug: stack
phase: queued
repos:
- artifact-store
- open-reuse
- slug: coulomb_social
phase: queued
repos:
- vergabe-teilnahme
expansion_after: LOOP-WP-0003 bootstrap exit + LOOP-WP-0004 regulator approval

View File

@@ -0,0 +1,6 @@
{
"cursor_domain": "custodian",
"cursor_index": 0,
"last_run": null,
"last_batch": []
}

View File

@@ -0,0 +1,27 @@
# scope-analyst hygiene session template
LOOP-WP-0003 T03 — standard task for registry/orientation hygiene.
## Prepare
```bash
kaizen-agentic schedule prepare scope-analyst --target <pilot-repo-root>
```
## Session steps
1. Read `SCOPE.md` and `INTENT.md` in target repo
2. Compare scope to actual repo purpose; update if stale (>90d or drift)
3. Run `reuse-surface validate` in target repo
4. If registry gaps: `reuse-surface establish --publish-check` (when touching registry)
5. If `sbom_age_days > 30`: link to activity-core `weekly-sbom-staleness` — do not rescan
6. File state-hub progress event on hygiene completion
## Labels
`fleet-hygiene`, `coulomb-loop`, `scope-analyst`
## Reference
- Signals: `loops/registry-hygiene/signals.yml`
- Rollout: `loops/registry-hygiene/rollout.yaml`

View File

@@ -0,0 +1,32 @@
version: "1"
signals:
registry_gap:
source: reuse-surface report gaps
action: scope-analyst session + establish --publish-check when registry touched
priority: medium
empty_capability_scaffold:
source: federation roster capability_count 0
action: draft capability entry or mark intentional
priority: low
stale_scope:
source: SCOPE.md mtime > 90d or missing
action: scope-analyst refresh
priority: medium
stale_sbom:
source: state-hub repo_sbom_status sbom_age_days
threshold_days: 30
action: link to activity-core weekly-sbom-staleness (do not duplicate scan)
priority: medium
delegate_definition: weekly-sbom-staleness
labels: [fleet-hygiene]
publish_check_fail:
source: federation roster publish_check fail
action: registry fix task
priority: high
sbom_handoff:
owner: activity-core
definition: weekly-sbom-staleness
cron: "0 9 * * 1"
hygiene_role: flag_and_link_only

View File

@@ -0,0 +1,21 @@
# Loop regulator dashboard
Regenerated 2026-06-18 (manual bootstrap collection, LOOP-WP-0004 T05).
## Summary
| Loop | Phase | Last health | Agent success | Manual rescues | Notes |
|------|-------|-------------|---------------|----------------|-------|
| kaizen-improvement-stack | stabilize | 2026-06-18T10:16Z | 0.85 | 0 | 3/3 E2E exit; daily crons active |
| quality-escalation | bootstrap | 2026-06-18T10:16Z | — | 0 | Waiting on event-payload R1 |
| registry-hygiene | bootstrap | 2026-06-18T10:16Z | — | 0 | Artifacts ready; sweep disabled |
## Pending regulator actions
- **quality-escalation:** hold at bootstrap until `low-success-rate-review` smoke passes
- **registry-hygiene:** manual scope-analyst smoke on pilot slice (T05) before enable
- **kaizen-improvement-stack:** monitor first daily cron cycle (08:00 metrics chain)
## Promotion queue
None — kaizen stack promoted 2026-06-18 (DEC-005).

View File

@@ -0,0 +1,43 @@
# Regulator session template (optimization agent)
LOOP-WP-0004 T04 — run after health collector or manual bootstrap-log review.
## Prepare bundle
```bash
# From coulomb-loop (contracts only — optimization agent runs in target repo)
kaizen-agentic schedule prepare optimization --target /home/worsch/kaizen-agentic
```
Include in session context (attach or paste):
- `loops/regulator/dashboard.md`
- Tail of each `loops/*/health.jsonl` (last 10 lines)
- Each `loops/*/cadence.yml`
- `loops/kaizen-stack/bootstrap-log.md` (manual_rescues)
- `loops/kaizen-stack/supplier-notes.md`
## Session outputs
1. **Per loop:** promote / hold / demote recommendation with evidence
2. **Noise:** definitions or crons to disable or throttle
3. **Supplier friction:** items for `supplier-notes.md`
4. **Proposals:** updated `cadence.yml` drafts (human commits — no autonomous cron changes)
## Session close
```bash
kaizen-agentic metrics record optimization --success --time <s> --quality <0-1> \
--target /home/worsch/kaizen-agentic
```
Record decision in state-hub when promotion/demotion approved.
## Promotion checklist (all must hold)
- Bootstrap exit from source workplan met
- `false_positive_rate < 0.2` over last 7 cycles
- `manual_rescues == 0` over last 3 cycles
- Regulator recommends promote
See `loops/regulator/state-machine.md`.

View File

@@ -0,0 +1,53 @@
# Supplier customer-repo playbook draft
LOOP-WP-0004 T07 — customer synthesis for kaizen-agentic reuse. **Absorbed into
supplier playbook v1** (`kaizen-agentic/docs/integrations/customer-engagement-playbook.md`).
This file records coulomb-loop-specific evidence and open gaps.
## Minimal customer repo layout
```
INTENT.md SCOPE.md workplans/LOOP-WP-*
docs/adr/ docs/decisions/ history/
activity-definitions/ loops/<loop-id>/
```
## Bootstrap checklist (proven on coulomb-loop)
1. Register in state-hub (`coulomb_social`)
2. LOOP-WP-0000 — ADRs, DEC-001004, roster
3. Pilot `schedule init --engagement` on target repos
4. Copy ActivityDefinitions; enable incrementally (metrics → coach → optimization)
5. 3/3 hourly E2E cycles → regulator promotes to daily
6. `metrics record --emit-event` for event-driven quality path
## Cadence ramp template
| Phase | Mechanism | Exit |
|-------|-----------|------|
| bootstrap | hourly crons | 3 consecutive E2E cycles, 0 manual rescues |
| stabilize | daily | 14 cycles, FP rate < 20% |
| operate | weekly | regulator approval |
Per-loop state: `loops/<id>/cadence.yml`
## Supplier / customer boundary
| Customer (coulomb-loop) | Supplier (kaizen-agentic) |
|---------------------------|---------------------------|
| Roster, cadence policy, definitions | Agents, CLI, emit-event, playbook |
| Loop health, supplier-notes | ADR-005/006 contracts |
| activity-core handoff docs | Resolver specs posted to state-hub |
## Open supplier gaps (2026-06-18)
| Gap | Owner | Status |
|-----|-------|--------|
| `event-payload` resolver | activity-core | R1 posted to hub inbox |
| `metrics rotation-signals` CLI | kaizen-agentic | ADR-004 follow-on |
| CI failure probe resolver | activity-core | LOOP-WP-0002 T06 deferred |
| Shell `reuse_surface_report_gaps` | activity-core | LOOP-WP-0003 T02 |
## Reuse target
Second customer engagement ≤50% setup effort vs coulomb-loop bootstrap.