feat(ai): /pull-request skill — open a PR + trigger Copilot review, hand merge to the user#259
feat(ai): /pull-request skill — open a PR + trigger Copilot review, hand merge to the user#259rbuergi wants to merge 2 commits into
Conversation
…and merge to the user A MeshWeaver.AI Skill node that codifies the ship-a-branch-as-a-PR workflow for a coding agent working in a GitWorkingTree: build green with CI flags FIRST (sync with main, Release/-warnaserror, affected tests), commit + push, open the PR, request the GitHub Copilot review via the REST API, wait for CI green, triage the review — then STOP and hand the merge to the user (the human approval gate). Mirrors the Claude Code pullrequest workflow + the repo's git-workflow rules; part of the "steer development from the MeshWeaver instance" loop (thread → worktree → branch → PR). Adds "pull-request" to SkillNodeTypeTest's expected skill set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new built-in MeshWeaver.AI slash-skill, /pull-request, documenting the expected “ship work as a PR” workflow (build green locally, open PR, request Copilot review, wait for CI), and updates the skill catalog test to include the new skill ID.
Changes:
- Added
src/MeshWeaver.AI/Data/Skill/pull-request.mddefining the/pull-requestSkill node and its workflow guidance. - Updated
SkillNodeTypeTestto assert the built-in skill catalog includespull-request.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/MeshWeaver.AI.Test/SkillNodeTypeTest.cs | Extends expected built-in skill IDs to include pull-request. |
| src/MeshWeaver.AI/Data/Skill/pull-request.md | New /pull-request skill instructions describing the PR + Copilot-review workflow and merge boundary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 3. **Run the affected tests** once (`dotnet test <project> --no-restore` — always restore a fresh | ||
| worktree first, or `--no-restore` silently runs zero tests). Never `Task.Delay` to wait; assert | ||
| on the condition. Read [Writing Tests](@/Doc/Architecture/WritingTests). |
| Never commit or push on your own initiative — wait for the explicit "ship it" / "open a PR". Then | ||
| commit through the working tree: `GitWorkingTreeService.CommitAndPush(userId, repoSlug, message, | ||
| branch)` (or `git add -A && git commit` in the worktree). End the commit message with the required | ||
| trailer: | ||
|
|
||
| ``` | ||
| Co-Authored-By: <your agent identity> | ||
| ``` |
| ```bash | ||
| git push -u origin <branch> | ||
| gh pr create --base main --head <branch> --title "…" --body "…" # ends the body with the Generated-with trailer | ||
| ``` |
Test Results (shard 1)839 tests +130 664 ✅ +129 3m 33s ⏱️ + 1m 27s Results for commit 27bfaeb. ± Comparison against base commit 58e5b3c. This pull request removes 28 and adds 158 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Test Results 56 files ± 0 56 suites ±0 20m 44s ⏱️ + 1m 0s Results for commit 27bfaeb. ± Comparison against base commit 58e5b3c. This pull request removes 28 and adds 202 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
…aver" - pull-request skill: sharpen the --no-restore note (fresh-worktree zero-tests case), soften the commit-trailer wording to "the repo's convention", drop the undefined "Generated-with trailer". - New Doc/Architecture/DevelopingFromMeshWeaver.md: the thread → worktree → /code → /pull-request → you-merge loop, the green-before-merge gate, and how the GitHub issues/PRs/webhooks integration fits. Links verified by DocumentationLinkIntegrityTest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks @copilot — all three addressed in 27bfaeb:
Also added |
Summary
Adds a
/pull-requestMeshWeaver.AI Skill node — the "ship a branch as a reviewed PR" step of the steer-development-from-MeshWeaver loop (thread → worktree → branch → PR).It codifies the workflow this very PR follows:
main,Release -warnaserror, affected tests) — never discover red on CI.Grounded in
GitWorkingTreeService(per-agent worktrees) + the GitHub PR backend from #247, and the repo's git-workflow rules.SkillNodeTypeTestupdated to includepull-request.Testing
SkillNodeTypeTest+SkillAutocompleteTestgreen (10/10) — the skill embeds and parses.🤖 Generated with Claude Code