update-docs-from-commits
Update Docs from Commits
Scan recent git history for commits that affect user-facing behavior and draft documentation updates for each.
Prerequisites
- You must be in the OpenShell git repository.
- The
docs/directory must exist with the current doc set. - Read
docs/CONTRIBUTING.mdbefore writing any content. It contains the style guide and formatting rules.
When to Use
- After a batch of features or fixes has landed and docs may be stale.
- Before a release, to catch any doc gaps.
- When a contributor asks "what docs need updating?"
Step 1: Identify Relevant Commits
Determine the commit range. The user may provide one explicitly (e.g., "since v0.2.0" or "last 30 commits"). If not, default to commits since the head of the main branch.
# Commits since a tag
git log v0.2.0..HEAD --oneline --no-merges
# Or last 50 commits
git log -50 --oneline --no-merges
Filter to commits that are likely to affect docs. Look for these signals:
- Commit type:
feat,fix,refactor,perfcommits often change behavior.docscommits are already doc changes.chore,ci,testcommits rarely need doc updates. - Files changed: Changes to
crates/openshell-cli/,python/,proto/,deploy/, or policy-related code are high-signal. - Ignore: Changes limited to
tests/,e2e/,.github/,tasks/, or internal-only modules.
# Show files changed per commit to assess impact
git log v0.2.0..HEAD --oneline --no-merges --name-only
Step 2: Map Commits to Doc Pages
For each relevant commit, determine which doc page(s) it affects. Use this mapping as a starting point:
| Code area | Likely doc page(s) |
|---|---|
crates/openshell-cli/ (gateway commands) |
docs/sandboxes/manage-gateways.md |
crates/openshell-cli/ (sandbox commands) |
docs/sandboxes/manage-sandboxes.md |
crates/openshell-cli/ (provider commands) |
docs/sandboxes/manage-providers.md |
crates/openshell-cli/ (new top-level command) |
May need a new page or docs/reference/ entry |
crates/openshell-proxy/ or policy code |
docs/sandboxes/policies.md, docs/reference/policy-schema.md |
crates/openshell-inference/ |
docs/inference/configure.md |
python/ (SDK changes) |
docs/reference/ or docs/get-started/quickstart.md |
proto/ (API changes) |
docs/reference/ |
deploy/ (Dockerfile, Helm) |
docs/sandboxes/manage-gateways.md, docs/about/architecture.md |
| Community sandbox definitions | docs/sandboxes/community-sandboxes.md |
If a commit does not map to any existing page but introduces a user-visible concept, flag it as needing a new page.
Step 3: Read the Commit Details
For each commit that needs a doc update, read the full diff to understand the change:
git show <commit-hash> --stat
git show <commit-hash>
Extract:
- What changed (new flag, renamed command, changed default, new feature).
- Why it changed (from the commit message body, linked issue, or PR description).
- Any breaking changes or migration steps.
Step 4: Read the Current Doc Page
Before editing, read the full target doc page to understand its current content and structure:
# Read the file
Identify where the new content should go. Follow the page's existing structure.
Step 5: Draft the Update
Write the doc update following the rules in docs/CONTRIBUTING.md. Key reminders:
- Active voice, present tense, second person.
- No unnecessary bold. Reserve bold for UI labels and parameter names.
- No em dashes unless used sparingly. Prefer commas or separate sentences.
- Start sections with an introductory sentence that orients the reader.
- No superlatives. Say what the feature does, not how great it is.
- Code examples use
consolelanguage with$prompt prefix. - Include the SPDX header if creating a new page.
- Match existing frontmatter format if creating a new page.
- Always write NVIDIA in all caps. Wrong: Nvidia, nvidia.
- Always capitalize OpenShell correctly. Wrong: openshell, Openshell, openShell.
- Do not number section titles. Wrong: "Section 1: Deploy a Gateway" or "Step 3: Verify." Use plain descriptive titles.
- No colons in titles. Wrong: "Gateways: Deploy and Manage." Write "Deploy and Manage Gateways" instead.
- Use colons only to introduce a list. Do not use colons as general-purpose punctuation between clauses.
When updating an existing page:
- Add content in the logical place within the existing structure.
- Do not reorganize sections unless the change requires it.
- Update any cross-references or "Next Steps" links if relevant.
When creating a new page:
- Follow the frontmatter template from
docs/CONTRIBUTING.md. - Add the page to the appropriate
toctreeindocs/index.md.
Step 6: Present the Results
After drafting all updates, present a summary to the user:
## Doc Updates from Commits
### Updated pages
- `docs/sandboxes/manage-gateways.md`: Added `--gpu` flag documentation (from commit abc1234).
- `docs/reference/policy-schema.md`: Updated network policy schema for new `tls_inspect` field (from commit def5678).
### New pages needed
- None (or list any new pages created).
### Commits with no doc impact
- `chore(deps): bump tokio` (abc1234) — internal dependency, no user-facing change.
- `test(e2e): add gateway timeout test` (def5678) — test-only change.
Step 7: Build and Verify
After making changes, build the docs locally:
mise run docs
Check for:
- Build warnings or errors.
- Broken cross-references.
- Correct rendering of new content.
Tips
- When in doubt about whether a commit needs a doc update, check if the commit message references a CLI flag, config option, or user-visible behavior.
- Group related commits that touch the same doc page into a single update rather than making multiple small edits.
- If a commit is a breaking change, add a note at the top of the relevant section using a
:::{warning}admonition. - PRs that are purely internal refactors with no behavior change do not need doc updates, even if they touch high-signal directories.
Example Usage
User says: "Catch up the docs for everything merged since v0.2.0."
- Run
git log v0.2.0..HEAD --oneline --no-merges --name-only. - Filter to
feat,fix,refactor,perfcommits touching user-facing code. - Map each to a doc page.
- Read the commit diffs and current doc pages.
- Draft updates following the style guide.
- Present the summary.
- Build with
mise run docsto verify.
More from nvidia/openshell
openshell-cli
Guide agents through using the OpenShell CLI (openshell) for sandbox management, provider configuration, policy iteration, BYOC workflows, and inference routing. Covers basic through advanced multi-step workflows. Trigger keywords - openshell, sandbox create, sandbox connect, logs, provider create, policy set, policy get, image push, forward, port forward, BYOC, bring your own container, use openshell, run openshell, CLI usage, manage sandbox, manage provider, gateway start, gateway select.
11generate-sandbox-policy
Generate sandbox security policies from plain-language requirements and optional REST API documentation. At minimum, takes API host:port endpoints and intent to produce preset-based or L4 policies. With full API docs (OpenAPI, Swagger, markdown), generates fine-grained per-endpoint L7 rules. Trigger keywords - generate policy, create policy, update policy, change policy, sandbox policy, network policy, API policy, security policy, allow API, restrict API.
5tui-development
Guide for developing the OpenShell TUI — a ratatui-based terminal UI for the OpenShell platform. Covers architecture, navigation, data fetching, theming, UX conventions, and development workflow. Trigger keywords - term, TUI, terminal UI, ratatui, openshell-tui, tui development, tui feature, tui bug.
4sbom
Generate and manage Software Bill of Materials (SBOMs) for the OpenShell project. Covers SBOM generation with Syft, license resolution via public registries, and CSV export for compliance review. Trigger keywords - SBOM, sbom, bill of materials, license audit, license resolution, generate sbom, sbom csv, dependency license, supply chain, license scan.
3debug-inference
Debug why inference.local or external inference setup is failing. Use when the user cannot reach a local model server, has provider base URL issues, sees inference verification failures, hits protocol mismatches, or needs to diagnose inference on local vs remote gateways. Trigger keywords - debug inference, inference.local, local inference, ollama, vllm, sglang, trtllm, NIM, inference failing, model server unreachable, failed to verify inference endpoint, host.openshell.internal.
3debug-openshell-cluster
Debug why an OpenShell gateway deployment is unhealthy, unreachable, or unable to create sandboxes. Use when the user has a gateway health failure, Docker/Podman runtime issue, Helm install failure, Kubernetes scheduling issue, TLS secret issue, VM driver issue, or sandbox startup problem. Trigger keywords - debug gateway, gateway failing, deployment failing, helm install failing, cluster health, gateway health, gateway not starting, health check failed, sandbox pending, docker driver, podman driver, vm driver.
3