一键导入
copilot-review-loop
Use when closing any sub-task/PR in this repo — runs the local Copilot review gate, then the GitHub PR + Copilot reviewer + CI loop until green.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when closing any sub-task/PR in this repo — runs the local Copilot review gate, then the GitHub PR + Copilot reviewer + CI loop until green.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working inside docs-site/ — authoring or editing documentation pages, adding/reordering sidebar navigation, touching docmd plugins (search/git/seo/sitemap/mermaid/math/llms), or keeping the docs in sync with package features. Covers docmd syntax, semantic search, build/verify, and the Cloudflare Pages deploy.
Use when implementing any task in this Laravel package — the strict TDD + both-states + append-only + compose-not-couple cadence the plan mandates.
| name | copilot-review-loop |
| description | Use when closing any sub-task/PR in this repo — runs the local Copilot review gate, then the GitHub PR + Copilot reviewer + CI loop until green. |
The Definition of Done for every sub-task. Do not skip; do not fake.
Shell note: Run from PowerShell (or adapt to Git Bash). Commands below are PowerShell.
# from repo root
git fetch origin
# run tests + mutation coverage (must both pass). Herd PHP is not on PATH → call it explicitly:
$php = "$env:USERPROFILE\.config\herd\bin\php85.bat"
& $php vendor/bin/phpunit
& $php vendor/bin/infection --min-msi=80
# generate FULL branch diff (not just uncommitted changes) and pipe to Copilot
git diff origin/main...HEAD | Out-File "$env:TEMP\branch.diff" -Encoding utf8
copilot --autopilot --yolo -p "/review the changes in $env:TEMP\branch.diff for the laravel-ai-guardrails package. Focus on security posture, untrusted-input handling, append-only invariants, and test coverage."
Git Bash equivalent:
DIFF="${TMPDIR:-/tmp}/branch.diff"
git diff origin/main...HEAD > "$DIFF"
copilot --autopilot --yolo -p "/review the changes in $DIFF for the laravel-ai-guardrails package. Focus on security posture, untrusted-input handling, append-only invariants, and test coverage."
Resolve EVERY comment. Re-run until zero comments. Only then git push.
gh pr create --base <target-branch> --head <current-branch> --title "..." --body "..."
gh pr edit --add-reviewer @copilot and the REST endpoint are unreliable. Use:
PRID=$(gh pr view <PR> --json id -q .id)
gh api graphql -f query='mutation($pid:ID!,$bots:[String!],$u:Boolean!){requestReviewsByLogin(input:{pullRequestId:$pid,botLogins:$bots,union:$u}){clientMutationId}}' \
-F pid="$PRID" -F bots[]='copilot-pull-request-reviewer[bot]' -F u=true
gh api repos/padosoft/laravel-ai-guardrails/pulls/<PR>/requested_reviewers # confirm it started
gh pr checks <PR> --watch # CI green?
gh pr view <PR> --comments # Copilot comments?
Fix broken tests + every Copilot comment → update docs/LESSON.md with what you learned → push → the review re-runs. Repeat.
If GitHub/Copilot is unavailable, record local status + next remote step in docs/PROGRESS.md. Never fake green.