Date: 2026-06-26
This document tracks how close the current implementation is to the intended Kaizen Agents flow.
GitHub Issue
-> kaizen-loop
-> builder-agent
-> mechanical verification
-> verifier
-> pull request
-> human merge
-> post-merge dogfood/shared-skill sync PRs when shared contracts changed
-> local fleet refresh through kaizen fleet on runner machines
-> next scheduled monitor / maintenance run
The intended product outcome is a high-quality PR that a human maintainer can review and merge to resolve the original issue, followed by deterministic propagation and the next scheduled check.
The first usable target flow is now wired together, but it is still an MVP. The current work is about hardening contracts, improving evidence quality, and expanding the verifier beyond the minimal verdict CLI.
| Component | Current state | What works | Main gap |
|---|---|---|---|
kaizen-loop |
Phase 2 TypeScript CLI exists. | Issue selection, isolated per-issue worktrees, builder-agent-based fixes, configured verification, verifier review, scheduler registration, opt-in queueing, PR creation, pr-guardian follow-up, fleet refresh, and operational commands. |
Continue hardening retry behavior, observability, and final contract edges. |
builder-agent |
MVP CLI and Codex skill are shipped on main. |
Adapter-based analyze -> plan -> implement -> selfReview -> improve loop, schemas, CLI, tests, and Kaizen integration payloads. |
Continue improving adapter behavior and the quality of artifacts consumed by kaizen-loop and verifier. |
verifier |
MVP verifier check CLI is shipped on main. |
Kaizen integration payloads with open_pr, open_pr_with_warning, block_pr, and needs_context. |
The fuller staged verifier from the design docs is future work. |
Implemented capabilities include:
- GitHub Issue selection by label
- isolated per-issue workspace and branch setup
- builder-agent-based fixes through the integration contract
- Claude/Codex agent execution through configured adapters
- baseline verification
- verification retry loop
- configured
lint/typecheck/test/buildcommand execution - verifier review
- scheduler registration
- PR creation
pr-guardianfollow-up after PR creation- fleet refresh for registry, workspaces, labels, scheduler jobs, and stale locks after dogfood changes
- opt-in issue queueing with repository-configured execution authorization labels when available
- policy-based direct commit decision logic
- operational commands such as
doctor,status,logs, andreport
Current limitation:
- The builder and verifier contracts are MVP contracts and still need hardening.
- The verifier step is a minimal verdict gate, not the full staged verifier described in the product design.
kaizen watchremains a later-phase capability; current automatic issue processing is handled by named scheduler jobs.
Implemented loop edges include:
- the organization monitor creates focused
[monitor]issues with thekaizenlabel - target repository maintenance jobs select those issues and open ready-for-review PRs
- source contract changes merged into
.github/maintrigger deterministic target sync PRs for managed dogfood files - shared-skill-only changes merged into
.github/maintrigger the narrower shared-skill sync PRs - operators can refresh post-merge runtime state with
kaizen fleet --manifest ~/.kaizen/fleet.yml --prune --verify, which preflights the authoritative four-repository inventory before rebuilding registry entries, ensuring workspaces and labels, syncing scheduler jobs, repairing stale locks when requested, and running configured setup/verify commands. Organization monitor automation may inspect only the corresponding--dry-run --jsonplan - the next Codex monitor and
kaizen-loopmaintenance schedules re-check the updated repositories
Implemented capabilities include:
- standalone
builder-agentCLI - Codex-compatible builder skill
- adapter-based implementation loop
- structured build request normalization
- structured self-review normalization
- structured build result artifacts
- passing tests for the loop controller and CLI
- Kaizen integration mode that writes the result contract expected by
kaizen-loop
Current limitation:
- It depends on an adapter to perform actual implementation work.
- Its artifacts and discovered-issue reports still need more production mileage across repositories.
Implemented capabilities include:
- runnable
verifier checkCLI - minimal JSON verdict output
- Kaizen integration mode through
KAIZEN_VERIFIER_RESULT_PATH - current status vocabulary:
open_pr,open_pr_with_warning,block_pr, andneeds_context - product/spec documentation, design documentation, and evaluation harness specification
Current limitation:
- The shipped verifier intentionally does not implement the full staged verifier from
docs/. - Advanced review stages, probes, and richer scoring remain future work.
The main missing pieces are no longer the builder/verifier executables. The remaining work is contract depth, evidence quality, and operational maturity.
flowchart TB
A["GitHub Issue"] --> B["kaizen-loop"]
B --> C["builder-agent"]
C --> D["Mechanical verification"]
D --> E["verifier MVP gate"]
E --> F["PR / repository policy"]
C -. harden .-> G["builder artifacts"]
E -. future .-> H["staged verifier review"]
F -. harden .-> I["observability and follow-up"]
The system can now run:
Issue -> builder-agent -> mechanical verification -> verifier MVP -> PR
It still needs more work before claiming:
Issue -> high-confidence staged verifier review -> mature feedback loops -> consistently high-quality PR
- Keep the
builder-agentandverifierCLI contracts stable acrosskaizen-loopreleases. - Improve builder artifacts consumed by the verifier:
- task understanding
- changed files
- self-review report
- residual risk
- Expand verifier behavior beyond the minimal MVP gate:
- input: task, diff, verification logs, builder report
- output status:
open_pr,open_pr_with_warning,block_pr, orneeds_context - include
must_fix,should_fix,confidence, andrisk
- Route
block_prfeedback back to the builder loop until retry budget is exhausted. - Route
needs_contextto a human clarification path. - Keep the default integrated mode PR-first and ready-for-review.
- Run repeated end-to-end smoke tests on small issues across the core repositories.
The first acceptance test should prove this path:
- Create a small issue in a test repository.
- Run
kaizen run --issue <number>. - Confirm
builder-agentproduces a build result and self-review report. - Confirm mechanical verification runs.
- Confirm
verifierreturns a gate verdict. - Confirm
kaizen-loopcreates a PR. - Confirm the PR body includes:
- original issue
- builder summary
- verification results
- verifier verdict
- known risk
The first successful version does not need direct commit support. PR creation and human merge are the product goal.