Skip to content

feat: add find-solver and find-problem skills, fix KColoring/KN serialization#1040

Merged
GiggleLiu merged 6 commits intomainfrom
feat/find-solver-find-problem-skills
Apr 11, 2026
Merged

feat: add find-solver and find-problem skills, fix KColoring/KN serialization#1040
GiggleLiu merged 6 commits intomainfrom
feat/find-solver-find-problem-skills

Conversation

@GiggleLiu
Copy link
Copy Markdown
Contributor

Summary

  • Add find-solver skill — interactive guide that matches a real-world problem to a library model, explores reduction paths, recommends solvers, and generates a solution doc
  • Add find-problem skill — reverse of find-solver: given a solver for a model, discovers what other problems it can handle via incoming reductions, ranked by effective complexity
  • Fix pred to/pred from direction in both skills (find-solver uses pred from for outgoing, find-problem uses pred to for incoming)
  • Fix KColoring/KN schema-driven creation: inject num_colors from --k flag so instances round-trip correctly through JSON (without this, KN instances deserialized with num_colors=0, causing all solvers to return no solution)

Test plan

  • Agentic skill test for find-solver (researcher persona, graph coloring use case) — found and fixed pred to/pred from bug + KColoring serialization bug
  • Agentic skill test for find-problem (physicist persona, MIS/TriangularSubgraph use case) — found and fixed mirror direction bug
  • cargo test kcolor — all 46 tests pass
  • cargo test --package problemreductions-cli — all 17 tests pass
  • End-to-end: pred create KColoring --graph 0-1,1-2,2-0 --k 3 | pred solve --solver brute-force - returns Or(true)
  • End-to-end: pred create KColoring --graph ... --k 3 -o f.json && pred reduce f.json --to ILP -o b.json && pred solve b.json --solver ilp returns valid coloring

🤖 Generated with Claude Code

GiggleLiu and others added 6 commits April 11, 2026 10:18
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a given model

Reverse of /find-solver: given a solver for a specific model, explore
incoming reductions to discover what other problems the solver can handle,
ranked by effective complexity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…f hop-by-hop

Consistent with find-problem: use `pred to --hops 3` to discover all
reachable targets at once, present ranked table, user picks path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ix KColoring/KN serialization

find-solver Step 3 used `pred to` (incoming) when it should use `pred from`
(outgoing) to find solver-ready targets. find-problem Step 2 had the mirror
bug: `pred from` (outgoing) instead of `pred to` (incoming) for discovering
problems that reduce to the user's model.

Also fix KColoring/KN schema-driven creation: inject `num_colors` from --k
into JSON so the value round-trips correctly. Without this, KN instances
deserialized with num_colors=0, causing all solvers to return no solution.

Found via agentic skill tests with simulated expert users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.97%. Comparing base (0f9db3c) to head (34b77c7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1040      +/-   ##
==========================================
- Coverage   97.97%   97.97%   -0.01%     
==========================================
  Files         979      979              
  Lines      100912   100912              
==========================================
- Hits        98868    98865       -3     
- Misses       2044     2047       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GiggleLiu GiggleLiu merged commit f85865a into main Apr 11, 2026
5 checks passed
@GiggleLiu GiggleLiu deleted the feat/find-solver-find-problem-skills branch April 12, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant