Skip to content

Commit 5bd4da9

Browse files
committed
update
1 parent d34477e commit 5bd4da9

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

.claude/skills/final-review/SKILL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Check that the PR only touches files expected for its type. Any file outside the
141141
- `docs/src/reductions/problem_schemas.json` — schema export
142142
- `docs/src/reductions/reduction_graph.json` — graph export
143143
- `tests/suites/trait_consistency.rs` — trait consistency entry
144+
- `problemreductions-cli/tests/cli_tests.rs` — CLI integration tests for `pred create`
144145

145146
**Whitelist for [Rule] PRs:**
146147
- `src/rules/<source>_<target>.rs` — reduction implementation
@@ -151,6 +152,7 @@ Check that the PR only touches files expected for its type. Any file outside the
151152
- `docs/paper/reductions.typ` — paper entry
152153
- `docs/src/reductions/reduction_graph.json` — graph export
153154
- `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
154156

155157
If any file falls outside these whitelists, flag it:
156158

@@ -185,6 +187,13 @@ Verify the PR includes all required components. Check:
185187
- [ ] Canonical rule example in `src/example_db/rule_builders.rs`
186188
- [ ] Paper section in `docs/paper/reductions.typ` (`reduction-rule` entry)
187189

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+
188197
Report missing items:
189198

190199
> **Completeness Check**

.claude/skills/write-model-in-paper/SKILL.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,28 @@ achieves $O^*(2^n)$ @bjorklund2009.
126126

127127
### 3c. Example with Visualization
128128

129-
A concrete small instance that illustrates the problem. Requirements:
129+
A concrete small instance that illustrates the problem. **The example must use data from the generated `models.json`**, not an independently invented instance.
130+
131+
#### Sourcing example data
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.
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+
4. Use `optimal` configurations to show the solution.
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.
139+
140+
#### Requirements
130141

131142
1. **Small enough to verify by hand** — readers should be able to check the solution
132143
2. **Include a diagram/graph** using the paper's visualization helpers
133144
3. **Show a valid/optimal solution** and explain why it is valid/optimal
134145
4. **Walk through evaluation** — show how the objective/verifier computes the solution value
135146

136-
Structure:
147+
#### Structure
137148

138149
```typst
139-
*Example.* Consider [instance description with concrete numbers].
150+
*Example.* Consider [instance description with concrete numbers from models.json].
140151
[Describe the solution and why it's valid/optimal].
141152
142153
#figure({
@@ -174,7 +185,7 @@ make paper
174185
- [ ] **Notation self-contained**: every symbol in `def` is defined before first use
175186
- [ ] **Background present**: historical context, applications, or structural properties
176187
- [ ] **Algorithms cited**: every complexity claim has `@citation` or footnote warning
177-
- [ ] **Example present**: concrete small instance with visualization
188+
- [ ] **Example from JSON**: instance data matches `models.json` canonical example (not independently invented)
178189
- [ ] **Evaluation shown**: objective/verifier computed on the example solution
179190
- [ ] **Diagram included**: figure with caption and label for graph/matrix/set visualization
180191
- [ ] **Paper compiles**: `make paper` succeeds without errors

0 commit comments

Comments
 (0)