zhouyilab-testing

SkillMedia

Lets your agent design and run regression tests for ZhouYiLab charting and analysis code changes.

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the zhouyilab-testing skill

About this skill

Design regression tests, run examples, and verify reports for ZhouYiLab charting or analysis changes, distinguishing standalone baselines from contract checks.

What this skill tells your AI

The instructions your AI receives, as published by banderzhm/zhouyilab in skills/zhouyilab-testing/SKILL.md and read by ahel’s review.

回归与示例分离

  • tests/ 放独立回归目标并注册 CTest;examples/ 演示真实入口与完整排盘报告,不承担另一份算法或大量断言语料。测试链接生产模块,不复制生产算法算“预期”。
  • 固定预期注明参考来源、输入历法、地点/时间口径及流派。修复前保留失败案例;不能因新结果不同就自动刷新预期,也不能只看报告读起来合理。
  • 每条新规则覆盖成立、不成立、边界和组合场景,检查方向、参与位置、角色互斥、来源去重及原局/岁运一致性。半合不能当三合成化,同支/同柱/自刑按条件分别断言。
  • 例如盲派跨层修复可保留 2023 三合、2033 三刑、2025 争合、2017 自刑/交运/填实这组结构回归;它们验证规则检出,不证明个人事件可预测。
  • 所有时间入口检查未提供 location 时原时间不变、有地点时统一修正、跨日/节气及无效日期。新增报告字段同时检查 JSON、中文映射和 Markdown 表格,验证结果而非仅检查字段存在。

执行与隔离

cmake -S . -B build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON
cmake --build build --config Debug --parallel
ctest --test-dir build -C Debug --output-on-failure --no-tests=error

首次配置还须按实际平台选择编译器、生成器及模块模式;不得混用已有构建目录的工具链。

  • CTest 报告工作目录在 build/tests/reports/<术数>/。手工运行测试也用隔离目录,不能覆盖源码 docs/。用户要求更新示例 txt 时才运行对应输出流程并核对目标路径。
  • 修改 C++ 模块至少构建受影响目标并运行相关测试;公共契约、基础规则、构建链路变更运行全量现有回归及示例编译。
  • 现有三套 CTest 为紫微、奇门、梅花,详见 tests/README.md;其他模块若缺独立测试应补测试,不以“全量 CTest 通过”声称所有术数均有覆盖。
  • 编译、链接、执行、独立预期逐值核对、穷举契约检查和展示检查分别记录。性能提升若没有测量,只能说明减少了哪些重复工作,不报虚构百分比。

Signals

GitHub stars
132
Forks
47
Last commit
Sep 2026
Advanced
Item type
skill
Key
zhouyilab-testing
Source
github.com/banderzhm/zhouyilab