Skip to content

docs(agents): decide a concise shape for commit messages and agent-written text, and what enforces it #1803

Closed

Description

@dan-petty

Friction

Commit messages and other agent-written text are far longer than the repository's own rule asks for. AGENTS.md says "Concise, effect-driven messages" (§3, Commit Standards), but nothing enforces it, so reading history, review and release notes costs more than it should.

Evidence

Measured on 2026-10-21 over the 51 item commits of v0.2.38 (954914e2..d09a0285) and the files that release added:

  • Subjects: 49 of 51 are over 72 characters, with a median of 90.
  • Bodies: 13 of 51 exceed 500 characters, 8 exceed 1,500, and the longest is 5,540. The long ones restate the pull request description, the task file and the measurements that already live there.
  • Task files: 34 added, median 2,520 characters, 6 over 4,000, the largest 16,514.
  • Changelog fragments: 33 added, median 421 characters, 6 over 600, the largest 1,355.
  • Enforcement: none. .pre-commit-config.yaml has no commit-msg hook, CONTRIBUTING.md shows only three one-line examples, and no check reads a subject's length or a body's.
  • Agent replies: the same pattern shows in the session's own summaries and pull request bodies, which narrate every step where a result and a decision would do.

Questions

  1. What is the right shape, and is it written down? For example: a subject of 72 characters or fewer, a body only for a reason the diff cannot show, and no measurements or lists a pull request or task file already holds.
  2. Which of these should a check enforce, and where? A commit-msg hook for the subject, a length ceiling that warns on a body, a ratchet on task file sizes.
  3. Do squash merges change the answer? The squashed commit takes the pull request title and the body of its branch commits, so a long branch commit becomes a long history entry. Once chore(settings): the release App, the release environment, the squash settings and the required checks are in place #1864 sets the squash message to PR_BODY, the body comes from the pull request body. Since feat(release): release-please makes every release from main #1952, the pull request title is also the line in the release notes, so the subject rule also shapes the release notes.
  4. How should agents be told? AGENTS.md, the PR template, and a short example of a good message and a good final reply.
  5. What does a reader of agent output need first? A result and a decision, with detail on request.

Deliverable

An ADR or an AGENTS.md amendment that states the shape, with follow-up issues for each check it decides, each delivered by one pull request.

Acceptance criteria

  • The measurements above are repeated after the change, over the same range, with the same method.
  • The shape is written once, in AGENTS.md, and CONTRIBUTING.md points to it.
  • Each check the decision adds has its own issue.

Proposed design

Problem statement

Commit messages and agent-written text are far longer than the repository rule asks for. AGENTS.md says "Concise, effect-driven messages" but nothing enforces a length or shape. Reading history, reviewing pull requests, and reading release notes cost more than they should. This item decides the shape and where enforcement lives. It records the decision in a document that agents and humans both read.

Acceptance criteria

  • Criterion 1: The shape of a commit message and agent-written text is stated in one section of AGENTS.md, and CONTRIBUTING.md links to that section.
    Verification: Read AGENTS.md. It states the subject length limit, the body rule, and what belongs in a comment. Read CONTRIBUTING.md. It has a link to the AGENTS.md section that states the shape.
  • Criterion 2: For each check the decision adopts, a separate issue exists with its own acceptance criteria.
    Verification: A comment on this issue lists the issue numbers of each follow-up check. Each follow-up issue is open and has acceptance criteria.
  • Criterion 3: After the change is merged, the measurements of subjects, bodies, task files, and changelog fragments are repeated over the range 954914e..d09a028 with the same method.
    Verification: A comment on this issue shows the re-measured numbers. The range and method match the evidence section of the issue body.

Key questions

  • What is the right shape, and is it written down?: The shape is partially written. CONTRIBUTING.md section 4 states the PR title is a Conventional Commit and the body says what the change does and why, plus required footers. It also says test results and issue history go in a comment. AGENTS.md rule 1 says "Concise, effect-driven messages." No explicit character limit is stated. The decision should add: subject 72 characters or fewer, body only for a reason the diff cannot show, no restatement of content already in the PR description or task file. (proposed) [sources: CONTRIBUTING.md, AGENTS.md]
  • Which of these should a check enforce, and where?: The decision document names which checks it adopts and where each lives. The issue proposes a commit-msg hook for the subject, a length warning on the body, and a ratchet on task file sizes. The current .pre-commit-config.yaml has no commit-msg hook and no length check. The decision should state which of the three it adopts and in which file the check lives. (proposed) [sources: .pre-commit-config.yaml]
  • Do squash merges change the answer?: Yes. ADR 0012 sets squash_merge_commit_title to PR_TITLE and squash_merge_commit_message to PR_BODY, squash only. The squash commit takes the PR title as its subject and the PR body as its message. Branch commits are replaced by the squash. A check on the PR title and body is more useful than a check on branch commits. Since feat(release): release-please makes every release from main #1952, the PR title is also the line in the release notes. [sources: docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md:143]
  • How should agents be told?: AGENTS.md states the shape in its rules section. The PR template carries the required footers. A short example of a good message and a good final reply lives in the same document. CONTRIBUTING.md points to the AGENTS.md section. Agents read AGENTS.md before every task, so the rule is visible at the point of use. (proposed) [sources: AGENTS.md, CONTRIBUTING.md]
  • What does a reader of agent output need first?: A result and a decision, with detail on request. The body or reply states what changed and why. A reader who wants the steps or measurements reads the PR description, the task file, or a linked comment. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/docs
    priority/p2-medium
    scope/ci
    source/agent
    on Oct 21, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at 4da1e34 (see proposed design in issue body).

  4. added
    status/ready
    value/medium
    effort/medium
    on Oct 28, 2026
  5. removed
    status/ready
    on Oct 30, 2026
  6. added a commit that references this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/cisource/agenttype/docsvalue/medium

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions