# Handover: Obsidian Vault Setup

## Background

Michelle installed Obsidian on Windows 11 and needs to work with this vault from Claude Code running in WSL (Ubuntu via VSCode).

**Why this setup exists:** Obsidian cannot open vaults on WSL filesystem paths (`\\wsl$\...`) due to a fundamental Node.js/libuv limitation where `fs.watch()` crashes with EISDIR on WSL UNC paths. Running Obsidian inside WSL via WSLg was
too laggy. The solution: vault lives on the Windows filesystem, Obsidian opens it natively, and Claude Code accesses it from WSL via `/mnt/c/`.

**Why not OneDrive:** OneDrive sync conflicts with git's `.git/` directory (lock files, corrupted objects, partial syncs). GitHub is the backup instead.

**How Michelle will work with Claude Code on this Vault:** VSCode (Ubuntu via WSL)> Open Folder and paste `/mnt/c/Users/mp/Documents/ideas-vault`

## Current State

- **Vault location (Windows):** `C:\Users\mp\Documents\ideas-vault`
- **Vault location (WSL):** `/mnt/c/Users/mp/Documents/ideas-vault`
- **Obsidian:** Installed on Windows 11, vault created, default config present
- **Git:** Not yet initialised. Git is available from WSL only (not installed on Windows). Global config: `Michelle <hello@github-email.com>`
- **Vault contents:**
  - `.obsidian/` — Obsidian config (app.json, appearance.json, core-plugins.json, graph.json, workspace.json)
  - `Welcome.md` — Default Obsidian welcome note

## Remaining Tasks

### 1. Create `.gitattributes`

Cross-platform line endings are a real concern here: Obsidian on Windows may write CRLF, while WSL git and Claude Code expect LF. A `.gitattributes` file ensures git normalises line endings in the repository.

```text
# All text files: normalise to LF in repo and working tree
* text=auto eol=lf
```

Plus explicit binary rules for images/PDFs.

### 2. Create `.gitignore`

Obsidian's `.obsidian/` directory contains both shareable config and per-machine state. Also ignore secrets, OS junk, and Obsidian's trash. Recommended ignore patterns:

```text
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/cache/
.trash/
.env / .env.*
.DS_Store / Thumbs.db
```

### 3. Initialise git repo

```bash
cd /mnt/c/Users/mp/Documents/ideas-vault
git init
git add .
git commit -m "Initial commit: Obsidian vault setup"
```

### 4. Create GitHub remote and push

Create a new repo (likely `ideas-vault`, private) on GitHub and push:

```bash
gh repo create my-github-username/ideas-vault --private --source=. --push
```

### 5. Verify round-trip works

- Edit a file in Obsidian on Windows
- Confirm the change is visible from WSL: `cat /mnt/c/Users/mp/Documents/ideas-vault/<file>.md`
- Commit from WSL and push to GitHub
- Confirm line endings are LF in the repository

## Notes for Claude Code

- **Performance:** File operations on `/mnt/c/` are slower than native ext4 due to the 9P protocol bridge. This is expected and tolerable for a markdown vault.
- **Permissions:** Files on `/mnt/c/` show as 777 — this is cosmetic, not a security issue. Git may flag permission changes; configure `core.fileMode=false` in the local repo if this becomes noisy.
- **Working directory:** Use `/mnt/c/Users/mp/Documents/ideas-vault` as the working directory for all operations on this vault.
- **British spelling** throughout, consistent with Michelle's other repos.
