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
feat: enforce AskUserQuestion tool for all user interactions in news article creation (#302)
# Enhance News Article Creation Command with Interactive User Confirmation
This PR updates the news article creation command to enforce the use of the AskUserQuestion tool for all user confirmations and choices. The changes:
- Add a critical notice emphasizing that ALL user confirmations must use the AskUserQuestion tool
- Convert each step of the article creation process to use structured interactive buttons
- Add specific AskUserQuestion code examples with appropriate options for each decision point
- Implement a more structured approach to confirming article focus, topics, outline, title, and cover image
- Create clearer decision paths with explicit options rather than open-ended questions
- Add a final confirmation step before writing the article
These changes will prevent overthinking during the article creation process and force clearer decisions through interactive buttons rather than plain text questions.
Create a high-level outline using H2 and H3 headings. Include placeholders for specific content types:
63
104
-`<code snippet for X>`
@@ -66,17 +107,57 @@ Create a high-level outline using H2 and H3 headings. Include placeholders for s
66
107
-`<comparison table>`
67
108
-`<diagram/visual>`
68
109
69
-
Present the outline to the user for review and refinement.
110
+
Present the outline, then use AskUserQuestion to confirm:
111
+
```
112
+
question: "Does this outline structure work?"
113
+
header: "Outline OK?"
114
+
options:
115
+
- label: "Yes, proceed"
116
+
description: "Structure and flow look good"
117
+
- label: "Needs adjustments"
118
+
description: "Reorganize, add, or remove sections"
119
+
multiSelect: false
120
+
```
70
121
71
-
### Step 5: Suggest Title
122
+
If "Needs adjustments", ask for specific changes in plain text, update the outline, and ask again until confirmed.
72
123
73
-
Suggest a concise, descriptive title for the article. Follow the pattern from existing articles (e.g., "pgflow 0.6.1: Worker Configuration in Handler Context").
124
+
### Step 5: Suggest Title (via AskUserQuestion tool)
74
125
75
-
Iterate with the user until the title is confirmed.
126
+
Generate 2-3 concise, descriptive title options. Follow the pattern from existing articles (e.g., "pgflow 0.6.1: Worker Configuration in Handler Context").
Use AskUserQuestion to decide if cover image is needed:
149
+
```
150
+
question: "Should this article have a cover image?"
151
+
header: "Cover?"
152
+
options:
153
+
- label: "Yes"
154
+
description: "Article would benefit from visual representation"
155
+
- label: "No"
156
+
description: "Skip cover image for now"
157
+
multiSelect: false
158
+
```
78
159
79
-
If a cover image would enhance the article, describe a scene that is:
160
+
If "Yes", describe a scene that is:
80
161
- Cyberpunk-themed OR involves robots/automation/hackers
81
162
- Uses colors from the dark mode palette:
82
163
- Deep teal (accent-low): #002b26
@@ -85,13 +166,37 @@ If a cover image would enhance the article, describe a scene that is:
85
166
- Dark gray: #182b28, #2a3d39
86
167
- Near-black: #121a19
87
168
88
-
You can reference these colors by name (e.g., "deep teal background with light teal accents") without specifying hex codes.
169
+
Reference colors by name (e.g., "deep teal background with light teal accents") without hex codes.
89
170
90
171
Example: "A cyberpunk database server glowing with teal circuits, surrounded by flowing data streams in deep teal and light teal, against a near-black background with dark gray geometric patterns."
91
172
92
-
### Step 7: Write the Article
173
+
Present the description and ask for confirmation using AskUserQuestion:
174
+
```
175
+
question: "Does this cover image description work?"
176
+
header: "Image OK?"
177
+
options:
178
+
- label: "Yes"
179
+
description: "Description captures the article theme"
180
+
- label: "Revise"
181
+
description: "Adjust the description"
182
+
multiSelect: false
183
+
```
184
+
185
+
### Step 7: Write the Article (via AskUserQuestion tool)
186
+
187
+
Before writing, confirm with the user:
188
+
```
189
+
question: "Ready to write the article?"
190
+
header: "Write?"
191
+
options:
192
+
- label: "Yes, write it"
193
+
description: "All planning confirmed, proceed with article creation"
194
+
- label: "Wait"
195
+
description: "Need to adjust something first"
196
+
multiSelect: false
197
+
```
93
198
94
-
Write the article to `pkgs/website/src/content/docs/news/<slug>.mdx` where `<slug>` is derived from the title (lowercase, hyphenated).
199
+
If "Yes, write it", write the article to `pkgs/website/src/content/docs/news/<slug>.mdx` where `<slug>` is derived from the title (lowercase, hyphenated).
0 commit comments