harness-update
Skill1 starsChanged 7 days agoMITView on GitHub
Upgrade an existing harness-initialized repo to the latest engine release. Shows what changed (CHANGELOG), checks what needs applying (checklist), then applies on approval. Use on '/harness-update', 'harness upgrade', '하네스 업데이트', or when _engine_version is behind the latest release.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- anotherben/claude-harnesstheir own version, first seen Nov 8, 2026
- GangJaeYu/harness_loop_full_koreantheir own version, first seen Oct 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- anotherben/claude-harness★ 7same name
- GangJaeYu/harness_loop_full_korean★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 4 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
After a new harness release is available (patrick-work-harness tag bump)
- Very specific: line 15
When session-dashboard.html is missing, Stop hooks are unwired, or session stubs are absent on an existing init'd repo
- Very specific: line 29
Read .claude/harness-answers.yml in the current working repo (the repo Claude Code is opened in):
- Very specific: line 39
If neither is found: halt with "Cannot resolve engine version — ensure CLAUDE_PLUGIN_ROOT is set or patrick-work-harness is cloned locally."
- Distinctive: line 48
Before applying the comparison table below, read the install marker and compare:
- Very specific: line 74
Read CHANGELOG.md from the engine source (same directory as plugin.json resolved in Step 1).
- Very specific: line 87
If CHANGELOG.md is absent or the section is empty, output "변경 내역 없음 (CHANGELOG 미존재)" and continue.
- Very specific: line 107
If --check mode: stop here (no file writes).
- Distinctive: line 108
If ≥1 ❌: list the items needing update and proceed to Step 4.
- Very specific: line 135
If the zone holds a ## Build · Test section (an older /init put it there), move it verbatim to right below <!-- PROJECT-OWNED below --> …
- Very specific: line 137
Update version tag to <!-- HARNESS:START v{latest} -->
- Very specific: line 140
If sentinels are absent: output "⚠️ HARNESS sentinel 없음 — /init을 먼저 실행하세요." and skip this axis.
- Very specific: line 150
The file is missing (a source copy): Make sure the 3 Stop guards are wired with the absolute path of that copy's hooks/ folder (/init Step …
- Very specific: line 158
Never write ${CLAUDE_PLUGIN_ROOT} into a settings file.
- Distinctive: line 162
Run the sync script once manually:
- Very specific: line 167
If CLAUDE_PLUGIN_ROOT is unavailable (a source copy), use that copy's hooks/ folder — the absolute path already wired in …
- Very specific: line 176
Only when session_docs: true in harness-answers.yml AND stub(s) are absent.
- Very specific: line 178
Create missing stubs using the same templates as /init Step 5:
- Very specific: line 209
After writing, verify both files exist (ls check).
- Very specific: line 229
Write _engine_version: "{latest}" back to .claude/harness-answers.yml.
- Distinctive: line 230
All other fields remain unchanged.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/harness-update Skill — Harness Full Upgrade
Implements the full harness upgrade path: version check → CHANGELOG → checklist → approval → apply. Analogous to
npm update/brew upgrade— upgrades the entire installed harness, not justCLAUDE.md. Prerequisite:/inithas been run (.claude/harness-answers.ymlexists).
When to Use
- After a new harness release is available (patrick-work-harness tag bump)
- When
session-dashboard.htmlis missing, Stop hooks are unwired, or session stubs are absent on an existing init'd repo - To verify whether a repo is fully up to date without applying changes (
--checkmode)
Invocation Modes
| Mode | How to invoke | Effect |
| Default (upgrade) | /harness-update | Steps 1→6 — check, report, await approval, apply |
| Check only | /harness-update --check | Steps 1→3 only — report without writing |
Step 1 — Read provenance and resolve engine version
Read .claude/harness-answers.yml in the current working repo (the repo Claude Code is opened in):
_engine_version: version at last/initor/harness-updaterunsession_docs: bool — whether session stubs (SESSION_INDEX / CURRENT_SESSION) are expectedplan_tier:"1"or"2"— read only, never re-prompted here (changing tiers is a manual, explicit action, not an upgrade concern). Field absent (repo initialized before this field existed) → treat asplan_tier: "2", not an error and not a reason to halt.
Resolve the latest engine version via this priority order:
${CLAUDE_PLUGIN_ROOT}/plugin.json→version(plugin-install topology)- Local patrick-work-harness clone: search for
plugin.jsonunder common paths (<로컬 하네스 체크아웃>/plugin.json,~/.claude/plugins/*/plugin.json) - If neither is found: halt with "Cannot resolve engine version — ensure CLAUDE_PLUGIN_ROOT is set or patrick-work-harness is cloned locally."
Step 1-b — Cross-check the provenance field against what is actually installed
🔴 The _engine_version field can be wrong. It is written by /init and /harness-update, and
until 2026-09-24 install.sh did not touch it at all — so a repo installed via the script kept the
old value while the hooks on disk were newer (real case: field 1.3.4, hooks v1.4.1). Judging from
the field alone then tells the user to re-install what is already installed.
Before applying the comparison table below, read the install marker and compare:
# Written by install.sh since v1.4.2 (HARNESS-INSTALL-PROVENANCE-2)
grep '^version:' ~/.claude/hooks/patrick-work-harness/.harness-owned | cut -d' ' -f2| Marker vs field | Action |
| Marker absent (pre-v1.4.2 install, or hooks not installed) | Proceed with the field alone, and say so in the output: 「설치 표식이 없어 provenance 필드만으로 판정합니다」 |
| Marker == field | Field is trustworthy → proceed to the table below |
| Marker != field | 🔴 Report both and treat the marker as authoritative for what is on disk: 「설치본은 {marker} 인데 provenance 필드는 {field} 입니다 — 필드를 {marker} 로 맞춘 뒤 진행합니다」. Fix the field first, then re-evaluate |
Why the marker wins: the field records what a skill last claimed; the marker records what the installer actually wrote. When they disagree, the files on disk are the ground truth.
| Comparison | Action |
_engine_version == latest | Output "✅ 이미 최신 버전 ({ver}) — 체크리스트만 실행합니다." then jump to Step 3 (checklist only, no zone rewrite) |
_engine_version < latest | Proceed to Step 2 |
_engine_version > latest | Halt: "⚠️ provenance가 설치 버전보다 높습니다 — 수동 확인 필요." |
Step 2 — Display CHANGELOG
Read CHANGELOG.md from the engine source (same directory as plugin.json resolved in Step 1).
Extract all version sections newer than _engine_version (sections between ## [X.Y.Z] headers where X.Y.Z > _engine_version, semver order).
Output format:
── 변경 내역 ({_engine_version} → {latest}) ──────────
## [1.0.1] - 2026-06-26
Added: /harness-update 스킬 (버전 확인→체크리스트→승인→일괄 갱신)
...
──────────────────────────────────────────────────────If CHANGELOG.md is absent or the section is empty, output "변경 내역 없음 (CHANGELOG 미존재)" and continue.
Step 3 — Checklist: what needs applying
Inspect the current repo state across 7 axes (A–G). Mark each ✅ (ok) or ❌ (needs update):
| # | Axis | Check | Needs update condition |
| A | HARNESS zone | CLAUDE.md contains <!-- HARNESS:START v{latest} --> | Version tag differs from latest |
| B | Hook wiring | Plugin or install.sh install (${CLAUDE_PLUGIN_ROOT}/hooks/session-dashboard-sync.py exists): the project's .claude/settings.json has no entry containing ${CLAUDE_PLUGIN_ROOT}. Source copy: the Stop array has session-dashboard-sync.py (first), gate-e-sync-guard.py, error-topics-guard.py with absolute paths (error-topics-guard.py optional when harness-answers.yml has neither code_repos nor error_topics_path) | A ${CLAUDE_PLUGIN_ROOT} entry exists in the project settings, a source copy is missing a required guard, or .claude/settings.json or .claude/settings.local.json wires a retired hook (listed below) |
| C | session-dashboard.html | File exists at repo root | Absent |
| D | Session stubs | ${SESSION_INDEX_FILE} and ${CURRENT_SESSION_FILE} exist at repo root | Either absent AND session_docs: true in harness-answers.yml |
| E | Layer 2 docs status | No DOC_INDEX.md, or every Layer 2 row in it shows Skeleton or better (not Pending) | DOC_INDEX.md exists and a Layer 2 row still shows Pending — no DOC_INDEX.md means the project chose --docs=minimal/none, which is ✅ |
| F | Lesson store | harness-answers.yml sets error_topics_path or code_repos, and that folder has README.md (/init Step 4-b) | Neither field set, or the folder is absent — the Gate A lesson lookup and error-topics-guard.py then find nothing and stay silent |
| G | Autonomous-lane setting | harness-answers.yml has an autonomous_lane: block | Block absent — every plan then takes the review lane, which is safe but leaves the setting invisible |
Output the checklist table with ✅/❌ per row, then:
- If all ✅: "모든 항목 최신 상태 — 갱신 불필요합니다."
- If
--checkmode: stop here (no file writes). - If ≥1 ❌: list the items needing update and proceed to Step 4.
Step 4 — Await user approval
Output:
위 {N}항목을 적용하겠습니다.
「harness-update 승인」으로 응답하면 실행합니다.STOP — await user response before any file writes.
Recognized approval phrases: 「harness-update 승인」「승인」「적용」「진행」. On any other response, abort with "갱신을 취소했습니다."
Step 5 — Apply updates (checklist-driven, conditional per axis)
Execute only the axes marked ❌ in Step 3. Axes already ✅ are skipped silently.
Axis A — HARNESS zone reconcile
Reconcile the HARNESS zone:
- Locate
<!-- HARNESS:START…<!-- HARNESS:END -->sentinels inCLAUDE.md - If the zone holds a
## Build · Testsection (an older/initput it there), move it verbatim to right below<!-- PROJECT-OWNED below -->first. Those are the project's own commands, and Gate D copies them - Overwrite the zone wholesale with the current engine template, substituting
project_repofromharness-answers.yml - Update version tag to
<!-- HARNESS:START v{latest} --> - Everything after
<!-- PROJECT-OWNED below -->is never touched
If sentinels are absent: output "⚠️ HARNESS sentinel 없음 — /init을 먼저 실행하세요." and skip this axis.
Axis B — Hook wiring (check, then fix)
Same check as /init Step 6: ls "${CLAUDE_PLUGIN_ROOT}/hooks/session-dashboard-sync.py".
- The file exists (plugin or
install.shinstall). The guards are already wired outside the project. In the project's.claude/settings.json, remove every hook entry whose command contains${CLAUDE_PLUGIN_ROOT}— an earlier/initadded them, and Claude Code refuses that variable insettings.json, so they never ran and logged a failed hook at every response. List the entries you will remove in the Step 4 approval. Leave every other entry untouched. - The file is missing (a source copy). Make sure the 3 Stop guards are wired with the absolute path of that copy's
hooks/folder (/initStep 6 JSON shape),session-dashboard-sync.pyfirst; prepend only the missing ones and keep existing entries. - In both cases, remove every hook entry in the project's
.claude/settings.jsonand.claude/settings.local.jsonwhose script is a retired hook —comprehension-ledger-stale-guard.py,claude-gate-guard.pyorskill-usage-auto.py— and list them in the Step 4 approval. Leave every other entry untouched.
Never write ${CLAUDE_PLUGIN_ROOT} into a settings file.
Axis C — Generate session-dashboard.html
Run the sync script once manually:
CLAUDE_PROJECT_DIR=<repo root> python3 "${CLAUDE_PLUGIN_ROOT}/hooks/session-dashboard-sync.py"If CLAUDE_PLUGIN_ROOT is unavailable (a source copy), use that copy's hooks/ folder — the absolute path already wired in .claude/settings.json:
CLAUDE_PROJECT_DIR=<repo root> python3 <source copy>/hooks/session-dashboard-sync.pyConfirm session-dashboard.html exists at the repo root after execution.
Axis D — Create session stubs
Only when session_docs: true in harness-answers.yml AND stub(s) are absent.
Create missing stubs using the same templates as /init Step 5:
${SESSION_INDEX_FILE} stub:
---
project: "{project_repo}"
last_updated: "{YYYY-MM-DD}"
gate: "신규 — 다음 작업 시 /gate-a로 시작"
sessions_since_audit: 0
last_audit_date: ""
priority_note: ""
next_action: "새 작업 시 /gate-a로 시작."
---
# 세션 인덱스
| 세션 ID | 제목 | 저장소 | 상태 |
|---------|------|--------|------|${CURRENT_SESSION_FILE} stub:
# 현재 세션 상태
> **세션 ID**: (미정 — /gate-a로 시작)
> **현재 상태**: 신규
> **직전 세션**: —
> **세션 주제**: harness-update 백필 적용 완료 — 다음 작업 시 /gate-a로 시작After writing, verify both files exist (ls check). If either is absent after write, retry once.
Axis E — Layer 2 document skeletons
For each Pending row in DOC_INDEX.md, create that file's skeleton as /init Step 9 does and set the row to Skeleton. Do not create documents the index does not list.
Axis F — Lesson store
Ask the user where Gate E should record lessons (default error_topics_path: "docs/rules/error_topics"; a multi-repo workspace may list code_repos instead), write the field into harness-answers.yml, then create the folder README.md with the /init Step 4-b template. For code_repos, create files inside sibling repositories only after the user confirms those paths. Existing entries are never rewritten.
Axis G — Autonomous-lane setting
Append the /init Step 3 autonomous_lane: block with enabled: false. Do not turn it on here — say that the user can set
enabled: true and commit the file to opt in (gate-a/SKILL.md §0-Lane), and that the lane also needs archive_path for the card
ledger. The lane guard itself arrives with the plugin update; a user who installed with install.sh must re-run it to wire the guard.
Step 6 — Update _engine_version
Write _engine_version: "{latest}" back to .claude/harness-answers.yml.
All other fields remain unchanged.
Verification Checklist (for Gate C after /harness-update)
- C1:
harness-answers.yml→_engine_versionequals latest engine version - C2:
CLAUDE.mdHARNESS zone version tag matches latest:<!-- HARNESS:START v{latest} --> - C3: no settings file contains
${CLAUDE_PLUGIN_ROOT}; a source copy has the 3 Stop guards with absolute paths,session-dashboard-sync.pyfirst - C4:
session-dashboard.htmlexists at repo root - C5: Already-up-to-date repo exits cleanly at Step 1 with "✅ 이미 최신 버전"
- C6:
--checkmode produces no file writes (read-only confirmed by grep) - C7:
harness-answers.ymlsetserror_topics_pathorcode_repos, and the lesson storeREADME.mdexists
Notes
/harness-updateis explicit-invoke only (D-4 decision). The SessionStart hook may detect version mismatch and notify, but reconciliation requires explicit invocation.- Idempotent: re-running when already up to date exits cleanly at Step 1 or reports all-✅ at Step 3.
- Scope:
/harness-updateis the full upgrade path — HARNESS zone + hooks + dashboard + stubs in one run (HARNESS-zone reconcile is Axis A). - Relation to
/init:/initis for new repos./harness-updateis for existing init'd repos. Never run/initon an existing repo to apply updates — use/harness-update.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

