Skip to content

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


LocationPurposeContents
/home/ta/config-ai/Intended SSoT (per CLAUDE.md)Empty stub — commands/, agents/, skills/ dirs all empty
/home/ta/.claude/WSL Claude Code actual configCLAUDE.md (392 lines), commands/ (6 skills), settings.json
C:\Users\Admin\.claude\Windows Claude Code configCLAUDE.md (now synced), commands/ (6 skills, matches WSL), settings.json
/home/ta/projects/monorepo/.claude/commands/Project-level skillstest-all.md, deploy.md, deploy-kb.md
C:\Users\Admin\AppData\Roaming\Cursor\User\settings.jsonCursor global settingsEditor prefs, no AI rules configured yet
C:\Users\Admin\Downloads\.cursorrulesCursor rules draft138 lines — needs to be moved to proper location

~/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”

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 script

Deploy script (~/config-ai/deploy.sh):

#!/usr/bin/env bash
set -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 sections
cat "$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:

Terminal window
# When you edit any config file:
cd ~/config-ai
git add -A
git commit -m "update: [what changed]"
./deploy.sh # or trigger from git hook

Optional: auto-deploy on commit via .git/hooks/post-commit:

#!/bin/bash
~/config-ai/deploy.sh

Files to move from ~/.claude/ to ~/config-ai/claude/:

  • CLAUDE.mdclaude/CLAUDE.md (WSL version = master)
  • settings.jsonclaude/settings.wsl.json
  • Windows settings.jsonclaude/settings.win.json
  • commands/*.mdclaude/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”

Claude Code has two command scopes:

ScopeLocationApplies 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

  1. Global skills → live in ~/config-ai/claude/commands/ → deploy script copies to both environments
  2. Project skills → stay in [project]/.claude/commands/ → NOT synced (project-specific is correct)
  3. 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)”
Terminal window
# 1. Create in SSoT
nano ~/config-ai/claude/commands/my-new-skill.md
# 2. Deploy
cd ~/config-ai && git commit -am "add: my-new-skill" && ./deploy.sh
# Done — available in both WSL and Windows CC
ItemSync needed?Notes
commands/*.md✅ YesCore sync target
settings.json✅ Yes (as templates)Keep separate files for WSL/Win
CLAUDE.md✅ YesCore sync target
plugins/⚠️ MaybeOfficial plugins auto-install; custom ones yes
memory/❌ NoProject-specific, not global
plans/❌ NoEphemeral CC working files
statusline-command.sh⚠️ SeparateDifferent paths per environment — keep separate

Q3: Syncing with Cursor and Other AI Tools

Section titled “Q3: Syncing with Cursor and Other AI Tools”
Config typeLocationHow CC-equivalent
Global AI rulesCursor Settings > Rules for AILike global CLAUDE.md behavior
Project rules[project]/.cursor/rules/*.mdcLike project CLAUDE.md
SettingsC:\Users\Admin\AppData\Roaming\Cursor\User\settings.jsonEditor prefs
Legacy rules[project]/.cursorrulesDeprecated; 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.

Terminal window
# 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.

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 conventions

The 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

The key insight: CLAUDE.md has two types of content:

Content TypeClaude CodeCursorOther 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.


Phase 1: Initialize config-ai repo (1 hour)

Section titled “Phase 1: Initialize config-ai repo (1 hour)”
Terminal window
cd ~/config-ai
git init
cp ~/.claude/CLAUDE.md claude/CLAUDE.md
cp ~/.claude/settings.json claude/settings.wsl.json
cp /mnt/c/Users/Admin/.claude/settings.json claude/settings.win.json
cp ~/.claude/commands/* claude/commands/
# Create CLAUDE.windows.md with Windows-specific sections
git 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
  • Create private repo config-ai
  • Push — gives you backup + ability to clone on new machines
  • Move Downloads/.cursorrules content to proper location
  • Create config-ai/cursor/rules/ structure
  • Add Cursor deploy targets to deploy.sh

  • 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
  • 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/
  • 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)
  • 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/

Terminal window
# CLAUDE.md: WSL vs Windows
diff ~/.claude/CLAUDE.md /mnt/c/Users/Admin/.claude/CLAUDE.md
# settings.json: WSL vs Windows
diff ~/.claude/settings.json /mnt/c/Users/Admin/.claude/settings.json
# Commands: WSL vs Windows
diff <(ls ~/.claude/commands/) <(ls /mnt/c/Users/Admin/.claude/commands/)
# File contents of commands
for f in ~/.claude/commands/*.md; do
name=$(basename "$f")
echo "=== $name ==="
diff "$f" "/mnt/c/Users/Admin/.claude/commands/$name" || true
done