Skip to content

Commit 1411fe0

Browse files
Document markdown snippet syncing in CLAUDE.md
`sync_snippets.py` also syncs snippet-source markers in `docs/**/*.md` and `README.v2.md`, not just `src/` docstrings. Add a short section after "Docstring Code Examples" noting that these files use explicit paths (path-less `#Region` markers are only supported in `src/` files).
1 parent 64d61b7 commit 1411fe0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ After editing a companion file, run `uv run --frozen pyright` to verify types, t
158158
`uv run python scripts/sync_snippets.py` to sync into docstrings. Use `--check` to
159159
verify sync without modifying files.
160160

161+
## Markdown Code Examples
162+
163+
The `sync_snippets.py` script also syncs snippets to `docs/**/*.md` and `README.v2.md`.
164+
These files use explicit paths with optional `#Region` markers for `snippet-source`
165+
(path-less `#Region` markers are only supported in `src/` files):
166+
167+
````markdown
168+
<!-- snippet-source examples/snippets/servers/foo.py -->
169+
```python
170+
# contents of examples/snippets/servers/foo.py
171+
```
172+
<!-- /snippet-source -->
173+
````
174+
161175
## Error Resolution
162176

163177
1. CI Failures

0 commit comments

Comments
 (0)