harness-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHarness Update Skill
Harness 更新 Skill
Safely update projects with existing harness to the latest harness version.
Version detection → Backup → Non-destructive update flow preserves existing settings and tasks while introducing latest features.
安全地将已部署Harness的项目更新至最新Harness版本。
版本检测 → 备份 → 非破坏性更新流程可在引入最新功能的同时保留现有设置与任务。
Quick Reference
快速参考
- "I want to update harness to the latest version"
- "I want to add new features to existing project"
- "I want to update config file format to latest version"
- "I want to fix incorrect permission syntax"
- "I was notified of template updates"
- "我想要将Harness更新至最新版本"
- "我想要为现有项目添加新功能"
- "我想要将配置文件格式更新至最新版本"
- "我想要修复错误的权限语法"
- "我收到了模板更新的通知"
Deliverables
交付内容
- Version detection via
.claude-code-harness-version - Template update detection and localization judgment
- Identify files needing update
- Auto-backup creation
- Non-destructive settings/workflow file updates
- No localization → overwrite / Localized → merge support
- Skills diff detection - Auto-detect and propose new skills
- Optional: Codex CLI sync (+
.codex/)AGENTS.md - Post-update verification
- 通过进行版本检测
.claude-code-harness-version - 模板更新检测与本地化判断
- 识别需要更新的文件
- 自动创建备份
- 非破坏性的设置/工作流文件更新
- 未本地化 → 覆盖 / 已本地化 → 支持合并
- Skills差异检测 - 自动检测并推荐新Skills
- 可选:Codex CLI同步(+
.codex/)AGENTS.md - 更新后验证
Execution Flow Overview
执行流程概览
| Phase | Reference | Description |
|---|---|---|
| Phase 1 | references/version-detection.md | Version detection and confirmation |
| Phase 1.5 | references/breaking-changes.md | Breaking changes detection and fix |
| Phase 2 | references/backup-and-update.md | Backup creation and file updates |
| Phase 3 | references/verification.md | Verification and completion |
| 阶段 | 参考文档 | 描述 |
|---|---|---|
| 阶段1 | references/version-detection.md | 版本检测与确认 |
| 阶段1.5 | references/breaking-changes.md | 破坏性变更检测与修复 |
| 阶段2 | references/backup-and-update.md | 备份创建与文件更新 |
| 阶段3 | references/verification.md | 验证与完成 |
Phase Summary
阶段总结
Phase 1: Version Detection
阶段1:版本检测
- Check file
.claude-code-harness-version - Compare with plugin's latest version
- Run for content-level updates
template-tracker.sh check - Confirm update scope with user
If harness not installed: Suggest using instead.
/harness-init- 检查文件
.claude-code-harness-version - 与插件的最新版本进行对比
- 运行检测内容层面的更新
template-tracker.sh check - 与用户确认更新范围
若未安装Harness:建议使用命令替代。
/harness-initPhase 1.5: Breaking Changes Detection
阶段1.5:破坏性变更检测
Detect and fix existing settings issues:
- Incorrect permission syntax (e.g., →
Bash(npm run *))Bash(npm run:*) - Deprecated settings (e.g., )
disableBypassPermissionsMode - Old hook settings in project files (should use plugin hooks.json)
检测并修复现有设置问题:
- 错误的权限语法(例如:→
Bash(npm run *))Bash(npm run:*) - 已弃用的设置(例如:)
disableBypassPermissionsMode - 项目文件中的旧钩子设置(应使用插件的hooks.json)
Phase 2: Backup and Update
阶段2:备份与更新
- Create backup in
.claude-code-harness/backups/{timestamp}/ - Update (merge permissions, fix syntax)
.claude/settings.json - Update workflow files based on localization status:
- Not localized → overwrite
- Localized → merge support with user confirmation
- Update rule files with marker/hash method
- Skills diff detection and update proposal
- Update Cursor commands (always overwrite)
- Update version file
- 在目录下创建备份
.claude-code-harness/backups/{timestamp}/ - 更新(合并权限,修复语法)
.claude/settings.json - 根据本地化状态更新工作流文件:
- 未本地化 → 覆盖
- 已本地化 → 在用户确认后进行合并
- 使用标记/哈希方法更新规则文件
- Skills差异检测与更新建议
- 更新Cursor命令(始终覆盖)
- 更新版本文件
Phase 3: Verification
阶段3:验证
- Post-update re-verification with
template-tracker.sh check - Syntax check for JSON files
- Generate completion report with file-by-file results
- 使用进行更新后重新验证
template-tracker.sh check - JSON文件语法检查
- 生成包含逐文件结果的完成报告
Important Preserved Data
重要保留数据
These are never overwritten:
- ✅ Incomplete tasks in Plans.md
- ✅ Custom settings in .claude/settings.json (hooks, env, model, etc.)
- ✅ SSOT data in .claude/memory/
以下内容绝不会被覆盖:
- ✅ Plans.md中的未完成任务
- ✅ .claude/settings.json中的自定义设置(hooks、env、model等)
- ✅ .claude/memory/中的SSOT数据
Related Commands
相关命令
- - New project setup
/harness-init - - Check current project status
/sync-status - - Setup development tools
/setup
- - 新项目初始化
/harness-init - - 检查当前项目状态
/sync-status - - 开发工具配置
/setup