Repository navigation
chore(repo): make code comments concise and add a comment policy - #6559
Merged
Merged
Conversation
avallete
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
AGENTS.mdgains a## Commentssection: comments state the why the code cannot carry, exported symbols get a one-sentence JSDoc summary, inline comments stay at one to three lines, and provenance (Gofile.go:NNcitations, ticket and PR numbers, review-round notes, "verified empirically" trails), narration, emphasis, section banners, and meta-commentary are out. Directive comments and tool-facing JSDoc tags (@publicfor knip,@internal,@deprecated) are kept verbatim.apps/cli/AGENTS.mdcross-references it from its Go-parity guidance.apps/cli,packages/config,packages/stack,apps/cli-e2e, tooling scripts, GitHub workflow YAML, and JSONC configs. Comment lines drop from roughly 60.5k to 31.4k, and non-test source goes from about a 31% comment-to-code ratio to about 18%. Comments that documented a genuine invariant, an external quirk, or a decision that would otherwise read as a bug were kept and compressed; everything that was an author's audit trail was removed.Why
The existing comments were technically accurate but written as an audit trail rather than for the next reader: multi-paragraph blocks citing Go source line numbers, ticket IDs, review rounds, and empirical verification steps. At that density a human skips them entirely, which defeats the point, and they inflate the token cost of every file an agent reads. The policy exists so the pattern does not grow back.
Reviewer notes
develop; YAML and JSONC files were parsed and compared as data. One@publicJSDoc tag that knip depends on was caught and kept by this check.develop.(Go parity), PR-number, and review-ID suffixes. That is queued as a separate change.packages/configships its compiled output withtsc, so its published JavaScript carried the full comment volume; the CLI binary was unaffected becausebun buildstrips comments.