patch_concept
Revise, deepen, or reclassify an existing ontology node by patching its frontmatter and body; use expected_mtime to guard against concurrent edits.
Instructions
Update the frontmatter and/or body of an existing ontology node. Use when an AI agent revises, deepens, or reclassifies a node. Frontmatter patches are key-by-key — null deletes a key, omission preserves it. Body is fully replaced when provided, otherwise preserved. Pass expected_mtime (from the previous get_concept response) to detect concurrent external edits — throws VaultConflictError if the file has changed on disk since you read it. Changed writes return compact postWriteMaintenance (maintenance_plan) with count-safe byPhase / bySeverity / byKind queue buckets, action score, executable proposedAction, and current-page nextExecutableAction / nextReviewAction pointers so agents can immediately continue graph cleanup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Full replacement markdown body (optional). Preserved when omitted. | |
| slug | Yes | Vault-relative slug (omit the .md extension). | |
| frontmatter | No | Frontmatter key/value patches (e.g. { kind: "capability", domain: "views" }). null removes the key. Per-locale display names go here as `display_ko` / `display_en` — fill every locale the vault serves so both audiences read a native name (`title` stays the search/matching source). | |
| expected_mtime | No | Optional conflict guard. If the file mtimeMs differs at write time, the call throws so the caller can re-read and retry. Pass the `mtime` field from the most recent get_concept response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| slug | Yes | ||
| changed | Yes | ||
| filePath | Yes | ||
| postWriteMaintenance | Yes | Compact maintenance_plan summary for post-write follow-up. Bucket maps describe the remaining queue after the write. |