stim-code-review
刺激复现结果的审核与复核。用于在代码生成完成后,对实现规范性与输出图片进行人工/自动审查、与论文及参考实现对比、检查越界/裁剪问题并产出修改清单。
When & Why to Use This Skill
The stim-code-review skill provides a comprehensive framework for auditing stimulus reproduction results. It automates the verification of code compliance against experimental designs and performs visual quality checks on generated images to ensure consistency with academic papers and reference implementations, effectively identifying discrepancies in implementation logic and visual output.
Use Cases
- Case 1: Validating that generated stimulus code strictly adheres to experimental specifications (exp_design.md) and reference source code parameters.
- Case 2: Performing visual audits of rendered stimuli to ensure geometric, color, and layout consistency with figures provided in academic papers.
- Case 3: Detecting technical rendering issues such as boundary clipping, out-of-bounds graphics, or incorrect unit conversions in visual assets.
- Case 4: Generating structured modification lists and feedback reports to guide the iterative refinement of code and visual outputs before experiment deployment.
| name | stim-code-review |
|---|---|
| description | 刺激复现结果的审核与复核。用于在代码生成完成后,对实现规范性与输出图片进行人工/自动审查、与论文及参考实现对比、检查越界/裁剪问题并产出修改清单。 |
原始刺激复现:Review 与质量审查
最高原则
- Review 的目标是发现规范性与视觉一致性问题,确保输出图像符合论文意图与 exp_design 规格。
- 若
<workspace>/data/提供源代码/参考实现:它是实现逻辑与超参数的最高优先级依据,Review 必须先对齐该来源,再对照论文与 exp_design。 - exp_design.md 仍是主要规格;若与源代码冲突,优先级以 exp_design 中记录的“源代码为最高优先级”裁决规则为准。
输入(按优先级)
<workspace>/data/(源代码/参考实现/配置/参考输出)<workspace>/exp_design.md<workspace>/paper/(论文与参考图)output/(已生成的刺激图像)
工作流(Review 必须执行)
证据收集
- 打开
exp_design.md,确认关键参数、阶段、条件与映射规则。 - 检查
<workspace>/data/是否包含源代码/参考输出,记录其规则与参数来源。 - 收集论文参考图或作者提供的示意图,作为对照基准。
- 打开
代码规范审查
- 验证
config.py/stimuli_config.toml与 exp_design 一一对应,不存在缺失或未注册字段。 - 检查 Renderer 架构、单位转换、随机化、数据加载是否遵循规范(详见
references/verification.md)。 - 确保无 thin wrapper、不使用位置参数、优先
stimkit.collections工厂函数。
- 验证
输出图像审查(必须目视)
- 覆盖所有实验与关键条件(至少每个实验/组别都抽样)。
- 逐张对照论文参考图/源代码输出:几何结构、相对布局、颜色、阶段差异。
- 边界检查:任何图形不得超出画布边界;避免裁剪、越界、被边框截断。
问题记录与回传
- 输出问题清单:问题类型、文件名、条件、期望与观察差异。
- 若发现 exp_design 缺失或冲突,要求先更新 exp_design,再重新 review。
必读参考
- Review 检查清单与示例:
references/verification.md
强制协作规则
- 代码生成完成后,必须调用本 Review 技能进行审核。
- Review 未通过时,禁止继续扩展功能,必须先修复问题并复核。