Skip to content

docs: align agent comment conventions - #12657

Merged
zkochan merged 1 commit into
mainfrom
comment-conventions
Jun 25, 2026
Merged

zkochan merged 1 commit into
mainfrom
comment-conventions

Conversation

@zkochan

@zkochan zkochan commented Jun 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Moves the shared agent comment conventions into a repo-wide AGENTS.md section that applies to the TypeScript pnpm CLI, pacquet, and pnpr.
  • Keeps Rust-specific comment additions in pacquet/AGENTS.md, then points pnpr/AGENTS.md at that canonical Rust guidance instead of duplicating it.

Squash Commit Body

Move the agent comment guidance out of the TypeScript-only code style section into a repo-wide Comments section so it applies to the pnpm CLI, pacquet, and pnpr.

Keep the Rust-specific comment additions in pacquet AGENTS.md and have pnpr reference that canonical Rust guidance instead of copying the same rules. This removes ambiguity about whether pnpr follows the pacquet convention without creating another block to maintain.

Checklist

  • Updated the documentation if needed.

Written by an agent (Codex, GPT-5).

Summary by CodeRabbit

  • Documentation
    • Updated contributor guidance to cover three products instead of two and clarified which style rules apply to each.
    • Added a clearer, shared commenting standard and reorganized related guidance for easier reference.
    • Refined Rust-specific documentation rules to distinguish API docs from implementation-only notes.
    • Added a project-specific comments section to point contributors to the appropriate guidance.

@coderabbitai

coderabbitai Bot commented Jun 25, 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: Pro Plus

Run ID: e57c3d10-320d-490d-b451-06c1843459be

📥 Commits

Reviewing files that changed from the base of the PR and between 3425e80 and 224caa9.

📒 Files selected for processing (3)
  • AGENTS.md
  • pacquet/AGENTS.md
  • pnpr/AGENTS.md

📝 Walkthrough

Walkthrough

AGENTS.md guidance was updated to distinguish the TypeScript CLI from the Rust products, route review guidance to REVIEW_GUIDE.md, and consolidate comment rules across the root, pacquet, and pnpr documentation.

Changes

Repository guidance updates

Layer / File(s) Summary
Scope and review guidance
AGENTS.md
The overview adds the Rust products, the Rust section names pacquet/ and pnpr/, and AI review guidance points to REVIEW_GUIDE.md with TypeScript-only scope notes.
Comment conventions
AGENTS.md, pacquet/AGENTS.md, pnpr/AGENTS.md
The root comment section is added and relocated, pacquet/AGENTS.md narrows Rust doc-comment guidance, and pnpr/AGENTS.md adds a Comments subsection linking to the shared rules.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

  • pnpm/pnpm#12522: Updates the same AGENTS.md review-guidance area by pointing to REVIEW_GUIDE.md.
  • pnpm/pnpm#12405: Also changes AGENTS.md review guidance and the surrounding contributor instructions.
  • pnpm/pnpm#11640: Adjusts AGENTS.md comment guidance in the same repository docs area.

Suggested labels

product: pacquet, product: pnpr

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch comment-conventions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Align agent comment conventions across TypeScript CLI, pacquet, and pnpr
📝 Documentation 🕐 10-20 Minutes

Grey Divider

Description

• Promote comment-writing guidance to a repo-wide baseline in AGENTS.md.
• Clarify the repo’s three products and how nested AGENTS.md files specialize rules.
• Add a pnpr-specific Comments section that explicitly mirrors the shared baseline.
Diagram

graph TD
  A(["AI agent"]) --> B["AGENTS.md (root)"] --> C["Comments baseline"]
  C --> D["TypeScript CLI"] & E["pacquet (Rust)"] & F["pnpr (Rust)"]
  F --> G["pnpr/AGENTS.md"]
Loading
High-Level Assessment

The approach (one repo-wide baseline in AGENTS.md, with product AGENTS.md files only adding language/product specifics) is the clearest way to eliminate ambiguity and avoid duplicated guidance. A separate standalone doc (e.g., COMMENTS.md) would add indirection without improving maintainability over the current structure and anchors.

Files changed (2) +42 / -24

Documentation (2) +42 / -24
AGENTS.mdMake comment conventions repo-wide and recognize pnpr as a first-class product +28/-24

Make comment conventions repo-wide and recognize pnpr as a first-class product

