feat: add find-solver and find-problem skills, fix KColoring/KN serialization#1040
Merged
feat: add find-solver and find-problem skills, fix KColoring/KN serialization#1040
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pred to/pred fromdirection in both skills (find-solver usespred fromfor outgoing, find-problem usespred tofor incoming)num_colorsfrom--kflag so instances round-trip correctly through JSON (without this, KN instances deserialized withnum_colors=0, causing all solvers to return no solution)Test plan
pred to/pred frombug + KColoring serialization bugcargo test kcolor— all 46 tests passcargo test --package problemreductions-cli— all 17 tests passpred create KColoring --graph 0-1,1-2,2-0 --k 3 | pred solve --solver brute-force -returnsOr(true)pred create KColoring --graph ... --k 3 -o f.json && pred reduce f.json --to ILP -o b.json && pred solve b.json --solver ilpreturns valid coloring🤖 Generated with Claude Code