AI Config Sync Architecture: WSL → Windows → Other Tools
Section titled “AI Config Sync Architecture: WSL → Windows → Other Tools”Date: 2026-02-17 Type: Architecture recommendation + implementation plan Status: ⏸️ Pending implementation
Current State Audit
Section titled “Current State Audit”What Exists
Section titled “What Exists”| Location | Purpose | Contents |
|---|---|---|
/home/ta/config-ai/ | Intended SSoT (per CLAUDE.md) | Empty stub — commands/, agents/, skills/ dirs all empty |
/home/ta/.claude/ | WSL Claude Code actual config | CLAUDE.md (392 lines), commands/ (6 skills), settings.json |
C:\Users\Admin\.claude\ | Windows Claude Code config | CLAUDE.md (now synced), commands/ (6 skills, matches WSL), settings.json |
/home/ta/projects/monorepo/.claude/commands/ | Project-level skills | test-all.md, deploy.md, deploy-kb.md |
C:\Users\Admin\AppData\Roaming\Cursor\User\settings.json | Cursor global settings | Editor prefs, no AI rules configured yet |
C:\Users\Admin\Downloads\.cursorrules | Cursor rules draft | 138 lines — needs to be moved to proper location |
Key Finding
Section titled “Key Finding”~/config-ai/ was named as the SSoT in CLAUDE.md but was never populated. The actual SSoT has been ~/.claude/ by default. The sync between WSL and Windows commands has been manual — and it happens to be in sync right now, but only by coincidence.
Q1: Keeping CLAUDE.md and settings.json in Sync
Section titled “Q1: Keeping CLAUDE.md and settings.json in Sync”Recommendation: Git Repo + Deploy Script
Section titled “Recommendation: Git Repo + Deploy Script”Do not use symlinks. Windows↔WSL symlinks work for reads but are fragile for writes from Windows tools. A deploy script is more reliable and explicit.
Architecture:
~/config-ai/ ← Git repo (SSoT for all AI config)├── .git/├── claude/│ ├── CLAUDE.md ← Master instructions (WSL base)│ ├── CLAUDE.windows.md ← Windows-specific additions (merged on deploy)│ ├── settings.wsl.json ← WSL settings.json│ └── settings.win.json ← Windows settings.json (model=opus, win deny rules)├── cursor/│ └── rules/│ └── core.mdc ← Cursor global rules├── shared/│ └── ai-behavior.md ← Core autonomous behavior (extracted from CLAUDE.md)└── deploy.sh ← Sync scriptDeploy script (~/config-ai/deploy.sh):
#!/usr/bin/env bashset -euo pipefail
REPO="$HOME/config-ai"WIN_CLAUDE="/mnt/c/Users/Admin/.claude"WSL_CLAUDE="$HOME/.claude"
# === WSL Claude Code ===cp "$REPO/claude/CLAUDE.md" "$WSL_CLAUDE/CLAUDE.md"cp "$REPO/claude/settings.wsl.json" "$WSL_CLAUDE/settings.json"cp "$REPO/claude/commands/"* "$WSL_CLAUDE/commands/"echo "✓ WSL Claude Code updated"
# === Windows Claude Code ===cp "$REPO/claude/CLAUDE.md" "$WIN_CLAUDE/CLAUDE.md"# Append Windows-specific sectionscat "$REPO/claude/CLAUDE.windows.md" >> "$WIN_CLAUDE/CLAUDE.md"cp "$REPO/claude/settings.win.json" "$WIN_CLAUDE/settings.json"cp "$REPO/claude/commands/"* "$WIN_CLAUDE/commands/"echo "✓ Windows Claude Code updated"
# === Cursor (if configured) ===# cp "$REPO/cursor/rules/"* ... (see Q3)
echo "✓ All AI configs deployed"Git workflow:
# When you edit any config file:cd ~/config-aigit add -Agit commit -m "update: [what changed]"./deploy.sh # or trigger from git hookOptional: auto-deploy on commit via .git/hooks/post-commit:
#!/bin/bash~/config-ai/deploy.shWhat to Migrate into config-ai
Section titled “What to Migrate into config-ai”Files to move from ~/.claude/ to ~/config-ai/claude/:
CLAUDE.md→claude/CLAUDE.md(WSL version = master)settings.json→claude/settings.wsl.json- Windows
settings.json→claude/settings.win.json commands/*.md→claude/commands/*.md
The deploy script then writes back to ~/.claude/ from the repo.
Q2: Syncing Skills/Commands and Other CC Config
Section titled “Q2: Syncing Skills/Commands and Other CC Config”Current Skill Layers
Section titled “Current Skill Layers”Claude Code has two command scopes:
| Scope | Location | Applies to |
|---|---|---|
| Global | ~/.claude/commands/ (WSL) / C:\Users\Admin\.claude\commands\ (Win) | All CC sessions |
| Project | [project]/.claude/commands/ | Only that project |
Current global skills (6): aic, cpw, now, nowcpw, ptr, ss
Monorepo project skills (3): test-all, deploy, deploy-kb
Sync Strategy
Section titled “Sync Strategy”- Global skills → live in
~/config-ai/claude/commands/→ deploy script copies to both environments - Project skills → stay in
[project]/.claude/commands/→ NOT synced (project-specific is correct) - Windows gets global skills only — Windows doesn’t need monorepo project skills
Adding a New Skill (new workflow after implementing config-ai repo)
Section titled “Adding a New Skill (new workflow after implementing config-ai repo)”# 1. Create in SSoTnano ~/config-ai/claude/commands/my-new-skill.md
# 2. Deploycd ~/config-ai && git commit -am "add: my-new-skill" && ./deploy.sh
# Done — available in both WSL and Windows CCOther CC Config to Sync
Section titled “Other CC Config to Sync”| Item | Sync needed? | Notes |
|---|---|---|
commands/*.md | ✅ Yes | Core sync target |
settings.json | ✅ Yes (as templates) | Keep separate files for WSL/Win |
CLAUDE.md | ✅ Yes | Core sync target |
plugins/ | ⚠️ Maybe | Official plugins auto-install; custom ones yes |
memory/ | ❌ No | Project-specific, not global |
plans/ | ❌ No | Ephemeral CC working files |
statusline-command.sh | ⚠️ Separate | Different paths per environment — keep separate |
Q3: Syncing with Cursor and Other AI Tools
Section titled “Q3: Syncing with Cursor and Other AI Tools”Cursor Config Locations
Section titled “Cursor Config Locations”| Config type | Location | How CC-equivalent |
|---|---|---|
| Global AI rules | Cursor Settings > Rules for AI | Like global CLAUDE.md behavior |
| Project rules | [project]/.cursor/rules/*.mdc | Like project CLAUDE.md |
| Settings | C:\Users\Admin\AppData\Roaming\Cursor\User\settings.json | Editor prefs |
| Legacy rules | [project]/.cursorrules | Deprecated; prefer .mdc |
Your current state: No global AI rules configured. There’s a .cursorrules draft in Downloads (138 lines) that needs to be properly placed.
Launching Cursor in WSL Context
Section titled “Launching Cursor in WSL Context”# From WSL terminal (works if Cursor is installed on Windows):cursor . # Opens current WSL directory in Cursor with WSL Remote
# This means project .cursor/rules/*.mdc files apply automatically# And Cursor uses WSL's git, node, pnpm, etc.Recommended: Start Cursor from WSL — gives you WSL toolchain with Windows GUI.
Cursor Rules Architecture
Section titled “Cursor Rules Architecture”Project-level rules (.cursor/rules/) override global. Structure for the monorepo:
projects/monorepo/.cursor/└── rules/ ├── 00-core-behavior.mdc ← Autonomous execution, testing standards ├── 01-project-context.mdc ← Astro monorepo specifics └── 02-conventions.mdc ← Code style, naming, git conventionsThe 00-core-behavior.mdc content should be derived from the ## Task Execution Philosophy and ## Testing Requirements sections of CLAUDE.md — the behavior rules translate directly to Cursor.
In ~/config-ai/cursor/rules/ keep the master versions of these, and deploy to:
/home/ta/projects/monorepo/.cursor/rules/(WSL project)- Any Windows projects that use Cursor
Cross-Tool Behavior Sharing Pattern
Section titled “Cross-Tool Behavior Sharing Pattern”The key insight: CLAUDE.md has two types of content:
| Content Type | Claude Code | Cursor | Other tools |
|---|---|---|---|
| Behavior rules (autonomous, test standards) | ✅ Use | ✅ Translate | ✅ Translate |
| Tool-specific (Bash, WebFetch, Task agents) | ✅ CC only | ❌ N/A | ❌ N/A |
| Project context (file paths, test commands) | ✅ Use | ✅ Use | ✅ Use |
CC-specific syntax (/test-all skills) | ✅ CC only | ❌ N/A | ❌ N/A |
Proposed ~/config-ai/shared/ai-behavior.md — extract the tool-agnostic content from CLAUDE.md into a shared file, then each tool’s config includes/references it. At deploy time, the script composes each tool’s config from shared + tool-specific sections.
”Anti-gravity” — Clarification Needed
Section titled “”Anti-gravity” — Clarification Needed”The tool you mentioned alongside Cursor — “anti-gravity” — is not a tool I recognize as a standard AI coding assistant. Could you clarify? Possibilities:
- Aider (CLI AI coding tool)
- Augment Code (VS Code extension)
- Avante (Neovim AI plugin)
- Something else?
Once identified, the same pattern applies: extract tool-agnostic behavior rules from CLAUDE.md, adapt syntax for that tool’s config format, add to deploy.sh.
Recommended Implementation Order
Section titled “Recommended Implementation Order”Phase 1: Initialize config-ai repo (1 hour)
Section titled “Phase 1: Initialize config-ai repo (1 hour)”cd ~/config-aigit initcp ~/.claude/CLAUDE.md claude/CLAUDE.mdcp ~/.claude/settings.json claude/settings.wsl.jsoncp /mnt/c/Users/Admin/.claude/settings.json claude/settings.win.jsoncp ~/.claude/commands/* claude/commands/# Create CLAUDE.windows.md with Windows-specific sectionsgit add -A && git commit -m "init: AI config SSoT"Phase 2: Write and test deploy.sh (30 min)
Section titled “Phase 2: Write and test deploy.sh (30 min)”- Write the deploy script
- Test it deploys correctly to both environments
- Add git post-commit hook
Phase 3: Push to GitHub (10 min)
Section titled “Phase 3: Push to GitHub (10 min)”- Create private repo
config-ai - Push — gives you backup + ability to clone on new machines
Phase 4: Cursor integration (30 min)
Section titled “Phase 4: Cursor integration (30 min)”- Move Downloads/.cursorrules content to proper location
- Create
config-ai/cursor/rules/structure - Add Cursor deploy targets to deploy.sh
Phase 5: Other tools (when identified)
Section titled “Phase 5: Other tools (when identified)”Quick Reference: All AI Config File Paths
Section titled “Quick Reference: All AI Config File Paths”Claude Code (WSL)
Section titled “Claude Code (WSL)”- Instructions:
/home/ta/.claude/CLAUDE.md - Settings:
/home/ta/.claude/settings.json - Global skills:
/home/ta/.claude/commands/ - Project skills:
/home/ta/projects/monorepo/.claude/commands/ - Project settings:
/home/ta/projects/monorepo/.claude/settings.local.json - Memory:
/home/ta/.claude/projects/-home-ta-projects-monorepo/memory/MEMORY.md
Claude Code (Windows)
Section titled “Claude Code (Windows)”- Instructions:
C:\Users\Admin\.claude\CLAUDE.md|/mnt/c/Users/Admin/.claude/CLAUDE.md - Settings:
C:\Users\Admin\.claude\settings.json|/mnt/c/Users/Admin/.claude/settings.json - Global skills:
C:\Users\Admin\.claude\commands\|/mnt/c/Users/Admin/.claude/commands/
Cursor (Windows)
Section titled “Cursor (Windows)”- Global settings:
C:\Users\Admin\AppData\Roaming\Cursor\User\settings.json - Global AI rules: Cursor Settings > Rules for AI (stored in settings.json)
- Project rules:
[project]/.cursor/rules/*.mdc - Legacy:
[project]/.cursorrules(deprecated)
Config SSoT (proposed)
Section titled “Config SSoT (proposed)”- Repo:
/home/ta/config-ai/(git) - Deploy script:
/home/ta/config-ai/deploy.sh - Master CLAUDE.md:
/home/ta/config-ai/claude/CLAUDE.md - Master skills:
/home/ta/config-ai/claude/commands/ - Cursor rules:
/home/ta/config-ai/cursor/rules/
Diff Any Two Environments
Section titled “Diff Any Two Environments”# CLAUDE.md: WSL vs Windowsdiff ~/.claude/CLAUDE.md /mnt/c/Users/Admin/.claude/CLAUDE.md
# settings.json: WSL vs Windowsdiff ~/.claude/settings.json /mnt/c/Users/Admin/.claude/settings.json
# Commands: WSL vs Windowsdiff <(ls ~/.claude/commands/) <(ls /mnt/c/Users/Admin/.claude/commands/)
# File contents of commandsfor f in ~/.claude/commands/*.md; do name=$(basename "$f") echo "=== $name ===" diff "$f" "/mnt/c/Users/Admin/.claude/commands/$name" || truedone