我最近读了 Writing a good CLAUDE.md | HumanLayer Blog https://github.com/discourse/discourse/blob/main/AI-AGENTS.md,这促使我为我的仪表板插件创建了自己的版本。它与核心版本基本相同,只有一些更改,例如
# JavaScript 测试 - bin/qunit
# 这是一个插件,所以我们必须切换到 discourse 并修改路径
```
cd ~/src/discourse-repos/discourse
bin/qunit --help # 详细帮助
bin/qunit plugin/discourse-pfaffmanager/path/to/test-file.js # 运行文件中的所有测试
bin/qunit plugin/discourse-pfaffmanager/path/to/tests/directory # 运行目录中的所有测试
```
# 代码检查 (Linting)
# 这是一个插件,所以我们必须切换到 discourse 并修改路径
# 注意:--fix 开关可用于修正大多数问题,在考虑其他修复之前应先尝试使用它
```
cd ~/src/discourse-repos/discourse
bin/lint --fix plugin/discourse-pfaffmanager/path/to/file path/to/another/file
bin/lint --fix plugin/discourse-pfaffmanager/path/to/file path/to/another/file
bin/lint --fix --recent # 检查最近更改的所有文件
```
今天我处理了一个主题组件,这让我想起如果没有这样的帮助,人工智能的帮助效果非常差。
主题和插件骨架中是否有计划包含类似内容?