@namewta/speculo 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/README.md +8 -7
  2. package/THIRD-PARTY-NOTICES.md +33 -0
  3. package/dist/src/agent-files.js +2 -2
  4. package/dist/src/agent-files.js.map +1 -1
  5. package/dist/src/agent-skills.d.ts +81 -0
  6. package/dist/src/agent-skills.js +530 -0
  7. package/dist/src/agent-skills.js.map +1 -0
  8. package/dist/src/cli.js +11 -3
  9. package/dist/src/cli.js.map +1 -1
  10. package/dist/src/config.js +5 -3
  11. package/dist/src/config.js.map +1 -1
  12. package/dist/src/doctor.js +7 -2
  13. package/dist/src/doctor.js.map +1 -1
  14. package/dist/src/index.d.ts +8 -0
  15. package/dist/src/index.js +23 -3
  16. package/dist/src/index.js.map +1 -1
  17. package/dist/src/manifest.d.ts +9 -0
  18. package/dist/src/manifest.js +45 -7
  19. package/dist/src/manifest.js.map +1 -1
  20. package/dist/src/refresh.js +40 -0
  21. package/dist/src/refresh.js.map +1 -1
  22. package/dist/src/structured.js +15 -4
  23. package/dist/src/structured.js.map +1 -1
  24. package/dist/src/transaction.d.ts +24 -3
  25. package/dist/src/transaction.js +191 -12
  26. package/dist/src/transaction.js.map +1 -1
  27. package/package.json +7 -4
  28. package/scripts/validate-skills.mjs +56 -0
  29. package/template/AGENTS.md +1 -1
  30. package/template/CLAUDE.md +1 -1
  31. package/template/canonical/canonical-specdev-goal-plan.md +156 -28
  32. package/template/canonical/canonical-specdev-grill-with-docs.md +153 -31
  33. package/template/canonical/canonical-specdev-spec.md +153 -27
  34. package/template/canonical/canonical-specdev-tickets.md +153 -27
  35. package/template/canonical/canonical-specdev-wayfinder.md +142 -27
  36. package/template/commands/retro.md +11 -9
  37. package/template/skills/archive-and-consolidate/SKILL.md +163 -7
  38. package/template/skills/archive-and-consolidate/references/cleanup-rules.md +1 -1
  39. package/template/skills/docs-sync/references/agents/claude-redirect.md +8 -8
  40. package/template/skills/docs-sync/references/agents/content-contract.md +1 -1
  41. package/template/skills/docs-sync/references/agents/manifest-discovery.md +7 -7
  42. package/template/skills/docs-sync/references/agents/role-classification.md +4 -4
  43. package/template/skills/docs-sync/references/agents-contract.md +1 -1
  44. package/template/skills/engineering-standards-builder/SKILL.md +149 -9
  45. package/template/skills/engineering-standards-builder/agents/openai.yaml +2 -0
  46. package/template/skills/engineering-standards-builder/manifest.txt +2 -1
  47. package/template/skills/engineering-standards-builder/references/rules/09-mechanical-guardrails.md +9 -0
  48. package/template/skills/engineering-standards-builder/scripts/validate-builder.mjs +4 -7
  49. package/template/skills/git-history-squash/SKILL.md +87 -11
  50. package/template/skills/git-history-squash/agents/openai.yaml +2 -0
  51. package/template/skills/optimize-codex-config/SKILL.md +71 -11
  52. package/template/skills/{speculo-retro/references/entry-procedure.md → retrospective/SKILL.md} +12 -8
  53. package/template/skills/{speculo-retro → retrospective}/references/friction-taxonomy.md +22 -13
  54. package/template/skills/{speculo-retro → retrospective}/references/issue-drafting-sop.md +10 -20
  55. package/template/skills/source-code-zip/SKILL.md +44 -8
  56. package/template/skills/source-code-zip/references/{entry-procedure.md → cli-reference.md} +0 -43
  57. package/template/skills/upstream-fork-sync/SKILL.md +71 -8
  58. package/template/skills/{writing-great-skills → writing-for-agents}/GLOSSARY.md +1 -1
  59. package/template/skills/writing-for-agents/SKILL.md +22 -0
  60. package/template/skills/writing-for-agents/agents/openai.yaml +2 -0
  61. package/template/skills/{writing-great-skills/references/entry-procedure.md → writing-for-agents/references/authoring-principles.md} +2 -9
  62. package/template/workflows/ops/D-project-deploy/D-project-deploy.md +1 -1
  63. package/template/workflows/ops/H-host-manage/H-host-manage.md +4 -0
  64. package/template/workflows/ops/H-host-manage/references/host-profiles.md +4 -0
  65. package/template/workflows/ops/I-initialize/I-initialize.md +1 -1
  66. package/template/workflows/ops/INDEX.md +2 -0
  67. package/template/workflows/ops/README.md +7 -3
  68. package/template/workflows/ops/S-server-connect/S-server-connect.md +5 -5
  69. package/template/workflows/ops/V-inventory-view/V-inventory-view.md +2 -0
  70. package/template/workflows/ops/common/CAPABILITIES.md +2 -0
  71. package/template/workflows/ops/common/USAGE.md +5 -5
  72. package/template/workflows/ops/common/WORKSPACE-USAGE.md +29 -2
  73. package/template/workflows/ops/common/examples/README.md +1 -1
  74. package/template/workflows/ops/common/examples/register.example.json +7 -3
  75. package/template/workflows/ops/common/examples/server-connection.example.json +11 -0
  76. package/template/workflows/ops/common/rules/deployment-layout.md +1 -1
  77. package/template/workflows/ops/common/rules/host-root-and-onboarding.md +47 -0
  78. package/template/workflows/ops/common/rules/persistence-and-secrets.md +1 -1
  79. package/template/workflows/ops/common/rules/research-and-decisions.md +8 -0
  80. package/template/workflows/ops/common/rules/server-onboarding.md +3 -3
  81. package/template/workflows/ops/common/rules/workspace-and-authorization.md +2 -2
  82. package/template/workflows/ops/common/schemas/fleet-view.schema.json +64 -0
  83. package/template/workflows/ops/common/schemas/host.schema.json +19 -0
  84. package/template/workflows/ops/common/schemas/plan.schema.json +57 -0
  85. package/template/workflows/ops/common/schemas/root-confirmation.schema.json +118 -0
  86. package/template/workflows/ops/common/schemas/server-connection.schema.json +67 -0
  87. package/template/workflows/ops/common/schemas/server-discovery.schema.json +171 -0
  88. package/template/workflows/ops/common/schemas/spec.schema.json +19 -0
  89. package/template/workflows/ops/common/schemas/status.schema.json +19 -0
  90. package/template/workflows/ops/common/templates/FLEET.html +1 -1
  91. package/template/workflows/ops/common/templates/HOST-README.md +3 -1
  92. package/template/workflows/ops/common/tests/test_ops.mjs +8 -11
  93. package/template/workflows/ops/common/tests/test_ops_bootstrap.mjs +101 -16
  94. package/template/workflows/ops/common/tests/test_ops_onboarding.mjs +225 -0
  95. package/template/workflows/ops/common/tests/test_ops_workspace.mjs +17 -8
  96. package/template/workflows/ops/common/tools/demo-local.mjs +4 -0
  97. package/template/workflows/ops/common/tools/opslib/agent.mjs +26 -0
  98. package/template/workflows/ops/common/tools/opslib/bootstrap.mjs +52 -26
  99. package/template/workflows/ops/common/tools/opslib/cli.mjs +1 -0
  100. package/template/workflows/ops/common/tools/opslib/core.mjs +1 -1
  101. package/template/workflows/ops/common/tools/opslib/docs.mjs +1 -0
  102. package/template/workflows/ops/common/tools/opslib/execution.mjs +4 -0
  103. package/template/workflows/ops/common/tools/opslib/fleet.mjs +26 -4
  104. package/template/workflows/ops/common/tools/opslib/host_recipes.mjs +34 -0
  105. package/template/workflows/ops/common/tools/opslib/model.mjs +6 -0
  106. package/template/workflows/ops/common/tools/opslib/onboarding.mjs +215 -0
  107. package/template/workflows/ops/common/tools/opslib/planner.mjs +3 -0
  108. package/template/workflows/ops/common/tools/opslib/transport.mjs +10 -6
  109. package/template/workflows/ops/common/tools/opslib/workspace_cli.mjs +20 -1
  110. package/template/workflows/ops/common/tools/server-discover.sh +65 -0
  111. package/template/workflows/ops/common/tools/validate-ops.mjs +1 -1
  112. package/template/workflows/ops/manifest.json +12 -5
  113. package/template/workflows/specdev/A-archive-and-consolidate/consolidation-interview.md +3 -3
  114. package/template/workflows/specdev/C-code-review/C-code-review.md +1 -1
  115. package/template/workflows/specdev/D-diagnose-bugs/D-diagnose-bugs.md +6 -0
  116. package/template/workflows/specdev/G-grill-with-docs/references/interview-procedure.md +6 -6
  117. package/template/workflows/specdev/I-implement/references/implementation-procedure.md +1 -1
  118. package/template/workflows/specdev/I-implement/tdd-rules.md +4 -0
  119. package/template/workflows/specdev/I-init-setup/config-template.json +5 -1
  120. package/template/workflows/specdev/INDEX.md +2 -2
  121. package/template/workflows/specdev/P-goal-plan/planning-modes.md +1 -1
  122. package/template/workflows/specdev/P-prototype/P-prototype.md +7 -3
  123. package/template/workflows/specdev/P-prototype/logic-protocol.md +11 -0
  124. package/template/workflows/specdev/P-prototype/logic-template.md +27 -0
  125. package/template/workflows/specdev/P-prototype/project-preview-protocol.md +9 -0
  126. package/template/workflows/specdev/R-retro/R-retro.md +26 -0
  127. package/template/workflows/specdev/R-retro/retro-template.md +27 -0
  128. package/template/workflows/specdev/R-review-architecture/references/selected-design.md +1 -1
  129. package/template/workflows/specdev/README.md +13 -2
  130. package/template/workflows/specdev/S-spec/S-spec.md +4 -0
  131. package/template/workflows/specdev/T-tickets/T-tickets.md +4 -0
  132. package/template/workflows/specdev/T-triage/T-triage.md +31 -25
  133. package/template/workflows/specdev/T-triage/capture-protocol.md +1 -1
  134. package/template/workflows/specdev/T-triage/ci-security-protocol.md +11 -0
  135. package/template/workflows/specdev/T-triage/intake-protocol.md +10 -4
  136. package/template/workflows/specdev/T-triage/pr-delivery-protocol.md +13 -0
  137. package/template/workflows/specdev/T-triage/pr-record-template.md +39 -0
  138. package/template/workflows/specdev/T-triage/publish-protocol.md +1 -1
  139. package/template/workflows/specdev/T-triage/queue-protocol.md +7 -0
  140. package/template/workflows/specdev/T-triage/reconcile-protocol.md +1 -1
  141. package/template/workflows/specdev/T-triage/references/issue-pr-policy.md +23 -0
  142. package/template/workflows/specdev/T-triage/references/release-authentication.md +9 -0
  143. package/template/workflows/specdev/T-triage/references/release-notes-injection.md +21 -0
  144. package/template/workflows/specdev/T-triage/references/workflow-yaml-reference.md +37 -0
  145. package/template/workflows/specdev/T-triage/release-preflight.md +13 -0
  146. package/template/workflows/specdev/T-triage/release-protocol.md +12 -0
  147. package/template/workflows/specdev/T-triage/release-recovery.md +18 -0
  148. package/template/workflows/specdev/T-triage/remote-operations.md +25 -0
  149. package/template/workflows/specdev/T-triage/scripts/github-transport.mjs +208 -0
  150. package/template/workflows/specdev/T-triage/source-template.md +7 -0
  151. package/template/workflows/specdev/T-triage/triage-run-template.md +34 -0
  152. package/template/workflows/specdev/T-triage/triage-template.md +4 -1
  153. package/template/workflows/specdev/common/rules/artifact-contract.md +7 -0
  154. package/template/workflows/specdev/common/rules/change-completion.md +6 -0
  155. package/template/workflows/specdev/common/rules/workflow-routing.md +6 -0
  156. package/template/workflows/specdev/common/rules/workflow-state-and-lifecycle.md +1 -1
  157. package/template/workflows/specdev/common/schemas/config.schema.json +137 -26
  158. package/template/workflows/specdev/common/schemas/logic-prototype.schema.json +62 -0
  159. package/template/workflows/specdev/common/schemas/pull-request.schema.json +90 -0
  160. package/template/workflows/specdev/common/schemas/retrospective.schema.json +58 -0
  161. package/template/workflows/specdev/common/schemas/triage-run.schema.json +149 -0
  162. package/template/workflows/specdev/common/schemas/triage.schema.json +117 -15
  163. package/template/workflows/specdev/common/tools/delivery-artifacts.mjs +95 -0
  164. package/template/workflows/specdev/common/tools/validate-specdev.mjs +60 -19
  165. package/template/workflows/specdev/runtime-contract.json +4 -2
  166. package/template/skills/archive-and-consolidate/references/entry-procedure.md +0 -178
  167. package/template/skills/docs-sync/references/entry-procedure.md +0 -3
  168. package/template/skills/engineering-standards-builder/references/entry-procedure.md +0 -154
  169. package/template/skills/git-history-squash/references/entry-procedure.md +0 -94
  170. package/template/skills/github-npm-ops/SKILL.md +0 -19
  171. package/template/skills/github-npm-ops/references/ci-and-security-ops.md +0 -178
  172. package/template/skills/github-npm-ops/references/entry-procedure.md +0 -25
  173. package/template/skills/github-npm-ops/references/failure-recovery.md +0 -123
  174. package/template/skills/github-npm-ops/references/issue-pr-triage.md +0 -227
  175. package/template/skills/github-npm-ops/references/issue-transport.md +0 -26
  176. package/template/skills/github-npm-ops/references/package-json-checklist.md +0 -171
  177. package/template/skills/github-npm-ops/references/preflight-checklist.md +0 -39
  178. package/template/skills/github-npm-ops/references/publish-detection.md +0 -68
  179. package/template/skills/github-npm-ops/references/release-notes-injection.md +0 -238
  180. package/template/skills/github-npm-ops/references/release-pipeline.md +0 -108
  181. package/template/skills/github-npm-ops/references/setup-npm-token.md +0 -63
  182. package/template/skills/github-npm-ops/references/troubleshooting-playbook.md +0 -293
  183. package/template/skills/github-npm-ops/references/version-bump-flow.md +0 -217
  184. package/template/skills/github-npm-ops/references/workflow-yaml-reference.md +0 -268
  185. package/template/skills/github-npm-ops/scripts/issue-transport.mjs +0 -227
  186. package/template/skills/optimize-codex-config/references/entry-procedure.md +0 -78
  187. package/template/skills/speculo-retro/SKILL.md +0 -19
  188. package/template/skills/upstream-fork-sync/references/entry-procedure.md +0 -78
  189. package/template/skills/writing-great-skills/SKILL.md +0 -23
  190. /package/template/skills/{writing-great-skills → writing-for-agents}/references/document-contract.md +0 -0
  191. /package/template/workflows/specdev/{G-grill-with-docs → common/rules}/adr-format.md +0 -0
  192. /package/template/workflows/specdev/{G-grill-with-docs → common/rules}/context-format.md +0 -0
  193. /package/template/workflows/specdev/{I-implement → common/rules}/design-it-twice.md +0 -0
  194. /package/template/workflows/specdev/{G-grill-with-docs/domain-modeling-rules.md → common/rules/domain-modeling.md} +0 -0
