@su-record/vibe 0.1.4 → 0.2.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/bin/vibe CHANGED
@@ -8,19 +8,9 @@
8
8
  const path = require('path');
9
9
  const fs = require('fs');
10
10
 
11
- // 명령어 목록
11
+ // 명령어 목록 (Claude Code 전용)
12
12
  const commands = {
13
- init: 'Initialize vibe in current project',
14
- spec: 'Create/manage SPEC documents',
15
- plan: 'Create technical implementation plan',
16
- tasks: 'Break down SPEC into actionable tasks',
17
- run: 'Run task implementation (with auto guide generation)',
18
- verify: 'Verify implementation against SPEC',
19
- analyze: 'Analyze project (code quality, architecture, dependencies)',
20
- ui: 'Preview UI with ASCII art',
21
- diagram: 'Generate diagrams (architecture, ERD, flow)',
22
- agents: 'List available agents',
23
- skills: 'List installed skills',
13
+ init: 'Initialize vibe in current project (MCP registration)',
24
14
  help: 'Show help message'
25
15
  };
26
16
 
@@ -30,50 +20,40 @@ const command = args[0];
30
20
  // 도움말 출력
31
21
  function showHelp() {
32
22
  console.log(`
33
- 📖 vibe - Your story becomes code
34
-
35
- Usage:
36
- vibe <command> [options]
37
-
38
- Commands:
39
- init Initialize vibe in current project
40
- spec <name> Create SPEC through 6-question Q&A
41
- plan <name> Create implementation plan from SPEC
42
- tasks <name> Generate tasks from SPEC + PLAN
43
- run <task-id> Run task (auto-guide + implement)
44
- run --phase <N> Run all tasks in Phase N
45
- run --all Run all tasks sequentially
46
- verify <name> Verify against SPEC requirements
47
-
48
- analyze Analyze project (code/deps/arch)
49
- analyze --code Code quality analysis
50
- analyze --deps Dependency analysis
51
- ui <description> Preview UI with ASCII art
52
- diagram Generate architecture diagram
53
- diagram --er Generate ERD diagram
54
-
55
- agents List available agents
56
- skills List installed skills
57
- help Show this message
23
+ 📖 Vibe - SPEC-driven AI coding framework for Claude Code
24
+
25
+ ⚠️ Vibe는 Claude Code 전용 프레임워크입니다.
26
+ 터미널에서는 초기화만 가능합니다.
27
+
28
+ 터미널 명령어:
29
+ vibe init Initialize vibe in current project
30
+ vibe init <project-name> Create new project with vibe
31
+ vibe help Show this message
32
+
33
+ Claude Code 슬래시 커맨드 (프로젝트 내에서 사용):
34
+ /vibe.spec "기능명" SPEC 작성 (대화형 Q&A)
35
+ /vibe.plan "기능명" 기술 계획 작성
36
+ /vibe.tasks "기능명" Task 목록 생성
37
+ /vibe.run "Task 1-1" Task 구현
38
+ /vibe.verify "기능명" 검증
39
+ /vibe.analyze 프로젝트 분석
40
+ /vibe.ui "설명" UI 미리보기
41
+ /vibe.diagram --er 다이어그램 생성
58
42
 
59
43
  Workflow:
60
- 1. vibe spec "기능명" → SPEC 작성 (Q&A)
61
- 2. vibe plan "기능명" → PLAN 작성 (기술 계획)
62
- 3. vibe tasks "기능명" → TASKS 생성 (19개 Task)
63
- 4. vibe run "Task 1-1" → Task 구현 (가이드 생성 + 코드 작성)
64
- 5. vibe verify "기능명" → SPEC 검증
65
-
66
- Examples:
67
- $ vibe init
68
- $ vibe story create "푸시 알림 설정"
69
- $ vibe plan "푸시 알림 설정"
70
- $ vibe tasks "푸시 알림 설정"
71
- $ vibe run "Task 1-1" # 개별 Task 실행
72
- $ vibe run --phase 1 # Phase 1 전체 실행
73
- $ vibe run --all # 전체 실행
74
-
75
- More info:
76
- https://github.com/your-username/vibe
44
+ 1. 터미널에서 vibe init 실행 (MCP 서버 등록)
45
+ 2. Claude Code에서 슬래시 커맨드 사용
46
+ /vibe.spec "푸시 알림 설정"
47
+ /vibe.plan "푸시 알림 설정"
48
+ /vibe.tasks "푸시 알림 설정"
49
+ /vibe.run "Task 1-1"
50
+ /vibe.verify "푸시 알림 설정"
51
+
52
+ 설치:
53
+ npm install -g @su-record/vibe
54
+
55
+ 문서:
56
+ https://github.com/su-record/vibe/wiki
77
57
  `);
78
58
  }
