Skip to content

docs(skills): move author-facing rules into contributing references - #4998

Merged
terrykong merged 16 commits into
mainfrom
yukih/refactor-skill
Nov 2, 2026
Merged

terrykong merged 16 commits into
mainfrom
yukih/refactor-skill

Conversation

@yuki-97

@yuki-97 yuki-97 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do ?

Moves the review rules an author can follow while writing code into skills/contributing/references/, so agents apply them when they write code, not only when review-pr-team runs. Docs only, no code change.

What changed

1. Add skills/contributing/references/, one file per theme. AGENTS.md now tells any task that writes or changes code to load contributing and read every references/*.md. A rule ending in Contributing Details: links an author how-to under references/details/; one ending in Review Details: links the review lesson behind it and is not needed to write code.

2. Move the matching review rules instead of copying them. Comment, docstring, doc, dead-code and config rules leave review-pr-team/references/ (code-comments-and-docstrings.md, dead-and-outdated-code.md and repo-conventions-config.md are deleted), plus the "nearest existing analog", "existing selector", "no precedent" and "existing lane" rules. review-pr-team/SKILL.md §1.4 now reads every contributing reference as a finding checklist. Review-only actions that the author-facing wording dropped go into review details/.

3. Fold the single-file convention skills into contributing details. config-conventions, error-handling, linting-and-formatting, copyright and removing-outdated-config become contributing/references/details/*.md with their text unchanged, each reached from a one-line rule.

4. Fix the exemplar rule. "one exemplar is enough" (#3798) contradicted review practice (#4820); a new key now goes into every base config YAML that carries its block.

5. Unwrap hard-wrapped paragraphs. AGENTS.md and the skill files this PR touches now keep one paragraph per line. The text is unchanged, so most of the review-pr-team/SKILL.md diff is line joins only.

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yuki-97
yuki-97 added this pull request to stack #5000 October 30, 2026 16:36

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review via /review-pr-team: 5 agents (rl-expert, bug-finder, test-agent, design-reviewer, devil-advocate) plus comment-editor.

Verdict — 9 inline comments, none blocking: review-pr-team still routes and matches rules as if they lived only in its own references/, a few moved rules changed meaning in the move, one new rationale is false, and two nits.

  1. (C1) Phase 6 routes a NeMo-RL convention to repo-conventions-*.md before contributing, the opposite of this PR's split.
  2. (C2) "Fit before you create" does not look in skills/contributing/references/.
  3. (C3) contributing's when_to_use dropped the trigger phrases of the five folded skills.
  4. (C4) The exemplar rule assumes every base config has a reference-config twin; ppo_math_1B.yaml and vlm_mpo.yaml do not.
  5. (C5) The .get(key, default) rule gained an "unless there is a strong reason" escape hatch.
  6. (C6) The "keyword arguments catch misspelled fields" reason is false with extra="allow".
  7. (C7) "Before calling something dead" became "Before deleting something as dead", dropping the reviewer's grep gate.
  8. (C8) Nit: one hard wrap left in step 5a.
  9. (C9) Nit: leading empty line in details/removing-outdated-config.md.

Verified clean

  • No rule is lost in the move: every removed rule and every review-only action has a home in contributing/references/ or a review details file.
  • The five folded skills match their old text word for word apart from the frontmatter.
  • Every relative link resolves; no CJK, trailing whitespace or end-of-file issues, and no underscored .md names.
  • No /nvskills-ci or signature impact: only five published skills are signed, and none of them is touched.

Lower-priority notes that are not inline

  • Stack order. At this head, review-pr/SKILL.md, AGENTS.md and CONTRIBUTING.md still reference the folded skills and /review-pr. #4999 removes all three, so merge the two together or #4999 right after.
  • CONTRIBUTING.md, which neither diff touches, still lists "style, config conventions, error handling, testing, copyright, docs" as skills. #4999 already edits CONTRIBUTING.md and can fix it there.

Generated by Claude Code

Comment thread skills/review-pr-team/SKILL.md Resolved
Comment thread skills/review-pr-team/SKILL.md Resolved
Comment thread skills/contributing/SKILL.md Resolved
Comment thread skills/review-pr-team/SKILL.md Resolved
yuki-97 added a commit that referenced this pull request Oct 30, 2026
…ntributing, restore the dead-code grep gate, fix the reference-config and kwargs rationale

Signed-off-by: Yuki Huang <[email protected]>
@yuki-97 yuki-97 added the CI:docs Run doctest label Oct 30, 2026
@yuki-97

yuki-97 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test dbc2ecb

… removing-outdated-config skill into a contributing detail

Signed-off-by: Yuki Huang <[email protected]>
…ideline findings to the rule

Signed-off-by: Yuki Huang <[email protected]>
…tching review rules into them

Signed-off-by: Yuki Huang <[email protected]>
…ntributing, restore the dead-code grep gate, fix the reference-config and kwargs rationale

Signed-off-by: Yuki Huang <[email protected]>
@yuki-97
yuki-97 force-pushed the yukih/refactor-skill branch from dbc2ecb to 8cbba81 Compare October 31, 2026 07:04
@copy-pr-bot

copy-pr-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@yuki-97

yuki-97 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 8cbba81

@yuki-97
yuki-97 requested a review from terrykong November 2, 2026 09:29

@terrykong terrykong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Team review via /review-pr-team. Our comment IDs start at C10, after the self-review's nine.

The split is a good shape. Reviews now read the same contributing/references/ files that authors read, so each rule has one owner, and Phase 6 sends new author lessons there so the split holds. All nine self-review fixes are in at head. Spot checks pass: the five folded skills match their old text word for word apart from frontmatter, every relative link in the touched files resolves, and the content changes in review-pr-team/SKILL.md (beyond line joins) are exactly the ones in the description plus the self-review's C1 and C2 fixes.

Inline:

  1. (C10) The copyright rule says test files are excluded, but CI checks them. Following the rule turns the copyright job red.
  2. (C11) Two files still give the old one-exemplar answer that item 4 replaced.
  3. (C12) Two author steps for "is this dead?" live only behind a Review Details: link that the PR says authors can skip.
  4. (C13) removing-outdated-config.md names an _EXEMPT list that does not exist.

Not inline:

  • CONTRIBUTING.md L176 still lists "style, config conventions, error handling, testing, copyright, docs" as separate skills. The self-review sent this to #4999, but #4999 only changes the review section of CONTRIBUTING.md, so this line stays stale after both land. Please fix it in one of the two PRs. It is outside this diff, so there is no inline comment.
  • Follow-up, no change needed here: review-pr-team/SKILL.md L1592 says only reviewer-only conventions go to repo-conventions-*.md, but those files still hold some author rules (for example the nightly GPU-hour cap and the session Ray fixture). Fine to move them later; the sentence becomes true once they move.

Generated by Claude Code

… contributing references

- copyright: test files need the header too (CI checks every .py but __init__.py)
- exemplar rule: config-conventions detail and typeddict lesson now match config.md
- dead-code: check defaults: children and trace metrics to log_metrics
- removing-outdated-config: exemptions are pytest.skip, there is no _EXEMPT list
- CONTRIBUTING.md: the folded topics are contributing references, not skills

Signed-off-by: Terry Kong <[email protected]>
@terrykong
terrykong enabled auto-merge (squash) November 2, 2026 19:01
@terrykong

Copy link
Copy Markdown
Collaborator

/ok to test 090b043

@terrykong
terrykong merged commit 74b28c3 into main Nov 2, 2026
48 checks passed
@terrykong
terrykong deleted the yukih/refactor-skill branch November 2, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:docs Run doctest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants