build-test
它能做什么
检查你的代码能否正常运行,以及测试是否通过。它会运行命令来检查错误并执行测试,告诉你一切是“通过”还是“失败”。
适用场景
- ✓修改代码之后。
- ✓提交你的工作之前。
- ✓在继续下一步之前,确认一切运行正常。
技能链接
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/build-test/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“检查一下代码和测试是否正常运行。”
每周 5 个新技能,1 分钟读完。
工作原理
它会运行你项目中定义好的构建和测试命令,然后告诉你构建和测试是否成功。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build test
Spec §20.2 / §22.4: the "subjective critique-theater panel" is
not enough on its own — a code-migration / tune-collab run must
prove the build still passes. This atom shells out to the
project's declared test commands and emits structured signals the
devloop's until evaluator reads.
Inputs
- The active target stack (recorded in
code/index.json+plan.md's targetStack block). - The user's optional override (
od plugin run --input testCommand='pnpm test').
Default commands by framework
| framework | typecheck | test |
|---|---|---|
| next | pnpm typecheck |
pnpm test |
| vite | pnpm typecheck |
pnpm test |
| remix | pnpm typecheck |
pnpm test |
| custom | (read from package.json.scripts) |
(read from package.json.scripts) |
Output
project-cwd/
└── critique/
├── build-test.json # { build: 'passing' | 'failing', tests: 'passing' | 'failing' | 'skipped', durationMs, commandsRun: [...], failures: [...] }
└── build-test.log # raw stdout / stderr (truncated to the runner's logBudgetBytes limit, default 1 MiB)
The atom emits two signals the devloop reads:
build.passing: boolean— the typecheck command exited 0.tests.passing: boolean— the test command exited 0.
Plus the legacy critique.score so existing pipelines that read
the score keep working: 5 when both pass, 3 when only build
passes, 1 when both fail.
Convergence
Pipelines wire the atom into a devloop:
{
"id": "verify",
"atoms": ["patch-edit", "build-test"],
"repeat": true,
"until": "(build.passing && tests.passing) || iterations >= 8"
}
Anti-patterns the prompt fragment forbids
- Running tests on a partially-edited working tree (the atom
always runs after
patch-edit, and only whenplan.steps's current step is incompletedstate). - Suppressing test failures by changing test files; that violates the rewrite-plan ownership rule.
- Setting
tests: 'skipped'without a non-emptyreasonfield.
Status
Implemented by the daemon runner in
apps/daemon/src/plugins/atoms/build-test.ts. It executes the configured
build and test commands, bounds runtime and captured logs, and persists the
report and log outputs above.
常见问题
“构建”和“测试”是什么意思?
“构建”是检查你的代码编写是否正确(没有拼写错误或语法错误)的过程。“测试”是运行自动化检查,看代码的功能是否符合预期。
如果出现失败会怎样?
如果“构建”或“测试”失败,它会通知你。你需要先修复代码中的错误,才能继续。
它怎么知道要运行哪些命令?
它会使用你所用项目类型(比如 Next、Vite 等)的默认命令,或者读取你在项目文件中定义的命令。
详情
作者的原始描述
Run the project's build / typecheck / lint / test commands and emit the build.passing + tests.passing signals devloop convergence reads.
repo: nexu-io/open-design
热度
- GitHub 星标
- 101k
- 排名
- #978
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/15
评论
- …