You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
Rust library for NP-hard problem reductions. Implements computational problems with reduction rules for transforming between equivalent formulations.
5
5
6
6
## Skills
7
-
-[issue-to-pr](skills/issue-to-pr/SKILL.md) -- Convert a GitHub issue into a PR with an implementation plan. Validates the issue against the appropriate checklist, then dispatches to `add-model` or `add-rule`.
7
+
-[issue-to-pr](skills/issue-to-pr/SKILL.md) -- Convert a GitHub issue into a PR with an implementation plan. One item per PR: `[Rule]` issues require both models to exist on `main`; never bundle model + rule in the same PR.
8
8
-[add-model](skills/add-model/SKILL.md) -- Add a new problem model. Can be used standalone (brainstorms with user) or called from `issue-to-pr`.
9
9
-[add-rule](skills/add-rule/SKILL.md) -- Add a new reduction rule. Can be used standalone (brainstorms with user) or called from `issue-to-pr`.
10
10
-[review-implementation](skills/review-implementation/SKILL.md) -- Review implementation completeness by dispatching parallel subagents (structural + quality) with fresh context. Auto-detects new models/rules from git diff. Called automatically at the end of `add-model`/`add-rule`, after each `executing-plans` batch, or standalone via `/review-implementation`.
When creating a `[Rule]`PR, check if there's already an open `[Model]` PR for the source or target problem:
59
+
For `[Rule]`issues, parse the source and target problem names from the title (e.g., `[Rule] BinPacking to ILP` → source=BinPacking, target=ILP). Verify that **both** models already exist in the codebase on `main`:
60
60
61
61
```bash
62
-
gh pr list --state open --search "[Model]" --json title,number,headRefName
62
+
grep -r "struct SourceName" src/models/
63
+
grep -r "struct TargetName" src/models/
63
64
```
64
65
65
-
- If an open Model PR exists for the source/target problem, the Rule PR should **base its branch on that Model branch** (not `main`), to avoid duplicating CLI registration, export regeneration, etc.
66
-
- If both a `[Model]` and `[Rule]` issue exist for the same problem, prefer implementing them in the **same PR** to avoid redundant work. Base the branch on `main`, implement the model first, then the rule.
66
+
- If **both** models exist → continue to step 4.
67
+
- If either model is missing → **STOP**. Comment on the issue: "Blocked: model `<name>` does not exist in main yet. Please implement it first (or file a `[Model]` issue)."
68
+
69
+
**One item per PR:** Do NOT implement a missing model as part of a `[Rule]` PR. Each PR should contain exactly one model or one rule, never both. This avoids bloated PRs and repeated implementation when the model is needed by multiple rules.
67
70
68
71
### 4. Research References
69
72
@@ -254,5 +257,5 @@ Run /review-pipeline to process Copilot comments, fix CI, and run agentic tests.
254
257
| Not verifying facts from issue | Use WebSearch/WebFetch to cross-check claims |
255
258
| Branch already exists on retry | Check with `git rev-parse --verify` before `git checkout -b`|
256
259
| Dirty working tree | Verify `git status --porcelain` is empty before branching |
257
-
|Redundant Model+Rule PRs | Check for related open PRs (Step 3.5); combine or base on existing branch|
260
+
|Bundling model + rule in one PR | Each PR must contain exactly one model or one rule — STOP and block if model is missing (Step 3.5)|
258
261
| Plan files left in PR | Delete plan files before final push (Step 7c) |
Copy file name to clipboardExpand all lines: .claude/skills/project-pipeline/SKILL.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,16 +45,17 @@ Filter items where `status == "Ready"`. Partition into `[Model]` and `[Rule]` bu
45
45
46
46
#### 0b. Gather Context for Ranking
47
47
48
-
1.**Existing problems:**Call `list_problems` (MCP tool) to get all problems currently in the reduction graph.
48
+
1.**Existing problems:**Grep for problem struct definitions in the codebase: `grep -r "^pub struct" src/models/ | sed 's/.*pub struct \([A-Za-z]*\).*/\1/'` to get all problem names currently implemented on `main`.
49
49
2.**Pending rules:** From the full project board JSON, collect all `[Rule]` issues that are in "Ready" or "In Progress" status. Parse their source/target problem names (e.g., `[Rule] BinPacking to ILP` → source=BinPacking, target=ILP).
50
50
51
51
#### 0c. Check Eligibility
52
52
53
-
**Rule issues require both source and target models to exist.** For each `[Rule]` issue, parse the source and target problem names (e.g., `[Rule] BinPacking to ILP` → source=BinPacking, target=ILP). Check that both appear in the `list_problems` output (existing models) OR in a `[Model]` issue in the current Ready/In Progress columns.
53
+
**Rule issues require both source and target models to exist on `main`.** For each `[Rule]` issue, parse the source and target problem names (e.g., `[Rule] BinPacking to ILP` → source=BinPacking, target=ILP). Check that both appear in the existing problems list (from Step 0b grep).
54
54
55
-
- If both models exist → **eligible**
56
-
- If a missing model has a `[Model]` issue in Ready → eligible only in `--all` mode (the Model will be processed first); in single-issue mode, **skip this Rule** and mark it `[blocked]`
57
-
- If a missing model has no `[Model]` issue at all → **ineligible**, mark it `[blocked]` with reason
55
+
- If both models exist in the codebase → **eligible**
56
+
- If either model is missing from the codebase → **ineligible**, mark it `[blocked]` with reason (e.g., "model X not yet implemented on main")
57
+
58
+
Do NOT consider pending `[Model]` issues as satisfying the dependency — only models already merged to `main` count. This prevents bundling model + rule in the same PR.
58
59
59
60
All `[Model]` issues are always eligible (no dependency check needed).
60
61
@@ -96,7 +97,7 @@ Ready issues (ranked):
96
97
97
98
**If a specific issue number was provided:** verify it is in the Ready column. If it is blocked, STOP with a message explaining which model is missing.
98
99
99
-
**If `--all`:** proceed with all eligible issues in ranked order (highest score first). **Dependency ordering override:** if a `[Model]` issue and a `[Rule]` that depends on it are both eligible, the Model MUST be processed before that Rule regardless of score. Blocked rules are skipped.
100
+
**If `--all`:** proceed with all eligible issues in ranked order (highest score first). Models before Rules at same score. Blocked rules are skipped. After each issue is processed, re-check eligibility for remaining rules (a just-merged Model may unblock them).
100
101
101
102
**Otherwise (no args):** pick the highest-scored eligible (non-blocked) issue and proceed immediately (no confirmation).
102
103
@@ -207,10 +208,10 @@ Completed: 2/4 | In Review: 3 | Returned to Ready: 1
207
208
| Mistake | Fix |
208
209
|---------|-----|
209
210
| Issue not in Ready column | Verify status before processing; STOP if not Ready |
210
-
| Picking a Rule whose model doesn't exist | Hard constraint: both source and target models must exist in codebase or be in a Ready Model issue (for `--all` mode)|
211
+
| Picking a Rule whose model doesn't exist | Hard constraint: both source and target models must exist on `main` — pending Model issues do NOT count|
| Forgetting to move back to Ready on total failure | Only move to In Review if a PR exists |
213
-
| Processing Rules before their Model dependencies | In `--all` mode, ensure Models that unblock pending rules come before those rules regardless of score|
214
+
| Processing Rules before their Model dependencies | In `--all` mode, re-check eligibility after each issue — a just-merged Model may unblock rules|
214
215
| Scoring a variant as "related" | Weighted/unweighted variants or graph-subtype specializations of existing problems score 0 on C2 |
215
216
| Not syncing main between batch issues | Each issue gets a fresh worktree from `origin/main`|
216
217
| Worktree left behind on failure | Always clean up with `git worktree remove` in Step 5 |
0 commit comments