Skip to content

Update Claude instructions/add fix for "update pull request" command#758

Merged
forstmeier merged 4 commits intomasterfrom
claude-instruction-updates
Feb 18, 2026
Merged

Update Claude instructions/add fix for "update pull request" command#758
forstmeier merged 4 commits intomasterfrom
claude-instruction-updates

Conversation

@forstmeier
Copy link
Copy Markdown
Collaborator

@forstmeier forstmeier commented Feb 16, 2026

Overview

Changes

  • expanding Claude instructions
  • fix to initial GraphQL query instructions for "update pull request" custom command

Context

Minor fix plus a handful of prompts I've come across that seemed helpful.

Summary by CodeRabbit

  • Documentation
    • Updated command guidance to post comments into existing review threads using thread IDs and variable-based inputs, with examples for obtaining and supplying thread identifiers.
    • Revised contribution guidelines to require GitHub templates, emphasize collaboration and code-quality practices, testing discipline, professional communication, and preferred API usage where applicable.

@forstmeier forstmeier self-assigned this Feb 16, 2026
@forstmeier forstmeier added the markdown Markdown code updates label Feb 16, 2026
@github-project-automation github-project-automation Bot moved this to To Do in Overview Feb 16, 2026
@forstmeier forstmeier moved this from To Do to In Progress in Overview Feb 16, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Replaces the GraphQL mutation used for posting PR review comments to reply to existing review threads via addPullRequestReviewThreadReply using parameterized variables (thread ID + body). Also updates CLAUDE.md with expanded contributor guidance and workflow best practices.

Changes

Cohort / File(s) Summary
Review-thread mutation & CLI flow
​.claude/commands/update-pull-request.md
Switched mutation from addPullRequestReviewComment to addPullRequestReviewThreadReply; introduced GraphQL variables ($pullRequestReviewThreadId, $body) and -f bindings; now reads pullRequestReviewThreadId from review_threads.json instead of extracting comment/node IDs; adjusted resolveReviewThread to use parameterized threadId. Review CLI examples and variable bindings.
Contributor guidance
CLAUDE.md
Expanded contributor guidance: require using .github templates with commented instructions, added collaboration and quality bullets (seek input, avoid single-use abstractions, follow project patterns, write tests reproducing bugs, professional tone, prefer GraphQL for data retrieval).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 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 accurately describes the main changes: updating Claude instructions and fixing the GraphQL mutation for the update pull request command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude-instruction-updates

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 and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 16, 2026

Greptile Summary

This PR makes two changes: (1) fixes GraphQL mutations in the "update pull request" custom command to use proper parameterized variables (-f flags) instead of fragile inline shell string interpolation, and (2) expands CLAUDE.md with six new development guidelines covering uncertainty handling, abstraction discipline, style consistency, test-first bug fixing, professional tone, and GraphQL API preference.

  • Bug fix: GraphQL mutations in .claude/commands/update-pull-request.md now use $variable syntax with -f flag passing, which is the correct approach for gh api graphql and avoids issues with special characters in values
  • Typo: Line 63 of CLAUDE.md has "write tess" instead of "write tests"
  • Guidelines: New CLAUDE.md entries align with existing project philosophy (simplicity, root-cause focus, professional tone)

Confidence Score: 4/5

  • This PR is safe to merge after fixing the typo on line 63 of CLAUDE.md.
  • The GraphQL variable fix is correct and improves robustness. The new CLAUDE.md guidelines are reasonable and consistent with existing project conventions. The only issue is a minor typo ("tess" instead of "tests") in one of the new guidelines.
  • CLAUDE.md has a typo on line 63 that should be corrected before merge.

Important Files Changed

Filename Overview
CLAUDE.md Adds six new development guidelines and tweaks wording on one existing line. Contains a typo on line 63: "write tess" should be "write tests".
.claude/commands/update-pull-request.md Fixes GraphQL mutations to use proper parameterized variables instead of fragile inline string interpolation, improving correctness and security.

Last reviewed commit: 4324282

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread CLAUDE.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances Claude instructions and fixes GraphQL query syntax in the "update pull request" command. The changes improve documentation clarity and correct a technical issue with string interpolation in GraphQL mutations.

Changes:

  • Added six new guidelines to CLAUDE.md covering uncertainty handling, abstraction avoidance, style consistency, test-driven bug fixes, professional tone, and GraphQL API usage
  • Updated line 44 in CLAUDE.md to emphasize following commented instructions in GitHub templates
  • Fixed GraphQL mutation syntax in update-pull-request.md to use variable parameters instead of inline string interpolation for both addPullRequestReviewComment and resolveReviewThread mutations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CLAUDE.md Expands development guidelines with new best practices and updates GitHub template usage instructions
.claude/commands/update-pull-request.md Fixes GraphQL mutation syntax to use proper variable parameter passing instead of string interpolation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Feb 16, 2026

Coverage Status

coverage: 86.212%. remained the same
when pulling c69d029 on claude-instruction-updates
into 931713c on master.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 16, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 16, 2026

Greptile Summary

