docs(examples): make profile matrix, experiment evidence, and GEPA recipes reachable - #645
Conversation
…cipes reachable Add a runnable profile-matrix example for runProfileMatrix. Add a runnable experiment-evidence example for ExperimentTracker. Add a GEPA_RECIPE knob so composed recipes run from the optimizer example. Point the self-improve quickstart at the promotion-gate checks. Link the new examples from the front door and the example index.
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — a0b4b0b4
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
This approval is provisional. It rests on the audit running. If the audit cannot run — for example the CLI bridge rejects it — this approval is dismissed rather than left standing, so an unrun check never reads as a passing one.
tangletools · auto-approval · reason: drewstone_author · 2026-08-18T20:33:29Z
…e multishot runShot seam
tangletools
left a comment
There was a problem hiding this comment.
⚠️ Value Audit did not run — no verdict
This is not an approval and not a clean bill of health. Neither interrogation lens returned a judgment, so this PR has no value-audit evidence for or against it.
| Status | audit-incomplete (could not run) |
| Why | value: cli-bridge admission rejected (queue saturated); usefulness: cli-bridge admission rejected (queue saturated) |
| Lenses answered | 0 of 2 |
| What to do | re-run once the CLI bridge has capacity: pr-reviewerctl trigger <repo>#<pr> --force |
💰 Value — error
value agent never ran: the CLI bridge refused admission (no model was started).
- Model: opencode/deepseek/deepseek-v4-pro
- Bridge attempts: 4
- Bridge error: opencode/kimi-for-coding/k2p7: Bridge returned 503: bridge at capacity (queue_timeout, lane=reserved): active=20/20 queued=16/48 — no model was started
🎯 Usefulness — error
usefulness agent never ran: the CLI bridge refused admission (no model was started).
- Model: opencode/deepseek/deepseek-v4-pro
- Bridge attempts: 4
- Bridge error: opencode/zai-coding-plan/glm-5.2: Bridge returned 503: bridge at capacity (queue_timeout, lane=reserved): active=20/20 queued=15/48 — no model was started
🔎 Heuristic Signals
🟡 Cruft: console debug added examples/experiment-evidence/index.ts
- console.log(
What this audit checks
It judges the change on its merits — not whether it was tasked out in an issue. Unticketed, fast-moving work is fine; the question is whether the change is good and whether a better or existing approach should be used instead.
| Pass | What it asks |
|---|---|
| Heuristic | Vague title? Whitespace-only or cruft-bearing diff? (content signals only) |
| Duplication | Do added function/class names already exist elsewhere in the repo? |
| Value Audit | What does it do? What goal does it achieve? Is it good? Better architecture or already-exists? |
| Usefulness Audit | Does it integrate and fit? Will it hold up in real use and actually get used? |
Findings are concerns, not blocks — the human reviewer decides what to do with them.
✅ No Blockers —
|
tangletools
left a comment
There was a problem hiding this comment.
✅ Approved — 10 non-blocking findings — a0b4b0b4
Full multi-shot audit completed 5/5 planned shots over 9 changed files. Global verifier still owns final merge decision.
Full immutable report for this review: trace
Summary comment for this run: full summary
tangletools · 2026-08-18T20:52:05Z · immutable trace
✅ No Blockers —
|
tangletools
left a comment
There was a problem hiding this comment.
✅ Approved — 9 non-blocking findings — 6bc0a112
Full multi-shot audit completed 5/5 planned shots over 10 changed files. Global verifier still owns final merge decision.
Full immutable report for this review: trace
Summary comment for this run: full summary
tangletools · 2026-08-18T20:55:23Z · immutable trace
tangletools
left a comment
There was a problem hiding this comment.
🟢 Value Audit — sound
| Verdict | sound |
| Coverage | 2 of 2 lenses (value, usefulness) |
| Concerns | 2 (1 low, 1 weak-concern) |
| Heuristic | 0.0s |
| Duplication | 0.1s |
| Interrogation | 78.0s (2 bridge agents) |
| Total | 78.1s |
💰 Value — sound
Adds two offline runnable examples (runProfileMatrix, ExperimentTracker) and a GEPA_RECIPE knob that makes the six documented GEPA recipe kinds runnable at equal budget — verified running and typechecking clean, faithful to the src APIs, no duplication found; ship.
- What it does: Three examples-surface changes, no src/ changes: (1) examples/profile-matrix/index.ts runs runProfileMatrix over two AgentProfiles × three scenarios with a deterministic offline dispatch, a judge, and integrity: 'off' (documented as offline-only); (2) examples/experiment-evidence/index.ts drives ExperimentTracker + fileExperimentStore through parent/candidate experiments with 3 reps each carrying
- Goals it achieves: Restore the front door's stated promise — 'Every row is a function you call. Each links to a runnable example' (README.md:93) — which the runProfileMatrix row broke by linking to a doc; give ExperimentTracker (landed in #622, 70597fa) a first runnable example; and make the composed GEPA recipes that docs/campaign-proposers.md:250-254 already documents actually executable from the existing optimize
- Assessment: Good on its merits. I verified both new examples run offline and produce byte-for-byte the output their READMEs document (experiment-evidence prints ITERATE/KEEP with the persisted store path; profile-matrix prints per-profile means over 6 records with the expected per-cell expectUsage warnings), and pnpm typecheck:examples is clean. The examples follow the established grain: same README shape (Wh
- Better / existing approach: none — this is the right approach. I searched for an existing example or preset to extend (grep'd examples/ and src/campaign/presets/ for runProfileMatrix/ExperimentTracker usage; the segmented-profile-matrix preset exists but has no example and covers the segmented variant, not the base primitive the front-door row names), and for overlap with the scorecard/evaluate-a-change/held-out-gate example
- Model: opencode/zai-coding-plan/glm-5.2
- Bridge attempts: 2
- Bridge warning: opencode/kimi-for-coding/k2p7: opencode: opencode error
🎯 Usefulness — sound
Three offline-runnable examples plus a GEPA_RECIPE knob that make already-shipped capabilities (runProfileMatrix, ExperimentTracker, composed GEPA recipes) reachable from the repo's two real discovery surfaces; every API used exists, every example runs, and the pattern matches the established exampl
- Integration: Verified wired and reachable. All imported APIs exist: runProfileMatrix (src/campaign/presets/run-profile-matrix.ts:440), ExperimentTracker/fileExperimentStore (src/experiment-tracker.ts:307,356; exported at src/experiment/index.ts:53-55), GepaOptimizationRecipe with all six kinds (src/campaign/gepa-optimization-method.ts:100-138). Both new examples execute clean in this checkout (exit 0; profile-
- Fit with existing patterns: Follows the established grain precisely: examples//{index.ts,README.md} + a row in examples/README.md's task-based index, identical to held-out-gate, sealed-experiment, and verify-without-answer-key. No src/ or export-surface changes. The experiment-evidence example pins provenanceReader and now, mirroring the test seam pattern (src/experiment-tracker.test.ts:181); profile-matrix's integrity
- Real-world viability: Holds up beyond the happy path within its stated scope. Deterministic and offline by construction (fixed scores, pinned clock, tmpdir store). Error paths are fail-loud where they should be: invalid GEPA_RECIPE throws with the valid list; the tracker validates rep runId/evidence URIs (src/experiment-tracker.ts:406-414). Known edges are documented rather than hidden: the expectUsage warnings are cal
- Model: opencode/zai-coding-plan/glm-5.2
- Bridge attempts: 1
🔎 Heuristic Signals
🟡 Cruft: console debug added examples/experiment-evidence/index.ts
- console.log(
🎯 Usefulness Audit
🟡 docs/experiment.md points at source, not the new example [integration] ``
docs/experiment.md:95 lists
ExperimentTracker (run ledger with KEEP/ITERATE/NOISE/REGRESSION)pointing only at src/experiment-tracker.ts. A one-line cross-link to examples/experiment-evidence/ would complete the doc-to-runnable loop the same way docs/campaign-proposers.md:200 links its example. Front door and example index already make it reachable, so this does not gate shipping.
What this audit checks
It judges the change on its merits — not whether it was tasked out in an issue. Unticketed, fast-moving work is fine; the question is whether the change is good and whether a better or existing approach should be used instead.
| Pass | What it asks |
|---|---|
| Heuristic | Vague title? Whitespace-only or cruft-bearing diff? (content signals only) |
| Duplication | Do added function/class names already exist elsewhere in the repo? |
| Value Audit | What does it do? What goal does it achieve? Is it good? Better architecture or already-exists? |
| Usefulness Audit | Does it integrate and fit? Will it hold up in real use and actually get used? |
Findings are concerns, not blocks — the human reviewer decides what to do with them.
✅ No Blockers —
|
Why
Three built capabilities were unreachable from the places developers look:
runProfileMatrixhad a front-door row that linked to a doc, not a runnable example — the only row that broke the "each row links to a runnable example" promise.ExperimentTracker(rep-levelrunId+EvidenceReffrom feat: make experiments evidence-addressable and preflightable #622) had no front-door row and no example.sequential,adaptive-sequential,best-of,vote,omni) were documented indocs/campaign-proposers.mdbut no example could run one.What
examples/profile-matrix/— offline runnable ofrunProfileMatrixwith two profiles, a judge, andintegrity: 'off'explained. The README states when to use it, how, and why the integrity guard exists.examples/experiment-evidence/— offline runnable ofExperimentTracker+fileExperimentStore: parent/candidate experiments, deterministic reps carryingrunId+EvidenceRef, a KEEP verdict, and the persisted log path.examples/compare-optimization-methods/— newGEPA_RECIPEenv knob builds any of the six recipe kinds at the same total budget (evaluations and dollars split across stages). README gains a recipe table and the source-revision install caveat.examples/selfimprove-quickstart/README.md— one paragraph naming what the promotion gate refuses (no-op winner, non-significant paired delta, overfit gap), pointing atheld-out-gate.runProfileMatrixrow now links to its example; newExperimentTrackerrow. Example index updated.Verification
pnpm typecheck— clean.pnpm typecheck:examples— clean.pnpm tsx examples/profile-matrix/index.ts— runs; prints per-profile means over 6 records; per-cellexpectUsagewarnings are expected and documented.pnpm tsx examples/experiment-evidence/index.ts— runs; printsITERATE/KEEPverdicts and the persisted store path; README output matches.src/changes; no export-surface changes (the examples importExperimentTrackerfrom the existing/experimentsubpath).