Skip to content

docs: add scoped AGENTS guidance - #5368

Merged
cv merged 3 commits into
mainfrom
docs/agents
Jun 12, 2026
Merged

docs: add scoped AGENTS guidance#5368
cv merged 3 commits into
mainfrom
docs/agents

Conversation

@miyoungc

@miyoungc miyoungc commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds scoped AGENTS.md guidance for the docs and Fern areas, and clarifies the root documentation workflow for implementation agents.
This makes the documentation engineer role explicit and asks development agents to hand off to a documentation writer subagent before final handoff.
This also fixes the PR docs-only check by using the pull request base SHA instead of HEAD^1, which is unavailable in the shallow checkout.

Related Issue

N/A.

Changes

  • Added docs/AGENTS.md with documentation engineer and writer guidance for source docs.
  • Added fern/AGENTS.md with Fern site configuration guidance.
  • Simplified the root AGENTS.md documentation section and added the post-development docs writer subagent handoff rule.
  • Fixed docs-only-checks to fetch ${{ github.event.pull_request.base.sha }} for diff-scoped prek hooks instead of reading HEAD^1 from a depth-1 checkout.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Verification notes:

  • npm run docs passed. Fern reported one existing upgrade-availability warning, so the no-warnings checkbox is left unchecked.
  • npx prek run --files .github/workflows/pr.yaml passed.
  • Commit and push hooks passed after the workflow-only CI fix.
  • npx prek run --all-files failed in unrelated CLI test lanes: Docker Desktop WSL GPU patch expectations, shell probe signal expectation, and e2e scenario workflow bash compatibility.
  • The new AGENTS.md files include SPDX headers. They are scoped agent instruction files, not Fern MDX pages, so they do not use frontmatter.
  • Documentation writer review found no additional docs needed for the internal CI workflow fix.

Signed-off-by: Miyoung Choi miyoungc@nvidia.com

Summary by CodeRabbit

  • Documentation

    • Added comprehensive AI documentation agent guides detailing authoring roles, writing rules, reusable patterns, and verification steps.
    • Clarified contribution docs: require using docs/ as source of truth, forbid editing generated user skills, and added a post-development doc-writer step; updated release-prep guidance.
  • Chores

    • Updated PR/check workflow to change how docs-only checks determine the reference commit and adjusted PR requirements (removed mandatory doc-update bullet).

miyoungc added 2 commits June 12, 2026 14:27
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
@miyoungc miyoungc self-assigned this Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5722b833-32ce-4b7f-9169-1755cbc44755

📥 Commits

Reviewing files that changed from the base of the PR and between bef46ac and 90c7de4.

📒 Files selected for processing (1)
  • .github/workflows/pr.yaml

📝 Walkthrough

Walkthrough

Updates documentation guidance: makes docs/ the authority, forbids editing generated user skills, requires running a documentation-writer subagent after development, adds detailed agent guides for docs and Fern, and updates the docs-only CI check to use the pull request base SHA.

Changes

Agent Documentation Guidelines

Layer / File(s) Summary
Contribution workflow and documentation requirements
AGENTS.md, .github/workflows/pr.yaml
Emphasizes docs/ as source of truth; disallows edits to generated user skill pages; requires running a documentation-writer subagent with changed files, behavior summary, and test evidence after development; PR requirements keep branch creation, make check and npm test, and template adherence. CI docs-only check now uses the PR base SHA for DOCS_ONLY_FROM_REF.
Documentation editing agent guide
docs/AGENTS.md
New guide describing agent authoring role, editing prerequisites, writing/style rules, reusable doc patterns (CLI examples, links, <AgentOnly> usage, navigation), and verification commands to run before opening doc PRs.
Fern configuration agent guide
fern/AGENTS.md
New guide for editing fern/ files: SPDX headers, redirect and URL preservation rules, alignment with docs/ sources, asset path and MDX component registration expectations, and verification commands.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

area: docs

Suggested reviewers

  • cv
  • prekshivyas
  • jyaunches

"A rabbit writes with nimble paws,
Docs lead, no wandering cause,
Ferns and agents learn the rules,
CI checks follow new set tools,
NemoClaw's docs hop without pause."

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding scoped AGENTS guidance documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/agents

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Failed: Could not parse JSON from advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/e2e-advisor/e2e-advisor-raw-output.txt

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: None
Optional Vitest E2E scenarios: None

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Failed: Could not parse JSON from advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/e2e-advisor/e2e-scenario-advisor-raw-output.txt

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 0 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 0 still apply, 0 new items found

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
AGENTS.md (1)

191-191: 📐 Maintainability & Code Quality | ⚡ Quick win

Name the concrete doc-writer skill.

docs/CONTRIBUTING.md already points at nemoclaw-contributor-update-docs, so using that name here makes the handoff step unambiguous.

As per coding guidelines, docs/CONTRIBUTING.md already names nemoclaw-contributor-update-docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 191, Update the doc-writer step text to reference the
concrete skill name "nemoclaw-contributor-update-docs" instead of the generic
"documentation writer subagent"; change the sentence in AGENTS.md describing the
handoff so it instructs running the named skill with the changed files, behavior
summary, and test evidence (matching docs/CONTRIBUTING.md) to avoid ambiguity.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/AGENTS.md`:
- Line 32: Update the guidance so it aligns with the CONTRIBUTING rule: state
that pages should not duplicate the title as a body H1 because Fern renders the
title from frontmatter (reference: title.page), but make an explicit exception
callout that the CONTRIBUTING document must include an H1 that matches
title.page; ensure the sentence in AGENTS.md mentions both "H1" and "title.page"
and the exception for the CONTRIBUTING doc to avoid confusion.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 191: Update the doc-writer step text to reference the concrete skill name
"nemoclaw-contributor-update-docs" instead of the generic "documentation writer
subagent"; change the sentence in AGENTS.md describing the handoff so it
instructs running the named skill with the changed files, behavior summary, and
test evidence (matching docs/CONTRIBUTING.md) to avoid ambiguity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 272be642-7fd3-4b96-a90d-6903a397fb6f

📥 Commits

Reviewing files that changed from the base of the PR and between d284022 and bef46ac.

📒 Files selected for processing (3)
  • AGENTS.md
  • docs/AGENTS.md
  • fern/AGENTS.md

Comment thread docs/AGENTS.md
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
@miyoungc
miyoungc requested a review from cv June 12, 2026 22:12
@cv
cv merged commit 6949f55 into main Jun 12, 2026
46 checks passed
@cv
cv deleted the docs/agents branch June 12, 2026 22:13
@cv cv added the v0.0.65 label Jun 13, 2026
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants