Documentation
¶
Overview ¶
Package skilldiff represents a proposed SKILL.md edit as a unified diff so a suggestion outlives the exact version it was generated against.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConflict = errors.New("skill diff conflicts with the current content")
ErrConflict reports that a diff no longer lines up with the content it is replayed onto, which retires the suggestion carrying it.
Functions ¶
func Apply ¶
Apply replays diff onto base. Hunks are relocated to wherever their recorded context still appears, so an edit elsewhere in the skill shifts a suggestion rather than invalidating it. A hunk whose context is gone is a conflict, not a silent partial edit.
func Hunks ¶
Hunks splits diff into one standalone diff per hunk, in the order they appear, so a reviewer can accept part of a suggestion without taking the rest. Each result carries the file headers and replays through Apply on its own; Apply relocates hunks by their context, so the pieces do not have to be applied in order. An empty diff yields no hunks.
Types ¶
This section is empty.