@su-record/vibe 0.4.1 → 0.4.3
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/.claude/settings.local.json +2 -1
- package/bin/vibe +96 -1
- package/package.json +2 -2
- package/templates/hooks-template.json +7 -18
package/bin/vibe
CHANGED
|
@@ -149,6 +149,18 @@ async function init(projectName) {
|
|
|
149
149
|
copyDirContents(agentsSourceDir, agentsDir);
|
|
150
150
|
console.log(' ✅ 서브에이전트 설치 완료 (.claude/agents/)\n');
|
|
151
151
|
|
|
152
|
+
// .claude/settings.local.json 생성 (Hooks 설정)
|
|
153
|
+
const settingsPath = path.join(claudeDir, 'settings.local.json');
|
|
154
|
+
if (!fs.existsSync(settingsPath)) {
|
|
155
|
+
const hooksTemplate = path.join(__dirname, '../templates/hooks-template.json');
|
|
156
|
+
if (fs.existsSync(hooksTemplate)) {
|
|
157
|
+
fs.copyFileSync(hooksTemplate, settingsPath);
|
|
158
|
+
console.log(' ✅ Hooks 설정 설치 완료 (.claude/settings.local.json)\n');
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
console.log(' ℹ️ Hooks 설정 이미 존재\n');
|
|
162
|
+
}
|
|
163
|
+
|
|
152
164
|
// 완료 메시지
|
|
153
165
|
console.log(`
|
|
154
166
|
✅ vibe 초기화 완료!
|
|
@@ -160,7 +172,8 @@ ${isNewProject ? `프로젝트 위치:
|
|
|
160
172
|
CLAUDE.md # 프로젝트 컨텍스트
|
|
161
173
|
.claude/
|
|
162
174
|
├── commands/ # 슬래시 커맨드 (7개)
|
|
163
|
-
|
|
175
|
+
├── agents/ # 서브에이전트 (simplifier)
|
|
176
|
+
└── settings.local.json # Hooks 설정 (자동 품질 검증)
|
|
164
177
|
.agent/rules/ # 코딩 규칙
|
|
165
178
|
├── core/ # 핵심 원칙
|
|
166
179
|
├── quality/ # 품질 체크리스트
|
|
@@ -195,6 +208,7 @@ function showHelp() {
|
|
|
195
208
|
|
|
196
209
|
Commands:
|
|
197
210
|
vibe init [project] Initialize vibe in current/new project
|
|
211
|
+
vibe update Update vibe settings (commands, rules, hooks)
|
|
198
212
|
vibe help Show this message
|
|
199
213
|
vibe version Show version
|
|
200
214
|
|
|
@@ -218,6 +232,82 @@ Workflow:
|
|
|
218
232
|
`);
|
|
219
233
|
}
|
|
220
234
|
|
|
235
|
+
// 프로젝트 업데이트
|
|
236
|
+
async function update() {
|
|
237
|
+
try {
|
|
238
|
+
const projectRoot = process.cwd();
|
|
239
|
+
const vibeDir = path.join(projectRoot, '.vibe');
|
|
240
|
+
const claudeDir = path.join(projectRoot, '.claude');
|
|
241
|
+
|
|
242
|
+
if (!fs.existsSync(vibeDir)) {
|
|
243
|
+
console.log('❌ vibe 프로젝트가 아닙니다. 먼저 vibe init을 실행하세요.');
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
console.log('🔄 vibe 업데이트 중...\n');
|
|
248
|
+
|
|
249
|
+
// .claude/commands 업데이트
|
|
250
|
+
const commandsDir = path.join(claudeDir, 'commands');
|
|
251
|
+
ensureDir(commandsDir);
|
|
252
|
+
const sourceDir = path.join(__dirname, '../.claude/commands');
|
|
253
|
+
copyDirContents(sourceDir, commandsDir);
|
|
254
|
+
console.log(' ✅ 슬래시 커맨드 업데이트 완료 (7개)\n');
|
|
255
|
+
|
|
256
|
+
// .agent/rules/ 업데이트
|
|
257
|
+
const rulesSource = path.join(__dirname, '../.agent/rules');
|
|
258
|
+
const rulesTarget = path.join(projectRoot, '.agent/rules');
|
|
259
|
+
copyDirRecursive(rulesSource, rulesTarget);
|
|
260
|
+
console.log(' ✅ 코딩 규칙 업데이트 완료 (.agent/rules/)\n');
|
|
261
|
+
|
|
262
|
+
// .claude/agents/ 업데이트
|
|
263
|
+
const agentsDir = path.join(claudeDir, 'agents');
|
|
264
|
+
ensureDir(agentsDir);
|
|
265
|
+
const agentsSourceDir = path.join(__dirname, '../.claude/agents');
|
|
266
|
+
copyDirContents(agentsSourceDir, agentsDir);
|
|
267
|
+
console.log(' ✅ 서브에이전트 업데이트 완료 (.claude/agents/)\n');
|
|
268
|
+
|
|
269
|
+
// settings.local.json에 hooks 병합
|
|
270
|
+
const settingsPath = path.join(claudeDir, 'settings.local.json');
|
|
271
|
+
const hooksTemplate = path.join(__dirname, '../templates/hooks-template.json');
|
|
272
|
+
|
|
273
|
+
if (fs.existsSync(hooksTemplate)) {
|
|
274
|
+
const vibeHooks = JSON.parse(fs.readFileSync(hooksTemplate, 'utf-8'));
|
|
275
|
+
|
|
276
|
+
if (fs.existsSync(settingsPath)) {
|
|
277
|
+
// 기존 설정에 hooks 병합
|
|
278
|
+
const existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
279
|
+
|
|
280
|
+
if (!existingSettings.hooks) {
|
|
281
|
+
existingSettings.hooks = vibeHooks.hooks;
|
|
282
|
+
fs.writeFileSync(settingsPath, JSON.stringify(existingSettings, null, 2));
|
|
283
|
+
console.log(' ✅ Hooks 설정 추가 완료\n');
|
|
284
|
+
} else {
|
|
285
|
+
console.log(' ℹ️ Hooks 설정 이미 존재\n');
|
|
286
|
+
}
|
|
287
|
+
} else {
|
|
288
|
+
// 새로 생성
|
|
289
|
+
fs.copyFileSync(hooksTemplate, settingsPath);
|
|
290
|
+
console.log(' ✅ Hooks 설정 생성 완료\n');
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const packageJson = require('../package.json');
|
|
295
|
+
console.log(`
|
|
296
|
+
✅ vibe 업데이트 완료! (v${packageJson.version})
|
|
297
|
+
|
|
298
|
+
업데이트된 항목:
|
|
299
|
+
- 슬래시 커맨드 (7개)
|
|
300
|
+
- 코딩 규칙 (.agent/rules/)
|
|
301
|
+
- 서브에이전트 (.claude/agents/)
|
|
302
|
+
- Hooks 설정
|
|
303
|
+
`);
|
|
304
|
+
|
|
305
|
+
} catch (error) {
|
|
306
|
+
console.error('❌ 업데이트 실패:', error.message);
|
|
307
|
+
process.exit(1);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
221
311
|
// 버전 정보
|
|
222
312
|
function showVersion() {
|
|
223
313
|
const packageJson = require('../package.json');
|
|
@@ -230,6 +320,10 @@ switch (command) {
|
|
|
230
320
|
init(args[1]);
|
|
231
321
|
break;
|
|
232
322
|
|
|
323
|
+
case 'update':
|
|
324
|
+
update();
|
|
325
|
+
break;
|
|
326
|
+
|
|
233
327
|
case 'version':
|
|
234
328
|
case '-v':
|
|
235
329
|
case '--version':
|
|
@@ -249,6 +343,7 @@ switch (command) {
|
|
|
249
343
|
|
|
250
344
|
사용 가능한 명령어:
|
|
251
345
|
vibe init 프로젝트 초기화
|
|
346
|
+
vibe update 설정 업데이트
|
|
252
347
|
vibe help 도움말
|
|
253
348
|
vibe version 버전 정보
|
|
254
349
|
|
package/package.json
CHANGED
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://claude.ai/schemas/hooks.json",
|
|
3
|
-
"description": "VIBE 프레임워크 자동 품질 검증 훅",
|
|
4
2
|
"hooks": {
|
|
5
3
|
"PostToolUse": [
|
|
6
4
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
"description": "커밋 전 전체 품질 체크",
|
|
16
|
-
"command": "npm run lint && npm run type-check",
|
|
17
|
-
"enabled": true
|
|
5
|
+
"matcher": "Write|Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "prompt",
|
|
9
|
+
"prompt": ".agent/rules/quality/checklist.md 기준으로 방금 수정한 코드를 검토해주세요. 문제가 있으면 간단히 알려주세요."
|
|
10
|
+
}
|
|
11
|
+
]
|
|
18
12
|
}
|
|
19
13
|
]
|
|
20
|
-
},
|
|
21
|
-
"settings": {
|
|
22
|
-
"autoFix": true,
|
|
23
|
-
"minGrade": "B",
|
|
24
|
-
"reportPath": ".vibe/reports/"
|
|
25
14
|
}
|
|
26
15
|
}
|