Single source of truth → Compile to multiple formats → Diff-based sync
Syncs Skills, MCP, Agents & Commands across Claude Code, Cursor, OpenCode, Codex.
NOT: File copy tool IS: Config compiler + diff executor
Source (Claude Code) → Normalize → Diff → Plan → Compile → Atomic Write → Update Manifest
Before ANY work:
1. Read TASKS.md → Find current phase & task
2. Read docs/prd.md Section 2 → Config formats (MOST IMPORTANT!)
3. Follow TDD → Write tests FIRST
// ⚠️ CRITICAL: Each tool has DIFFERENT formats
// OpenCode
{ "mcp": { "type": "stdio", "environment": { "X": "{env:VAR}" } } }
// ^^^ ^^^^^^ ^^^^^^^^^^^
// NOT mcpServers! Required! Curly braces!
// Claude Code
{ "mcpServers": { "env": { "X": "${VAR}" } } }
// No type field ^^^^^^^
// Dollar sign, no env: prefix
// Cursor
{ "mcpServers": { "env": { "X": "${env:VAR}" } } }
// No type field ^^^^^^^^^^^^
// Dollar sign WITH env: prefix// ❌ WRONG - Expands variables
const config = { env: { TOKEN: process.env.GITHUB_TOKEN } };
// ✅ CORRECT - Preserves syntax
const config = { env: { TOKEN: "${env:GITHUB_TOKEN}" } };// ❌ WRONG - Not crash-safe
await fs.writeFile(path, content);
// ✅ CORRECT - Atomic write
import { atomicWrite } from "./utils/atomic-write";
await atomicWrite(path, content);1. TASKS.md → Pick task
2. Write TEST first (TDD)
3. Implement code
4. pnpm test && pnpm typecheck && pnpm lint
5. Mark [x] in TASKS.md
6. Commit (Angular convention)
| Document | When to Read | Contains |
|---|---|---|
| TASKS.md | Before every task | Current phase, task breakdown, progress |
| docs/prd.md | When implementing | Complete spec, config formats |
| docs/config.md | When needed | Project configuration values |
| .claude/commands/do-task.md | Shortcut | TDD workflow, patterns, validation |
| .claude/commands/create-task.md | Shortcut | Task creation templates |
PRD Section Quick Lookup:
- Section 2 (Config Formats) ← READ THIS BEFORE ADAPTERS
- Section 4 (CLI Commands) ← Before CLI work
- Section 5 (Security) ← Before security work
- Section 6 (Adapter Architecture) ← Before adapter design
- Section 7 (Diff & Plan) ← Before diff/plan work
- Section 8 (MVP Roadmap) ← For scope validation
Execute tasks:
/do-task next # Start next task
/do-task Phase 1.1 # Specific taskCreate tasks:
/create-task feature Add feature name
/create-task bugfix Fix issue descriptionThese commands auto-read TASKS.md, PRD, and guide TDD workflow.
MVP (v1.0) - COMPLETE:
- ✅ Skills + MCP sync
- ✅ Claude Code (source) → Cursor, OpenCode (targets)
- ✅ Safe/Prune modes
- ✅ Project-level config
- ✅ Atomic writes
v1.1 - COMPLETE:
- ✅ Agents + Commands sync
- ✅ Codex adapter
- ✅ User-level config
v1.2 - IN PROGRESS:
- 🟡 Performance optimization
- 🟡 Watch mode
- 🟡 GitHub Action integration
| ❌ Wrong | ✅ Correct |
|---|---|
OpenCode: mcpServers |
mcp |
OpenCode: no type |
type: "local/remote" |
OpenCode: ${env:VAR} |
{env:VAR} |
Claude Code: ${env:VAR} |
${VAR} |
Cursor: ${VAR} (uppercase) |
${env:VAR} |
fs.writeFile() |
atomicWrite() |
| Implement first | Test first (TDD) |
DO automatically:
- Run tests/typecheck/lint
- Update TASKS.md progress
- Create commits (Angular convention)
- Install listed dependencies
ASK before:
- Adding unlisted dependencies
- Changing PRD specifications
- Skipping phases
- Force operations
Architecture: pnpm monorepo
vsync/ # Project root
├── pnpm-workspace.yaml # Workspace config (root level)
├── cli/ # CLI workspace package
│ ├── package.json # CLI dependencies
│ ├── tsconfig.json # TypeScript config
│ ├── src/ # CLI source code
│ │ ├── cli/ # CLI commands
│ │ ├── core/ # Core logic
│ │ ├── adapters/ # Tool adapters
│ │ ├── types/ # TypeScript types
│ │ ├── utils/ # Utilities
│ │ └── index.ts # Entry point
│ └── test/ # Tests (mirrors src/)
└── (future: website/, packages/...)
Tech Stack:
- TypeScript 5 (strict mode)
- pnpm monorepo (CLI workspace in
cli/) - Commander.js + Inquirer.js (CLI)
- Vitest + mock-fs (Testing)
- jsonc-parser (JSONC support)
- gray-matter (Frontmatter)
Task complete:
- Tests written FIRST (TDD)
- Tests pass + typecheck + lint
- Config formats match PRD exactly
- Env vars NOT expanded
- Atomic writes used
- Task marked
[x]in TASKS.md
Phase complete:
- All tasks
[x] - Phase status → 🟢
- Deliverables achieved
New AI assistant? Read this order:
- This file (CLAUDE.md) - 5 min
- TASKS.md - Current phase - 5 min
- PRD Section 2 (Config Formats) - 10 min ← CRITICAL
- PRD other sections - As needed
Then: Use /do-task next to start.
pnpm-workspace.yamlis at project root (same level ascli/)- CLI code is in
cli/workspace - Run
pnpmcommands fromcli/directory - Source code:
cli/src/ - Tests:
cli/test/
# Project structure
vsync/
├── pnpm-workspace.yaml # Root level
└── cli/ # Work here!
├── package.json
├── src/
└── test/
# Commands (run from cli/)
cd cli # Enter CLI workspace
pnpm install # Install dependencies
pnpm test # Run tests
pnpm build # Build CLILast Updated: 2026-01-24