Agents
Targets
Address content by structure, not offsets.
| Target | Resolves to |
|---|---|
{ line: 12 }, { lines: [12, 18] } | lines (1-based) |
{ heading: 'Install' } | the heading line |
{ section: 'Install' } | the heading and its content, up to the next heading of the same or a higher level |
{ component: 'card', index?, where? } | a component from opener to closer; where: { title: 'B' } matches props |
{ slot: 'footer', component? } | a slot line and its content |
{ frontmatter: 'title' } | a frontmatter key and its nested lines |
{ text: 'exact text', occurrence? } | a text match |
{ range: [from, to] } | offsets |
Ambiguous targets fail with code: 'ambiguous' and candidates (line and excerpt), so the agent can retry with index, where or occurrence.
Modes of edit:
replace— the whole targetbefore/after— new lines outside itprepend/append— inside a component, slot or section (after the opener, before the closer)