Port: port/pr-32-add-managedby-tag#8
Conversation
Adds `_managedBy: "openwolf"` to every hook object in `HOOK_SETTINGS` so Claude Code's settings round-tripper recognizes them as third-party managed entries and preserves them through `/effort`, `/config`, and similar rewrites. Without the tag, entries get silently dropped: a working OpenWolf install can be de-wired by typing `/effort medium` once, since Claude Code's merge logic only preserves entries it recognizes as owned (claude-hooks uses the same field, for example). Also tightens `replaceOpenWolfHooks` to recognize the new tag in addition to the legacy `.wolf/hooks/` substring — defensive against future path schema changes, and keeps the dedupe correct for installs upgrading from a pre-tag version. The two changes are minimal and backward-compatible: untagged entries from older installs still match the substring fallback, so upgrades clean up cleanly. New installs get tagged from the start. Fixes cytostack#31.
|
Now I have a complete picture. Here's my review: PR #8 — Port:
|
|
Autofixer skipped: merge conflicts with main detected. |
3 similar comments
|
Autofixer skipped: merge conflicts with main detected. |
|
Autofixer skipped: merge conflicts with main detected. |
|
Autofixer skipped: merge conflicts with main detected. |
# Conflicts: # src/cli/init.ts # src/cli/update.ts
508ae77 to
a0d7e19
Compare
- isOpenWolfHook: check _managedBy as primary signal, path substring as backward-compat fallback for pre-tag installs - Add comment documenting that _managedBy is empirically observed passthrough, not a guaranteed Claude Code field (Warning #2) - Add comment in replaceOpenWolfHooks documenting co-location assumption: one inner hook per outer entry unsupported (Warning #1) - Reformat HOOK_SETTINGS to multi-line expanded style, respects 80-char line length rule (Info #4) - Code duplication between init.ts and update.ts already resolved by prior extraction to hook-settings.ts (Info #3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ Autofixer applied. Build and tests passed. Promoting to Ready for Review. |
Ported from upstream cytostack/openwolf. Needs review before merge.