@su-record/vibe 0.4.0 → 0.4.2
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 +5 -1
- package/bin/vibe +35 -6
- package/package.json +2 -2
- package/templates/hooks-template.json +7 -18
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
"SlashCommand(/vibe.spec:*)",
|
|
34
34
|
"Bash(node bin/vibe:*)",
|
|
35
35
|
"Bash(npm pack:*)",
|
|
36
|
-
"Bash(npm config set:*)"
|
|
36
|
+
"Bash(npm config set:*)",
|
|
37
|
+
"Bash(node:*)",
|
|
38
|
+
"Bash(xargs basename:*)",
|
|
39
|
+
"Bash(git restore:*)",
|
|
40
|
+
"Bash(npm version:*)"
|
|
37
41
|
],
|
|
38
42
|
"deny": [],
|
|
39
43
|
"ask": []
|
package/bin/vibe
CHANGED
|
@@ -113,11 +113,27 @@ async function init(projectName) {
|
|
|
113
113
|
};
|
|
114
114
|
fs.writeFileSync(path.join(vibeDir, 'config.json'), JSON.stringify(config, null, 2));
|
|
115
115
|
|
|
116
|
-
// CLAUDE.md
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
// CLAUDE.md 병합 (기존 내용 보존)
|
|
117
|
+
const vibeClaudeMd = path.join(__dirname, '../CLAUDE.md');
|
|
118
|
+
const projectClaudeMd = path.join(projectRoot, 'CLAUDE.md');
|
|
119
|
+
|
|
120
|
+
if (fs.existsSync(projectClaudeMd)) {
|
|
121
|
+
// 기존 CLAUDE.md가 있으면 vibe 섹션 추가
|
|
122
|
+
const existingContent = fs.readFileSync(projectClaudeMd, 'utf-8');
|
|
123
|
+
const vibeContent = fs.readFileSync(vibeClaudeMd, 'utf-8');
|
|
124
|
+
|
|
125
|
+
if (!existingContent.includes('/vibe.spec')) {
|
|
126
|
+
// vibe 섹션이 없으면 끝에 추가
|
|
127
|
+
const mergedContent = existingContent.trim() + '\n\n---\n\n' + vibeContent;
|
|
128
|
+
fs.writeFileSync(projectClaudeMd, mergedContent);
|
|
129
|
+
console.log(' ✅ CLAUDE.md에 vibe 섹션 추가\n');
|
|
130
|
+
} else {
|
|
131
|
+
console.log(' ℹ️ CLAUDE.md에 vibe 섹션 이미 존재\n');
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
// 없으면 새로 생성
|
|
135
|
+
fs.copyFileSync(vibeClaudeMd, projectClaudeMd);
|
|
136
|
+
console.log(' ✅ CLAUDE.md 생성\n');
|
|
121
137
|
}
|
|
122
138
|
|
|
123
139
|
// .agent/rules/ 복사 (코딩 규칙)
|
|
@@ -133,6 +149,18 @@ async function init(projectName) {
|
|
|
133
149
|
copyDirContents(agentsSourceDir, agentsDir);
|
|
134
150
|
console.log(' ✅ 서브에이전트 설치 완료 (.claude/agents/)\n');
|
|
135
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
|
+
|
|
136
164
|
// 완료 메시지
|
|
137
165
|
console.log(`
|
|
138
166
|
✅ vibe 초기화 완료!
|
|
@@ -144,7 +172,8 @@ ${isNewProject ? `프로젝트 위치:
|
|
|
144
172
|
CLAUDE.md # 프로젝트 컨텍스트
|
|
145
173
|
.claude/
|
|
146
174
|
├── commands/ # 슬래시 커맨드 (7개)
|
|
147
|
-
|
|
175
|
+
├── agents/ # 서브에이전트 (simplifier)
|
|
176
|
+
└── settings.local.json # Hooks 설정 (자동 품질 검증)
|
|
148
177
|
.agent/rules/ # 코딩 규칙
|
|
149
178
|
├── core/ # 핵심 원칙
|
|
150
179
|
├── quality/ # 품질 체크리스트
|
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
|
}
|