This PR makes two changes: (1) fixes GraphQL mutation calls in the "update pull request" custom command to use proper parameterized variables via gh api graphql -f flags instead of fragile inline shell string interpolation, bringing them in line with the query pattern already used at the top of the file, and (2) expands CLAUDE.md with six additional development guidelines covering uncertainty handling, abstraction discipline, style consistency, test-driven bug fixing, emoji policy, and GraphQL API preference.

  • Fixed addPullRequestReviewComment and resolveReviewThread mutations to use GraphQL variable declarations and -f parameter passing
  • Updated GitHub template guidance in CLAUDE.md to include "follow commented instructions"
  • Added six new best-practice guidelines to CLAUDE.md

Confidence Score: 5/5

  • This PR is safe to merge - it only modifies documentation and command templates with no runtime code changes.
  • Both files are documentation/instruction files with no executable code changes. The GraphQL mutation fix is a straightforward and correct improvement that aligns with the existing parameterized pattern used elsewhere in the same file. The CLAUDE.md additions are sensible guidelines that don't conflict with existing content.
  • No files require special attention.

Important Files Changed

Filename Overview
.claude/commands/update-pull-request.md Fixes GraphQL mutations to use proper parameterized variables (-f flags) instead of inline shell string interpolation, consistent with the query pattern already used elsewhere in the file. No issues found.
CLAUDE.md Minor wording update to template line and six new development guidelines added. All additions are reasonable best practices consistent with existing content. Typo fix ("tess" → "tests") addressed in a separate commit.

Last reviewed commit: 0453208

coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 16, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 16, 2026

Greptile Summary

This PR makes two categories of changes:

  • Fix for "update pull request" command: Switches the GraphQL mutation for replying to review threads from addPullRequestReviewComment (which creates comments as part of a pending review) to addPullRequestReviewThreadReply (which posts directly to existing threads). This resolves the issue of responses appearing as "pending" rather than being posted immediately. The mutations are also updated to use proper GraphQL variable parameterization (-f flags) instead of inline shell string interpolation, improving reliability with special characters.
  • Expanded Claude instructions: Adds six new development best practices to CLAUDE.md covering uncertainty handling, abstraction discipline, style consistency, test-first bug fixing, professional tone (no emojis), and GraphQL API preference.

Confidence Score: 5/5

  • This PR is safe to merge — it only modifies documentation and Claude instruction files with no runtime code changes.
  • Both files are documentation/instruction files with no executable code impact. The GraphQL mutation fix is a correct API change (addPullRequestReviewThreadReply is the proper mutation for posting direct replies to review threads). The CLAUDE.md additions are reasonable best practices consistent with existing guidelines. The typo flagged in a previous review thread has been fixed in a subsequent commit.
  • No files require special attention.

Important Files Changed

Filename Overview
.claude/commands/update-pull-request.md Fixes GraphQL mutation from addPullRequestReviewComment (creates pending review) to addPullRequestReviewThreadReply (posts directly to threads). Also parameterizes GraphQL variables properly using -f flags instead of inline string interpolation, and updates resolveReviewThread mutation similarly.
CLAUDE.md Adds six new development guidelines (ask when uncertain, no single-use abstractions, match existing styles, test-first bug fixes, no emojis, prefer GraphQL API) and slightly rewords the GitHub template instruction.

Last reviewed commit: aaad22f

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 17, 2026

Greptile Summary

This PR updates Claude instructions with best practices and fixes the GraphQL mutation syntax in the "update pull request" command. The changes include expanding CLAUDE.md with guidelines for code quality, testing, collaboration, and professional communication, plus correcting the GraphQL mutation from addPullRequestReviewComment to addPullRequestReviewThreadReply with proper variable passing syntax using -f flags.

Major changes:

  • Fixed GraphQL mutation to use addPullRequestReviewThreadReply instead of addPullRequestReviewComment for posting replies to review threads
  • Updated mutation to use GraphQL variables ($pullRequestReviewThreadId, $body) with -f flag syntax instead of inline string interpolation
  • Changed thread ID usage from comment node IDs (PRRC_*) to thread IDs (PRRT_*) as the correct parameter
  • Added best practices to CLAUDE.md: asking for help when uncertain, avoiding single-use abstractions, matching existing patterns, writing tests before fixing bugs, maintaining professional tone without emojis, and preferring GraphQL API for efficiency

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Documentation-only changes that fix a clear bug in GraphQL mutation syntax and add helpful best practices. The mutation fix corrects the approach to use the proper GitHub GraphQL API for replying to review threads, and the added guidelines align with existing project standards.
  • No files require special attention

Important Files Changed

Filename Overview
.claude/commands/update-pull-request.md Fixed GraphQL mutation to use addPullRequestReviewThreadReply with proper variable syntax, replacing the incorrect addPullRequestReviewComment approach
CLAUDE.md Added best practices for code quality, testing, collaboration, and professional communication standards

Last reviewed commit: c69d029

@forstmeier forstmeier merged commit 0a0a2ef into master Feb 18, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Overview Feb 18, 2026
@forstmeier forstmeier deleted the claude-instruction-updates branch February 18, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

markdown Markdown code updates

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants