codesyncer 1.0.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.
Files changed (61) hide show
  1. package/LICENSE +31 -0
  2. package/README.ko.md +417 -0
  3. package/README.md +417 -0
  4. package/bin/codesyncer.js +3 -0
  5. package/dist/commands/add-repo.d.ts +3 -0
  6. package/dist/commands/add-repo.d.ts.map +1 -0
  7. package/dist/commands/add-repo.js +145 -0
  8. package/dist/commands/add-repo.js.map +1 -0
  9. package/dist/commands/init.d.ts +3 -0
  10. package/dist/commands/init.d.ts.map +1 -0
  11. package/dist/commands/init.js +489 -0
  12. package/dist/commands/init.js.map +1 -0
  13. package/dist/commands/update.d.ts +3 -0
  14. package/dist/commands/update.d.ts.map +1 -0
  15. package/dist/commands/update.js +123 -0
  16. package/dist/commands/update.js.map +1 -0
  17. package/dist/constants/keywords.d.ts +23 -0
  18. package/dist/constants/keywords.d.ts.map +1 -0
  19. package/dist/constants/keywords.js +133 -0
  20. package/dist/constants/keywords.js.map +1 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +52 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/templates/en/architecture.md +147 -0
  26. package/dist/templates/en/claude.md +267 -0
  27. package/dist/templates/en/comment_guide.md +324 -0
  28. package/dist/templates/en/decisions.md +227 -0
  29. package/dist/templates/en/master.md +179 -0
  30. package/dist/templates/ko/architecture.md +147 -0
  31. package/dist/templates/ko/claude.md +267 -0
  32. package/dist/templates/ko/comment_guide.md +324 -0
  33. package/dist/templates/ko/decisions.md +227 -0
  34. package/dist/templates/ko/master.md +179 -0
  35. package/dist/types.d.ts +78 -0
  36. package/dist/types.d.ts.map +1 -0
  37. package/dist/types.js +16 -0
  38. package/dist/types.js.map +1 -0
  39. package/dist/utils/messages.d.ts +129 -0
  40. package/dist/utils/messages.d.ts.map +1 -0
  41. package/dist/utils/messages.js +168 -0
  42. package/dist/utils/messages.js.map +1 -0
  43. package/dist/utils/scanner.d.ts +11 -0
  44. package/dist/utils/scanner.d.ts.map +1 -0
  45. package/dist/utils/scanner.js +311 -0
  46. package/dist/utils/scanner.js.map +1 -0
  47. package/dist/utils/template-loader.d.ts +18 -0
  48. package/dist/utils/template-loader.d.ts.map +1 -0
  49. package/dist/utils/template-loader.js +496 -0
  50. package/dist/utils/template-loader.js.map +1 -0
  51. package/package.json +70 -0
  52. package/src/templates/en/architecture.md +147 -0
  53. package/src/templates/en/claude.md +267 -0
  54. package/src/templates/en/comment_guide.md +324 -0
  55. package/src/templates/en/decisions.md +227 -0
  56. package/src/templates/en/master.md +179 -0
  57. package/src/templates/ko/architecture.md +147 -0
  58. package/src/templates/ko/claude.md +267 -0
  59. package/src/templates/ko/comment_guide.md +324 -0
  60. package/src/templates/ko/decisions.md +227 -0
  61. package/src/templates/ko/master.md +179 -0
