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
docs: improve issue templates and issue-to-pr workflow
- Problem template: add schema (fields table), complexity, variables
count; require defining symbols before use
- Rule template: add size overhead table, validation method; connect
code metric names to math symbols
- issue-to-pr skill: replace brainstorming with completeness check,
add reference research step via web search
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**REQUIRED:** Invoke `superpowers:brainstorming` skill with the issue context (if superpowers plugin is available). Otherwise, conduct a manual brainstorming discussion with the user.
58
+
Check that the issue template is fully filled out:
59
+
- For **[Model]** issues: Definition, Variables, Instance Data, Objective, Type Parameters, Example
60
+
- For **[Rule]** issues: Source, Target, Reference, Reduction mapping, Solution Extraction, Size Overhead, Example
57
61
58
-
Brainstorming must cover:
59
-
-**User intent** — clarify what the issue is asking for
60
-
-**Multiple approaches** — explore 2-3 different implementation strategies
61
-
-**Implementation details** — discuss the mathematical formulation, data structures, variable mappings, constraint encodings, and any non-obvious design choices
62
-
-**Existing patterns** — read reference implementations in the codebase (e.g., `spinglass_qubo.rs` for reductions) to understand the conventions
63
-
-**Scope** — agree on which variants to implement (e.g., unweighted only, specific K values)
62
+
If any section is missing or unclear, comment on the issue via `gh issue comment <number> --body "..."` asking the contributor to fill in the missing sections. Then stop and wait — do NOT proceed until the issue is complete.
64
63
65
-
Do NOT skip brainstorming. Do NOT write a plan without user discussion.
64
+
### 4. Research References
66
65
67
-
### 4. Write Plan
66
+
Use `WebSearch` and `WebFetch` to look up the reference URL provided in the issue. This helps:
67
+
- Clarify the formal problem definition and notation
68
+
- Understand the reduction algorithm in detail (variable mapping, penalty terms, proof of correctness)
69
+
- Resolve any ambiguities in the issue description without bothering the contributor
68
70
69
-
After brainstorming concludes, write plan to `docs/plans/YYYY-MM-DD-<slug>.md` using `superpowers:writing-plans`:
71
+
If the reference is a paper or textbook, search for accessible summaries, lecture notes, or Wikipedia articles on the same reduction.
70
72
71
-
### 5. Create PR
73
+
### 5. Write Plan
74
+
75
+
Write plan to `docs/plans/YYYY-MM-DD-<slug>.md` using `superpowers:writing-plans`:
about: Contributors to propose a new model problem
3
+
about: Propose a new problem type
4
4
title: "[Model] Problem name"
5
5
labels: model
6
6
assignees: ''
7
7
8
8
---
9
9
10
-
## Description
11
-
[Problem name, e.g. Maximum Independent Set]
10
+
## Definition
12
11
13
-
[Description, with clear annotation of information source. e.g.
14
-
Given a Graph G=(V,E), an independent set of vertices, i.e. a subset of V such that no two vertices in it are joined by an edge in E. To goal is to find the the independent set with maximum cardinality.
12
+
**Name:**<!-- e.g. MaximumIndependentSet. Use Maximum/Minimum prefix for optimization problems -->
about: Contributors to propose a new reduction rule
4
-
title: "[Rule] Source problem to target problem"
3
+
about: Propose a new reduction rule
4
+
title: "[Rule] Source to Target"
5
5
labels: rule
6
6
assignees: ''
7
7
8
8
---
9
9
10
-
Source problem: [source problem type name A, e.g. MaximumIndependentSet, find problems we already have here: https://codingthrust.github.io/problem-reductions/]
11
-
Target problem: [target problem type name B]
12
-
13
-
## Algorithm
14
-
[
15
-
You can show a detailed math decription here, it will be used for coding implementation and the typst manual (for human) writing.
16
-
]
17
-
18
-
## Validation method
19
-
[
20
-
Proposed method for developing a test dataset (in json) to verify correctness. It is usually by round trip tests. e.g. map an instance A to B, solve B
21
-
e.g.1
22
-
Generate test dataset from an existing library: https://github.com/GiggleLiu/ProblemReductions.jl
23
-
e.g.2
24
-
- Source problem instance 1, expected target problem instance 1
25
-
- Source problem instance 2, expected target problem instance 2
26
-
]
27
-
28
-
## Round trip example to show
29
-
[
30
-
The example shown in the typst manual, focus on human verifiability. It usually includes
31
-
- a short description to what it is about
32
-
- the proposed source problem instance
33
-
]
10
+
**Source:**<!-- e.g. MaximumIndependentSet. Browse existing problems: https://codingthrust.github.io/problem-reductions/ -->
11
+
**Target:**<!-- e.g. QUBO -->
12
+
**Reference:**<!-- URL, paper, or textbook citation for this reduction -->
13
+
14
+
## Reduction Algorithm
15
+
16
+
<!-- How to construct a Target instance from a Source instance.
17
+
18
+
1. Define notation: list all symbols for the source instance (e.g. G=(V,E), n=|V|, m=|E|)
19
+
and the target instance (e.g. Q ∈ R^{n×n}).
20
+
2. Variable mapping: how source variables map to target variables.
21
+
3. Constraint/objective transformation: formulas, penalty terms, etc.
22
+
23
+
Solution extraction follows from the variable mapping, no need to describe separately.
24
+
-->
25
+
26
+
## Size Overhead
27
+
28
+
<!-- How large is the target instance as a polynomial of the source size?
29
+
Use the symbols defined in the Reduction Algorithm above.
30
+
Also provide the code-level metric name (from the problem's `problem_size()` method). -->
0 commit comments