Skip to main content

Module agents_md

Module agents_md 

Source
Expand description

Marker-aware replacement of the <!-- SCC-SECTION --> managed block in AGENTS.md (and equivalent instruction files).

Replacement is before-opening + new section + after-closing. User text after the closing marker is preserved. A rewrite that kept only the prefix before <!-- SCC-SECTION deleted later user edits.

Structs§

AgentsResolution

Enums§

AgentsTarget
Resolve the instruction file scc setup omp should patch.

Constants§

SCC_OMP_SECTION_CLOSE
SCC_OMP_SECTION_OPEN
OMP-setup managed section markers. The OMP and Codex installers share instruction files (both may patch the root AGENTS.md), so each owns a DISTINCT marker pair — one shared pair would make the second installer delete the first installer’s section (last-writer-wins data loss).
SCC_SECTION_CLOSE
Closing marker (exact).
SCC_SECTION_OPEN
Opening marker prefix. A valid tag is this prefix followed by a tag boundary (whitespace or -->), not a longer token such as <!-- SCC-SECTION-NOTES -->.

Functions§

replace_scc_section
Replace a managed section delimited by an explicit marker pair. replace_scc_section is this function with the legacy shared markers.
replace_scc_section_in
Replace a managed section delimited by an explicit marker pair, keeping everything before the opening marker and everything after the closing marker. Pairing never spans a second opening marker. If no complete pair is present, the new section is appended and later user text (including an orphaned open) is preserved.
resolve_omp_agents_path