A maintenance release that eats its own cooking: every structural issue the four self-review skills surfaced on the validator codebase has been fixed.
🌍 English
Highlights
- 🗂️ Single source of truth for book inventory —
skills/_shared/source-coverage.mdnow carries a YAML frontmatterbooks:list.validate-repo.mjsderives the book count and all word-form checks from it dynamically. Adding a new book requires editing exactly one file; the validator auto-adapts everywhere else. Eliminates the Shotgun Surgery pattern the audit flagged (R2). - 🏗️ Validator refactored into named check functions —
scripts/validate-repo.mjsreorganized from a 250-line flat script into 12 named category functions (checkVersionConsistency,checkSkillsContent,checkEvalSuite, etc.). Each function has a single concern; the call site reads like a checklist. Addresses the cognitive overload finding (R1) from the self-audit. - 🔢 Named constants for risk counts —
PRODUCTION_RISK_COUNT = 6andTEST_RISK_COUNT = 6replace magic numbers in bothvalidate-repo.mjsandrun-evals.mjs. Adding a new risk category is a one-line change per script. No more grep-and-pray updates. - 🧪 Skills content CI — The validator now asserts every
SKILL.mdhas## Setupand## Processsections, and every mode guide references the Iron Law. Structural regressions in skills are now caught automatically. - 📦
scripts/frontmatter.mjs—parseFrontmatterBooks()extracted to a standalone module. Bothvalidate-repo.mjsand the new test file import it without triggering side effects. - ✅
scripts/run-evals.mjs— Structural validator forevals/evals.json: checks sequential IDs, required fields, and risk code presence inexpected_output. Run vianpm run evals. - 🔬
scripts/validate-repo.test.mjs— 10 unit tests forparseFrontmatterBooksusing Node.js built-inassert. No test framework required; run vianpm test.
No breaking changes. Existing .brooks-lint.yaml configs, skill invocations, and short-form commands are untouched.
Install / Upgrade
/plugin marketplace add hyhmrright/brooks-lint
/plugin install brooks-lint@brooks-lint-marketplace🇨🇳 简体中文
一个"自食其果"的维护版本:四个自审 skill 对 validator 代码库跑出的所有结构性问题,全部在本次修复。
亮点
- 🗂️ 书单的单一数据源:
skills/_shared/source-coverage.md现在携带 YAML frontmatterbooks:列表。validate-repo.mjs从中动态推导书目数量和所有词形变换。新增一本书只需编辑这一个文件,校验器其他地方自动适配。消除了审计发现的 Shotgun Surgery(R2)。 - 🏗️ 校验器重构为具名检查函数:
scripts/validate-repo.mjs从 250 行平铺脚本重组为 12 个具名分类函数(checkVersionConsistency、checkSkillsContent、checkEvalSuite等),每个函数职责单一,调用处读起来像检查清单。解决了自审发现的认知过载问题(R1)。 - 🔢 具名常量替代魔法数字:
PRODUCTION_RISK_COUNT = 6和TEST_RISK_COUNT = 6在validate-repo.mjs和run-evals.mjs中统一替代硬编码数字。新增风险类别只需在各脚本改一行,无需全局 grep。 - 🧪 Skills 内容 CI:校验器现在断言每个
SKILL.md都有## Setup和## Process段落,每个模式指南都引用 Iron Law。Skills 的结构性退化可被自动捕获。 - 📦
scripts/frontmatter.mjs:parseFrontmatterBooks()提取为独立模块。validate-repo.mjs和新测试文件均可导入,无副作用触发。 - ✅
scripts/run-evals.mjs:evals/evals.json结构验证器,检查顺序 ID、必填字段和expected_output中的风险代码引用。通过npm run evals运行。 - 🔬
scripts/validate-repo.test.mjs:10 个针对parseFrontmatterBooks的单元测试,使用 Node.js 内置assert,无需测试框架,通过npm test运行。
无破坏性变更:现有 .brooks-lint.yaml 配置、skill 调用方式和短命令均不受影响。
安装 / 升级
/plugin marketplace add hyhmrright/brooks-lint
/plugin install brooks-lint@brooks-lint-marketplaceFull changelog / 完整变更日志: CHANGELOG.md