Skip to content

Commit 3f3c74d

Browse files
authored
docs: add .cursorignore & AGENT.md (#1831)
add AGENT.md remake current cursor rules to be cursor specific add new section to CONTRIBUTING.md
1 parent 41dc28b commit 3f3c74d

File tree

8 files changed

+488
-116
lines changed

8 files changed

+488
-116
lines changed
Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,62 @@
11
---
2-
description: Standards for OpenAPI specifications and API code samples
2+
description: Cursor-specific rules for OpenAPI specifications and API documentation
33
globs: ["apify-api/**/*.yaml", "apify-api/**/*.js"]
44
alwaysApply: true
55
---
66

7-
# API Documentation Rules
7+
# Cursor-Specific API Documentation Rules
88

9-
## OpenAPI specifications
9+
## Cursor OpenAPI Workflow
1010

11-
- Follow **RESTful conventions** for endpoint design
12-
- Use **descriptive operation IDs** following camelCase
13-
- Include **comprehensive examples** for all endpoints
14-
- Provide **clear parameter descriptions**
11+
### Using Cursor for OpenAPI Editing
1512

16-
## Code samples
13+
- Leverage Cursor's YAML syntax highlighting for OpenAPI files
14+
- Use Cursor's JSON schema validation for OpenAPI specifications
15+
- Use Cursor's autocomplete for OpenAPI keywords and properties
1716

18-
- Include examples in **multiple languages** (JavaScript, Python, cURL)
19-
- Use **realistic data** in examples
20-
- Show **error handling** where appropriate
21-
- Include **authentication examples**
17+
### Cursor-Specific API Documentation Tasks
18+
19+
- Use Cursor Chat to "validate this OpenAPI specification"
20+
- Ask "generate code examples for this endpoint"
21+
- Request "check for consistency across similar endpoints"
22+
23+
## Cursor Code Sample Generation
24+
25+
### Using Cmd+K for API References
26+
27+
- Use `@apify-api/openapi/paths/**/*.yaml` to reference endpoint definitions
28+
- Use `@apify-api/openapi/components/schemas/**/*.yaml` to reference data models
29+
- Use `@AGENTS.md` to reference API documentation standards
30+
31+
### Cursor-Specific Code Sample Workflow
32+
33+
```yaml
34+
# When editing OpenAPI files in Cursor:
35+
# 1. Use Cursor's YAML validation
36+
# 2. Leverage autocomplete for OpenAPI keywords
37+
# 3. Use Cursor Chat to generate examples
38+
# 4. Use Cursor's search to find similar patterns
39+
```
40+
41+
## File-Specific Cursor Rules
42+
43+
### For OpenAPI Specification Files (`apify-api/openapi/**/*.yaml`)
44+
45+
- Use Cursor's YAML syntax highlighting and validation
46+
- Leverage Cursor's autocomplete for OpenAPI 3.0 keywords
47+
- Use Cursor's search to find similar endpoint patterns
48+
- Use Cursor Chat to validate OpenAPI compliance
49+
50+
### For Generated Code Samples (`apify-api/openapi/code_samples/**/*.js`)
51+
52+
- Use Cursor's JavaScript syntax highlighting
53+
- Leverage Cursor's autocomplete for JavaScript APIs
54+
- Use Cursor's search to find similar code patterns
55+
- Use Cursor Chat to improve code examples
56+
57+
## Cursor Quality Assurance for APIs
58+
59+
- Use Cursor's YAML validation for OpenAPI files
60+
- Leverage Cursor's search to ensure endpoint naming consistency
61+
- Use Cursor Chat to review API documentation completeness
62+
- Use Cursor's autocomplete to maintain OpenAPI specification standards
Lines changed: 57 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,82 @@
11
---
2-
description: Content formatting standards for MDX files and code examples
2+
description: Cursor-specific content formatting rules for MDX and markdown files
33
globs: ["sources/**/*.md", "sources/**/*.mdx"]
44
alwaysApply: true
55
---
66

7-
# Content Formatting Rules
7+
# Cursor-Specific Content Formatting
88

9-
## Front matter (MDX files)
9+
## Cursor MDX/Markdown Features
10+
11+
### Syntax Highlighting in Cursor
12+
13+
- Use language-specific code blocks for proper syntax highlighting
14+
- Leverage Cursor's MDX component autocomplete
15+
- Use Cursor's markdown preview for real-time formatting verification
16+
17+
### Cursor-Specific Code Block Handling
18+
19+
```markdown
20+
# For JavaScript examples
21+
```javascript
22+
// Cursor will provide syntax highlighting and autocomplete
23+
const example = "properly formatted";
24+
```
25+
26+
# For YAML frontmatter
1027

1128
```yaml
1229
---
13-
title: "Clear, action-oriented title"
14-
description: "140-160 character description that explains the value"
15-
sidebar_position: 1
16-
slug: /path/to/page
30+
title: "Example"
31+
description: "Description"
1732
---
1833
```
1934

20-
## Text emphasis
35+
# For API examples
2136

22-
- **Bold** for UI elements, buttons, menu items
23-
- *Italics* for emphasis and new terms
24-
- `code` for inline code, file names, paths, variables
25-
- Use code blocks with language specification for examples
37+
```bash
38+
curl -X GET "https://api.apify.com/v2/acts"
39+
```
2640

27-
## Admonitions
2841

29-
Use admonitions to highlight important information:
42+
## Cursor Workflow for Formatting
3043

31-
```markdown
32-
:::note Important information
33-
Your note content here.
34-
:::
44+
### Using Cursor Chat for Formatting Help
3545

36-
:::tip Pro tip
37-
Helpful tip for users.
38-
:::
46+
- Ask "format this markdown table properly"
47+
- Request "add syntax highlighting to this code block"
48+
- Use "check this frontmatter for proper YAML syntax"
3949

40-
:::info Additional context
41-
Background information.
42-
:::
50+
### Using Cmd+K for Quick Formatting
51+
52+
- Use `@` to reference formatting standards
53+
- Use `@sources/**/*.mdx` to find similar MDX patterns
54+
- Use `@apify-api/**/*.yaml` to reference API examples
55+
56+
## Cursor-Specific Admonition Handling
57+
58+
When using admonitions in Cursor:
4359

44-
:::caution Warning
45-
Something to be careful about.
60+
```markdown
61+
:::note Cursor Tip
62+
Use Cursor's markdown preview to verify admonition formatting
4663
:::
4764

48-
:::danger Critical
49-
Critical information that could cause issues.
65+
:::tip Cursor Feature
66+
Leverage Cursor's autocomplete for consistent admonition syntax
5067
:::
5168
```
5269

53-
## Code examples
70+
## File-Specific Formatting Rules
71+
72+
### For MDX Files (`sources/**/*.mdx`)
73+
74+
- Use Cursor's MDX syntax highlighting
75+
- Leverage component imports with proper TypeScript support
76+
- Use Cursor's JSX autocomplete for custom components
77+
78+
### For Markdown Files (`sources/**/*.md`)
5479

55-
- Use **code tabs** for multiple language examples
56-
- Include **complete, runnable examples**
57-
- Add **comments** to explain complex code
58-
- Use **syntax highlighting** for all code blocks
80+
- Use Cursor's markdown preview for formatting verification
81+
- Leverage Cursor's spell check for content quality
82+
- Use Cursor's link validation for internal references
Lines changed: 33 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,55 @@
11
---
2-
description: Documentation style guidelines and writing standards for Apify docs
2+
description: Cursor-specific documentation style rules for Apify docs
33
globs: ["sources/**/*.md", "sources/**/*.mdx"]
44
alwaysApply: true
55
---
66

7-
# Documentation Style Guidelines
7+
# Cursor-Specific Documentation Rules
88

9-
## Project overview
9+
## Context-Aware Writing
1010

11-
This is the Apify documentation repository containing platform documentation, academy content, and API reference. The project uses Docusaurus with MDX, OpenAPI specifications, and follows Microsoft style guide principles.
11+
When editing documentation in Cursor, consider the broader context:
1212

13-
## Documentation structure
13+
- **Cross-references**: When mentioning other pages, use Cursor's file navigation to verify links
14+
- **Consistency checks**: Use Cursor's search to ensure terminology consistency across files
15+
- **Code examples**: Leverage Cursor's syntax highlighting and validation for code blocks
1416

15-
- **Platform docs**: `/sources/platform/` - Core platform features and functionality
16-
- **Academy**: `/sources/academy/` - Educational content, tutorials, and courses
17-
- **API reference**: `/apify-api/` - Generated from OpenAPI specifications
17+
## Cursor-Specific Workflows
1818

19-
## Writing style & guidelines
19+
### Using Cursor Chat for Documentation
2020

21-
### Language & tone
21+
- Ask Cursor to "review this documentation for clarity and completeness"
22+
- Use "explain this technical concept in simpler terms" for complex topics
23+
- Request "suggest improvements for this tutorial structure"
2224

23-
- Use **US English** spelling and grammar
24-
- Write in **inclusive language** - avoid gendered terms and assumptions
25-
- Use **active voice** whenever possible
26-
- Write for a **technical audience** but keep explanations clear and accessible
27-
- Avoid directional language (don't use "left/right")
28-
- Be **action-oriented** in descriptions and titles
25+
### Using Cmd+K for Quick Edits
2926

30-
### Technical writing best practices
27+
- Use `@AGENTS.md` to reference the main documentation standards
28+
- Use `@sources/**/*.md` to search across all documentation files
29+
- Use `@apify-api/**/*.yaml` to reference API specifications
3130

32-
- **Start with the user's goal** - what are they trying to accomplish?
33-
- **Use clear, concise sentences** - avoid unnecessary complexity
34-
- **Provide context** before diving into technical details
35-
- **Use consistent terminology** throughout the documentation
36-
- **Include examples** for complex concepts
37-
- **Structure content logically** - from basic to advanced concepts
31+
## File-Specific Guidance
3832

39-
### Microsoft style guide compliance
33+
### For Platform Documentation (`sources/platform/**/*.md`)
4034

41-
- Use **sentence case** for headings (except main titles)
42-
- Use **title case** for UI elements and proper nouns
43-
- **Bold** for UI elements, buttons, menu items
44-
- _Italics_ for emphasis and new terms
45-
- `code` for inline code, file names, and technical terms
46-
- Use **numbered lists** for sequential steps
47-
- Use **bullet points** for non-sequential items
35+
- Focus on practical, actionable guidance
36+
- Include real-world examples and use cases
37+
- Reference related API endpoints when applicable
4838

49-
## Common patterns
39+
### For Academy Content (`sources/academy/**/*.md`)
5040

51-
### Tutorial structure
41+
- Structure content for learning progression
42+
- Include hands-on exercises and examples
43+
- Provide clear prerequisites and next steps
5244

53-
1. **Introduction** - What will the user learn?
54-
2. **Prerequisites** - What do they need to know/have?
55-
3. **Step-by-step instructions** - Clear, numbered steps
56-
4. **Code examples** - Complete, working examples
57-
5. **Summary** - What they accomplished and next steps
45+
### For MDX Files
5846

59-
### Troubleshooting sections
47+
- Leverage Cursor's MDX syntax highlighting
48+
- Use component imports and JSX syntax appropriately
49+
- Ensure proper frontmatter formatting
6050

61-
- **Common issues** and solutions
62-
- **Error messages** and their meanings
63-
- **Debugging steps** for complex problems
64-
- **Contact information** for additional help
51+
## Quality Assurance in Cursor
6552

66-
## Accessibility guidelines
67-
68-
- Use **descriptive link text** (avoid "click here")
69-
- Include **alt text** for all images
70-
- Use **proper heading hierarchy** (H1 → H2 → H3)
71-
- Write **clear, concise content**
72-
73-
## SEO best practices
74-
75-
- Use **descriptive page titles**
76-
- Include **relevant keywords** naturally
77-
- Write **meta descriptions** (140-160 characters)
78-
- Use **proper heading structure**
79-
- Include **internal links** to related content
80-
81-
Remember: The goal is to help users succeed with Apify. Every piece of documentation should serve that purpose by being clear, accurate, and actionable.
53+
- Use Cursor's spell check for documentation files
54+
- Leverage Cursor's markdown preview for formatting verification
55+
- Use Cursor's search to find similar content and maintain consistency

.cursorignore

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Dependencies
2+
node_modules/
3+
package-lock.json
4+
yarn.lock
5+
apify-docs-theme/package-lock.json
6+
7+
# Build artifacts and generated content
8+
build/
9+
dist/
10+
build-docs/
11+
.docusaurus/
12+
static/api/
13+
apify-api.yaml
14+
apify-api/openapi/code_samples/
15+
apify-api/docs/
16+
17+
# Large generated files
18+
*.log
19+
*.pid
20+
*.seed
21+
*.tsbuildinfo
22+
23+
# IDE and editor files
24+
.vscode/
25+
.idea/
26+
.history/
27+
28+
# OS files
29+
.DS_Store
30+
Thumbs.db
31+
32+
# Temporary files
33+
tmp/
34+
pids/
35+
coverage/
36+
.nyc_output/
37+
38+
# Generated types
39+
types/
40+
41+
# Turbo cache
42+
.turbo/
43+
44+
# Generated documentation
45+
# These are typically auto-generated, but require editing from time to time
46+
# sources/api/*
47+
# !sources/api/sidebars.js
48+
# !sources/api/getting-started.mdx
49+
50+
# Large static files that are auto-generated
51+
static/api/openapi.json
52+
static/api/openapi.yaml
53+
54+
# Generated routes and registry files
55+
.docusaurus/routes.js
56+
.docusaurus/routesChunkNames.json
57+
.docusaurus/registry.js
58+
.docusaurus/globalData.json
59+
.docusaurus/site-metadata.json
60+
.docusaurus/client-modules.js
61+
.docusaurus/docusaurus.config.mjs
62+
63+
# Generated plugin directories
64+
.docusaurus/docusaurus-plugin-*/
65+
.docusaurus/docusaurus-theme-*/
66+
.docusaurus/@apify/
67+
68+
# Generated code samples (these are auto-generated from OpenAPI specs)
69+
# Note: These are typically auto-generated, but you may need to edit them occasionally
70+
# Uncomment the lines below if you want to ignore them completely:
71+
# apify-api/openapi/code_samples/javascript/*.js
72+
# apify-api/openapi/code_samples/curl/*.sh
73+
74+
# Generated requirements files
75+
apify-api/scripts/requirements.bin
76+
77+
# AGENTS.md is the primary vendor-agnostic rules file
78+
# .cursor/rules/ contains Cursor-specific rules with advanced features

.github/styles/config/vocabularies/Docs/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ preconfigured
8282
[Tt]rello
8383
[Pp]refill
8484
[Gg]umloop
85+
[Rr]edocly
8586
[Aa]pify
8687

8788
[Mm]ultiselect
@@ -122,3 +123,4 @@ walkthroughs?
122123

123124
ul
124125
[Aa]gno
126+
pnpm

0 commit comments

Comments
 (0)