aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-19 15:37:51 -0500
committerCraig Jennings <c@cjennings.net>2026-04-19 15:37:51 -0500
commitec31be0eb39f5b86c62729a24914c2e699b42232 (patch)
treea2b4a59069f089dfbdb67653658f9b80439a65c9 /todo.org
parent4efc5dbb01a3e20ab9e192d18c36966e9a04a25e (diff)
downloadrulesets-ec31be0eb39f5b86c62729a24914c2e699b42232.tar.gz
rulesets-ec31be0eb39f5b86c62729a24914c2e699b42232.zip
docs(todo): switch /update-skills conflict policy to per-hunk prompt
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.
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org28
1 files 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 <local> <baseline> <upstream>=;
- write result (with conflict markers if any)
+ - For =both-changed=: run =git merge-file --stdout <local> <baseline> <upstream>=;
+ 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)