{
  "markdown": "# Kaizen — SVOD Experimentation Platform\n\nA full-stack experimentation system purpose-built for streaming platforms. Supports A/B testing, interleaving, multi-armed bandits (Thompson Sampling, LinUCB, Neural Contextual), feature flags, sequential testing (mSPRT, GST), CUPED variance reduction, surrogate metrics, novelty detection, content interference analysis, lifecycle segmentation, and session-level experiments.\n\n**Status**: Phases 0–5 complete (204 PRs, 10 pair integration suites green; all 15 Phase 5 ADRs shipped 2026-04-06). Active streams: ADR-026 custom metrics + ADR-027 TOST equivalence (sprint 5.6), Pulumi/AWS infrastructure sprints, the QoE stream, and the harness modernization (H0–H7) — orchestration consolidated onto GitHub-native primitives; see [`docs/coordination/harness-modernization-proposal.md`](docs/coordination/harness-modernization-proposal.md).\n\n## Architecture\n\n```\n┌──────────────────────────────────────────────────────────────┐\n│                        Client SDKs                           │\n│    Web (TS)  ·  iOS (Swift)  ·  Android (Kotlin)            │\n│    Server-Go  ·  Server-Python                               │\n└──────────────┬───────────────────────────────────────────────┘\n               │ JSON HTTP (ConnectRPC)\n               ▼\n┌──────────────────────────┐    ┌──────────────────────────────┐\n│  M1 Assignment (Rust)    │───▶│  M4b Bandit Policy (Rust)    │\n│  :50051                  │    │  :50054                      │\n│  Hash bucketing,         │    │  Thompson, LinUCB, Neural,   │\n│  interleaving, slate     │    │  cold-start, LMAX core       │\n└──────────────────────────┘    └──────────────────────────────┘\n               │                            │\n               ▼                            ▼\n┌──────────────────────────┐    ┌──────────────────────────────┐\n│  M2 Event Pipeline       │    │  M4a Statistical Analysis    │\n│  :50052 (Rust)           │    │  :50053 (Rust)               │\n│  :50058 (Go orch)        │    │  Frequentist, Bayesian,      │\n│  Validation, dedup,      │    │  sequential, CUPED, CATE,    │\n│  Kafka publish           │    │  IPW, interference, novelty  │\n└──────────┬───────────────┘    └──────────────────────────────┘\n           │ Kafka                          ▲\n           ▼                                │\n┌──────────────────────────┐    ┌──────────────────────────────┐\n│  M3 Metric Computation   │───▶│  M5 Experiment Management    │\n│  :50056 (Go)             │    │  :50055 (Go; ADR-025 → Rust) │\n│  Spark SQL, Delta Lake,  │    │  CRUD, lifecycle, RBAC,      │\n│  surrogates, providers   │    │  guardrails, bucket reuse    │\n└──────────────────────────┘    └──────────────────────────────┘\n                                            │\n┌──────────────────────────┐    ┌──────────────────────────────┐\n│  M7 Feature Flags        │    │  M6 Decision Support UI      │\n│  :50057 (Rust)           │    │  :3000 (TypeScript)          │\n│  Flags, rollout,         │    │  Next.js 14, React 18,       │\n│  promote to experiment   │    │  Recharts, D3, shadcn/ui     │\n└──────────────────────────┘    └──────────────────────────────┘\n```\n\n## Tech Stack\n\n| Layer | Technology |\n| --- | --- |\n| Hot-path services | Rust (tonic gRPC, tonic-web JSON HTTP) |\n| Orchestration services | Go (ConnectRPC) |\n| UI | TypeScript (Next.js 14, React 18) |\n| Schema | Protobuf (buf v2, 17 .proto files, 8 packages) |\n| Streaming | Apache Kafka (MSK/Confluent, 7 topics) |\n| Lakehouse | Delta Lake on S3/GCS |\n| Database | PostgreSQL 16 |\n| Policy Store | RocksDB (embedded, crash-only) |\n| Observability | Prometheus, Grafana, Jaeger (OpenTelemetry) |\n\n## Getting Started\n\n### Prerequisites\n\n- Rust 1.80+ with `cargo`\n- Go 1.22+\n- Node.js 20+ with `npm`\n- Docker and Docker Compose\n- `buf` CLI v2 (proto toolchain)\n- PostgreSQL 16\n- `tmux` (for multi-agent orchestration)\n\n### Development Setup\n\n```bash\ngit clone https://github.com/wunderkennd/kaizen-experimentation.git && cd kaizen-experimentation\ndocker compose up -d\ncargo build --workspace && cargo test --workspace\ngo build ./... && go test ./...\ncd ui && npm install && npm test && cd ..\nbuf lint proto/\n```\n\n## Phase 5: Architecture Evolution — SHIPPED\n\nPhase 5 shipped all 15 ADRs (011–025) across sprints 5.0–5.5 (41 PRs, complete 2026-04-06), driven by a 2024–2026 experimentation research gap analysis:\n\n| Cluster | ADRs | Capability |\n| --- | --- | --- |\n| A: Multi-Stakeholder | 011–014 | Multi-objective bandits, LP constraint layer, meta-experiments, provider-side metrics |\n| B: Statistical Methods | 015, 018, 020 | AVLM (sequential CUPED), e-value framework + online FDR, adaptive sample size |\n| C: Bandit & RL | 016, 017 | Slate-level bandits, offline RL for long-term causal estimation |\n| D: Quasi-Experimental | 022, 023 | Switchback experiments, synthetic control methods |\n| E: Platform Operations | 019, 021 | Portfolio optimization, feedback loop interference detection |\n| F: Language Migration | 024, 025 | M7 Go→Rust (shipped), M5 Go→Rust (Phase 2/4 landed; RBAC + stats integration pending) |\n\nPost-Phase-5 ADRs **026–031** (custom metrics layer, TOST equivalence testing, M4b shadow inference, cross-modal score calibration, shadow experiment mode, ConnectRPC Rust pilot) form the active product stream — see `CLAUDE.md` §Active Work for per-ADR status.\n\n### Work Tracking\n\nWork is tracked via **GitHub Issues** on a native work graph (harness phase H2; Milestones were retired 2026-07-05):\n\n```\nIteration (Project #5)  =  Sprint — `sprint-*` labels carry it for machines\n  └── Issue             =  one dispatchable unit\n                           blockers  = native \"blocked by\" dependency edges\n                           goals     = native sub-issue trees with progress bars\n```\n\nReadiness is computed from the graph, not from issue-body text: open ∧ unclaimed ∧ no open closing PR ∧ no open blocking edge (`scripts/orchestration/ready.sh`, one GraphQL query per sprint cohort).\n\n```bash\njust morning                                    # iteration status + per-cohort ready counts\n\ngh issue list --label sprint-5.6 --state open   # current product sprint\ngh issue list --label \"agent-4\" --state open    # by agent\ngh issue list --label \"blocked\"                 # blocked work\n```\n\n### Development Orchestration\n\nA multi-tool executor portfolio rides on GitHub-native coordination (the harness modernization, phases H0–H7): a **claim protocol** prevents duplicate dispatch (H1), the **dependency-edge work graph** computes readiness (H2), and **merging is platform-owned** — required status checks via the native ruleset [`.github/rulesets/main.json`](.github/rulesets/main.json) (PR title, review gate, PR-size gate, schema, rust, go, typescript, hash-parity), green non-risk PRs auto-merge, and human review is reserved for `breaking`/`contract-test`/proto-touching changes (H3/H6). The delivery lifecycle from idea to dispatch is codified with templates and advisory lints (H7).\n\n| Tool | Role | When |\n| --- | --- | --- |\n| Gas Town | Interactive parallel work — Mayor + polecats | Daytime active sessions |\n| Multiclaude | Autonomous overnight grinding — local daemon | Overnight / weekends — retirement path decided (H4): graduated cutover to a GitHub-native evening dispatcher |\n| Jules | CI-triggered automation — maintenance, tests, deps | Continuous (GitHub Actions) |\n| Devin | Bounded autonomous tasks + automatic PR review | Batch dispatch |\n| Gemini CLI | Second-opinion review, research | Ad-hoc |\n| Claude Code (solo / web / `@claude`) | Focused tasks, harness work, privileged operations via workflow vehicles | One-off work; H4's reference executor |\n\n```bash\njust morning              # Check overnight results, pull main\njust interactive          # Start Gas Town Mayor session\njust evening 5.6          # Launch sprint-5.6 Multiclaude workers overnight\njust status               # Unified view across all tools\njust pr-triage            # AI-assisted PR cleanup\n```\n\nThe governance workflows are `workflow_call` reusables (`_review-gate.yml`, `_pr-title.yml`, `_automerge.yml`, `_pr-size.yml`) so sibling Kaizen repos run identical ~20-line callers, with per-repo rulesets stamped by Pulumi (`infra/github-governance/`, org-migration-ready for wunderkind-ventures).\n\nSee `docs/guides/orchestration-workflow.md` for the full guide and `docs/coordination/harness-modernization-proposal.md` for phase status.\n\n## Project Structure\n\n```\nkaizen/\n├── CLAUDE.md                          # Agent context (the front door — every tool reads it)\n├── README.md                          # This file\n├── CONTRIBUTING.md                    # Contribution guide (PR lifecycle, size policy, graduated review)\n├── Cargo.toml                         # Workspace root\n├── justfile                           # Task runner (1000+ lines; `just --list`)\n│\n├── .claude/\n│   ├── settings.json                  # Project-level Claude Code settings\n│   └── agents/\n│       └── pr-triage.md               # PR triage subagent\n│\n├── .multiclaude/\n│   ├── config.json                    # Multiclaude repo config\n│   └── agents/                        # 12 definitions — views of docs/agents/registry/\n│\n├── .github/\n│   ├── workflows/                     # CI/CD + governance reusables (_review-gate, _pr-title,\n│   │                                  #   _automerge, _pr-size) + Jules/Claude automation\n│   ├── rulesets/                      # Branch protection as data (main.json — required checks)\n│   └── ISSUE_TEMPLATE/                # Issue templates for ADR work\n│\n├── crates/                            # Rust workspace (13 crates)\n├── services/                          # Go services\n├── ui/                                # M6 (Next.js 14)\n├── proto/experimentation/             # Protobuf schema\n├── sdks/                              # Client SDKs (5 platforms)\n├── sql/migrations/                    # PostgreSQL DDL\n├── delta/                             # Delta Lake table schemas\n├── test-vectors/                      # Hash parity vectors (10K)\n│\n├── scripts/\n│   ├── orchestration/                 # H1 dispatch layer: claims, native _ready, adapters\n│   ├── check_okf.py · check_docs.py   # Registry + delivery-lifecycle conformance lints\n│   └── generate_governance_onboarding.py  # Fleet governance file generator\n│\n├── infra/                             # Pulumi IaC (all 13 modules) + github-governance/ fleet stack\n│\n├── docs/\n│   ├── design/design_doc_v7.0.md\n│   ├── adrs/                          # ADRs 001–030\n│   ├── agents/registry/               # Canonical agent identity (OKF v0.1 bundle)\n│   ├── coordination/                  # Phase plans, playbook, harness-modernization-proposal.md\n│   ├── guides/                        # Developer guides (incl. delivery-lifecycle, plan-review)\n│   ├── templates/                     # PRD / RFC / UX-spec templates\n│   ├── superpowers/                   # Locked plans + specs (plan template v2)\n│   └── runbooks/                      # Module, operator, and ecosystem-governance runbooks\n│\n├── docker-compose.yml\n└── docker-compose.monitoring.yml\n```\n\n## Documentation\n\n| Document | Description |\n| --- | --- |\n| [Design Document v7.0](docs/design/design_doc_v7.0.md) | Complete system reference + Phase 5 architecture plan |\n| [ADR Index](docs/adrs/README.md) | 31 architecture decision records |\n| [Harness Modernization Proposal](docs/coordination/harness-modernization-proposal.md) | H0–H7: claim protocol, native work graph, platform merge path, executor consolidation, fleet governance, delivery codification |\n| [Delivery Lifecycle](docs/guides/delivery-lifecycle.md) | Idea → PRD → RFC/ADR → spec → locked plan → plan-review → `prime-issue` → dispatch |\n| [Projects & Goals](docs/guides/projects-and-goals.md) | Iterations-as-sprints, Goal sub-issue trees, native dependency edges |\n| [Ecosystem Governance Runbook](docs/runbooks/ecosystem-governance.md) | Fleet onboarding, ruleset apply (POST vs PUT), wunderkind-ventures org migration |\n| [Phase 5 Plan](docs/coordination/phase5-implementation-plan.md) | 6 sprints, agent assignments (shipped 2026-04-06) |\n| [Orchestration Workflow](docs/guides/orchestration-workflow.md) | Multi-tool daily workflow guide |\n| [Gas Town Setup](docs/guides/gastown-setup.md) | Gas Town installation and configuration |\n| [GitHub Issues Workflow](docs/guides/github-issues-workflow.md) | Work tracking with Issues, labels, and the claim protocol |\n| [PR Triage & Cleanup](docs/guides/pr-triage-and-cleanup.md) | Crash recovery, batch PR cleanup |\n| [Merge Conflict Resolution](docs/guides/merge-conflict-resolution.md) | Per-file-type resolution strategies |\n| [Git Hygiene](docs/guides/git-hygiene.md) | What to track vs. gitignore |\n\n## Verified Performance\n\n| Service | Metric | Target | Achieved |\n| --- | --- | --- | --- |\n| M1 Assignment | GetAssignment p99 | < 5ms | ✅ at 50K rps |\n| M4b Bandit | SelectArm p99 | < 15ms at 10K rps | ✅ |\n| M7 Flags | EvaluateFlag p99 | < 10ms at 20K rps | ✅ (< 5ms post-Rust-port) |\n| All stateless | Crash recovery | < 2 seconds | ✅ |\n| Hash parity | Rust ↔ WASM ↔ CGo ↔ Python ↔ TS | 10K vectors | ✅ |\n\n## License\n\nProprietary. See LICENSE.\n",
  "bytes": 13170,
  "sha": "63cb81fbe7dad6cb62a727e0074a4f54da6811797fe0f3c75bc75d7d690e9887",
  "repo_slug": "wunderkennd/kaizen-experimentation",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_wunderkennd_kaizen_experimentation_docs__81c8c312/readme"
}