Skip to content

docs: clarify placeholder convention in resolve-pr-threads skill#42

Merged
JacobPEvans merged 3 commits into
mainfrom
docs/clarify-placeholder-convention
Feb 16, 2026
Merged

docs: clarify placeholder convention in resolve-pr-threads skill#42
JacobPEvans merged 3 commits into
mainfrom
docs/clarify-placeholder-convention

Conversation

@JacobPEvans
Copy link
Copy Markdown
Owner

@JacobPEvans JacobPEvans commented Feb 16, 2026

Summary

Standardizes all placeholders to camelCase convention ({owner}, {repo}, {number}, {threadId}) throughout the resolve-pr-threads skill to prevent AI agents from confusing template placeholders with GraphQL $variable syntax.

Problem

AI agents were writing incorrect GraphQL queries like:

gh api graphql --raw-field 'query=mutation($threadId: ID!) { ... }'

This fails because --raw-field sends queries as-is without variable processing. The SCREAMING_CASE placeholders ({OWNER}, {REPO}) looked like shell environment variables, leading AIs to reach for GraphQL's $variable syntax instead of direct string substitution.

Solution

  • Adopted GitHub's convention: gh api itself uses camelCase placeholders like {owner}, {repo}, {branch} (see gh api manual)
  • Added Placeholder Convention section with:
    • Table of all placeholders with types, example values, and sources
    • WRONG/CORRECT examples showing the mistake vs the fix
    • Explicit warning: "Do NOT use GraphQL $variable syntax with --raw-field"
  • Updated all files to use consistent camelCase naming
  • Removed shell inference blocks from query templates (kept only in orchestrator where appropriate)

Files Changed

  • github-workflows/skills/resolve-pr-threads/graphql-queries.md - Added convention section, updated all placeholders
  • github-workflows/skills/resolve-pr-threads/SKILL.md - Added warning bullet, updated placeholders
  • github-workflows/skills/resolve-pr-threads/rest-api-patterns.md - Added cross-reference, updated all placeholders
  • github-workflows/skills/finalize-prs/SKILL.md - Updated {TIMESTAMP} to {timestamp}

Test Plan

  • markdownlint-cli2 passes on all modified files
  • Grep confirms no SCREAMING_CASE template placeholders remain
  • Resolve thread mutation section provides clear, unambiguous guidance
  • Placeholder Convention section has comprehensive table with sources
  • WRONG/CORRECT examples explicitly demonstrate the mistake to avoid

Impact

Low risk - Documentation-only change. The skill functionality remains identical; only the documentation format has been clarified to prevent AI misinterpretation.

🤖 Generated with Claude Code


Important

Standardizes placeholder conventions to camelCase in resolve-pr-threads documentation to prevent AI misinterpretation.

  • Placeholder Convention:
    • Standardizes all placeholders to camelCase ({owner}, {repo}, {number}, {threadId}) across resolve-pr-threads skill.
    • Adds a "Placeholder Convention" section in graphql-queries.md with a table of placeholders, types, example values, and sources.
    • Provides WRONG/CORRECT examples to illustrate proper usage.
  • Documentation Updates:
    • Updates graphql-queries.md, SKILL.md, and rest-api-patterns.md in resolve-pr-threads to reflect camelCase placeholders.
    • Adds explicit warning against using GraphQL $variable syntax with --raw-field.
    • Updates SKILL.md in finalize-prs to change {TIMESTAMP} to {timestamp}.
  • Misc:
    • Removes shell inference blocks from query templates, retaining them only in orchestrator where appropriate.

This description was created by Ellipsis for 33de8e2. You can customize this summary. It will automatically update as commits are pushed.

…ntion

Resolves AI confusion between template placeholders and GraphQL variables
by adopting GitHub's own `gh api` camelCase convention ({owner}, {repo},
{number}, {threadId}) instead of SCREAMING_CASE ({OWNER}, {REPO}, etc.).

Changes:
- Add "Placeholder Convention" section in graphql-queries.md with:
  * Table of all placeholders with types, example values, and sources
  * WRONG/CORRECT examples showing GraphQL $variable vs string substitution
  * Explicit warning against using GraphQL $variable syntax with --raw-field
- Update all skill files to use camelCase placeholders
- Remove shell variable inference blocks from query templates (keep in orchestrator only)
- Add cross-references to placeholder convention from related files
- Update parameter tables and examples to match new convention

Files modified:
- github-workflows/skills/resolve-pr-threads/graphql-queries.md
- github-workflows/skills/resolve-pr-threads/SKILL.md
- github-workflows/skills/resolve-pr-threads/rest-api-patterns.md
- github-workflows/skills/finalize-prs/SKILL.md

Verification:
- markdownlint-cli2: all files pass
- No SCREAMING_CASE template placeholders remain (grep verified)
- Resolve thread mutation section provides clear guidance on substitution

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 16, 2026 10:21
Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 33de8e2 in 8 seconds. Click for details.
  • Reviewed 309 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_JUFld6cW1CsfyktJ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @JacobPEvans, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the clarity and consistency of documentation within the resolve-pr-threads skill, primarily by standardizing placeholder conventions. The change addresses a problem where AI agents were misinterpreting template placeholders as GraphQL variables, leading to incorrect query generation. By adopting camelCase for all placeholders and providing explicit instructions on direct string substitution, the documentation now offers unambiguous guidance, ensuring more reliable interaction with the GitHub API for automated processes.

