Skip to content

Commit 24926ff

Browse files
committed
feat: add date input and improve news article creation workflow (#309)
# Enhance News Article Creation Command with Improved Structure and Date Automation This PR improves the `.claude/commands/create-news-article.md` command with several key enhancements: 1. Added automatic date insertion for article frontmatter using the `date` command 2. Introduced article style/length selection with predefined options (Quick Update, Feature Article, Release Announcement, Deep Dive) 3. Added critical reminders to display content (topics list, outline, title options, cover image description) BEFORE asking for confirmation 4. Streamlined the focus confirmation step by removing the generic "Something else" option 5. Fixed an incorrect date in the pgflow-0-7-2 news article (changed from 2025-01-04 to 2025-11-04) These changes make the news article creation process more structured and efficient while ensuring proper user interaction flow.
1 parent b898bd1 commit 24926ff

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

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

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ You are tasked with creating a new news article for the pgflow website.
22

33
## Context
44

5+
Today's date (use this for article frontmatter):
6+
<today>
7+
!`date +%Y-%m-%d`
8+
</today>
9+
510
Recent conversation history and user arguments should guide the article creation.
611

712
User arguments:
@@ -43,28 +48,43 @@ Review the recent conversation history and user arguments to understand:
4348
- Who the target audience is
4449
- What problem or question the article addresses
4550

46-
### Step 2: Confirm Article Focus (via AskUserQuestion tool)
51+
### Step 2: Confirm Article Style and Focus (via AskUserQuestion tool)
52+
53+
Analyze the context and infer what type of article this should be. Then use AskUserQuestion to confirm:
4754

48-
Analyze the context and infer what the article should focus on. Then use AskUserQuestion to confirm:
55+
**Step 2.1**: Determine article style/length based on context:
56+
```
57+
question: "What style of article should this be?"
58+
header: "Style"
59+
options:
60+
- label: "Quick Update"
61+
description: "Short announcement - bugfix, minor feature, or small improvement (500-800 words)"
62+
- label: "Feature Article"
63+
description: "Medium-depth coverage of new feature with examples and use cases (1000-1500 words)"
64+
- label: "Release Announcement"
65+
description: "Major version/update with breaking changes, migration guide, multiple features (1500-2500 words)"
66+
- label: "Deep Dive"
67+
description: "Technical exploration of concept, design decision, or architectural choice (2000+ words)"
68+
multiSelect: false
69+
```
4970

50-
**Step 2.1**: Review conversation history and arguments to infer:
71+
**Step 2.2**: Review conversation history and arguments to infer:
5172
- Main topic or angle
5273
- Scope of coverage
5374
- Key points to emphasize
5475
- Target audience
5576

56-
**Step 2.2**: Use AskUserQuestion with inferred focus:
77+
**Step 2.3**: Use AskUserQuestion with inferred focus:
5778
```
5879
question: "What should this article focus on?"
5980
header: "Focus"
6081
options:
6182
- [Inferred topic from context, e.g., "New feature X with use cases"]
6283
- [Alternative angle if applicable, e.g., "Breaking change Y and migration guide"]
63-
- "Something else"
6484
multiSelect: false
6585
```
6686

67-
If scope or target audience is unclear, follow with:
87+
If target audience is unclear, follow with:
6888
```
6989
question: "Who is the target audience?"
7090
header: "Audience"
@@ -77,13 +97,17 @@ multiSelect: false
7797

7898
### Step 3: Create Topics List (via AskUserQuestion tool)
7999

100+
**CRITICAL: ALWAYS write the topics list to the screen FIRST before asking for confirmation.**
101+
80102
Create a list of topics/points to cover in the article. Present it as an a/b/c/d list:
81103

82104
a) First topic
83105
b) Second topic
84106
c) Third topic
85107
d) Fourth topic
86108

109+
**Write this list in your message text BEFORE using AskUserQuestion.**
110+
87111
Then use AskUserQuestion to confirm:
88112
```
89113
question: "Does this topics list cover everything?"
@@ -100,14 +124,18 @@ If "Needs changes", ask for specific edits in plain text, update the list, and a
100124

101125
### Step 4: Suggest Outline (via AskUserQuestion tool)
102126

127+
**CRITICAL: ALWAYS write the full outline to the screen FIRST before asking for confirmation.**
128+
103129
Create a high-level outline using H2 and H3 headings. Include placeholders for specific content types:
104130
- `<code snippet for X>`
105131
- `<warning about Y>`
106132
- `<example of Z>`
107133
- `<comparison table>`
108134
- `<diagram/visual>`
109135

110-
Present the outline, then use AskUserQuestion to confirm:
136+
**Write the complete outline in your message text BEFORE using AskUserQuestion.**
137+
138+
Then use AskUserQuestion to confirm:
111139
```
112140
question: "Does this outline structure work?"
113141
header: "Outline OK?"
@@ -123,8 +151,12 @@ If "Needs adjustments", ask for specific changes in plain text, update the outli
123151

124152
### Step 5: Suggest Title (via AskUserQuestion tool)
125153

154+
**CRITICAL: ALWAYS write the title options to the screen FIRST before asking for confirmation.**
155+
126156
Generate 2-3 concise, descriptive title options. Follow the pattern from existing articles (e.g., "pgflow 0.6.1: Worker Configuration in Handler Context").
127157

158+
**Write all title options in your message text BEFORE using AskUserQuestion.**
159+
128160
Use AskUserQuestion to select:
129161
```
130162
question: "Which title works best?"
@@ -170,6 +202,10 @@ Reference colors by name (e.g., "deep teal background with light teal accents")
170202

171203
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."
172204

205+
**CRITICAL: ALWAYS write the full cover image description to the screen FIRST before asking for confirmation.**
206+
207+
**Write the complete description in your message text BEFORE using AskUserQuestion.**
208+
173209
Present the description and ask for confirmation using AskUserQuestion:
174210
```
175211
question: "Does this cover image description work?"

pkgs/website/src/content/docs/news/pgflow-0-7-2-fix-missing-realtime-broadcasts-for-step-events.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
draft: false
33
title: 'pgflow 0.7.2: Fix Missing Realtime Broadcasts for Step Events'
44
description: 'Critical fix for missing step:started and step:completed realtime events'
5-
date: 2025-01-04
5+
date: 2025-11-04
66
authors:
77
- jumski
88
tags:

0 commit comments

Comments
 (0)