mirror-multi-agent-framework-iterative

Installation
SKILL.md

MIRROR: Multi-Agent Iterative Revision for Operations Research Modeling

This skill enables Claude to translate natural language descriptions of optimization problems into formal mathematical models and executable solver code (Gurobi/PuLP/OR-Tools). It applies the MIRROR framework's four-phase generation pipeline -- parameter extraction, domain advising, mathematical modeling, and code generation -- followed by execution-driven iterative revision that diagnoses and corrects both formulation errors and implementation bugs. The approach systematically decomposes the expert-level task of OR modeling into specialized sub-tasks, each handled with domain-aware reasoning, producing reliable optimization solutions for non-expert users.

When to Use

  • When the user describes a real-world optimization problem in natural language and wants a mathematical formulation (LP, ILP, MIP, QP, etc.)
  • When the user asks to generate solver code (Gurobi, PuLP, OR-Tools, CPLEX) from a problem description
  • When the user has an existing optimization model that produces wrong answers or solver errors and needs systematic debugging
  • When the user needs to model scheduling, routing, assignment, knapsack, facility location, network flow, or resource allocation problems
  • When the user provides tabular data and asks to formulate an optimization over it
  • When the user asks to convert a word problem or business scenario into constraints and an objective function

Key Technique

MIRROR decomposes optimization modeling into a sequential pipeline of four specialized agent roles during generation, then activates two revision agents during correction. The generation agents are: (1) a Parameter Extraction agent that identifies all decision variables, constants, and data from the problem statement and structures them as typed JSON; (2) a Modeling Advisor that interprets domain-specific terminology and clarifies ambiguous problem characteristics; (3) a Mathematical Modeling agent that produces the formal optimization model (variables, constraints, objective); and (4) a Code Generation agent that translates the model into executable solver code.

The critical innovation is Iterative Adaptive Revision (IAR). After code is generated and executed, failures trigger a feedback loop. A Modeling Revision agent diagnoses logical or formulation errors (wrong constraints, missing edge cases, incorrect objective), while a Code Revision agent handles implementation failures (syntax errors, API misuse, data type mismatches). Both agents have access to a local memory of previous attempts and revision tips for the current problem, preventing repeated mistakes. The loop continues until the solver returns a valid solution or a retry limit is reached.

Installs
2
GitHub Stars
6
First Seen
May 20, 2026
mirror-multi-agent-framework-iterative — ndpvt-web/arxiv-claude-skills