Skip to content

Commit d8eec69

Browse files
committed
update template
1 parent aff1be2 commit d8eec69

4 files changed

Lines changed: 39 additions & 23 deletions

File tree

.claude/CLAUDE.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ Reduction graph nodes use variant IDs: `ProblemName[/GraphType][/Weighted]`
111111
- Completeness warnings auto-check that all JSON graph nodes/edges are covered in the paper
112112
- `display-name` dict maps `ProblemName` to display text
113113

114-
## Contributing
115-
See the sections below for detailed guides on adding reductions, models, tests, and documentation.
116-
Also see GitHub Issue #3 for coding rules.
117-
118114
## Adding a Reduction Rule (A -> B)
119115

120116
**Reference implementations — read these first:**
@@ -126,11 +122,13 @@ Also see GitHub Issue #3 for coding rules.
126122

127123
### 0. Before Writing Code
128124

129-
1. **Brainstorm** — use `superpowers:brainstorming` to discuss with the user:
130-
- The math (variable mapping, constraint encoding, penalty terms)
131-
- Which example instance to use in `examples/` (must be small, human-explainable, and agreed with the user)
132-
2. **Generate ground truth** — use Python scripts in `scripts/` (run with `uv`) to create test data in `tests/data/<target>/`.
133-
3. **Write plan** — save to `docs/plans/` using `superpowers:writing-plans`.
125+
1. **Ensure you have enough information**
126+
- The reduction algorithm, from reliable source, e.g. a paper or a famous website.
127+
- Which example instance to use in `examples/`, example is expected for human reading.
128+
- The method to generate test data in `tests/data/<target>/` as json files.
129+
130+
otherwise use `superpowers:brainstorming` to discuss with the user.
131+
2. **Write plan** — save to `docs/plans/` using `superpowers:writing-plans`.
134132

135133
### 1. Implement
136134

.claude/skills/issue-to-pr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ Present issue summary to user.
5656
### 3. Verify Issue Completeness
5757

5858
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
59+
- For **[Model]** issues: A clear mathmatical definition, Type specification, Variables and fields, The complexity clarification, verify an existing solver can solve it, or a solving strategy is provided, A detailed example for human.
60+
- For **[Rule]** issues: Source, Target, Reference to verify information, Implementable reduction algorithm, Test dataset generation method, Size overhead, A clear example for human.
6161

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.
62+
Verify facts provided by the user, feel free to ask user questions. If any piece is missing or unclear, comment on the issue via `gh issue comment <number> --body "..."` to ask user clarify. Then stop and wait — do NOT proceed until the issue is complete.
6363

6464
### 4. Research References
6565

.github/ISSUE_TEMPLATE/problem.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ assignees: ''
1212
**Name:** <!-- e.g. MaximumIndependentSet. Use Maximum/Minimum prefix for optimization problems -->
1313
**Reference:** <!-- URL or citation for the formal definition -->
1414

15-
<!-- Formal definition: input, feasibility constraints, and objective.
15+
<!--
16+
Formal definition: input, feasibility constraints, and objective.
1617
Define all symbols (e.g. G, V, E, S, K) before using them.
1718
1819
E.g. "Given an undirected graph G=(V,E) where V is the vertex set and E is the edge set,
@@ -21,17 +22,21 @@ find S ⊆ V such that no two vertices in S are adjacent, maximizing |S|."
2122

2223
## Variables
2324

24-
<!-- How the problem maps to a configuration vector x = (x_0, ..., x_{n-1}).
25-
Use symbols defined above. -->
25+
<!--
26+
How the problem maps to a configuration vector x = (x_0, ..., x_{n-1}).
27+
Use symbols defined above.
28+
-->
2629

2730
- **Count:** <!-- e.g. n = |V| (one variable per vertex) -->
2831
- **Per-variable domain:** <!-- e.g. binary {0,1}, or {0,...,K-1} for K colors -->
2932
- **Meaning:** <!-- e.g. x_i = 1 if vertex i ∈ S (selected in independent set) -->
3033

31-
## Schema
34+
## Schema (data type)
3235

33-
<!-- Describe the data fields that define a problem instance.
34-
Connect fields to the symbols defined above. -->
36+
<!--
37+
Describe the data fields that define a problem instance.
38+
Connect fields to the symbols defined above.
39+
-->
3540

3641
**Type name:** <!-- e.g. MaximumIndependentSet -->
3742
**Variants:** <!-- e.g. graph topology (SimpleGraph, GridGraph, UnitDiskGraph), weighted or unweighted -->
@@ -47,9 +52,20 @@ Connect fields to the symbols defined above. -->
4752
- **Best known exact algorithm:** <!-- e.g. O(1.1996^n) by Xiao & Nagamochi (2017), where n = |V| -->
4853
- **Best known approximation:** <!-- e.g. no PTAS unless P=NP; or 2-approximation via greedy -->
4954

55+
## How to solve
56+
<!--
57+
Solver is required for reduction rule verification purpose.
58+
- Can it be solved by (existing) bruteforce?
59+
- Can it be solved by reducing the integer programming? If so, how to reduce?
60+
- If none apply
61+
-->
62+
5063
## Example Instance
5164

52-
<!-- A small but non-trivial instance with known optimal solution, for testing and the paper.
65+
<!--
66+
A small but non-trivial instance with known optimal solution, for testing and the paper.
5367
Should be large enough to exercise the problem's constraints meaningfully (avoid trivial cases like triangle graphs).
54-
E.g. "Petersen graph: |V|=10, |E|=15, 3-regular. Optimal IS size = 4."
68+
E.g. "Petersen graph: |V|=10, |E|=15, 3-regular. Optimal IS size = 4, and more details.."
69+
70+
This example will be shown in our paper, where you could find some references.
5571
-->

.github/ISSUE_TEMPLATE/rule.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ E.g.
4646
## Example Source Instance
4747

4848
<!-- A small but non-trivial source instance for the paper illustration.
49-
Must be small enough for brute-force solving, but large enough to exercise the reduction meaningfully.
50-
Only provide the source — the example code auto-generates the target instance, solutions, and JSON.
49+
Must be small enough for brute-force solving, but large enough to exercise the reduction meaningfully. E.g. "petersen graph: |V|=10, |E|=15, 3-regular" should be perfect.
50+
Please provide as many details as possible, because
51+
1. this example will appear in the paper.
52+
2. AI needs this information to generate example code, run it, and try to compare with what you provided.
5153
52-
E.g. "Petersen graph: |V|=10, |E|=15, 3-regular"
54+
Please check existing examples in our paper for references.
5355
-->

0 commit comments

Comments
 (0)