concept_patch
Edit a concept body with old/new string replacements applied atomically in order, guarded by if_match to prevent stale writes. Update frontmatter and return content hash plus findings.
Instructions
Edit-style patch of a concept body: old_string/new_string/replace_all, or an edits array applied atomically in order. if_match required (stale_write). frontmatter is shallow-merged and may be the only change; frontmatter_append/frontmatter_remove add or drop list items (idempotent). Returns content_hash, findings. Many concepts: concept_batch, up to 50 operations in one commit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| edits | No | Batch form; exclusive with the single form | |
| unset | No | Frontmatter keys to remove (same as a null value) | |
| reason | No | Why (commit trailer) | |
| if_match | Yes | ||
| new_string | No | ||
| old_string | No | Exact text to find (single form) | |
| frontmatter | No | Keys to shallow-merge; null removes a key | |
| replace_all | No | Replace every match; default: must match once | |
| frontmatter_append | No | ||
| frontmatter_remove | No |