codesyncer 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,952 +1,170 @@
1
- # CodeSyncer CLI
1
+ # CodeSyncer
2
2
 
3
3
  > **Claude forgets everything when the session ends. CodeSyncer makes it remember.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/codesyncer.svg)](https://www.npmjs.com/package/codesyncer)
6
6
  [![License](https://img.shields.io/badge/License-Commons%20Clause-red.svg)](./LICENSE)
7
7
  [![GitHub stars](https://img.shields.io/github/stars/bitjaru/codesyncer.svg)](https://github.com/bitjaru/codesyncer/stargazers)
8
- [![GitHub issues](https://img.shields.io/github/issues/bitjaru/codesyncer.svg)](https://github.com/bitjaru/codesyncer/issues)
9
8
 
10
- [한국어 문서](./README.ko.md) | English
9
+ [한국어](./README.ko.md) | English
11
10
 
12
11
  ---
13
12
 
14
- ## The Problem → The Solution
13
+ ## The Problem → The Solution
15
14
 
16
15
  | Problem | Without CodeSyncer | With CodeSyncer |
17
16
  |---------|-------------------|-----------------|
18
- | **Context loss** | Every session = start from scratch | Tags in code = permanent memory |
19
- | **Decision amnesia** | "Why did we use JWT?" → 🤷 | `@codesyncer-decision` instant recall |
20
- | **Dangerous inference** | AI guesses prices, endpoints, auth | Auto-pause on critical keywords |
21
- | **Untracked changes** | No record of AI's reasoning | `codesyncer watch` catches everything |
22
-
23
- **Result**: AI that actually learns your project, not just your current prompt.
17
+ | **Context loss** | Every session = start from scratch | `@codesyncer-*` tags = permanent memory |
18
+ | **Forgot to tag** | Changes go untracked | `codesyncer watch` catches everything |
19
+ | **Rules forgotten** | AI forgets guidelines mid-session | Hooks auto-remind at optimal moments |
20
+ | **Dangerous inference** | AI guesses prices, security, APIs | Auto-pause on critical keywords |
24
21
 
25
22
  ---
26
23
 
27
- ## 🎬 Demo
24
+ ## Demo
28
25
 
29
26
  ![CodeSyncer Demo](https://raw.githubusercontent.com/bitjaru/codesyncer/main/demo.gif)
30
27
 
31
28
  ---
32
29
 
33
- ## 🧠 How It Works
34
-
35
- **The core insight**: AI reads code. So put your context IN the code.
36
-
37
- ```
38
- ┌─────────────────────────┐
39
- │ 🧑‍💻 Code with Claude │
40
- └───────────┬─────────────┘
41
-
42
- ┌──────────────┐
43
- │ Decision? │
44
- └──────┬───────┘
45
-
46
- ┌─────────────────────────┐
47
- │ @codesyncer-decision │
48
- │ @codesyncer-inference │
49
- └───────────┬─────────────┘
50
-
51
- ┌─────────────────────────┐
52
- │ 📝 Saved in code │
53
- └───────────┬─────────────┘
54
-
55
- ┌─────────────────────────┐
56
- │ 🔄 Next session │
57
- │ Claude reads code │
58
- └───────────┬─────────────┘
59
-
60
- ┌─────────────────────────┐
61
- │ ✅ Context recovered! │
62
- └─────────────────────────┘
63
- ```
64
-
65
- ```typescript
66
- // @codesyncer-decision: [2024-01-15] Using JWT (session management is simpler)
67
- // @codesyncer-inference: Page size 20 (standard UX pattern)
68
- // @codesyncer-rule: Use httpOnly cookies (XSS prevention)
69
- const authConfig = { /* ... */ };
70
- ```
71
-
72
- Next session? Claude reads your code and **automatically recovers all context**.
73
-
74
- ---
75
-
76
- ## 🔥 Watch Mode: Never Lose Context Again
77
-
78
- **Problem**: Claude might forget to add tags while coding.
79
-
80
- **Solution**: Run `codesyncer watch` to catch untagged changes.
81
-
82
- ```bash
83
- codesyncer watch
84
- ```
85
-
86
- ```
87
- [14:32:10] 📝 Changed: src/utils/api.ts
88
- └── ⚠️ No tags!
89
- 💡 Hint: Add @codesyncer-inference for inferences
90
-
91
- [14:33:22] 📝 Changed: src/auth/login.ts
92
- └── 🎯 Found: @codesyncer-decision
93
- "Use React Query instead of SWR"
94
- └── ✅ Added to DECISIONS.md
95
- ```
96
-
97
- **Why this matters**: Every code change is an opportunity to capture context. Watch mode ensures nothing slips through.
98
-
99
- ---
100
-
101
- ## 🪝 Hooks: Auto-Reminder System (NEW in v3.2.0)
102
-
103
- **Problem**: In long coding sessions, AI might forget the tagging rules.
104
-
105
- **Solution**: Hooks automatically remind AI to add tags before completing each response.
106
-
107
- ### How It Works
108
-
109
- When you run `codesyncer init`, you'll be asked:
110
-
111
- ```
112
- 🪝 Hooks Setup (Recommended)
113
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
114
- What are Hooks?
115
- In long sessions, AI might forget tagging rules.
116
- Hooks automatically remind AI to check:
117
- "Did you add the tags?" before each response.
118
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
-
120
- ? Set up Hooks? (Recommended) (Y/n)
121
- ```
122
-
123
- If you choose "Yes", CodeSyncer generates `.claude/settings.json`:
124
-
125
- ```json
126
- {
127
- "hooks": {
128
- "Stop": [{
129
- "hooks": [{
130
- "type": "prompt",
131
- "prompt": "Before completing: CodeSyncer check - 1) Inference → @codesyncer-inference tag? 2) Decision → @codesyncer-decision tag? 3) 💰Payment/🔐Security → Did you ask the user? Add any missing tags now."
132
- }]
133
- }]
134
- }
135
- }
136
- ```
137
-
138
- ### Hook Events
139
-
140
- | Event | When It Triggers | Purpose |
141
- |-------|------------------|---------|
142
- | **Stop** | Before AI completes response | Remind to add tags |
143
- | **PreCompact** | Before context compaction | Preserve key rules in memory |
144
-
145
- ### Managing Hooks
146
-
147
- - **Enable**: Say "Set up CodeSyncer Hooks" to your AI
148
- - **Disable**: Delete `.claude/settings.json`
149
- - **Customize**: Edit `.claude/settings.json` directly
150
-
151
- ---
152
-
153
- ## 📂 Context Optimization for Large Projects (NEW in v3.2.0)
154
-
155
- As your codebase grows, AI can get confused. v3.2.0 introduces features to keep AI focused.
156
-
157
- ### Subfolder CLAUDE.md
158
-
159
- When your project gets large, add CLAUDE.md files to specific folders:
160
-
161
- ```
162
- project/
163
- ├── CLAUDE.md # Global rules
164
- ├── src/
165
- │ ├── payment/
166
- │ │ └── CLAUDE.md # Payment-specific rules + tag reminder
167
- │ └── auth/
168
- │ └── CLAUDE.md # Auth-specific rules
169
- ```
170
-
171
- AI automatically reads the relevant CLAUDE.md when entering a folder.
172
-
173
- **Template included**: `src/templates/subfolder-claude.md`
174
-
175
- ### Do Not Touch Zones
176
-
177
- Define folders that AI should never modify:
178
-
179
- ```markdown
180
- ## 🚫 Do Not Touch
181
- - `src/generated/` - Auto-generated files, do not modify
182
- - `src/legacy/` - Do not modify until migration
183
- - `.env*` - Environment variables, do not edit directly
184
- ```
185
-
186
- This prevents AI from accidentally modifying critical or auto-generated code.
187
-
188
- ---
189
-
190
- ## 🔗 Multi-Repo Work Tracking (NEW in v3.2.0)
191
-
192
- ### Git Branch = Work ID
193
-
194
- Use branch names as work identifiers:
195
- - `feature/AUTH-001-login`
196
- - `fix/PAY-002-webhook`
197
-
198
- ### Cross-Repo Tags
199
-
200
- For work spanning multiple repos, use the same tag:
201
-
202
- ```typescript
203
- // frontend repo
204
- // @codesyncer-work:AUTH-001 Login form
205
-
206
- // backend repo
207
- // @codesyncer-work:AUTH-001 Login API
208
- ```
209
-
210
- Search across repos: `grep -r "@codesyncer-work:AUTH-001" ../`
211
-
212
- ---
213
-
214
- ## ✨ Full Feature List
215
-
216
- | Feature | Description |
217
- |---------|-------------|
218
- | 🏷️ **Tag System** | `@codesyncer-decision`, `@codesyncer-inference`, `@codesyncer-rule` - permanent context in code |
219
- | 🔄 **Watch Mode** | Real-time monitoring, warns on untagged changes, auto-syncs to DECISIONS.md |
220
- | ✅ **Validate** | Check tag coverage, find missing documentation, get fix suggestions |
221
- | 🤝 **Auto-Pause** | Detects payment/security/auth keywords → asks before coding |
222
- | 🪝 **Hooks** | Auto-reminder system - AI never forgets rules even in long sessions (NEW v3.2.0) |
223
- | 📦 **Monorepo** | Auto-detects Turborepo, pnpm, Nx, Lerna, npm/yarn workspaces |
224
- | 🌐 **Multi-Language** | Full Korean and English support |
225
- | 🔒 **Security** | Path traversal protection and input validation |
226
-
227
- ---
228
-
229
- ## 🔄 Complete Workflow
230
-
231
- ```
232
- ┌─────────────────────────────────────────────────────────────┐
233
- │ 1. SETUP (once) │
234
- │ $ npm install -g codesyncer │
235
- │ $ codesyncer init │
236
- │ → Creates CLAUDE.md, SETUP_GUIDE.md │
237
- └─────────────────────────────────────────────────────────────┘
238
-
239
- ┌─────────────────────────────────────────────────────────────┐
240
- │ 2. TEACH AI (once per session) │
241
- │ Open Claude Code and say: │
242
- │ "Read CLAUDE.md" │
243
- │ → Claude learns the tagging system │
244
- └─────────────────────────────────────────────────────────────┘
245
-
246
- ┌─────────────────────────────────────────────────────────────┐
247
- │ 3. CODE (with watch mode running) │
248
- │ $ codesyncer watch ← Run in background │
249
- │ Code with Claude as normal │
250
- │ → Claude adds @codesyncer-* tags automatically │
251
- │ → Watch mode alerts if tags are missing │
252
- └─────────────────────────────────────────────────────────────┘
253
-
254
- ┌─────────────────────────────────────────────────────────────┐
255
- │ 4. NEXT SESSION │
256
- │ Claude reads your code → sees the tags │
257
- │ → Context automatically recovered! │
258
- └─────────────────────────────────────────────────────────────┘
259
- ```
260
-
261
- **Supported AI Tools:**
262
- - ✅ **Claude Code** (Recommended)
263
- - 🚧 Cursor, GitHub Copilot, Continue.dev (Coming soon)
264
-
265
- ---
266
-
267
- ## 📦 Installation
30
+ ## Quick Start
268
31
 
269
32
  ```bash
33
+ # 1. Install
270
34
  npm install -g codesyncer
271
- ```
272
-
273
- ---
274
-
275
- ## 🔄 Updating CodeSyncer
276
-
277
- ### Check your current version
278
- ```bash
279
- codesyncer --version
280
- ```
281
-
282
- ### Check latest version
283
- ```bash
284
- npm view codesyncer version
285
- ```
286
-
287
- ### Update to latest
288
- ```bash
289
- npm install -g codesyncer@latest
290
- ```
291
-
292
- ### After updating, validate and sync your project
293
-
294
- When you update CodeSyncer to a new version, first validate your setup, then sync:
295
-
296
- ```bash
297
- cd /path/to/your/multi-repo-workspace
298
-
299
- # Step 1: Check your setup (NEW in v2.7.0)
300
- codesyncer validate
301
-
302
- # Step 2: Fix any issues
303
- codesyncer update
304
- ```
305
-
306
- #### New in v2.7.0: `codesyncer validate`
307
-
308
- The `validate` command checks your CodeSyncer setup and reports issues:
309
-
310
- ```bash
311
- codesyncer validate # Basic validation
312
- codesyncer validate --verbose # Show file paths
313
- ```
314
-
315
- **What it checks:**
316
- - ✅ Master setup exists (`.codesyncer/MASTER_CODESYNCER.md`)
317
- - ✅ Root `CLAUDE.md` for AI auto-loading
318
- - ✅ All repositories have required `.claude/` files
319
- - ✅ No unfilled placeholders in generated files
320
- - ✅ Language configuration
321
-
322
- **Example output:**
323
- ```
324
- 🔍 CodeSyncer - Validate
325
-
326
- 📊 Info
327
- ────────────────────────────────────────
328
- Repository Count: 3
329
- Configured Repos: 2/3
330
- Language: en (config.json)
331
-
332
- ⚠️ Warnings
333
- ────────────────────────────────────────
334
- • mobile-app: Missing ARCHITECTURE.md
335
- • No root CLAUDE.md (AI auto-load disabled)
336
-
337
- ────────────────────────────────────────
338
- ⚠️ Validation passed with 2 warning(s)
339
-
340
- 💡 To fix issues:
341
- codesyncer update
342
- ```
343
-
344
- #### `codesyncer update`
345
-
346
- Sync your project with the latest templates and features:
347
-
348
- **What happens:**
349
- 1. ✅ Scans for new repositories added to your workspace
350
- 2. ✅ Detects missing files from new versions (e.g., root CLAUDE.md in v2.1.2+)
351
- 3. ✅ Auto-detects your language settings (English/Korean)
352
- 4. ✅ Prompts before creating any new files
353
- 5. ✅ Preserves your existing customizations
354
- 6. ✅ **NEW in v3.1.0**: Detects outdated templates and offers upgrade
355
-
356
- **Example output:**
357
- ```
358
- 🔄 CodeSyncer - Update System
359
-
360
- ✓ Scan complete
361
-
362
- ⚠️ Missing root CLAUDE.md (new in v2.1.2)
363
- This file allows Claude to automatically load context at session start.
364
-
365
- ? Create root CLAUDE.md? (Y/n) Y
366
-
367
- ✓ Root CLAUDE.md created!
368
- 💡 Claude will now automatically load context at session start!
369
-
370
- 🤖 Next Steps (Tell your AI):
371
- ────────────────────────────────────────────────────────────
372
- Option 1) Start a new session
373
- Claude will automatically find and read root CLAUDE.md
374
-
375
- Option 2) Apply immediately in current session
376
- "Read CLAUDE.md"
377
- ────────────────────────────────────────────────────────────
378
-
379
- ✅ Update complete!
380
- ```
381
-
382
- #### Template Upgrade (NEW in v3.1.0)
383
-
384
- When you update CodeSyncer to a new version, your existing template files may be outdated. The `update` command now automatically detects this:
385
-
386
- ```
387
- 📦 New Version Detected: v3.1.0
388
-
389
- 📁 my-project/
390
- • CLAUDE.md (v3.0.0 → v3.1.0)
391
- • COMMENT_GUIDE.md (no version → v3.1.0)
392
-
393
- ? Upgrade 2 template(s)?
394
- > Yes - Upgrade (backup existing files to .backup)
395
- No - Skip
396
- Preview - Show files only
397
- ```
398
-
399
- **Features:**
400
- - 🔍 Automatically detects outdated templates by reading version metadata
401
- - 💾 Creates `.backup` files before upgrading (e.g., `CLAUDE.md.backup.2024-01-17`)
402
- - 📋 Preserves project variables (project name, tech stack) during upgrade
403
- - 👁️ Preview option to see what would change
404
-
405
- **After running `codesyncer update`:**
406
-
407
- Choose one of these options to apply changes:
408
-
409
- **Option 1: Start a new AI session** (Recommended)
410
- - Close your current AI assistant
411
- - Open a new session
412
- - Claude automatically finds and reads root CLAUDE.md
413
-
414
- **Option 2: Apply in current session**
415
- - Tell your AI: **"Read CLAUDE.md"**
416
- - AI loads the updated context immediately
417
-
418
- ---
419
-
420
- ## 🚀 Quick Start
421
-
422
- ### Step 1: Install CodeSyncer
423
-
424
- ```bash
425
- npm install -g codesyncer
426
- ```
427
-
428
- ### Step 2: Launch your AI assistant
429
-
430
- Open your AI coding assistant:
431
- - **Claude Code** (Recommended)
432
- - Cursor
433
- - GitHub Copilot
434
- - Or any other AI coding tool
435
35
 
436
- Make sure it's **active and running**.
437
-
438
- ### Step 3: Navigate to your project
439
-
440
- ```bash
36
+ # 2. Initialize
441
37
  cd /path/to/your/project
442
- ```
443
-
444
- CodeSyncer works with **single repositories**, **multi-repo workspaces**, and **monorepos**:
445
-
446
- **Single Repository** (auto-detected):
447
- ```
448
- my-project/
449
- ├── package.json
450
- ├── src/
451
- └── ...
452
- ```
453
-
454
- **Multi-Repository Workspace**:
455
- ```
456
- workspace/
457
- ├── backend/
458
- ├── frontend/
459
- └── mobile/
460
- ```
461
-
462
- **Monorepo** (auto-detected via Turborepo, pnpm, Nx, Lerna, npm/yarn workspaces):
463
- ```
464
- monorepo/
465
- ├── package.json # workspaces: ["packages/*", "apps/*"]
466
- ├── turbo.json # or pnpm-workspace.yaml, nx.json, lerna.json
467
- ├── packages/
468
- │ ├── shared/
469
- │ └── ui/
470
- └── apps/
471
- ├── web/
472
- └── api/
473
- ```
474
-
475
- ### Step 4: Initialize CodeSyncer
476
-
477
- ```bash
478
38
  codesyncer init
479
- ```
480
-
481
- You'll be asked:
482
- - Language preference (Korean/English)
483
- - Project name
484
- - GitHub username
485
-
486
- **What happens:**
487
39
 
488
- | Mode | Detection | Output |
489
- |------|-----------|--------|
490
- | **Single Repo** | Current folder has `package.json`, `.git`, etc. | Creates `.claude/SETUP_GUIDE.md` |
491
- | **Monorepo** | Has `turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json`, or `workspaces` in package.json | Creates `.codesyncer/SETUP_GUIDE.md` with package-aware setup |
492
- | **Multi-Repo** | Subfolders contain separate repositories | Creates `.codesyncer/SETUP_GUIDE.md` |
40
+ # 3. Let AI set up (say this to Claude)
41
+ "Read .claude/SETUP_GUIDE.md and follow the instructions"
493
42
 
494
- **That's all CodeSyncer does!** It provides the framework and rules. Now your AI takes over.
495
-
496
- ---
497
-
498
- ## ⚠️ IMPORTANT: Step 5 - Let AI Set Everything Up
499
-
500
- > **🎯 Don't skip this step!** This is where the magic happens.
501
-
502
- **Launch Claude Code** (or your preferred AI assistant) and say:
503
-
504
- **For Single Repository:**
505
- ```
506
- "Read .claude/SETUP_GUIDE.md and follow the instructions to set up"
507
- ```
508
-
509
- **For Multi-Repository Workspace:**
510
- ```
511
- "Read .codesyncer/SETUP_GUIDE.md and follow the instructions to set up"
43
+ # 4. Start coding (say this each session)
44
+ "Read CLAUDE.md"
512
45
  ```
513
46
 
514
- ### What happens next (automatically):
515
-
516
- **1️⃣ AI Analyzes Your Code**
517
- - Reads actual files in each repository
518
- - Detects tech stack, patterns, and structure
519
- - Understands your project architecture
520
-
521
- **2️⃣ AI Asks Critical Questions** (Never assumes!)
522
- - ❓ "What are your API endpoints?"
523
- - ❓ "What's your pricing and business logic?"
524
- - ❓ "Which authentication method do you use?"
525
- - ❓ "What's your database schema?"
526
- - ❓ "Which external services do you integrate?"
47
+ ---
527
48
 
528
- **3️⃣ AI Generates Complete Documentation**
529
- - `.codesyncer/MASTER_CODESYNCER.md` → Multi-repo navigation
530
- - `<repo>/.claude/CLAUDE.md` → Coding rules
531
- - `<repo>/.claude/ARCHITECTURE.md` → Project structure
532
- - `<repo>/.claude/DECISIONS.md` → Decision log
533
- - `<repo>/.claude/COMMENT_GUIDE.md` → Comment tag guide
49
+ ## Core Features
534
50
 
535
- > **💡 Why this works**: AI analyzes YOUR actual code and asks YOU questions. The generated docs are tailored to your specific project, not generic templates.
51
+ ### 🏷️ Tag System
536
52
 
537
- ---
53
+ Put context IN your code. AI reads code, so it recovers context automatically.
538
54
 
539
- ### Step 6: Start Coding!
540
-
541
- Once setup is complete, just tell your AI:
542
- ```
543
- "Read CLAUDE.md"
55
+ ```typescript
56
+ // @codesyncer-decision: [2024-01-15] Using JWT (session management is simpler)
57
+ // @codesyncer-inference: Page size 20 (standard UX pattern)
58
+ const authConfig = { /* ... */ };
544
59
  ```
545
60
 
546
- Your AI assistant will then:
547
- - Follow your project's coding rules
548
- - Use the correct tech stack patterns
549
- - Ask before making critical decisions
550
- - Record all decisions with `@codesyncer-*` tags
61
+ **[→ Tag System Guide](./docs/TAGS.md)**
551
62
 
552
63
  ---
553
64
 
554
- ## 📚 Usage
65
+ ### 🔄 Watch Mode
555
66
 
556
- ### Initialize collaboration system
557
- ```bash
558
- codesyncer init
559
- ```
67
+ Catch untagged changes in real-time:
560
68
 
561
- ### Update project structure
562
69
  ```bash
563
- codesyncer update
70
+ codesyncer watch
564
71
  ```
565
72
 
566
- ### Watch Mode (NEW in v2.6.0)
567
- ```bash
568
- codesyncer watch # Start real-time monitoring
569
- codesyncer watch --log # With file logging
570
73
  ```
571
-
572
- **What it does:**
573
- - Monitors file changes in real-time
574
- - Auto-syncs `@codesyncer-*` tags to `DECISIONS.md`
575
- - Beautiful console output with session statistics
576
-
577
- **Example output:**
578
- ```
579
- [14:32:10] ✨ Changed: src/utils/api.ts
74
+ [14:32:10] 📝 Changed: src/auth/login.ts
580
75
  └── 🎯 Found: @codesyncer-decision
581
- "Use React Query instead of SWR"
582
76
  └── ✅ Added to DECISIONS.md
583
77
  ```
584
78
 
585
- ### Add new repository to workspace
586
- ```bash
587
- codesyncer add-repo
588
- ```
589
-
590
- ---
591
-
592
- ## 🏷️ Comment Tag System
593
-
594
- CodeSyncer uses a structured comment tag system to permanently record all AI inferences and decisions in your code.
595
-
596
- ### Available Tags
597
-
598
- | Tag | Purpose | Example |
599
- |-----|---------|---------|
600
- | `@codesyncer-rule` | Special rules for non-standard implementations | `// @codesyncer-rule: Use any type here (external lib has no types)` |
601
- | `@codesyncer-inference` | AI inferred something with rationale | `// @codesyncer-inference: Page size 20 (standard UX)` |
602
- | `@codesyncer-decision` | Post-discussion decision | `// @codesyncer-decision: [2024-10-15] Using Stripe (intl payment)` |
603
- | `@codesyncer-todo` | Needs user confirmation | `// @codesyncer-todo: Confirm API endpoint URL` |
604
- | `@codesyncer-context` | Business context explanation | `// @codesyncer-context: GDPR compliance (30-day retention)` |
605
-
606
- ### Legacy Compatibility
607
-
608
- Existing `@claude-*` tags are fully compatible:
609
- ```typescript
610
- @claude-rule = @codesyncer-rule
611
- @claude-inference = @codesyncer-inference
612
- @claude-decision = @codesyncer-decision
613
- @claude-todo = @codesyncer-todo
614
- @claude-context = @codesyncer-context
615
- ```
79
+ **[→ Advanced Usage](./docs/ADVANCED.md)**
616
80
 
617
81
  ---
618
82
 
619
- ## 🤝 Auto-Discussion System
620
-
621
- CodeSyncer automatically pauses AI work when critical keywords are detected, preventing costly mistakes.
83
+ ### 🪝 Hooks
622
84
 
623
- ### Critical Keywords (Auto-Enabled)
85
+ Auto-remind AI at optimal moments (not every response):
624
86
 
625
- - **💰 Payment & Billing**: payment, billing, subscription, charge, refund
626
- - **🔐 Auth & Security**: authentication, login, permission, encrypt, token, jwt
627
- - **🗑️ Data Operations**: delete, remove, drop, migrate, schema change
628
- - **📜 Privacy & Compliance**: personal data, GDPR, privacy, PII
87
+ | Hook | When | Why |
88
+ |------|------|-----|
89
+ | **SessionStart** | Session begins | Inject rules once |
90
+ | **PreCompact** | Before compression | Rules survive compaction |
629
91
 
630
- ### How It Works
92
+ **CodeSyncer uses the most efficient hook timing.**
631
93
 
632
- 1. AI detects keyword (e.g., "payment")
633
- 2. **Automatically pauses work**
634
- 3. Presents recommendation + alternatives
635
- 4. Waits for your decision
636
- 5. Records decision in `DECISIONS.md` + code comments
637
- 6. Resumes work
94
+ **[→ Hooks Guide](./docs/HOOKS.md)**
638
95
 
639
96
  ---
640
97
 
641
- ## 🌍 Multi-Language Support
98
+ ## Supported AI Tools
642
99
 
643
- CodeSyncer fully supports both Korean and English:
644
- - Installation prompts
645
- - Generated documentation
646
- - Comment guidelines
647
- - All UI messages
648
-
649
- Switch language anytime during setup or use language-specific commands.
100
+ | Tool | Status |
101
+ |------|--------|
102
+ | **Claude Code** | ✅ Full support |
103
+ | Cursor | 🚧 Coming soon |
104
+ | GitHub Copilot | 🚧 Coming soon |
650
105
 
651
106
  ---
652
107
 
653
- ## 🔧 Tech Stack Auto-Detection
654
-
655
- CodeSyncer automatically detects your project type and tech stack:
656
-
657
- **Supported:**
658
- - ☕ Java (Spring Boot)
659
- - 🐍 Python (Django, FastAPI)
660
- - 📘 TypeScript / JavaScript
661
- - ⚛️ React / Next.js
662
- - 🟢 Node.js / Express
663
- - 📱 React Native
108
+ ## Documentation
664
109
 
665
- Detection happens automatically by scanning:
666
- - `package.json`, `pom.xml`, `build.gradle`, `requirements.txt`
667
- - Folder structure and dependency lists
110
+ | Guide | Description |
111
+ |-------|-------------|
112
+ | **[Setup Guide](./docs/SETUP.md)** | Installation, configuration, updating |
113
+ | **[Tag System](./docs/TAGS.md)** | All tags and examples |
114
+ | **[Hooks Guide](./docs/HOOKS.md)** | Hook events and customization |
115
+ | **[Advanced Usage](./docs/ADVANCED.md)** | Watch mode, auto-discussion, monorepo |
116
+ | **[FAQ](./docs/FAQ.md)** | Common questions |
668
117
 
669
118
  ---
670
119
 
671
- ## 📖 Example Workflow
672
-
673
- ### Scenario: Adding Payment Feature
120
+ ## Commands
674
121
 
675
122
  ```bash
676
- User: "Add Stripe payment integration"
677
-
678
- AI: ⚠️ 'payment' keyword detected. Discussion needed.
679
-
680
- 💡 Recommendation: Use Stripe
681
-
682
- 🔄 Alternatives:
683
- A. Iamport (Korea only)
684
- B. Toss Payments
685
- C. Custom implementation
686
-
687
- How would you like to proceed?
688
-
689
- User: "Proceed"
690
-
691
- AI: ✅ Recording decision...
692
-
693
- Creating:
694
- - backend/src/services/PaymentService.ts
695
- /**
696
- * @codesyncer-decision: [2024-11-12] Using Stripe (international support)
697
- * @codesyncer-context: Support USD, EUR, KRW
698
- */
699
-
700
- - frontend/src/components/PaymentForm.tsx
701
- - DECISIONS.md updated
702
-
703
- ✅ Payment integration complete!
123
+ codesyncer init # Initialize project
124
+ codesyncer update # Update templates
125
+ codesyncer validate # Check setup
126
+ codesyncer watch # Real-time monitoring
127
+ codesyncer add-repo # Add repo to workspace
128
+ codesyncer skills # Browse skills.sh leaderboard
704
129
  ```
705
130
 
706
131
  ---
707
132
 
708
- ## 🎯 Why CodeSyncer?
133
+ ## Contributing
709
134
 
710
- ### Before CodeSyncer
711
- - AI makes assumptions about critical business logic
712
- - No record of why decisions were made
713
- - Lost context switching between repos
714
- - Inconsistent coding patterns across team
135
+ We welcome contributions! See [CONTRIBUTING.md](./CONTRIBUTING.md)
715
136
 
716
- ### After CodeSyncer ✅
717
- - AI pauses for important decisions
718
- - All decisions permanently recorded
719
- - Seamless multi-repo workflows
720
- - Consistent collaboration system
721
- - Onboarding new team members takes minutes
137
+ **Priority areas:**
138
+ - 🤖 Support for more AI tools
139
+ - 🌐 Additional language translations
140
+ - 📦 More tech stack templates
722
141
 
723
142
  ---
724
143
 
725
- ## 🤖 Supported AI Tools
726
-
727
- ### ✅ Currently Supported
728
- - **Claude Code** (Full support)
144
+ ## Support
729
145
 
730
- ### 🚧 Coming Soon (Community Contributions Welcome!)
731
- - Cursor
732
- - GitHub Copilot
733
- - Continue.dev
734
- - Codeium
735
-
736
- Want to add support for your favorite AI tool? [Contribute here!](https://github.com/bitjaru/codesyncer/issues)
737
-
738
- ---
739
-
740
- ## 📁 Project Structure
741
-
742
- After running `codesyncer init`, your project will look like:
743
-
744
- ### Single Repository Mode
745
-
746
- ```
747
- my-project/
748
- ├── CLAUDE.md # Claude reads this first
749
- └── .claude/
750
- ├── CLAUDE.md # Coding guidelines
751
- ├── COMMENT_GUIDE.md # Tag usage guide
752
- ├── ARCHITECTURE.md # Project structure
753
- ├── DECISIONS.md # Decision log
754
- └── settings.json # Hooks config (v3.2.0+, optional)
755
- ```
756
-
757
- ### Multi-Repository Mode
758
-
759
- ```
760
- workspace/
761
- ├── CLAUDE.md # Claude reads this first
762
- ├── .codesyncer/
763
- │ └── MASTER_CODESYNCER.md # Multi-repo auto-switching guide
764
- ├── backend/
765
- │ └── .claude/
766
- │ ├── CLAUDE.md # Coding guidelines
767
- │ ├── COMMENT_GUIDE.md # Tag usage guide
768
- │ ├── ARCHITECTURE.md # Project structure
769
- │ └── DECISIONS.md # Decision log
770
- ├── frontend/
771
- │ └── .claude/
772
- │ └── (same files)
773
- └── mobile/
774
- └── .claude/
775
- └── (same files)
776
- ```
777
-
778
- ### Monorepo Mode (NEW in v2.4.0)
779
-
780
- ```
781
- monorepo/
782
- ├── CLAUDE.md # Claude reads this first
783
- ├── .codesyncer/
784
- │ └── MASTER_CODESYNCER.md # Package navigation guide
785
- ├── packages/
786
- │ ├── shared/
787
- │ │ └── .claude/
788
- │ │ └── (same files)
789
- │ └── ui/
790
- │ └── .claude/
791
- │ └── (same files)
792
- └── apps/
793
- ├── web/
794
- │ └── .claude/
795
- │ └── (same files)
796
- └── api/
797
- └── .claude/
798
- └── (same files)
799
- ```
800
-
801
- **Supported Monorepo Tools:**
802
- - ✅ Turborepo (`turbo.json`)
803
- - ✅ pnpm (`pnpm-workspace.yaml`)
804
- - ✅ Nx (`nx.json`)
805
- - ✅ Lerna (`lerna.json`)
806
- - ✅ npm/Yarn workspaces (`package.json` with `workspaces` field)
807
- - ✅ Rush (`rush.json`)
808
-
809
- ---
810
-
811
- ## 🛠️ Advanced Usage
812
-
813
- ### Custom Keywords
814
-
815
- In Expert setup mode, you can add custom keywords:
816
-
817
- ```bash
818
- codesyncer init --mode expert
819
- ```
820
-
821
- Then select "Add custom keywords" and specify:
822
- - Keywords to detect
823
- - Severity level (CRITICAL/IMPORTANT/MINOR)
824
- - Description
825
-
826
- ### Updating Existing Projects
827
-
828
- Run `codesyncer update` to:
829
- - Refresh project structure in `ARCHITECTURE.md`
830
- - Update comment tag statistics
831
- - Rescan file structure
832
-
833
- ---
834
-
835
- ## 🔍 Searching Tags
836
-
837
- Find all tagged comments in your codebase:
838
-
839
- ```bash
840
- # All inferences
841
- grep -r "@codesyncer-inference" ./src
842
-
843
- # All TODOs
844
- grep -r "@codesyncer-todo" ./src
845
-
846
- # All decisions
847
- grep -r "@codesyncer-decision" ./src
848
- ```
849
-
850
- ---
851
-
852
- ## 🤝 Contributing
853
-
854
- We welcome contributions! CodeSyncer is open source and community-driven.
855
-
856
- ### 🚀 Quick Start for Contributors
857
-
858
- 1. **Fork** this repository
859
- 2. **Clone** your fork: `git clone https://github.com/YOUR_USERNAME/codesyncer.git`
860
- 3. **Create a branch**: `git checkout -b feature/amazing-feature`
861
- 4. **Make changes** and commit: `git commit -m "feat: Add amazing feature"`
862
- 5. **Push** to your fork: `git push origin feature/amazing-feature`
863
- 6. **Open a Pull Request** on GitHub
864
-
865
- ### 🎯 Priority Areas for Contribution
866
-
867
- - 🤖 **Add support for more AI tools** (Cursor, Copilot, Continue.dev)
868
- - 🌐 **Additional language translations** (Japanese, Chinese, Spanish)
869
- - 📦 **More tech stack templates** (Go, Rust, Ruby, PHP)
870
- - 📝 **Documentation improvements**
871
- - 🐛 **Bug fixes**
872
-
873
- ### 📖 Guidelines
874
-
875
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed contribution guidelines.
876
-
877
- ### 💬 Questions?
878
-
879
- - 📝 Open an [Issue](https://github.com/bitjaru/codesyncer/issues)
880
- - 💡 Start a [Discussion](https://github.com/bitjaru/codesyncer/discussions)
881
-
882
- ---
883
-
884
- ## 📝 License
885
-
886
- **Commons Clause License + MIT**
887
-
888
- - ✅ **Free to use** for personal and non-commercial projects
889
- - ✅ **Free to fork and modify** the code
890
- - ✅ **Free to contribute** back to the project
891
- - ❌ **Cannot sell** this software or provide it as a paid service
892
-
893
- See [LICENSE](./LICENSE) file for full details.
894
-
895
- **Why Commons Clause?**
896
- We want CodeSyncer to remain free and accessible to all developers while preventing commercial exploitation. If you need a commercial license, please contact us.
897
-
898
- ---
899
-
900
- ## 🙋 FAQ
901
-
902
- **Q: Does this only work with Claude Code?**
903
- A: Currently, yes. But we're building support for Cursor, GitHub Copilot, and other tools. Contributions welcome!
904
-
905
- **Q: Can I use this on a single repository?**
906
- A: Yes! CodeSyncer automatically detects if you're in a single repo (has `package.json`, `.git`, etc.) and creates `.claude/SETUP_GUIDE.md` instead of the multi-repo structure.
907
-
908
- **Q: Does this work with monorepos (Turborepo, pnpm, Nx, Lerna)?**
909
- A: Yes! As of v2.4.0, CodeSyncer automatically detects monorepo configurations (`turbo.json`, `pnpm-workspace.yaml`, `nx.json`, `lerna.json`, or `package.json` with workspaces) and scans all packages in your workspace patterns.
910
-
911
- **Q: Will this slow down AI responses?**
912
- A: No. CodeSyncer only adds documentation files that AI reads once per session. It actually makes AI more efficient by providing context upfront.
913
-
914
- **Q: Can I customize the keyword detection?**
915
- A: Yes, use Expert setup mode to fully customize which keywords trigger discussions.
916
-
917
- **Q: Is my code/data sent anywhere?**
918
- A: No. CodeSyncer is a purely local CLI tool that generates documentation files in your repos. Nothing is sent to external servers.
919
-
920
- ---
921
-
922
- ## 🌟 Show Your Support
923
-
924
- If CodeSyncer helps your team, please:
146
+ If CodeSyncer helps you:
925
147
  - ⭐ Star this repo
926
148
  - 🐦 Share on Twitter
927
- - 📝 Write about your experience
928
- - 🤝 Contribute improvements
929
-
930
- ### 💰 Support Development
931
-
932
- If you'd like to support the development of CodeSyncer, you can donate via cryptocurrency:
933
149
 
934
- **Ethereum (ETH) / ERC-20 Tokens:**
150
+ **Ethereum (ETH):**
935
151
  ```
936
152
  0x0a12177c448778a37Fa4EeA57d33D06713F200De
937
153
  ```
938
154
 
939
- Your support helps maintain and improve CodeSyncer! 🙏
155
+ ---
156
+
157
+ ## License
158
+
159
+ **Commons Clause + MIT** - Free for personal/non-commercial use. See [LICENSE](./LICENSE)
940
160
 
941
161
  ---
942
162
 
943
- ## 📮 Contact
163
+ ## Contact
944
164
 
945
- - **Issues**: [GitHub Issues](https://github.com/bitjaru/codesyncer/issues)
946
- - **Discussions**: [GitHub Discussions](https://github.com/bitjaru/codesyncer/discussions)
165
+ - [GitHub Issues](https://github.com/bitjaru/codesyncer/issues)
166
+ - [GitHub Discussions](https://github.com/bitjaru/codesyncer/discussions)
947
167
 
948
168
  ---
949
169
 
950
170
  **Built with ❤️ by the CodeSyncer community**
951
-
952
- *Making AI collaboration seamless, one repo at a time.*