@taejung3852/project-scaffold 0.1.2 → 0.1.4
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/README.kr.md +1 -1
- package/README.md +1 -1
- package/lib/agents.js +72 -26
- package/package.json +1 -1
package/README.kr.md
CHANGED
|
@@ -181,7 +181,7 @@ npx @taejung3852/project-scaffold@latest agents
|
|
|
181
181
|
|
|
182
182
|
전체 목록과 실제 설치 경로는 위 명령으로 확인한다. `--agent all`과 `--agent '*'`도 지원한다.
|
|
183
183
|
|
|
184
|
-
CLI는 루트 `skills/{wiki,brief,review}`를 한 번 설치한 뒤 같은 경로를 사용하는 에이전트를 묶어서 상대 심링크를 생성한다. `--agent`를 생략하면 로컬 설치 흔적을 감지해 후보를 추천하고, 감지하지 못하면 범용
|
|
184
|
+
CLI는 루트 `skills/{wiki,brief,review}`를 한 번 설치한 뒤 같은 프로젝트 경로를 사용하는 에이전트를 묶어서 상대 심링크를 생성한다. 대화형 선택에서는 `.agents/skills/`를 사용하는 에이전트가 `universal` 공용 그룹 하나로 표시되고, 전용 프로젝트 경로가 필요한 에이전트만 별도 선택지로 표시된다. `--agent`를 생략하면 로컬 설치 흔적을 감지해 후보를 추천하고, 감지하지 못하면 범용 그룹을 기본값으로 사용한다. `claude`, `hermes`, `gemini`, `agy` 같은 별칭도 지원한다. Gemini CLI, Antigravity CLI, Antigravity 2.0은 제품 표면과 전역 스킬 경로가 다르므로 레지스트리에서는 별도 대상으로 유지한다.
|
|
185
185
|
|
|
186
186
|
## 설치되는 구조
|
|
187
187
|
|
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ npx @taejung3852/project-scaffold@latest agents
|
|
|
181
181
|
|
|
182
182
|
Use this command to see every ID and path. `--agent all` and `--agent '*'` are also supported.
|
|
183
183
|
|
|
184
|
-
The CLI installs canonical `skills/{wiki,brief,review}` once and deduplicates agents that share the same target directory. Without `--agent`, it recommends reliably detected local agents and falls back to universal
|
|
184
|
+
The CLI installs canonical `skills/{wiki,brief,review}` once and deduplicates agents that share the same target directory. In the interactive flow, agents that share `.agents/skills/` are selected as one `universal` group; only agents with dedicated project paths appear as separate options. Without `--agent`, it recommends reliably detected local agents and falls back to the universal group when none are found. Existing aliases such as `claude`, `hermes`, `gemini`, and `agy` remain supported. Google agents are kept as separate registry targets because Gemini CLI, Antigravity CLI, and Antigravity 2.0 use different product surfaces and global skill paths.
|
|
185
185
|
|
|
186
186
|
## Installed structure
|
|
187
187
|
|
package/lib/agents.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "@clack/prompts";
|
|
18
18
|
|
|
19
19
|
export const supportedAgents = supportedAgentIds;
|
|
20
|
+
const universalProjectSkillsDir = ".agents/skills";
|
|
20
21
|
|
|
21
22
|
function writeFileSafely(file, content, force, managedFiles) {
|
|
22
23
|
if (fs.existsSync(file) && !force) return false;
|
|
@@ -121,6 +122,71 @@ export function registryLines() {
|
|
|
121
122
|
return lines;
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
function isUniversalProjectAgent(agentId) {
|
|
126
|
+
return agentRegistry[agentId]?.projectSkillsDir === universalProjectSkillsDir;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const universalProjectAgents = supportedAgentIds.filter(isUniversalProjectAgent);
|
|
130
|
+
|
|
131
|
+
export function buildAgentSelectionOptions(detected = []) {
|
|
132
|
+
const detectedSet = new Set(detected);
|
|
133
|
+
const dedicatedAgents = supportedAgentIds.filter((agent) => !isUniversalProjectAgent(agent));
|
|
134
|
+
const universalNames = universalProjectAgents
|
|
135
|
+
.map((agent) => agentRegistry[agent]?.displayName ?? agent)
|
|
136
|
+
.filter(Boolean);
|
|
137
|
+
const previewNames = universalNames.slice(0, 4).join(", ");
|
|
138
|
+
|
|
139
|
+
return [
|
|
140
|
+
{
|
|
141
|
+
value: "all",
|
|
142
|
+
label: "모든 에이전트",
|
|
143
|
+
hint: `${supportedAgentIds.length}개 설치`,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: "universal",
|
|
147
|
+
label: "공용 Agent Skills",
|
|
148
|
+
hint: `${universalProjectSkillsDir} · ${previewNames} 등 ${universalNames.length}개`,
|
|
149
|
+
},
|
|
150
|
+
...dedicatedAgents.map((agent) => {
|
|
151
|
+
const entry = agentRegistry[agent];
|
|
152
|
+
return {
|
|
153
|
+
value: agent,
|
|
154
|
+
label: entry?.displayName ?? agent,
|
|
155
|
+
hint: detectedSet.has(agent)
|
|
156
|
+
? `감지됨 · ${entry?.projectSkillsDir ?? ""}`
|
|
157
|
+
: entry?.projectSkillsDir,
|
|
158
|
+
};
|
|
159
|
+
}),
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function agentSelectionSummary() {
|
|
164
|
+
const universalNames = universalProjectAgents
|
|
165
|
+
.map((agent) => agentRegistry[agent]?.displayName ?? agent)
|
|
166
|
+
.filter(Boolean);
|
|
167
|
+
const dedicatedAgents = supportedAgentIds.filter((agent) => !isUniversalProjectAgent(agent));
|
|
168
|
+
const dedicatedNames = dedicatedAgents
|
|
169
|
+
.map((agent) => `${agentRegistry[agent]?.displayName ?? agent} (${agentRegistry[agent]?.projectSkillsDir})`)
|
|
170
|
+
.filter(Boolean);
|
|
171
|
+
|
|
172
|
+
return [
|
|
173
|
+
"\n에이전트 설치 대상",
|
|
174
|
+
` 공용 그룹 · ${universalProjectSkillsDir} (${universalNames.length}개)`,
|
|
175
|
+
` ${universalNames.join(", ")}`,
|
|
176
|
+
` 전용 그룹 · 에이전트별 경로 (${dedicatedNames.length}개)`,
|
|
177
|
+
` ${dedicatedNames.join(", ")}`,
|
|
178
|
+
];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function buildAgentSelectionDefaults(detected = []) {
|
|
182
|
+
const detectedUniversal = detected.some(isUniversalProjectAgent);
|
|
183
|
+
const dedicatedDetected = detected.filter((agent) => !isUniversalProjectAgent(agent));
|
|
184
|
+
return [
|
|
185
|
+
...(detectedUniversal || detected.length === 0 ? ["universal"] : []),
|
|
186
|
+
...dedicatedDetected,
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
|
|
124
190
|
export async function chooseAgents(
|
|
125
191
|
values,
|
|
126
192
|
yes = false,
|
|
@@ -131,44 +197,24 @@ export async function chooseAgents(
|
|
|
131
197
|
}
|
|
132
198
|
|
|
133
199
|
const detected = detectAgents({ target });
|
|
134
|
-
const defaults = detected
|
|
200
|
+
const defaults = buildAgentSelectionDefaults(detected);
|
|
135
201
|
|
|
136
202
|
if (yes || !process.stdin.isTTY) {
|
|
137
203
|
return defaults;
|
|
138
204
|
}
|
|
139
205
|
|
|
140
206
|
if (detected.length > 0) {
|
|
141
|
-
|
|
207
|
+
const detectedLabels = detected.map((agent) => agentRegistry[agent]?.displayName ?? agent);
|
|
208
|
+
console.log(`\n감지된 에이전트: ${detectedLabels.join(", ")}`);
|
|
142
209
|
} else {
|
|
143
210
|
console.log("\n자동 감지된 에이전트가 없습니다.");
|
|
144
211
|
}
|
|
145
212
|
|
|
146
|
-
|
|
147
|
-
...defaults,
|
|
148
|
-
...supportedAgentIds.filter(
|
|
149
|
-
(agent) => !defaults.includes(agent),
|
|
150
|
-
),
|
|
151
|
-
];
|
|
213
|
+
console.log(agentSelectionSummary().join("\n"));
|
|
152
214
|
|
|
153
215
|
const selected = await multiselect({
|
|
154
|
-
message: "설치할
|
|
155
|
-
options:
|
|
156
|
-
{
|
|
157
|
-
value: "all",
|
|
158
|
-
label: "모든 에이전트",
|
|
159
|
-
hint: `${supportedAgentIds.length}개 설치`,
|
|
160
|
-
},
|
|
161
|
-
...orderedAgents.map((agent) => {
|
|
162
|
-
const entry = agentRegistry[agent];
|
|
163
|
-
return {
|
|
164
|
-
value: agent,
|
|
165
|
-
label: entry?.displayName ?? agent,
|
|
166
|
-
hint: detected.includes(agent)
|
|
167
|
-
? `감지됨 · ${entry?.projectSkillsDir ?? ""}`
|
|
168
|
-
: entry?.projectSkillsDir,
|
|
169
|
-
};
|
|
170
|
-
}),
|
|
171
|
-
],
|
|
216
|
+
message: "설치할 스킬 경로를 선택하세요",
|
|
217
|
+
options: buildAgentSelectionOptions(detected),
|
|
172
218
|
initialValues: defaults,
|
|
173
219
|
required: true,
|
|
174
220
|
});
|