Loading...
Loading...
SkillOpt-flavored offline training loop for any SKILL.md. Treats accumulated learn-rule corrections as training trajectories, proposes bounded patches via an optimizer LLM, gates each candidate against a held-out validation set built from the user's own past corrections, and ships only candidates that demonstrably improve the score. Inspired by Microsoft SkillOpt's ReflACT pipeline (rollout → reflect → aggregate → select → update → evaluate) adapted to pro-workflow's SQLite store. Use when a skill has accumulated 8+ learn-rule rows and the user wants the skill itself to get better, not just longer.
npx skill4agent add rohitg00/pro-workflow skill-optimizerrollout pull recent learnings from SQLite (existing learn-rule rows)
reflect optimizer LLM analyzes a minibatch, proposes add/delete/replace patches
aggregate vote-merge patches across minibatches
select clip by LR budget (default: 3 adds, 2 deletes, 3 replaces per step)
update apply selected patches to a candidate skill content
evaluate evaluator LLM scores candidate against held-out validation items
gate accept candidate only if weighted score >= current + acceptThreshold
slow update at epoch boundary, consolidate accepted edits into a coherent rewriteprovidersrun_provider_tasktask: "optimizer"args: ["--slug", "<slug>", "--budget-usd", "0.50"]PRO_WORKFLOW_*_API_KEY/skill-optimize <slug> [options]| Flag | Default | Notes |
|---|---|---|
| 3 | Outer loop count |
| 8 | Trajectories per minibatch |
| 2 | Minibatches per epoch |
| 6 | Validation items reserved (max ~25% of trajectories) |
| 0.50 | Hard cap; loop aborts when spent |
| | Reflect + slow-update model |
| | Gate model (cheaper) |
| 3 | LR budget per step |
| 2 | |
| 3 | |
| 0.0 | Minimum score delta to accept candidate |
| 2000 | Hard cap on candidate length |
| 2 | Epochs between consolidation passes |
| off | Machine-readable output |
touch ~/.pro-workflow/STOPoptimization_runsoptimization_candidatesoptimization_patchesoptimization_rejectionsoptimization_validationsqlite3 ~/.pro-workflow/data.db "SELECT id, skill_slug, initial_score, best_score, accepted_steps, rejected_steps, spent_usd FROM optimization_runs ORDER BY id DESC LIMIT 5"spent_usd >= budget_usdstopped_reason="budget exhausted"anchor_missing