sumulige-claude 1.5.1 → 1.6.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 (223) hide show
  1. package/.claude/hooks/hook-registry.json +0 -15
  2. package/.claude/rules/coding-style.md +18 -7
  3. package/.claude/rules/hooks.md +15 -4
  4. package/.claude/rules/performance.md +15 -5
  5. package/.claude/rules/security.md +140 -4
  6. package/.claude/rules/testing.md +138 -9
  7. package/.claude/rules/web-design-standard.md +16 -5
  8. package/.claude/skills/algorithmic-art/metadata.yaml +28 -0
  9. package/.claude/skills/api-tester/SKILL.md +61 -0
  10. package/.claude/skills/api-tester/examples/basic.md +3 -0
  11. package/.claude/skills/api-tester/metadata.yaml +30 -0
  12. package/.claude/skills/api-tester/templates/default.md +3 -0
  13. package/.claude/skills/brand-guidelines/metadata.yaml +26 -0
  14. package/.claude/skills/canvas-design/metadata.yaml +27 -0
  15. package/.claude/skills/code-reviewer-123/SKILL.md +61 -0
  16. package/.claude/skills/code-reviewer-123/examples/basic.md +3 -0
  17. package/.claude/skills/code-reviewer-123/metadata.yaml +30 -0
  18. package/.claude/skills/code-reviewer-123/templates/default.md +3 -0
  19. package/.claude/skills/doc-coauthoring/metadata.yaml +27 -0
  20. package/.claude/skills/docx/metadata.yaml +30 -0
  21. package/.claude/skills/frontend-design/metadata.yaml +28 -0
  22. package/.claude/skills/internal-comms/metadata.yaml +28 -0
  23. package/.claude/skills/mcp-builder/metadata.yaml +26 -0
  24. package/.claude/skills/my-skill/SKILL.md +61 -0
  25. package/.claude/skills/my-skill/examples/basic.md +3 -0
  26. package/.claude/skills/my-skill/metadata.yaml +30 -0
  27. package/.claude/skills/my-skill/templates/default.md +3 -0
  28. package/.claude/skills/pdf/metadata.yaml +29 -0
  29. package/.claude/skills/pptx/metadata.yaml +29 -0
  30. package/.claude/skills/react-best-practices/metadata.yaml +26 -0
  31. package/.claude/skills/react-node-practices/SKILL.md +409 -0
  32. package/.claude/skills/react-node-practices/metadata.yaml +56 -0
  33. package/.claude/skills/skill-creator/metadata.yaml +25 -0
  34. package/.claude/skills/slack-gif-creator/metadata.yaml +28 -0
  35. package/.claude/skills/test-skill-name/SKILL.md +61 -0
  36. package/.claude/skills/test-skill-name/examples/basic.md +3 -0
  37. package/.claude/skills/test-skill-name/metadata.yaml +30 -0
  38. package/.claude/skills/test-skill-name/templates/default.md +3 -0
  39. package/.claude/skills/test-workflow/metadata.yaml +32 -0
  40. package/.claude/skills/theme-factory/metadata.yaml +26 -0
  41. package/.claude/skills/threejs-fundamentals/metadata.yaml +27 -0
  42. package/.claude/skills/web-artifacts-builder/metadata.yaml +30 -0
  43. package/.claude/skills/web-design-guidelines/metadata.yaml +26 -0
  44. package/.claude/skills/webapp-testing/metadata.yaml +26 -0
  45. package/.claude/skills/xlsx/metadata.yaml +29 -0
  46. package/LICENSE +21 -0
  47. package/README.md +280 -529
  48. package/cli.js +19 -3
  49. package/package.json +29 -3
  50. package/template/.codex/README.md +69 -0
  51. package/template/.codex/config.toml +56 -0
  52. package/template/AGENTS.md +94 -0
  53. package/.claude/.kickoff-hint.txt +0 -52
  54. package/.claude/.sumulige-claude-version +0 -1
  55. package/.claude/.version +0 -1
  56. package/.claude/AGENTS.md +0 -42
  57. package/.claude/ANCHORS.md +0 -40
  58. package/.claude/CLAUDE.md +0 -138
  59. package/.claude/MEMORY.md +0 -69
  60. package/.claude/PROJECT_LOG.md +0 -101
  61. package/.claude/THINKING_CHAIN_GUIDE.md +0 -287
  62. package/.claude/USAGE.md +0 -175
  63. package/.claude/boris-optimizations.md +0 -167
  64. package/.claude/handoffs/INDEX.md +0 -21
  65. package/.claude/handoffs/LATEST.md +0 -76
  66. package/.claude/handoffs/handoff_2026-01-22T13-07-04-757Z.md +0 -76
  67. package/.claude/quality-gate.json +0 -82
  68. package/.claude/rag/skill-index.json +0 -135
  69. package/.claude/settings.json +0 -99
  70. package/.claude/settings.local.json +0 -175
  71. package/.claude/templates/PROJECT_KICKOFF.md +0 -89
  72. package/.claude/templates/PROJECT_PROPOSAL.md +0 -227
  73. package/.claude/templates/TASK_PLAN.md +0 -121
  74. package/.claude/templates/hooks/README.md +0 -302
  75. package/.claude/templates/hooks/hook.sh.template +0 -94
  76. package/.claude/templates/hooks/user-prompt-submit.cjs.template +0 -116
  77. package/.claude/templates/hooks/user-response-submit.cjs.template +0 -94
  78. package/.claude/templates/hooks/validate.js +0 -173
  79. package/.claude/templates/tasks/develop.md +0 -69
  80. package/.claude/templates/tasks/research.md +0 -64
  81. package/.claude/templates/tasks/test.md +0 -96
  82. package/.claude/thinking-routes/.last-sync +0 -1
  83. package/.claude/thinking-routes/QUICKREF.md +0 -98
  84. package/.claude/workflow/document-scanner.js +0 -426
  85. package/.claude/workflow/knowledge-engine.js +0 -941
  86. package/.claude/workflow/notebooklm/browser.js +0 -1028
  87. package/.claude/workflow/phases/phase1-research.js +0 -578
  88. package/.claude/workflow/phases/phase1-research.ts +0 -465
  89. package/.claude/workflow/phases/phase2-approve.js +0 -722
  90. package/.claude/workflow/phases/phase3-plan.js +0 -1200
  91. package/.claude/workflow/phases/phase4-develop.js +0 -894
  92. package/.claude/workflow/search-cache.js +0 -230
  93. package/.claude/workflow/templates/approval.md +0 -315
  94. package/.claude/workflow/templates/development.md +0 -377
  95. package/.claude/workflow/templates/planning.md +0 -328
  96. package/.claude/workflow/templates/research.md +0 -250
  97. package/.claude/workflow/types.js +0 -37
  98. package/.claude/workflow/web-search.js +0 -278
  99. package/.claude-plugin/marketplace.json +0 -71
  100. package/.github/workflows/sync-skills.yml +0 -74
  101. package/.versionrc +0 -25
  102. package/AGENTS.md +0 -580
  103. package/CHANGELOG.md +0 -481
  104. package/CLAUDE-template.md +0 -114
  105. package/DEV_TOOLS_GUIDE.md +0 -190
  106. package/PROJECT_STRUCTURE.md +0 -266
  107. package/Q&A.md +0 -325
  108. package/config/defaults.json +0 -34
  109. package/config/official-skills.json +0 -183
  110. package/config/quality-gate.json +0 -67
  111. package/config/skill-categories.json +0 -40
  112. package/config/version-manifest.json +0 -85
  113. package/demos/power-3d-scatter.html +0 -683
  114. package/development/cache/web-search/search_1193d605f8eb364651fc2f2041b58a31.json +0 -36
  115. package/development/cache/web-search/search_3798bf06960edc125f744a1abb5b72c5.json +0 -36
  116. package/development/cache/web-search/search_37c7d4843a53f0d83f1122a6f908a2a3.json +0 -36
  117. package/development/cache/web-search/search_44166fa0153709ee168485a22aa0ab40.json +0 -36
  118. package/development/cache/web-search/search_4deaebb1f77e86a8ca066dc5a49c59fd.json +0 -36
  119. package/development/cache/web-search/search_94da91789466070a7f545612e73c7372.json +0 -36
  120. package/development/cache/web-search/search_dd5de8491b8b803a3cb01339cd210fb0.json +0 -36
  121. package/development/knowledge-base/.index.clean.json +0 -1
  122. package/development/knowledge-base/.index.json +0 -486
  123. package/development/knowledge-base/test-best-practices.md +0 -29
  124. package/development/projects/proj_mkh1pazz_ixmt1/phase1/feasibility-report.md +0 -160
  125. package/development/projects/proj_mkh4jvnb_z7rwf/phase1/feasibility-report.md +0 -160
  126. package/development/projects/proj_mkh4jxkd_ewz5a/phase1/feasibility-report.md +0 -160
  127. package/development/projects/proj_mkh4k84n_ni73k/phase1/feasibility-report.md +0 -160
  128. package/development/projects/proj_mkh4wfyd_u9w88/phase1/feasibility-report.md +0 -160
  129. package/development/projects/proj_mkh4wsbo_iahvf/development/projects/proj_mkh4xbpg_4na5w/phase1/feasibility-report.md +0 -160
  130. package/development/projects/proj_mkh4wsbo_iahvf/phase1/feasibility-report.md +0 -160
  131. package/development/projects/proj_mkh4xulg_1ka8x/phase1/feasibility-report.md +0 -160
  132. package/development/projects/proj_mkh4xwhj_gch8j/phase1/feasibility-report.md +0 -160
  133. package/development/projects/proj_mkh4y2qk_9lm8z/phase1/feasibility-report.md +0 -160
  134. package/development/projects/proj_mkh4y2qk_9lm8z/phase2/requirements.md +0 -226
  135. package/development/projects/proj_mkh4y2qk_9lm8z/phase3/PRD.md +0 -345
  136. package/development/projects/proj_mkh4y2qk_9lm8z/phase3/TASK_PLAN.md +0 -284
  137. package/development/projects/proj_mkh4y2qk_9lm8z/phase3/prototype/README.md +0 -14
  138. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/DEVELOPMENT_LOG.md +0 -35
  139. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/TASKS.md +0 -34
  140. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/.env.example +0 -5
  141. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/README.md +0 -60
  142. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/package.json +0 -25
  143. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/index.js +0 -70
  144. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/src/routes/index.js +0 -48
  145. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/health.test.js +0 -20
  146. package/development/projects/proj_mkh4y2qk_9lm8z/phase4/source/tests/jest.config.js +0 -21
  147. package/development/projects/proj_mkh7veqg_3lypc/phase1/feasibility-report.md +0 -160
  148. package/development/projects/proj_mkh7veqg_3lypc/phase2/requirements.md +0 -226
  149. package/development/projects/proj_mkh7veqg_3lypc/phase3/PRD.md +0 -345
  150. package/development/projects/proj_mkh7veqg_3lypc/phase3/TASK_PLAN.md +0 -284
  151. package/development/projects/proj_mkh7veqg_3lypc/phase3/prototype/README.md +0 -14
  152. package/development/projects/proj_mkh8k8fo_rmqn5/phase1/feasibility-report.md +0 -160
  153. package/development/projects/proj_mkh8xyhy_1vshq/phase1/feasibility-report.md +0 -178
  154. package/development/projects/proj_mkh8zddd_dhamf/phase1/feasibility-report.md +0 -377
  155. package/development/projects/proj_mkh8zddd_dhamf/phase2/requirements.md +0 -442
  156. package/development/projects/proj_mkh8zddd_dhamf/phase3/api-design.md +0 -800
  157. package/development/projects/proj_mkh8zddd_dhamf/phase3/architecture.md +0 -625
  158. package/development/projects/proj_mkh8zddd_dhamf/phase3/data-model.md +0 -830
  159. package/development/projects/proj_mkh8zddd_dhamf/phase3/risks.md +0 -957
  160. package/development/projects/proj_mkh8zddd_dhamf/phase3/wbs.md +0 -381
  161. package/development/todos/.state.json +0 -19
  162. package/development/todos/INDEX.md +0 -63
  163. package/development/todos/active/_README.md +0 -49
  164. package/development/todos/archived/_README.md +0 -11
  165. package/development/todos/backlog/_README.md +0 -11
  166. package/development/todos/backlog/mcp-integration.md +0 -35
  167. package/development/todos/completed/_README.md +0 -11
  168. package/development/todos/completed/boris-optimizations.md +0 -39
  169. package/development/todos/completed/develop/local-knowledge-index.md +0 -85
  170. package/development/todos/completed/develop/todo-system.md +0 -47
  171. package/development/todos/completed/develop/web-search-integration.md +0 -83
  172. package/development/todos/completed/test/phase1-e2e-test.md +0 -103
  173. package/docs/DEVELOPMENT.md +0 -461
  174. package/docs/MARKETPLACE.md +0 -352
  175. package/docs/RELEASE.md +0 -93
  176. package/jest.config.js +0 -63
  177. package/lib/commands.js +0 -3588
  178. package/lib/config-manager.js +0 -441
  179. package/lib/config-schema.js +0 -408
  180. package/lib/config-validator.js +0 -330
  181. package/lib/config.js +0 -122
  182. package/lib/errors.js +0 -305
  183. package/lib/incremental-sync.js +0 -274
  184. package/lib/marketplace.js +0 -487
  185. package/lib/migrations.js +0 -154
  186. package/lib/permission-audit.js +0 -255
  187. package/lib/quality-gate.js +0 -431
  188. package/lib/quality-rules.js +0 -373
  189. package/lib/utils.js +0 -150
  190. package/lib/version-check.js +0 -169
  191. package/lib/version-manifest.js +0 -171
  192. package/project-paradigm.md +0 -313
  193. package/prompts/how-to-find.md +0 -163
  194. package/prompts/linus-architect.md +0 -71
  195. package/prompts/software-architect.md +0 -173
  196. package/prompts/web-designer.md +0 -249
  197. package/scripts/fix-hooks.mjs +0 -97
  198. package/scripts/sync-external.mjs +0 -298
  199. package/scripts/sync-to-home.sh +0 -108
  200. package/scripts/update-registry.mjs +0 -325
  201. package/sources.yaml +0 -83
  202. package/tests/README.md +0 -263
  203. package/tests/commands.test.js +0 -1086
  204. package/tests/config-manager.test.js +0 -677
  205. package/tests/config-schema.test.js +0 -425
  206. package/tests/config-validator.test.js +0 -436
  207. package/tests/config.test.js +0 -100
  208. package/tests/errors.test.js +0 -477
  209. package/tests/manual/phase1-e2e.sh +0 -389
  210. package/tests/manual/phase2-test-cases.md +0 -311
  211. package/tests/manual/phase3-test-cases.md +0 -309
  212. package/tests/manual/phase4-test-cases.md +0 -414
  213. package/tests/manual/test-cases.md +0 -417
  214. package/tests/marketplace.test.js +0 -420
  215. package/tests/migrations.test.js +0 -187
  216. package/tests/quality-gate.test.js +0 -679
  217. package/tests/quality-rules.test.js +0 -619
  218. package/tests/sync-external.test.js +0 -214
  219. package/tests/update-registry.test.js +0 -251
  220. package/tests/utils.test.js +0 -171
  221. package/tests/version-check.test.js +0 -75
  222. package/tests/web-search.test.js +0 -392
  223. package/thinkinglens-silent.md +0 -138
