Combine formulation and API skills into numerical-optimization skill family#1183
Combine formulation and API skills into numerical-optimization skill family#1183rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
…ation-formulation
Merges the two formulation skills into a single skill that covers LP,
MILP, and QP concepts together. cuOpt's solver API surface (DataModel,
SolverSettings, Solver) is shared across these problem classes, and
the agent classifies LP vs MILP vs QP from problem text — having two
skills with overlapping descriptions just creates an activation-routing
problem.
Changes:
- New skill: skills/numerical-optimization-formulation/SKILL.md
- Sections: What is LP/MILP/QP, identifying problem type (with a
table comparing variable/constraint/objective forms), required
formulation questions, typical modeling elements, typical QP use
cases, problem-statement parsing (full framework), QP minimize-
only rule, and the five existing LP/MILP patterns (piecewise-
linear, cutting stock, goal programming, multi-period inventory,
blending with shared mixing).
- Removed: skills/lp-milp-formulation/, skills/qp-formulation/
- Updated cross-refs: AGENTS.md (also covers .claude/CLAUDE.md via
symlink), .claude-plugin/marketplace.json, and the skill-evolution
SKILL.md examples.
Validation: pre-commit and ci/utils/validate_skills.sh both pass.
Sectioning into resources/ subfiles is intentionally deferred — the
merged SKILL.md is ~250 lines, below the threshold where a split pays
off. Revisit if it grows.
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
…thon,c,cli} Merges the per-interface LP/MILP and QP API skills into a single skill per interface. The cuOpt API surface is shared (Problem/SolverSettings/solve in Python, cuOptCreate*/cuOptSolve in C, cuopt_cli for both) — the only difference is whether the objective is linear or quadratic. Two skills per interface with overlapping triggers just creates an activation-routing problem for the agent. Renames (history preserved via git mv): - cuopt-lp-milp-api-python → cuopt-numerical-optimization-api-python - cuopt-lp-milp-api-c → cuopt-numerical-optimization-api-c - cuopt-lp-milp-api-cli → cuopt-numerical-optimization-api-cli Removed (content folded into the corresponding renamed skill): - skills/cuopt-qp-api-python/ (assets and resources moved into the numerical-optimization-api-python skill; QP examples doc became resources/qp_examples.md) - skills/cuopt-qp-api-c/ (no standalone source; content was a pointer to repo docs, now inlined as the QP-via-C-API section) - skills/cuopt-qp-api-cli/ (no standalone MPS files; content was a pointer to docs, now inlined as the QP-via-CLI section) Per-skill SKILL.md updates: - Frontmatter name + description rewritten to cover LP/MILP/QP. - Python: new "Choosing LP vs MILP vs QP" decision table; new QP example (portfolio variance); QP rules block (MINIMIZE-only, continuous-only, Q PSD, beta); QP status note; two new entries in Common Issues; QP assets added to the reference table. - C: new QP-via-C-API section with rules and pointers to headers/repo docs; outdated "If quadratic, use QP" escalate note removed. - CLI: new QP-via-CLI section noting the same cuopt_cli command/flags apply, with the MINIMIZE-only and continuous-only rules. Cross-references updated: - AGENTS.md (root, also picked up by .claude/CLAUDE.md via symlink). - .claude-plugin/marketplace.json: 6 plugin entries → 3. - skills/skill-evolution/SKILL.md: API-skill example renamed. - evals/evals.json: all 99 expected_skill values switched to the new skill name; evals/SOURCES.md note updated. Validation: ci/utils/validate_skills.sh and pre-commit both pass. QP-specific examples (least squares, matrix-form Q expansion, maximization workaround) live in resources/qp_examples.md so the merged SKILL.md stays focused (~280 lines, well below the resources/ split threshold). Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthroughThe PR consolidates the cuOpt plugin and skill ecosystem from separate LP/MILP and QP offerings into a unified numerical optimization framework. The marketplace manifest, skill registry, and documentation are restructured to represent formulation and API capabilities under the numerical-optimization branding, while deprecated QP-specific skills are removed. ChangesNumerical Optimization Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Around line 26-28: Update the AGENTS.md intro sentence that defines the
"flat-layout" to include the api-cli variant so it matches the listed skills;
change the description that currently mentions only "api-python" or "api-c" to
also mention "api-cli" and ensure the example skill entries
(`skills/cuopt-numerical-optimization-api-cli/`) are reflected in that
definition; while editing, briefly state agent responsibilities and interfaces
for the CLI agent consistent with the other API agents so the doc clearly
describes role and interface expectations.
In `@skills/cuopt-numerical-optimization-api-python/SKILL.md`:
- Around line 255-257: Add a blank line between the heading "### Minimal /
canonical examples (LP, MILP, QP)" and the start of the table so the table does
not immediately follow the heading; locate the heading text in SKILL.md and
insert an empty line before the table row beginning with "| Model | Type |
Description |" to satisfy markdownlint MD058.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f185f240-a92a-4cb4-9067-dffd452c0a07
⛔ Files ignored due to path filters (5)
skills/cuopt-numerical-optimization-api-c/assets/mps_solver/data/sample.mpsis excluded by!**/*.mpsskills/cuopt-numerical-optimization-api-cli/assets/lp_production/production.mpsis excluded by!**/*.mpsskills/cuopt-numerical-optimization-api-cli/assets/lp_simple/sample.mpsis excluded by!**/*.mpsskills/cuopt-numerical-optimization-api-cli/assets/milp_facility/facility.mpsis excluded by!**/*.mpsskills/cuopt-numerical-optimization-api-python/assets/mps_solver/data/sample.mpsis excluded by!**/*.mps
📒 Files selected for processing (57)
.claude-plugin/marketplace.jsonAGENTS.mdskills/cuopt-lp-milp-api-python/assets/README.mdskills/cuopt-numerical-optimization-api-c/SKILL.mdskills/cuopt-numerical-optimization-api-c/assets/README.mdskills/cuopt-numerical-optimization-api-c/assets/lp_basic/README.mdskills/cuopt-numerical-optimization-api-c/assets/lp_basic/lp_simple.cskills/cuopt-numerical-optimization-api-c/assets/lp_duals/README.mdskills/cuopt-numerical-optimization-api-c/assets/lp_duals/lp_duals.cskills/cuopt-numerical-optimization-api-c/assets/lp_warmstart/README.mdskills/cuopt-numerical-optimization-api-c/assets/milp_basic/README.mdskills/cuopt-numerical-optimization-api-c/assets/milp_basic/milp_simple.cskills/cuopt-numerical-optimization-api-c/assets/milp_production_planning/README.mdskills/cuopt-numerical-optimization-api-c/assets/milp_production_planning/milp_production.cskills/cuopt-numerical-optimization-api-c/assets/mps_solver/README.mdskills/cuopt-numerical-optimization-api-c/assets/mps_solver/mps_solver.cskills/cuopt-numerical-optimization-api-c/resources/examples.mdskills/cuopt-numerical-optimization-api-cli/SKILL.mdskills/cuopt-numerical-optimization-api-cli/assets/README.mdskills/cuopt-numerical-optimization-api-cli/assets/lp_production/README.mdskills/cuopt-numerical-optimization-api-cli/assets/lp_simple/README.mdskills/cuopt-numerical-optimization-api-cli/assets/milp_facility/README.mdskills/cuopt-numerical-optimization-api-python/SKILL.mdskills/cuopt-numerical-optimization-api-python/assets/README.mdskills/cuopt-numerical-optimization-api-python/assets/least_squares/README.mdskills/cuopt-numerical-optimization-api-python/assets/least_squares/model.pyskills/cuopt-numerical-optimization-api-python/assets/lp_basic/README.mdskills/cuopt-numerical-optimization-api-python/assets/lp_basic/model.pyskills/cuopt-numerical-optimization-api-python/assets/lp_duals/README.mdskills/cuopt-numerical-optimization-api-python/assets/lp_duals/model.pyskills/cuopt-numerical-optimization-api-python/assets/lp_warmstart/README.mdskills/cuopt-numerical-optimization-api-python/assets/lp_warmstart/model.pyskills/cuopt-numerical-optimization-api-python/assets/maximization_workaround/README.mdskills/cuopt-numerical-optimization-api-python/assets/maximization_workaround/model.pyskills/cuopt-numerical-optimization-api-python/assets/milp_basic/README.mdskills/cuopt-numerical-optimization-api-python/assets/milp_basic/incumbent_callback.pyskills/cuopt-numerical-optimization-api-python/assets/milp_basic/model.pyskills/cuopt-numerical-optimization-api-python/assets/milp_production_planning/README.mdskills/cuopt-numerical-optimization-api-python/assets/milp_production_planning/model.pyskills/cuopt-numerical-optimization-api-python/assets/mps_solver/README.mdskills/cuopt-numerical-optimization-api-python/assets/mps_solver/data/README.mdskills/cuopt-numerical-optimization-api-python/assets/mps_solver/model.pyskills/cuopt-numerical-optimization-api-python/assets/mps_solver/results.mdskills/cuopt-numerical-optimization-api-python/assets/portfolio/README.mdskills/cuopt-numerical-optimization-api-python/assets/portfolio/model.pyskills/cuopt-numerical-optimization-api-python/evals/SOURCES.mdskills/cuopt-numerical-optimization-api-python/evals/evals.jsonskills/cuopt-numerical-optimization-api-python/resources/qp_examples.mdskills/cuopt-qp-api-c/SKILL.mdskills/cuopt-qp-api-c/assets/README.mdskills/cuopt-qp-api-cli/SKILL.mdskills/cuopt-qp-api-cli/assets/README.mdskills/cuopt-qp-api-python/SKILL.mdskills/cuopt-qp-api-python/assets/README.mdskills/numerical-optimization-formulation/SKILL.mdskills/qp-formulation/SKILL.mdskills/skill-evolution/SKILL.md
💤 Files with no reviewable changes (8)
- skills/cuopt-qp-api-c/assets/README.md
- skills/cuopt-lp-milp-api-python/assets/README.md
- skills/cuopt-qp-api-cli/SKILL.md
- skills/cuopt-qp-api-cli/assets/README.md
- skills/qp-formulation/SKILL.md
- skills/cuopt-qp-api-c/SKILL.md
- skills/cuopt-qp-api-python/assets/README.md
- skills/cuopt-qp-api-python/SKILL.md
| - `skills/cuopt-numerical-optimization-api-python/` (LP, MILP, QP) | ||
| - `skills/cuopt-numerical-optimization-api-c/` (LP, MILP, QP) | ||
| - `skills/cuopt-numerical-optimization-api-cli/` (LP, MILP, QP) |
There was a problem hiding this comment.
Update AGENTS intro to include api-cli in the flat-layout definition
Lines 26–28 add CLI interface skills, but Line 3 still says the layout is only common + api-python or api-c. Please align that sentence to avoid contradictory guidance.
As per coding guidelines, “Include clear descriptions of agent responsibilities and interfaces in AGENTS.md.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 26 - 28, Update the AGENTS.md intro sentence that
defines the "flat-layout" to include the api-cli variant so it matches the
listed skills; change the description that currently mentions only "api-python"
or "api-c" to also mention "api-cli" and ensure the example skill entries
(`skills/cuopt-numerical-optimization-api-cli/`) are reflected in that
definition; while editing, briefly state agent responsibilities and interfaces
for the CLI agent consistent with the other API agents so the doc clearly
describes role and interface expectations.
| ### Minimal / canonical examples (LP, MILP, QP) | ||
| | Model | Type | Description | | ||
| |-------|------|-------------| |
There was a problem hiding this comment.
Add a blank line before the table to satisfy markdownlint
Line 256 starts a table immediately after the heading at Line 255; markdownlint MD058 expects a blank line before/after tables.
Proposed patch
### Minimal / canonical examples (LP, MILP, QP)
+
| Model | Type | Description |
|-------|------|-------------|
| [lp_basic](assets/lp_basic/) | LP | Minimal LP: variables, constraints, objective, solve |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### Minimal / canonical examples (LP, MILP, QP) | |
| | Model | Type | Description | | |
| |-------|------|-------------| | |
| ### Minimal / canonical examples (LP, MILP, QP) | |
| | Model | Type | Description | | |
| |-------|------|-------------| |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 256-256: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/cuopt-numerical-optimization-api-python/SKILL.md` around lines 255 -
257, Add a blank line between the heading "### Minimal / canonical examples (LP,
MILP, QP)" and the start of the table so the table does not immediately follow
the heading; locate the heading text in SKILL.md and insert an empty line before
the table row beginning with "| Model | Type | Description |" to satisfy
markdownlint MD058.
Summary
Collapses the LP/MILP and QP skills into a single numerical-optimization skill family across all surfaces (formulation + Python / C / CLI APIs). cuOpt's solver API is shared across LP, MILP, and QP — keeping per-problem-type skills with overlapping triggers just creates an activation-routing problem for the agent.
Two commits on this branch:
0bf8ad4b— Combinelp-milp-formulationandqp-formulationintonumerical-optimization-formulation(concepts + parsing + patterns).af70748c— Combine the per-interface API skills:cuopt-lp-milp-api-python+cuopt-qp-api-python→cuopt-numerical-optimization-api-pythoncuopt-lp-milp-api-c+cuopt-qp-api-c→cuopt-numerical-optimization-api-ccuopt-lp-milp-api-cli+cuopt-qp-api-cli→cuopt-numerical-optimization-api-cliRenames go through
git mvso history (and the existingevals/dataset) is preserved. QP-specific assets and the QP examples doc were folded into the renamed Python skill (resources/qp_examples.md); QP C and CLI had no standalone source files, so their content became small sub-sections in the merged SKILL.md.Cross-refs updated:
AGENTS.md(also covers.claude/CLAUDE.mdvia symlink),.claude-plugin/marketplace.json,skills/skill-evolution/SKILL.md, all 99expected_skillvalues in the Python evals dataset, andevals/SOURCES.md.Per-skill SKILL.md additions for QP coverage (Python: decision table, portfolio example, MINIMIZE-only / continuous-only / Q-PSD rules, status note, two new Common Issues rows; C: QP-via-C-API section; CLI: QP-via-CLI section).
Test plan
ci/utils/validate_skills.shpassespre-commit runpasses (all hooks: end-of-files, trailing whitespace, JSON, ruff, copyright, hardcoded version, sync-skills-version, validate-agent-skills)cuopt-{lp-milp,qp}-api-{python,c,cli}anywhere in the tree