8fdb6a4197
Reverted the retry-token continuation flow (merge34628528bfand prompt follow-up446e745bf4): seen-line rejections resend the full patch again.
5.1 KiB
5.1 KiB
Line-anchored patch language: name original lines/gaps to replace, insert, cut, or paste; then give new content. : headers take + body rows; colonless paste PUT, CUT, REM, MV take none.
Edit, then move:
[greet.py#A1B2]
PUT 1.=3:
+def greet(name):
+ print(f"Hi, {name}")
MV lib/greet.py
Markdown bullets — file receives - task:
[PLAN.md#A1B2]
PUT >2:
+- task
+ - nested task
Move greet to sibling file via named register; flows across sections:
[greet.py#A1B2]
CUT 1* @fn
[other.py#3C4D]
PUT <1 @fn
PUT 1*: resolves lines 1–3 (def through print(msg)); line 4 separate, remains:
[greet.py#A1B2]
PUT 1*:
+def greet(name):
+ print(f"Hello, {name}")
Decorator/doc-comment separate block: point N at decorator to include both; anchoring def line 2 orphans @cache:
[svc.py#C3D4]
PUT 1*:
+@cache
+def load(key):
+ return store[key]
WRONG — range sized to the post-edit content. RIGHT: PUT 1.=1: (body length irrelevant)
PUT 1.=2: +def greet(name):
WRONG — - rows / bare context lines do not exist; the range deletes, the body is only new content.
PUT 3.=3: msg = "Hello, " + name
- print(msg)
- return msg
RIGHT
PUT 3.=3:
- return msg
WRONG — pure insertion as a widened PUT: retyped keepers get dropped (here line 4).
PUT 2.=4:
- msg = "Hello, " + name
- extra = compute(name)
- print(msg)
RIGHT — touch nothing you keep.
PUT >2:
- extra = compute(name)
WRONG — PUT >N*: anchored on the closing delimiter / last visible line. RIGHT: plain PUT >M:
PUT >3*: +after()
RIGHT
PUT >3: +after()
WRONG — body rows under register PUT; register pastes take no body. RIGHT: bodyless PUT >20 @fn.
PUT >20 @fn: +function f() {}
1. RE-GROUND AFTER EVERY EDIT: edits renumber and change `#TAG`; take next numbers from edit response or fresh `read`. Stale tag/surprise: STOP; re-`read`. 2. RANGES TIGHT: changed lines only. Whole construct: `PUT N*:`. 3. BODY FINAL CONTENT: every row starts `+`; Markdown bullet: `+- item`, not `- item`.