github hyhmrright/brooks-lint v0.8.5
v0.8.5 — Structural Refactor & Scripts CI

latest releases: v1.3.0, v1.2.3, v1.2.2...
one month ago

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 inventoryskills/_shared/source-coverage.md now carries a YAML frontmatter books: list. validate-repo.mjs derives 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 functionsscripts/validate-repo.mjs reorganized 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 countsPRODUCTION_RISK_COUNT = 6 and TEST_RISK_COUNT = 6 replace magic numbers in both validate-repo.mjs and run-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.md has ## Setup and ## Process sections, and every mode guide references the Iron Law. Structural regressions in skills are now caught automatically.
  • 📦 scripts/frontmatter.mjsparseFrontmatterBooks() extracted to a standalone module. Both validate-repo.mjs and the new test file import it without triggering side effects.
  • scripts/run-evals.mjs — Structural validator for evals/evals.json: checks sequential IDs, required fields, and risk code presence in expected_output. Run via npm run evals.
  • 🔬 scripts/validate-repo.test.mjs — 10 unit tests for parseFrontmatterBooks using Node.js built-in assert. No test framework required; run via npm 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 frontmatter books: 列表。validate-repo.mjs 从中动态推导书目数量和所有词形变换。新增一本书只需编辑这一个文件,校验器其他地方自动适配。消除了审计发现的 Shotgun Surgery(R2)。
  • 🏗️ 校验器重构为具名检查函数scripts/validate-repo.mjs 从 250 行平铺脚本重组为 12 个具名分类函数(checkVersionConsistencycheckSkillsContentcheckEvalSuite 等),每个函数职责单一,调用处读起来像检查清单。解决了自审发现的认知过载问题(R1)。
  • 🔢 具名常量替代魔法数字PRODUCTION_RISK_COUNT = 6TEST_RISK_COUNT = 6validate-repo.mjsrun-evals.mjs 中统一替代硬编码数字。新增风险类别只需在各脚本改一行,无需全局 grep。
  • 🧪 Skills 内容 CI:校验器现在断言每个 SKILL.md 都有 ## Setup## Process 段落,每个模式指南都引用 Iron Law。Skills 的结构性退化可被自动捕获。
  • 📦 scripts/frontmatter.mjsparseFrontmatterBooks() 提取为独立模块。validate-repo.mjs 和新测试文件均可导入,无副作用触发。
  • scripts/run-evals.mjsevals/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-marketplace

Full changelog / 完整变更日志: CHANGELOG.md

Don't miss a new brooks-lint release

NewReleases is sending notifications on new releases.