@su-record/vibe 0.4.0 → 0.4.1
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 +4 -1
- package/bin/vibe +21 -5
- package/package.json +1 -1
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/ 복사 (코딩 규칙)
|