@@ -0,0 +1,147 @@
1
+ # ARCHITECTURE.md
2
+
3
+ > **Auto-Generated Documentation** - Project structure and statistics
4
+ >
5
+ > Created: [TODAY]
6
+
7
+ ---
8
+
9
+ ## 📁 Project Structure
10
+
11
+ ```
12
+ [PROJECT_NAME]/
13
+ ├── src/
14
+ │ ├── components/
15
+ │ ├── pages/
16
+ │ ├── services/
17
+ │ ├── utils/
18
+ │ └── types/
19
+ ├── package.json
20
+ └── tsconfig.json
21
+ ```
22
+
23
+ **Update**: Rescan with "update structure" command
24
+
25
+ ---
26
+
27
+ ## 📊 Project Statistics
28
+
29
+ - **Total Files**: 0
30
+ - **TypeScript Files**: 0
31
+ - **JavaScript Files**: 0
32
+ - **Components**: 0
33
+ - **Lines of Code**: 0
34
+
35
+ **Update**: Refresh with "update stats" command
36
+
37
+ ---
38
+
39
+ ## 🔍 Comment Tag Statistics
40
+
41
+ - `@codesyncer-inference`: 0
42
+ - `@codesyncer-decision`: 0
43
+ - `@codesyncer-todo`: 0
44
+ - `@codesyncer-rule`: 0
45
+ - `@codesyncer-context`: 0
46
+
47
+ **Legacy tags (`@claude-*`)**: 0
48
+
49
+ **Update**: Auto-scan or "update stats"
50
+
51
+ ---
52
+
53
+ ## 📝 TODO List
54
+
55
+ **Items Needing Confirmation**: 0
56
+
57
+ No TODOs currently.
58
+
59
+ **Search**: `grep -r "@codesyncer-todo" ./src`
60
+
61
+ ---
62
+
63
+ ## 🏗️ Main Components/Files
64
+
65
+ ### Components
66
+ - Will be auto-added after scan
67
+
68
+ ### Pages
69
+ - Will be auto-added after scan
70
+
71
+ ### Services
72
+ - Will be auto-added after scan
73
+
74
+ ### Utils
75
+ - Will be auto-added after scan
76
+
77
+ ---
78
+
79
+ ## 🔌 API Endpoints
80
+
81
+ No API endpoints discovered.
82
+
83
+ **Search Pattern**: `/api/`, `fetch(`, `axios.`
84
+
85
+ ---
86
+
87
+ ## 📦 Dependencies
88
+
89
+ ### Production
90
+ ```json
91
+ {
92
+ "dependencies": {}
93
+ }
94
+ ```
95
+
96
+ ### Development
97
+ ```json
98
+ {
99
+ "devDependencies": {}
100
+ }
101
+ ```
102
+
103
+ **Update**: Auto-detect on package.json changes
104
+
105
+ ---
106
+
107
+ ## 🎨 Tech Stack
108
+
109
+ - **Language**: [TECH_STACK]
110
+ - **Framework**: To be auto-detected
111
+ - **State Management**: To be auto-detected
112
+ - **Styling**: To be auto-detected
113
+
114
+ ---
115
+
116
+ ## 📈 Code Quality Metrics
117
+
118
+ ### Complexity
119
+ - Average function complexity: N/A
120
+ - Maximum function complexity: N/A
121
+
122
+ ### Test Coverage
123
+ - Total coverage: N/A
124
+ - Line coverage: N/A
125
+ - Branch coverage: N/A
126
+
127
+ **Note**: Auto-displayed when ESLint, Prettier, Jest configured
128
+
129
+ ---
130
+
131
+ ## 🔄 Update History
132
+
133
+ ### [TODAY]
134
+ - Initial creation
135
+
136
+ ---
137
+
138
+ **Auto-Update Triggers**:
139
+ - New folder/file creation detected
140
+ - package.json changes
141
+ - 10+ file modifications
142
+
143
+ **Manual Update**: Use "update structure" or "update stats" command
144
+
145
+ ---
146
+
147
+ *This document is auto-generated and managed by CodeSyncer.*
@@ -0,0 +1,267 @@
1
+ # CLAUDE.md - [PROJECT_NAME] Coding Guide v3.0
2
+
3
+ > **Powered by CodeSyncer** - AI Collaboration System
4
+
5
+ ## 🚀 Quick Start
6
+
7
+ ### Have the AI read this document
8
+ ```
9
+ "Read CLAUDE.md"
10
+ ```
11
+ → AI will automatically apply this project's rules.
12
+
13
+ ### Request in natural language
14
+ ```
15
+ ✅ "Create order list page"
16
+ ✅ "Add login API"
17
+ ✅ "Need a payment button component"
18
+ ✅ "Fix this bug"
19
+ ```
20
+
21
+ **AI will automatically:**
22
+ - Understand project structure
23
+ - Create files in appropriate locations
24
+ - Follow coding rules
25
+ - Request discussion when needed
26
+
27
+ ---
28
+
29
+ ## 🏗️ Project Information
30
+ - **Project Name**: [PROJECT_NAME]
31
+ - **Project Type**: [PROJECT_TYPE]
32
+ - **Tech Stack**: [TECH_STACK]
33
+ - **Created**: [TODAY]
34
+ - **Version**: 1.0.0
35
+
36
+ ## 📁 Project Structure
37
+ See `.claude/ARCHITECTURE.md` for detailed structure
38
+
39
+ ## 🚨 Absolute Rules
40
+ 1. **TypeScript strict mode** usage
41
+ 2. **Functional programming** preferred
42
+ 3. **Explicit type definitions** required
43
+ 4. **Comments on all functions/components** required
44
+ 5. **Error handling** required
45
+
46
+ ## 🔴 No-Inference Zone (Must Confirm with User)
47
+
48
+ **Never infer** the following - always ask the user:
49
+
50
+ - 💰 Business logic numbers (prices, fees, limits, discount rates)
51
+ - 🔌 API endpoint URLs
52
+ - 🔐 Security settings (token expiration, encryption methods)
53
+ - 🗄️ Database schema
54
+ - 🌐 External service integration details
55
+
56
+ **Example:**
57
+ ```
58
+ ❌ Bad: "Set shipping fee to $30"
59
+ ✅ Good: "What should the shipping fee be?"
60
+ ```
61
+
62
+ ## 🤝 Discussion-Required Keywords
63
+
64
+ **Automatically pause work** when these keywords are detected and discuss with user:
65
+
66
+ [KEYWORDS]
67
+
68
+ ### Discussion Process
69
+ 1. **Keyword detected** → "⚠️ '[keyword]' detected. Discussion needed."
70
+ 2. **Present options** → Recommended approach + alternatives
71
+ 3. **Wait for user response** → "Proceed" / "Alternative A" / "Hold"
72
+ 4. **Record decision** → DECISIONS.md + code comment
73
+ 5. **Resume work**
74
+
75
+ ---
76
+
77
+ ## 📝 Comment Writing Rules
78
+
79
+ ### Comment Tags (Both formats supported)
80
+
81
+ **✨ Recommended format** (Compatible with all AI tools):
82
+ ```typescript
83
+ @codesyncer-rule // Special rules (non-standard implementations)
84
+ @codesyncer-inference // Inference and rationale
85
+ @codesyncer-decision // Post-discussion decisions
86
+ @codesyncer-todo // Needs user confirmation
87
+ @codesyncer-context // Business context explanation
88
+ ```
89
+
90
+ **🔄 Legacy format** (Compatible with existing projects):
91
+ ```typescript
92
+ @claude-rule // Same as @codesyncer-rule
93
+ @claude-inference // Same as @codesyncer-inference
94
+ @claude-decision // Same as @codesyncer-decision
95
+ @claude-todo // Same as @codesyncer-todo
96
+ @claude-context // Same as @codesyncer-context
97
+ ```
98
+
99
+ ### Comment Examples by Level
100
+
101
+ #### 📄 File Level (JSDoc)
102
+ ```tsx
103
+ /**
104
+ * User authentication service
105
+ *
106
+ * @codesyncer-context JWT-based authentication system
107
+ * @codesyncer-rule Store tokens in httpOnly cookies (XSS prevention)
108
+ * @author CodeSyncer
109
+ * @date [TODAY]
110
+ */
111
+ ```
112
+
113
+ #### 🔧 Function/Component Level
114
+ ```tsx
115
+ /**
116
+ * Order creation form component
117
+ *
118
+ * @codesyncer-inference 6-step form structure (common order flow)
119
+ * @codesyncer-decision [2024-10-15] Using Zustand for state management (complex form)
120
+ */
121
+ export default function OrderForm() {
122
+ // ...
123
+ }
124
+ ```
125
+
126
+ #### 📝 Inline Level
127
+ ```tsx
128
+ // @codesyncer-inference: Page size 20 (standard UX pattern)
129
+ const PAGE_SIZE = 20;
130
+
131
+ // @codesyncer-todo: Need to confirm mainApi endpoint
132
+ const API_URL = '/api/temp';
133
+
134
+ // @codesyncer-decision: [2024-10-17] Soft Delete method (30-day recovery)
135
+ async function deleteUser(id: string) {
136
+ return db.update(id, { deleted_at: new Date() });
137
+ }
138
+ ```
139
+
140
+ ### Good vs Bad Comments
141
+
142
+ **✅ Good Comments**
143
+ ```tsx
144
+ // @codesyncer-inference: Using localStorage (JWT token storage, common pattern)
145
+ // @codesyncer-context: GDPR compliance needed (auto-delete after 30 days)
146
+ // @codesyncer-decision: [2024-10-15] Using Stripe (Korean payment support)
147
+ ```
148
+
149
+ **❌ Bad Comments**
150
+ ```tsx
151
+ // @codesyncer-inference: Did this
152
+ // @codesyncer-todo: Later
153
+ // @codesyncer-decision: Changed
154
+ ```
155
+
156
+ → Always include **specific reasons and rationale**!
157
+
158
+ ---
159
+
160
+ ## 🔄 Auto-Update System
161
+
162
+ ### Auto-Detection Triggers
163
+
164
+ | Situation | Update Target | User Confirmation |
165
+ |-----------|--------------|-------------------|
166
+ | New folder/file created | ARCHITECTURE.md | "Update structure?" |
167
+ | Post-discussion decision | DECISIONS.md | Auto-add |
168
+ | Same pattern 3 times | Add template to CLAUDE.md | "Add template?" |
169
+ | TODO added/completed | ARCHITECTURE.md stats | "Update stats?" |
170
+
171
+ ### Manual Update Commands
172
+
173
+ ```
174
+ "Update structure" → Rescan ARCHITECTURE.md
175
+ "Add rule" → Add new rule to CLAUDE.md
176
+ "Add template" → Convert repeated pattern to template
177
+ "Update stats" → Refresh comment tag statistics
178
+ ```
179
+
180
+ ---
181
+
182
+ ## 📋 Project Type Guidelines
183
+
184
+ [TEMPLATES]
185
+
186
+ ---
187
+
188
+ ## 🔄 Work Process
189
+
190
+ ### Typical Work Flow
191
+ ```
192
+ 1. Receive user request
193
+
194
+ 2. Check CLAUDE.md rules
195
+
196
+ 3. Check no-inference zones → Ask if needed
197
+
198
+ 4. Check discussion keywords → Discuss if detected
199
+
200
+ 5. Generate code (auto-include comments)
201
+
202
+ 6. If inference made → @codesyncer-inference tag
203
+
204
+ 7. If decision made → Record in DECISIONS.md
205
+
206
+ 8. Report completion
207
+ ```
208
+
209
+ ### What AI Does Automatically
210
+ - ✅ Analyze project structure
211
+ - ✅ Create files in appropriate locations
212
+ - ✅ Auto-add type definitions
213
+ - ✅ Auto-generate comments
214
+ - ✅ Add error handling
215
+ - ✅ Record inferences with tags
216
+
217
+ ---
218
+
219
+ ## 💡 Session Start Checklist
220
+
221
+ When AI reads this file, it automatically:
222
+
223
+ 1. ✅ **Show help** - Display available commands
224
+ 2. ✅ **Understand project structure** - Check ARCHITECTURE.md
225
+ 3. ✅ **Check recent discussions** - Review DECISIONS.md
226
+ 4. ✅ **Ready message** - "Ready to work!"
227
+
228
+ ---
229
+
230
+ ## 📚 Related Documents
231
+
232
+ - **Comment Guide**: `.claude/COMMENT_GUIDE.md` - Detailed comment writing guide
233
+ - **Project Structure**: `.claude/ARCHITECTURE.md` - Folder structure, statistics
234
+ - **Discussion Records**: `.claude/DECISIONS.md` - All discussion decisions
235
+ - **Master Document**: `../.codesyncer/MASTER_CODESYNCER.md` - Multi-repo switching
236
+
237
+ ---
238
+
239
+ ## 🔍 Comment Search
240
+
241
+ All comment tags are searchable:
242
+
243
+ ```bash
244
+ # Find all inferences
245
+ grep -r "@codesyncer-inference" ./
246
+
247
+ # TODO list
248
+ grep -r "@codesyncer-todo" ./
249
+
250
+ # Discussion decisions
251
+ grep -r "@codesyncer-decision" ./
252
+
253
+ # Special rules
254
+ grep -r "@codesyncer-rule" ./
255
+ ```
256
+
257
+ ---
258
+
259
+ **Version**: 1.0.0 (Powered by CodeSyncer)
260
+ **Created**: [TODAY]
261
+ **AI Tools**: Currently Claude Code support | Coming: Cursor, GitHub Copilot, Continue.dev
262
+
263
+ **Tag Compatibility**: Both `@codesyncer-*` (recommended) + `@claude-*` (legacy) supported
264
+
265
+ ---
266
+
267
+ *This collaboration system is open source. Suggest improvements at [CodeSyncer GitHub](https://github.com/bitjaru/codesyncer-cli)!*