feat: leave non-decision trailers out of commit messages in the trace-decision output

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, github, javascript

Research direction

Start with tools/trace-decision/collect.mjs, especially where local and pull-request commit messages are assembled and where the status line is produced. First identify the accepted trailer list and the intended handling of AI co-author details, then exercise the collector with commits containing Co-Authored-By, Signed-off-by, and Reviewed-by. Done means Git-parsed trailers are omitted, CONTRIBUTING.md message fields remain, and the status line reports the omitted trailers and counts.

Written by the indexing model from the issue text.

Description

type/feature
Problem to solve

The collector of the trace-decision skill (tools/trace-decision/collect.mjs) prints the full message of each commit. This includes trailers such as Co-Authored-By, Signed-off-by and Reviewed-by. These lines give no reason for a decision, but the AI assistant reads them in each commit block, also for the other commits of a pull request.

The noise is small now: one line for each commit. No wrong result from it is known. Record the tradeoffs here, so that a later change does not need to find them again.

Proposal

Leave out a fixed list of trailers, for example Co-Authored-By, from the commit messages in the output. Keep the message fields of CONTRIBUTING.md (Why, Rejected, Cost, Evidence, Supersedes).

  • Find the trailers with git interpret-trailers --parse or with the %(trailers) format, not with a pattern of our own. The message fields come before a blank line, so Git does not take them as trailers. A pattern of our own can remove them by mistake.
  • For the commits of a pull request from GitHub, parse the message text in the same way.
  • Name the trailers that the script left out in the status line, as the collector does for the Checks section of a pull request body. For example: --- message: read, without 1 Co-Authored-By line.
More information

Decide these before the change:

  • Which trailers. Co-Authored-By is the common case in this repo. Signed-off-by and Reviewed-by can also appear in other projects.
  • AI involvement. A Co-Authored-By line with an AI assistant tells that an assistant helped to write the commit. A reason that an assistant wrote can need a check by the maintainer. If the script removes these lines, it can keep this fact in a short form, for example co-authors: Claude Opus 5.5.
  • When. No wrong result from this noise is known. If none occurs, this issue can close without a change.
Dominant language
Shell
Stars
1
Forks
0
Avg merge
6h 59m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c-w-z/commit-decision-record

All issues in c-w-z/commit-decision-record

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.