• Reframes the repo as three products (TypeScript CLI, pacquet, pnpr) and clarifies how “TypeScript only” sections apply. Moves the previously TypeScript-only comment guidance into a new repo-wide '## Comments' section and updates related wording (e.g., Rust section naming, AI review guidance) to match the new structure.

AGENTS.md

AGENTS.mdAdd explicit pnpr Comments section aligned with root and pacquet guidance +14/-0

Add explicit pnpr Comments section aligned with root and pacquet guidance

• Introduces a '### Comments' section that explicitly references the root baseline and pacquet’s Rust comment conventions. Adds Rust-specific expectations (doc comments as contracts, avoid call-site restatement, tests as documentation, and use of prefixes like 'SAFETY:') to remove ambiguity for pnpr contributors.

pnpr/AGENTS.md

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Informational

1. Ambiguous "stack" wording 🐞 Bug ⚙ Maintainability
Description
AGENTS.md now introduces “three products”, but the “Keep pnpm and pacquet in sync” section still
says “The two stacks” without explicitly stating it means the two pnpm CLI implementations
(TypeScript pnpm + Rust pacquet). This can briefly confuse readers skimming the doc about whether
pnpr is part of the parity/sync concept or what “stacks” refers to.
Code

AGENTS.md[R5-11]

+The repository contains three products:
-- The **TypeScript pnpm CLI** — everything outside `pacquet/`.
+- The **TypeScript pnpm CLI** — the main TypeScript workspaces outside `pacquet/` and `pnpr/`.
- The **Rust pacquet port** — `pacquet/`. See [`pacquet/AGENTS.md`](./pacquet/AGENTS.md) for pacquet-specific rules; it adds to (and never contradicts) the conventions below.
+- The **Rust pnpr registry server** — `pnpr/`. See [`pnpr/AGENTS.md`](./pnpr/AGENTS.md) for pnpr-specific rules; it adds to (and never contradicts) the conventions below.
-Sections below marked "(TypeScript only)" do not apply to pacquet. Everything else applies to both stacks.
+Sections below marked "(TypeScript only)" apply to TypeScript code only; they do not apply to Rust code in `pacquet/` or `pnpr/`. Everything else applies repo-wide unless a nested `AGENTS.md` specializes it.
Evidence
The updated intro explicitly enumerates three products, while the parity section immediately below
still uses “two stacks” phrasing for the CLI parity concept, which is now less self-explanatory
without naming which two.

AGENTS.md[5-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AGENTS.md` was updated to describe the repo as having **three products**, but the CLI parity section still refers to **“the two stacks”** without explicitly naming them. This is a small but avoidable ambiguity for readers skimming instructions.
### Issue Context
The repo now contains:
- TypeScript pnpm CLI
- Rust pacquet port (CLI)
- Rust pnpr registry server
The “Keep pnpm and pacquet in sync” section is about the two CLI implementations, but the phrase “two stacks” is less clear after the intro change.
### Fix Focus Areas
- AGENTS.md[5-17]
- AGENTS.md[13-21]
### Suggested change
Adjust wording in one place to explicitly name the two CLI implementations, e.g.:
- In the parity section: “The pnpm CLI has two implementations (TypeScript pnpm and Rust pacquet)…”

(or equivalently clarify in the intro that the CLI is implemented in two stacks and pnpr is separate).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 224caa9

Results up to commit 224caa9


🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)


Informational
1. Ambiguous "stack" wording 🐞 Bug ⚙ Maintainability
Description
AGENTS.md now introduces “three products”, but the “Keep pnpm and pacquet in sync” section still
says “The two stacks” without explicitly stating it means the two pnpm CLI implementations
(TypeScript pnpm + Rust pacquet). This can briefly confuse readers skimming the doc about whether
pnpr is part of the parity/sync concept or what “stacks” refers to.
Code

AGENTS.md[R5-11]

+The repository contains three products:

-- The **TypeScript pnpm CLI** — everything outside `pacquet/`.
+- The **TypeScript pnpm CLI** — the main TypeScript workspaces outside `pacquet/` and `pnpr/`.
- The **Rust pacquet port** — `pacquet/`. See [`pacquet/AGENTS.md`](./pacquet/AGENTS.md) for pacquet-specific rules; it adds to (and never contradicts) the conventions below.
+- The **Rust pnpr registry server** — `pnpr/`. See [`pnpr/AGENTS.md`](./pnpr/AGENTS.md) for pnpr-specific rules; it adds to (and never contradicts) the conventions below.

-Sections below marked "(TypeScript only)" do not apply to pacquet. Everything else applies to both stacks.
+Sections below marked "(TypeScript only)" apply to TypeScript code only; they do not apply to Rust code in `pacquet/` or `pnpr/`. Everything else applies repo-wide unless a nested `AGENTS.md` specializes it.
Evidence
The updated intro explicitly enumerates three products, while the parity section immediately below
still uses “two stacks” phrasing for the CLI parity concept, which is now less self-explanatory
without naming which two.

AGENTS.md[5-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AGENTS.md` was updated to describe the repo as having **three products**, but the CLI parity section still refers to **“the two stacks”** without explicitly naming them. This is a small but avoidable ambiguity for readers skimming instructions.
### Issue Context
The repo now contains:
- TypeScript pnpm CLI
- Rust pacquet port (CLI)
- Rust pnpr registry server
The “Keep pnpm and pacquet in sync” section is about the two CLI implementations, but the phrase “two stacks” is less clear after the intro change.
### Fix Focus Areas
- AGENTS.md[5-17]
- AGENTS.md[13-21]
### Suggested change
Adjust wording in one place to explicitly name the two CLI implementations, e.g.:
- In the parity section: “The pnpm CLI has two implementations (TypeScript pnpm and Rust pacquet)…”

(or equivalently clarify in the intro that the CLI is implemented in two stacks and pnpr is separate).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 78c0621


🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)


