Specialized guidance for maintaining and extending the Docusaurus-based documentation site in the Codomyrmex project. Covers content standards, Docusaurus configuration, sidebar structure, and meta-documentation practices.
Expert guidance for working with the Docusaurus-based documentation site in the Codomyrmex project.
You are an AI assistant specialized in maintaining and extending the Docusaurus documentation site for the Codomyrmex project. Follow these instructions precisely when working within the `documentation` module.
1. **Module Purpose**: This module generates and serves the comprehensive documentation website using Docusaurus. It supplements the general project rules defined in `general.cursorrules`.
2. **Core Technologies**: Docusaurus, Markdown, Node.js, npm/yarn, React (for Docusaurus components).
3. **Always Defer to General Rules**: Unless explicitly overridden here, follow `general.cursorrules` for the broader Codomyrmex project.
When working in this module, prioritize these files and directories:
- `docs/intro.md` - Main landing page
- `docs/modules/` - Subdirectories for each Codomyrmex module's documentation
- `docs/project/` - Project-wide documents (Contributing, License, etc.)
1. **Clarity and Accuracy**: All documentation must be clear, accurate, and current.
2. **Consistent Structure**: Follow the established pattern for module documentation:
- Overview
- API Reference
- MCP (Model Context Protocol) details
- Changelog
- Security considerations
- Usage Examples
- Detailed Documentation/Tutorials
3. **Markdown Best Practices**:
- Use standard Markdown syntax
- Include proper frontmatter (`sidebar_label`, `title`, `slug`, `id`) for Docusaurus
- Maintain consistent heading hierarchy
4. **Links**:
- Internal links must be relative and verified
- External links should be tested for validity
5. **Adding New Module Documentation**:
- Create a subdirectory in `docs/modules/` for the new module
- Update `sidebars.js` with the new module's navigation structure
- Reference the tutorial at `documentation/docs/modules/documentation/docs/tutorials/example_tutorial.md`
1. **Configuration Changes** (`docusaurus.config.js`):
- Understand site-wide impact before modifying
- Test thoroughly after any changes
- Document configuration changes in commit messages
2. **Sidebar Management** (`sidebars.js`):
- Critical for site navigation
- Ensure correct document IDs and paths
- Maintain logical, user-friendly structure
3. **Custom Components**:
- Place custom React components in `src/components/`
- Test thoroughly before integration
- Document component usage
Before committing changes:
1. **Local Development Server**:
- Run `npm run start` or `yarn start` from the `documentation` directory
- Preview all changes in the browser
2. **Navigation Testing**:
- Click through new or modified sections
- Verify all links (internal and external)
- Check page rendering and formatting
3. **Build Verification**:
- Run `npm run build` to ensure no errors
- Confirm successful production build
The `documentation/docs/modules/documentation/` subdirectory contains documentation about the documentation module itself:
Before finalizing work on the documentation module:
```markdown
1. Create directory: `docs/modules/new-module/`
2. Add module overview: `docs/modules/new-module/overview.md`
3. Update `sidebars.js`:
```js
{
type: 'category',
label: 'New Module',
items: [
'modules/new-module/overview',
'modules/new-module/api',
'modules/new-module/examples',
],
}
```
4. Test locally with `npm run start`
5. Verify build with `npm run build`
```
```yaml
---
id: module-overview
title: Module Overview
sidebar_label: Overview
slug: /modules/example/overview
---
```
```markdown
Correct: [See API Reference](./api.md)
Correct: [Contributing Guide](../../project/contributing.md)
Incorrect: [External style link](https://site.com/docs/api)
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/codomyrmex-documentation-module-rules/raw