Commit 7aa998c
authored
docs(skills): refactor d2s script (#4549)
<!-- markdownlint-disable MD041 -->
## Summary
Refactors `scripts/docs-to-skills.py` to a simpler two-strategy
generator (`grouped` and `individual`) and regenerates
`.agents/skills/nemoclaw-user-*` output to match. The old `smart`
strategy, 11,500-character spill logic, and `*-details.md` deferral
files are removed; sibling pages now land in `references/` unchanged,
and procedure pages inline in full when they lead a group.
## Related Issue
None.
## Changes
**Generator (`scripts/docs-to-skills.py`)**
- Replace `smart` default with `grouped` (directory groups) and keep
`individual` (one skill per procedure page; concept/reference buckets).
- **Grouped lead selection:** highest-priority procedure page (`how_to`,
`get_started`, or `tutorial`) becomes `SKILL.md` body; all siblings go
to `references/`.
- **Reference-only hubs:** groups with no procedure page (for example
`overview`, `reference`, `configure-security`) emit a thin `SKILL.md`
with frontmatter + `## References` only; full content stays in
`references/`.
- Remove `MAX_SKILL_MD_CHARS`, section splitting/deferral, and generated
`*-details.md` spill files.
- Fix skill description ordering to follow the partitioned lead page.
- Fix markdownlint MD012 in generated hub skills
(`collapse_consecutive_blank_lines`, `append_markdown_section`).
**Docs source tweaks**
- `docs/about/overview.mdx`: add `skill.priority: 10` for overview
ordering in generated metadata.
- `docs/resources/agent-skills.mdx`: set `content.type` to `how_to` so
the single-page group inlines correctly.
**Regenerated user skills**
- Inline full procedure content where it leads: `get-started`
(quickstart + provider options), `configure-inference`, `manage-policy`,
`manage-sandboxes`, `deploy-remote`, `monitor-sandbox`, `agent-skills`.
- Convert heavy groups to reference hubs: `overview`, `reference`,
`configure-security`.
- Delete obsolete spill files: `quickstart-details.md`,
`use-local-inference-details.md`, `customize-network-policy-details.md`,
`lifecycle-details.md`, `agent-skills.md`.
**Docs pipeline docs**
- Update `docs/CONTRIBUTING.md` grouped-strategy description.
## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Design notes (reviewer follow-ups)
- **Reference-only hub skills are intentional.** Concept/reference
directory groups defer all page bodies to `references/` so agents load
detail on demand (progressive disclosure). Routing text lives in
`SKILL.md` frontmatter + References bullets; full task coverage remains
in sibling reference files.
- **`resolve_includes()` path containment** is pre-existing MyST-only
behavior; this PR does not expand its surface. Follow-up hardening can
be a separate change if we want docs-root allowlisting.
## Verification
- [x] `npx prek run --all-files` passes (via CI `checks`)
- [x] `npm test` passes (via CI `unit-vitest-linux`)
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [x] `npm run docs` builds without warnings (doc changes only; Fern
preview posted)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
**Local commands run:**
```bash
python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user --doc-platform fern-mdx --dry-run
python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user --doc-platform fern-mdx
```
---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>1 parent 843cf36 commit 7aa998c
17 files changed
Lines changed: 716 additions & 920 deletions
File tree
- .agents/skills
- nemoclaw-user-agent-skills
- references
- nemoclaw-user-configure-inference
- references
- nemoclaw-user-configure-security
- nemoclaw-user-get-started
- references
- nemoclaw-user-manage-policy
- references
- nemoclaw-user-manage-sandboxes
- references
- nemoclaw-user-overview
- nemoclaw-user-reference
- docs
- about
- resources
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
Lines changed: 0 additions & 85 deletions
This file was deleted.
0 commit comments