Loading...
Loading...
Compare original and translation side by side
Diagnose a build, CI, or deployment failure, choose the safest repair path, and fix it — classify complexity first, then either fix directly or track progress through structured phases.
诊断构建、CI或部署失败,选择最安全的修复路径并完成修复——先分类复杂度,然后直接修复或通过结构化阶段跟踪进度。
Module not foundModule not foundbug-fixsecurity-reviewbug-fixsecurity-reviewbug-fixbug-fixWhat build/CI/deploy failure should be fixed?
- Error message or failing log output
- Build command or CI step that fails
- Full repo build or specific folder/workspace?
- CI provider (GitHub Actions, Vercel, etc.) if applicable
- Regression or new? (Did it work before? When did it start failing?)
- Consistent or intermittent?
- Recent changes, suspect commits, or environment details
- Relevant config files (package.json, tsconfig, CI config, vercel.json, etc.)bug-fixbug-fix需要修复哪些构建/CI/部署失败问题?
- 错误信息或失败的日志输出
- 失败的构建命令或CI步骤
- 是整个仓库构建还是特定文件夹/工作区?
- 适用的CI提供商(GitHub Actions、Vercel等)
- 是回归问题还是新问题?(之前是否正常?何时开始失败?)
- 是持续失败还是间歇性失败?
- 最近的变更、可疑提交或环境细节
- 相关配置文件(package.json、tsconfig、CI配置、vercel.json等)sequential-thinkingsequential-thinking| Complexity | Signals | Examples | Path |
|---|---|---|---|
| Simple | Single file/config, clear error message, obvious root cause, one fix path, low risk | Missing env var, single typo in config, one outdated dependency, clear type error in one file | Fix-now -- proceed directly without flow tracking |
| Complex | Multiple packages/configs involved, dependency chain issues, CI environment mismatch, fix has side effects across workspaces, multiple valid fix strategies | Cross-workspace type error chain, CI-only failure with no local repro, lockfile conflicts across multiple packages, build succeeds but deploy fails | Tracked -- create |
Complexity: [simple/complex] -- [one-line reason]| 复杂度 | 特征 | 示例 | 处理路径 |
|---|---|---|---|
| 简单 | 单个文件/配置、错误信息明确、根本原因明显、仅一种修复路径、低风险 | 缺少环境变量、配置中的单个拼写错误、单个过时依赖、单个文件中的明确类型错误 | 立即修复 -- 直接处理,无需流程跟踪 |
| 复杂 | 涉及多个包/配置、依赖链问题、CI环境不匹配、修复会对工作区产生副作用、存在多种有效修复策略 | 跨工作区类型错误链、仅CI环境出现的本地无法复现的故障、多个包之间的锁文件冲突、构建成功但部署失败 | 跟踪处理 -- 创建 |
复杂度:[简单/复杂] -- [一句话原因]mkdir -p .hypercore/deploy-fix.hypercore/deploy-fix/flow.jsonreferences/flow-schema.mdmkdir -p .hypercore/deploy-fix.hypercore/deploy-fix/flow.jsonreferences/flow-schema.md| Phase | Description | Next |
|---|---|---|
| Reproduce failure, analyze logs, isolate root cause | |
| Present 2-3 fix options with tradeoffs | |
| Wait for and record user selection | |
| Implement selected option | |
| Run build/CI/deploy validation, report outcome | done |
| 阶段 | 描述 | 下一阶段 |
|---|---|---|
| 复现故障、分析日志、定位根本原因 | |
| 提供2-3种修复方案及权衡 | |
| 等待并记录用户选择 | |
| 实施选定方案 | |
| 运行构建/CI/部署验证,报告结果 | 完成 |
.hypercore/deploy-fix/flow.jsonin_progresspendingbug-fixsecurity-review.hypercore/deploy-fix/flow.jsonin_progresspendingbug-fixsecurity-reviewpackage-lock.jsonpnpm-lock.yamltsconfig.jsonpackage.jsonnext.config.*vercel.jsonvercel.ts.next/.turbo/node_modules/.cache/--forcegit loggit diffpackage-lock.jsonpnpm-lock.yamltsconfig.jsonpackage.jsonnext.config.*vercel.jsonvercel.ts.next/.turbo/node_modules/.cache/--forcegit loggit diff| Step | Task | Tool |
|---|---|---|
| 1 | Validate input, sequential-thinking (3 thoughts) | sequential-thinking |
| 2 | Classify as simple | - |
| 3 | Reproduce failure locally, read error output | Bash + Read |
| 4 | Identify root cause from logs/config | Read/Grep/Glob |
| 5 | Announce fix path and implement | Edit |
| 6 | Run validation (build/lint/typecheck/deploy) | Bash |
| 7 | Report outcome and changed files | - |
| 步骤 | 任务 | 工具 |
|---|---|---|
| 1 | 验证输入,执行顺序思考(3步) | sequential-thinking |
| 2 | 归类为简单 | - |
| 3 | 本地复现故障,读取错误输出 | Bash + Read |
| 4 | 从日志/配置中确定根本原因 | Read/Grep/Glob |
| 5 | 宣布修复路径并实施 | Edit |
| 6 | 运行验证(构建/lint/类型检查/部署) | Bash |
| 7 | 报告结果及修改的文件 | - |
| Step | Task | Tool |
|---|---|---|
| 1 | Validate input, sequential-thinking (7+ thoughts) | sequential-thinking |
| 2 | Classify as complex, create | Write |
| 3 | Deep investigation: reproduce, analyze logs, trace dependency chain -> update flow | Bash + Read/Grep/Glob + Edit |
| 4 | Present 2-3 fix options -> update flow | Edit |
| 5 | Wait for user selection -> update flow | Edit |
| 6 | Implement selected option -> update flow | Edit/Write |
| 7 | Run validation -> update flow | Bash + Edit |
| 8 | Report outcome, set flow status to | Edit |
undefined| 步骤 | 任务 | 工具 |
|---|---|---|
| 1 | 验证输入,执行顺序思考(7+步) | sequential-thinking |
| 2 | 归类为复杂,创建 | Write |
| 3 | 深入调查:复现、分析日志、追踪依赖链 -> 更新流程 | Bash + Read/Grep/Glob + Edit |
| 4 | 提供2-3种修复方案 -> 更新流程 | Edit |
| 5 | 等待用户选择 -> 更新流程 | Edit |
| 6 | 实施选定方案 -> 更新流程 | Edit/Write |
| 7 | 运行验证 -> 更新流程 | Bash + Edit |
| 8 | 报告结果,将流程状态设置为 | Edit |
undefined
</option_presentation>
<implementation_rules>
- Do not modify code before user option selection unless in the explicit Fix-now branch.
- Avoid speculative edits; use evidence from build/CI/deploy logs only.
- Keep scope limited to the failing build/CI/deploy path and its direct dependencies.
- Always run targeted validation for the changed path: rebuild the failing target, re-run the failing CI step, or re-trigger the failing deploy.
- Report the commands run, the key result lines, and the touched files in the final report.
- If validation cannot run locally (e.g., CI-only environment), say why and what remains unverified.
</option_presentation>
<implementation_rules>
- 除非在明确的立即修复分支中,否则在用户选择方案前不要修改代码。
- 避免推测性编辑;仅使用构建/CI/部署日志中的证据。
- 范围限制在失败的构建/CI/部署路径及其直接依赖。
- 始终对变更路径进行针对性验证:重新构建失败目标、重新运行失败CI步骤或重新触发失败部署。
- 在最终报告中说明运行的命令、关键结果行以及修改的文件。
- 如果无法在本地运行验证(例如仅CI环境),说明原因以及未验证的内容。undefinedundefined
For complex path: also update `.hypercore/deploy-fix/flow.json` status to `completed`.
</implementation_rules>
<validation>
Execution checklist:
- [ ] ARGUMENT validated
- [ ] sequential-thinking completed (depth matches complexity)
- [ ] Complexity classified (simple/complex)
- [ ] Flow JSON created and maintained (complex path only)
- [ ] Root-cause evidence collected from logs/config
- [ ] 2-3 options presented (complex path) or fix path announced (simple path)
- [ ] User choice confirmed (complex path)
- [ ] Build/CI/deploy validation executed
- [ ] Outcome + touched files reported
- [ ] Flow JSON finalized with `completed` status (complex path only)
Forbidden:
- [ ] Speculative fix without build/CI/deploy log evidence
- [ ] Immediate implementation without options (complex path)
- [ ] Implementation without explicit user choice (complex path)
- [ ] Completion claim without running the failing build/CI/deploy command
- [ ] Skipping flow JSON updates in complex path
</validation>
对于复杂路径:还需将`.hypercore/deploy-fix/flow.json`的状态更新为`completed`。
</implementation_rules>
<validation>
执行检查清单:
- [ ] ARGUMENT已验证
- [ ] 已完成顺序思考(深度匹配复杂度)
- [ ] 已完成复杂度分类(简单/复杂)
- [ ] 已创建并维护流程JSON(仅复杂路径)
- [ ] 已从日志/配置中收集根本原因证据
- [ ] 已提供2-3种方案(复杂路径)或宣布修复路径(简单路径)
- [ ] 用户选择已确认(复杂路径)
- [ ] 已执行构建/CI/部署验证
- [ ] 已报告结果及修改的文件
- [ ] 流程JSON已最终设置为`completed`状态(仅复杂路径)
禁止操作:
- [ ] 无构建/CI/部署日志证据的推测性修复
- [ ] 复杂路径下直接实施修复而不提供方案
- [ ] 复杂路径下未获得用户明确选择就实施修复
- [ ] 未运行失败的构建/CI/部署命令就声称完成
- [ ] 复杂路径下跳过流程JSON更新
</validation>