Skip to content

Combine formulation and API skills into numerical-optimization skill family#1183

Open
rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
rgsl888prabhu:combine-formulation-skills
Open

Combine formulation and API skills into numerical-optimization skill family#1183
rgsl888prabhu wants to merge 2 commits intoNVIDIA:mainfrom
rgsl888prabhu:combine-formulation-skills

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

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:

  1. 0bf8ad4b — Combine lp-milp-formulation and qp-formulation into numerical-optimization-formulation (concepts + parsing + patterns).
  2. af70748c — Combine the per-interface API skills:
    • cuopt-lp-milp-api-python + cuopt-qp-api-pythoncuopt-numerical-optimization-api-python
    • cuopt-lp-milp-api-c + cuopt-qp-api-ccuopt-numerical-optimization-api-c
    • cuopt-lp-milp-api-cli + cuopt-qp-api-clicuopt-numerical-optimization-api-cli

Renames go through git mv so history (and the existing evals/ 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.md via symlink), .claude-plugin/marketplace.json, skills/skill-evolution/SKILL.md, all 99 expected_skill values in the Python evals dataset, and evals/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.sh passes
  • pre-commit run passes (all hooks: end-of-files, trailing whitespace, JSON, ruff, copyright, hardcoded version, sync-skills-version, validate-agent-skills)
  • Merged Python SKILL.md ~278 lines, below the resources/ split threshold
  • No remaining references to cuopt-{lp-milp,qp}-api-{python,c,cli} anywhere in the tree
  • Verify CI passes

…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>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 6, 2026

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.

@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels May 6, 2026
@rgsl888prabhu rgsl888prabhu marked this pull request as ready for review May 6, 2026 18:47
@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner May 6, 2026 18:47
@rgsl888prabhu rgsl888prabhu requested a review from tmckayus May 6, 2026 18:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

📝 Walkthrough

Walkthrough

The 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.

Changes

Numerical Optimization Consolidation

Layer / File(s) Summary
Manifest & Registry
.claude-plugin/marketplace.json, AGENTS.md
Marketplace entries for LP/MILP and QP plugins are replaced with four new numerical-optimization entries (formulation + Python/C/CLI APIs). AGENTS.md catalog updated to list numerical-optimization-formulation and the three new API skills, removing lp-milp-formulation, routing-formulation, qp-formulation, and server-common.
Formulation Consolidation
skills/numerical-optimization-formulation/SKILL.md
New unified formulation guide expands from LP/MILP-centric to cover LP, MILP, and QP. Adds problem-type identification, parsing workflows, convexity checklists, and new sections for piecewise-linear objectives, cutting stock, goal programming, multi-period inventory, blending with shared mixing, and profitability checks.
API Skill Consolidation & Expansion
skills/cuopt-numerical-optimization-api-python/SKILL.md, skills/cuopt-numerical-optimization-api-c/SKILL.md, skills/cuopt-numerical-optimization-api-cli/SKILL.md
Three API skills renamed and expanded to cover LP, MILP, and QP (beta). Each skill's description and documentation updated to reference all three problem types and includes new QP-specific sections detailing rules (MINIMIZE only, continuous variables, PSD for Python), usage examples, and troubleshooting.
Assets & Metadata Updates
skills/cuopt-numerical-optimization-api-python/assets/README.md, skills/cuopt-numerical-optimization-api-python/evals/SOURCES.md, skills/cuopt-lp-milp-api-python/assets/README.md
New reference models table added for numerical-optimization-api-python. Old LP/MILP assets README content removed. Eval sources header updated to reference the new numerical-optimization skill.
Deprecated Skills Cleanup
skills/cuopt-qp-api-python/SKILL.md, skills/cuopt-qp-api-c/SKILL.md, skills/cuopt-qp-api-cli/SKILL.md, skills/qp-formulation/SKILL.md, skills/cuopt-qp-api-c/assets/README.md, skills/cuopt-qp-api-cli/assets/README.md, skills/cuopt-qp-api-python/assets/README.md
Entire documentation and assets removed from all standalone QP skills (Python, C, CLI) and qp-formulation. These capabilities are now folded into the unified numerical-optimization skills.
Cross-reference Updates
skills/skill-evolution/SKILL.md
Placement rule example updated to reference numerical-optimization-formulation and cuopt-numerical-optimization-api-python instead of their LP/MILP variants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main objective of the PR: consolidating LP/MILP and QP skills into a unified numerical-optimization skill family across formulation and API surfaces.
Description check ✅ Passed The description comprehensively explains the PR's purpose, changes, commits, cross-reference updates, validation steps, and testing approach—all directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 285990b and af70748.

