Skip to content

feat(skills): Add shepherd-prs skill for managing approved external contributor PRs#188534

Merged
auto-submit[bot] merged 13 commits into
flutter:masterfrom
harryterkelsen:land-shepherd-prs
Jun 30, 2026
Merged

feat(skills): Add shepherd-prs skill for managing approved external contributor PRs#188534
auto-submit[bot] merged 13 commits into
flutter:masterfrom
harryterkelsen:land-shepherd-prs

Conversation

@harryterkelsen

Copy link
Copy Markdown
Contributor

Description

This Pull Request adds the shepherd-prs skill to the repository. The skill is designed to help agentic coding assistants automate the shepherding and landing of approved third-party Pull Requests in the flutter/flutter repository.

Under the hood, it utilizes a self-contained, type-safe Dart command-line tool (scripts/shepherd.dart) that interacts with the GitHub and LUCI APIs via the gh CLI. It identifies approved PRs, checks their CI health and branch states, and performs necessary maintenance tasks (like branch updates and CI trigger re-runs) before safe integration.


Skill Usage Examples

Below are examples of user prompts, the agent's internal tool executions, and the resulting outputs:

Example 1: Retrieving and Summarizing PR Status

User Prompt:

"What is the status of my approved PRs?"

Agent Execution:
The agent loads the skill, executes the read-only list command, and parses the JSON response:

dart .agents/skills/shepherd-prs/scripts/shepherd.dart list

Agent Response:

You have 1 approved third-party PR requiring shepherding:

Would you like me to execute the branch update for PR #186254?


Example 2: Running Shepherding on a Specific PR

User Prompt:

"Yes, please update the branch for PR #186254."

Agent Execution:
Upon receiving explicit user confirmation, the agent runs the execution command:

dart .agents/skills/shepherd-prs/scripts/shepherd.dart run --pr 186254

Agent Response:

I have successfully triggered the branch update for PR #186254 (was behind by 52 commits). I will monitor the PR and let you know when the update is complete and CI starts running.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 24, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@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 adds a shepherding skill and a self-contained Dart script (shepherd.dart) to automate updating and landing approved third-party pull requests in the flutter/flutter repository. The review feedback recommends passing the dynamic default branch name to the branch comparison API instead of hardcoding main. Additionally, the feedback suggests storing the head SHA directly in the PullRequest object to eliminate redundant sequential API calls when syncing state, which also allows the removal of the unused getPrHeadSha helper.

Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart Outdated
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart Outdated
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart
Comment thread .agents/skills/shepherd-prs/scripts/shepherd.dart Outdated
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 25, 2026
@Piinks Piinks added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jun 29, 2026

@reidbaker reidbaker 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.

I see you have authored shepherd.dart as a script with no dependencies. Given we are still experimenting with standards lets land this using the structure you have defined. I think long term we will required that skills use a dart package (that has documentation, tests, dependencies and dependency management, analysis options etc) but this will be a good experiment.

Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
* Due to GitHub App permission policies, third-party check runs (such as LUCI checks created by `flutter-dashboard`) cannot be re-run via the API.
* When a PR has failed checks, the tool will log a warning instructing you to ask the user to manually trigger the re-run via the GitHub web UI.
* **Action**:
1. Print the warning and link the user to the PR on GitHub, asking them to click the "Re-run" button for the failed check.

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.

This works until @ievdokdm lands his change to where reruns happen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not aware of those upcoming changes but if they allow re-running the tests via the GitHub API that would be amazing

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.

If you look at recent prs you can no longer click rerun on the tasks in github. https://github.com/flutter/flutter/pull/188803/checks?check_run_id=84358870694

There is now a dashboard checker that looks at the flutter dashboard.

Comment thread .agents/skills/shepherd-prs/SKILL.md Outdated
Comment thread .agents/skills/shepherd-prs/SKILL.md
@github-actions github-actions Bot removed the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jun 30, 2026
@harryterkelsen harryterkelsen added c: contributor-productivity Team-specific productivity, code health, technical debt. CICD Run CI/CD labels Jun 30, 2026
@harryterkelsen

Copy link
Copy Markdown
Contributor Author

I see you have authored shepherd.dart as a script with no dependencies. Given we are still experimenting with standards lets land this using the structure you have defined. I think long term we will required that skills use a dart package (that has documentation, tests, dependencies and dependency management, analysis options etc) but this will be a good experiment.

