rename_concept
Rename a concept slug and update every backlink in one atomic operation, preserving the node UID and rewriting all file references.
Instructions
⚠ MULTI-FILE WRITE — change a slug and update every backlink in one atomic graph-level operation. The node UID is preserved; only its current human-readable slug changes. Renames the .md file (oldSlug → newSlug, directory move OK), updates the moved file's frontmatter slug: key, and rewrites every backlink — frontmatter array entries (capabilities / elements / dependencies / relates / contains / describes), inline-string keys, and body links [[oldSlug]] / (oldSlug.md). Tail-only references (mcp-server for capabilities/mcp-server) are also redirected to the new tail. Two-stage safety:
Without confirm: true the call is a dry-run — returns
updates(each affected file with before/after array keys + bodyChanged flag) without writing.With confirm: true the file is moved and all backlinks are rewritten in one pass. Throws if oldSlug missing or newSlug already taken (unless overwrite: true). Use this instead of patch_concept + N find_backlinks + N patch_concept loops. Confirmed writes return compact
postWriteMaintenance(maintenance_plan) with count-safebyPhase/bySeverity/byKindqueue buckets, actionscore, executableproposedAction, and current-pagenextExecutableAction/nextReviewActionpointers for the final graph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Actually perform the rename when true. Omit or false for a dry-run preview. | |
| newSlug | Yes | Target vault-relative slug (omit the .md extension). Directories are created if needed. | |
| oldSlug | Yes | Current vault-relative slug (omit the .md extension). | |
| overwrite | No | Allow overwriting an existing file at newSlug. Defaults to false (throws if newSlug exists). | |
| expected_mtime | No | Optional conflict guard for oldSlug. Pass the `mtime` from get_concept; throws VaultConflictError if the source has been modified externally since you read it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| uid | Yes | ||
| moved | Yes | ||
| dryRun | Yes | ||
| changed | No | ||
| message | No | ||
| newSlug | Yes | ||
| oldSlug | Yes | ||
| canConfirm | Yes | True only when repeating the call with confirm:true can perform the previewed change without another explicit safety opt-in. | |
| sourcePath | Yes | ||
| targetPath | Yes | ||
| wouldChange | Yes | True only when the dry-run predicts a disk or Git change. | |
| previewReady | Yes | True only when this response is a complete dry-run preview that an agent can review. | |
| blockedReasons | Yes | Machine-readable human explanations for every condition currently blocking confirmation. | |
| backlinkUpdates | Yes | ||
| postWriteMaintenance | No | Compact maintenance_plan summary for post-write follow-up. Bucket maps describe the remaining queue after the write. |