Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ Apply these questions before you settle a design, and again in review.
- Write commit messages in the imperative mood with a concise summary.
- Never put an email address in a commit message. No `noreply@` address.
No email in any trailer. A `user@example.com` placeholder is allowed.
- Never write a `Co-Authored-By` trailer in a commit message.
`scripts/internal/commit.sh` appends `Co-Authored-By: Claude` itself, so a
hand-written trailer ships as a duplicate line. [duplicate trailer,
PR #150]
- Name branches `feature/`, `fix/`, or `refactor/`.
- Squash all local commits before push. Ship one clean commit per PR.
- Run `scripts/status.sh` before staging. A file staged, added, or removed
Expand Down
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ These are invoked by skills and agents only — not intended for direct use:
| ------------------------------------ | ------------------------------------------------------------------------------------------ |
| `internal/analyzer-release-check.sh` | Validate analyzer release files (Unshipped/Shipped) against source DiagnosticId constants |
| `internal/analyzer-promote.sh` | Move Unshipped rule rows into a new Shipped release section |
| `internal/commit.sh` | Commit helper: blocks emails in the message, appends a name-only co-author trailer |
| `internal/commit.sh` | Commit helper: blocks emails, adds a name-only co-author trailer unless one is present |
| `internal/cr-diff-deliver.sh` | Decide code-review diff delivery mode by size: inline (≤30KB), write (30-40KB), or split (>40KB) |
| `internal/cr-target.sh` | Resolve a code-review target to base, changed files, and the reviewers to run |
| `internal/mechanical-diff.sh` | Classify each changed file in the working diff as MECHANICAL (namespace rename) or SUBSTANTIVE |
Expand Down
9 changes: 7 additions & 2 deletions scripts/internal/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ if [[ "$SKIP_PRECOMMIT" == false ]]; then
fi
fi

# Commit with the message plus a name-only co-author trailer (no email — global privacy rule)
git commit -m "$MSG" -m "$COAUTHOR_TRAILER"
# Commit with the message plus a name-only co-author trailer (no email — global privacy rule).
# Skip the append when the message already carries a trailer, so it never ships twice.
if printf '%s\n' "$MSG" | rg -qi '^Co-Authored-By:'; then
git commit -m "$MSG"
else
git commit -m "$MSG" -m "$COAUTHOR_TRAILER"
fi

ok "Committed: $MSG"