79
59
 
@@ -84,8 +64,25 @@ function showVersion() {
84
64
  }
85
65
 
86
66
  // 프로젝트 초기화
87
- function init() {
88
- const vibeDir = path.join(process.cwd(), '.vibe');
67
+ function init(projectName) {
68
+ let projectRoot = process.cwd();
69
+ let isNewProject = false;
70
+
71
+ // 새 프로젝트 생성 케이스
72
+ if (projectName) {
73
+ projectRoot = path.join(process.cwd(), projectName);
74
+
75
+ if (fs.existsSync(projectRoot)) {
76
+ console.log(`❌ 폴더가 이미 존재합니다: ${projectName}/`);
77
+ return;
78
+ }
79
+
80
+ console.log(`📁 새 프로젝트 생성: ${projectName}/\n`);
81
+ fs.mkdirSync(projectRoot, { recursive: true });
82
+ isNewProject = true;
83
+ }
84
+
85
+ const vibeDir = path.join(projectRoot, '.vibe');
89
86
 
90
87
  if (fs.existsSync(vibeDir)) {
91
88
  console.log('❌ .vibe/ 폴더가 이미 존재합니다.');
@@ -109,9 +106,32 @@ function init() {
109
106
  // 폴더 생성
110
107
  fs.mkdirSync(vibeDir);
111
108
  fs.mkdirSync(path.join(vibeDir, 'specs'));
109
+ fs.mkdirSync(path.join(vibeDir, 'features'));
112
110
  fs.mkdirSync(path.join(vibeDir, 'plans'));
113
111
  fs.mkdirSync(path.join(vibeDir, 'tasks'));
114
112
 
113
+ // .claude/commands 폴더 생성 및 슬래시 커맨드 복사
114
+ const claudeDir = path.join(projectRoot, '.claude');
115
+ const commandsDir = path.join(claudeDir, 'commands');
116
+
117
+ if (!fs.existsSync(claudeDir)) {
118
+ fs.mkdirSync(claudeDir);
119
+ }
120
+ if (!fs.existsSync(commandsDir)) {
121
+ fs.mkdirSync(commandsDir);
122
+ }
123
+
124
+ // 슬래시 커맨드 파일들 복사
125
+ const sourceCommandsDir = path.join(__dirname, '../.claude/commands');
126
+ if (fs.existsSync(sourceCommandsDir)) {
127
+ const commandFiles = fs.readdirSync(sourceCommandsDir);
128
+ commandFiles.forEach(file => {
129
+ const sourcePath = path.join(sourceCommandsDir, file);
130
+ const destPath = path.join(commandsDir, file);
131
+ fs.copyFileSync(sourcePath, destPath);
132
+ });
133
+ }
134
+
115
135
  // constitution.md 템플릿 복사
116
136
  const templatePath = path.join(__dirname, '../templates/constitution-template.md');
117
137
  const constitutionPath = path.join(vibeDir, 'constitution.md');
@@ -141,11 +161,16 @@ function init() {
141
161
  console.log(`
142
162
  ✅ vibe 초기화 완료!
143
163
 
144
- 생성된 구조:
164
+ ${isNewProject ? `프로젝트 위치:
165
+ ${projectRoot}/
166
+
167
+ ` : ''}생성된 구조:
168
+ .claude/commands/ # 슬래시 커맨드 (8개)
145
169
  .vibe/
146
170
  ├── config.json # 프로젝트 설정 (언어: 한국어)
147
171
  ├── constitution.md # 프로젝트 원칙
148
172
  ├── specs/ # SPEC 문서들
173
+ ├── features/ # BDD Feature 파일들 (Gherkin)
149
174
  ├── plans/ # 기술 계획들
150
175
  └── tasks/ # 작업 목록들
151
176
 
@@ -157,67 +182,17 @@ MCP 서버:
157
182
  .vibe/config.json에서 "language"를 "en" 또는 "ko"로 변경
158
183
 
159
184
  다음 단계:
160
- vibe spec "기능명" - 기능 SPEC 작성
185
+ ${isNewProject ? `1. cd ${projectName}\n 2. ` : ''}Claude Code에서 슬래시 커맨드 사용:
186
+ /vibe.spec "기능명"
187
+ /vibe.plan "기능명"
161
188
  `);
162
189
  }
163
190
 
164
- // 에이전트 목록
165
- function listAgents() {
166
- const agentsDir = path.join(__dirname, '../agents');
167
- const agents = fs.readdirSync(agentsDir).filter(f => f.endsWith('.md'));
168
-
169
- console.log('\n🤖 사용 가능한 에이전트:\n');
170
- agents.forEach((agent, i) => {
171
- const name = agent.replace('.md', '');
172
- console.log(` ${i + 1}. ${name}`);
173
- });
174
- console.log('');
175
- }
176
-
177
- // 스킬 목록
178
- function listSkills() {
179
- const skillsDir = path.join(__dirname, '../skills');
180
- const categories = fs.readdirSync(skillsDir).filter(f => {
181
- return fs.statSync(path.join(skillsDir, f)).isDirectory();
182
- });
183
-
184
- console.log('\n📚 설치된 스킬:\n');
185
- categories.forEach(category => {
186
- const skills = fs.readdirSync(path.join(skillsDir, category))
187
- .filter(f => f.endsWith('.md'));
188
- console.log(` ${category}/`);
189
- skills.forEach(skill => {
190
- console.log(` - ${skill.replace('.md', '')}`);
191
- });
192
- });
193
- console.log('');
194
- }
195
-
196
- // Claude Code와 통합 (추후 구현)
197
- function delegateToClaudeCode(command, args) {
198
- console.log(`
199
- ⚠️ 이 명령어는 Claude Code와 통합이 필요합니다.
200
-
201
- 지금은 수동으로 Claude Code를 열고 다음과 같이 요청하세요:
202
-
203
- "${command} ${args.join(' ')}"
204
-
205
- 향후 업데이트에서 자동화될 예정입니다.
206
- `);
207
- }
208
191
 
209
192
  // 메인 라우터
210
193
  switch (command) {
211
194
  case 'init':
212
- init();
213
- break;
214
-
215
- case 'agents':
216
- listAgents();
217
- break;
218
-
219
- case 'skills':
220
- listSkills();
195
+ init(args[1]);
221
196
  break;
222
197
 
223
198
  case 'version':
@@ -233,124 +208,20 @@ switch (command) {
233
208
  showHelp();
234
209
  break;
235
210
 
236
- // vibe run 명령어 (새로운 구현 워크플로우)
237
- case 'run':
238
- handleRunCommand(args.slice(1));
239
- break;
240
-
241
- // Claude Code 위임이 필요한 명령어들
242
- case 'spec':
243
- case 'plan':
244
- case 'tasks':
245
- case 'verify':
246
- case 'analyze':
247
- case 'ui':
248
- case 'diagram':
249
- delegateToClaudeCode(command, args.slice(1));
250
- break;
251
-
252
211
  default:
253
- console.log(`❌ 알 수 없는 명령어: ${command}`);
254
- console.log('사용법을 보려면: vibe help');
255
- process.exit(1);
256
- }
257
-
258
- // vibe run 명령어 핸들러
259
- function handleRunCommand(args) {
260
- const option = args[0];
261
-
262
- if (!option) {
263
- console.log(`
264
- ❌ 사용법: vibe run <task-id> | --phase <N> | --all
265
-
266
- 예시:
267
- vibe run "Task 1-1" # 특정 Task 실행
268
- vibe run --phase 1 # Phase 1 전체 실행
269
- vibe run --all # 모든 Task 실행
270
- `);
271
- return;
272
- }
273
-
274
- // --all 플래그 처리
275
- if (option === '--all') {
276
212
  console.log(`
277
- 🚀 전체 Task 실행 시작...
278
-
279
- Claude Code에 다음과 같이 요청하세요:
213
+ 없는 명령어: ${command}
280
214
 
281
- "vibe run --all 실행해줘. TASKS 문서의 의존성 순서대로 19개 Task를 모두 구현해줘."
215
+ ⚠️ Vibe는 Claude Code 전용 프레임워크입니다.
216
+ 터미널에서는 'init'만 사용 가능합니다.
282
217
 
283
- 작업 순서:
284
- Phase 1 (Backend) → Task 1-1 ~ 1-8
285
- Phase 2 (Frontend) → Task 2-1 ~ 2-8
286
- Phase 3 (FCM) → Task 3-1 ~ 3-3
218
+ Claude Code에서 슬래시 커맨드를 사용하세요:
219
+ /vibe.spec "기능명"
220
+ /vibe.plan "기능명"
221
+ /vibe.tasks "기능명"
222
+ /vibe.run "Task 1-1"
287
223
 
288
- ⚠️ 주의: 전체 실행은 약 24시간 소요됩니다.
224
+ 사용법: vibe help
289
225
  `);
290
- return;
291
- }
292
-
293
- // --phase 플래그 처리
294
- if (option === '--phase') {
295
- const phaseNumber = args[1];
296
- if (!phaseNumber) {
297
- console.log(`❌ Phase 번호를 지정하세요: vibe run --phase <1|2|3>`);
298
- return;
299
- }
300
-
301
- console.log(`
302
- 🚀 Phase ${phaseNumber} 실행 시작...
303
-
304
- Claude Code에 다음과 같이 요청하세요:
305
-
306
- "vibe run --phase ${phaseNumber} 실행해줘. TASKS 문서의 Phase ${phaseNumber} Task들을 순차적으로 구현해줘."
307
-
308
- Phase ${phaseNumber} 작업 목록:
309
- ${getPhaseTaskList(phaseNumber)}
310
-
311
- 예상 시간: ${getPhaseEstimatedTime(phaseNumber)}
312
- `);
313
- return;
314
- }
315
-
316
- // 특정 Task 실행
317
- const taskId = option;
318
- console.log(`
319
- 🚀 Task 실행: "${taskId}"
320
-
321
- Claude Code에 다음과 같이 요청하세요:
322
-
323
- "vibe run '${taskId}' 실행해줘. 다음 순서로 진행해줘:
324
-
325
- 1. TASKS 문서에서 '${taskId}' 찾기
326
- 2. 구현 가이드 생성 (.vibe/guides/${taskId}.md)
327
- 3. 가이드에 따라 코드 구현
328
- 4. Acceptance Criteria 검증
329
- 5. Task 상태를 ✅ 완료로 업데이트"
330
-
331
- 구현 가이드 생성 위치:
332
- .vibe/guides/${taskId.replace(/\s+/g, '-').toLowerCase()}.md
333
-
334
- 검증 명령어는 TASKS 문서 참고
335
- `);
336
- }
337
-
338
- // Phase별 Task 목록 (하드코딩 - 추후 TASKS 파일에서 파싱)
339
- function getPhaseTaskList(phase) {
340
- const phases = {
341
- '1': 'Task 1-1 ~ 1-8 (Backend 개발)',
342
- '2': 'Task 2-1 ~ 2-8 (Frontend 개발)',
343
- '3': 'Task 3-1 ~ 3-3 (FCM 연동 및 테스트)'
344
- };
345
- return phases[phase] || '알 수 없는 Phase';
346
- }
347
-
348
- // Phase별 예상 시간
349
- function getPhaseEstimatedTime(phase) {
350
- const times = {
351
- '1': '8시간 (1일)',
352
- '2': '12시간 (1.5일)',
353
- '3': '4시간 (0.5일)'
354
- };
355
- return times[phase] || '알 수 없음';
226
+ process.exit(1);
356
227
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@su-record/vibe",
3
- "version": "0.1.4",
4
- "description": "Vibe - SPEC-driven AI coding framework with MCP integration",
3
+ "version": "0.2.0",
4
+ "description": "Vibe - Claude Code exclusive SPEC-driven AI coding framework",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
7
7
  "vibe": "./bin/vibe"
@@ -38,6 +38,7 @@
38
38
  "files": [
39
39
  "bin/",
40
40
  "cli/",
41
+ ".claude/",
41
42
  "agents/",
42
43
  "skills/",
43
44
  "templates/",