QRCraftly PR 合并管理
steward
如何将 QRCraftly 的拉取请求(PR)推进至合并。适用于创建 PR、处理其上的 CI 或评审事件、更新分支,或决定是否合并。
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-14
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- steward
- description
- How to drive a QRCraftly pull request to merged. Use when opening a PR, handling CI or review events on it, updating its branch, or deciding whether to merge.
03 SKILL.md 正文
Steward: driving a QRCraftly PR to merged
AGENTS.md holds the invariants and RELEASING.md holds the release flow. This skill is the loop for one PR. Where they disagree, they win.
Before the first push
- Branch from current
mainwith a prefix:feat/,fix/,docs/,refactor/,chore/,agent/, orclaude/for the branch a Claude session is given. - While you work, use the targeted commands in the "Fast loop" section of
AGENTS.md. Before pushing, run the checks a contributor runs locally, in this order, and fix everything:pnpm run lintpnpm test -- --runpnpm buildwhen the change touches the build, routing, the generator orpublic/pnpm test:e2ewhen the change touches navigation, rendering or input flows
- Run
pnpm run docs:syncafter changing anything insrc/components/ui/,src/components/inputs/,src/components/style-controls/,docs/public/ordocs/SECURITY.md, and commit what it writes. - If you touch a file in
MAPPINGinscripts/git_lineage_auditor.js, update the paired doc in the same PR.
Opening the PR
- The title is a Conventional Commit (
fix(scanner): handle empty frames). It becomes the squash commit and drives the version bump, so pickfeatversusfixdeliberately. - The base is always
main. There is nodevbranch. - Open it as a draft and keep it there until it is done. CI minutes are metered (ADR 0050): drafts skip unit tests, E2E and Lighthouse, and ready PRs run Chromium E2E only.
- Add the
full-e2elabel when the change may behave differently in Firefox or WebKit (and on a release PR whose branch does not start withrelease/). Add it before the push or ready toggle that should use it:main.ymldoes not run onlabeled, so a label added later changes nothing until the next push or draft-to-ready toggle. - Write one closing keyword per issue (
Closes #12. Closes #13.). InCloses #12, #13GitHub closes only #12. - Prefer one complete, tested PR over a chain of small ones. Every merge deploys to production.
Getting it green
The required checks are CI, PR Title and Workers Builds: qrcraftly.
-
Out of date with
main: mergemaininto the branch (never rebase or force-push a branch someone else owns), re-run the local checks, push. -
CIred: open the failing job's log, reproduce the failure locally, fix the root cause, show the same check passing, push. A failing test is never an infra flake until you have shown it fails the same way onmain. -
Workers Builds: qrcraftlyred: the Cloudflare build runspnpm run build; reproduce it withpnpm build. -
Bundle size: CI runs
pnpm run check-bundle-sizeafter the build. Shrink the change rather than raising the budget. -
Never skip, disable or quarantine a test, push an empty commit, or close and reopen a PR to re-trigger CI.
-
Visual baselines: screenshots taken locally or in a cloud session never match CI's fonts. For a PR that moves layout on purpose, add
full-e2e, then theupdate-snapshotslabel;.github/workflows/update-snapshots.ymlcommits refreshed baselines to the branch. CI runs on that bot commit wait asaction_requireduntil a maintainer approves them.
Reviews
- Fix small, local review asks (nits, renames, an added test) and push.
- Larger asks on someone else's PR: reply with a proposal and let the author decide.
- Resolve the threads you addressed.
Merging
- Merge only when every required check is green on the current head. Local checks alone never justify a merge.
- The maintainer merges. Never merge a PR or enable auto-merge on one unless the maintainer has said so in words for that PR (ADR 0020, amendment).
- Once the PR is complete and every required check is green on the current head, mark it ready for review and tell the maintainer it is ready. Remember that marking a PR ready starts the full CI tier, so let that run finish green before saying so.
- Never enable auto-merge on, or merge, a
chore(release): vX.Y.ZPR, even when asked to merge others. A maintainer merges those by hand. - No admin bypass of the
mainruleset.
Merge conflicts
- Merge
maininto the branch; never rebase or force-push a branch you did not create. - Regenerate lockfiles,
docs/public/UI_CATALOG.md(pnpm run docs:sync) and other generated files with their tools, never by hand. - When both sides changed the same logic, keep both behaviours if they are compatible. If keeping one loses the other, stop and ask the PR's owner.
- Re-run the local checks before pushing the merge.
Merge queue
GitHub's merge queue needs an organization-owned repository, so it is not on yet (ADR 0051). The workflows already run on merge_group. Once .github/rulesets/main-merge-queue.json is imported, auto-merge adds a PR to the queue, branches no longer need updating, and a PR that fails in the queue is removed from it: fix it and tell the maintainer, who re-queues it.
After the merge
Check that Verify Production Deployment (deploy-verify.yml; CI does not re-run on main) and the Workers Builds: qrcraftly check pass on the merge commit before merging the next PR. curl -s https://qrcraftly.com/version.json shows which commit production serves. If production broke, roll back in Cloudflare first, then fix forward with a PR (see RELEASING.md).
Things a PR must never add
Ads, analytics, telemetry, diagnostics pings or third-party scripts (docs/PLEDGE.md); server-side redirects, D1 or Turnstile (dynamic QR codes were dropped for good); user input sent over the network or put in URL query strings; new persistent storage keys outside the allowlist in AGENTS.md.
04 同仓库更多 Skills
会话交接至后台智能体
claude-handoff
将当前会话交接给一个全新的后台智能体,由其立即接手继续工作。
QRCraftly 应用运行测试
run-qrcraftly
构建、运行并驱动 QRCraftly Web 应用(Vike + React on Vite)。适用于以下场景:启动开发服务器或生产预览、对页面截图、在生成器或二维码检查器中逐步点击操作、下载生成的二维码、确认 UI 变更在真实应用中生效、直接调用 src/packages 中的函数,或在本容器中运行单元测试与 Playwright 端到端(e2e)测试。
素材成文写作
writing-shape
写作,发挥:将原始素材逐段塑造成一篇文章。
写作片段素材挖掘
writing-fragments
写作,探索阶段:挖掘原始素材片段,暂不组织结构。
智能体文档编写
writing-for-agents
为智能体编写文档。适用于创建或编辑技能(skill),或修改 AGENTS.md 或 CLAUDE.md。
写作节拍素材编排
writing-beats
写作,发挥阶段:将原始素材组装成由一系列“节拍”构成的叙事旅程,在某个节拍依赖某个术语之前,先对该术语做好铺垫。