@@ -51,169 +51,118 @@ Reasoning: [Why this category]
5151Suggested Location: pkgs/website/src/content/docs/[path]/[filename].mdx
5252```
5353
54- WAIT for user confirmation or correction.
54+ ** WAIT for user confirmation or correction.**
5555
56- ### Step 2: Create Document Structure
56+ ### Step 2: Preview Document Structure
5757
58- Based on the confirmed content type, create a document following these patterns :
58+ Based on the confirmed content type, show the user which template structure will be used :
5959
6060** For TUTORIALS:**
6161``` markdown
62- ---
63- title: [Clear, action-oriented title]
64- description: [One-line description]
65- sidebar:
66- order: [number]
67- ---
68-
69- import { Aside, Steps } from '@astrojs/starlight/components';
70-
71- [1-2 sentence introduction]
72-
73- <Aside type="caution">
74- **Prerequisites**
75- - Prerequisite 1
76- - Prerequisite 2
77- </Aside>
78-
79- ## 1. [First Step]
80-
81- [Brief explanation]
82-
83- [Code example with frame="none" for commands]
84-
85- [Expected outcome]
86-
87- ## 2. [Second Step]
88-
89- ...
90-
91- ## Next Steps
92-
93- [Links to related content using LinkCard]
62+ - Frontmatter with title/description
63+ - Brief introduction (1-2 sentences)
64+ - Prerequisites in :::caution block
65+ - Sequential steps using <Steps> component
66+ - Code examples with frame="none" for bash
67+ - Next Steps section with LinkCards
9468```
9569
9670** For HOW-TO GUIDES:**
9771``` markdown
98- ---
99- title: [Problem-focused title]
100- description: [One-line description]
101- ---
102-
103- import { Aside, LinkCard } from '@astrojs/starlight/components';
104-
105- [Problem statement - what this solves]
106-
107- ## Solution
108-
109- [Direct instructions]
110-
111- [Code examples with highlighting]
112-
113- ## Learn More
114-
115- [Links to related concepts and tutorials]
72+ - Frontmatter with title/description
73+ - Problem statement opening
74+ - Direct solution sections
75+ - Multiple pattern examples
76+ - Learn More section with LinkCards
11677```
11778
11879** For EXPLANATIONS:**
11980``` markdown
120- ---
121- title: [Concept name]
122- description: [One-line description]
123- ---
124-
125- [Conceptual overview]
126-
127- ## [Major Concept 1]
128-
129- [Explanation with diagrams if helpful]
130-
131- ## [Major Concept 2]
132-
133- ...
134-
135- ## Summary
136-
137- [Recap key points]
81+ - Frontmatter with title/description
82+ - Conceptual overview
83+ - Progressive narrative (simple → complex)
84+ - Mental models and "why" sections
85+ - Cross-references to related concepts
13886```
13987
14088** For REFERENCE:**
14189``` markdown
142- ---
143- title: [API/Config name]
144- description: [One-line description]
145- ---
146-
147- [Minimal introduction]
148-
149- ## [Section Name]
150-
151- | Option | Type | Default | Description |
152- |--------|------|---------|-------------|
153- | ... | ... | ... | ... |
154-
155- [Tables and lists only, no examples]
90+ - Frontmatter with title/description
91+ - Minimal introduction
92+ - Tables for parameters/options
93+ - Type definitions
94+ - Terse descriptions (no elaboration)
15695```
15796
158- ### Step 3: Apply Style Guidelines
159-
160- Ensure the document follows ALL these rules:
161-
162- ** Character Guidelines:**
163- - Use straight quotes ("" '') NOT curly quotes
164- - Use hyphens (-) NOT em-dashes (—)
165- - Use straight apostrophes (') NOT curly apostrophes (')
166- - Use three periods (...) NOT ellipsis (…)
167- - Use regular spaces NOT non-breaking spaces
168-
169- ** Voice and Perspective:**
170- - Use impersonal language for technical descriptions ("pgflow does X")
171- - Use "you" ONLY when directly instructing the reader
172- - NEVER use "we", "our", "let's" in technical descriptions
173- - Exception: "you" is okay in tutorials
174-
175- ** Naming Convention:**
176- - Always lowercase: "pgflow" (NEVER PgFlow, pgFlow, PGFlow)
177- - Exception: PascalCase in class names (Pgflow)
97+ Present structure overview and confirm with user before proceeding.
17898
179- ** Code Examples:**
180- - Use ` frame="none" ` for bash commands
181- - Add title attribute for context: ` title="filename.ts" `
182- - Highlight important lines: ` {1-3,5} ` or ` "highlightedTerm" `
183- - Include TypeScript type annotations
184- - Keep examples focused and concise
99+ ### Step 3: Create Document with Task Agent
185100
186- ** Links:**
187- - Always use trailing slashes: ` /path/to/page/ `
188- - Use absolute paths for internal links
189- - Use descriptive link text, not "click here"
101+ ** Launch a general-purpose task agent to create the document.**
190102
191- ** Frontmatter:**
192- - Always include title and description
193- - Use sidebar.order for positioning if needed
194- - Keep descriptions concise (one line)
103+ Present the task summary to the user before launching:
195104
196- ### Step 4: Write the Document
197-
198- Create the complete document following all guidelines above.
199-
200- Present the document to the user for review.
105+ ``` markdown
106+ ## Task Agent Instructions
107+
108+ I'm launching a task agent to create the documentation with these instructions:
109+
110+ **Context:**
111+ - Content type: [TUTORIAL/HOW-TO/EXPLANATION/REFERENCE]
112+ - File location: pkgs/website/src/content/docs/[path]/[filename].mdx
113+ - User request: [original request]
114+
115+ **Agent will:**
116+ 1. Read NOMENCLATURE_GUIDE.md for terminology standards
117+ 2. Read ARCHITECTURE_GUIDE.md for architectural accuracy
118+ 3. Read DOCS_GUIDE.md for all formatting, style, and component patterns
119+ 4. Create complete document following the [content type] template
120+ 5. Apply all style guidelines (characters, naming, voice, links)
121+ 6. Ensure Diataxis compliance for [content type]
122+ 7. Use appropriate components (:::note syntax, LinkCards, Steps, etc.)
123+ 8. Present draft for review
124+
125+ **Critical requirements:**
126+ - Follow DOCS_GUIDE.md patterns exactly
127+ - Use :::note[Title] syntax (not <Aside> component)
128+ - All internal links must have trailing slashes
129+ - Use "pgflow" (lowercase) throughout
130+ - Match tone to content type (instructional vs explanatory)
131+ - Include proper frontmatter with sidebar.order if needed
132+ ```
201133
202- ### Step 5: Create the File
134+ ** Launching agent... **
203135
204- Once approved, write the file to the determined location.
136+ Use the Task tool with subagent_type "general-purpose" and provide:
137+ - Content type from Step 1
138+ - File location
139+ - User's original request
140+ - Instructions to read all guide files (NOMENCLATURE_GUIDE.md, ARCHITECTURE_GUIDE.md, DOCS_GUIDE.md)
141+ - Instructions to present complete draft before writing file
142+ - Reminder to follow all guide patterns for terminology, architecture, and formatting
205143
206144## Important Reminders
207145
208- - ** Single purpose ** : One content type per document
209- - ** No mixed content ** : Don 't mix tutorial + explanation + reference
146+ - ** Diataxis compliance ** : Strict adherence to content type patterns
147+ - ** Single purpose ** : One content type per document - don 't mix tutorial + explanation + reference
210148- ** Cross-reference** : Link to related content instead of duplicating
211149- ** MVP mindset** : Focus on core value, avoid over-complexity
212- - ** Code examples** : Always real-world, working examples
213- - ** Diataxis compliance** : Strict adherence to content type patterns
150+ - ** Follow DOCS_GUIDE.md** : All formatting, components, and style rules are defined there
151+
152+ ## Output Format
214153
215- ## Output
154+ After the task agent completes, present results to the user:
216155
217- Write to: ` pkgs/website/src/content/docs/[determined-path] `
156+ ``` markdown
157+ ## Document Created: [filename]
218158
219- Confirm file creation and suggest any related updates needed (navigation, redirects, etc.)
159+ **File location:** `pkgs/website/src/content/docs/[path]/[filename].mdx`
160+ **Content type:** [TUTORIAL/HOW-TO/EXPLANATION/REFERENCE]
161+ **Lines:** [count]
162+
163+ **Next steps:**
164+ - Review the content for accuracy
165+ - Build the website to verify: `pnpm nx build website`
166+ - Update navigation if needed (astro.config.mjs)
167+ - Create commit if satisfied
168+ ```
0 commit comments