Owns the cohere block in the host's agent guidance file (AGENTS.md).
Two zones (DEC-AGE-001 in cohere/design/agent-surfaces.md): a
marker-bounded block of loop mechanics, machine-managed and regenerated
on every mix cohere.init re-run; and a working-agreement section
seeded below it on first write only — dev-owned, never touched again.
Nothing outside the markers is ever modified, by construction.
Summary
Functions
Renders the machine-managed block, markers included. Regenerated whole on every sync — content between the markers is cohere's, not the dev's.
Writes the block into target (default AGENTS.md),
idempotently: file missing → created with block + working agreement;
markers present → block replaced in place, everything else untouched;
file present without markers → block + agreement appended.
Whether any known guidance file (AGENTS.md, CLAUDE.md) carries the
cohere block — the check's soft finding when none does. Both files
count so --into CLAUDE.md shops don't get nagged about AGENTS.md.
Functions
@spec block(Cohere.Project.t()) :: String.t()
Renders the machine-managed block, markers included. Regenerated whole on every sync — content between the markers is cohere's, not the dev's.
@spec sync(Cohere.Project.t(), String.t()) :: :created | :updated | :unchanged
Writes the block into target (default AGENTS.md),
idempotently: file missing → created with block + working agreement;
markers present → block replaced in place, everything else untouched;
file present without markers → block + agreement appended.
Returns :created, :updated, or :unchanged.
@spec synced?(Cohere.Project.t(), [String.t()]) :: boolean()
Whether any known guidance file (AGENTS.md, CLAUDE.md) carries the
cohere block — the check's soft finding when none does. Both files
count so --into CLAUDE.md shops don't get nagged about AGENTS.md.