Skip to content

Commit b986025

Browse files
authored
Windsurf rule guide (#902)
* add windsurf guide to nav * add windsurf guide * remove cards * add `:`
1 parent 1282bd1 commit b986025

File tree

2 files changed

+136
-0
lines changed

2 files changed

+136
-0
lines changed

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"mcp",
113113
"guides/claude-code",
114114
"guides/cursor",
115+
"guides/windsurf",
115116
"react-components",
116117
"settings/custom-scripts",
117118
"settings/seo",

guides/windsurf.mdx

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: "Windsurf"
3+
description: "Configure Windsurf to be your writing assistant"
4+
icon: "waves"
5+
---
6+
7+
Transform Windsurf into a documentation expert that understands your style guide, components, and project context through workspace rules and memories.
8+
9+
## Using Windsurf with Mintlify
10+
11+
Windsurf's Cascade AI assistant can be tuned to write documentation according to your standards using Mintlify components. Workspace rules and memories provide persistent context about your project, ensuring more consistent suggestions from Cascade.
12+
13+
* **Workspace rules** are stored in your documentation repository and shared with your team.
14+
* **Memories** provide individual context that builds up over time.
15+
16+
We recommend setting up workspace rules for shared documentation standards. You can develop memories as you work, but since they are not shared, they will not be consistent across team members.
17+
18+
Create workspace rules in the `.windsurf/rules` directory of your docs repo. See [Memories & Rules](https://docs.windsurf.com/windsurf/cascade/memories) in the Windsurf documentation for more information.
19+
20+
## Example workspace rule
21+
22+
This rule provides Cascade with context about Mintlify components and general technical writing best practices.
23+
24+
You can use this example rule as-is or customize it for your documentation:
25+
26+
* **Writing standards**: Update language guidelines to match your style guide.
27+
* **Component patterns**: Add project-specific components or modify existing examples.
28+
* **Code examples**: Replace generic examples with real API calls and responses for your product.
29+
* **Style and tone preferences**: Adjust terminology, formatting, and other rules.
30+
31+
Save your rule as a `.md` file in the `.windsurf/rules` directory of your docs repo.
32+
33+
````mdx
34+
# Mintlify technical writing rule
35+
36+
## Project context
37+
38+
- This is a documentation project on the Mintlify platform
39+
- We use MDX files with YAML frontmatter
40+
- Navigation is configured in `docs.json`
41+
- We follow technical writing best practices
42+
43+
## Writing standards
44+
45+
- Use second person ("you") for instructions
46+
- Write in active voice and present tense
47+
- Start procedures with prerequisites
48+
- Include expected outcomes for major steps
49+
- Use descriptive, keyword-rich headings
50+
- Keep sentences concise but informative
51+
52+
## Required page structure
53+
54+
Every page must start with frontmatter:
55+
56+
```yaml
57+
---
58+
title: "Clear, specific title"
59+
description: "Concise description for SEO and navigation"
60+
---
61+
```
62+
63+
## Mintlify components
64+
65+
### Callouts
66+
67+
- `<Note>` for helpful supplementary information
68+
- `<Warning>` for important cautions and breaking changes
69+
- `<Tip>` for best practices and expert advice
70+
- `<Info>` for neutral contextual information
71+
- `<Check>` for success confirmations
72+
73+
### Code examples
74+
75+
- When appropriate, include complete, runnable examples
76+
- Use `<CodeGroup>` for multiple language examples
77+
- Specify language tags on all code blocks
78+
- Include realistic data, not placeholders
79+
- Use `<RequestExample>` and `<ResponseExample>` for API docs
80+
81+
### Procedures
82+
83+
- Use `<Steps>` component for sequential instructions
84+
- Include verification steps with `<Check>` components when relevant
85+
- Break complex procedures into smaller steps
86+
87+
### Content organization
88+
89+
- Use `<Tabs>` for platform-specific content
90+
- Use `<Accordion>` for progressive disclosure
91+
- Use `<Card>` and `<CardGroup>` for highlighting content
92+
- Wrap images in `<Frame>` components with descriptive alt text
93+
94+
## API documentation requirements
95+
96+
- Document all parameters with `<ParamField>`
97+
- Show response structure with `<ResponseField>`
98+
- Include both success and error examples
99+
- Use `<Expandable>` for nested object properties
100+
- Always include authentication examples
101+
102+
## Quality standards
103+
104+
- Test all code examples before publishing
105+
- Use relative paths for internal links
106+
- Include alt text for all images
107+
- Ensure proper heading hierarchy (start with h2)
108+
- Check existing patterns for consistency
109+
````
110+
111+
## Working with Cascade
112+
113+
Once your rules are set up, you can use Cascade to assist with various documentation tasks. See [Cascade](https://docs.windsurf.com/windsurf/cascade) in the Windsurf documentation for more information.
114+
115+
### Example prompts
116+
117+
**Writing new content**:
118+
```text wrap
119+
Create a new page explaining how to authenticate with our API. Include code examples in JavaScript, Python, and cURL.
120+
```
121+
122+
**Improving existing content**:
123+
```text wrap
124+
Review this page and suggest improvements for clarity and component usage. Focus on making the steps easier to follow.
125+
```
126+
127+
**Creating code examples**:
128+
```text wrap
129+
Generate a complete code example showing error handling for this API endpoint. Use realistic data and include expected responses.
130+
```
131+
132+
**Maintaining consistency**:
133+
```text wrap
134+
Check if this new page follows our documentation standards and suggest any needed changes.
135+
```

0 commit comments

Comments
 (0)