feat: optimizer graduation slice A — GEPA pool, two-model split, dual gate (1.6.0-rc.1)#73
Merged
Merged
Conversation
…al gate (slice A offline, slice B deferred) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…election, dual gate
…sition-swapped judge
…wo-model split and dual gate
… (review minor 1) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR graduates /baton:optimize-prompt from the v1 single-shot “reflect + propose” flow to a persistent GEPA-style evolution loop with a box-private prompt candidate pool, two-model reflect/mutate split, minibatch offline evaluation, and a dual acceptance gate (plus corresponding tests, CLI flags, and documentation). It also updates bootstrap deployment wiring and bumps the plugin version to 1.6.0-rc.1.
Changes:
- Add a prompt candidate pool library (
prompt-pool-lib.ps1) with Pareto-front selection and dual-gate logic, plus a new dedicated test suite. - Replace the optimizer’s single-shot path with
Invoke-PromptEvolution(reflection + mutation + minibatch judge + dual gate), and extend tests accordingly. - Expand the
/baton:optimize-promptCLI with-Generations,-ReflectTier, and-Pool, and update bootstrap/docs/version to match.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/prompt-pool-lib.ps1 | New pool state + Pareto/selection + dual-gate logic for optimizer evolution. |
| scripts/test-prompt-pool-lib.ps1 | New hermetic test suite covering pool behaviors and gate math. |
| scripts/optimize-prompt-lib.ps1 | Adds minibatch evaluator + two-model prompts and replaces optimizer with multi-generation evolution loop. |
| scripts/test-optimize-prompt-lib.ps1 | Updates tests to cover minibatch evaluation and evolution (including apply/retire paths). |
| scripts/fleet-optimize-prompt.ps1 | CLI updates: pool report mode and evolution flags; updated output/reporting behavior. |
| scripts/bootstrap.ps1 | Ensures prompt-pool-lib.ps1 is deployed by bootstrap. |
| scripts/test-bootstrap.ps1 | Adds assertion that bootstrap would deploy prompt-pool-lib.ps1. |
| docs/superpowers/specs/2026-07-01-optimizer-graduation-design.md | New design spec for Slice A (and schema reserved for Slice B). |
| docs/superpowers/plans/2026-07-01-optimizer-graduation-slice-a.md | New implementation plan detailing Slice A changes and constraints. |
| commands/optimize-prompt.md | Updates the command doc to reflect evolution loop, pool, and new flags. |
| docs/COMMANDS.md | Updates /baton:optimize-prompt docs and cheat-sheet entry for the new behavior/flags. |
| .claude-plugin/plugin.json | Version bump to 1.6.0-rc.1. |
Comment on lines
315
to
+318
| $runs = Get-HistoricalRuns -MaxRuns $MaxRuns | ||
| if (@($runs).Count -eq 0) { | ||
| Write-Host "No historical runs requiring polish or reject found." | ||
| return @{ success = $false; applied = $false; candidate_path = $null; reason = 'no historical runs requiring polish or reject' } | ||
| return (& $fail 'no historical runs requiring polish or reject' @()) |
Comment on lines
+313
to
314
| $pool = $loaded.pool | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimizer graduation — Slice A (GEPA loop)
Graduates
/baton:optimize-promptfrom single-shot reflect-and-propose (d069/d070) to a real GEPA loop, per specdocs/superpowers/specs/2026-07-01-optimizer-graduation-design.md(decision d071).What's new
scripts/prompt-pool-lib.ps1— box-private candidate pool ($BATON_HOME/prompts/pool/): lineage, status (champion/candidate/retired), offline scores, and live cost-to-acceptance fields reserved at zero for Slice B (shadow A/B) so it lands without a migration.Build-DiagnosisPrompt), stronger mutation model rewrites (Build-MutationPrompt); tiers ride the existingSelect-Capabilityrouting (reflect defaults one tier below mutate).--applyunchanged (d070) — survivors are proposed asconductor-planner.candidate.txt;--applybacks up the live prompt, promotes to champion, marks stale scores for re-eval.-Generations N,-ReflectTier T,-Poolreport. Bootstrap deploys the new lib (pool itself is runtime state, never seeded). Plugin1.6.0-rc.1.Verification
2129005; others cosmetic/v1-inherited/by-design, listed in.superpowers/sdd/final-review-report.md).🤖 Generated with Claude Code