Skip to content

docs(agents,style): Update agent guidance#3443

Open
ajf wants to merge 2 commits into
NVIDIA:mainfrom
ajf:for-review/ajf/doc-fixes
Open

docs(agents,style): Update agent guidance#3443
ajf wants to merge 2 commits into
NVIDIA:mainfrom
ajf:for-review/ajf/doc-fixes

Conversation

@ajf

@ajf ajf commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Updates agent guidance to avoid free-standing functions where possible (so code is more organized and you can see all the functions that impact a model easier), and move the "stringly"-typed guidance to the general style guide since it's not just for agents.

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

Updates agent guidance to avoid free-standing functions where possible,
and move the "stringly"-typed guidance to the general style guide since
it's not just for agents.
@ajf ajf requested a review from a team as a code owner July 13, 2026 19:36
@coderabbitai

coderabbitai Bot commented Jul 13, 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: 70e28287-b98e-4fa2-b7e6-461e054fd9b4

📥 Commits

Reviewing files that changed from the base of the PR and between ce88c3c and a3c12be.

📒 Files selected for processing (2)
  • AGENTS.md
  • STYLE_GUIDE.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • STYLE_GUIDE.md
  • AGENTS.md

Summary by CodeRabbit

  • Documentation
    • Updated repository guidance to use the “NVIDIA Infra Controller (NICo)” name and expanded the lifecycle/service description.
    • Refreshed the documented repository structure to include a rest-api/ directory entry.
    • Expanded the technology stack documentation with clearer gRPC vs REST API sections (including REST API language/version details).
    • Enhanced Rust coding standards with guidance on using enums for finite sets, string parsing via Display/FromStr, and prefer type-associated methods over free functions.
    • Removed an older “avoid stringly-typed values” note.

Walkthrough

Documentation updates revise repository descriptions and technology guidance, then add Rust conventions for enum-based values and type-oriented methods.

Changes

Documentation guidance

Layer / File(s) Summary
Repository and technology guidance
AGENTS.md
Updates the project name and description, adds the rest-api/ structure entry, documents gRPC and REST API components, and removes the stringly-typed-values block.
Rust coding conventions
STYLE_GUIDE.md
Adds guidance for modeling finite values with enums and preferring methods on the types they operate on, with Machine and MachineState examples.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the documentation-focused agent/style guide updates, though it is somewhat broad.
Description check ✅ Passed The description matches the PR's documentation changes to agent guidance and style guidance.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@thossain-nv thossain-nv 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.

Thanks @ajf

Comment thread STYLE_GUIDE.md
`ErrorSystem`/`ErrorSubsystem` parts plus a `code`, rendered to the wire string
in one place. Reserve raw strings for genuinely open-ended values.

### Prefer methods over free functions

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.

Thank you for this.

@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: 3

🤖 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 `@AGENTS.md`:
- Line 48: Update the repository tree entry for rest-api in AGENTS.md to use the
Unicode branch connector ├── instead of |--, preserving the existing directory
label and formatting consistency.
- Around line 67-69: Update the REST API language/toolchain version in AGENTS.md
from 1.26.5 to 1.26.4, matching the version pinned by rest-api/go.mod and the
REST CI workflows.

In `@STYLE_GUIDE.md`:
- Around line 699-703: Update the “Avoid stringly-typed values” guidance to say
that types should implement Display and FromStr, replacing the wording that says
to derive their string form while preserving the surrounding enum and struct
guidance.
🪄 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: 387e5791-1e9f-4800-8724-4e18eb8b7f1b

📥 Commits

Reviewing files that changed from the base of the PR and between 688efe5 and ce88c3c.

📒 Files selected for processing (2)
  • AGENTS.md
  • STYLE_GUIDE.md

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md
Comment thread STYLE_GUIDE.md
@ajf

ajf commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

need re-review @thossain-nv @wminckler when you get a sec

@github-actions

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 255 13 30 79 7 126
machine-validation-runner 800 40 234 292 36 198
machine_validation 800 40 234 292 36 198
machine_validation-aarch64 800 40 234 292 36 198
nvmetal-carbide 800 40 234 292 36 198
TOTAL 3461 173 966 1253 151 918

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants