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/propose/SKILL.md
+73-17Lines changed: 73 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
195
195
description: "I'll describe the domain"
196
196
```
197
197
198
-
2.**Definition** — Use `AskUserQuestion` to clarify problem type, then free text for formal definition:
198
+
2.**Definition** — Use `AskUserQuestion` to clarify problem type, then free text for formal definition. Infer the recommendation from the user's problem description (e.g., "find the largest..." → maximize, "find the smallest..." → minimize, "does there exist..." → satisfaction). Mark the inferred option as "(Recommended)":
199
199
```
200
200
AskUserQuestion:
201
201
question: "What kind of problem is this?"
@@ -210,7 +210,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
210
210
```
211
211
Then ask: "Can you state the problem formally? What's the input, constraints, and objective?"
212
212
213
-
3.**Variables** — Use `AskUserQuestion`:
213
+
3.**Variables** — Infer the recommendation from the problem structure (e.g., vertex/edge selection → binary, coloring → k-valued, routing → permutation). Mark the inferred option as "(Recommended)":
214
214
```
215
215
AskUserQuestion:
216
216
question: "How would you represent a solution? What are the decision variables?"
@@ -226,12 +226,54 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
226
226
description: "I'll describe the variable structure"
227
227
```
228
228
229
-
4.**Complexity** — Ask as free text:
230
-
> "What's the best known exact algorithm? Is the problem NP-hard, and if so, is there a reference?"
231
-
- Help them find references if unsure (use WebSearch)
232
-
- Ask for a concrete complexity expression in terms of problem parameters (e.g., O(2^n), O(1.1996^n))
229
+
4.**Complexity & Reference** — Before asking, use WebSearch to research the best known exact algorithms and canonical references for this problem. Then present 3 candidates via `AskUserQuestion`, each combining the complexity bound with its source:
233
230
234
-
5.**Example** — Generate 3 candidate examples yourself (varying in size and structure), then present via `AskUserQuestion`:
231
+
```
232
+
AskUserQuestion:
233
+
question: "What is the best known exact algorithm for this problem?"
234
+
header: "Complexity"
235
+
options:
236
+
- label: "O(<expression>) — <algorithm/author>"
237
+
description: "<paper title, year> — <URL>"
238
+
- label: "O(<expression>) — <algorithm/author>"
239
+
description: "<paper title, year> — <URL>"
240
+
- label: "O(<expression>) — <algorithm/author>"
241
+
description: "<paper title, year> — <URL>"
242
+
- label: "I know a different bound"
243
+
description: "I'll provide the complexity, reference, and link"
244
+
```
245
+
246
+
Requirements:
247
+
- Use concrete numeric exponents (e.g., `1.1996^n`, not `(2-ε)^n`)
248
+
- Every option must include a link to the paper or resource
249
+
- After the user picks one, fetch the BibTeX entry for the chosen reference (from the paper's page, DOI resolver, or Google Scholar) and record it — the BibTeX will be included in the filed issue
250
+
251
+
5.**Solving strategy** — Before presenting options, analyze the problem to determine the best recommendation based on:
252
+
- If the problem has linear constraints and a linear objective → recommend ILP
253
+
- If the problem has binary variables and quadratic interactions → recommend QUBO
254
+
- If the problem is on a small configuration space or has no natural ILP/QUBO formulation → recommend brute-force
255
+
- If a well-known specialized algorithm exists (e.g., polynomial-time for matching, 2-SAT) → recommend that
256
+
257
+
Mark the recommended option with "(Recommended)" in the label:
258
+
```
259
+
AskUserQuestion:
260
+
question: "How can this problem be solved computationally?"
261
+
header: "Solving strategy"
262
+
options:
263
+
- label: "<option> (Recommended)"
264
+
description: "<why this is the best fit for this problem>"
265
+
- label: "<option>"
266
+
description: "<description>"
267
+
- label: "<option>"
268
+
description: "<description>"
269
+
- label: "Specialized algorithm"
270
+
description: "A problem-specific algorithm exists — I'll describe it"
271
+
```
272
+
This determines the "How to solve" section in the issue. At least one option is required — check-issue rejects issues without a solver path.
273
+
274
+
**Important:** If the user chooses "Reduce to ILP" or "Reduce to QUBO", remind them that this requires a reduction rule issue. Either cross-reference an existing rule issue, or plan to file one as a companion rule (which will be proposed in Step 3b Topology Analysis). The model issue's "How to solve" section must reference the rule issue number.
275
+
276
+
6.**Example** — Generate 3 candidate examples yourself (varying in size and structure), then present via `AskUserQuestion`:
235
277
236
278
```
237
279
AskUserQuestion:
@@ -250,7 +292,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
250
292
- Must exercise the problem's core structure
251
293
- Must be small enough to verify by hand
252
294
253
-
6.**Data representation** — Use `AskUserQuestion`:
295
+
7.**Data representation** — Infer the recommendation from the problem definition (e.g., "vertices and edges" → graph, "rows and columns" → matrix, "universe and subsets" → set system). Mark the inferred option as "(Recommended)":
254
296
```
255
297
AskUserQuestion:
256
298
question: "What data defines an instance of this problem?"
@@ -266,9 +308,9 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
266
308
description: "I'll describe the input structure"
267
309
```
268
310
269
-
7.**Variants** — Based on the data representation answer, ask about applicable variants using `AskUserQuestion`. Only show options that are viable for the problem's input structure. Skip this question entirely if no variants apply (e.g., the problem has a fixed unique input structure like Knapsack, Factoring, SubsetSum).
311
+
8.**Variants** — Based on the data representation answer, ask about applicable variants using `AskUserQuestion`. Only show options that are viable for the problem's input structure. Skip this question entirely if no variants apply (e.g., the problem has a fixed unique input structure like Knapsack, Factoring, SubsetSum).
270
312
271
-
**If the input is a graph** (from step 6), ask about graph topology:
313
+
**If the input is a graph** (from step 7), ask about graph topology:
272
314
```
273
315
AskUserQuestion:
274
316
question: "Which graph topologies should this problem support?"
@@ -451,7 +493,7 @@ AskUserQuestion:
451
493
- label: "<Source> → <Target>"
452
494
description: "<why valuable>"
453
495
- label: "I'll file rules separately"
454
-
description: "Skip companion rules for now (model may be flagged as orphan)"
496
+
description: "⚠ WARNING: A model with no reduction rules is an orphan node and WILL be rejected during review"
455
497
```
456
498
457
499
**Ranking criteria** (in order of priority):
@@ -468,9 +510,20 @@ If the user picks one or more rules from Step 3b (or proposes their own):
468
510
469
511
For **each** selected rule, run through the rule brainstorming flow (algorithm, correctness, overhead, example, reference) — but keep it lighter since the model context is already established.
470
512
471
-
If the user declines ("I'll file rule issues separately later"):
472
-
- Accept this, but include a placeholder in the model's "Reduction Rule Crossref" section noting which rules are planned
473
-
- Warn: "Note: the model issue will reference planned rules. If no rule issue is filed, the model may be flagged as an orphan during review."
513
+
If the user declines ("I'll file rules separately later"):
514
+
-**Strongly warn** via `AskUserQuestion`:
515
+
```
516
+
AskUserQuestion:
517
+
question: "A problem with no reduction rules is an orphan node — it will be isolated in the graph and REJECTED during review. Are you sure you want to skip?"
518
+
header: "⚠ Orphan Warning"
519
+
options:
520
+
- label: "Let me propose a rule now"
521
+
description: "I'll define at least one reduction rule to connect this problem to the graph"
description: "I understand the risk. I will file companion rule issues before review."
524
+
```
525
+
- If the user chooses "Let me propose a rule now", go back to Step 3b and let them pick a rule, then brainstorm it.
526
+
- If the user still declines, include a placeholder in the model's "Reduction Rule Crossref" section noting which rules are planned, and add a visible warning in the draft: "⚠ No companion rule filed — this model will be an orphan node until a rule issue is created."
474
527
475
528
---
476
529
@@ -493,18 +546,20 @@ If proposing a model + rules, present all drafts together:
493
546
- Definition (Name, Reference, formal definition)
494
547
- Variables (Count, Per-variable domain, Meaning)
495
548
- Schema (Type name, Variants, Field table — use mathematical types, not programming types)
496
-
- Complexity (expression + citation)
549
+
- Complexity (expression + citation + BibTeX)
497
550
- Extra Remark (if applicable)
498
551
- Reduction Rule Crossref (linking to companion rule issues or noting planned rules)
499
-
- How to solve (brute-force, ILP, or other)
552
+
- How to solve (brute-force, ILP, or other — if ILP/QUBO, must cross-reference rule issue)
500
553
- Example Instance
554
+
- BibTeX (include the BibTeX entry for the complexity/definition reference at the end of the issue)
- Reduction Algorithm (numbered steps, all symbols defined)
505
559
- Size Overhead (table with target metrics and formulas)
506
560
- Validation Method
507
561
- Example (fully worked)
562
+
- BibTeX (include the BibTeX entry for the reference at the end of the issue)
508
563
509
564
---
510
565
@@ -592,6 +647,7 @@ Print all issue URLs when done.
592
647
-**One question at a time** — don't overwhelm; each `AskUserQuestion` call has one focused question
593
648
-**Mathematical language only** — never mention Rust types, traits, macros, or code patterns to the user
594
649
-**Help find references** — use WebSearch to help locate papers, verify claims
650
+
-**Always provide a recommendation** — for every `AskUserQuestion` with multiple choices, analyze the problem context and mark one option as "(Recommended)" with a brief reason. Domain experts benefit from an informed default they can override. Base recommendations on the problem description, existing graph topology, and literature conventions.
595
651
-**Suggest, don't prescribe** — if the user is unsure about complexity or reductions, propose candidates and let them choose
596
652
-**Topology-driven suggestions** — run topology analysis first, then populate `AskUserQuestion` options with the most needed reductions ranked by value
597
653
-**Self-check before filing** — catch problems before they reach review
0 commit comments