Repository navigation
prompts: --core-prompt evolution loop wiring - #122
Merged
Merged
Conversation
13 of 15 tasks
noeljackson
added a commit
that referenced
this pull request
May 15, 2026
The bench corpus is now real (#84 hit 30 tasks). This wires the final missing piece for prompt evolution: a way to A/B candidate prompts against the bundled baseline using process-score + process-compare. ## What's new - `ProcessOptions.CorePromptOverride` (processor) — a per-run string that, when non-empty, replaces the bundled `CorePrompt` for every InvestigateBatch this Process produces. - `InvestigateBatch.CorePromptOverride` — the per-batch field AssemblePrompt now checks before falling back to the package default. - `bench.ProcessScoreOptions.CorePromptPath` — file path; the scorer reads it once and threads it through. - `benchsec process-score --core-prompt <path>` flag. ## Walkthrough # 1. Author a candidate cp internal/processor/prompts/core.md /tmp/core.candidate.md $EDITOR /tmp/core.candidate.md # 2. Baseline benchsec process-score --repeat 8 --seed 1 > baseline.json # 3. Candidate (single flag swap) benchsec process-score --repeat 8 --seed 1 \ --core-prompt /tmp/core.candidate.md > candidate.json # 4. Compare with CI threshold benchsec process-compare <baseline-dir> <candidate-dir> \ --threshold 0.02 ## Documentation `docs/prompt-evolution.md` is the full walkthrough — when to use the loop, what to vary, what NOT to vary, how variance shapes `--repeat` and bootstrap sizing. ## Test `TestAssemblePromptCorePromptOverride` confirms the override short-circuits the bundled CorePrompt at the prompt-assembly layer. Repeat path (`ProcessScoreRepeated`) inherits via `processScoreOnce`; no new wiring needed. Pre-push gate: build / vet / gofmt / staticcheck / bench tests all green. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
noeljackson
added a commit
that referenced
this pull request
May 18, 2026
The bench corpus is now real (#84 hit 30 tasks). This wires the final missing piece for prompt evolution: a way to A/B candidate prompts against the bundled baseline using process-score + process-compare. ## What's new - `ProcessOptions.CorePromptOverride` (processor) — a per-run string that, when non-empty, replaces the bundled `CorePrompt` for every InvestigateBatch this Process produces. - `InvestigateBatch.CorePromptOverride` — the per-batch field AssemblePrompt now checks before falling back to the package default. - `bench.ProcessScoreOptions.CorePromptPath` — file path; the scorer reads it once and threads it through. - `benchsec process-score --core-prompt <path>` flag. ## Walkthrough # 1. Author a candidate cp internal/processor/prompts/core.md /tmp/core.candidate.md $EDITOR /tmp/core.candidate.md # 2. Baseline benchsec process-score --repeat 8 --seed 1 > baseline.json # 3. Candidate (single flag swap) benchsec process-score --repeat 8 --seed 1 \ --core-prompt /tmp/core.candidate.md > candidate.json # 4. Compare with CI threshold benchsec process-compare <baseline-dir> <candidate-dir> \ --threshold 0.02 ## Documentation `docs/prompt-evolution.md` is the full walkthrough — when to use the loop, what to vary, what NOT to vary, how variance shapes `--repeat` and bootstrap sizing. ## Test `TestAssemblePromptCorePromptOverride` confirms the override short-circuits the bundled CorePrompt at the prompt-assembly layer. Repeat path (`ProcessScoreRepeated`) inherits via `processScoreOnce`; no new wiring needed. Pre-push gate: build / vet / gofmt / staticcheck / bench tests all green.
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.
Closes #86.
🤖 Generated with Claude Code