Skip to content

Commit 46a440e

Browse files
committed
chore: update and reorganize redirects for historical, main branch, and concept paths (#262)
- Added and refined redirects for historical URLs, including old get-started, edge-worker, and FAQ paths - Moved main branch paths from 'getting-started' to 'get-started' and from 'vs' to 'comparisons' - Updated redirects for concepts, build, deploy, and reference sections to reflect new structure - Included redirects for old architecture, explanations, and news articles to current locations - Overall, improved URL consistency and maintained backward compatibility across documentation
1 parent 6c8283c commit 46a440e

File tree

8 files changed

+429
-428
lines changed

8 files changed

+429
-428
lines changed

.claude/commands/audit-doc.md

Lines changed: 140 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,183 @@
1+
---
2+
allowed-tools: Read, Grep, Bash(ls:*), Bash(tree:*), Bash(wc -l:*)
3+
description: Audit documentation files for compliance with pgflow guidelines and Diataxis
4+
argument-hint: <file-path>
5+
---
6+
17
You are tasked with auditing documentation for compliance with pgflow guidelines, Diataxis framework, and identifying quality issues.
28

39
## Context
410

511
Documentation root: `pkgs/website/src/content/docs/`
612

7-
Target for audit:
8-
<target>
13+
User request:
14+
<request>
915
$ARGUMENTS
10-
</target>
16+
</request>
1117

12-
## Process
18+
## Multi-Step Process
1319

1420
### Step 1: Validate Target
1521

1622
**Target must be a single .mdx file path.**
1723

1824
If no argument or directory provided:
19-
- Ask user to specify a single file path
20-
- Example: `/audit-doc guides/getting-started.mdx`
25+
- Search for matching files using Grep/tree
26+
- Present options to user
27+
- WAIT for confirmation
2128

22-
Present target file and **WAIT for confirmation.**
29+
If path provided, verify file exists:
30+
```bash
31+
ls -la pkgs/website/src/content/docs/[file-path]
32+
```
2333

24-
### Step 2: Determine Audit Mode
34+
Present target:
35+
```markdown
36+
## Audit Target
2537

26-
Ask user which audit mode:
27-
- **Quick**: Diataxis + critical style issues only
28-
- **Standard**: All categories, standard depth (default)
29-
- **Deep**: Comprehensive review with detailed analysis
38+
**File:** pkgs/website/src/content/docs/[path]
39+
**Lines:** [count]
40+
```
3041

31-
### Step 3: Perform Audit with Task Agent
42+
WAIT for user confirmation.
3243

33-
**Launch a single general-purpose task agent to audit the file.**
44+
### Step 2: Read Guide Files
3445

35-
Present the task summary to the user before launching:
46+
Read all guide files to understand standards:
3647

37-
```markdown
38-
## Task Agent Instructions
39-
40-
I'm launching a task agent to audit the documentation with these instructions:
41-
42-
**Context:**
43-
- Target file: [filepath]
44-
- Audit mode: [Quick/Standard/Deep]
45-
46-
**Agent will:**
47-
1. Read NOMENCLATURE_GUIDE.md for terminology standards
48-
2. Read ARCHITECTURE_GUIDE.md for architectural accuracy
49-
3. Read DOCS_GUIDE.md for compliance criteria, patterns, and examples
50-
4. Read .claude/character_guidelines.md for character rules
51-
5. Read .claude/diataxis.md for content type definitions
52-
6. Read .claude/naming_convention.md for naming rules
53-
7. Audit the file against all standards
54-
8. Generate structured report with specific examples and priorities
55-
56-
**Audit categories to check (BE PRAGMATIC, NOT PEDANTIC):**
57-
1. **Critical Issues Only** - Broken links, wrong code, incorrect architecture/terminology, character violations
58-
2. **Style Compliance** - pgflow naming (not pgFlow/PgFlow), voice consistency, trailing slashes
59-
3. **Structural Issues** - Missing frontmatter, H1 usage, broken code examples
60-
4. **Content Quality** - Technical accuracy, missing important info, unclear explanations
61-
62-
**IMPORTANT - DO NOT flag these as issues:**
63-
- Missing contentType in frontmatter (we don't use it)
64-
- Mixing installation/setup with how-to content (pragmatic for small sections)
65-
- Missing "What You'll Learn" sections (only needed for long/complex docs)
66-
- Platform-specific notes when only one platform exists (Supabase is the only platform currently)
67-
- Small docs that don't need splitting (<400 lines is fine)
68-
69-
**BE PRAGMATIC:**
70-
- Content type mixing is OK if it serves the user (brief install section in how-to is fine)
71-
- Suggest reorganization ONLY if specific, actionable, and clearly better
72-
- Don't invent requirements not in the guides
73-
74-
**Report format:**
48+
```bash
49+
# Read guides in parallel
50+
```
51+
52+
Files to read:
53+
1. `NOMENCLATURE_GUIDE.md` - Terminology standards
54+
2. `ARCHITECTURE_GUIDE.md` - Architecture concepts
55+
3. `DOCS_GUIDE.md` - Documentation standards
56+
4. `.claude/core/character_guidelines.md` - Character rules
57+
5. `.claude/core/diataxis.md` - Content type definitions
58+
6. `.claude/core/naming_convention.md` - Naming rules
59+
60+
### Step 3: Read Target File
61+
62+
Read the target documentation file completely.
63+
64+
### Step 4: Analyze Against Standards
65+
66+
**BE PRAGMATIC**: Only flag issues that significantly impact readers or correctness. Don't be nitpicky about things that mostly work.
67+
68+
**Critical Issues - Must fix:**
69+
- Broken links (internal/external)
70+
- Wrong/broken code examples
71+
- Incorrect architecture/terminology
72+
- Character violations (curly quotes, em-dashes, etc.)
73+
- Incorrect naming (pgFlow, PgFlow, etc.)
74+
75+
**Important Issues - Should fix:**
76+
- Missing trailing slashes on internal links
77+
- Missing or incorrect frontmatter
78+
- Wrong H1 usage (multiple H1s in content)
79+
- Significantly unclear explanations
80+
81+
**Only if valuable to readers:**
82+
- Suggest Diataxis improvements ONLY if doc is clearly misclassified
83+
- Suggest reorganization ONLY if current structure causes confusion
84+
- Suggest cross-references ONLY if missing links hurt understanding
85+
86+
**DO NOT flag:**
87+
- Minor style inconsistencies
88+
- Content type mixing if it serves users (brief install in how-to is fine)
89+
- Small docs (<400 lines)
90+
- Missing "What You'll Learn" sections
91+
- Platform notes when only one platform exists
92+
93+
### Step 5: Generate Report
94+
95+
Create a structured report with specific examples:
7596

7697
```markdown
7798
# Audit Report: [filename]
78-
**Location:** [path]
99+
100+
**Location:** pkgs/website/src/content/docs/[path]
79101
**Type:** [Tutorial/How-to/Explanation/Reference]
80-
**Length:** [count] lines
102+
**Lines:** [count]
81103

82-
## Tier A: CRITICAL ISSUES
83-
[Diataxis violations, broken links, incorrect code, terminology violations, architectural inaccuracies]
104+
## Critical Issues
84105

85-
A1. [Issue description with line numbers and specific examples]
86-
A2. [Issue description with line numbers and specific examples]
87-
...
106+
[If none: "None found"]
107+
[If found: List with line numbers and examples]
88108

89-
## Tier B: IMPORTANT ISSUES
90-
[Style violations, structural problems, naming inconsistencies]
109+
1. [Issue] (line [X])
110+
- Found: `[actual text]`
111+
- Fix: `[suggested text]`
91112

92-
B1. [Issue description with line numbers and specific examples]
93-
B2. [Issue description with line numbers and specific examples]
94-
...
113+
2. [Issue] (lines [X-Y])
114+
- Problem: [description]
115+
- Suggestion: [fix]
95116

96-
## Tier C: IMPROVEMENTS
97-
[Content quality, cross-references, clarity enhancements]
117+
## Important Issues
98118

99-
C1. [Issue description with line numbers and specific examples]
100-
C2. [Issue description with line numbers and specific examples]
101-
...
119+
[Similar format]
102120

103-
## SUMMARY
104-
**Assessment:** [Excellent/Good/Needs Work/Major Issues]
105-
**Priority Actions:** [Top 3 fixes using tier notation, e.g., "A1, A3, B2"]
106-
**Estimated Effort:** [Small/Medium/Large]
107-
```
121+
## Suggestions
108122

109-
**Instructions for agent:**
110-
- Number each issue within its tier (A1, A2, A3... B1, B2, B3... C1, C2, C3...)
111-
- Provide line numbers and specific examples for each issue
112-
- Be constructive with suggested fixes
113-
- Prioritize critical issues first
114-
- Suggest next commands to run using tier notation (e.g., "fix A1,2,3 and B1")
115-
```
123+
[Only significant improvements that add real value]
116124

117-
**Launching agent...**
125+
## Summary
118126

119-
Use the Task tool with subagent_type "general-purpose" and provide:
120-
- Target file path and audit mode
121-
- Instructions to read all guide files (NOMENCLATURE_GUIDE.md, ARCHITECTURE_GUIDE.md, DOCS_GUIDE.md, .claude/character_guidelines.md, .claude/diataxis.md, .claude/naming_convention.md)
122-
- Report format specified above
123-
- Instructions to provide specific examples and line numbers
127+
**Assessment:** [Excellent/Good/Needs Work/Major Issues]
128+
**Critical:** [count] | **Important:** [count] | **Suggestions:** [count]
129+
**Estimated fix time:** [5min/15min/30min/1hr]
130+
131+
**Next steps:**
132+
1. [Most important fix]
133+
2. [Second priority]
134+
3. [Third priority if any]
135+
```
124136

125-
## Output Format
137+
### Step 6: Present Findings
126138

127-
After the task agent completes, present results to the user:
139+
Show the report to the user with actionable next steps:
128140

129141
```markdown
130-
## Audit Complete: [filename]
142+
## Audit Complete
131143

132-
**Tier A (Critical) issues:** [count]
133-
**Tier B (Important) issues:** [count]
134-
**Tier C (Improvements):** [count]
135-
**Overall assessment:** [summary]
144+
[Show the report]
136145

137146
**Next steps:**
138-
- Review the detailed report above
139-
- You can now reference issues by tier notation (e.g., "fix A1,2,3 and B2")
140-
- Fix Tier A issues first, then B, then C
141-
- Consider splitting if document is >300 lines
147+
- Fix critical issues first
148+
- You can say "fix issue 1 and 3" to address specific items
149+
- Run `/audit-doc [file]` again after fixes to verify
142150
```
151+
152+
## Common Issues Reference
153+
154+
**Critical (always fix):**
155+
- `pgFlow`/`PgFlow``pgflow`
156+
- `/path/to/doc``/path/to/doc/` (trailing slash)
157+
- Curly quotes "" → Straight quotes ""
158+
- Em-dash — → Hyphen -
159+
- Broken code examples
160+
161+
**Important (fix if found):**
162+
- Multiple H1s → Only one H1 in frontmatter title
163+
- Missing `draft: false` in frontmatter
164+
- Code blocks without language
165+
- Relative links `../other` → Absolute `/other/`
166+
167+
**Suggestions (only if valuable):**
168+
- Missing cross-references that would help understanding
169+
- Structure issues causing real confusion
170+
- Diataxis misclassification (e.g., tutorial written as reference)
171+
172+
## Error Handling
173+
174+
- **File not found:** Ask user to verify path
175+
- **Not .mdx file:** Only audit .mdx files
176+
- **Too large (>1000 lines):** Warn and suggest splitting first
177+
178+
## Special Cases
179+
180+
- **index.mdx:** Check for proper overview structure
181+
- **Tutorial:** Verify step-by-step progression
182+
- **Reference:** Check completeness and accuracy
183+
- **How-to:** Verify problem-solving focus

0 commit comments

Comments
 (0)