Skip to content

Commit 0e14c45

Browse files
committed
update
1 parent 58c400f commit 0e14c45

1 file changed

Lines changed: 74 additions & 14 deletions

File tree

.claude/skills/propose/SKILL.md

Lines changed: 74 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@ digraph propose {
4141
"File issue(s)" [shape=box];
4242
"Done" [shape=doublecircle];
4343
44+
"Study conventions" [shape=box];
45+
4446
"Start" -> "Detect type";
45-
"Detect type" -> "Brainstorm Model" [label="model"];
46-
"Detect type" -> "Brainstorm Rule (standalone)" [label="rule"];
47+
"Detect type" -> "Study conventions" [label="model or rule"];
4748
"Detect type" -> "Start" [label="ask user"];
49+
"Study conventions" -> "Brainstorm Model" [label="model"];
50+
"Study conventions" -> "Brainstorm Rule (standalone)" [label="rule"];
4851
"Brainstorm Model" -> "Topology analysis";
4952
"Topology analysis" -> "Propose rules?";
5053
"Propose rules?" -> "Brainstorm Rule(s)" [label="yes"];
@@ -80,6 +83,66 @@ AskUserQuestion:
8083

8184
---
8285

86+
## Step 1b: Study Conventions
87+
88+
Right after the user picks model or rule, **study at least one existing case** in the relevant category before asking any brainstorming questions. This grounds the conversation in the project's actual conventions and helps produce higher-quality drafts.
89+
90+
### For Models
91+
92+
1. Ask the user a brief orienting question (free text):
93+
> "What problem are you thinking of? A name or rough description is enough."
94+
95+
2. Based on the answer, identify the most similar existing problem in the graph. Use `pred list --json` to find candidates, then use `pred show <similar_problem>` to study one in detail:
96+
97+
```bash
98+
pred show <similar_problem> --json
99+
```
100+
101+
Also find and read one closed `[Model]` issue in the same category:
102+
103+
```bash
104+
gh issue list --label model --state closed --limit 20 --json number,title,body | jq '[.[] | select(.title | test("<keyword>"; "i"))] | .[0]'
105+
```
106+
107+
If no keyword match, just read the most recent closed model issue to see the template conventions.
108+
109+
3. **Note internally** (do not dump raw output to the user):
110+
- What fields / size fields the similar problem has
111+
- How the issue defines variables, schema, complexity
112+
- What level of mathematical detail is expected in examples
113+
- How the "Reduction Rule Crossref" section is structured
114+
115+
Use these conventions to guide the brainstorming questions and draft formatting in later steps.
116+
117+
### For Rules
118+
119+
1. Ask the user a brief orienting question (free text):
120+
> "Which two problems are you thinking of connecting? Even a rough idea is fine."
121+
122+
2. Based on the answer, study one existing reduction between similar problems. Use `pred neighbors <source_or_target> --json` to find existing reductions, then pick the most relevant one and examine it:
123+
124+
```bash
125+
pred neighbors <problem> --json
126+
```
127+
128+
Also find and read one closed `[Rule]` issue in a similar domain:
129+
130+
```bash
131+
gh issue list --label rule --state closed --limit 20 --json number,title,body | jq '[.[] | select(.title | test("<keyword>"; "i"))] | .[0]'
132+
```
133+
134+
3. **Note internally**:
135+
- How the reduction algorithm is structured (numbered steps, symbol definitions)
136+
- How the size overhead table is formatted (field names, formulas)
137+
- How the example is worked through (source → construction → target → solution)
138+
- What references and validation methods are used
139+
140+
Use these conventions to guide the brainstorming questions and draft formatting in later steps.
141+
142+
> **Key:** This step asks the user only one light question (to orient the search), then does silent research. Do not show the user raw JSON or code output — just absorb the conventions and let them shape your subsequent questions.
143+
144+
---
145+
83146
## Step 2: Explore Context
84147

85148
Before asking questions, check what already exists. Try `pred`; if not available, build it first with `make cli`.
@@ -114,12 +177,9 @@ Ask questions **one at a time**. Prefer multiple-choice when possible. Use mathe
114177

115178
### For Models
116179

117-
Work through these topics in order, using `AskUserQuestion` where multiple-choice is natural. Adapt based on answers:
180+
Work through these topics in order, using `AskUserQuestion` where multiple-choice is natural. Adapt based on answers. (The orienting "What problem?" question was already asked in Step 1b.)
118181

119-
1. **What problem?** — Ask as free text:
120-
> "What problem are you thinking of? A name, a description, or even a rough idea is fine."
121-
122-
2. **Why useful?** — Use `AskUserQuestion`:
182+
1. **Why useful?** — Use `AskUserQuestion`:
123183
```
124184
AskUserQuestion:
125185
question: "What's the motivation for this problem? Where does it appear?"
@@ -135,7 +195,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
135195
description: "I'll describe the domain"
136196
```
137197

138-
3. **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:
139199
```
140200
AskUserQuestion:
141201
question: "What kind of problem is this?"
@@ -150,7 +210,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
150210
```
151211
Then ask: "Can you state the problem formally? What's the input, constraints, and objective?"
152212

153-
4. **Variables** — Use `AskUserQuestion`:
213+
3. **Variables** — Use `AskUserQuestion`:
154214
```
155215
AskUserQuestion:
156216
question: "How would you represent a solution? What are the decision variables?"
@@ -166,12 +226,12 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
166226
description: "I'll describe the variable structure"
167227
```
168228

169-
5. **Complexity** — Ask as free text:
229+
4. **Complexity** — Ask as free text:
170230
> "What's the best known exact algorithm? Is the problem NP-hard, and if so, is there a reference?"
171231
- Help them find references if unsure (use WebSearch)
172232
- Ask for a concrete complexity expression in terms of problem parameters (e.g., O(2^n), O(1.1996^n))
173233

174-
6. **Example** — Generate 3 candidate examples yourself (varying in size and structure), then present via `AskUserQuestion`:
234+
5. **Example** — Generate 3 candidate examples yourself (varying in size and structure), then present via `AskUserQuestion`:
175235

176236
```
177237
AskUserQuestion:
@@ -190,7 +250,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
190250
- Must exercise the problem's core structure
191251
- Must be small enough to verify by hand
192252

193-
7. **Data representation** — Use `AskUserQuestion`:
253+
6. **Data representation** — Use `AskUserQuestion`:
194254
```
195255
AskUserQuestion:
196256
question: "What data defines an instance of this problem?"
@@ -210,9 +270,9 @@ After model brainstorming is complete, proceed to **Step 3b: Topology Analysis**
210270

211271
### For Rules (standalone)
212272

213-
Work through these topics in order, using `AskUserQuestion` for each step:
273+
Work through these topics in order, using `AskUserQuestion` for each step. (The orienting "Which two problems?" question was already asked in Step 1b, and conventions were studied.)
214274

215-
1. **Which problems?** — First run topology analysis (orphans, NP-hardness gaps, `pred list --json`) to identify the most needed rules. Then present suggestions via `AskUserQuestion`:
275+
1. **Which problems?** — First run topology analysis (orphans, NP-hardness gaps, `pred list --json`) to identify the most needed rules. Incorporate what the user mentioned in Step 1b, then present suggestions via `AskUserQuestion`:
216276

217277
```
218278
AskUserQuestion:

0 commit comments

Comments
 (0)