What problem does it solve? Optimizing prompt-like files, SKILL.md contracts, and agent instruction files requires coordinating research, dataset synthesis, optimization, judging, and safe write-back across multiple iterations. Without a defined loop contract, agents improvise artifact paths, skip prerequisite checks, or write back unvalidated candidates. ## Core Features & Use Cases - Workspace orchestration: Initializes and resumes a local .trainer-workspace/ per target with checkpointed workflow-status.json state and required-artifact pointers. - Stage coordination: Sequences caller-supplied research, synthesis, optimization, and election stages, including a missing-data path and manual follow-up recovery branch. - Judge-mode inference: Selects exact-match, structured, or open-ended LLM-judge scoring from representative dataset rows before optimization. - Safe write-back gating: Applies a winning candidate to the source file only after validation passes and a decision summary is written. - Use Case: You want to improve a SKILL.md file over multiple trainer iterations. This skill initializes the workspace, enforces the engineering review checkpoint, manages steering and candidate bundles, and decides when the optimized candidate is safe to write back. ## Quick Start Run the trainer loop for my selected target file using the available stage capabilities, initialize its local workspace, and report blockers before any optimization begins.