|
| 1 | +--- |
| 2 | +name: documentation |
| 3 | +description: Guidelines for writing and maintaining project documentation. |
| 4 | +--- |
| 5 | + |
| 6 | +> **Generic skill** — This skill is project-agnostic. Do not add project-specific |
| 7 | +> references, paths, or terminology here. |
| 8 | +
|
| 9 | +# Documentation Skill |
| 10 | + |
| 11 | +Guidelines for writing and maintaining project documentation. |
| 12 | + |
| 13 | +## When to Use |
| 14 | + |
| 15 | +Use this skill when: |
| 16 | +- Writing or editing documentation files in `docs/` |
| 17 | +- Reviewing documentation for correctness or completeness |
| 18 | +- Adding new documentation pages |
| 19 | + |
| 20 | +## Principles |
| 21 | + |
| 22 | +### Embed, don't copy |
| 23 | + |
| 24 | +Never duplicate file contents into documentation. Instead, use Sphinx |
| 25 | +directives to include the real file so docs stay in sync automatically: |
| 26 | + |
| 27 | +```text |
| 28 | +
|
| 29 | +```rst |
| 30 | +```{literalinclude} ../../robots/Meca500-R3/chain.yaml |
| 31 | +:language: yaml |
| 32 | +``` |
| 33 | +``` |
| 34 | +
|
| 35 | +
|
| 36 | +``` |
| 37 | + |
| 38 | +If a full include is too long, use `:lines:` or `:start-after:` / |
| 39 | +`:end-before:` to select a portion. |
| 40 | + |
| 41 | +### Describe patterns, don't enumerate files |
| 42 | + |
| 43 | +When documenting directory layouts or file sets that vary (e.g. per-robot |
| 44 | +files), describe the general structure and mention that additional files |
| 45 | +may exist. Listing every optional file creates maintenance burden and goes |
| 46 | +stale as the project evolves. |
| 47 | + |
| 48 | +Good: |
| 49 | +> Individual robots may also include specs files, verification scripts, |
| 50 | +> reference images, or view mappings. |
| 51 | +
|
| 52 | +Bad: |
| 53 | +> ``` |
| 54 | +> ├── specs.yaml |
| 55 | +> ├── verify_kinematics.py |
| 56 | +> ├── images/ |
| 57 | +> │ └── *.svg / *.png |
| 58 | +> └── view_mapping.yaml |
| 59 | +> ``` |
| 60 | +
|
| 61 | +### Keep skill and command references accurate |
| 62 | +
|
| 63 | +When referencing Claude Code skills (slash commands), use the actual skill |
| 64 | +name from `.claude/skills/*/SKILL.md`. If a skill is renamed or removed, |
| 65 | +update all documentation that references it. |
| 66 | +
|
| 67 | +### Single source of truth |
| 68 | +
|
| 69 | +If two docs cover the same topic, consolidate into one and link to it from |
| 70 | +the other. Avoid parallel pages that drift apart over time (e.g. a separate |
| 71 | +installation page when quick-start already covers setup). |
| 72 | +
|
| 73 | +### Diataxis framework |
| 74 | +
|
| 75 | +This project follows the [Diataxis](https://diataxis.fr) documentation |
| 76 | +framework: |
| 77 | +
|
| 78 | +- **Tutorials** — learning-oriented, get the user to a working result |
| 79 | +- **How-to guides** — task-oriented, practical steps for experienced users |
| 80 | +- **Explanations** — understanding-oriented, how and why things work |
| 81 | +- **Reference** — information-oriented, precise technical specifications |
0 commit comments