Informational
1. Ambiguous "stack" wording 🐞 Bug ⚙ Maintainability
Description
AGENTS.md now introduces “three products”, but the “Keep pnpm and pacquet in sync” section still
says “The two stacks” without explicitly stating it means the two pnpm CLI implementations
(TypeScript pnpm + Rust pacquet). This can briefly confuse readers skimming the doc about whether
pnpr is part of the parity/sync concept or what “stacks” refers to.
Code

AGENTS.md[R5-11]

+The repository contains three products:

-- The **TypeScript pnpm CLI** — everything outside `pacquet/`.
+- The **TypeScript pnpm CLI** — the main TypeScript workspaces outside `pacquet/` and `pnpr/`.
- The **Rust pacquet port** — `pacquet/`. See [`pacquet/AGENTS.md`](./pacquet/AGENTS.md) for pacquet-specific rules; it adds to (and never contradicts) the conventions below.
+- The **Rust pnpr registry server** — `pnpr/`. See [`pnpr/AGENTS.md`](./pnpr/AGENTS.md) for pnpr-specific rules; it adds to (and never contradicts) the conventions below.

-Sections below marked "(TypeScript only)" do not apply to pacquet. Everything else applies to both stacks.
+Sections below marked "(TypeScript only)" apply to TypeScript code only; they do not apply to Rust code in `pacquet/` or `pnpr/`. Everything else applies repo-wide unless a nested `AGENTS.md` specializes it.
Evidence
The updated intro explicitly enumerates three products, while the parity section immediately below
still uses “two stacks” phrasing for the CLI parity concept, which is now less self-explanatory
without naming which two.

AGENTS.md[5-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`AGENTS.md` was updated to describe the repo as having **three products**, but the CLI parity section still refers to **“the two stacks”** without explicitly naming them. This is a small but avoidable ambiguity for readers skimming instructions.

### Issue Context
The repo now contains:
- TypeScript pnpm CLI
- Rust pacquet port (CLI)
- Rust pnpr registry server

The “Keep pnpm and pacquet in sync” section is about the two CLI implementations, but the phrase “two stacks” is less clear after the intro change.

### Fix Focus Areas
- AGENTS.md[5-17]
- AGENTS.md[13-21]

### Suggested change
Adjust wording in one place to explicitly name the two CLI implementations, e.g.:
- In the parity section: “The pnpm CLI has two implementations (TypeScript pnpm and Rust pacquet)…”
 
(or equivalently clarify in the intro that the CLI is implemented in two stacks and pnpr is separate).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 78c0621


🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review
Auto-approved notes - no code review findings
- 'auto_approve_for_no_suggestions' flag enabled
Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 78c0621

@zkochan
zkochan force-pushed the comment-conventions branch from 78c0621 to 224caa9 Compare June 25, 2026 12:41
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 224caa9

1 similar comment
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 224caa9

@zkochan
zkochan enabled auto-merge June 25, 2026 12:46
@zkochan
zkochan disabled auto-merge June 25, 2026 13:23
@zkochan
zkochan merged commit 305295f into main Jun 25, 2026
27 checks passed
@zkochan
zkochan deleted the comment-conventions branch June 25, 2026 13:23
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant