Skip to content

[3.0] Records in AGENTS.md what code comments should say - #9584

Merged
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/agents-comment-guidance
Aug 30, 2026
Merged

[3.0] Records in AGENTS.md what code comments should say#9584
Sesquipedalian merged 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/agents-comment-guidance

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Review feedback on #9573 that is worth keeping, since it applies to every pull request an
agent opens rather than to that one:

When including comments in proposed changes to the code, it's better if those comments
just describe what the code now does and the reason it does so. We don't typically need
the comments in the code to explain why the code was changed, since that essentially
amounts to describing code that no longer exists.

AGENTS.md gets a ### Comments subsection under Conventions to follow saying so. It
states the rule, quotes the note, and shows the before and after from that review: a
four-line comment arguing about invalid_date and Event(-1) became
// Only try to set the start and duration if we were given the relevant data.

Three consequences are spelled out, because each one came up on that PR:

  • The reasoning is not lost, it belongs in the pull request description instead.
  • A comment that only restates the line under it gets a deletion request rather than a
    reword. One of the three flagged on [3.0] Open the calendar's event form on a date instead of refusing to open #9573 was removed outright.
  • This is not an argument for fewer comments. The existing "comment density here is high
    and conversational" line still stands, and the new text says so, so the two are not read
    as being in tension.

Documentation only; no code changes and nothing for the test suite to reach.

Issues References (Fixes|Related|Closes)

Related to #9573, where the feedback was given.

Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@Sesquipedalian
Sesquipedalian merged commit e3c61da into SimpleMachines:release-3.0 Aug 30, 2026
7 checks passed
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 30, 2026
@jdarwood007 jdarwood007 added the Meta Repository tools label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Meta Repository tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants