Commands Experimental
mp-refine-run
Generate or refine prompts with local and paid strategies, append behavior, and explicit boolean flags.
View Markdown source ↗Use this command to generate prompt packs or refine an existing prompt/tool description. It offers local template generation, online prompt-factory work, and classic recursive meta-prompting—not a single fixed refinement strategy.
Start here
Section titled “Start here”With Ochat installed, write a task description in task.md:
mp-refine-run -task-file task.md -output-file generated-prompt.mdThe default strategy may call models and incur charges. To use the local template factory without model calls:
mp-refine-run -task-file task.md -meta-factory true -output-file local-pack.mdOutput is appended, not replaced, when -output-file is supplied. Use a
fresh file for a separate result. Without that flag, output goes to stdout.
Options
Section titled “Options”| Flag | Default | Meaning |
|---|---|---|
-task-file FILE | Absent | Task description. Recommended; despite the help saying required, the parser accepts omission and uses empty task text. |
-input-file FILE | Absent | Existing prompt to iterate; absence selects creation paths. |
-output-file FILE | Absent | Append result to this file; otherwise print it. |
-action generate|update | generate | Action supplied to the recursive flow. |
-prompt-type general|tool | general | Select general/tool behavior where the selected strategy distinguishes it. |
-meta-factory BOOL | false | Local template factory; takes precedence over the other strategy flags. |
-meta-factory-online BOOL | true | Enable online factory strategy. |
-classic-rmp BOOL | false | Disable online factory mode; does not override -meta-factory true. |
These booleans take explicit true or false arguments.
Strategy selection
Section titled “Strategy selection”- With
-meta-factory true, callPrompt_factory.create_packwithout an input file oriterate_packwith one. This is local template generation. - Otherwise online mode is enabled only if
-meta-factory-online trueand-classic-rmp false. - With no input file and online mode enabled, try
Prompt_factory_online.create_pack_onlinewith the GPT-5 model constructor. If it returns no result, fall back to the general recursive flow with online factory mode disabled. - Other cases select
Mp_flow.first_flowortool_flowaccording to prompt type, passing the chosen online setting.
For example, refine a tool description using the classic strategy:
mp-refine-run -task-file task.md -input-file draft-tool.md \ -prompt-type tool -action update -classic-rmp true \ -output-file refined-tool.mdThe binary does not expose a universal iteration, model, or spending-cap flag. Review the selected library strategy before automating paid runs. Invalid action/type values explicitly exit 1; parsing, file, or provider failures may also exit nonzero. There is no documented fixed 20,000-token truncation contract.
References
Section titled “References”- Meta-prompting library: evaluators and recursive flows.
- Prompt factory: prompt-pack templates.
- Provider environment: component-specific settings.
- Implementation: exact strategy dispatch.
- Command index.