Decide the format of a commit inside a PR, now that the landing commit is the record

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
git, github, shell

Research direction

Read CONTRIBUTING.md, .agents/skills/commit/SKILL.md, .github/pull_request_template.md, and steps 3–5 of .agents/skills/trace-decision/SKILL.md, then compare the four proposed formats and their effects on trace-decision and commit editing. Related issues #60 and #78 define adjacent decisions. Done when the commit and PR body format is decided and the listed guidance is consistent with that decision.

Written by the indexing model from the issue text.

Description

type/documentation
Kind

Unclear

Location
  • Message format in CONTRIBUTING.md
  • .agents/skills/commit/SKILL.md
  • .github/pull_request_template.md
  • Steps 3 to 5 of .agents/skills/trace-decision/SKILL.md
Version

7c2e454

Problem

#68 makes the landing commit of a PR the unit of the decision record, with the PR body as its message. Message format still applies to each commit: a Why: line, and Rejected:, Cost:, Evidence: and Supersedes: lines where they apply. The commit skill asks for them in each commit.

After #68:

  • A commit inside a PR gives a reason at a point inside the PR. trace-decision treats it as a second source.
  • After a squash merge, the commits inside a PR are not in Git.
  • The PR body has its own format: a ## Why section with Rejected:, Cost: and Evidence: lines, and separate ## Breaking change and ## Supersedes sections. So a commit and a PR body give the same facts in two formats, and trace-decision reads both.

PR #68 itself had 25 commits, each with full Message format fields. A squash merge would have left them only on GitHub, and with a merge commit they are a second source. This is the cost that C1 in #54 warns about.

Proposal

Decide the format of a commit inside a PR, and whether the two formats become one.

Option Commit inside a PR PR body
A. Subject only <type>: <summary>. A body is optional ## Why with field lines, as now
B. Free text in commits A body gives the reason in prose, without fields As now
C. One format for both When a commit has a reason worth keeping, it uses the same ## Why section with optional field lines as the PR body As now
D. No fields anywhere Prose in commits ## Why in prose. Rejected options go into the text

Effects:

  • A and C keep one format for trace-decision to read, and cut the work of each commit.
  • D removes the fields. Then git log --grep='^Rejected:' and the field-based steps of trace-decision stop working, and they must read whole texts. Fields also remind a writer to name rejected options, which is what keeps an agent from proposing them again. A template comment can give the same reminder.
  • With any option, Supersedes and Breaking change stay in the PR body only.
  • ## Why in a commit message: when git commit opens an editor, its default cleanup removes lines that start with #. With -m or -F and no editor, it keeps them. A heading in a commit body then needs --cleanup=verbatim in the editor case, or another marker.
  • The history before this change keeps commits in the earlier format, so trace-decision reads both forms anyway.

Related: #60 (when a choice needs a written reason) decides when a commit has a reason worth keeping. #78 (the PR body rules in seven places) decides where the format is defined.

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.