---
name: gmd:set-vault-root
description: Set or change the Obsidian vault root for this project (persists to .planning/config.json)
allowed-tools:
  - Read
  - Write
  - Bash
  - AskUserQuestion
---

<objective>
Prompt the user for the Obsidian vault root for the current project and persist
it to `.planning/config.json` under `vault.root`. Use the SPEC §18.10 convention
path (`~/AiVaults/{git-basename}/{git-basename}`) as the editable default.

This is the human-invocable entry point for (a) changing the vault root after
install, (b) recovering from a silent convention fallback, and (c) the obsidian
disabled→enabled flip path in `/gmd:update`.

Persists at project scope only — never writes to `~/.claude/get-magic-done/config.json`.
</objective>

<execution_context>
@${CLAUDE_PLUGIN_ROOT}/skills/set-vault-root/SKILL.md
</execution_context>

<process>
Follow the `set-vault-root` skill. The skill:

1. Reads `.planning/config.json` (current `vault.root` if set).
2. Derives the SPEC §18.10 convention-path default from git basename.
3. Prompts the user with the default pre-filled (free-text editable).
4. On accept / skip-confirm: writes to `.planning/config.json` via
   `bin/lib/planning-config.js::setVaultRoot`.
5. Emits the updated `resolved:` status line via `vault-init --dry-run --raw`
   so the user sees which SPEC §18.10 tier now owns the path.
</process>