I actually had it structured as a dart package (with a package:args dependency and tests) but put it into a standalone file to match what we had for the other skills in our repo.

@harryterkelsen

Copy link
Copy Markdown
Contributor Author

Thanks @reidbaker! PTAL

@github-actions github-actions Bot removed the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jun 30, 2026
@harryterkelsen
harryterkelsen requested a review from reidbaker June 30, 2026 17:54
@harryterkelsen harryterkelsen added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jun 30, 2026
reidbaker
reidbaker previously approved these changes Jun 30, 2026

@reidbaker reidbaker 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.

Approved to get this in the hands of contributors.

There are still improvements I would make to this skill but I dont want to block this any longer and I am gone next week.

Comment thread .agents/skills/shepherd-prs/scripts/README.md
Merged via the queue into flutter:master with commit c13f525 Jun 30, 2026
64 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 30, 2026
This was referenced Jul 1, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jul 8, 2026
…12135)

Manual roll Flutter from ca9f874f5284 to 6995038d96ef (44 revisions)

Manual roll requested by [email protected]

flutter/flutter@ca9f874...6995038

2026-07-03 [email protected] Roll Fuchsia Linux SDK from sx_eN0J_f2BV6jqjW... to Jr08vyeibMSv3Oxst... (flutter/flutter#188946)
2026-07-03 [email protected] Roll Packages from 420e135 to 2fbe873 (1 revision) (flutter/flutter#188945)
2026-07-03 [email protected] Roll Dart SDK from 786212a2ce0d to 1f9a08ce0638 (4 revisions) (flutter/flutter#188944)
2026-07-03 [email protected] Roll Skia from 5358ab75b840 to 919956953af6 (7 revisions) (flutter/flutter#188943)
2026-07-02 [email protected] [Windows] Keep regular windows in place when another is activated (flutter/flutter#188016)
2026-07-02 [email protected] [flutter_tools] Provide guided message when iOS/macOS build fails due to low minimum version (flutter/flutter#188812)
2026-07-02 [email protected] [Flutter GPU] Load a ShaderLibrary from shader bundle bytes (flutter/flutter#188596)
2026-07-02 [email protected] [tool] Enable record_use experiment by default on all channels (flutter/flutter#188887)
2026-07-02 [email protected] Roll Packages from e742106 to 420e135 (13 revisions) (flutter/flutter#188916)
2026-07-02 [email protected] Roll Fuchsia Linux SDK from I2h2eXk06RrA3pIG2... to sx_eN0J_f2BV6jqjW... (flutter/flutter#188915)
2026-07-02 [email protected] Clarify layout callback debug flag docs (flutter/flutter#186879)
2026-07-02 [email protected] Roll Skia from 0c4faca350cc to 5358ab75b840 (2 revisions) (flutter/flutter#188899)
2026-07-02 [email protected] Roll Dart SDK from e47361c7fe9a to 786212a2ce0d (2 revisions) (flutter/flutter#188898)
2026-07-01 [email protected] Roll Skia from 0fc8ba72e802 to 0c4faca350cc (2 revisions) (flutter/flutter#188886)
2026-07-01 [email protected] Hide draft PRs from the triage list (flutter/flutter#188885)
2026-07-01 [email protected] Stricten isSemantics and matchesSemantics children mismatch check (flutter/flutter#188827)
2026-07-01 [email protected] [AGP 9] Support Enabling Built-in Kotlin (flutter/flutter#188543)
2026-07-01 [email protected] Roll Skia from d19e557ac317 to 0fc8ba72e802 (4 revisions) (flutter/flutter#188879)
2026-07-01 [email protected] [ci] Increase test timeout for Mac_x64 build_tests shards (flutter/flutter#188804)
2026-07-01 [email protected] Roll Skia from bd4ae38ca3bb to d19e557ac317 (1 revision) (flutter/flutter#188865)
2026-07-01 [email protected] Roll Dart SDK from 26d723eb89af to e47361c7fe9a (5 revisions) (flutter/flutter#188864)
2026-07-01 [email protected] Update triage links for material_ui and cupertino_ui --> Design triage (flutter/flutter#188567)
2026-07-01 [email protected] [Impeller] Share a single ContextGLES among all PlaygroundImplGLES (flutter/flutter#188080)
2026-07-01 [email protected] Use null-aware elements in dev/devicelab/lib/integration_tests.dart (flutter/flutter#187852)
2026-07-01 [email protected] Roll Packages from 274ed3e to e742106 (18 revisions) (flutter/flutter#188863)
2026-07-01 [email protected] Add android 17 to embedding (flutter/flutter#187965)
2026-07-01 [email protected] Adds semantics role check to isSemantics and matchesSemantics (flutter/flutter#188825)
2026-07-01 [email protected] Roll Dart SDK from e1bdb9ce3327 to 26d723eb89af (3 revisions) (flutter/flutter#188795)
2026-07-01 [email protected] [web] Apply autocapitalize to text editing elements (flutter/flutter#188351)
2026-07-01 [email protected] Roll Fuchsia Linux SDK from RymJjIj7dd5vQ3Cnh... to I2h2eXk06RrA3pIG2... (flutter/flutter#188852)
2026-07-01 [email protected] [Impeller] Compute dispatch takes 3D workgroup counts and honors the shader local_size (flutter/flutter#188601)
2026-07-01 [email protected] Improve stylus support on linux (flutter/flutter#186831)
2026-07-01 [email protected] Resolve issue  Catch am start failures with 'Error type' and prevent hang (flutter/flutter#187196)
2026-07-01 [email protected] Roll Skia from ef178c9898af to bd4ae38ca3bb (3 revisions) (flutter/flutter#188834)
2026-07-01 [email protected] Roll Skia from 3ac99be47229 to ef178c9898af (3 revisions) (flutter/flutter#188831)
2026-07-01 [email protected] Add a macosArm64Only feature flag (flutter/flutter#188598)
2026-07-01 [email protected] Roll Skia from 15302f1625b2 to 3ac99be47229 (1 revision) (flutter/flutter#188819)
2026-07-01 [email protected] [flutter_tools] Track asset transformer dependencies for hot reload (Reland #187947) (flutter/flutter#188808)
2026-06-30 [email protected] Add TapRegion samples (flutter/flutter#188685)
2026-06-30 [email protected] Print a warning in `flutter doctor` when running on Intel Macs (flutter/flutter#188760)
2026-06-30 [email protected] [framework] Keep scrollable semantics role stable (flutter/flutter#187963)
2026-06-30 [email protected] feat(skills): Add shepherd-prs skill for managing approved external contributor PRs (flutter/flutter#188534)
2026-06-30 [email protected] Roll Skia from 71947c4110b0 to 15302f1625b2 (17 revisions) (flutter/flutter#188815)
2026-06-30 [email protected] [Tool] Run re-entrant upgrade in original CWD (flutter/flutter#188794)
...
kalyujniy pushed a commit to brickit-app/camera that referenced this pull request Jul 8, 2026
…lutter#12135)

Manual roll Flutter from ca9f874f5284 to 6995038d96ef (44 revisions)

Manual roll requested by [email protected]

flutter/flutter@ca9f874...6995038

2026-07-03 [email protected] Roll Fuchsia Linux SDK from sx_eN0J_f2BV6jqjW... to Jr08vyeibMSv3Oxst... (flutter/flutter#188946)
2026-07-03 [email protected] Roll Packages from 420e135 to 2fbe873 (1 revision) (flutter/flutter#188945)
2026-07-03 [email protected] Roll Dart SDK from 786212a2ce0d to 1f9a08ce0638 (4 revisions) (flutter/flutter#188944)
2026-07-03 [email protected] Roll Skia from 5358ab75b840 to 919956953af6 (7 revisions) (flutter/flutter#188943)
2026-07-02 [email protected] [Windows] Keep regular windows in place when another is activated (flutter/flutter#188016)
2026-07-02 [email protected] [flutter_tools] Provide guided message when iOS/macOS build fails due to low minimum version (flutter/flutter#188812)
2026-07-02 [email protected] [Flutter GPU] Load a ShaderLibrary from shader bundle bytes (flutter/flutter#188596)
2026-07-02 [email protected] [tool] Enable record_use experiment by default on all channels (flutter/flutter#188887)
2026-07-02 [email protected] Roll Packages from e742106 to 420e135 (13 revisions) (flutter/flutter#188916)
2026-07-02 [email protected] Roll Fuchsia Linux SDK from I2h2eXk06RrA3pIG2... to sx_eN0J_f2BV6jqjW... (flutter/flutter#188915)
2026-07-02 [email protected] Clarify layout callback debug flag docs (flutter/flutter#186879)
2026-07-02 [email protected] Roll Skia from 0c4faca350cc to 5358ab75b840 (2 revisions) (flutter/flutter#188899)
2026-07-02 [email protected] Roll Dart SDK from e47361c7fe9a to 786212a2ce0d (2 revisions) (flutter/flutter#188898)
2026-07-01 [email protected] Roll Skia from 0fc8ba72e802 to 0c4faca350cc (2 revisions) (flutter/flutter#188886)
2026-07-01 [email protected] Hide draft PRs from the triage list (flutter/flutter#188885)
2026-07-01 [email protected] Stricten isSemantics and matchesSemantics children mismatch check (flutter/flutter#188827)
2026-07-01 [email protected] [AGP 9] Support Enabling Built-in Kotlin (flutter/flutter#188543)
2026-07-01 [email protected] Roll Skia from d19e557ac317 to 0fc8ba72e802 (4 revisions) (flutter/flutter#188879)
2026-07-01 [email protected] [ci] Increase test timeout for Mac_x64 build_tests shards (flutter/flutter#188804)
2026-07-01 [email protected] Roll Skia from bd4ae38ca3bb to d19e557ac317 (1 revision) (flutter/flutter#188865)
2026-07-01 [email protected] Roll Dart SDK from 26d723eb89af to e47361c7fe9a (5 revisions) (flutter/flutter#188864)
2026-07-01 [email protected] Update triage links for material_ui and cupertino_ui --> Design triage (flutter/flutter#188567)
2026-07-01 [email protected] [Impeller] Share a single ContextGLES among all PlaygroundImplGLES (flutter/flutter#188080)
2026-07-01 [email protected] Use null-aware elements in dev/devicelab/lib/integration_tests.dart (flutter/flutter#187852)
2026-07-01 [email protected] Roll Packages from 274ed3e to e742106 (18 revisions) (flutter/flutter#188863)
2026-07-01 [email protected] Add android 17 to embedding (flutter/flutter#187965)
2026-07-01 [email protected] Adds semantics role check to isSemantics and matchesSemantics (flutter/flutter#188825)
2026-07-01 [email protected] Roll Dart SDK from e1bdb9ce3327 to 26d723eb89af (3 revisions) (flutter/flutter#188795)
2026-07-01 [email protected] [web] Apply autocapitalize to text editing elements (flutter/flutter#188351)
2026-07-01 [email protected] Roll Fuchsia Linux SDK from RymJjIj7dd5vQ3Cnh... to I2h2eXk06RrA3pIG2... (flutter/flutter#188852)
2026-07-01 [email protected] [Impeller] Compute dispatch takes 3D workgroup counts and honors the shader local_size (flutter/flutter#188601)
2026-07-01 [email protected] Improve stylus support on linux (flutter/flutter#186831)
2026-07-01 [email protected] Resolve issue  Catch am start failures with 'Error type' and prevent hang (flutter/flutter#187196)
2026-07-01 [email protected] Roll Skia from ef178c9898af to bd4ae38ca3bb (3 revisions) (flutter/flutter#188834)
2026-07-01 [email protected] Roll Skia from 3ac99be47229 to ef178c9898af (3 revisions) (flutter/flutter#188831)
2026-07-01 [email protected] Add a macosArm64Only feature flag (flutter/flutter#188598)
2026-07-01 [email protected] Roll Skia from 15302f1625b2 to 3ac99be47229 (1 revision) (flutter/flutter#188819)
2026-07-01 [email protected] [flutter_tools] Track asset transformer dependencies for hot reload (Reland #187947) (flutter/flutter#188808)
2026-06-30 [email protected] Add TapRegion samples (flutter/flutter#188685)
2026-06-30 [email protected] Print a warning in `flutter doctor` when running on Intel Macs (flutter/flutter#188760)
2026-06-30 [email protected] [framework] Keep scrollable semantics role stable (flutter/flutter#187963)
2026-06-30 [email protected] feat(skills): Add shepherd-prs skill for managing approved external contributor PRs (flutter/flutter#188534)
2026-06-30 [email protected] Roll Skia from 71947c4110b0 to 15302f1625b2 (17 revisions) (flutter/flutter#188815)
2026-06-30 [email protected] [Tool] Run re-entrant upgrade in original CWD (flutter/flutter#188794)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants