Skip to content

Commit 4dc1e68

Browse files
committed
Merge remote-tracking branch 'origin/main' into andreatgretel/fix/workflow-chaining-greptile
# Conflicts: # fern/versions/latest.yml
2 parents 475b16e + 7199762 commit 4dc1e68

137 files changed

Lines changed: 2027 additions & 1644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/datadesigner-docs/SKILL.md

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,23 @@ Current URL: **`datadesigner.docs.buildwithfern.com/nemo/datadesigner`** (see `i
1616

1717
## Scope Rule
1818

19-
**ALL doc edits happen under `fern/`.** The legacy `docs/` directory is the original MkDocs source`docs/notebook_source/*.py` (jupytext) and `docs/devnotes/*.md` are still canonical for notebooks and dev notes (they feed Fern), but **do not add new top-level prose pages under `docs/`**. Concept pages, recipes, plugins, code reference — all of these live under `fern/versions/v0.5.8/pages/`.
19+
**ALL doc edits happen under `fern/`.** The legacy `docs/` directory is the original MkDocs source. `docs/notebook_source/*.py` remains canonical for notebook code, but **do not add new top-level prose pages under `docs/`**. Concept pages, recipes, plugins, code reference, and Dev Notes prose live under `fern/versions/latest/pages/`.
2020

21-
## Versioning Model: Floating Latest
21+
## Versioning Model
2222

23-
DataDesigner currently has Fern-native version entries backed by one shared migrated MDX tree. `latest` is a real rolling nav file; `v0.5.9` and `v0.5.8` are release nav files. All currently reuse `v0.5.8/pages/`.
23+
`main` contains only the latest Fern authoring docs. Historical release snapshots live on the CI-managed `docs-website` branch and must not be edited on `main`.
2424

2525
```
2626
fern/versions/
27-
├── latest.yml ← rolling nav file (reuses ./v0.5.8/pages/...)
28-
├── v0.5.9.yml ← release nav file (reuses ./v0.5.8/pages/...)
29-
├── v0.5.8.yml ← release nav file (reuses ./v0.5.8/pages/...)
30-
└── v0.5.8/pages/ ← shared migrated MDX tree
27+
├── latest.yml ← authoring nav file
28+
└── latest/pages/ ← authoring MDX tree
3129
```
3230

33-
`docs.yml` registers `slug: latest`, `slug: v0.5.9`, and `slug: v0.5.8`. When you edit shared docs, edit `v0.5.8/pages/`. Add version-specific page copies only when content diverges.
31+
`docs.yml` on `main` registers only `slug: latest`. When you edit docs, edit `latest/pages/` and `latest.yml`.
3432

35-
Dev Notes are rolling release: `latest.yml` can include posts from `main` that are not in the release nav yet. Frozen release navs (`v0.5.9.yml`, `v0.5.8.yml`) should include only posts available at that release point.
33+
Dev Notes are patched into the published latest docs by CI. Add new posts to `latest/pages/devnotes/posts/` and `latest.yml` on `main`.
3634

37-
Released versions older than `v0.5.8` remain on the legacy MkDocs archive at `https://nvidia-nemo.github.io/DataDesigner/<version>/`. `docs.yml` redirects `/nemo/datadesigner/v<version>/...` to those archives for versions without a real Fern tree.
38-
39-
For future Fern-native releases, add a version YAML that reuses shared pages by default. Copy only pages that need version-specific content.
35+
For future Fern-native releases, do not copy page trees by hand on `main`. The release workflow snapshots `latest` into a frozen version on `docs-website`.
4036

4137
## Layout at a Glance
4238

@@ -62,10 +58,8 @@ fern/
6258
│ └── ipynb-to-fern-json.py ← .ipynb → fern/components/notebooks/*.{json,ts}
6359
├── code-reference/ ← gitignored; populated by `fern docs md generate`
6460
└── versions/
65-
├── latest.yml ← rolling navigation tree
66-
├── v0.5.9.yml ← release navigation tree, reuses v0.5.8/pages/
67-
├── v0.5.8.yml ← navigation tree
68-
└── v0.5.8/pages/ ← shared MDX content
61+
├── latest.yml ← authoring navigation tree
62+
└── latest/pages/ ← authoring MDX content
6963
```
7064

7165
## URL Routing Rules
@@ -75,10 +69,10 @@ Fern's URL is computed from the **section/page titles in the active version YAML
7569
```
7670
File system Published URL
7771
──────────────────────────────────────────────────── ────────────────────────────────────────
78-
v0.5.8/pages/concepts/columns.mdx /concepts/columns
79-
v0.5.8/pages/concepts/tool_use_and_mcp.mdx /concepts/tool-use-and-mcp/overview
80-
v0.5.8/pages/recipes/code_generation/text_to_sql.mdx /recipes/code-generation/text-to-sql
81-
v0.5.8/pages/devnotes/posts/text-to-sql.mdx /dev-notes/text-to-sql-for-nemotron-super
72+
latest/pages/concepts/columns.mdx /concepts/columns
73+
latest/pages/concepts/tool_use_and_mcp.mdx /concepts/tool-use-and-mcp/overview
74+
latest/pages/recipes/code_generation/text_to_sql.mdx /recipes/code-generation/text-to-sql
75+
latest/pages/devnotes/posts/text-to-sql.mdx /dev-notes/text-to-sql-for-nemotron-super
8276
```
8377

8478
Rules:
@@ -92,7 +86,7 @@ When in doubt, recompute by walking the page's position in the active version YA
9286

9387
### Add a Page
9488

95-
1. Pick the file location: `fern/versions/v0.5.8/pages/<subdir>/<filename>.mdx`. Underscores in filenames are fine — they don't affect the URL.
89+
1. Pick the file location: `fern/versions/latest/pages/<subdir>/<filename>.mdx`. Underscores in filenames are fine — they don't affect the URL.
9690
2. Write minimal frontmatter:
9791

9892
```mdx
@@ -106,27 +100,27 @@ When in doubt, recompute by walking the page's position in the active version YA
106100
<content>
107101
```
108102

109-
3. Add an entry under the appropriate `section:` in `fern/versions/v0.5.8.yml`:
103+
3. Add an entry under the appropriate `section:` in `fern/versions/latest.yml`:
110104

111105
```yaml
112106
- page: <Page Title>
113-
path: ./v0.5.8/pages/<subdir>/<filename>.mdx
107+
path: ./latest/pages/<subdir>/<filename>.mdx
114108
```
115109
116110
4. The URL becomes `/<section-slug>/<page-title-slug>`. Update any cross-references in other MDX accordingly.
117-
5. If the page is a rolling Dev Note that should appear before the next release, add it to `latest.yml` only.
111+
5. If the page is a Dev Note, add it to the `Dev Notes` section in `latest.yml`.
118112

119113
### Update a Page
120114

121115
Editing prose is straightforward — change the MDX, save. No mirror step (one canonical tree).
122116

123-
For title changes, also update the `page:` value in `v0.5.8.yml` *and* fix any incoming links pointing at the old slugified title.
117+
For title changes, also update the `page:` value in `latest.yml` *and* fix any incoming links pointing at the old slugified title.
124118

125119
### Move / Rename a Page (with Redirect)
126120

127121
1. `git mv` the file.
128-
2. Update `path:` in `v0.5.8.yml`.
129-
3. Update incoming links: `grep -rn "<old-slug>" fern/versions/v0.5.8/pages/`.
122+
2. Update `path:` in `latest.yml`.
123+
3. Update incoming links: `grep -rn "<old-slug>" fern/versions/latest/pages/`.
130124
4. Add a redirect to `fern/docs.yml`:
131125

132126
```yaml
@@ -141,15 +135,15 @@ For title changes, also update the `page:` value in `v0.5.8.yml` *and* fix any i
141135

142136
1. `grep -rn "<filename-or-slug>"` to find inbound links.
143137
2. `git rm` the MDX file.
144-
3. Remove the `- page:` entry from `v0.5.8.yml`.
138+
3. Remove the `- page:` entry from `latest.yml`.
145139
4. Fix or remove all inbound links.
146140
5. Add a redirect in `docs.yml` if the URL was public.
147141

148142
### Worked Example: Add a How-To Under Concepts
149143

150144
Request: *"Add a how-to about deduplicating generated rows."*
151145

152-
1. Create `fern/versions/v0.5.8/pages/concepts/deduplication.mdx`:
146+
1. Create `fern/versions/latest/pages/concepts/deduplication.mdx`:
153147

154148
```mdx
155149
---
@@ -162,22 +156,22 @@ Request: *"Add a how-to about deduplicating generated rows."*
162156
<content>
163157
```
164158

165-
2. Add to `fern/versions/v0.5.8.yml` under the `Concepts` section:
159+
2. Add to `fern/versions/latest.yml` under the `Concepts` section:
166160

167161
```yaml
168162
- page: Deduplication
169-
path: ./v0.5.8/pages/concepts/deduplication.mdx
163+
path: ./latest/pages/concepts/deduplication.mdx
170164
```
171165

172-
3. Published URL: `/concepts/deduplication` (works at both `/latest/concepts/deduplication` and `/v0.5.8/concepts/deduplication`).
166+
3. Published URL: `/concepts/deduplication` on latest.
173167
4. `cd fern && fern check && fern docs dev` to verify.
174168

175169
### Worked Example: Rename with Redirect
176170

177171
Request: *"Rename `/concepts/seed-datasets` to `/concepts/input-datasets`."*
178172

179-
1. Update `page: Seed Datasets` → `page: Input Datasets` in `v0.5.8.yml`.
180-
2. `git mv fern/versions/v0.5.8/pages/concepts/seed-datasets.mdx fern/versions/v0.5.8/pages/concepts/input-datasets.mdx` and update `path:`.
173+
1. Update `page: Seed Datasets` → `page: Input Datasets` in `latest.yml`.
174+
2. `git mv fern/versions/latest/pages/concepts/seed-datasets.mdx fern/versions/latest/pages/concepts/input-datasets.mdx` and update `path:`.
181175
3. Add to `docs.yml`:
182176

183177
```yaml
@@ -188,7 +182,7 @@ Request: *"Rename `/concepts/seed-datasets` to `/concepts/input-datasets`."*
188182
destination: "/nemo/datadesigner/latest/concepts/input-datasets"
189183
```
190184

191-
4. `grep -rn "/concepts/seed-datasets" fern/versions/v0.5.8/pages/` and rewrite hits.
185+
4. `grep -rn "/concepts/seed-datasets" fern/versions/latest/pages/` and rewrite hits.
192186

193187
---
194188

@@ -263,9 +257,9 @@ Do **not** add `position:` (we use explicit nav order in the version YAML), `dat
263257

264258
## Dev Notes (Blog Posts)
265259

266-
Dev notes live under `fern/versions/v0.5.8/pages/devnotes/posts/`. They use the dev-notes kit components: **`<Authors>`, `<MetricsTable>`, `<TrajectoryViewer>`, `<ExpandableCode>`, `<CustomCard>`** (sources in `fern/components/`, CSS in `fern/styles/`).
260+
Dev notes live under `fern/versions/latest/pages/devnotes/posts/`. They use the dev-notes kit components: **`<Authors>`, `<MetricsTable>`, `<TrajectoryViewer>`, `<ExpandableCode>`, `<CustomCard>`** (sources in `fern/components/`, CSS in `fern/styles/`).
267261

268-
For rolling posts on `main`, add the page and card to `latest.yml` first. Add the same nav entry to a release YAML only when that post is part of that release.
262+
Add the page and card to `latest.yml`. Release snapshots are handled by CI on `docs-website`.
269263

270264
### Authors Byline
271265

@@ -409,17 +403,32 @@ The converter (`fern/scripts/ipynb-to-fern-json.py`) **auto-strips the leading C
409403

410404
## Python API Reference (`libraries:`)
411405

412-
`docs.yml` declares a `libraries:` block pointing at `packages/data-designer-config/src/data_designer/config`. Local generation uses `py2fern` against that same source. Generated output lands at `fern/code-reference/data-designer/` - **gitignored**. To populate locally:
406+
`docs.yml` keeps a Fern-native `libraries:` block for the config package. Local generation uses `py2fern` through `make generate-fern-api-reference` and writes multiple gitignored trees under `fern/code-reference/`:
407+
408+
- `data-designer/` for `data_designer.config`
409+
- `interface/` for `data_designer.interface`
410+
- `engine/seed-readers/`
411+
- `engine/processors/`
412+
- `engine/mcp/`
413+
- `engine/column-generators/`
414+
415+
To populate locally:
413416

414417
```bash
415418
make generate-fern-api-reference
416419
```
417420

418421
This does not require Fern auth. Re-run when the upstream Python source changes. If you need to compare with Fern's native generator, use `make generate-fern-api-reference-native` with Fern auth.
419422

420-
The generated tree is wired into the nav via `versions/v0.5.8.yml`'s "Code Reference > Python API" folder entry (`folder: ../code-reference/data-designer`). The nav also includes prose pages under "Topic Overviews" — those are conceptual landings that link to the auto-generated reference.
423+
The generated trees are wired into `versions/latest.yml` under `Code Reference`:
424+
425+
- `Config` contains prose pages plus `Config API` from `../code-reference/data-designer/data_designer/config`
426+
- `Interface` contains prose pages plus `Interface API` from `../code-reference/interface/data_designer/interface`
427+
- `Engine Extension API` contains prose pages plus the seed reader, processor, MCP runtime, and column generator API folders
421428

422-
To add another package as a library entry (e.g. engine or interface namespace):
429+
There is no `Topic Overviews` section. Prose reference pages live beside the generated folders under `fern/versions/latest/pages/code_reference/`.
430+
431+
To add another generated package, update the `generate-fern-api-reference` target and add the matching `folder:` entry under the right `Code Reference` section. Only add a `libraries:` entry when Fern's native generator should know about that source:
423432

424433
```yaml
425434
libraries:
@@ -429,12 +438,6 @@ libraries:
429438
subpath: packages/data-designer-config/src/data_designer/config
430439
output: { path: ./code-reference/data-designer }
431440
lang: python
432-
data-designer-engine:
433-
input:
434-
git: https://github.com/NVIDIA-NeMo/DataDesigner
435-
subpath: packages/data-designer-engine/src/data_designer/engine
436-
output: { path: ./code-reference/data-designer-engine }
437-
lang: python
438441
```
439442

440443
Pyright needs a regular Python package (with `__init__.py`). The `data_designer` namespace itself is PEP 420 (no `__init__.py`), so always point at a sub-package one level deeper.
@@ -485,14 +488,14 @@ When the team adds a Fern preview workflow (modeled after Gym's `fern-docs-previ
485488

486489
## Cutting a New Version Train
487490

488-
Do not copy page trees by hand. Add a new version YAML that reuses shared pages by default; copy only pages that need version-specific content. If that becomes tedious, add a build-time materialization script before `fern generate --docs`.
491+
Do not copy page trees by hand on `main`. The release workflow copies `latest/pages/` to a frozen `vX.Y.Z/pages/` tree on `docs-website`, updates the published versions list, checks the generated Fern docs, and publishes from `docs-website`.
489492

490493
## Debugging
491494

492495
| Symptom | Fix |
493496
|---|---|
494497
| `fern check` YAML error | 2-space indent; `- page:` inside `contents:`; `path:` is relative to the version YAML |
495-
| Page 404 in preview | Section/page title mismatch — recompute slug from `v0.5.8.yml`, not from filename |
498+
| Page 404 in preview | Section/page title mismatch — recompute slug from `latest.yml`, not from filename |
496499
| `Could not parse expression with acorn` | Bare `{...}` JSON or pymdown attr_list; see MDX Gotchas |
497500
| `Could not parse import/exports with acorn` | Missing blank line between top-level `import` statement and `# H1` body |
498501
| `Unexpected character 'X' before name` | Likely `--8<--` snippet include or bare `<digit`; see MDX Gotchas |
@@ -508,4 +511,4 @@ Do not copy page trees by hand. Add a new version YAML that reuses shared pages
508511

509512
- Editing Python source under `packages/` — that's a code change, not a docs change.
510513
- Adding a notebook tutorial's *code*: edit `docs/notebook_source/<name>.py`, not the converted `.ipynb` or the wrapper MDX.
511-
- Editing dev note *prose*: edit the migrated MDX under `fern/versions/v0.5.8/pages/devnotes/posts/<name>.mdx`. (The original `docs/devnotes/posts/<name>.md` is no longer the source of truth — Fern is.)
514+
- Editing dev note *prose*: edit the migrated MDX under `fern/versions/latest/pages/devnotes/posts/<name>.mdx`. (The original `docs/devnotes/posts/<name>.md` is no longer the source of truth — Fern is.)

0 commit comments

Comments
 (0)