Repository navigation
Releases
Releases · taxueseek/code-gate
V1.0.0 首次发布
首次发布。以前审查这件事要么靠人肉读 diff,要么靠模型自由发挥;现在范围由脚本定死、结论由证据链把关。
更新日志
- 代码把关技能:发布
/code-gate,覆盖工作区改动、远端 PR、分支区间、单次提交与指定路径五类目标,默认只读,不碰工作树资产。 - MECE 四象限:正确性与运行时安全、需求契约与范围边界、复用与结构简化、AI 编码纪律与测试真实度;每条发现只归属一个象限,主责是正确性,顺带做减法。
- 证据链门禁:八不报静默过滤、
CRITICAL/HIGH三件套铁证、四问抗辩复核;存活项标CONFIRMED或PLAUSIBLE,被推翻项不进报告。零发现也是完备交付,不凑数。 - 五档力度:
low/medium/high/xhigh/max只决定过几遍、谁过、报多细,不决定过哪几套规则;档位与--max-findings持久化在~/.code-gate/state.json。 - 动作模式:
--fix闭环修复并逐条回报fixed/skipped/no_change_needed,三轮不收敛就还原;--comment把发现作为行内评论发到远端 PR,发前二次校验提交 SHA 未漂移。 - 确定性底座:一条零 Token 脚本完成状态读取、工作树预检、目标识别、变更文件账本与取数命令生成,输出唯一
review_plan,开局不烧上下文。 - 发布设置:CI 校验技能 frontmatter、清单与版本一致、仓内链接与隐私形状;冒烟测试覆盖作用域脚本的三态准入、档位映射、单次档位与互斥参数。
默认关闭的能力与打开方式
- 独立复核门禁默认只在
high及以上开启;任何档位要强制开启用--verify。 - 写工作区默认关闭,用
--fix打开;碰远端 PR 默认关闭,用--comment打开。两者互斥,同时传会被脚本拒绝。 - 历史追踪默认不做;
xhigh/max才跨文件深追。
依赖
bash 3.2+ 与 git;审远端 PR 另需 gh CLI,缺失时明确报 ERROR 退出,不会假装审完。
Changelog
- Skill:
/code-gatereviews workspace changes, remote PRs, branch ranges, single commits, and paths; read-only by default and never touches your branch or untracked files. - Four quadrants: correctness and runtime safety; spec and scope alignment; reuse and simplification; AI coding discipline. Correctness is the primary responsibility, simplification the secondary.
- Evidence gate: eight negative filters, three-part evidence for every
CRITICAL/HIGH, and a four-point skeptic pass that tags survivorsCONFIRMEDorPLAUSIBLE. Clean reviews are reported as clean. - Five effort tiers decide passes, subagents, verification, and report granularity, never which rules apply. Tier and
--max-findingspersist in~/.code-gate/state.json. - Action modes:
--fixpatches the worktree and reportsfixed/skipped/no_change_neededper item;--commentposts inline PR comments after re-checking the head SHA. - Deterministic base: one zero-token script resolves state, preflight, target, file inventory, and diff commands into a single
review_plan. - Release setup: CI validates skill frontmatter, manifest/version agreement, internal links, and privacy shapes; the smoke test covers eligibility states, tier mapping, one-shot tiers, and conflicting flags.
安装:npx skills add taxueseek/code-gate -g -y · README