|
| 1 | +--- |
| 2 | +description: Guidelines for editing documentation files. Apply when creating or modifying docs, README, or documentation content. |
| 3 | +globs: |
| 4 | + - README.md |
| 5 | + - docs/** |
| 6 | +alwaysApply: false |
| 7 | +--- |
| 8 | + |
| 9 | +# Documentation Guidelines |
| 10 | + |
| 11 | +## Editable Files |
| 12 | + |
| 13 | +Only edit documentation in these locations: |
| 14 | + |
| 15 | +| Location | Purpose | |
| 16 | +|----------|---------| |
| 17 | +| `README.md` | Project overview and quickstart | |
| 18 | +| `docs/sphinx/*.md` | Detailed documentation source files | |
| 19 | + |
| 20 | +## Never Edit Directly |
| 21 | + |
| 22 | +**Never edit `docs/*.md` files directly.** These are auto-generated from Sphinx source files and will be overwritten. |
| 23 | + |
| 24 | +## Building Docs |
| 25 | + |
| 26 | +After editing any files in `docs/sphinx/`, rebuild the documentation: |
| 27 | + |
| 28 | +```bash |
| 29 | +make -C docs docs |
| 30 | +``` |
| 31 | + |
| 32 | +This generates: |
| 33 | +- `docs/*.md` - Markdown output for GitHub viewing |
| 34 | +- `docs/sphinx/_build/html/` - HTML documentation |
| 35 | + |
| 36 | +## README Guidelines |
| 37 | + |
| 38 | +The README should be: |
| 39 | + |
| 40 | +- **Concise**: Brief project overview, not exhaustive documentation |
| 41 | +- **Quickstart focused**: Get users running in minutes |
| 42 | +- **A gateway**: Link to detailed docs in `docs/` for deeper topics |
| 43 | + |
| 44 | +### README Structure |
| 45 | + |
| 46 | +1. Project title and badges |
| 47 | +2. One-paragraph description |
| 48 | +3. Quick installation |
| 49 | +4. Basic usage example |
| 50 | +5. Links to detailed documentation in `docs/` |
| 51 | + |
| 52 | +### Linking to Detailed Docs |
| 53 | + |
| 54 | +For topics that need more detail, link to the full docs: |
| 55 | + |
| 56 | +```markdown |
| 57 | +For more details, see the [Installation Guide](docs/installation.md). |
| 58 | + |
| 59 | +See the [CLI Reference](docs/cli-reference.md) for all available commands. |
| 60 | +``` |
| 61 | + |
| 62 | +## Sphinx Source Files |
| 63 | + |
| 64 | +When editing `docs/sphinx/*.md`: |
| 65 | + |
| 66 | +- Follow existing formatting conventions |
| 67 | +- Use proper Sphinx/MyST markdown syntax |
| 68 | +- Include cross-references where appropriate |
| 69 | +- Always rebuild with `make -C docs docs` after changes |
0 commit comments