Highlights

  • Placeholder Convention Standardization: Standardized all documentation placeholders to camelCase (e.g., {owner}, {repo}, {number}, {threadId}) across the resolve-pr-threads skill to align with GitHub's gh api convention and prevent AI agent misinterpretation.
  • Clarified GraphQL Query Substitution: Added explicit guidance and examples in graphql-queries.md demonstrating the critical need for direct string substitution for placeholders, explicitly warning against using GraphQL $variable syntax with --raw-field.
  • Documentation Enhancements: Introduced a comprehensive 'Placeholder Convention' section with a table of placeholders, types, example values, and sources. Also, removed shell inference blocks from query templates to simplify examples.
  • Consistency Across Skills: Updated a timestamp placeholder in the finalize-prs skill to camelCase for overall consistency.
Changelog
  • github-workflows/skills/finalize-prs/SKILL.md
    • Updated placeholder {TIMESTAMP} to {timestamp} for consistency.
  • github-workflows/skills/resolve-pr-threads/SKILL.md
    • Added a critical warning regarding direct string substitution for placeholders.
    • Standardized placeholders in REST API examples to camelCase.
    • Updated output format placeholders to camelCase.
  • github-workflows/skills/resolve-pr-threads/graphql-queries.md
    • Introduced a new 'Placeholder Convention' section detailing camelCase usage.
    • Provided explicit WRONG/CORRECT examples for placeholder substitution to guide AI agents.
    • Removed shell inference blocks from GraphQL query examples to simplify documentation.
    • Standardized all GraphQL query placeholders to camelCase.
  • github-workflows/skills/resolve-pr-threads/rest-api-patterns.md
    • Added a cross-reference to the new placeholder convention documentation.
    • Standardized all REST API command placeholders and example variable names to camelCase.
    • Updated error table to reflect camelCase placeholder for commentId.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of standardizing placeholders to camelCase to improve clarity and prevent confusion for AI agents. The added documentation about direct string substitution versus GraphQL variables is also very helpful. I've added a couple of suggestions to further improve consistency by aligning shell variable names in examples with the new camelCase placeholder convention across the documentation files. Overall, these are excellent improvements to the skill's documentation.

Comment thread github-workflows/skills/resolve-pr-threads/graphql-queries.md Outdated
Comment thread github-workflows/skills/resolve-pr-threads/rest-api-patterns.md Outdated
Copy link
Copy Markdown

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 standardizes placeholder naming conventions in GraphQL query documentation from SCREAMING_CASE to camelCase (e.g., {OWNER}{owner}, {REPO}{repo}), aligning with GitHub's gh api convention. The primary goal is to prevent AI agents from confusing template placeholders with GraphQL $variable syntax, which causes type coercion errors when used with --raw-field.

Changes:

  • Added comprehensive "Placeholder Convention" section with table, examples, and explicit warnings against GraphQL $variable syntax
  • Updated all template placeholders to camelCase across resolve-pr-threads and finalize-prs skills
  • Removed shell context inference blocks from query templates (kept only in orchestrator)

Reviewed changes

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

File Description
github-workflows/skills/resolve-pr-threads/graphql-queries.md Added Placeholder Convention section with WRONG/CORRECT examples; updated all placeholders to camelCase; removed context inference blocks
github-workflows/skills/resolve-pr-threads/rest-api-patterns.md Added cross-reference to placeholder convention; updated all placeholders and examples to camelCase
github-workflows/skills/resolve-pr-threads/SKILL.md Added warning about direct string substitution; updated placeholders in REST API pattern and output format
github-workflows/skills/finalize-prs/SKILL.md Updated {TIMESTAMP} to {timestamp} for consistency

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

Comment thread github-workflows/skills/resolve-pr-threads/graphql-queries.md Outdated
Improves consistency with the camelCase placeholder convention by renaming
shell variables in code examples to match their corresponding placeholders:
- THREAD_ID -> threadId (matches {threadId} placeholder)
- thread_id -> threadId
- comment_id -> commentId (matches {commentId} placeholder)

This makes the examples clearer and reinforces the camelCase convention
throughout the documentation.

Addresses review feedback from gemini-code-assist.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@JacobPEvans
Copy link
Copy Markdown
Owner Author

Re: copilot-pull-request-reviewer's feedback on graphql-queries.md:53-54

Thank you for catching this inconsistency! However, this concern was already addressed in commit 463a054, which standardized ALL shell variables to camelCase across both files:

graphql-queries.md (this file):

  • threadId="PRRT_kwDO..." (line 53)

rest-api-patterns.md:

  • owner=... (not OWNER)
  • repo=... (not REPO)
  • number=... (not NUMBER)
  • threadId=... (not thread_id)
  • commentId=... (not comment_id)

Rationale: Shell variables now match the camelCase placeholder convention ({owner}, {repo}, {threadId}, {commentId}), making it clearer that shell variables should use the same naming as their corresponding placeholders.

Note: Compound words like threads_json use snake_case as that's idiomatic bash style for multi-word variable names.

Commit 463a054 applied this consistently throughout both files.

AI agents already have full context and don't need to save output to files.
Removed the instruction to save JSON reports to /tmp/ directory.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@JacobPEvans JacobPEvans merged commit f8753af into main Feb 16, 2026
5 checks passed
@JacobPEvans JacobPEvans deleted the docs/clarify-placeholder-convention branch February 16, 2026 10:36
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.

2 participants