Skip to content

Commit 1448293

Browse files
authored
chore: add new rules to the writing-docs skill (#14983)
1 parent aacda7c commit 1448293

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.claude/skills/writing-docs/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Skill for writing and updating MDX documentation across the `book`, `resources`,
1111

1212
> **CRITICAL:** Violating these will corrupt the documentation or break CI.
1313
14+
- **Never document `@ignore`-tagged items** — any option, method, or parameter with `@ignore` in its TSDoc must be skipped entirely
1415
- **Never touch `www/apps/resources/references/`** — auto-generated, will be overwritten
1516
- **Never touch `www/apps/ui/specs/components/`** — auto-generated, will be overwritten
1617
- **Never touch `www/apps/api-reference/`** — managed by a separate process
@@ -73,6 +74,8 @@ export const metadata = {
7374

7475
## Common Mistakes
7576

77+
- [ ] Adding a new option, method, or parameter without a version note
78+
- [ ] Documenting any option, method, or parameter tagged with `@ignore` in its TSDoc — skip these entirely
7679
- [ ] Touching `references/` or `specs/components/` directories
7780
- [ ] Using `we`, `us`, `let's`, `our` in prose (use "you" or imperative)
7881
- [ ] Using passive voice ("is created", "was updated") — write active

.claude/skills/writing-docs/reference/mdx-patterns.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,64 @@ Something to be careful about.
143143
</Note>
144144
```
145145

146+
## Version Notes
147+
148+
When documenting a new option, method, parameter, or behavior change, add a version note so readers know when it became available.
149+
150+
**Get the current version** from `www/packages/docs-ui/src/global-config.ts``version.number`. The next version is the patch increment (e.g. `2.13.5``2.13.6`). Use the next version when the change is being introduced now (i.e. not yet released).
151+
152+
**Release URL pattern:** `https://github.com/medusajs/medusa/releases/tag/v{version}`
153+
154+
### New option/method/parameter — `<Note>` block
155+
156+
Place immediately after the heading for the new item:
157+
158+
```mdx
159+
### myNewOption
160+
161+
<Note>
162+
163+
This option is available since Medusa [v2.13.6](https://github.com/medusajs/medusa/releases/tag/v2.13.6).
164+
165+
</Note>
166+
167+
Description of the option...
168+
```
169+
170+
### Changed behavior — "Before Medusa v..." inside `<Note>`
171+
172+
Use when existing behavior changed and users may have old code:
173+
174+
```mdx
175+
<Note>
176+
177+
Before [Medusa v2.13.6](https://github.com/medusajs/medusa/releases/tag/v2.13.6), you did X. Now, you must do Y instead.
178+
179+
</Note>
180+
```
181+
182+
### Table cell — inline version annotation
183+
184+
For new or deprecated entries in `<Table>` components, annotate inside the cell:
185+
186+
```mdx
187+
<Table.Cell>
188+
189+
`myOption` (v2.13.6+)
190+
191+
</Table.Cell>
192+
```
193+
194+
For deprecated entries:
195+
196+
```mdx
197+
<Table.Cell>
198+
199+
`oldOption` (Deprecated v2.13.6+, use `newOption` instead)
200+
201+
</Table.Cell>
202+
```
203+
146204
## Prerequisites Component
147205

148206
Use at the top of pages that require existing knowledge or setup:

0 commit comments

Comments
 (0)