pub fn upsert_instructions(
path: &Path,
content: &str,
dry_run: bool,
) -> Result<UpsertResult, CliError>Expand description
Write or update the Seshat instruction section in an agent instruction file.
The section is wrapped with HTML comment markers:
<!-- seshat:start -->
…content…
<!-- seshat:end -->Algorithm:
- File absent → create with the seshat section.
- File present, no markers → append the section.
- File present, markers found → replace content between markers.
content is the raw text to embed (should NOT include the markers themselves —
they are added by this function). Pass AGENTS_MD_CONTENT for standard use.