Skip to content

Commit 692337e

Browse files
zazabapclaude
andcommitted
merge: resolve conflict in problem_name.rs (keep both KS and MaxMatching aliases)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 parents 48239c5 + 5fbde0e commit 692337e

31 files changed

Lines changed: 2299 additions & 224 deletions

File tree

.claude/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Rust library for NP-hard problem reductions. Implements computational problems w
1212
- [write-model-in-paper](skills/write-model-in-paper/SKILL.md) -- Write or improve a problem-def entry in the Typst paper. Covers formal definition, background, example with visualization, and algorithm list.
1313
- [write-rule-in-paper](skills/write-rule-in-paper/SKILL.md) -- Write or improve a reduction-rule entry in the Typst paper. Covers complexity citation, self-contained proof, detailed example, and verification.
1414
- [release](skills/release/SKILL.md) -- Create a new crate release. Determines version bump from diff, verifies tests/clippy, then runs `make release`.
15+
- [check-issue](skills/check-issue/SKILL.md) -- Quality gate for `[Rule]` and `[Model]` issues. Checks usefulness, non-triviality, correctness of literature, and writing quality. Posts structured report and adds failure labels.
1516
- [meta-power](skills/meta-power/SKILL.md) -- Batch-resolve all open `[Model]` and `[Rule]` issues autonomously: plan, implement, review, fix CI, merge — in dependency order (models first).
1617

1718
## Commands
@@ -39,6 +40,7 @@ make cli # Build the pred CLI tool (release mode)
3940
make cli-demo # Run closed-loop CLI demo (exercises all commands)
4041
make mcp-test # Run MCP server tests (unit + integration)
4142
make run-plan # Execute a plan with Claude autorun
43+
make run-issue N=42 # Run issue-to-pr --execute for a GitHub issue
4244
make copilot-review # Request Copilot code review on current PR
4345
make release V=x.y.z # Tag and push a new release (CI publishes to crates.io)
4446
```

.claude/skills/add-model/SKILL.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,21 @@ Update the CLI dispatch table so `pred` can load, solve, and serialize the new p
124124
- Add a lowercase alias mapping in `resolve_alias()` (e.g., `"newproblem" => "NewProblem".to_string()`)
125125
- Optionally add short aliases to `ALIASES` array (e.g., `("NP", "NewProblem")`)
126126

127+
## Step 4.5: Add CLI creation support
128+
129+
Update `problemreductions-cli/src/commands/create.rs` so `pred create <ProblemName>` works:
130+
131+
1. **Add a match arm** in the `create()` function's main `match canonical.as_str()` block. Parse CLI flags and construct the problem:
132+
- Graph-based problems with vertex weights: add to the `"MaximumIndependentSet" | ... | "MaximalIS"` arm
133+
- Problems with unique fields: add a new arm that parses the required flags and calls the constructor
134+
- See existing arms for patterns (e.g., `"BinPacking"` for simple fields, `"MaximumSetPacking"` for set-based)
135+
136+
2. **Add CLI flags** in `problemreductions-cli/src/cli.rs` (`CreateArgs` struct) if the problem needs flags not already present. Update `all_data_flags_empty()` accordingly.
137+
138+
3. **Update help text** in `CreateArgs`'s `after_help` to document the new problem's flags.
139+
140+
4. **Schema alignment**: The `ProblemSchemaEntry` fields should list **constructor parameters** (what the user provides), not internal derived fields. For example, if `m` and `n` are derived from a matrix, only list `matrix` and `k` in the schema.
141+
127142
## Step 5: Write unit tests
128143

129144
Create `src/unit_tests/models/<category>/<name>.rs`:
@@ -147,7 +162,7 @@ Invoke the `/write-model-in-paper` skill to write the problem-def entry in `docs
147162
make test clippy # Must pass
148163
```
149164

150-
Then run the [review-implementation](../review-implementation/SKILL.md) skill to verify all structural and semantic checks pass.
165+
If running standalone (not inside `make run-plan`), invoke [review-implementation](../review-implementation/SKILL.md) to verify all structural and semantic checks pass. When running inside a plan, the outer orchestrator handles the review.
151166

152167
## Naming Conventions
153168

@@ -168,3 +183,5 @@ Then run the [review-implementation](../review-implementation/SKILL.md) skill to
168183
| Forgetting `declare_variants!` | Required for variant complexity metadata used by the paper's auto-generated table |
169184
| Forgetting CLI dispatch | Must add match arms in `dispatch.rs` (`load_problem` + `serialize_any_problem`) |
170185
| Forgetting CLI alias | Must add lowercase entry in `problem_name.rs` `resolve_alias()` |
186+
| Forgetting CLI create | Must add creation handler in `commands/create.rs` and flags in `cli.rs` |
187+
| Schema lists derived fields | Schema should list constructor params, not internal fields (e.g., `matrix, k` not `matrix, m, n, k`) |

.claude/skills/add-rule/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ cargo run --example export_schemas # Update problem schemas
139139
make test clippy # Must pass
140140
```
141141

142-
Then run the [review-implementation](../review-implementation/SKILL.md) skill to verify all structural and semantic checks pass.
142+
If running standalone (not inside `make run-plan`), invoke [review-implementation](../review-implementation/SKILL.md) to verify all structural and semantic checks pass. When running inside a plan, the outer orchestrator handles the review.
143143

144144
## Solver Rules
145145

0 commit comments

Comments
 (0)