Skip to content

Codify comment layout in the Documentation Style Conventions - #419

Merged
ptr727 merged 2 commits into
developfrom
strengthen-comments-layout-guidance
Jul 24, 2026
Merged

Codify comment layout in the Documentation Style Conventions#419
ptr727 merged 2 commits into
developfrom
strengthen-comments-layout-guidance

Conversation

@ptr727

@ptr727 ptr727 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

The Comments guidance covered when to comment and how short, but never the layout of a multi-line comment - so an agent defaults to wrapped prose blocks, and comment style is a recurring conformance miss.

Adopt the structure rules from an operational repo (ESPHome-Config) whose local Comments are structured, not prose section got it exactly right, feeding the good phrasing up to the canonical:

  • one sentence per line, never wrap a sentence across lines, no block paragraphs or multi-sentence run-ons;
  • a continuation of a topic stays unindented, while sub-topics are # - bullets hanging off a lead line;
  • two worked examples make the continuation-vs-list distinction concrete.

Also fold the redundant ~120 / not 80-col wrap bullet into the sentence-per-line rule (which supersedes it), and drop the Keep it short bullet's own clause-splicing semicolon.

Carried as intent via Documentation Style Conventions, so it propagates on the next AGENTS re-vendor. Once this is on main, ESPHome-Config's local section converges to the canonical rather than staying a fork.

The Comments guidance said when to comment and how short, but never the layout
of a multi-line comment, so an agent defaults to wrapped prose blocks. Add the
structure rules, adopted from an operational repo's local phrasing that got it
right: one sentence per line, never wrap a sentence, no block paragraphs; a
continuation stays unindented while sub-topics are '# -' bullets off a lead
line. Two worked examples make the continuation-vs-list distinction concrete.
Fold the redundant line-length bullet into the sentence-per-line rule, and drop
the 'Keep it short' bullet's own clause-splicing semicolon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 01:29

Copilot AI 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.

Pull request overview

This PR updates AGENTS.md to explicitly codify the layout rules for multi-line comments so agents and contributors produce structured, consistently formatted comments rather than wrapped prose blocks.

Changes:

  • Refines the existing "Keep it short" rule into clearer, sentence-based guidance.
  • Adds explicit layout rules for multi-line comments (one sentence per line, continuation vs sub-topic list structure).
  • Adds worked examples demonstrating continuation lines vs - sub-topic bullets.
Comments suppressed due to low confidence (1)

AGENTS.md:161

  • Similar to the bullet above, this sentence frames sub-topics as # - bullets, which is workflow-specific. Consider describing the pattern as - bullets and using # - only as the example prefix.
Sub-topics are `# -` bullets, each elaborating a distinct item named in the lead:

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
The Comments section covers // languages too, so state the sub-bullet as a '-'
after the comment marker (# -, // -), not the shell/YAML-specific # -. Also use
a clearer adjective in the example (a diff that cannot be computed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 24, 2026 01:32

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 46a3e6f into develop Jul 24, 2026
7 checks passed
@ptr727
ptr727 deleted the strengthen-comments-layout-guidance branch July 24, 2026 01:52
ptr727 added a commit that referenced this pull request Jul 24, 2026
…el (#421)

Carries #419 (comment layout codification) and #420 (per-section AGENTS fidelity model + spec/section-model.md). ~90% of AGENTS.md is now byte-checked fleet-wide. Merge commit, no release.
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.

2 participants