⛔ Files ignored due to path filters (5)
  • skills/cuopt-numerical-optimization-api-c/assets/mps_solver/data/sample.mps is excluded by !**/*.mps
  • skills/cuopt-numerical-optimization-api-cli/assets/lp_production/production.mps is excluded by !**/*.mps
  • skills/cuopt-numerical-optimization-api-cli/assets/lp_simple/sample.mps is excluded by !**/*.mps
  • skills/cuopt-numerical-optimization-api-cli/assets/milp_facility/facility.mps is excluded by !**/*.mps
  • skills/cuopt-numerical-optimization-api-python/assets/mps_solver/data/sample.mps is excluded by !**/*.mps
📒 Files selected for processing (57)
  • .claude-plugin/marketplace.json
  • AGENTS.md
  • skills/cuopt-lp-milp-api-python/assets/README.md
  • skills/cuopt-numerical-optimization-api-c/SKILL.md
  • skills/cuopt-numerical-optimization-api-c/assets/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/lp_basic/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/lp_basic/lp_simple.c
  • skills/cuopt-numerical-optimization-api-c/assets/lp_duals/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/lp_duals/lp_duals.c
  • skills/cuopt-numerical-optimization-api-c/assets/lp_warmstart/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/milp_basic/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/milp_basic/milp_simple.c
  • skills/cuopt-numerical-optimization-api-c/assets/milp_production_planning/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/milp_production_planning/milp_production.c
  • skills/cuopt-numerical-optimization-api-c/assets/mps_solver/README.md
  • skills/cuopt-numerical-optimization-api-c/assets/mps_solver/mps_solver.c
  • skills/cuopt-numerical-optimization-api-c/resources/examples.md
  • skills/cuopt-numerical-optimization-api-cli/SKILL.md
  • skills/cuopt-numerical-optimization-api-cli/assets/README.md
  • skills/cuopt-numerical-optimization-api-cli/assets/lp_production/README.md
  • skills/cuopt-numerical-optimization-api-cli/assets/lp_simple/README.md
  • skills/cuopt-numerical-optimization-api-cli/assets/milp_facility/README.md
  • skills/cuopt-numerical-optimization-api-python/SKILL.md
  • skills/cuopt-numerical-optimization-api-python/assets/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/least_squares/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/least_squares/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/lp_basic/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/lp_basic/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/lp_duals/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/lp_duals/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/lp_warmstart/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/lp_warmstart/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/maximization_workaround/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/maximization_workaround/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/milp_basic/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/milp_basic/incumbent_callback.py
  • skills/cuopt-numerical-optimization-api-python/assets/milp_basic/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/milp_production_planning/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/milp_production_planning/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/mps_solver/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/mps_solver/data/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/mps_solver/model.py
  • skills/cuopt-numerical-optimization-api-python/assets/mps_solver/results.md
  • skills/cuopt-numerical-optimization-api-python/assets/portfolio/README.md
  • skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py
  • skills/cuopt-numerical-optimization-api-python/evals/SOURCES.md
  • skills/cuopt-numerical-optimization-api-python/evals/evals.json
  • skills/cuopt-numerical-optimization-api-python/resources/qp_examples.md
  • skills/cuopt-qp-api-c/SKILL.md
  • skills/cuopt-qp-api-c/assets/README.md
  • skills/cuopt-qp-api-cli/SKILL.md
  • skills/cuopt-qp-api-cli/assets/README.md
  • skills/cuopt-qp-api-python/SKILL.md
  • skills/cuopt-qp-api-python/assets/README.md
  • skills/numerical-optimization-formulation/SKILL.md
  • skills/qp-formulation/SKILL.md
  • skills/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

Comment thread AGENTS.md
Comment on lines +26 to +28
- `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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Comment on lines +255 to 257
### Minimal / canonical examples (LP, MILP, QP)
| Model | Type | Description |
|-------|------|-------------|
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
### 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants