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-rule/SKILL.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,18 +155,17 @@ Step-by-step walkthrough with concrete numbers from JSON data. Required steps:
155
155
1. Show source instance (dimensions, structure, graph visualization if applicable)
156
156
2. Walk through construction with intermediate values
157
157
3. Verify a concrete solution end-to-end
158
-
4.Solution count: `#src_tgt.solutions.len()` with combinatorial justification
158
+
4.Witness semantics: state that the fixture stores one canonical witness; if multiplicity matters mathematically, explain it from the construction rather than from `solutions.len()`
159
159
160
160
Use `graph-colors`, `g-node()`, `g-edge()` for graph visualization — see reference examples.
161
161
162
162
### 5d. Build and verify
163
163
164
164
```bash
165
-
make examples # Regenerate example JSON
166
165
make paper # Must compile without errors
167
166
```
168
167
169
-
Checklist: notation self-contained, complexity cited, overhead consistent, example uses JSON data (not hardcoded), solution verified end-to-end, solution count stated, paper compiles.
168
+
Checklist: notation self-contained, complexity cited, overhead consistent, example uses JSON data (not hardcoded), solution verified end-to-end, witness semantics respected, paper compiles.
Copy file name to clipboardExpand all lines: .claude/skills/final-review/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,10 +197,10 @@ Verify the PR includes all required components. Check:
197
197
198
198
**Paper-example consistency check (both Model and Rule PRs):**
199
199
200
-
The paper example must use data from the generated JSON (`docs/paper/examples/generated/`), not hand-written data. To verify:
201
-
1.Run `make examples` on the PR branch to regenerate `docs/paper/examples/generated/models.json` and `rules.json`.
202
-
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.
203
-
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`."
200
+
The paper example must use data from the canonical fixture JSON (`src/example_db/fixtures/examples.json`), not hand-written data. To verify:
201
+
1.If the PR changes example builders/specs, run `make regenerate-fixtures` on the PR branch.
202
+
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 `examples.json`, and derive all concrete values from the loaded data using Typst array operations — no hand-written instance data.
203
+
3. For **[Model] PRs**: read the problem's entry in `examples.json`under `models`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 `examples.json`."
204
204
205
205
**Issue–test round-trip consistency check (both Model and Rule PRs):**
A concrete small instance that illustrates the problem. **The example must use data from the generated `models.json`**, not an independently invented instance.
129
+
A concrete small instance that illustrates the problem. **The example must use data from the checked-in canonical fixture DB**, not an independently invented instance.
130
130
131
131
#### Sourcing example data
132
132
133
-
1.Run `make examples` to ensure `docs/paper/examples/generated/models.json` is up to date.
134
-
2. Find the problem's entry in `models.json` — it contains the canonical `instance`, `samples`, and `optimal` fields.
133
+
1.If you changed example builders/specs, run `make regenerate-fixtures` to refresh `src/example_db/fixtures/examples.json`.
134
+
2. Find the problem's entry in `src/example_db/fixtures/examples.json` under `models` — it contains the canonical `instance`, `samples`, and `optimal` fields.
135
135
3. Use the values from `instance` in the paper example (translating 0-indexed code values to 1-indexed math notation where conventional, e.g., vertices {0,...,n-1} → {1,...,n}).
136
136
4. Use `optimal` configurations to show the solution.
137
137
138
-
**Do not invent a different instance.** If the canonical example is too large or not pedagogically ideal, fix it in `canonical_model_example_specs()` first, re-run `make examples`, then write the paper entry from the updated JSON.
138
+
**Do not invent a different instance.** If the canonical example is too large or not pedagogically ideal, fix it in `canonical_model_example_specs()` first, re-run `make regenerate-fixtures`, then write the paper entry from the updated JSON.
139
139
140
140
#### Requirements
141
141
@@ -147,7 +147,7 @@ A concrete small instance that illustrates the problem. **The example must use d
147
147
#### Structure
148
148
149
149
```typst
150
-
*Example.* Consider [instance description with concrete numbers from models.json].
150
+
*Example.* Consider [instance description with concrete numbers from `examples.json`].
151
151
[Describe the solution and why it's valid/optimal].
152
152
153
153
#figure({
@@ -185,7 +185,7 @@ make paper
185
185
-[ ]**Notation self-contained**: every symbol in `def` is defined before first use
186
186
-[ ]**Background present**: historical context, applications, or structural properties
187
187
-[ ]**Algorithms cited**: every complexity claim has `@citation` or footnote warning
188
-
-[ ]**Example from JSON**: instance data matches `models.json` canonical example (not independently invented)
188
+
-[ ]**Example from JSON**: instance data matches `src/example_db/fixtures/examples.json` canonical example (not independently invented)
189
189
-[ ]**Evaluation shown**: objective/verifier computed on the example solution
190
190
-[ ]**Diagram included**: figure with caption and label for graph/matrix/set visualization
191
191
-[ ]**Paper compiles**: `make paper` succeeds without errors
| Last |Solution count: `#src_tgt.solutions.len()` with brief combinatorial justification. |
180
+
| Last |State that the fixture stores one canonical witness; if multiplicity matters, justify it mathematically from the construction. |
181
181
182
182
### 4d. Graph Visualization (if applicable)
183
183
@@ -202,8 +202,8 @@ Each step should:
202
202
// Target configuration (e.g., binary encoding)
203
203
#src_tgt_sol.target_config.map(str).join(", ")
204
204
205
-
// Number of optimal solutions
206
-
#src_tgt.solutions.len()
205
+
// The canonical witness pair
206
+
#src_tgt.solutions.at(0)
207
207
208
208
// Source instance fields
209
209
#src_tgt.source.instance.num_vertices
@@ -220,9 +220,6 @@ If this is a new problem not yet in the paper, add to the `display-name` diction
220
220
## Step 6: Build and Verify
221
221
222
222
```bash
223
-
# Regenerate example JSON (if not already done)
224
-
make examples
225
-
226
223
# Build the paper
227
224
make paper
228
225
```
@@ -234,7 +231,7 @@ make paper
234
231
-[ ]**Overhead consistent**: prose dimensions match auto-derived overhead from JSON edge data
235
232
-[ ]**Example uses JSON data**: concrete values come from `load-example`/`load-results`, not hardcoded
236
233
-[ ]**Solution verified**: at least one solution checked end-to-end in the example
237
-
-[ ]**Solution count**: `solutions.len()`stated with combinatorial explanation
234
+
-[ ]**Witness semantics**: text treats `solutions.at(0)`as the canonical witness; any multiplicity claim is derived mathematically, not from fixture length
238
235
-[ ]**Paper compiles**: `make paper` succeeds without errors
239
236
-[ ]**Completeness check**: no new warnings about missing edges in the paper
0 commit comments