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
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ Rust library for NP-hard problem reductions. Implements computational problems w
17
17
-[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).
18
18
-[project-pipeline](skills/project-pipeline/SKILL.md) -- Pick a Ready issue from the GitHub Project board, move it through In Progress -> issue-to-pr --execute -> review-agentic.
19
19
-[review-pipeline](skills/review-pipeline/SKILL.md) -- Pick a PR from review-agentic column, fix Copilot review comments, fix CI, run agentic feature tests, move to In Review.
20
+
-[dev-setup](skills/dev-setup/SKILL.md) -- Interactive wizard to install and configure all development tools for new maintainers.
Filter items where `status == "Ready"`. Partition into `[Model]` and `[Rule]` buckets, sort each by issue number ascending. Final order: **all Models first, then all Rules** (so dependencies are satisfied).
44
+
Filter items where `status == "Ready"`. Partition into `[Model]` and `[Rule]` buckets.
45
+
46
+
#### 0b. Gather Context for Ranking
47
+
48
+
1.**Existing problems:** Call `list_problems` (MCP tool) to get all problems currently in the reduction graph.
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
+
51
+
#### 0c. Score Each Issue
52
+
53
+
Score each Ready issue on three criteria. For `[Model]` issues, extract the problem name. For `[Rule]` issues, extract both source and target problem names.
54
+
55
+
| Criterion | Weight | How to Assess |
56
+
|-----------|--------|---------------|
57
+
|**C1: Industrial/Theoretical Importance**| 3 | Read the issue body. Score 0-2: **2** = widely used in industry or foundational in complexity theory (e.g., ILP, SAT, MaxFlow, TSP, GraphColoring); **1** = moderately important or well-studied (e.g., SubsetSum, SetCover, Knapsack); **0** = niche or primarily academic |
58
+
|**C2: Related to Existing Problems**| 2 | Check if the problem connects to problems already in the reduction graph (via `list_problems`). Score 0-2: **2** = directly related (shares input structure or has known reductions to/from ≥2 existing problems, but is NOT a trivial variant of an existing one); **1** = loosely related (same domain, connects to 1 existing problem); **0** = isolated or is essentially a variant/renaming of an existing problem |
59
+
|**C3: Unblocks Pending Rules**| 2 | Check if this issue is a dependency for pending `[Rule]` issues. Score 0-2: **2** = unblocks ≥2 pending rules (a `[Model]` issue whose problem appears as source or target in ≥2 pending rules); **1** = unblocks 1 pending rule; **0** = does not unblock any pending rule |
Print the list for visibility (no confirmation needed):
63
+
**Tie-breaking:** Models before Rules, then by lower issue number.
64
+
65
+
**Important for C2:** A problem that is merely a weighted/unweighted variant or a graph-subtype specialization of an existing problem scores **0** on C2, not 2. The goal is to add genuinely new problem types that expand the graph's reach.
66
+
67
+
#### 0d. Apply Hard Constraints
68
+
69
+
**Rule issues require both source and target models to exist.** For each `[Rule]` issue, check that both its source and target problem names appear in the `list_problems` output (existing models) OR in a `[Model]` issue in the current Ready/In Progress columns.
70
+
71
+
- If both models exist → eligible
72
+
- 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]`
73
+
- If a missing model has no `[Model]` issue at all → **ineligible**, mark it `[blocked]` with reason
74
+
75
+
#### 0e. Print Ranked List
76
+
77
+
Print all Ready issues with their scores for visibility (no confirmation needed). Blocked rules appear at the bottom with their reason:
3 #130 [Rule] MultivariateQuadratic to ILP -- model "MultivariateQuadratic" not yet implemented
56
91
```
57
92
58
-
**If a specific issue number was provided:** verify it is in the Ready column. If not, STOP with a message.
93
+
#### 0f. Pick Issues
94
+
95
+
**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.
59
96
60
-
**If `--all`:** proceed immediately with all Ready issues in order (no confirmation).
97
+
**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.
61
98
62
-
**Otherwise (no args):** pick the first issue in the ordered list (Models before Rules, lowest number first) and proceed immediately (no confirmation).
99
+
**Otherwise (no args):** pick the highest-scored eligible (non-blocked) issue and proceed immediately (no confirmation).
63
100
64
101
### 1. Create Worktree
65
102
@@ -167,9 +204,11 @@ Completed: 2/4 | In Review: 3 | Returned to Ready: 1
167
204
| Mistake | Fix |
168
205
|---------|-----|
169
206
| Issue not in Ready column | Verify status before processing; STOP if not Ready |
207
+
| 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) |
| Forgetting to move back to Ready on total failure | Only move to In Review if a PR exists |
172
-
| Processing Rules before Models | Always sort Models first — Rules may depend on them |
210
+
| Processing Rules before their Model dependencies | In `--all` mode, ensure Models that unblock pending rules come before those rules regardless of score |
211
+
| Scoring a variant as "related" | Weighted/unweighted variants or graph-subtype specializations of existing problems score 0 on C2 |
173
212
| Not syncing main between batch issues | Each issue gets a fresh worktree from `origin/main`|
174
213
| Worktree left behind on failure | Always clean up with `git worktree remove` in Step 5 |
175
214
| Working in main checkout | All work happens in `.worktrees/` — never modify the main checkout |
A PR is **eligible** only if the count is ≥ 1 (Copilot has submitted at least one review). PRs without a Copilot review yet are marked `[waiting for Copilot]` and skipped.
52
+
53
+
#### 0b. Print the List
54
+
55
+
Print all review-agentic items with their Copilot status:
#571 Fix #97: [Rule] BinPacking to ILP [waiting for Copilot]
48
61
```
49
62
50
-
**If a specific PR number was provided:** verify it is in the review-agentic column. If not, STOP with a message.
63
+
**If a specific PR number was provided:** verify it is in the review-agentic column. If it is waiting for Copilot, STOP with a message: `PR #N is waiting for Copilot review. Re-run after Copilot has reviewed.`
51
64
52
-
**If `--all`:** process all items in order (lowest PR number first).
65
+
**If `--all`:** process only eligible (Copilot-reviewed) items in order (lowest PR number first). Skip waiting items.
53
66
54
-
**Otherwise:** pick the first item.
67
+
**Otherwise:** pick the first eligible item. If no items are eligible, STOP with: `No review-agentic PRs have been reviewed by Copilot yet.`
55
68
56
69
### 1. Create Worktree and Checkout PR Branch
57
70
@@ -71,7 +84,7 @@ All subsequent steps run inside the worktree.
71
84
72
85
### 2. Fix Copilot Review Comments
73
86
74
-
Check for existing Copilot review comments (no waiting — Copilot review was already requested by `issue-to-pr`):
87
+
Copilot review is guaranteed to exist (verified in Step 0). Fetch the comments:
75
88
76
89
```bash
77
90
COMMENTS=$(gh api repos/$REPO/pulls/$PR/comments --jq '[.[] | select(.user.login == "copilot-pull-request-reviewer[bot]")]')
@@ -83,7 +96,7 @@ If there are actionable comments: invoke `/fix-pr` to address them, then push:
83
96
git push
84
97
```
85
98
86
-
If no comments (or Copilot hasn't reviewed yet): skip to next step.
99
+
If Copilot approved with no actionable comments: skip to next step.
87
100
88
101
### 3. Agentic Feature Test
89
102
@@ -191,6 +204,7 @@ Completed: 2/2 | All moved to In Review
191
204
| Mistake | Fix |
192
205
|---------|-----|
193
206
| PR not in review-agentic column | Verify status before processing; STOP if not review-agentic |
207
+
| Picking a PR before Copilot has reviewed | Check `pulls/$PR/reviews` for copilot-pull-request-reviewer[bot]; skip if absent |
0 commit comments