agentleFS
nicepkgnicepkg/vsync/CLAUDE.md

vsync

CLAUDE.md58 starsChanged 9 months agoMITView on GitHub

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 PRD Section Quick Lookup: Execute tasks: Create tasks: These commands auto-read TASKS.md, PRD, and guide TDD workflow. MVP (v1.0) - COMPLETE: v1.1 - COMPLETE: v1.2 - IN PROGRESS:

  • Reads credentials
  • Installs packages

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run tests/typecheck/lint

    line 169
  2. Distinctive:

    Create commits (Angular convention)

    line 171
  3. Very specific:

    Then: Use /do-task next to start.

    line 243
  4. Very specific:

    Run pnpm commands from cli/ directory

    line 253

≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

vsync - AI Coding Tool Config Synchronizer

Single source of truth → Compile to multiple formats → Diff-based sync

Syncs Skills, MCP, Agents & Commands across Claude Code, Cursor, OpenCode, Codex.


🎯 Core Concept

NOT: File copy tool IS: Config compiler + diff executor

Source (Claude Code) → Normalize → Diff → Plan → Compile → Atomic Write → Update Manifest

🚨 Critical Rules (Read FIRST)

1. Follow Documentation Order

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

2. Config Format Precision (See PRD Section 2.2)

// ⚠️ 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

3. Environment Variables

// ❌ WRONG - Expands variables
const config = { env: { TOKEN: process.env.GITHUB_TOKEN } };

// ✅ CORRECT - Preserves syntax
const config = { env: { TOKEN: "${env:GITHUB_TOKEN}" } };

4. File Operations

// ❌ WRONG - Not crash-safe
await fs.writeFile(path, content);

// ✅ CORRECT - Atomic write
import { atomicWrite } from "./utils/atomic-write";
await atomicWrite(path, content);

5. Development Workflow

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)

📚 Documentation Map

DocumentWhen to ReadContains
TASKS.mdBefore every taskCurrent phase, task breakdown, progress
docs/prd.mdWhen implementingComplete spec, config formats
docs/config.mdWhen neededProject configuration values
.claude/commands/do-task.mdShortcutTDD workflow, patterns, validation
.claude/commands/create-task.mdShortcutTask 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

🚀 Quick Start Commands

Execute tasks:

/do-task next         # Start next task
/do-task Phase 1.1    # Specific task

Create tasks:

/create-task feature Add feature name
/create-task bugfix Fix issue description

These commands auto-read TASKS.md, PRD, and guide TDD workflow.


🎯 Current Scope (See TASKS.md for phases)

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

⚠️ Common Mistakes (Full list in PRD Section 2)

❌ Wrong✅ Correct
OpenCode: mcpServersmcp
OpenCode: no typetype: "local/remote"
OpenCode: ${env:VAR}{env:VAR}
Claude Code: ${env:VAR}${VAR}
Cursor: ${VAR} (uppercase)${env:VAR}
fs.writeFile()atomicWrite()
Implement firstTest first (TDD)

🔄 Automation Preferences

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

📦 Tech Stack & Project Structure

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)

✅ Definition of Done

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

🎓 First-Time Setup

New AI assistant? Read this order:

  1. This file (CLAUDE.md) - 5 min
  2. TASKS.md - Current phase - 5 min
  3. PRD Section 2 (Config Formats) - 10 min ← CRITICAL
  4. PRD other sections - As needed

Then: Use /do-task next to start.


📁 Working Directory

⚠️ CRITICAL: pnpm monorepo structure

  • pnpm-workspace.yaml is at project root (same level as cli/)
  • CLI code is in cli/ workspace
  • Run pnpm commands from cli/ 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 CLI

Last Updated: 2026-01-24

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.