agentleFS
jimmypocockjimmypocock/cursor-rules/.cursor/rules/docs-structure.mdc

cursor-rules / rules

Cursor rule8 starsChanged 19 months agoMITView on GitHub

Best practices for organizing the docs/ directory

The file

Show its rules and text

We split this docs-structure.mdc into the rules it gives an agent

27 rules. About 0 are common, 27 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈27

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a clear, logical hierarchy for documentation files

    line 16
  2. Distinctive:

    Use a consistent naming convention (kebab-case recommended)

    line 17
  3. Distinctive:

    Create sidebar navigation for complex documentation

    line 22
  4. Distinctive:

    Use folders to separate different documentation types

    line 23
  5. Distinctive:

    Use consistent heading levels (## for main sections, ### for subsections)

    line 38
  6. Distinctive:

    Add "Next Steps" or "See Also" sections at the end

    line 40
  7. Distinctive:

    Keep individual files focused on a single topic

    line 43
  8. Distinctive:

    Write in a clear, conversational style

    line 46
  9. Distinctive:

    Use active voice and present tense

    line 47
  10. Distinctive:

    Use consistent terminology throughout

    line 49
  11. Distinctive:

    Create glossaries for complex terminology

    line 50
  12. Distinctive:

    Use tables to organize structured information

    line 53
  13. Distinctive:

    Tutorial: - Start-to-finish walkthrough with context

    line 58
  14. Distinctive:

    Decision Record: - Document important decisions

    line 63
  15. Distinctive:

    Create version-specific documentation directories when needed

    line 67
  16. Distinctive:

    Document breaking changes prominently

    line 68
  17. Distinctive:

    Use feature flags to toggle content visibility

    line 71
  18. Distinctive:

    Use a consistent naming convention for image files

    line 77
  19. Distinctive:

    Create and store diagrams as code when possible

    line 80
  20. Distinctive:

    Use animated GIFs sparingly for UI demonstrations

    line 82
  21. Distinctive:

    Document each endpoint thoroughly

    line 86
  22. Distinctive:

    Document all parameters and their types

    line 88
  23. Distinctive:

    Document rate limits and pagination

    line 91
  24. Distinctive:

    Create interactive API explorers when possible

    line 93
  25. Distinctive:

    Test documentation links regularly

    line 97
  26. Distinctive:

    Test documentation on different devices and screen sizes

    line 101
  27. Distinctive:

    Use documentation linting tools

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
docs-structure.mdc
---
description: Best practices for organizing the docs/ directory
globs: 
alwaysApply: false
---
---
Description: Best practices for organizing the docs/ directory
Globs: **/docs/**/*.md, **/documentation/**/*.md
---

# Documentation Structure Standards
@base.mdc
@readme-documentation.mdc

## Documentation Organization
- Create a clear, logical hierarchy for documentation files
- Use a consistent naming convention (kebab-case recommended)
- Group related documents in subdirectories
- Include an index.md in each directory for navigation
- Maintain a consistent structure across all documentation
- Link between related documentation sections
- Create sidebar navigation for complex documentation
- Use folders to separate different documentation types

## Core Documentation Types
- **Guides/** - Step-by-step instructions for common tasks
- **Concepts/** - Explanations of key ideas and architecture
- **Reference/** - Detailed technical reference information
- **Tutorials/** - Complete walkthroughs for beginners
- **API/** - API documentation if applicable
- **Examples/** - Example implementations and use cases
- **Troubleshooting/** - Solutions for common problems
- **Contributing/** - Guidelines for project contributors

## Documentation Files Structure
- Begin each file with a descriptive title (# Title)
- Include a brief introduction explaining the document's purpose
- Use consistent heading levels (## for main sections, ### for subsections)
- Include a table of contents for longer documents
- Add "Next Steps" or "See Also" sections at the end
- Include metadata (author, date, version) when relevant
- End with links to related documentation
- Keep individual files focused on a single topic

## Technical Writing Best Practices
- Write in a clear, conversational style
- Use active voice and present tense
- Explain technical terms on first use
- Use consistent terminology throughout
- Create glossaries for complex terminology
- Include diagrams for complex concepts
- Break long processes into numbered steps
- Use tables to organize structured information

## Document Types and Templates
- **Concept Document** - Explain a single concept thoroughly
- **How-To Guide** - Task-focused instructions
- **Tutorial** - Start-to-finish walkthrough with context
- **Reference** - Comprehensive technical details
- **Example** - Working code with explanation
- **FAQ** - Concise answers to common questions
- **Architecture Document** - System design and rationale
- **Decision Record** - Document important decisions

## Version-Specific Documentation
- Clearly mark version-specific information
- Create version-specific documentation directories when needed
- Document breaking changes prominently
- Include migration guides between versions
- Maintain documentation for supported older versions
- Use feature flags to toggle content visibility
- Link to the correct version of external documentation
- Include version compatibility tables

## Media and Assets
- Store images in an assets/ directory
- Use a consistent naming convention for image files
- Optimize images for web display
- Include alt text for all images
- Create and store diagrams as code when possible
- Maintain source files for complex diagrams
- Use animated GIFs sparingly for UI demonstrations
- Include captions for complex figures

## API Documentation
- Document each endpoint thoroughly
- Include request and response examples
- Document all parameters and their types
- Show error responses and codes
- Include authentication requirements
- Document rate limits and pagination
- Provide example code in multiple languages
- Create interactive API explorers when possible

## Documentation Testing
- Validate all code examples work as documented
- Test documentation links regularly
- Review documentation for accuracy during releases
- Implement user feedback mechanisms
- Gather metrics on documentation usage
- Test documentation on different devices and screen sizes
- Use documentation linting tools
- Review documentation clarity with new team members

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.