prompt-optimizer-looplisted
Install: claude install-skill Abhillashjadhav/PM-agent-OS
# Prompt Optimizer Loop
One mutation, one score, keep or revert. Attribution is the whole method — change two things and you learn nothing.
## Verification gates (defined first; output is blocked until all pass)
- **G1 — One mutation per round:** each round applies exactly one named, diffable change (add a constraint · add/replace an example · restructure one instruction · tighten one ambiguity). A multi-change round fails the gate even when the score improves — improvement without attribution is luck, not learning.
- **G2 — Score logged per round:** every round records mutation, score before, score after, keep/revert. Scores come only from the checklist run against the test case — no unscored "feels better" rounds.
- **G3 — Revert on non-improvement:** a tied or lower score reverts the mutation; the next round mutates from the last-kept version. The log shows reverted rounds as reverted, never silently rewound.
## Steps
1. **Establish the harness.** Need three things: the baseline prompt, a scoring checklist (binary items, 1 point each — derive one from the user's description of "good" if not provided, and confirm it), and at least one test input. Score the baseline first; that's round 0.
2. **Diagnose before mutating.** Which checklist items fail, and what in the prompt plausibly causes each miss? The next mutation targets the highest-value failing item — not the easiest edit.
3. **Mutate once.** Name the mutation type and show the diff. Resist bundling: an example AND