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
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:
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:
- 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
+
83
146
## Step 2: Explore Context
84
147
85
148
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
114
177
115
178
### For Models
116
179
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.)
118
181
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`:
123
183
```
124
184
AskUserQuestion:
125
185
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
135
195
description: "I'll describe the domain"
136
196
```
137
197
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:
139
199
```
140
200
AskUserQuestion:
141
201
question: "What kind of problem is this?"
@@ -150,7 +210,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
150
210
```
151
211
Then ask: "Can you state the problem formally? What's the input, constraints, and objective?"
152
212
153
-
4.**Variables** — Use `AskUserQuestion`:
213
+
3.**Variables** — Use `AskUserQuestion`:
154
214
```
155
215
AskUserQuestion:
156
216
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
166
226
description: "I'll describe the variable structure"
167
227
```
168
228
169
-
5.**Complexity** — Ask as free text:
229
+
4.**Complexity** — Ask as free text:
170
230
> "What's the best known exact algorithm? Is the problem NP-hard, and if so, is there a reference?"
171
231
- Help them find references if unsure (use WebSearch)
172
232
- Ask for a concrete complexity expression in terms of problem parameters (e.g., O(2^n), O(1.1996^n))
173
233
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`:
175
235
176
236
```
177
237
AskUserQuestion:
@@ -190,7 +250,7 @@ Work through these topics in order, using `AskUserQuestion` where multiple-choic
190
250
- Must exercise the problem's core structure
191
251
- Must be small enough to verify by hand
192
252
193
-
7.**Data representation** — Use `AskUserQuestion`:
253
+
6.**Data representation** — Use `AskUserQuestion`:
194
254
```
195
255
AskUserQuestion:
196
256
question: "What data defines an instance of this problem?"
@@ -210,9 +270,9 @@ After model brainstorming is complete, proceed to **Step 3b: Topology Analysis**
210
270
211
271
### For Rules (standalone)
212
272
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.)
214
274
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`:
0 commit comments