@qazuor/claude-code-config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1248 -0
- package/dist/bin.cjs +11886 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.d.cts +1 -0
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +11869 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.cjs +3887 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1325 -0
- package/dist/index.d.ts +1325 -0
- package/dist/index.js +3835 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -0
- package/templates/.log/notifications.log +1775 -0
- package/templates/agents/README.md +164 -0
- package/templates/agents/_registry.json +443 -0
- package/templates/agents/design/content-writer.md +353 -0
- package/templates/agents/design/ux-ui-designer.md +382 -0
- package/templates/agents/engineering/astro-engineer.md +293 -0
- package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
- package/templates/agents/engineering/express-engineer.md +316 -0
- package/templates/agents/engineering/fastify-engineer.md +399 -0
- package/templates/agents/engineering/hono-engineer.md +263 -0
- package/templates/agents/engineering/mongoose-engineer.md +473 -0
- package/templates/agents/engineering/nestjs-engineer.md +429 -0
- package/templates/agents/engineering/nextjs-engineer.md +451 -0
- package/templates/agents/engineering/node-typescript-engineer.md +347 -0
- package/templates/agents/engineering/prisma-engineer.md +432 -0
- package/templates/agents/engineering/react-senior-dev.md +394 -0
- package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
- package/templates/agents/engineering/tech-lead.md +269 -0
- package/templates/agents/product/product-functional.md +329 -0
- package/templates/agents/product/product-technical.md +578 -0
- package/templates/agents/quality/debugger.md +514 -0
- package/templates/agents/quality/qa-engineer.md +390 -0
- package/templates/agents/specialized/enrichment-agent.md +277 -0
- package/templates/agents/specialized/i18n-specialist.md +322 -0
- package/templates/agents/specialized/seo-ai-specialist.md +387 -0
- package/templates/agents/specialized/tech-writer.md +300 -0
- package/templates/code-style/.editorconfig +27 -0
- package/templates/code-style/.prettierignore +25 -0
- package/templates/code-style/.prettierrc +12 -0
- package/templates/code-style/biome.json +78 -0
- package/templates/code-style/commitlint.config.js +44 -0
- package/templates/commands/README.md +175 -0
- package/templates/commands/_registry.json +420 -0
- package/templates/commands/add-new-entity.md +211 -0
- package/templates/commands/audit/accessibility-audit.md +360 -0
- package/templates/commands/audit/performance-audit.md +290 -0
- package/templates/commands/audit/security-audit.md +231 -0
- package/templates/commands/code-check.md +127 -0
- package/templates/commands/five-why.md +225 -0
- package/templates/commands/formatting/format-markdown.md +197 -0
- package/templates/commands/git/commit.md +247 -0
- package/templates/commands/meta/create-agent.md +257 -0
- package/templates/commands/meta/create-command.md +312 -0
- package/templates/commands/meta/create-skill.md +321 -0
- package/templates/commands/meta/help.md +318 -0
- package/templates/commands/planning/check-completed-tasks.md +224 -0
- package/templates/commands/planning/cleanup-issues.md +248 -0
- package/templates/commands/planning/planning-cleanup.md +251 -0
- package/templates/commands/planning/sync-planning-github.md +133 -0
- package/templates/commands/planning/sync-todos-github.md +203 -0
- package/templates/commands/quality-check.md +211 -0
- package/templates/commands/run-tests.md +159 -0
- package/templates/commands/start-feature-plan.md +232 -0
- package/templates/commands/start-refactor-plan.md +244 -0
- package/templates/commands/sync-planning.md +176 -0
- package/templates/commands/update-docs.md +242 -0
- package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
- package/templates/docs/INDEX.md +677 -0
- package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
- package/templates/docs/_registry.json +329 -0
- package/templates/docs/diagrams/README.md +220 -0
- package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
- package/templates/docs/diagrams/documentation-map.mmd +61 -0
- package/templates/docs/diagrams/tools-relationship.mmd +55 -0
- package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
- package/templates/docs/doc-sync.md +533 -0
- package/templates/docs/examples/end-to-end-workflow.md +1505 -0
- package/templates/docs/glossary.md +495 -0
- package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
- package/templates/docs/guides/mockup-setup.md +737 -0
- package/templates/docs/learnings/README.md +250 -0
- package/templates/docs/learnings/common-architectural-patterns.md +123 -0
- package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
- package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
- package/templates/docs/learnings/monorepo-command-execution.md +64 -0
- package/templates/docs/learnings/optimization-tips.md +146 -0
- package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
- package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
- package/templates/docs/learnings/test-organization-structure.md +68 -0
- package/templates/docs/mcp-installation.md +613 -0
- package/templates/docs/mcp-servers.md +989 -0
- package/templates/docs/notification-installation.md +570 -0
- package/templates/docs/quick-start.md +354 -0
- package/templates/docs/standards/architecture-patterns.md +1064 -0
- package/templates/docs/standards/atomic-commits.md +513 -0
- package/templates/docs/standards/code-standards.md +993 -0
- package/templates/docs/standards/design-standards.md +656 -0
- package/templates/docs/standards/documentation-standards.md +1160 -0
- package/templates/docs/standards/testing-standards.md +969 -0
- package/templates/docs/system-maintenance.md +604 -0
- package/templates/docs/templates/PDR-template.md +561 -0
- package/templates/docs/templates/TODOs-template.md +534 -0
- package/templates/docs/templates/tech-analysis-template.md +800 -0
- package/templates/docs/workflows/README.md +519 -0
- package/templates/docs/workflows/atomic-task-protocol.md +955 -0
- package/templates/docs/workflows/decision-tree.md +482 -0
- package/templates/docs/workflows/edge-cases.md +856 -0
- package/templates/docs/workflows/phase-1-planning.md +957 -0
- package/templates/docs/workflows/phase-2-implementation.md +896 -0
- package/templates/docs/workflows/phase-3-validation.md +792 -0
- package/templates/docs/workflows/phase-4-finalization.md +927 -0
- package/templates/docs/workflows/quick-fix-protocol.md +505 -0
- package/templates/docs/workflows/task-atomization.md +537 -0
- package/templates/docs/workflows/task-completion-protocol.md +448 -0
- package/templates/hooks/on-notification.sh +28 -0
- package/templates/schemas/checkpoint.schema.json +97 -0
- package/templates/schemas/code-registry.schema.json +84 -0
- package/templates/schemas/pdr.schema.json +314 -0
- package/templates/schemas/problems.schema.json +55 -0
- package/templates/schemas/tech-analysis.schema.json +404 -0
- package/templates/schemas/telemetry.schema.json +298 -0
- package/templates/schemas/todos.schema.json +234 -0
- package/templates/schemas/workflows.schema.json +69 -0
- package/templates/scripts/add-changelogs.sh +105 -0
- package/templates/scripts/generate-code-registry.ts +270 -0
- package/templates/scripts/health-check.sh +343 -0
- package/templates/scripts/sync-registry.sh +40 -0
- package/templates/scripts/telemetry-report.ts +36 -0
- package/templates/scripts/validate-docs.sh +224 -0
- package/templates/scripts/validate-registry.sh +225 -0
- package/templates/scripts/validate-schemas.ts +283 -0
- package/templates/scripts/validate-structure.sh +165 -0
- package/templates/scripts/worktree-cleanup.sh +81 -0
- package/templates/scripts/worktree-create.sh +63 -0
- package/templates/sessions/planning/.gitkeep +0 -0
- package/templates/sessions/planning/archived/.gitkeep +0 -0
- package/templates/settings.json +202 -0
- package/templates/settings.local.json +138 -0
- package/templates/skills/README.md +197 -0
- package/templates/skills/_registry.json +473 -0
- package/templates/skills/audit/accessibility-audit.md +309 -0
- package/templates/skills/audit/performance-audit.md +257 -0
- package/templates/skills/audit/security-audit.md +217 -0
- package/templates/skills/auth/nextauth-patterns.md +308 -0
- package/templates/skills/brand-guidelines.md +240 -0
- package/templates/skills/documentation/markdown-formatter.md +302 -0
- package/templates/skills/git/git-commit-helper.md +321 -0
- package/templates/skills/i18n/i18n-patterns.md +251 -0
- package/templates/skills/patterns/error-handling-patterns.md +242 -0
- package/templates/skills/patterns/tdd-methodology.md +342 -0
- package/templates/skills/qa/qa-criteria-validator.md +383 -0
- package/templates/skills/qa/web-app-testing.md +398 -0
- package/templates/skills/react/react-hook-form-patterns.md +359 -0
- package/templates/skills/state/redux-toolkit-patterns.md +272 -0
- package/templates/skills/state/tanstack-query-patterns.md +299 -0
- package/templates/skills/state/zustand-patterns.md +301 -0
- package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
- package/templates/skills/tech/shadcn-specialist.md +252 -0
- package/templates/skills/tech/vercel-specialist.md +297 -0
- package/templates/skills/testing/api-app-testing.md +254 -0
- package/templates/skills/testing/performance-testing.md +275 -0
- package/templates/skills/testing/security-testing.md +348 -0
- package/templates/skills/utils/add-memory.md +295 -0
- package/templates/skills/utils/json-data-auditor.md +283 -0
- package/templates/skills/utils/pdf-creator-editor.md +342 -0
- package/templates/tools/format-markdown.sh +185 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brand-guidelines
|
|
3
|
+
category: design
|
|
4
|
+
description: Apply brand guidelines consistently across UI components
|
|
5
|
+
usage: When creating or reviewing UI components for brand consistency
|
|
6
|
+
input: Component or page to validate
|
|
7
|
+
output: Brand-compliant implementation or validation report
|
|
8
|
+
config_required:
|
|
9
|
+
- brand_name: "Your brand/product name"
|
|
10
|
+
- primary_color: "Primary brand color (hex)"
|
|
11
|
+
- secondary_color: "Secondary brand color (hex)"
|
|
12
|
+
- font_family: "Primary font family"
|
|
13
|
+
- tone_of_voice: "Brand tone (formal, friendly, professional)"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Brand Guidelines Skill
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration Required
|
|
19
|
+
|
|
20
|
+
Before using this skill, configure your brand in the project:
|
|
21
|
+
|
|
22
|
+
| Setting | Description | Example |
|
|
23
|
+
|---------|-------------|---------|
|
|
24
|
+
| `brand_name` | Your product/brand name | "MyApp" |
|
|
25
|
+
| `primary_color` | Main brand color | `#3b82f6` (blue) |
|
|
26
|
+
| `secondary_color` | Accent color | `#f97316` (orange) |
|
|
27
|
+
| `font_family` | Primary font | "Inter", "Roboto" |
|
|
28
|
+
| `tone_of_voice` | Communication style | "friendly", "professional" |
|
|
29
|
+
|
|
30
|
+
**Configuration location:** Create `.claude/config/brand.json` or add to project's design system.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Purpose
|
|
35
|
+
|
|
36
|
+
Apply brand guidelines consistently across all UI components, ensuring visual coherence in colors, typography, tone of voice, and design system elements.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Capabilities
|
|
41
|
+
|
|
42
|
+
- Apply color palette consistently
|
|
43
|
+
- Enforce typography standards
|
|
44
|
+
- Maintain tone of voice in copy
|
|
45
|
+
- Validate brand compliance
|
|
46
|
+
- Create brand-compliant components
|
|
47
|
+
- Ensure responsive design standards
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Brand Identity Template
|
|
52
|
+
|
|
53
|
+
### Brand Essence
|
|
54
|
+
```markdown
|
|
55
|
+
**{{BRAND_NAME}}** is a {{PRODUCT_TYPE}} for {{TARGET_AUDIENCE}}.
|
|
56
|
+
|
|
57
|
+
**Brand Personality:**
|
|
58
|
+
- {{TRAIT_1}}: Description
|
|
59
|
+
- {{TRAIT_2}}: Description
|
|
60
|
+
- {{TRAIT_3}}: Description
|
|
61
|
+
|
|
62
|
+
**Brand Promise:**
|
|
63
|
+
"{{BRAND_PROMISE}}"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Color System
|
|
69
|
+
|
|
70
|
+
### Palette Structure
|
|
71
|
+
```css
|
|
72
|
+
/* Primary - Main brand color */
|
|
73
|
+
--primary-50: /* Lightest */
|
|
74
|
+
--primary-500: /* Main */
|
|
75
|
+
--primary-900: /* Darkest */
|
|
76
|
+
|
|
77
|
+
/* Secondary - Accent color */
|
|
78
|
+
--secondary-50:
|
|
79
|
+
--secondary-500:
|
|
80
|
+
--secondary-900:
|
|
81
|
+
|
|
82
|
+
/* Neutral - Text and backgrounds */
|
|
83
|
+
--gray-50 to --gray-900
|
|
84
|
+
|
|
85
|
+
/* Semantic - Feedback colors */
|
|
86
|
+
--success-500: /* Green - confirmations */
|
|
87
|
+
--warning-500: /* Yellow - alerts */
|
|
88
|
+
--error-500: /* Red - errors */
|
|
89
|
+
--info-500: /* Blue - information */
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Color Usage
|
|
93
|
+
| Element | Color | Example Class |
|
|
94
|
+
|---------|-------|---------------|
|
|
95
|
+
| Primary CTA | Primary-500 | `bg-primary-500 text-white` |
|
|
96
|
+
| Secondary CTA | Secondary-500 | `bg-secondary-500 text-white` |
|
|
97
|
+
| Headings | Gray-900 | `text-gray-900` |
|
|
98
|
+
| Body text | Gray-600 | `text-gray-600` |
|
|
99
|
+
| Borders | Gray-200 | `border-gray-200` |
|
|
100
|
+
| Light backgrounds | Gray-50 | `bg-gray-50` |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Typography
|
|
105
|
+
|
|
106
|
+
### Type Scale
|
|
107
|
+
| Element | Size | Weight | Class |
|
|
108
|
+
|---------|------|--------|-------|
|
|
109
|
+
| Display | 4xl-6xl | Bold | `text-4xl md:text-6xl font-bold` |
|
|
110
|
+
| H1 | 3xl-4xl | Bold | `text-3xl md:text-4xl font-bold` |
|
|
111
|
+
| H2 | 2xl-3xl | Semibold | `text-2xl md:text-3xl font-semibold` |
|
|
112
|
+
| H3 | xl-2xl | Semibold | `text-xl md:text-2xl font-semibold` |
|
|
113
|
+
| Body | base | Normal | `text-base` |
|
|
114
|
+
| Small | sm | Normal | `text-sm` |
|
|
115
|
+
| Caption | xs | Normal | `text-xs text-gray-500` |
|
|
116
|
+
|
|
117
|
+
### Font Weights
|
|
118
|
+
- `font-normal` (400): Body text
|
|
119
|
+
- `font-medium` (500): Emphasis, labels
|
|
120
|
+
- `font-semibold` (600): Subheadings
|
|
121
|
+
- `font-bold` (700): Headings, CTAs
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Spacing System
|
|
126
|
+
|
|
127
|
+
### Base Unit: 4px (Tailwind)
|
|
128
|
+
| Token | Size | Usage |
|
|
129
|
+
|-------|------|-------|
|
|
130
|
+
| `p-1` | 4px | Tight spacing |
|
|
131
|
+
| `p-2` | 8px | Small elements |
|
|
132
|
+
| `p-4` | 16px | Button padding |
|
|
133
|
+
| `p-6` | 24px | Card padding |
|
|
134
|
+
| `p-8` | 32px | Section padding |
|
|
135
|
+
| `p-12` | 48px | Large sections |
|
|
136
|
+
|
|
137
|
+
### Component Standards
|
|
138
|
+
- **Card padding**: `p-6`
|
|
139
|
+
- **Button padding**: `px-4 py-2`
|
|
140
|
+
- **Section spacing**: `py-12 md:py-16`
|
|
141
|
+
- **Element gaps**: `space-y-4` or `gap-4`
|
|
142
|
+
- **Container**: `container mx-auto px-4 md:px-6`
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Tone of Voice
|
|
147
|
+
|
|
148
|
+
### Guidelines
|
|
149
|
+
- **{{TONE_STYLE}}**: Adapt to configured tone
|
|
150
|
+
- **Clear and concise**: Avoid jargon
|
|
151
|
+
- **Helpful**: Guide users, don't lecture
|
|
152
|
+
- **Authentic**: Be genuine, not salesy
|
|
153
|
+
|
|
154
|
+
### Copy Patterns
|
|
155
|
+
```markdown
|
|
156
|
+
**Headers:**
|
|
157
|
+
✓ Action-oriented, benefit-focused
|
|
158
|
+
✗ Technical or feature-focused
|
|
159
|
+
|
|
160
|
+
**CTAs:**
|
|
161
|
+
✓ Clear, specific action ("Save changes", "Create account")
|
|
162
|
+
✗ Vague ("Submit", "Click here")
|
|
163
|
+
|
|
164
|
+
**Errors:**
|
|
165
|
+
✓ Helpful, solution-oriented ("Email not found. Try another or create account")
|
|
166
|
+
✗ Technical ("Error 404: Resource not found")
|
|
167
|
+
|
|
168
|
+
**Confirmations:**
|
|
169
|
+
✓ Positive, reassuring ("Changes saved!")
|
|
170
|
+
✗ Cold ("Operation completed")
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Responsive Breakpoints
|
|
176
|
+
|
|
177
|
+
| Breakpoint | Size | Usage |
|
|
178
|
+
|------------|------|-------|
|
|
179
|
+
| `sm` | 640px | Landscape phones |
|
|
180
|
+
| `md` | 768px | Tablets |
|
|
181
|
+
| `lg` | 1024px | Desktop |
|
|
182
|
+
| `xl` | 1280px | Large desktop |
|
|
183
|
+
| `2xl` | 1536px | Extra large |
|
|
184
|
+
|
|
185
|
+
**Approach**: Mobile-first (`grid-cols-1 md:grid-cols-2 lg:grid-cols-3`)
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Accessibility Requirements
|
|
190
|
+
|
|
191
|
+
### Color Contrast (WCAG AA)
|
|
192
|
+
- Normal text: 4.5:1 minimum
|
|
193
|
+
- Large text (≥18px): 3:1 minimum
|
|
194
|
+
|
|
195
|
+
### Touch Targets
|
|
196
|
+
- Minimum size: 44x44px
|
|
197
|
+
- `min-h-[44px] min-w-[44px]`
|
|
198
|
+
|
|
199
|
+
### Focus States
|
|
200
|
+
- Always visible: `focus:ring-2 focus:ring-primary-500 focus:ring-offset-2`
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Brand Checklist
|
|
205
|
+
|
|
206
|
+
When creating UI components, verify:
|
|
207
|
+
|
|
208
|
+
### Visual
|
|
209
|
+
- [ ] Colors from approved palette
|
|
210
|
+
- [ ] Typography follows scale
|
|
211
|
+
- [ ] Spacing uses standard increments
|
|
212
|
+
- [ ] Responsive on all breakpoints
|
|
213
|
+
|
|
214
|
+
### Interactive
|
|
215
|
+
- [ ] Hover states defined
|
|
216
|
+
- [ ] Focus states visible
|
|
217
|
+
- [ ] Touch targets ≥44px
|
|
218
|
+
- [ ] Loading states implemented
|
|
219
|
+
|
|
220
|
+
### Content
|
|
221
|
+
- [ ] Tone matches brand voice
|
|
222
|
+
- [ ] Copy is clear and helpful
|
|
223
|
+
- [ ] Error messages are friendly
|
|
224
|
+
- [ ] CTAs are action-oriented
|
|
225
|
+
|
|
226
|
+
### Accessibility
|
|
227
|
+
- [ ] Color contrast meets WCAG AA
|
|
228
|
+
- [ ] Images have alt text
|
|
229
|
+
- [ ] Keyboard navigable
|
|
230
|
+
- [ ] Screen reader compatible
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Deliverables
|
|
235
|
+
|
|
236
|
+
When applying this skill, produce:
|
|
237
|
+
|
|
238
|
+
1. **Brand-compliant components** using correct colors, typography, spacing
|
|
239
|
+
2. **Validation report** if reviewing existing components
|
|
240
|
+
3. **Recommendations** for brand inconsistencies found
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markdown-formatter
|
|
3
|
+
category: documentation
|
|
4
|
+
description: Automatically format and lint markdown files to ensure consistent documentation standards
|
|
5
|
+
usage: When formatting documentation, fixing markdown violations, or maintaining doc quality
|
|
6
|
+
input: Markdown files, formatting rules, quality criteria
|
|
7
|
+
output: Formatted markdown files, lint reports, quality metrics
|
|
8
|
+
config_required:
|
|
9
|
+
- rules_enabled: "List of markdown rules to enforce"
|
|
10
|
+
- indentation_spaces: "List indentation size"
|
|
11
|
+
- max_blank_lines: "Maximum consecutive blank lines"
|
|
12
|
+
- code_language_default: "Default language for code blocks"
|
|
13
|
+
- line_length: "Maximum line length"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Markdown Formatter
|
|
17
|
+
|
|
18
|
+
## ⚙️ Configuration
|
|
19
|
+
|
|
20
|
+
| Setting | Description | Example |
|
|
21
|
+
|---------|-------------|---------|
|
|
22
|
+
| `rules_enabled` | Active lint rules | `['MD007', 'MD040', 'MD022']` |
|
|
23
|
+
| `indentation_spaces` | List indent | `2` |
|
|
24
|
+
| `max_blank_lines` | Max consecutive blanks | `1` |
|
|
25
|
+
| `code_language_default` | Default code language | `text` |
|
|
26
|
+
| `line_length` | Max line length | `100` |
|
|
27
|
+
| `heading_style` | Heading format | `atx` (#) or `setext` (===) |
|
|
28
|
+
|
|
29
|
+
## Purpose
|
|
30
|
+
|
|
31
|
+
Comprehensive markdown formatting and linting to ensure consistent, clean, and standards-compliant documentation.
|
|
32
|
+
|
|
33
|
+
## Capabilities
|
|
34
|
+
|
|
35
|
+
- Fix list indentation (MD007)
|
|
36
|
+
- Remove excessive blank lines (MD012)
|
|
37
|
+
- Add heading blank lines (MD022)
|
|
38
|
+
- Resolve duplicate headings (MD024)
|
|
39
|
+
- Remove heading punctuation (MD026)
|
|
40
|
+
- Fix ordered list numbering (MD029)
|
|
41
|
+
- Add code block blank lines (MD031)
|
|
42
|
+
- Add list blank lines (MD032)
|
|
43
|
+
- Convert emphasis to headings (MD036)
|
|
44
|
+
- Add code block languages (MD040)
|
|
45
|
+
- Validate link fragments (MD051)
|
|
46
|
+
- Add table blank lines (MD058)
|
|
47
|
+
|
|
48
|
+
## Key Rules
|
|
49
|
+
|
|
50
|
+
### MD007 - List Indentation
|
|
51
|
+
|
|
52
|
+
Ensures consistent indentation for nested lists.
|
|
53
|
+
|
|
54
|
+
**Before:**
|
|
55
|
+
```markdown
|
|
56
|
+
- Item 1
|
|
57
|
+
- Nested (4 spaces)
|
|
58
|
+
- Deep nested (6 spaces)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**After:**
|
|
62
|
+
```markdown
|
|
63
|
+
- Item 1
|
|
64
|
+
- Nested (2 spaces)
|
|
65
|
+
- Deep nested (4 spaces)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### MD040 - Code Block Language
|
|
69
|
+
|
|
70
|
+
Adds language specification to code blocks.
|
|
71
|
+
|
|
72
|
+
**Before:**
|
|
73
|
+
````markdown
|
|
74
|
+
```
|
|
75
|
+
function hello() {
|
|
76
|
+
console.log('hello');
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
````
|
|
80
|
+
|
|
81
|
+
**After:**
|
|
82
|
+
````markdown
|
|
83
|
+
```typescript
|
|
84
|
+
function hello() {
|
|
85
|
+
console.log('hello');
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
````
|
|
89
|
+
|
|
90
|
+
### MD022 - Heading Blank Lines
|
|
91
|
+
|
|
92
|
+
Adds blank lines around headings.
|
|
93
|
+
|
|
94
|
+
**Before:**
|
|
95
|
+
```markdown
|
|
96
|
+
Some text
|
|
97
|
+
## Heading
|
|
98
|
+
More text
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**After:**
|
|
102
|
+
```markdown
|
|
103
|
+
Some text
|
|
104
|
+
|
|
105
|
+
## Heading
|
|
106
|
+
|
|
107
|
+
More text
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### MD012 - Multiple Blank Lines
|
|
111
|
+
|
|
112
|
+
Removes excessive blank lines.
|
|
113
|
+
|
|
114
|
+
**Before:**
|
|
115
|
+
```markdown
|
|
116
|
+
Text
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
Too many blanks
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**After:**
|
|
123
|
+
```markdown
|
|
124
|
+
Text
|
|
125
|
+
|
|
126
|
+
One blank line
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Usage
|
|
130
|
+
|
|
131
|
+
### Format Single File
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Format file
|
|
135
|
+
pnpm format:md path/to/file.md
|
|
136
|
+
|
|
137
|
+
# Validate only
|
|
138
|
+
pnpm lint:md path/to/file.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Format Directory
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Format all markdown
|
|
145
|
+
pnpm format:md "**/*.md"
|
|
146
|
+
|
|
147
|
+
# Exclude patterns
|
|
148
|
+
pnpm format:md "**/*.md" --ignore "node_modules/**"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Integration
|
|
152
|
+
|
|
153
|
+
#### Pre-commit Hook
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
# .husky/pre-commit
|
|
157
|
+
#!/bin/sh
|
|
158
|
+
pnpm lint:md --staged
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### CI/CD
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
# .github/workflows/docs.yml
|
|
165
|
+
- name: Lint Markdown
|
|
166
|
+
run: pnpm lint:md "**/*.md"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Configuration File
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
# .markdownlint.json
|
|
173
|
+
{
|
|
174
|
+
"MD007": { "indent": 2 },
|
|
175
|
+
"MD012": { "maximum": 1 },
|
|
176
|
+
"MD013": false,
|
|
177
|
+
"MD024": { "siblings_only": true },
|
|
178
|
+
"MD040": { "allowed_languages": ["typescript", "bash", "json"] },
|
|
179
|
+
"MD041": false
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Common Patterns
|
|
184
|
+
|
|
185
|
+
### Documentation Structure
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
# Title
|
|
189
|
+
|
|
190
|
+
Brief introduction.
|
|
191
|
+
|
|
192
|
+
## Section 1
|
|
193
|
+
|
|
194
|
+
Content with proper spacing.
|
|
195
|
+
|
|
196
|
+
### Subsection
|
|
197
|
+
|
|
198
|
+
- List item 1
|
|
199
|
+
- Nested item
|
|
200
|
+
- Another nested
|
|
201
|
+
- List item 2
|
|
202
|
+
|
|
203
|
+
### Code Example
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
const example = 'with language';
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Section 2
|
|
210
|
+
|
|
211
|
+
More content.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Tables
|
|
215
|
+
|
|
216
|
+
```markdown
|
|
217
|
+
| Column 1 | Column 2 |
|
|
218
|
+
|----------|----------|
|
|
219
|
+
| Data 1 | Data 2 |
|
|
220
|
+
| Data 3 | Data 4 |
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Best Practices
|
|
224
|
+
|
|
225
|
+
| Practice | Description |
|
|
226
|
+
|----------|-------------|
|
|
227
|
+
| **Consistent Indentation** | Use configured spaces for lists |
|
|
228
|
+
| **Language Specification** | Always add language to code blocks |
|
|
229
|
+
| **Blank Lines** | Surround headings, tables, code |
|
|
230
|
+
| **No Trailing Punctuation** | Remove from headings |
|
|
231
|
+
| **Unique Headings** | Avoid duplicate heading text |
|
|
232
|
+
| **Link Validation** | Ensure fragment links work |
|
|
233
|
+
|
|
234
|
+
## Automation
|
|
235
|
+
|
|
236
|
+
### Watch Mode
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# Auto-format on change
|
|
240
|
+
pnpm format:md --watch
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Editor Integration
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
// .vscode/settings.json
|
|
247
|
+
{
|
|
248
|
+
"editor.formatOnSave": true,
|
|
249
|
+
"[markdown]": {
|
|
250
|
+
"editor.defaultFormatter": "markdownlint"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Error Handling
|
|
256
|
+
|
|
257
|
+
### Graceful Degradation
|
|
258
|
+
|
|
259
|
+
- Continue on individual rule failures
|
|
260
|
+
- Create backups before modifications
|
|
261
|
+
- Detailed error reporting
|
|
262
|
+
- Rollback capabilities
|
|
263
|
+
|
|
264
|
+
### Edge Cases
|
|
265
|
+
|
|
266
|
+
- Malformed markdown handling
|
|
267
|
+
- Binary file detection
|
|
268
|
+
- Large file optimization
|
|
269
|
+
- Unicode support
|
|
270
|
+
|
|
271
|
+
## Reporting
|
|
272
|
+
|
|
273
|
+
### Fix Summary
|
|
274
|
+
|
|
275
|
+
```text
|
|
276
|
+
Processed: 45 files
|
|
277
|
+
Fixed: 127 violations
|
|
278
|
+
- MD007: 23 (list indentation)
|
|
279
|
+
- MD040: 56 (code languages)
|
|
280
|
+
- MD022: 48 (heading blanks)
|
|
281
|
+
Manual review: 3 files
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Detailed Report
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
file.md
|
|
288
|
+
✓ MD007 Fixed list indentation (5 instances)
|
|
289
|
+
✓ MD040 Added code languages (2 instances)
|
|
290
|
+
✗ MD024 Duplicate headings require manual review
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Checklist
|
|
294
|
+
|
|
295
|
+
- [ ] Rules configured for project
|
|
296
|
+
- [ ] Integration with workflow
|
|
297
|
+
- [ ] CI/CD validation enabled
|
|
298
|
+
- [ ] Editor integration setup
|
|
299
|
+
- [ ] Pre-commit hook active
|
|
300
|
+
- [ ] All violations fixed
|
|
301
|
+
- [ ] Documentation tested
|
|
302
|
+
- [ ] Team guidelines updated
|