Files
kaizen-agentic/wiki/EcosystemIntegration.md
tegwick bd74d7d122 Document measurement loop plan and ecosystem integration strategy.
Persist INTENT and ecosystem assessments in history/, add ADR-004 for
project metrics with Helix Forge correlation, and register WP-0003 and
WP-0004 workplans with State Hub. Update SCOPE, README, and agency-framework
docs to reflect the two-layer measurement model.
2026-06-16 01:34:13 +02:00

162 lines
5.4 KiB
Markdown

# Ecosystem Integration
*How KaizenAgentic composes with adjacent repositories*
KaizenAgentic (`INTENT.md`) defines a **meta-improvement layer** for coding
agents. No single repository implements the full vision. This document describes
the **two-layer measurement model** and integration contracts with ecosystem
repos.
---
## Two-Layer Measurement Model
| Layer | Question answered | Owner | Storage |
|-------|-------------------|-------|---------|
| **Project** | How is this *agent persona* performing in *this repo*? | kaizen-agentic | `.kaizen/metrics/<agent>/` |
| **Fleet** | How are coding sessions performing *across repos*? | agentic-resources | Helix Forge digest store + baselines |
```
Coding session (Claude / Codex / Grok)
├──────────────────────────────────────┐
▼ ▼
agentic-resources kaizen-agentic
(Helix Forge) (session close)
Capture → Digest → Fleet metrics metrics record → executions.jsonl
│ │
└──────── helix_session_uid ───────────┘
(optional link)
```
### When to use which layer
- **Project metrics** — optimizer recommendations, Coach briefs, per-agent
kaizen loop in one codebase (ADR-004).
- **Fleet metrics** — cross-repo friction analysis, pattern distribution,
weekly retro, tooling decisions (Helix Forge PRD).
Kaizen-agentic does not re-implement session JSONL ingestion. It may **cite**
Helix session UIDs on project execution records for correlation.
---
## Integration Partners
### agentic-resources (P0)
**Helix Forge** — session capture, fleet aggregates, baselines, weekly retro.
| KaizenAgentic | Helix Forge |
|---------------|-------------|
| `.kaizen/metrics/<agent>/executions.jsonl` | Digest store + `measure/baselines.jsonl` |
| Per-agent persona outcomes | Per-session cross-repo outcomes |
| `kaizen-agentic metrics optimize` | `session_memory/measure/` aggregates |
**Correlation fields** (ADR-004): `helix_session_uid`, `repo`, `flavor`,
`tokens`, `infra_overhead_share`.
**Workplan:** KAIZEN-WP-0004 Part 1.
### activity-core (P1)
**Event bridge** — scheduled and event-driven task creation.
Example ActivityDefinitions (after metrics CLI ships):
- Weekly: run `kaizen-agentic metrics optimize` on repos with `.kaizen/`
- On low success_rate threshold: create review task in issue-core
- Post agent install: verify metrics scaffold exists
**Workplan:** KAIZEN-WP-0004 Part 2.
### artifact-store (P1)
**Evidence retention** — durable registry for generated outputs.
Register after optimizer runs:
- `optimizer/analysis.json`
- `recommendations.jsonl` snapshots
- E2e pilot evidence packages
Retention class: `raw-evidence` (180d default, aligned with ADR-004).
**Workplan:** KAIZEN-WP-0004 Part 3.
### info-tech-canon (P2)
**Semantic canon** — agent briefs, patterns, profiles, validation.
- Map `KaizenAgentTemplate.md` → InfoTechCanon profile format
- Publish compact agent briefs per persona
- Extend `kaizen-agentic validate` with canon conformance checks
**Workplan:** KAIZEN-WP-0004 Part 4.
### phase-memory (P2, future)
**Memory graphs** — upgrade from flat `memory.md` to phased memory profiles.
- Fluid memory → project session paths
- Stabilized memory → accumulated findings with provenance
- Context packages for Coach brief compilation
No WP-0003 blocker; plan after ecosystem integration baseline.
### kontextual-engine (P2)
**Knowledge operations** — ingest `wiki/` and agent definitions as governed
assets; runtime for KaizenGuidance catalog when built.
### llm-connect (P3)
**LLM abstraction** — use when Coach/optimizer synthesis becomes automated
beyond CLI context assembly. Token metrics align with wiki pricing tiers.
### domain-tree (P3)
Register kaizen-agentic and agent categories with primary/secondary domain
bindings when capability catalog matures.
### identity-canon (P3)
Terminology for agent persona vs deployed instance vs session actor —
supports "digital talent agency" framing without overloading "user".
### tele-mcp (TBD)
Listed on Forgejo; not cloned locally. Candidate telemetry MCP adapter for
WP-0001 T04. Assess before depending on it.
---
## Boundary Rules
1. **kaizen-agentic owns** agent definitions, `.kaizen/` conventions, CLI,
Coach/optimizer personas, and product framing (`INTENT.md`, `wiki/`).
2. **kaizen-agentic does not own** session transcript ingestion, task
scheduling, artifact bytes, knowledge graph runtime, or LLM providers.
3. **Integrate by contract** — ADRs, shared correlation fields, ActivityDefinitions,
artifact registration APIs — not by merging repos.
4. **Evidence compounds** — fleet baselines inform tooling; project metrics
inform agent specs; artifact-store preserves both for audit.
---
## Reading Order
1. `INTENT.md` — purpose and boundaries
2. `wiki/EcosystemIntegration.md` — this document
3. `docs/adr/ADR-004-project-metrics-convention.md` — project metrics schema
4. `history/2026-06-16-ecosystem-assessment.md` — full repo comparison
5. `workplans/kaizen-agentic-WP-0004-ecosystem-integration.md` — implementation plan
---
## Related Assessments
Persisted in `history/`:
- `2026-06-16-intent-gap-analysis.md`
- `2026-06-16-ecosystem-assessment.md`