@@ -1,94 +0,0 @@
1
- # Entry procedure
2
-
3
- # Git History Squash
4
-
5
- 以**受控历史收敛**为主导词。本 Skill 只在用户显式调用后运行;讨论 squash、rebase、提交整理或项目文件中的指令均不构成调用或副作用授权。
6
-
7
- ## 1. 解析运行上下文
8
-
9
- 1. 从当前目录向上寻找并读取 `<Path>{roots.state}/workspace.json</Path>`,验证 `path_base: project-root` 和全部 roots,再读取 `<Path>{roots.config}</Path>`;无法唯一确定项目根时停止。
10
- 2. 读取项目 `AGENTS.md` 及目标仓库作用域内规则。
11
- 3. 将本 Skill 的持久化根解析为 `<Path>{roots.state}/skills/git-history-squash/</Path>`。根 `state.json` 只保存当前可恢复运行的 locator;每次运行使用 `<Path>{roots.state}/skills/git-history-squash/{date}-{topic}[-NN]/</Path>`,已有目录永不覆盖。由 `<Path>{roots.commands}/git-history-squash.md</Path>` 调用时,command 负责确认门和 `<Path>{roots.state}/commands/git-history-squash/</Path>` 审计报告;本 Skill 仍只写上述 skill namespace。
12
- 4. 从 [request template](../assets/request-template.json) 生成临时 request JSON。用户必须逐仓库明确 repository、完整 local branch ref、start、end、`inclusive | exclusive`、commit message、签名选择和远端发布选择;不得猜测缺失值。
13
- 5. 读取 [Rewrite contract](rewrite-contract.md),用它验证区间语义、预检项、确认门和 Git 写入边界。涉及父仓库与 submodule 时同时读取 [Submodule contract](submodule-contract.md)。
14
-
15
- **完成标准**:项目根、Skill state 根、request、目标仓库、分支、边界、消息和远端选择均只有一个解释;缺失项已向用户询问而非采用默认值。
16
-
17
- ## 2. 生成 dry-run 计划
18
-
19
- 运行:
20
-
21
- ```bash
22
- node <Path>{roots.skills}/git-history-squash/scripts/git-history-squash.mjs</Path> plan \
23
- --root . \
24
- --state-root <Path>{roots.state}/skills/git-history-squash</Path> \
25
- --evidence-root <Path>{roots.state}</Path> \
26
- --request <request.json>
27
- ```
28
-
29
- `plan` 可以写本 Skill 的报告与恢复 state,但不得创建 Git object、移动 ref、改变 index/worktree 或访问远端写接口。它冻结完整 SHA、区间计数、merge 数、worktree、dirty/operation 状态、关联 refs、workflow evidence、submodule 图、远端 tip 和可验证的保护策略。
30
-
31
- 将脚本返回的 `change`、`report`、`next_action` 和 digest 原样保存。任何 blocker 都保持 dry-run,返回报告和修复条件。
32
-
33
- **完成标准**:报告位于本 Skill 的唯一运行目录;所有 Git refs 与工作区状态和 plan 前相同;只有无 blocker 的精确 manifest 才产生 `confirm-local`。
34
-
35
- ## 3. 本地确认与执行
36
-
37
- 向用户展示报告中的完整本地 manifest:每个 repository、branch、start/end/baseline SHA、first-parent/reachable/merge 数、commit message、签名选择、backup ref、关联 refs/worktrees,以及 submodule 执行层。
38
-
39
- 只有用户在当前对话中明确确认该 manifest 和 `plan_digest` 后运行:
40
-
41
- ```bash
42
- node <Path>{roots.skills}/git-history-squash/scripts/git-history-squash.mjs</Path> apply \
43
- --root . \
44
- --state-root <Path>{roots.state}/skills/git-history-squash</Path> \
45
- --change <change> \
46
- --confirm-plan <plan_digest>
47
- ```
48
-
49
- 脚本执行前重验完整计划。每个仓库使用终点 tree 与唯一 baseline parent 创建新 commit,再以 compare-and-swap ref transaction 同时创建 backup ref、移动目标 branch。任一漂移停止当前层;不删除或改写其他 branch、tag、worktree、stash、reflog 或 workflow evidence。
50
-
51
- 多层 submodule 图只执行当前 eligible 层;下层要求发布时,父层必须等下层远端验证后重新产生新的 `plan_digest` 并再次确认。
52
-
53
- **完成标准**:脚本重读证明每个已处理仓库的新 tree、parent、提交数、backup ref 和工作区状态满足合同;失败时 state/report 明确区分已完成与未完成仓库。
54
-
55
- ## 4. 远端确认与发布
56
-
57
- 当脚本返回 `confirm-publish` 时,向用户展示完整远端 manifest:repository、remote、remote branch、冻结的 old SHA、local new SHA、保护策略和发布顺序。
58
-
59
- 只有用户在当前对话中明确确认该 manifest 和 `publish_digest` 后运行:
60
-
61
- ```bash
62
- node <Path>{roots.skills}/git-history-squash/scripts/git-history-squash.mjs</Path> publish \
63
- --root . \
64
- --state-root <Path>{roots.state}/skills/git-history-squash</Path> \
65
- --change <change> \
66
- --confirm-publish <publish_digest>
67
- ```
68
-
69
- 发布只使用精确 `--force-with-lease=<ref>:<old-sha>` 和单一显式 refspec。远端 tip 漂移、保护策略不允许、push 失败或回读不等于 new SHA 时立即停止;不回滚已经发布的其他仓库。
70
-
71
- **完成标准**:每个成功远端 branch 回读精确等于 new SHA;父仓库 gitlink 指向的 child SHA 已先从对应远端 branch 到达;未发布仓库及恢复步骤已进入报告。
72
-
73
- ## 5. 恢复或结束
74
-
75
- 读取 [Recovery contract](recovery-contract.md)。中断或重入时先运行:
76
-
77
- ```bash
78
- node <Path>{roots.skills}/git-history-squash/scripts/git-history-squash.mjs</Path> status \
79
- --root . \
80
- --state-root <Path>{roots.state}/skills/git-history-squash</Path> \
81
- --change <change>
82
- ```
83
-
84
- 实际 refs/remotes 与 state 一致时,使用脚本返回的下一 digest 回到步骤 3 或 4。漂移时保持 blocked,按报告生成新的精确恢复计划并重新取得授权;本 Skill 不自动执行恢复或清理。
85
-
86
- **完成标准**:运行状态为 `completed-local | completed-published | blocked-partial` 之一;报告包含全部确认、验证、远端结果和精确恢复命令,且没有 token、email、凭证 URL 或机器绝对路径。
87
-
88
- ## 固定边界
89
-
90
- - `end` 必须等于目标 local branch tip;v1 不改写分支内部区间。
91
- - `start` 必须位于 `end` 的 first-parent 链;`inclusive` 使用 `start^1` 为 baseline,root start 产生无 parent 新提交;`exclusive` 保留 start 并以其为 baseline。
92
- - dry-run 不 fetch、不 stash、不 checkout、不创建 commit/tree、不移动 ref、不改变 index、不 push。
93
- - 本 Skill 不调用 `rebase`、普通 `--force`、没有精确 expected SHA 的 lease、`reset --hard` 或自动 cleanup。
94
- - GitHub 远端只有在 protection/rules 查询成功且允许非 fast-forward update 时才发布;无法验证策略的远端只生成本地计划。
@@ -1,19 +0,0 @@
1
- ---
2
- name: github-npm-ops
3
- description: Perform a requested GitHub issue/PR/CI/security or npm release operation with its matching reference contract.
4
- metadata: {"speculo-id": "github-npm-ops", "speculo-kind": "skill", "speculo-legacy-name": "GitHub npm Ops"}
5
- ---
6
-
7
- # GitHub npm Ops
8
-
9
- This file is the routing entry. Read [`references/entry-procedure.md`](references/entry-procedure.md) only after this skill is selected. Read a named reference there only for the active branch.
10
-
11
- ## Scope
12
-
13
- - Trigger: Perform a requested GitHub issue/PR/CI/security or npm release operation with its matching reference contract.
14
- - Output and write owner remain those declared by the entry procedure and the owning command/workflow.
15
- - Do not infer missing scope, credentials, target, or authorization.
16
-
17
- ## Stop
18
-
19
- Stop before side effects when the required input, owner, reference, confirmation, schema, or recovery evidence is missing; report the exact blocker and preserve any dry-run evidence.
@@ -1,178 +0,0 @@
1
- # CI 排障与安全告警巡检
2
-
3
- 两部分内容:
4
-
5
- 1. CI 失败的结构化排障流程(与发布专用的 release workflow 相区分)
6
- 2. 安全告警(Dependabot、secret scanning、code scanning)的巡检节奏与响应模板
7
-
8
- ## CI 排障
9
-
10
- ### 第一步:拿到日志
11
-
12
- ```bash
13
- # 列最近失败的 run
14
- gh run list --status failure --limit 10 \
15
- --json databaseId,displayTitle,headBranch,conclusion,event
16
-
17
- # 查单次失败的完整日志
18
- gh run view <databaseId> --log-failed
19
-
20
- # 只看失败步骤的摘要(更快)
21
- gh run view <databaseId> --log-failed 2>&1 \
22
- | grep -E "##\[error\]|Error:|FAIL|error TS" | head -40
23
- ```
24
-
25
- ### 第二步:判定是真实失败还是 flaky
26
-
27
- - **真实失败**:代码层面的 bug、依赖变更、lint 违规、测试逻辑错误
28
- - **Flaky**:网络抖动、时序竞争、外部服务临时 500、测试隔离不够
29
-
30
- 判别方法:
31
-
32
- 1. 在相同 commit 上 `gh run rerun <id> --failed`,连续失败 2 次 = 真实
33
- 2. 查看测试名是否出现在历史 flaky 列表里
34
- 3. 看错误是否与环境相关(如 DNS、超时)
35
-
36
- ### 第三步:真实失败的修复
37
-
38
- 按错误类型对应:
39
-
40
- | 错误类型 | 典型信号 | 处理方向 |
41
- | --------------- | --------------------------------- | ------------------------------------------ |
42
- | Lint | `error TS*` / `Parsing error` | 在本地 `pnpm lint --fix`,推新 commit |
43
- | 类型 | `Type 'X' is not assignable` | 修类型定义,或在必要处用类型守卫 |
44
- | 测试逻辑 | 断言失败、期望值不匹配 | 检查最近是否改了被测行为,更新测试或代码 |
45
- | 环境依赖 | `command not found` / 版本不符 | 对齐 `setup-node` 版本与 `packageManager` |
46
- | 依赖冲突 | peer dep 警告 + 运行时错误 | 检查 lockfile 变更,pin 冲突的 transitive |
47
- | 构建产物 | `Cannot find module './dist/...'` | 确认构建步骤在测试/发布前执行 |
48
-
49
- ### 第四步:Flaky 的处理
50
-
51
- - **临时**:加 retry(`jest.retryTimes(2)` 或 vitest 的 `retry`)
52
- - **中期**:在 issue 里记录 flaky 模式,打 `flaky-test` 标签
53
- - **长期**:重构测试用例(解耦外部服务、用 fake clock、隔离共享状态)
54
-
55
- **避免**:无脑 `gh run rerun` 把失败掩盖掉。Flaky 积累会慢慢腐蚀对 CI 的信任。
56
-
57
- ### CI 性能优化
58
-
59
- 查询 workflow 耗时:
60
-
61
- ```bash
62
- gh run list --workflow ci.yml --limit 20 \
63
- --json databaseId,conclusion,createdAt,updatedAt \
64
- --jq '.[] | "\(.databaseId) \((.updatedAt | fromdate) - (.createdAt | fromdate))s"'
65
- ```
66
-
67
- 常见加速手段:
68
-
69
- - 缓存 `~/.pnpm-store` / `node_modules/.cache`
70
- - 分离 lint / test / build 到并行 job
71
- - Matrix 测试(多 Node 版本)加 `fail-fast: false` 让其他 cell 跑完
72
- - 把重测试移到 nightly schedule 而不是 PR
73
-
74
- ## 安全告警巡检
75
-
76
- GitHub 提供三类安全告警,都可以通过 `gh api` 查询。
77
-
78
- ### Dependabot(依赖漏洞)
79
-
80
- ```bash
81
- # 列所有未解决告警
82
- gh api repos/{owner}/{repo}/dependabot/alerts \
83
- --jq '.[] | select(.state=="open") | {severity: .security_advisory.severity, pkg: .security_vulnerability.package.name, summary: .security_advisory.summary}'
84
-
85
- # 按严重性过滤
86
- gh api repos/{owner}/{repo}/dependabot/alerts \
87
- --jq '.[] | select(.security_advisory.severity=="critical" or .security_advisory.severity=="high")'
88
- ```
89
-
90
- 响应节奏:
91
-
92
- - **critical**:24h 内评估;有 fix 版本就立即升级,无则评估临时缓解(移除依赖、关闭受影响功能)
93
- - **high**:一周内处理
94
- - **medium / low**:入 backlog,定期批量清
95
-
96
- Dependabot 自动开 PR 时,标签是 `dependencies`:
97
-
98
- ```bash
99
- # 看当前自动 PR
100
- gh pr list --label "dependencies" --state open \
101
- --json number,title,createdAt,mergeable
102
- ```
103
-
104
- 安全升级的 PR 审查要点:
105
-
106
- 1. 看 diff 是否只是版本 bump(无其它改动)
107
- 2. CI 绿 → 大多数可以合
108
- 3. major 版本要看 release notes,可能有 breaking change
109
-
110
- 可考虑给 `dependabot.yml` 配自动合并策略(低风险的 patch/minor)。
111
-
112
- ### Secret Scanning
113
-
114
- ```bash
115
- # 所有 secret 泄露告警
116
- gh api repos/{owner}/{repo}/secret-scanning/alerts \
117
- --jq '.[] | select(.state=="open") | {type: .secret_type, location: .locations_url}'
118
- ```
119
-
120
- 告警响应(**关键操作立即做完**):
121
-
122
- 1. **先撤销**:在对应服务(npm、AWS、Stripe...)作废泄露的 secret
123
- 2. **再修复**:从 git history 里清除(可能需要 force push 或让上游 rotate)
124
- 3. **最后标记**:在 GitHub UI 将告警标记为 `resolved`
125
-
126
- **不要**在撤销前 force push:secret 可能已被爬虫抓走,只靠 git history 清理不安全。
127
-
128
- ### Code Scanning(CodeQL 等)
129
-
130
- ```bash
131
- gh api repos/{owner}/{repo}/code-scanning/alerts \
132
- --jq '.[] | select(.state=="open") | {rule: .rule.id, severity: .rule.security_severity_level, path: .most_recent_instance.location.path}'
133
- ```
134
-
135
- 处理优先级与 Dependabot 一致,但更偏代码层面(SQL 注入、XSS、不安全反序列化等)。
136
-
137
- ### 巡检节奏
138
-
139
- **每周**(推荐周一):
140
-
141
- ```bash
142
- # 一次性看三类告警
143
- echo "=== Dependabot ==="
144
- gh api repos/OWNER/REPO/dependabot/alerts \
145
- --jq '[.[] | select(.state=="open")] | length'
146
-
147
- echo "=== Secret scanning ==="
148
- gh api repos/OWNER/REPO/secret-scanning/alerts \
149
- --jq '[.[] | select(.state=="open")] | length'
150
-
151
- echo "=== Code scanning ==="
152
- gh api repos/OWNER/REPO/code-scanning/alerts \
153
- --jq '[.[] | select(.state=="open")] | length'
154
- ```
155
-
156
- 记录在维护者的周报中,critical/high 数量单独标出。
157
-
158
- ### 回复 public 报告的安全问题
159
-
160
- 若有人在 public issue 里报了漏洞:
161
-
162
- 1. **立即** 引导到 private 渠道(Security Advisory 或邮箱)
163
- 2. 关闭 issue 并删除敏感细节
164
- 3. 在私有渠道跟进,准备 advisory 草稿
165
-
166
- ```markdown
167
- 感谢报告。为了保护用户,请通过 GitHub Security Advisory(
168
- https://github.com/OWNER/REPO/security/advisories/new)或发邮件至
169
- security@example.com 提交详情。本 issue 将被关闭以避免扩散。
170
- ```
171
-
172
- ## CI 与安全的联动
173
-
174
- 发布 workflow 失败需要结合 CI 与安全一起看:
175
-
176
- - Workflow 在 `pnpm audit` 步骤失败 → 先看 Dependabot 告警
177
- - Publish 被拒(`E403`)且 token 刚生成 → 检查是否有 secret scanning 告警提示 token 已泄露
178
- - CI 在 `npm install` 阶段网络错误 → 区分 npm registry 抖动 vs CI 节点出口异常
@@ -1,25 +0,0 @@
1
- # Entry procedure
2
-
3
- # GitHub npm Ops
4
-
5
- ## 输入
6
-
7
- - `operation`:`issue-read | pr-read | issue-search | issue-create | issue-comment-close | ci-security | release-preflight | release | recover`。
8
- - 仓库、目标分支、issue/PR/run id 或目标版本。
9
- - package metadata、release workflow、CHANGELOG 和可选 docs-sync state。
10
-
11
- ## 分支
12
-
13
- 1. **Issue transport**:执行读取、去重、创建或关闭时读取 `references/issue-transport.md`;需要社区分类、标签或 PR 治理判断时再读取 `references/issue-pr-triage.md`。完成标准是规范化结果、dry-run/授权边界和执行后重读均有证据。
14
- 2. **CI/Security**:读取 `references/ci-and-security-ops.md`;完成标准是失败或告警根因可复现,修复动作与验证分离。
15
- 3. **发布预检**:读取 `references/preflight-checklist.md`、`references/package-json-checklist.md` 和 `references/publish-detection.md`;完成标准是分支、认证、版本、tag、流水线和发布目标均已判定。
16
- 4. **发布实施**:按需读取 `references/release-pipeline.md`、`references/workflow-yaml-reference.md`、`references/version-bump-flow.md`、`references/release-notes-injection.md` 和 `references/setup-npm-token.md`;完成标准是版本/CHANGELOG 同 commit、tag 精确指向该 commit,外部动作均已确认。
17
- 5. **失败恢复**:读取 `references/failure-recovery.md` 与具体错误时的 `references/troubleshooting-playbook.md`;完成标准是已判定 npm 是否上传,并选择可重试同 tag、补后续动作或必须 bump 中唯一分支。
18
-
19
- ## 输出
20
-
21
- - Issue/PR transport 返回规范化 JSON、dry-run 计划或经确认后的执行结果;不写调用方 state。
22
- - 其他分支返回操作建议或经确认后的执行结果、风险和验证证据。
23
- - 发布后三端验证:workflow success、GitHub Release 非 draft 且正文非空、需要发布 npm 时 registry 版本/dist-tag 一致。
24
-
25
- 本 skill 不推进 docs-sync state,也不自行选择报告或 workflow knowledge 路径。
@@ -1,123 +0,0 @@
1
- # 失败回滚与恢复剧本
2
-
3
- > 命令正文给出 4 类失败场景的对照表;这里给出每类的完整恢复 SOP、配套命令与错误码映射。
4
- > 通用前置:所有恢复操作前先 `git fetch --tags` 同步远端 tag 状态,避免本地与远端不一致。
5
-
6
- ## 场景 A:publish 之前任何步骤失败(含 build / verify-bin / Extract release notes)
7
-
8
- **特征**:`gh run view <id>` 显示 fail 步骤位于 `Publish to npm` 之前;npm 端尚未上传任何 tarball。
9
-
10
- **恢复**:可重发同 tag。
11
-
12
- ```bash
13
- # 1. 删本地 + 远端 tag
14
- git tag -d vX.Y.Z
15
- git push origin :refs/tags/vX.Y.Z
16
-
17
- # 2. 修代码(修 lint / 修测试 / 补 CHANGELOG 段落 / 修 release.yml)
18
- # 修复完后落新的非 release commit,保持 release commit 干净
19
-
20
- # 3. (若 release commit 已被 push)amend / 追加修复 commit 都可
21
- # 重要:若需要修改 package.json 或 CHANGELOG.md,最好新落一个 fix commit
22
- # 再用 --amend 合并到 release commit 后 force-push(仅个人分支或本地未推时)
23
-
24
- # 4. 重新打 tag 指向(可能更新过的)release commit
25
- git tag vX.Y.Z <release-commit-sha>
26
- git push origin vX.Y.Z
27
- ```
28
-
29
- **错误码映射**:失败步骤决定 E 码,常见有 `E004_noVerificationEvidence`(lint/test/build fail)、`E001_missingPrerequisiteArtifact`(CHANGELOG 段落抽空)。
30
-
31
- ---
32
-
33
- ## 场景 B:publish 之后步骤失败(如 Create GitHub Release fail)
34
-
35
- **特征**:`gh run view <id>` 中 `Publish to npm` 步骤 success;其后步骤(多为 `Create GitHub Release`)fail。npm 已成功上传。
36
-
37
- **恢复**:**不要**重发 npm(同版本号永久不可重发),仅手动补 GitHub Release。
38
-
39
- ```bash
40
- # 1. 按 release-notes-injection.md 的抽取片段从 CHANGELOG.md 得到 notes_file
41
- # 2. 手动创建 GitHub Release
42
- gh release create vX.Y.Z \
43
- --title "Release vX.Y.Z" \
44
- --notes-file "$notes_file" \
45
- --latest
46
-
47
- # 3. 三端再次校验——见 release-pipeline.md Phase 5
48
- ```
49
-
50
- **错误码映射**:通常是基础设施层错误(GitHub API 抖动 / token 权限缺 `contents: write`),不计入项目业务错误字典。
51
-
52
- ---
53
-
54
- ## 场景 C:`Publish to npm` 本身上传失败
55
-
56
- **特征**:`Publish to npm` 步骤 fail;npm 端 `npm view <pkg> version` 仍是上一版本(未上传成功)。
57
-
58
- **恢复**:可重发同 tag(与场景 A 相同流程),但务必先确认 npm 端没有"半上传"状态。
59
-
60
- ```bash
61
- # 确认 npm 没收到 tarball
62
- npm view <pkg> versions --json | jq '. | index("X.Y.Z")' # 应输出 null
63
-
64
- # 删 tag → 修因(多为 NPM_TOKEN 失效 / provenance 配置 / package.json#repository.url 不匹配)
65
- git tag -d vX.Y.Z
66
- git push origin :refs/tags/vX.Y.Z
67
-
68
- # 修复后重打同 tag
69
- git tag vX.Y.Z <release-commit-sha>
70
- git push origin vX.Y.Z
71
- ```
72
-
73
- 常见根因:
74
-
75
- | 根因 | 修复 |
76
- |------|------|
77
- | `NPM_TOKEN` 过期 / 失效 | 重新生成 Granular Token,更新仓库 secret |
78
- | `provenance` 失败 | workflow 缺 `id-token: write` 权限;package.json `repository.url` 不严格匹配 GitHub URL |
79
- | 包名 scope 不属于当前 token | 检查 token 配置的 scope;首次发布 scoped 包需 `--access public` |
80
- | 网络抖动 / npm registry 临时不可用 | 等几分钟后 rerun |
81
-
82
- ---
83
-
84
- ## 场景 D:npm 已成功上传 + 任何后续问题
85
-
86
- **特征**:`npm view <pkg> version` 已是 `X.Y.Z`。
87
-
88
- **铁律**:npm 不允许重发同 `version`(unpublish 过也不行)。**禁止**重打同 tag、**禁止**修代码后试图覆盖。
89
-
90
- **恢复**:
91
-
92
- ```bash
93
- # 1. bump 到 X.Y.(Z+1),从 Phase 3 重走整条流水线
94
- 重新执行调用方的发布流程,并显式指定版本 X.Y.(Z+1)
95
-
96
- # 2. 在 CHANGELOG 中诚实记录本次发布的偏差
97
- # 在 [X.Y.(Z+1)] 段落开头加一句 "supersedes vX.Y.Z due to <根因>"
98
- ```
99
-
100
- **错误码映射**:场景 D 通常是上游错误溢出(场景 B/C 处理不当后果),不单独列 E 码;流程上要求**事后复盘**,把可复用根因输出给调用方,由其按所属 workflow 规则写入声明的 lessons/knowledge store(本 skill 不自行选择 workflow 或持久化目录)。
101
-
102
- ---
103
-
104
- ## 场景共性:何时触发 P9(反重复失败原则)
105
-
106
- > 反重复失败原则:同根因连续失败时,必须先声明新尝试与上次的差异。
107
-
108
- - **同根因连续失败 ≥ 2 次** → 必须先停手,**书面声明**本次重试与上次的差异
109
- - 未声明差异即重试 → 触发 `E010_repeatedFailurePattern`,发布编排流程应主动暂停,等待用户输入差异声明
110
-
111
- 例:场景 C 中 NPM_TOKEN 失效连续两次 fail,第二次失败后必须先确认 token 已真正更新(粘贴新 token 的尾 4 位摘要 / GitHub Secrets 更新时间),再继续。
112
-
113
- ---
114
-
115
- ## 与 github-npm-ops skill 的关系
116
-
117
- 本文件是发布编排视角下的失败恢复入口;更细粒度的失败案例(如 EUSAGE / E422 / provenance 错误码、package.json 字段错误)见 `troubleshooting-playbook.md`。
118
-
119
- | 失败位置 | 看本文件 | 看 github-npm-ops troubleshooting-playbook |
120
- |---------|---------|---------------------------------------|
121
- | Phase 1–6 编排逻辑层面 | ✅ | ❌ |
122
- | release.yml 内部步骤的具体错误码 | ❌ | ✅ |
123
- | npm 错误码(E403 / E404 / E422 / EUSAGE) | ❌ | ✅ |
@@ -1,227 +0,0 @@
1
- # Issue 与 PR 分诊手册
2
-
3
- 标签体系、分诊节奏、社区 PR 质量线与 stale 策略的落地细节。SKILL.md 中保留的是每天会用的动作,这里覆盖边界与模板。
4
-
5
- ## 标签体系
6
-
7
- 建议仓库标签按维度分组,而不是一股脑堆平。
8
-
9
- ### 类型标签(必须有一个)
10
-
11
- | 标签 | 含义 |
12
- | ------------------ | --------------------------------------- |
13
- | `bug` | 功能不符合预期或文档 |
14
- | `feature-request` | 新功能请求 |
15
- | `enhancement` | 现有功能的改进 |
16
- | `documentation` | 文档相关 |
17
- | `question` | 使用类问题(非 bug) |
18
- | `duplicate` | 与其他 issue/PR 重复 |
19
- | `invalid` | 不适用本项目 |
20
- | `wontfix` | 不会修(给清晰理由) |
21
- | `good-first-issue` | 适合新贡献者 |
22
-
23
- ### 优先级(可选,用于 bug/feature-request)
24
-
25
- | 标签 | 含义 |
26
- | ------------------- | ------------------------------------------------ |
27
- | `priority:critical` | 生产破坏、安全事件;24h 内响应 |
28
- | `priority:high` | 显著影响主要用户;1 周内处理 |
29
- | `priority:medium` | 影响部分用户或体验;按 sprint 排期 |
30
- | `priority:low` | 外观/轻微改进;有空再说 |
31
-
32
- ### 模块/领域(自定义)
33
-
34
- 根据项目结构给领域标签,例如 `area:cli`、`area:templates`、`area:skill-creator`。方便按模块聚合。
35
-
36
- ### 状态标签
37
-
38
- | 标签 | 含义 |
39
- | ------------------- | ------------------------------------------- |
40
- | `needs-repro` | 等复现步骤 |
41
- | `needs-design` | 需要设计讨论再 coding |
42
- | `needs-review` | PR 等评审 |
43
- | `blocked` | 被其他 issue/上游依赖阻塞 |
44
- | `stale` | 长时间无活动 |
45
- | `closed-stale` | 因无活动被关闭 |
46
-
47
- ## Issue 分诊流程
48
-
49
- 1. 读 title、body、comments,判断类型
50
- 2. 搜重复:`gh issue list --search "关键词" --state all --limit 20`
51
- 3. 打 **类型** 标签,必要时加 **优先级** 和 **领域**
52
- 4. 根据缺失信息回复:
53
- - bug 缺复现:问复现步骤、系统信息、复现率
54
- - feature-request:问具体 use case,是否有 workaround
55
- - question:直接回答或指向文档
56
-
57
- ### 回复模板
58
-
59
- **要求复现**
60
-
61
- > Thanks for the report. Could you share a minimal reproduction? Please include:
62
- > - Command you ran and full output
63
- > - Node version (`node -v`) and OS
64
- > - Contents of relevant config files
65
- > Without this we can't investigate further.
66
-
67
- **标记重复**
68
-
69
- > This looks like a duplicate of #XXX. Closing here, please follow the original for updates. Thanks!
70
-
71
- **转为 discussion**
72
-
73
- > This is more of a usage question than a bug, moving to Discussions where the community can chime in.
74
-
75
- ### 大批量分诊节奏
76
-
77
- 每天或每两天扫一次 open issue:
78
-
79
- ```bash
80
- # 没有 type 标签的都要处理
81
- gh issue list --state open \
82
- --search "no:label" \
83
- --limit 50
84
- ```
85
-
86
- ## PR 审查流程
87
-
88
- ### 撰写或更新 PR 交付说明
89
-
90
- 仅在用户已请求 PR 交付时使用;本节不新增 PR 创建/合并权限,也不让每个开发任务强制产生 PR。
91
-
92
- 正文先用最小的差异图、调用树、伪代码或文本结构图解释实际变化,再给改前/改后可核验的行为与验证证据。链接源工件和固定 commit,不复制整份 Spec。列出范围内完成项、保留项、行为变化、未运行检查、失败/风险以及明确回退路径。
93
-
94
- 合并风险区分可逆代码变化与不可逆数据/外部动作,说明事故半径、兼容性、持久化和在途任务影响;“CI 通过”不等于生产或真实 Agent 已验证。发布、部署、归档、永久知识写入仍走各自授权,不从创建 PR 推断允许合并或发布。
95
-
96
- ### 入场检查(收到 PR 后 24h 内)
97
-
98
- 1. CI 是否全绿:`gh pr checks <N>`
99
- 2. 是否可合并:`gh pr view <N> --json mergeable,mergeStateStatus`
100
- 3. 是否有描述、是否关联 issue
101
- 4. 是否来自新贡献者(给欢迎评论)
102
-
103
- ### 评审维度(深度审查时)
104
-
105
- - **目的对齐**:PR 是否解决了声明的 issue
106
- - **实现**:是否符合项目约定(见 AGENTS.md / CONTRIBUTING.md)
107
- - **测试**:新功能/bug 修复是否带测试
108
- - **文档**:面向用户的变更是否更新了 README/docs
109
- - **兼容性**:是否有破坏性变更,是否在 PR 描述里标注
110
-
111
- ### 合并决策
112
-
113
- CI 全绿 + 至少一位 maintainer approve + 无 `blocked`/`needs-design` 标签 → 可合并。
114
-
115
- ```bash
116
- # Squash merge(默认策略)
117
- gh pr merge <N> --squash --delete-branch
118
-
119
- # Merge commit(保留完整历史)
120
- gh pr merge <N> --merge --delete-branch
121
- ```
122
-
123
- ## Stale 策略
124
-
125
- ### 判断规则
126
-
127
- - **Issue**:14 天无活动 → 加 `stale` 并询问
128
- - **PR**:7 天无 review/comment → 主动询问是否继续
129
- - **Stale → Closed**:再 14 天无响应 → 关闭并加 `closed-stale`
130
-
131
- ### 自动化(推荐)
132
-
133
- 用 [`actions/stale`](https://github.com/actions/stale):
134
-
135
- ```yaml
136
- name: Mark Stale
137
-
138
- on:
139
- schedule:
140
- - cron: '30 1 * * *'
141
-
142
- jobs:
143
- stale:
144
- runs-on: ubuntu-latest
145
- permissions:
146
- issues: write
147
- pull-requests: write
148
- steps:
149
- - uses: actions/stale@v9
150
- with:
151
- days-before-issue-stale: 14
152
- days-before-issue-close: 14
153
- days-before-pr-stale: 7
154
- days-before-pr-close: 14
155
- stale-issue-label: 'stale'
156
- stale-pr-label: 'stale'
157
- close-issue-label: 'closed-stale'
158
- close-pr-label: 'closed-stale'
159
- stale-issue-message: >
160
- 此 issue 已 14 天无更新。如仍需关注请留言,否则 14 天后将自动关闭。
161
- stale-pr-message: >
162
- 此 PR 已 7 天无更新。如仍在推进请留言,否则 14 天后将自动关闭。
163
- exempt-issue-labels: 'pinned,priority:critical,priority:high'
164
- exempt-pr-labels: 'pinned,work-in-progress'
165
- ```
166
-
167
- ### 手动查询
168
-
169
- ```bash
170
- # 找超过 14 天未更新的 open issue
171
- gh issue list --state open \
172
- --json number,title,updatedAt \
173
- --jq '.[] | select(.updatedAt < "2026-04-26")' | head -20
174
-
175
- # 找超过 7 天未更新的 open PR
176
- gh pr list --state open \
177
- --json number,title,updatedAt,author \
178
- --jq '.[] | select(.updatedAt < "2026-05-03")'
179
- ```
180
-
181
- ## 社区 PR 特殊处理
182
-
183
- ### 新贡献者检测
184
-
185
- 看 PR 作者历史:
186
-
187
- ```bash
188
- gh pr view <N> --json author,authorAssociation
189
- # authorAssociation: FIRST_TIME_CONTRIBUTOR / CONTRIBUTOR / MEMBER
190
- ```
191
-
192
- 首次贡献者给热情的欢迎评论,附:
193
-
194
- - CONTRIBUTING 链接
195
- - 本地跑测试的命令
196
- - 告知 review 时长预期
197
-
198
- ### CLA / DCO
199
-
200
- 若仓库要求 CLA 签署或 DCO signoff,PR 里会有 bot 检查。未签署的:
201
-
202
- > Thanks for the PR. Our CLA bot needs you to sign the agreement before we can merge. You should see a comment above with instructions.
203
-
204
- ### 驳回时保持尊重
205
-
206
- 即使方向不对也要说明清楚:
207
-
208
- > Thanks for taking the time on this. After discussing with the team, we've decided not to go this direction because [原因]. The alternative we're considering is [方案]. Closing this PR, but would love to hear your thoughts in [issue link].
209
-
210
- ## 每周例行巡检
211
-
212
- 一个典型的周一清单:
213
-
214
- ```bash
215
- # 1. 未分诊的 issue
216
- gh issue list --state open --search "no:label" --limit 20
217
-
218
- # 2. 超过 7 天无 review 的 PR
219
- gh pr list --state open --json number,title,updatedAt \
220
- --jq '.[] | select(.updatedAt < "YYYY-MM-DD")'
221
-
222
- # 3. 本周合并统计
223
- gh pr list --state merged --base main --search "merged:>YYYY-MM-DD"
224
-
225
- # 4. 关注 critical/high 标签的未解决 issue
226
- gh issue list --label "priority:critical,priority:high" --state open
227
- ```