Commit Graph

2 Commits

Author SHA1 Message Date
何开元 00f2eab716 feat(gatekeeper): add optional advisory flags (soft layer, default-off, deterministic)
Add a complementary soft layer to the hard gates: advisory_flags surface
governance hints (e.g. oversized-but-not-blocked PRs -> suggest splitting) in
the scorecard WITHOUT affecting score or verdict. Hard gates stay the real
teeth; advisory leaves the call to humans.

- additive & backward-compatible: default off; policies lacking the section
  behave exactly as before (verified: default policy on real PR #275 yields
  zero advisory section, PASS 87/100 unchanged)
- deterministic: consumes only already-collected PR data (no wall-clock input),
  preserving same-input -> same-score -> same-verdict
- first flag large_pr_files (changed-files >= threshold) answers the
  166-open-PR backlog reality where big PRs should be flagged, not blocked
- evaluate_advisory_flags() is separate from score_dimensions/decide_verdict;
  the 5-dim scoring and verdict logic are untouched
- 7 new unit tests (15 total) incl. an invariant that enabling advisory does
  NOT change total/verdict; verified live on real open PR #275
- REFERENCE.md 1.9 + gatekeeper.yaml + verification.md E + demo scorecard

Extends the merged gatekeeper line (#90 skill -> #219 workflow -> #220 issueops).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 09:27:32 -07:00
何开元 3255884c6e feat(skills): add gitlink-gatekeeper — Policy-as-Code PR merge gate
新增 gitlink-gatekeeper Skill:版本化 gatekeeper.yaml 策略 → 5 维 0-100 评分卡
→ 三态裁决(PASS/REQUEST_CHANGES/COMMENT)→ 建议性 common 评论回写。默认 dry-run、
绝不自动合并。复用 pr +view/+files/+diff、pr +comment、ci +builds、label(已并入 master)。

- SKILL.md(六步工作流)+ REFERENCE.md(gatekeeper.yaml 全字段 + 评分算法 + CLI 映射)
  + TROUBLESHOOTING.md(12 问)
- examples/:3 套策略预设 + 评分卡样例 + 3 个可逐位复算的裁决记录(90/38/68)
- skills/README.md 登记一行

按 #90 review 重做:基于最新 master 的单个干净 commit,仅含 skill 文档,
不含 gitlink-cli 二进制(.gitignore 已排除)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 00:05:29 -07:00