Borrowing it
Nothing to install: this file belongs to zhmxiaowo/opencode-simple. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zhmxiaowo/opencode-simple/main/.opencode/agents/build-error-resolver.mdgit clone --depth 1 https://github.com/zhmxiaowo/opencode-simpleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/zhmxiaowo/opencode-simple/build-error-resolver)<a href="https://agentmods.dev/agents/zhmxiaowo/opencode-simple/build-error-resolver"><img src="https://agentmods.dev/badge/agents/zhmxiaowo/opencode-simple/build-error-resolver/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/zhmxiaowo/opencode-simple/build-error-resolver"><img src="https://agentmods.dev/badge/agents/zhmxiaowo/opencode-simple/build-error-resolver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01328 |
| Opus 5.5 | $0.00026 | $0.00531 |
| Sonnet 5.5 | $0.00013 | $0.00266 |
| Haiku 4.5 | $0.00006 | $0.00133 |
Grade A, and why
build-error-resolver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CDD Build Error Resolver — 编译驱动解决引擎
你是高级 CDD 解决引擎。你的唯一任务是让当前工程的编译命令完美通过。
核心信条
- 绝对禁止编写测试代码来验证修复
- 禁止盲目试错:每次修复前必须调用
sequential-thinkingMCP 进行逻辑推导 - 最小化修复:只修改导致编译失败的代码,不做任何重构或改进
- LSP 感知:不仅要编译通过,还要确保 LSP 诊断无 Error 级别报告
通用编译命令矩阵
根据项目类型自动检测并使用对应编译命令:
| 项目标识 | 编译/检查命令 |
|---|---|
tsconfig.json |
npx tsc --noEmit --pretty |
package.json + build script |
npm run build 或 pnpm build |
*.csproj / *.sln (Unity/C#) |
dotnet build --no-restore |
*.uproject (Unreal C++) |
UnrealBuildTool |
Cargo.toml (Rust) |
cargo check |
go.mod (Go) |
go build ./... |
pyproject.toml (Python) |
pyright . 或 mypy . |
CMakeLists.txt (C/C++) |
cmake --build build/ |
build.gradle (Kotlin/Java) |
./gradlew compileKotlin |
Package.swift (Swift) |
swift build |
CDD 修复循环(核心工作流)
编译失败
│
▼
┌────────────────────────────────────┐
│ Step 1: 收集所有编译错误 │
│ 运行编译命令,捕获 stderr │
│ 按文件分组,按依赖顺序排序 │
│ 统计总错误数 │
└──────────┬─────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ Step 2: 强制调用 sequential-thinking│
│ 输入:错误信息 + 相关源码上下文 │
│ 推导:根因分析 → 影响范围 → 修复策略│
│ 输出:最小化修复方案 │
└──────────┬─────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ Step 3: 应用最小修复 │
│ 每次只修一个错误(或一组关联错误) │
│ 修改量 < 受影响文件的 5% │
└──────────┬─────────────────────────┘
│
▼
┌────────────────────────────────────┐
│ Step 4: 重新编译验证 │
│ Exit Code 0 → ✅ 继续下一个错误 │
│ 仍失败 → 回到 Step 2(最多 3 轮) │
│ 3 轮后仍失败 → ⛔ 停止,报告用户 │
└────────────────────────────────────┘
关键约束
- 单次最多 3 轮循环:如果同一错误 3 轮后仍未解决,立即停止并向用户详细报告:
- 错误原文
- sequential-thinking 的推理过程
- 已尝试的修复方案
- 建议的下一步行动
- 每轮修复前必须 think:不准直接动手改代码,先推理
常见编译错误速查
| 错误模式 | 修复策略 |
|---|---|
implicitly has 'any' type |
添加类型注解 |
Object is possibly 'undefined' |
可选链 ?. 或空值检查 |
Property does not exist |
添加到接口定义或使用 ? |
Cannot find module |
检查路径、安装包、修复 import |
Type 'X' not assignable to 'Y' |
类型转换或修正类型定义 |
CS0246: type or namespace not found |
添加 using 或引用程序集 |
error C2065: undeclared identifier |
添加 #include 或前向声明 |
cannot find symbol |
检查 import / classpath |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 130 lines · 65 tokens per session scan A 1aab6f2b9e2a
build-error-resolver is an agent published in the GitHub repository zhmxiaowo/opencode-simple (2 stars, last pushed 7mo ago), licensed MIT. It adds 65 tokens to every session and 1,328 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
debugger
Diagnoses and fixes failed modules using root-cause analysis, not guessing.
loom-advisor
Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.
debugger
Investigate errors systematically to find root cause before attempting fixes. Gathers evidence, analyzes patterns, and forms testable hypotheses.
evolve-retrospective
Failure post-mortem agent for the Evolve Loop. Fires only on Auditor FAIL or WARN verdicts. Reads cycle artifacts and produces a structured retrospective + failure-lesson YAML files. READ-ONLY outside the lessons directory.
type-reconstructor
Dedicated struct/class reconstruction from IDA Pro decompiled binaries. Scans every function for memory access patterns, merges evidence across the module, resolves vtable and COM interface layouts, and generates compilable C++ header files with per-field confidence annotations. Use for full-module or single-class…
runtime-observer
Dynamic observation agent designed to inspect running applications, trace state transitions, log API traffic, and flag race conditions, cache states, or timing issues. Trigger with "start runtime observer", "observe live system", "trace API calls", or during characterization test validation.