원클릭으로
resolve-conflicts
Resolve HQ Sync conflicts by choosing local, cloud, or discard.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Resolve HQ Sync conflicts by choosing local, cloud, or discard.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Deploy or share generated HQ artifacts through hq-deploy.
Mark a company as HQ Pro cloud-backed and sync its team setup.
Send HQ Sync direct messages, prompts, details, or scheduled notes to teammates.
Run a full bidirectional sync for cloud-backed HQ companies.
Scaffold a new HQ company AND optionally take it all the way to operational — business-discovery interview, seeded knowledge/workers/skills/projects, brand design packs (generated from website/PDF/Drive and bound to deploys via policy), connected integrations, org groups + ACL rules, teammate invites, and optional cloud agents.
Manually log a time estimate.
| name | resolve-conflicts |
| description | Resolve HQ Sync conflicts by choosing local, cloud, or discard. |
| allowed-tools | Read, Write, Edit, Bash, AskUserQuestion |
Interactive conflict resolution for HQ Sync. When two machines (or two users) edit the same file and sync detects divergence, both versions land on disk: the original path keeps the local version, and a .conflict-<timestamp>-<machine>.<ext> file holds the cloud's version. This command walks the user through each pending conflict and applies their decision.
Read ~/HQ/.hq-conflicts/index.json. The exact HQ folder path comes from ~/.hq/menubar.json hqPath (and falls back per the resolve-hq-folder discovery chain). If the file doesn't exist OR the conflicts array is empty, tell the user "No conflicts pending — your local copy is in sync with the cloud" and stop.
The index schema:
{
"version": 1,
"conflicts": [
{
"id": "...",
"originalPath": "core/knowledge/notes.md",
"conflictPath": "core/knowledge/notes.md.conflict-2026-04-27T22-05-14Z-abc123.md",
"detectedAt": "2026-04-27T22:05:14Z",
"side": "pull" | "push",
"machineId": "abc123",
"localHash": "...",
"remoteHash": "...",
"remoteVersionId": "...",
"lastKnownVersionId": "..."
}
]
}
Tell the user how many conflicts are pending, grouped by top-level folder. Example:
3 conflicts pending:
core/knowledge/ (2 files)
personal/projects/foo/ (1 file)
Walking through them oldest-first.
For each entry:
Read both files (Read on originalPath and conflictPath, both relative to HQ folder).
Show the user a short preview: file path, sizes of both versions, and a unified diff (use Bash with diff -u <local> <cloud> if both are reasonable size, otherwise just first 30 lines of each).
Ask: which version to keep?
l / local — keep the local copy at originalPath. Delete the conflict file. (Cloud's version is discarded — it's still in S3 versioning history if recovery is ever needed.)c / cloud — overwrite local with the cloud copy. Use Bash mv <conflictPath> <originalPath> to atomically replace.m / merge — open both files for the user to manually merge. Use Bash code -d <local> <cloud> (VS Code diff) or fall back to open <local> <cloud>. Wait for the user to confirm they're done with the merge, then ask again (or accept that they've manually resolved → delete the conflict file).s / skip — leave both files in place, move to next conflict. Index entry stays.q / quit — stop walking, exit.After applying the resolution (except skip/quit/merge-pending), remove the index entry. Re-write ~/HQ/.hq-conflicts/index.json atomically (write to .tmp, then rename).
Tell the user how many conflicts were resolved this session, how many were skipped, and what's left:
Resolved 2 conflicts (1 kept local, 1 took cloud).
1 conflict skipped — run `/resolve-conflicts` again to revisit.
If there are still pending conflicts, suggest the user re-run sync afterwards so the resolved files propagate to the cloud cleanly.
conflictPath doesn't exist on disk but is in the index: the file was probably already deleted/resolved manually. Remove the index entry and continue.originalPath doesn't exist: the user deleted the local file. Treat the conflict file as the only remaining copy — ask "the original file is gone; keep the cloud version (move to original) or discard?"~/HQ/.hq-conflicts/index.json manually or restoring from a backup.open.open (default app) for both files..hqignore blocks them).After the user has resolved conflicts, suggest they hit Sync in the HQ Desktop App. The runner will pick up the resolved file (now with a new local hash that differs from journal) and push it cleanly. If a new conflict happens in the meantime (someone else pushed again), they'll see a new entry in the index.
/hq-sync — re-run sync after resolving/hq-heal — broader session repair