Skip to content

fix(finalize-pr): remove pre-PR steps from workflow diagram#76

Merged
JacobPEvans merged 2 commits intomainfrom
fix/finalize-pr-remove-pre-pr-steps
Mar 6, 2026
Merged

fix(finalize-pr): remove pre-PR steps from workflow diagram#76
JacobPEvans merged 2 commits intomainfrom
fix/finalize-pr-remove-pre-pr-steps

Conversation

@JacobPEvans
Copy link
Owner

Summary

  • Removes /init-worktree → [implement] → gh pr create → prefix from the Single PR workflow diagram
  • Adds a clear note that this skill requires a PR to already exist
  • Prevents AI agents from recommending /finalize-pr at the commit/PR-creation stage

Test plan

  • Verify AI no longer suggests /finalize-pr when asked to commit and open a PR
  • Verify skill description still accurately describes post-PR finalization flow

🤖 Generated with Claude Code

The workflow section showed /init-worktree, implementation, and gh pr create
steps before /finalize-pr, causing AI to recommend this skill at the point
of committing and opening a PR. The skill only applies post-PR-creation.

(claude)
Copilot AI review requested due to automatic review settings March 6, 2026 11:39
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 refines the documentation for the /finalize-pr skill by streamlining its workflow diagram and adding explicit usage instructions. The primary goal is to clarify that this skill is intended for post-PR finalization, thereby preventing its premature recommendation by AI agents and ensuring users understand its correct application within the development lifecycle.

Highlights

  • Workflow Diagram Simplification: The workflow diagram for the /finalize-pr skill has been updated to remove the initial steps related to worktree initialization and PR creation, focusing solely on the post-PR finalization process.
  • Usage Clarification: A clear note has been added to the documentation, explicitly stating that the /finalize-pr skill should only be used after a pull request already exists.
  • AI Recommendation Prevention: These changes aim to prevent AI agents from incorrectly recommending the /finalize-pr skill at the commit or PR-creation stage, guiding users to the correct usage.
Changelog
  • github-workflows/skills/finalize-pr/SKILL.md
    • Removed pre-PR creation steps from the /finalize-pr workflow diagram.
    • Added a note emphasizing that the /finalize-pr skill requires an existing PR.
    • Updated the diagram's title to "Single PR (PR already created)".
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

@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

The pull request effectively clarifies the usage of the /finalize-pr skill by removing the pre-PR creation steps from the workflow diagram and explicitly stating that the skill should only be used after a pull request has already been created. This change aligns with the objective of preventing AI agents from recommending /finalize-pr at the commit/PR-creation stage and improves the clarity of the documentation.

Note: Security Review has been skipped due to the limited scope of the PR.

@greptile-apps
Copy link

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR tightens the scope of the finalize-pr skill documentation by removing the /init-worktree → [implement] → gh pr create → prefix from the Single PR workflow diagram and adding an explicit prerequisite note, preventing AI agents from incorrectly invoking /finalize-pr at the commit/PR-creation stage.

  • Adds a plain-text note above the workflow block: "Use this skill ONLY after a PR already exists. To create a PR first, use gh pr create."
  • Renames the diagram label from Single PR: to Single PR (PR already created): for added clarity.
  • Reformats the workflow steps to a cleaner left-aligned arrow style, improving readability.
  • No logic, configuration, or executable code is modified — this is a documentation-only change.

Confidence Score: 5/5

  • This PR is safe to merge — it is a documentation-only change with no logic or executable code modified.
  • The change is confined to a single Markdown documentation file, removes misleading context from a workflow diagram, and adds a clear prerequisite note. There is no risk of runtime errors, behavioral regressions, or security concerns.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["PR already exists"] --> B["/finalize-pr [number]"]
    B --> P1["Phase 1: Resolve PR number"]
    P1 --> P2["Phase 2: Resolution Loop (automatic fixes)"]
    P2 --> P3["Phase 3: Pre-Handoff Verification"]
    P3 --> P4["Phase 4: Update PR Metadata"]
    P4 --> P5["Phase 5: Report ready (wait for user)"]
    P5 --> U["User invokes: /squash-merge-pr or /rebase-pr"]

    style A fill:#f9f,stroke:#333,stroke-width:2px
    style B fill:#bbf,stroke:#333
Loading

Last reviewed commit: 95e6b6b

Copy link

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

Updates the /finalize-pr skill documentation to clearly scope the workflow to post-PR usage, removing misleading pre-PR steps from the workflow diagram so agents/users don’t apply it during PR creation.

Changes:

  • Removes the /init-worktree → [implement] → gh pr create → prefix from the “Single PR” workflow diagram.
  • Adds an explicit note that /finalize-pr should be used only after a PR exists.

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

…iagram

Workflow diagram showed only `/finalize-pr [number]` but the skill also
supports no-arg current-branch mode. Updated to show both forms explicitly.

(claude)
@claude
Copy link
Contributor

claude bot commented Mar 6, 2026

Claude finished @JacobPEvans's task in 1m 53s —— View job


PR Review

  • Read changed file and diff
  • Review for correctness and quality
  • Post findings

No issues found. This is a documentation-only change confined to the ## Workflow section of SKILL.md.

The changes are correct and well-scoped:

  • The prerequisite note (Use this skill ONLY after a PR already exists) is clear and actionable
  • Both invocation forms (/finalize-pr and /finalize-pr <PR_NUMBER>) are now shown, addressing the Copilot inline comment already resolved in b85d17f
  • The new left-aligned diagram format is more readable and consistent with the multi-PR sections below it
  • Phase numbering remains sequential integers at the top level, following the CLAUDE.md convention

LGTM.

@JacobPEvans JacobPEvans merged commit 6dca3fc into main Mar 6, 2026
10 checks passed
@JacobPEvans JacobPEvans deleted the fix/finalize-pr-remove-pre-pr-steps branch March 6, 2026 12:25
JacobPEvans added a commit that referenced this pull request Mar 6, 2026
Conflicts resolved:
- AGENTS.md: keep HEAD minimal version (sections duplicated from CLAUDE.md removed)
- content-guards/scripts/validate-markdown.sh: keep short comment, adopt
  --no-must-find-files flag from main (cspell fix)
- git-workflows/skills/init-worktree/SKILL.md: keep deleted (externalized)
- github-workflows/skills/finalize-pr/SKILL.md: take main's diagram (shows
  both invocation modes + multi-PR modes from PR #76)

(claude)
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