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/skills/add-model/SKILL.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,26 @@ Before any implementation, collect all required information. If called from `iss
29
29
30
30
If any item is missing, ask the user to provide it. Do NOT proceed until the checklist is complete.
31
31
32
+
### Associated Rule Check
33
+
34
+
Before implementation, verify that at least one reduction rule exists or is planned for this problem — otherwise it will be an orphan node in the reduction graph.
35
+
36
+
**Check both directions:**
37
+
38
+
1.**Outbound (this issue → rule issues):** Look for rule issue numbers in the model issue's "Reduction Rule Crossref" section.
39
+
2.**Inbound (rule issues → this problem):** Search open rule issues that reference this problem as source or target:
40
+
```bash
41
+
gh issue list --label rule --state open --limit 500 --json number,title | \
Copy file name to clipboardExpand all lines: .claude/skills/final-review/SKILL.md
+88-10Lines changed: 88 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,32 @@ Collect all information needed for the review:
58
58
59
59
1f. **Check for conflicts with main**: Run `gh pr view <number> --json mergeable`. If there are merge conflicts, launch a subagent to merge `origin/main` into the PR branch (in a worktree) and push the merge commit.
60
60
61
+
1g. **PR / issue comment audit (REQUIRED)**: Final review must check the comment history before recommending merge.
62
+
- Set `REPO=$(gh repo view --json nameWithOwner --jq .nameWithOwner)`
63
+
- Fetch and read:
64
+
- PR conversation comments: `gh api repos/$REPO/issues/<number>/comments`
65
+
- PR inline review comments: `gh api repos/$REPO/pulls/<number>/comments`
66
+
- PR review bodies: `gh api repos/$REPO/pulls/<number>/reviews`
67
+
- linked issue comments, if an issue exists
68
+
- Build a list of every actionable comment and classify each as:
69
+
-`addressed`
70
+
-`superseded / no longer applicable`
71
+
-`still open`
72
+
- Pay special attention to the `## Review Pipeline Report` comment. If it contains a `Remaining issues for final review` section, those items must be reviewed explicitly here.
73
+
- Do **not** recommend merge until every actionable comment has been dispositioned.
74
+
75
+
1h. **Comment status summary**: Prepare a short summary for later steps:
76
+
77
+
> **Comment Audit**
78
+
>
79
+
> [N addressed, M superseded, K still open]
80
+
>
81
+
> Open items:
82
+
> -[comment / issue summary]
83
+
> - ...
84
+
85
+
If no actionable comments remain, report `No open actionable comments`.
86
+
61
87
### Step 2: Usefulness assessment
62
88
63
89
Think critically about whether this model/rule is genuinely useful. Consider:
@@ -102,6 +128,43 @@ Use `AskUserQuestion` to confirm:
102
128
> - "I see an issue" — reviewer describes the problem
103
129
> - "Skip" — skip this check
104
130
131
+
### Step 3b: File whitelist check
132
+
133
+
Check that the PR only touches files expected for its type. Any file outside the whitelist is flagged for review — it may be a legacy pattern or an unrelated change.
134
+
135
+
**Whitelist for [Model] PRs:**
136
+
-`src/models/<category>/<name>.rs` — model implementation
137
+
-`src/unit_tests/models/<category>/<name>.rs` — unit tests
138
+
-`src/example_db/model_builders.rs` — canonical example registration
139
+
-`src/example_db/rule_builders.rs` — only if updating nonempty-style assertions
-`docs/src/reductions/problem_schemas.json` — only if updating field descriptions
155
+
-`problemreductions-cli/tests/cli_tests.rs` — CLI integration tests if adding CLI support
156
+
157
+
If any file falls outside these whitelists, flag it:
158
+
159
+
> **File Whitelist Check**
160
+
>
161
+
> Found N file(s) outside expected whitelist:
162
+
> -`path/to/file` — [what it does, why it may not belong]
163
+
>
164
+
> These should be reviewed — they may follow a deprecated pattern or be unrelated to this PR.
165
+
166
+
If all files are whitelisted, report "All files within expected whitelist" and continue.
167
+
105
168
### Step 4: Completeness check
106
169
107
170
Verify the PR includes all required components. Check:
@@ -124,6 +187,13 @@ Verify the PR includes all required components. Check:
124
187
-[ ] Canonical rule example in `src/example_db/rule_builders.rs`
125
188
-[ ] Paper section in `docs/paper/reductions.typ` (`reduction-rule` entry)
126
189
190
+
**Paper-example consistency check (both Model and Rule PRs):**
191
+
192
+
The paper example must use data from the generated JSON (`docs/paper/examples/generated/`), not hand-written data. To verify:
193
+
1. Run `make examples` on the PR branch to regenerate `docs/paper/examples/generated/models.json` and `rules.json`.
194
+
2. For **[Rule] PRs**: the paper's `reduction-rule` entry must call `load-example(source, target)` (defined in `reductions.typ`) to load the canonical example from `rules.json`, and derive all concrete values from the loaded data using Typst array operations — no hand-written instance data.
195
+
3. For **[Model] PRs**: read the problem's entry in `models.json` and compare its `instance` field against the paper's `problem-def` example. The paper example must use the same instance (allowing 0-indexed JSON vs 1-indexed math notation). If they differ, flag: "Paper example does not match `example_db` canonical instance in `models.json`."
196
+
127
197
Report missing items:
128
198
129
199
> **Completeness Check**
@@ -162,32 +232,40 @@ Present to reviewer:
162
232
> Strengths:
163
233
> -[bullet points]
164
234
>
165
-
> Weaknesses:
166
-
> -[bullet points]
235
+
> Weaknesses (numbered):
236
+
> 1.[issue description — file:line if applicable]
237
+
> 2.[issue description — file:line if applicable]
238
+
> ...
167
239
>
168
240
> Comparable to: [name a similar-quality existing model/rule for reference]
169
241
170
242
### Step 6: Final decision
171
243
172
-
Summarize all findings and ask the reviewer for a decision.
244
+
Summarize all findings and present the numbered issues as selectable options.
173
245
174
246
Present a summary table:
175
247
176
248
| Aspect | Result |
177
249
|--------|--------|
250
+
| Comments |[All addressed / Open: X, Y]|
178
251
| Usefulness |[Useful/Marginal/Not useful]|
179
252
| Safety |[Safe/Concerns found]|
180
253
| Completeness |[Complete/Missing: X, Y]|
181
254
| Quality |[N%]|
182
255
| PR URL |[link]|
183
256
184
-
Use `AskUserQuestion`:
257
+
Then present all numbered issues from Step 5 as a multi-select `AskUserQuestion`:
258
+
259
+
> **Which issues should be fixed before merging?** (select all that apply, or "Merge as-is")
> - "OnHold" — move to OnHold column with a reason
265
+
266
+
This lets the reviewer cherry-pick exactly which issues to fix. If the reviewer selects fixes, proceed to Step 7 Quick fix. If "Merge as-is", proceed to Step 7 Merge.
185
267
186
-
> **What would you like to do with this PR?**
187
-
> - "Merge" — approve and show merge link for browser
188
-
> - "OnHold" — move to OnHold column with a reason comment
189
-
> - "Quick fix" — fix specific issues before merging (describe what to fix)
190
-
> - "Reject" — close the PR with explanation
268
+
If any actionable PR / issue comment from Step 1g is still open, `Merge as-is` must **not** be your recommendation. Recommend either **Quick fix** or **OnHold** instead.
191
269
192
270
### Step 7: Execute decision
193
271
@@ -208,7 +286,7 @@ Use `AskUserQuestion`:
208
286
```
209
287
210
288
**If Quick fix:**
211
-
1.Ask the reviewer what needs fixing (use `AskUserQuestion`).
289
+
1.Apply only the fixes the reviewer selected in Step 6.
212
290
2. Checkout the PR branch in a worktree, apply fixes, commit, push.
213
291
3. After push, go back to Step 6 to re-confirm the decision.
0 commit comments