Skip to content

Commit 45662aa

Browse files
committed
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.
1 parent ebfdee0 commit 45662aa

File tree

1 file changed

+123
-18
lines changed

1 file changed

+123
-18
lines changed

.claude/commands/create-news-article.md

Lines changed: 123 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ Existing articles in the news directory:
1717

1818
## Multi-Step Process
1919

20+
<critical>
21+
ALL user confirmations and choices MUST use AskUserQuestion tool.
22+
Interactive buttons prevent overthinking and force clear decisions.
23+
Never just "ask" in plain text - always use the tool.
24+
</critical>
25+
2026
Follow these steps to create the article:
2127

2228
### Step 0: Analyze Existing Article Styles (PARALLEL)
@@ -37,27 +43,62 @@ Review the recent conversation history and user arguments to understand:
3743
- Who the target audience is
3844
- What problem or question the article addresses
3945

40-
### Step 2: Confirm Article Focus
46+
### Step 2: Confirm Article Focus (via AskUserQuestion tool)
47+
48+
Analyze the context and infer what the article should focus on. Then use AskUserQuestion to confirm:
4149

42-
Ensure you understand what the article should focus on. If you have any doubts about:
43-
- The main topic or angle
44-
- The scope of coverage
50+
**Step 2.1**: Review conversation history and arguments to infer:
51+
- Main topic or angle
52+
- Scope of coverage
4553
- Key points to emphasize
54+
- Target audience
4655

47-
Ask clarifying questions and wait for user confirmation before proceeding.
56+
**Step 2.2**: Use AskUserQuestion with inferred focus:
57+
```
58+
question: "What should this article focus on?"
59+
header: "Focus"
60+
options:
61+
- [Inferred topic from context, e.g., "New feature X with use cases"]
62+
- [Alternative angle if applicable, e.g., "Breaking change Y and migration guide"]
63+
- "Something else"
64+
multiSelect: false
65+
```
66+
67+
If scope or target audience is unclear, follow with:
68+
```
69+
question: "Who is the target audience?"
70+
header: "Audience"
71+
options:
72+
- "New users getting started"
73+
- "Existing users upgrading"
74+
- "Advanced users seeking deep technical details"
75+
multiSelect: false
76+
```
4877

49-
### Step 3: Create Topics List
78+
### Step 3: Create Topics List (via AskUserQuestion tool)
5079

51-
Create a list of topics/points to cover in the article. Present it as an a/b/c/d list for easy editing:
80+
Create a list of topics/points to cover in the article. Present it as an a/b/c/d list:
5281

5382
a) First topic
5483
b) Second topic
5584
c) Third topic
5685
d) Fourth topic
5786

58-
Allow the user to provide feedback like "remove b and d" or "add X between a and c". Iterate until the user agrees with the list.
87+
Then use AskUserQuestion to confirm:
88+
```
89+
question: "Does this topics list cover everything?"
90+
header: "Topics OK?"
91+
options:
92+
- label: "Yes, looks good"
93+
description: "All necessary topics are covered"
94+
- label: "Needs changes"
95+
description: "Remove, add, or reorder topics"
96+
multiSelect: false
97+
```
98+
99+
If "Needs changes", ask for specific edits in plain text, update the list, and ask again until confirmed.
59100

60-
### Step 4: Suggest Outline
101+
### Step 4: Suggest Outline (via AskUserQuestion tool)
61102

62103
Create a high-level outline using H2 and H3 headings. Include placeholders for specific content types:
63104
- `<code snippet for X>`
@@ -66,17 +107,57 @@ Create a high-level outline using H2 and H3 headings. Include placeholders for s
66107
- `<comparison table>`
67108
- `<diagram/visual>`
68109

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+
```
70121

71-
### Step 5: Suggest Title
122+
If "Needs adjustments", ask for specific changes in plain text, update the outline, and ask again until confirmed.
72123

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)
74125

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").
76127

77-
### Step 6: Describe Cover Image (Optional)
128+
Use AskUserQuestion to select:
129+
```
130+
question: "Which title works best?"
131+
header: "Title"
132+
options:
133+
- label: "Option 1"
134+
description: "[First title suggestion]"
135+
- label: "Option 2"
136+
description: "[Second title suggestion]"
137+
- label: "Option 3"
138+
description: "[Third title suggestion]"
139+
- label: "Custom"
140+
description: "I'll provide my own title"
141+
multiSelect: false
142+
```
143+
144+
If "Custom", accept user's title suggestion.
145+
146+
### Step 6: Describe Cover Image (via AskUserQuestion tool)
147+
148+
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+
```
78159

79-
If a cover image would enhance the article, describe a scene that is:
160+
If "Yes", describe a scene that is:
80161
- Cyberpunk-themed OR involves robots/automation/hackers
81162
- Uses colors from the dark mode palette:
82163
- Deep teal (accent-low): #002b26
@@ -85,13 +166,37 @@ If a cover image would enhance the article, describe a scene that is:
85166
- Dark gray: #182b28, #2a3d39
86167
- Near-black: #121a19
87168

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.
89170

90171
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."
91172

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+
```
93198

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).
95200

96201
**Article Requirements:**
97202

0 commit comments

Comments
 (0)