harness-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Harness 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

执行流程概览

PhaseReferenceDescription
Phase 1references/version-detection.mdVersion detection and confirmation
Phase 1.5references/breaking-changes.mdBreaking changes detection and fix
Phase 2references/backup-and-update.mdBackup creation and file updates
Phase 3references/verification.mdVerification and completion

阶段参考文档描述
阶段1references/version-detection.md版本检测与确认
阶段1.5references/breaking-changes.md破坏性变更检测与修复
阶段2references/backup-and-update.md备份创建与文件更新
阶段3references/verification.md验证与完成

Phase Summary

阶段总结

Phase 1: Version Detection

阶段1:版本检测

  1. Check
    .claude-code-harness-version
    file
  2. Compare with plugin's latest version
  3. Run
    template-tracker.sh check
    for content-level updates
  4. Confirm update scope with user
If harness not installed: Suggest using
/harness-init
instead.
  1. 检查
    .claude-code-harness-version
    文件
  2. 与插件的最新版本进行对比
  3. 运行
    template-tracker.sh check
    检测内容层面的更新
  4. 与用户确认更新范围
若未安装Harness:建议使用
/harness-init
命令替代。

Phase 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:备份与更新

  1. Create backup in
    .claude-code-harness/backups/{timestamp}/
  2. Update
    .claude/settings.json
    (merge permissions, fix syntax)
  3. Update workflow files based on localization status:
    • Not localized → overwrite
    • Localized → merge support with user confirmation
  4. Update rule files with marker/hash method
  5. Skills diff detection and update proposal
  6. Update Cursor commands (always overwrite)
  7. Update version file
  1. .claude-code-harness/backups/{timestamp}/
    目录下创建备份
  2. 更新
    .claude/settings.json
    (合并权限,修复语法)
  3. 根据本地化状态更新工作流文件:
    • 未本地化 → 覆盖
    • 已本地化 → 在用户确认后进行合并
  4. 使用标记/哈希方法更新规则文件
  5. Skills差异检测与更新建议
  6. 更新Cursor命令(始终覆盖)
  7. 更新版本文件

Phase 3: Verification

阶段3:验证

  1. Post-update re-verification with
    template-tracker.sh check
  2. Syntax check for JSON files
  3. Generate completion report with file-by-file results

  1. 使用
    template-tracker.sh check
    进行更新后重新验证
  2. JSON文件语法检查
  3. 生成包含逐文件结果的完成报告

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

相关命令

  • /harness-init
    - New project setup
  • /sync-status
    - Check current project status
  • /setup
    - Setup development tools
  • /harness-init
    - 新项目初始化
  • /sync-status
    - 检查当前项目状态
  • /setup
    - 开发工具配置