@@ -1,298 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Sync External Skills
4
- *
5
- * This script reads sources.yaml and syncs skills from external repositories.
6
- * It clones external repos, copies specified files, and generates source metadata.
7
- *
8
- * Usage: node scripts/sync-external.mjs
9
- */
10
-
11
- import fs from 'fs';
12
- import path from 'path';
13
- import { fileURLToPath } from 'url';
14
- import { execSync } from 'child_process';
15
- import yaml from 'yaml';
16
-
17
- const __filename = fileURLToPath(import.meta.url);
18
- const __dirname = path.dirname(__filename);
19
- const ROOT_DIR = path.join(__dirname, '..');
20
- const SOURCES_FILE = path.join(ROOT_DIR, 'sources.yaml');
21
-
22
- // ============================================================================
23
- // Logging Utilities
24
- // ============================================================================
25
-
26
- const COLORS = {
27
- reset: '\x1b[0m',
28
- green: '\x1b[32m',
29
- blue: '\x1b[34m',
30
- yellow: '\x1b[33m',
31
- red: '\x1b[31m',
32
- gray: '\x1b[90m'
33
- };
34
-
35
- function log(message, color = 'reset') {
36
- console.log(`${COLORS[color]}${message}${COLORS.reset}`);
37
- }
38
-
39
- function logStep(num, total, message) {
40
- log(`[${num}/${total}] ${message}`, 'blue');
41
- }
42
-
43
- // ============================================================================
44
- // File System Utilities
45
- // ============================================================================
46
-
47
- /**
48
- * Ensure a directory exists, create if not
49
- */
50
- function ensureDir(dirPath) {
51
- if (!fs.existsSync(dirPath)) {
52
- fs.mkdirSync(dirPath, { recursive: true });
53
- }
54
- }
55
-
56
- /**
57
- * Recursively copy directory contents
58
- */
59
- function copyRecursive(src, dest, include = [], exclude = []) {
60
- let count = 0;
61
-
62
- if (!fs.existsSync(src)) {
63
- return count;
64
- }
65
-
66
- const stat = fs.statSync(src);
67
-
68
- if (stat.isDirectory()) {
69
- ensureDir(dest);
70
-
71
- const entries = fs.readdirSync(src);
72
-
73
- for (const entry of entries) {
74
- // Check exclude patterns
75
- const excluded = exclude.some(pattern => {
76
- const regex = new RegExp(pattern.replace('*', '.*'));
77
- return regex.test(entry);
78
- });
79
-
80
- if (excluded) {
81
- continue;
82
- }
83
-
84
- // Check include patterns (if specified)
85
- if (include.length > 0) {
86
- const included = include.some(pattern => {
87
- const regex = new RegExp(pattern.replace('*', '.*'));
88
- return regex.test(entry);
89
- });
90
- if (!included) {
91
- continue;
92
- }
93
- }
94
-
95
- const srcPath = path.join(src, entry);
96
- const destPath = path.join(dest, entry);
97
- count += copyRecursive(srcPath, destPath, [], exclude);
98
- }
99
- } else {
100
- fs.copyFileSync(src, dest);
101
- count = 1;
102
- }
103
-
104
- return count;
105
- }
106
-
107
- /**
108
- * Remove directory recursively
109
- */
110
- function removeDir(dirPath) {
111
- if (fs.existsSync(dirPath)) {
112
- fs.rmSync(dirPath, { recursive: true, force: true });
113
- }
114
- }
115
-
116
- // ============================================================================
117
- // Git Utilities
118
- // ============================================================================
119
-
120
- /**
121
- * Clone a Git repository to a temporary directory
122
- */
123
- function cloneRepo(repo, ref, targetDir) {
124
- const url = `https://github.com/${repo}.git`;
125
- const command = `git clone --depth 1 --branch ${ref} ${url} ${targetDir}`;
126
-
127
- try {
128
- execSync(command, { stdio: 'pipe' });
129
- return true;
130
- } catch (error) {
131
- log(`Failed to clone ${repo}: ${error.message}`, 'red');
132
- return false;
133
- }
134
- }
135
-
136
- // ============================================================================
137
- // Source Metadata
138
- // ============================================================================
139
-
140
- /**
141
- * Write .source.json file for a synced skill
142
- */
143
- function writeSourceJson(skill, targetPath) {
144
- const sourceJson = {
145
- name: skill.name,
146
- description: skill.description,
147
- source: {
148
- repo: skill.source?.repo,
149
- path: skill.source?.path,
150
- ref: skill.source?.ref || 'main',
151
- synced_at: new Date().toISOString()
152
- },
153
- author: skill.author,
154
- license: skill.license,
155
- homepage: skill.homepage,
156
- verified: skill.verified || false
157
- };
158
-
159
- const sourceJsonPath = path.join(targetPath, '.source.json');
160
- fs.writeFileSync(sourceJsonPath, JSON.stringify(sourceJson, null, 2));
161
- }
162
-
163
- // ============================================================================
164
- // Main Sync Logic
165
- // ============================================================================
166
-
167
- /**
168
- * Parse sources.yaml file
169
- */
170
- function parseSources() {
171
- if (!fs.existsSync(SOURCES_FILE)) {
172
- log('sources.yaml not found!', 'red');
173
- return null;
174
- }
175
-
176
- const content = fs.readFileSync(SOURCES_FILE, 'utf8');
177
- return yaml.parse(content);
178
- }
179
-
180
- /**
181
- * Sync a single external skill
182
- */
183
- function syncSkill(skill, index, total) {
184
- logStep(index, total, `Syncing: ${skill.name}`);
185
-
186
- // Skip native skills (maintained directly in repo)
187
- if (skill.native) {
188
- log(` → Skipped (native skill)`, 'gray');
189
- return { success: true, skipped: true };
190
- }
191
-
192
- // Validate required fields
193
- if (!skill.source?.repo) {
194
- log(` → Skipped (no source.repo)`, 'yellow');
195
- return { success: false, error: 'Missing source.repo' };
196
- }
197
-
198
- const targetPath = path.join(ROOT_DIR, skill.target.path);
199
- const tmpDir = path.join(ROOT_DIR, '.tmp', skill.name);
200
-
201
- try {
202
- // Clone repository
203
- log(` → Cloning ${skill.source.repo}...`, 'gray');
204
- if (!cloneRepo(skill.source.repo, skill.source.ref || 'main', tmpDir)) {
205
- return { success: false, error: 'Clone failed' };
206
- }
207
-
208
- // Determine source path
209
- const sourcePath = path.join(tmpDir, skill.source.path || '');
210
-
211
- if (!fs.existsSync(sourcePath)) {
212
- log(` → Source path not found: ${skill.source.path}`, 'yellow');
213
- removeDir(tmpDir);
214
- return { success: false, error: 'Source path not found' };
215
- }
216
-
217
- // Clear target directory
218
- removeDir(targetPath);
219
- ensureDir(targetPath);
220
-
221
- // Copy files
222
- const include = skill.sync?.include || [];
223
- const exclude = skill.sync?.exclude || ['node_modules', '*.lock'];
224
-
225
- log(` → Copying files...`, 'gray');
226
- const count = copyRecursive(sourcePath, targetPath, include, exclude);
227
-
228
- // Write source metadata
229
- writeSourceJson(skill, targetPath);
230
-
231
- // Cleanup
232
- removeDir(tmpDir);
233
-
234
- log(` → Synced ${count} files`, 'green');
235
- return { success: true, fileCount: count };
236
-
237
- } catch (error) {
238
- removeDir(tmpDir);
239
- log(` → Error: ${error.message}`, 'red');
240
- return { success: false, error: error.message };
241
- }
242
- }
243
-
244
- /**
245
- * Main sync function
246
- */
247
- function syncAll() {
248
- log('🔄 Syncing External Skills', 'blue');
249
- log('=====================================', 'gray');
250
- log('');
251
-
252
- const sources = parseSources();
253
- if (!sources || !sources.skills) {
254
- log('No skills found in sources.yaml', 'yellow');
255
- return;
256
- }
257
-
258
- const skills = sources.skills;
259
- const total = skills.length;
260
-
261
- log(`Found ${total} skill(s) in sources.yaml`, 'gray');
262
- log('');
263
-
264
- let synced = 0;
265
- let skipped = 0;
266
- let failed = 0;
267
-
268
- for (let i = 0; i < total; i++) {
269
- const result = syncSkill(skills[i], i + 1, total);
270
-
271
- if (result.success) {
272
- if (result.skipped) {
273
- skipped++;
274
- } else {
275
- synced++;
276
- }
277
- } else {
278
- failed++;
279
- }
280
-
281
- log('');
282
- }
283
-
284
- // Summary
285
- log('=====================================', 'gray');
286
- log(`✅ Synced: ${synced}`, 'green');
287
- log(`⏭️ Skipped: ${skipped}`, 'yellow');
288
- if (failed > 0) {
289
- log(`❌ Failed: ${failed}`, 'red');
290
- }
291
- log('=====================================', 'gray');
292
- }
293
-
294
- // ============================================================================
295
- // Run
296
- // ============================================================================
297
-
298
- syncAll();
@@ -1,108 +0,0 @@
1
- #!/bin/bash
2
- # sumulige-claude → ~/.claude 同步脚本
3
- # 用法: ./scripts/sync-to-home.sh [--link | --copy]
4
-
5
- set -e
6
-
7
- SOURCE_DIR="$(cd "$(dirname "$0")/.." && pwd)/.claude"
8
- TARGET_DIR="$HOME/.claude"
9
-
10
- # 颜色
11
- GREEN='\033[0;32m'
12
- YELLOW='\033[1;33m'
13
- NC='\033[0m'
14
-
15
- echo "═══════════════════════════════════════════════════════════"
16
- echo " sumulige-claude → ~/.claude 同步"
17
- echo "═══════════════════════════════════════════════════════════"
18
- echo ""
19
- echo "源目录: $SOURCE_DIR"
20
- echo "目标: $TARGET_DIR"
21
- echo ""
22
-
23
- # 需要符号链接的目录(共享配置)
24
- LINK_DIRS=(hooks skills templates commands)
25
-
26
- # 需要复制的文件(模板)
27
- COPY_FILES=(
28
- CLAUDE.md
29
- MEMORY.md
30
- PROJECT_LOG.md
31
- ANCHORS.md
32
- AGENTS.md
33
- README.md
34
- boris-optimizations.md
35
- settings.json
36
- )
37
-
38
- # 创建符号链接
39
- sync_links() {
40
- echo "📁 同步共享配置 (符号链接)..."
41
- for dir in "${LINK_DIRS[@]}"; do
42
- if [ -d "$SOURCE_DIR/$dir" ]; then
43
- # 删除目标目录(如果存在且不是链接)
44
- if [ -d "$TARGET_DIR/$dir" ] && [ ! -L "$TARGET_DIR/$dir" ]; then
45
- echo " 删除现有目录: $TARGET_DIR/$dir"
46
- rm -rf "$TARGET_DIR/$dir"
47
- fi
48
- # 创建符号链接
49
- if [ ! -L "$TARGET_DIR/$dir" ]; then
50
- ln -sf "$SOURCE_DIR/$dir" "$TARGET_DIR/$dir"
51
- echo -e " ${GREEN}✓${NC} $dir → 已链接"
52
- else
53
- echo -e " ${YELLOW}○${NC} $dir → 已是链接"
54
- fi
55
- fi
56
- done
57
- }
58
-
59
- # 复制模板文件
60
- sync_files() {
61
- echo ""
62
- echo "📄 同步模板文件 (复制)..."
63
- for file in "${COPY_FILES[@]}"; do
64
- if [ -f "$SOURCE_DIR/$file" ]; then
65
- cp "$SOURCE_DIR/$file" "$TARGET_DIR/$file"
66
- echo -e " ${GREEN}✓${NC} $file"
67
- fi
68
- done
69
- }
70
-
71
- # 显示状态
72
- show_status() {
73
- echo ""
74
- echo "═══════════════════════════════════════════════════════════"
75
- echo " 当前状态"
76
- echo "═══════════════════════════════════════════════════════════"
77
- for dir in "${LINK_DIRS[@]}"; do
78
- if [ -L "$TARGET_DIR/$dir" ]; then
79
- target=$(readlink "$TARGET_DIR/$dir")
80
- echo -e " ${GREEN}✓${NC} $dir → $target"
81
- elif [ -d "$TARGET_DIR/$dir" ]; then
82
- echo -e " ${YELLOW}○${NC} $dir (独立目录,未链接)"
83
- else
84
- echo " ✗ $dir (不存在)"
85
- fi
86
- done
87
- }
88
-
89
- # 主逻辑
90
- case "${1:-}" in
91
- --status)
92
- show_status
93
- ;;
94
- --link)
95
- sync_links
96
- show_status
97
- ;;
98
- --copy)
99
- sync_files
100
- ;;
101
- *)
102
- sync_links
103
- sync_files
104
- echo ""
105
- echo -e "${GREEN}✅ 同步完成!${NC}"
106
- show_status
107
- ;;
108
- esac