Skip to content

feat(git): make the injected instruction text host-neutral - #100

Merged
cblecker merged 3 commits into
mainfrom
claude/git-plugin-claude-refs-t6hpne
Sep 2, 2026
Merged

feat(git): make the injected instruction text host-neutral#100
cblecker merged 3 commits into
mainfrom
claude/git-plugin-claude-refs-t6hpne

Conversation

@cblecker

@cblecker cblecker commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • The commit trailer becomes the literal Assisted-by: LLM, the form the Linux kernel's Documentation/process/coding-assistants.rst has used since commit 816d999 dropped the AGENT:MODEL variant. Naming the model was the only vendor-specific instruction in the output.
  • The session-link rules name Claude-Session as an example rather than the rule, and the stash rule says "agent sessions", so the same output can be reused under other agents.
  • The includeGitInstructions warning is emitted only when CLAUDECODE=1, using the same conditional-section technique as the Kubernetes block. Claude Code output is byte-identical apart from the reworded lines; other hosts get no paragraph and no extra blank line.
  • The Kubernetes variant is unchanged: the community PR guide disallows any assisted-by trailer regardless of value.
  • DESIGN_NOTES gains a "Host-specific output" section and the kernel commit reference; README drops the Claude-Session wording; plugin version 1.8.0 to 1.9.0.

Test plan

  • CLAUDECODE=1 bash git/scripts/git-instructions.sh diffed against the pre-change output: only the trailer, session-link, and stash lines differ
  • env -u CLAUDECODE bash git/scripts/git-instructions.sh: the warning paragraph and its blank line are the only omissions
  • Fake kubernetes-sigs and fork (upstream) remotes under both conditions: Kubernetes variant still omits every trailer, layout unchanged
  • shellcheck 0.9.0 clean, claude plugin validate ./git, markdownlint, uvx skillsaw --strict (A+)

Summary by CodeRabbit

  • Improvements
    • Git guidance now uses the generic Assisted-by: LLM commit trailer instead of a Claude-specific model identifier.
    • Duplicate-instruction warnings are shown only when running under Claude Code.
    • Environment-specific configuration guidance is clearer, including when Claude Code settings are unavailable.
  • Documentation
    • Updated Git safety and design documentation to describe host-neutral wording and session-link trailer handling.

The commit trailer becomes the literal `Assisted-by: LLM`, the form the
Linux kernel's coding-assistants.rst has used since commit 816d999 dropped
the AGENT:MODEL variant. Naming the model was the only vendor-specific
instruction in the output; the session-link rules now name Claude-Session
as an example rather than the rule, and the stash rule says "agent
sessions".

The includeGitInstructions warning only makes sense under Claude Code, so
it is emitted only when CLAUDECODE=1 is set, using the same conditional
section technique as the Kubernetes block so the Claude Code output is
byte-identical apart from the reworded lines. The Kubernetes variant is
unchanged: the community PR guide disallows any assisted-by trailer
regardless of its value.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 2, 2026 21:25
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 80c7b9ea-537d-450d-9cc2-fffef31bad26

📥 Commits

Reviewing files that changed from the base of the PR and between 7ef2c6d and c0c81f6.

📒 Files selected for processing (4)
  • git/.claude-plugin/plugin.json
  • git/README.md
  • git/docs/DESIGN_NOTES.md
  • git/scripts/git-instructions.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Git instruction behavior

Layer / File(s) Summary
Generalized instruction generation
git/scripts/git-instructions.sh
The script uses Assisted-by: LLM and generic session-link wording. It emits duplicate-instruction warnings only when CLAUDECODE=1. It applies CLAUDE_ENV_FILE overrides only when that variable is set.
Documentation and plugin release metadata
git/.claude-plugin/plugin.json, git/README.md, git/docs/DESIGN_NOTES.md
The plugin version changes to 1.9.0. Documentation describes host-specific output and the generalized safety rules.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c0c81

The PR makes the injected Git instructions host-neutral while preserving the Kubernetes-specific trailer behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the injected Git instruction text host-neutral.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/git-plugin-claude-refs-t6hpne

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

🟡 Changes recommended

The generated output still mandates Claude-specific tools despite being described as reusable and host-neutral.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR aims to make the git plugin’s attribution instructions more host-neutral.

Changes:

  • Uses the generic Assisted-by: LLM trailer.
  • Gates Claude Code’s duplicate-instructions warning on CLAUDECODE=1.
  • Updates documentation and bumps the plugin to 1.9.0.
File summaries
File Description
git/scripts/git-instructions.sh Generalizes attribution and conditionally emits the Claude warning.
git/README.md Uses generic session-link terminology.
git/docs/DESIGN_NOTES.md Documents host-specific behavior and trailer rationale.
git/.claude-plugin/plugin.json Bumps the minor version.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread git/docs/DESIGN_NOTES.md Outdated
The design note said the whole output could be reused under other agents,
but it still names Claude Code tools (Bash, TaskCreate, Agent, the GitHub
MCP tools). State that only the attribution and safety wording is host-
neutral and that the tool references are a separate change. Raised by
Copilot review on #100.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 2, 2026 21:31

Copilot AI 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.

🟢 Approval recommended

Functional changes are consistent and appropriately versioned; only a minor documentation wording inconsistency remains.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread git/docs/DESIGN_NOTES.md Outdated
The host-specific note claimed the session-link rules no longer name
Claude, but they still cite Claude-Session and claude.ai as examples of
what not to add. Describe them as examples. Raised by Copilot review on
#100.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 2, 2026 21:34

Copilot AI 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.

🟢 Approval recommended

The focused changes are internally consistent, preserve the Kubernetes variant, and follow the repository’s versioning convention.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@cblecker
cblecker merged commit 9dcff7d into main Sep 2, 2026
14 checks passed
@cblecker
cblecker deleted the claude/git-plugin-claude-refs-t6hpne branch September 2, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants