Skip to content

Add command lists, checks and rules to the agent skills - #14154

Open
shervElmi wants to merge 6 commits into
developfrom
infrastructure/agent-skills-tools-checks-rules
Open

shervElmi wants to merge 6 commits into
developfrom
infrastructure/agent-skills-tools-checks-rules

Conversation

@shervElmi

@shervElmi shervElmi commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Related issue(s):

  • None.

Relevant technical choices

  • Each skill's allowed-tools gave Bash, which let it run any shell command without asking. It now lists the commands the skill runs, so any other command, such as a push, asks first.
  • Each GitHub read names google/site-kit-wp, so it reads this repository from a checkout whose origin is a fork. Each gh api call passes --method GET, because allowed-tools allows gh api only with that flag, so a write still asks.
  • Each paragraph the change edits is now one line, because Markdown wraps it on screen. The other paragraphs keep their breaks. git diff --word-diff shows the words that changed in a joined paragraph.
  • AGENTS.md gives the test commands of implement-issue in place of npm run test, which runs Jest in watch mode and never ends.
  • write-implementation-brief and write-issue-requirements each get the same four writing rules, because a tool loads only the skill that runs.

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.

`check-pr-failures` and `write-context-doc` list only the commands they run, so any other command asks first.

Each `gh` call of `check-pr-failures` names `google/site-kit-wp`, so it works in a checkout whose remote is a fork. Its `gh api` calls pass `--method GET`, which its list allows.

`AGENTS.md` gives the test commands of `implement-issue`, which run the tests of the changed files and end. `npm run test` runs Jest in watch mode, which never ends.
The skill runs the type check, the style lint and PHPStan on the files it changed, and the tests of each caller. Its fixers change those files alone.

It checks a change in Storybook, in place of a hand-made copy of the styles. It fixes the code rather than the check, and reads why code was written before it changes that code.

It lists only the commands it runs, and each GitHub read names the repository.
The review reads each changed file as the pull request has it, with the code that calls it. It takes lint and test results from the CI checks of the pull request.

It reports a finding only where the code gives a wrong result, misses a stated need or breaks a written team rule. Each finding names the input and the line.

A brief item built another way is a finding only where it breaks a criterion, removes what the code relies on or adds a risk. Any other such difference needs its reason in the pull request, or the review asks the author for it.

Its checklist asks for the checks CI runs, and for checks kept as strict. It lists only the commands it runs, and each GitHub read names the repository.
A brief keeps each sentence to 25 words, writes the verb in place of a noun made from it, and gives each thing one name. It states each fact as checked in the code.

An update of a brief already on the issue keeps each name, value, path, link and scope line, or says why one went.

A Test Coverage line that says nothing is needed comes after the lines that add tests, in one line with no reason.

The skill lists only the commands it runs, and each GitHub read names the repository.
Its criteria cover each state and reader the change reaches, such as loading, an error and a view-only user. They say a shared condition once.

Before it writes an issue, the skill searches GitHub for one already filed on the same problem.

Its steps to reproduce undo what an earlier visit changed. Its reply names user-facing copy, journeys or experiences that no design gives, for the Product Manager to approve.

It takes the sentence, verb, name and fact rules of `write-implementation-brief`. It lists only the commands it runs, and each GitHub read names the repository.

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

Copy link
Copy Markdown
Contributor

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 updates the agent skill definition files and AGENTS.md to restrict allowed Bash commands to specific patterns, enforce the use of the --repo flag for GitHub CLI commands, and refine instructions for issue implementation, PR reviews, and brief writing. The review feedback correctly points out that several essential Git, npm, and Composer commands are missing from the allowed-tools lists in the check-pr-failures and implement-issue skills, offering concrete suggestions to include them.

Comment thread .agents/skills/implement-issue/SKILL.md Resolved
The skill reruns a failing JS or PHP test locally to reproduce it.

This branch has not been deployed

No deployments
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.

1 participant