Skip to content

chore: Add CLAUDE.md and commit-msg hook#15

Merged
rubambiza merged 1 commit into
kagenti:mainfrom
rubambiza:chore/add-claude-md
Jun 17, 2026
Merged

chore: Add CLAUDE.md and commit-msg hook#15
rubambiza merged 1 commit into
kagenti:mainfrom
rubambiza:chore/add-claude-md

Conversation

@rubambiza

Copy link
Copy Markdown
Contributor

Summary

Replicate the contribution-guidelines setup from kagenti/.github (merged in PR #79) onto this repo:

  • CLAUDE.md (title adapted for the Automation repo): DCO sign-off requirement, commit attribution policy (Assisted-By, never Co-authored-by), PR description attribution, and scope discipline.
  • scripts/hooks/commit-msg (verbatim from kagenti/.github): enforces the attribution policy automatically by stripping AI Co-authored-by/Made-with trailers and replacing them with Assisted-By.

Install the hook locally with:

git config core.hooksPath scripts/hooks

Closes #13

Assisted-By: Claude Code

Replicate the contribution guidelines and attribution-enforcing
commit-msg hook from kagenti/.github (PR #79) onto this repo.

- CLAUDE.md: DCO sign-off, Assisted-By attribution policy, PR
  description attribution, scope discipline
- scripts/hooks/commit-msg: enforces Assisted-By over Co-authored-by

Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
@rubambiza rubambiza force-pushed the chore/add-claude-md branch from 00837c9 to f3d1757 Compare June 16, 2026 20:19
@rubambiza rubambiza self-assigned this Jun 16, 2026
@rubambiza rubambiza added the ready-for-ai-review Request automated AI code review from clawgenti label Jun 16, 2026

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds CLAUDE.md and scripts/hooks/commit-msg to replicate contribution guidelines from kagenti/.github — clean, well-scoped PR with a single signed-off commit and passing CI.

One nit: the commit's Assisted-By trailer (Claude Opus 4.6 <noreply@anthropic.com>) differs from the format CLAUDE.md itself documents (Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>). Not a blocker, but the hook enforces the canonical form, so leading by example in this PR's commit would be nice.


Reviewed by clawgenti using github:pr-review

Comment thread scripts/hooks/commit-msg
if [ "$HAS_AI_TRAILER" = true ]; then
# Ensure there's a blank line before the trailer
echo "" >> "$COMMIT_MSG_FILE"
echo "Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>" >> "$COMMIT_MSG_FILE"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This line uses Claude (Anthropic AI) but the commit that introduces this PR uses Claude Opus 4.6 as the Assisted-By value. CLAUDE.md (line 24) documents Claude (Anthropic AI) <noreply@anthropic.com> as the canonical form — the hook is correct, but the introducing commit itself doesn't follow it. Consider amending to match.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair call out. The Assisted-By: Claude Opus 4.6 <noreply@anthropic.com> is due to my own local hooks. I will modify the local ones to match the CLAUDE.md one so that the trailers are not tied to a particular model for future commits.

@rubambiza rubambiza added documentation Improvements or additions to documentation ready-for-human-review AI review passed, ready for human reviewer and removed ready-for-ai-review Request automated AI code review from clawgenti documentation Improvements or additions to documentation labels Jun 17, 2026

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean replication of the contribution-guidelines setup from kagenti/.github.

  • CLAUDE.md: DCO, Assisted-By attribution policy, PR-description attribution, and scope discipline — all consistent with the org standard.
  • scripts/hooks/commit-msg: uses set -euo pipefail, mktemp, and portable awk for trailing-blank-line cleanup; logic is sound. Opt-in via git config core.hooksPath, runs only on commit — no concerns.

DCO passing. LGTM.

Assisted-By: Claude Code

@rubambiza rubambiza merged commit 58ea904 into kagenti:main Jun 17, 2026
1 check passed
@rubambiza rubambiza deleted the chore/add-claude-md branch June 17, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human-review AI review passed, ready for human reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Add CLAUDE.md with contribution guidelines

3 participants