协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
workflow-pr【开发与工程】Manage an existing PR lifecycle — review, bot feedback, conflicts, merge. Use when opening a PR from an already-committed branch, addressing review, or merging. Uncommitted working tree to merge-ready → workflow-release-prep.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Degree of freedom: MIXED. Feedback judgment [HIGH freedom]; validations,
poll loop, and merge-only-if-asked [LOW freedom — run exactly].
Full checklist for an already-committed branch or an open PR.
Uncommitted / staged / untracked working tree that still needs review,
commit, and a merge-ready PR is workflow-release-prep. This skill
does not own that sequence.
Validate:
pnpm typecheck && pnpm testgreen; no.envin the diff. Open: PR uses the repo template; titlefix(checkout): handle deleted SKU. Drive: CI red on lint → fix, push, re-poll; reply + resolve the bot thread. Gate:mergeable_state=clean, 0 threads; user did not ask to merge → report merge-ready and stop.
workflow-release-prepmergeable: true as approvalworkflow-release-prep; keep-green loop after open → babysitworkflow-release-prep: open the PR and return its URL.
babysit owns the green loop; the caller stops before merge.JavaScript/TypeScript:
pnpm typecheck && pnpm build && pnpm test
# or: npm run typecheck && npm run build && npm test
Python:
mypy . && python -m pytest && ruff check .
With Makefile:
make typecheck && make build && make test
Before committing, verify:
/Users/username/...)pull_request_template.md in repoCheck every 60-90 seconds until checks complete:
Understanding Check Status:
mergeable: true → Only means no git conflictsmergeable_state: "clean" → ALL checks passed, safe to mergeMergeable State Values:
| State | Meaning | Action |
|---|---|---|
"clean" | ✅ All passed | Safe to merge |
"unstable" | ⚠️ Pending/failing | Wait, poll again |
"blocked" | ❌ Protection rules | Check requirements |
"behind" | ⚠️ Needs update | Update branch |
When reviews complete:
After pushing fixes:
SUCCESSTwo gates must pass:
| Gate | Check |
|---|---|
| Gate 1 | mergeable_state == "clean" |
| Gate 2 | unresolved_thread_count == 0 |
Both must be TRUE to merge.
Only after both gates pass and the user explicitly asked to merge:
gh pr merge --merge
Otherwise report that the PR is merge-ready and stop.
Confirm merge was successful and report status.
| Situation | Action |
|---|---|
| Checks fail 3x | Pause, ask for guidance |
| Unclear feedback | Ask clarifying questions |
| Merge blocked | Check protection rules, report |
| Checks stuck | Run local validation, ask permission |
mergeable_state is "unstable"Fix: Always check mergeable_state, poll again if unstable
mergeable: true as approvalFix: mergeable ≠ mergeable_state. Check the latter.
Fix: After every push, re-fetch comments for new threads
Fix: After addressing each comment, mark thread resolved
# Check PR status
gh pr status
# View checks
gh pr checks <number>
# View comments
gh pr view <number> --comments
# Merge (only when both gates pass)
gh pr merge <number> --merge