From ec31be0eb39f5b86c62729a24914c2e699b42232 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 19 Apr 2026 15:37:51 -0500 Subject: docs(todo): switch /update-skills conflict policy to per-hunk prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-hunk prompt inside the skill is editor-independent — works on machines without Emacs available. The git-style-markers approach required smerge-mode or ediff to be pleasant, and Craig can't assume Emacs on every machine. Side-by-side file fallback still applies when the baseline is missing or corrupt (can't run a 3-way merge in the first place). Emacs users can optionally drop into ediff via smerge-ediff — listed as a v2+ enhancement. --- todo.org | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/todo.org b/todo.org index 077e0c6..aa4c31e 100644 --- a/todo.org +++ b/todo.org @@ -25,11 +25,12 @@ by manual re-cloning. the upstream-at-time-of-fork. Store under =.skill-upstream/baseline/= or similar; committed to the rulesets repo so the merge base is reproducible. - *Apply changes:* skill edits files directly with per-file confirmation. -- *Conflict policy:* git-style conflict markers (=<<<<<<<= / =>>>>>>>=) written - into the merged file. Emacs smerge-mode handles from there; =M-x smerge-ediff= - for heavier resolution. Fallback when baseline is missing/corrupt: write - =.local=, =.upstream=, =.baseline= files side-by-side and surface as manual - review. +- *Conflict policy:* per-hunk prompt inside the skill. When a 3-way merge + produces a conflict, the skill walks each conflicting hunk and asks Craig: + keep-local / take-upstream / both / skip. Editor-independent; works on + machines where Emacs isn't available. Fallback when baseline is missing + or corrupt (can't run 3-way merge): write =.local=, =.upstream=, + =.baseline= files side-by-side and surface as manual review. ** V1 Scope @@ -39,10 +40,15 @@ by manual re-cloning. - Clone each upstream at =ref= shallowly into =/tmp/= - Compare current skill state vs latest upstream vs stored baseline - Classify each file: =unchanged= / =upstream-only= / =local-only= / =both-changed= - - For =both-changed=: attempt =git merge-file --stdout =; - write result (with conflict markers if any) + - For =both-changed=: run =git merge-file --stdout =; + if clean, write result directly; if conflicts, parse the conflict-marker + output and feed each hunk into the per-hunk prompt loop +- [ ] Per-hunk prompt loop: + - Show base / local / upstream side-by-side for each conflicting hunk + - Ask: keep-local / take-upstream / both (concatenate) / skip (leave marker) + - Assemble resolved hunks into the final file content - [ ] Per-fork summary output with file-level classification table -- [ ] Per-file confirmation flow (yes / no / show-diff) +- [ ] Per-file confirmation flow (yes / no / show-diff) BEFORE per-hunk loop - [ ] On successful sync: update =last_synced_commit= in the manifest - [ ] =--dry-run= to preview without writing @@ -52,10 +58,14 @@ by manual re-cloning. "upgrade from v1.2 to v1.3" with release notes pulled in - [ ] Generate patch files as an alternative apply method (for users who prefer =git apply= / =patch= over in-place edits) -- [ ] Interactive per-hunk merge prompting for finer control +- [ ] Non-interactive mode (=--non-interactive= / CI): skip conflict resolution, + emit side-by-side files for later manual review - [ ] Auto-run on a schedule via Claude Code background agent - [ ] Summary of aggregate upstream activity across all forks (which forks have upstream changes waiting, which don't) +- [ ] Optional editor integration: on machines with Emacs, offer + =M-x smerge-ediff= as an alternate path for users who prefer ediff over + per-hunk prompts ** Initial forks to enumerate (for manifest bootstrap) -- cgit v1.2.3