Skip to content

Conversation

@eugene-manuilov
Copy link
Collaborator

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@eugene-manuilov eugene-manuilov marked this pull request as ready for review January 4, 2026 08:31
Copy link
Collaborator

@aaemnnosttv aaemnnosttv left a comment

Choose a reason for hiding this comment

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

Thanks @eugene-manuilov, this is a good start, just a few things to address and consider.

id: create-pr
uses: peter-evans/create-pull-request@v7
with:
commit-message: Implement issue #${{ inputs.issue_number }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this run our pre-commit checks? If so, the message needs to end in a full-stop, but also what if lint-staged errors are raised? Should we have the prompt attempt a test commit which can be undone at the end so any issues that are raised can be fixed automatically?

Comment on lines +75 to +80
- name: Run /implement command
run: |
gemini --yolo --model gemini-3-pro-preview "/implement ${{ inputs.issue_number }}"
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we can't further restrict the capabilities of the GITHUB_TOKEN here, we should perhaps exclude it since the model should only need read-only access which it should already have as a public repo. If it is needed, perhaps we can provide a PAT with read-only access. Pushing to the repo doesn't happen until the next step anyways so I'd think this should be ok.


3. **Re-run Verification**
- Run linting: !{npm run lint:js}
- Run tests for affected files
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we manually run lint-staged? This can cause failures that might not be triggered by a normal lint run due to incremental rules that are added here. This applies to other places we run linting too, not just here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question, let's probably see how it works when i run it as a GitHub workflow, and then if we see problems, i'll update it, ok?

Comment on lines 37 to 38
1. Use GitHub MCP tools to fetch issue #{{args}} from repository `google/site-kit-wp`
- If MCP tools are not available, use: !{gh issue view {{args}} --repo google/site-kit-wp --json title,body}
Copy link
Collaborator

Choose a reason for hiding this comment

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

GH CLI is already scoped to the current repo in actions, so we can probably exclude this as an argument and even tell it not to pass that. Not sure if it's possible to force externally. See https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-github-cli

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, removed --repo google/site-kit-wp.

Comment on lines +30 to +34
═══════════════════════════════════════════════════════════════════════════════
PHASE 1: FETCH GITHUB ISSUE
═══════════════════════════════════════════════════════════════════════════════

**Objective**: Retrieve the issue details and extract implementation instructions
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would probably be better to handle as a step and provide as an input rather than having the model do it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a slash command that we can use locally as well. If we expect it to have IB passed as an argument, then it will be less convenient to use it locally.


2. Extract the "Implementation Brief" section from the issue body
- This section typically appears between "## Implementation Brief" and "## QA Brief"
- If the section markers are not present, use the entire issue body as the implementation task
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't do this since the body can contain details that aren't relevant, are out of date. If the issue is malformed, then it should stop.

We should actually provide the AC as well, not just the IB since the AC are more important overarching rules.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

CRITICAL INSTRUCTIONS
═══════════════════════════════════════════════════════════════════════════════

- You MUST ACTUALLY CREATE, MODIFY, and DELETE files in the repository
Copy link
Collaborator

Choose a reason for hiding this comment

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

"in the repository" could mean remotely, where I think we mean locally, in the checked out repository / working directory. We don't want the model to make any changes in the actual repository. This is mentioned below too but we should avoid any ambiguity about this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

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