意图工作流修复
haiku-repair
重建损坏的漂移基线(drift baseline)、重新定位错放的 worktree,或为已合并的意图分支向主线提交 PR。
- License 许可
- Apache-2.0
- 最近更新
- 2026-05-30
- Stars
- ★ 29
- Forks
- 11
01 前言 Front Matter
- name
- haiku-repair
- description
- Rebuild a corrupted drift baseline, relocate misplaced worktrees, or open PRs against mainline for already-merged intent branches
02 资源文件 14
- 参考文档references/domain-conversions.md9.9 KB
- 参考文档references/gum-methodology.md11.6 KB
- 参考文档references/pint-recipes.md8.9 KB
- 参考文档references/plausibility-scales.md11.6 KB
- 参考文档references/reporting-rules.md7.0 KB
- 参考文档references/review.md6.8 KB
- 参考文档references/uncertainties-recipes.md7.9 KB
- 脚本scripts/_common.py22.5 KB
- 脚本scripts/audit_units.py20.7 KB
- 脚本scripts/check_plausibility.py35.9 KB
- 脚本scripts/convert_units.py11.7 KB
- 脚本scripts/format_result.py11.7 KB
- 脚本scripts/propagate_uncertainty.py28.0 KB
- 脚本scripts/uncertainty_budget.py13.7 KB
03 SKILL.md 正文
Repair
Call haiku_repair for one of the three remaining v4 recovery paths.
When to use this skill
haiku_repair under v4 is narrow. Use it for:
- Drift baseline corruption — the drift sweep reports the baseline can't be read or parsed. The repair tool rebuilds the baseline from the unit's current outputs.
- Worktree relocation — older H·AI·K·U builds (pre-2026-04) rooted
.haiku/worktrees/at the agent's cwd instead of the primary repo root. After upgrading, the misplaced worktrees still exist and confuse the engine. Repair migrates them viagit worktree movefor clean trees; dirty ones are reported for manual resolution. - Mainline PR/MR generation — when an intent branch is already merged into mainline but a fixable issue is found, repair pushes a fix commit and opens a PR against mainline.
When NOT to use this skill
Do not run /haiku:haiku-repair to "fix a wedge" on a v4 intent that won't advance. The fixes it once did under v3 — synthesizing state.json, validating active_stage, enforcing status: completed/active on units — are no-ops on v4 intents. v4 derives stage position from disk (unit FM + branch topology), has no state.json, and uses iterations + approval stamps instead of unit-level status enums. The v0→v4 migrator runs in-band at haiku_run_next time and handles every schema-shape concern.
If a v4 intent won't advance, the right diagnostic is the loop-guard diagnostic in haiku_run_next's response (writes to $TMPDIR/haiku-prompts/{session_id}/loop-guards.log and surfaces a diagnostic: line in the error body). Paste that into a bug report — don't run /haiku:haiku-repair hoping it'll patch something.
Default behavior (git repo)
In a git repository, haiku_repair (no args) scans every intent branch via temp worktrees, applies the narrow fixes above, pushes, and opens PRs when applicable. The loop is sequential because some fixes need user input.
Args
intent: <slug>— repair a single intent in the current working directory only (skips multi-branch mode)apply: false— scan without applying fixes (returns the report only)skip_branches: true— force cwd-only mode even in a git repo
Workflow
- Call
haiku_repairwith the specific concern (drift baseline / worktree / mainline-PR) — passingintent: <slug>if scoped to one intent. - Read the report.
- For anything that needs manual attention, follow the report's per-issue instructions.
If the report is empty on a v4 intent, that's the expected outcome. Repair has nothing to do — the engine handles state in-band.
04 同仓库更多 Skills
H·AI·K·U 单任务执行
haiku-zap
零仪式单单元执行——无需意图或工作流脚手架,直接让单个任务跑完某个阶段的 hat 循环
H·AI·K·U 版本查询
haiku-version
显示当前运行的 H·AI·K·U MCP 二进制版本、插件版本,以及引擎是开发源码构建版还是编译打包版
H·AI·K·U 意图取消归档
haiku-unarchive
取消归档意图——将此前已归档的意图恢复到默认列表中
H·AI·K·U 事件轮询触发
haiku-triggers
轮询已配置的提供者,查找应创建意图或推进门禁的事件
H·AI·K·U 工作室目录浏览
haiku-studios
按类别分组浏览可用的 H·AI·K·U 工作室,并提供指向各工作室定义的帮助链接
Claude Code 状态栏管理
haiku-statusline
安装、移除或预览 H·AI·K·U 自定义的 Claude Code 状态栏——这是一个针对当前活跃意图的单行阶段/流程指示器