Repository navigation
docs(skills): add development review checks - #323
Conversation
# 📝 Documentation - Apply development principles through concrete evidence and explicit boundaries. - Add contributor verification and follow-up review guidance from issue redai-studio#321. - Calibrate severity and remove mechanical refactoring, fallback, and ML checklist advice. - Preserve the existing code-review skill as the shared review entrypoint. Co-authored-by: Codex <[email protected]>
Nyanpasu 审查看板审查状态: ✅ 已通过 审查版本: 6b596da 目标分支: main 新 head 6b596da 在合并 main(5b3d4b37,未触及 skills/)之后新增内容提交「docs(skills): ground review in user contracts」:SKILL.md 重构为 83 行共享入口并以 Review Lenses 表加载全部 7 个 references(新增 test-quality-checklist.md);development-checklist 增加产品/验收边界与 CLI 契约检查;python-ml-checklist 增加 Learning Semantics 章节。已复核新增内容相对已通过版本 ceef39b 的完整 diff、全部引用与锚点、跨文件口径一致性、PR 描述与实际内容的逐条对应性;未发现需要修改的问题。CI 必需检查仍在运行(无失败),文档变更无需训练/GPU 测试。
没有未解决的审查问题。 提交范围 · 接收 7 · 建议移出 0 · 待确认 0接收 7 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
精简审查与验证依据
生产代码的必要性与替代方案
Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.
|
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:APPROVE
本 PR 为纯文档变更,仅更新 skills/code-review/ 下的 6 个 Markdown 文件,重构代码审查技能的开发原则、证据与判断标准,方向与 #321 一致。
审查要点:
- 内容内部一致:
SKILL.md底部引用表与新章节(新增「Evidence and Judgment」「Contributor Evidence」「Follow-up Reviews」)对应;各 checklist 新增的Contents:锚点均能正确解析到实际标题。 - 严重度分级、REQUEST_CHANGES/COMMENT/APPROVE 建议与 GitHub 事件解耦的表述清晰、无矛盾。
- 无正确性、兼容性、安全或分布式相关风险;不涉及运行时代码,无需训练/GPU 测试。
CI 单元测试仍在进行中,但与本文档变更无关。无可执行的审查发现。
# 📝 Documentation - Remove the external project attribution from development principles. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:APPROVE
已在新 head(1b5d3aa6)完成复审。本次 synchronize 新增的提交仅从 solid-checklist.md 的「Development Principles」章节删除一行外部项目署名,为纯文档修改。
- 原则表格独立成立,删除后无残留失效引用或断链;
- 此前审查的其余 5 个文件内容未变,结论继续有效;
- 不涉及运行时代码,无正确性/兼容性/安全/分布式风险,无需训练或 GPU 测试。
无可执行的审查发现。
# 📝 Documentation - Trace requirements to official tasks and confirmed decisions before adopting contributor or bot expansions. - Review the necessity of new behavior through input contracts, real use cases, and removal consequences. - Separate impact severity from acceptance blockers and require evidence for blocking P2 findings. - Add calibration examples and ask contributors to investigate recurring causes across their changes. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
已完成对 0ddf986a 的复审,未发现需要修改的问题。新增指导明确区分需求依据、行为必要性与问题严重度,三个校准示例与正文一致,并保留既有契约和外部输入校验的适用边界。
本地增量 git diff --check 与当前提交的 Pre-commit CI 均通过;其余 CI 仍在运行。本次仅修改 Markdown,未运行训练或多节点 GPU 测试,也未验证实际 bot 回放效果。
# 📝 Documentation - Merge overlapping design, SOLID, smell, and refactoring guidance into one principles table. - Retain caller-contract, interface, ownership, and dependency checks with three short calibration examples. - Remove task-specific examples and repeated workflow guidance; keep necessity and provenance checks in the main skill. - Explicitly check existing project capabilities before accepting new behavior. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
已复审 2faaa675,未发现需要修改的问题。合并后的原则表保留了调用契约、接口职责、状态归属与依赖检查;正文仍要求核实需求来源、反证和验证依据,未发现被删除章节的残留引用。
本地增量 git diff --check 和当前提交的 Pre-commit CI 通过,其余 CI 尚在运行。本次仅改 Markdown,未运行训练或多节点 GPU 测试;实际 bot 回放效果未验证。
# 📝 Documentation - Restore the explicit preference for pure functions and immutable data while keeping the boundary for justified tensor mutation. - Retain composition and delegation over inheritance, including the repository's depth limit, in the consolidated principles table. Co-authored-by: Codex <[email protected]>
# 📝 Documentation - Restore the original SOLID checklist byte for byte, including its code smells and refactoring heuristics. - Add a separate development checklist for necessity, input contracts, existing capabilities, and development principles. - Load development and SOLID checks as separate workflow steps and update resource references. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
已复审 9c94939d,未发现需要修改的问题。独立的 development checklist 已接入流程;SOLID 文件与 PR 前版本逐字节一致,正文仍要求以具体证据判断问题,避免仅凭设计偏好提出修改。
已本地核对全部 6 个 checklist 引用、流程编号及增量 git diff --check;当前提交的 Pre-commit CI 通过,其余 CI 尚在运行。纯 Markdown 变更未运行训练或多节点 GPU 测试,实际 bot 回放效果未验证。
# 📝 Documentation - Check adherence to existing project patterns, user-facing configuration costs, and the effort needed to understand an operation. - Extend existing failure and abstraction guidance to unnecessary compatibility promises and speculative extension points. - Require overdesign findings to identify added maintenance obligations and a smaller alternative meeting the same acceptance criteria. - Keep the original SOLID checklist unchanged. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
已复审 e5d7e3b5,未发现需要修改的问题。新增复杂度检查要求比较实际收益与维护成本,并提出保留验收标准的更小方案;必要配置、既有兼容性和真实故障处理的边界仍明确,与正文的证据要求一致。
本地增量 git diff --check 和当前提交的 Pre-commit CI 通过,其余 CI 尚在运行。纯文档变更未运行训练或多节点 GPU 测试,实际 bot 回放效果未验证。
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:APPROVE
已在新 head ceef39b1(合并 main 的 merge commit)完成复审。PR 相对 main 的 diff 与上一轮已通过的 e5d7e3b5 逐字节一致,main 侧新提交未涉及 skills/;已复核 SKILL.md 步骤接线与引用表、四个 checklist 的 Contents 锚点、removal-plan.md 引用的严重度定义,solid-checklist.md 保持与 main 一致。当前 head 的 Pre-commit 与 Python 单测 CI 通过,两个 GPU 集成测试仍在运行(仅覆盖 main 侧代码,与本次 Markdown 变更无关)。未发现需要修改的问题。
审查看板:#323 (comment)
# 🔩 Chore - Merge main at 823941b into the existing PR323 history without conflicts. - Preserve the PR's development checks and original SOLID checklist. - Validate the merged tree with all pre-commit hooks. Co-authored-by: Codex <[email protected]>
# 📝 Documentation - Keep the review agent responsible for understanding and investigation, and replace procedural repetition with focused review references. - Expand necessity checks for product versus acceptance boundaries, CLI contracts, user documentation, and smaller behavior-preserving alternatives. - Add test-quality guidance for independent expectations, production execution, mock boundaries, regression evidence, and retained stronger coverage. - Check learning semantics, global denominators, metric definitions, and running costs without prescribing defensive gates or mechanical fixes. - Preserve the original SOLID checklist byte for byte. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:APPROVE
已在新 head 6b596daa 完成复审。本次 synchronize 在合并 main(5b3d4b37,未触及 skills/)之后新增内容提交「docs(skills): ground review in user contracts」,其相对已通过版本 ceef39b1 的变更已全部复核:SKILL.md 重构为 83 行共享入口并以 Review Lenses 表加载全部 7 个 references(含新增 test-quality-checklist.md,引用与锚点均可解析);development-checklist.md 新增产品/验收边界与 CLI 契约检查;python-ml-checklist.md 新增 Learning Semantics 章节;既有 checklist 的校准与新的证据要求口径一致(removal-plan.md 引用的 Severity Levels 保留);solid-checklist.md 与 main 逐字节一致(sha256 核对),PR 描述各 How 要点与实际内容逐条对应。未发现需要修改的问题。当前 head 的必需 CI 仍在运行且无失败;纯文档变更无需训练/GPU 测试。
审查看板:#323 (comment)
…er-profiler Brings in upstream/main 653c43c..dce533b (redai-studio#257, redai-studio#258, redai-studio#285, redai-studio#323, redai-studio#330, redai-studio#335, redai-studio#408, redai-studio#409, redai-studio#412, redai-studio#414, redai-studio#416, redai-studio#417, redai-studio#419-redai-studio#421, redai-studio#424, redai-studio#426, redai-studio#427, redai-studio#430, and 42 commits synced on 10-12 without PR numbers). The only conflict is relax/utils/env.py: cc4b052 adds the DeepSeek-V4 MXFP4 QAT variables at the same spot where this branch adds the straggler profiler variables. Resolved by keeping both blocks, straggler first.
What
完善 Relax 的代码审查技能,让审查同时回答三个问题:改动是否必要、用户得到什么、测试究竟证明了什么。在现有 SOLID 审查之外,增加独立的开发原则与测试质量检查,并加强机器学习语义和验证证据的审查。
skills/code-review/下的七个 Markdown 文件。references/solid-checklist.md保持原文逐字节不变;新增检查独立维护。Why
结构和语法检查容易漏掉不必要的产品限制、含义不清的 CLI、不一致的训练语义,以及由 mock 替代被测能力的测试。本 PR 将 #257、#258 中的审查经验整理为有适用边界的检查提示和示例,贡献者分析与验证要求遵循 #321。
How
新增需求必要性与用户契约审查
新增
references/development-checklist.md,在 SOLID 检查之前确认需求来源、可观察行为、现有能力复用和维护成本。调用方和测试本身不能证明新行为有必要;判断过度设计时,需要说明必要行为、额外维护负担,以及能保留必要行为的更小方案。区分框架支持的正常行为与一次验收实验的要求,避免把固定数据规模、预定批次或精确重放等实验条件变成正常训练的限制。检查 CLI 的概念、单位、默认值和交互关系,以及数据处理策略、中英文用户指南和 PR 描述是否与实现一致;保留真实输入校验、pair 完整性、DP 分区正确性,以及初始化和恢复时的参考模型身份检查。
新增测试质量审查
新增
references/test-quality-checklist.md,检查预期结果是否来自独立依据、测试执行了哪些生产路径、mock 替换了什么,以及回归测试能否让原始错误版本因目标问题而失败。例如,假 loader 自己恢复模型、优化器、调度器和 RNG 后再比较 loss,无法证明生产 save/load 路径的恢复正确性。合并或删除测试时,需要明确保留了哪些更强的覆盖,以及它们能检测的独立失败模式。
强化机器学习语义检查
扩展
references/python-ml-checklist.md,覆盖监督 token 范围、输入位置与 next-token 目标的坐标偏移、pair/branch/sample/token 计数、全局分母与后端梯度缩放、梯度路径、指标定义、尾批次和重复采样。用独立的小规模数值案例确认算法语义,避免把“运行成功”当作计算正确的证据。同时明确
.detach()与 CPU 标量读取解决的问题不同,避免为移除计算图而在训练热路径引入.item()等同步操作。分布式检查关注所选进程组的共同参与和兼容调用,空分母的处理由实际契约决定。校准既有检查,减少机械误报和无依据的修改建议
调整 Python、性能、安全和删除计划的检查提示。函数长度、重复次数、hash、mock 和覆盖率只能作为调查线索;报告问题需要可触发的失败或具体维护负担,不能仅为满足 checklist 而要求拆函数、加缓存、加锁、补 fallback 或添加 epsilon。
评估扫描、hash、数据复制和额外 forward 的实际规模、执行频率及其保证,检查上层是否已经负责校验、重试或清理。严重程度按实际影响判断,文档错误也可能导致启动失败、训练错误或不安全的恢复。
精简审查入口,完善证据与复审规则
主
SKILL.md从 125 行缩减为 83 行,作为共享入口按改动范围加载七份参考文档。审查 agent 自主理解代码并选择调查方式,skill 提供判断依据,通用调度和发布流程由调用方负责。审查意见需包含位置、相关需求或契约、触发条件或具体影响,以及最小下一步。区分作者报告的结果与审查者独立验证的结果,并记录验证版本和限制。复审核对修复与原问题的对应关系,复用已有讨论线程,避免重复报告未变化的问题或不断追加无关的可选润色;已有授权时继续处理,不强制追加修复确认流程。
Validation
内容验证版本:
6b596da。以下沿用本 PR 已记录的验证结果:skill-creator/scripts/quick_validate.py通过。uvx --python 3.12 pre-commit run --all-files --show-diff-on-failure通过。git diff --cached --check和git diff --check通过。Type of Change