claudeos-core 1.0.6 → 1.0.7
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/cli.js +26 -12
- package/package.json +1 -1
- package/pass-prompts/templates/common/header.md +2 -5
package/bin/cli.js
CHANGED
|
@@ -54,6 +54,29 @@ function run(cmd, options = {}) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// claude -p 실행: 프롬프트를 파일에 저장 후 파이프로 전달 (Windows 8191자 제한 우회)
|
|
58
|
+
function runClaudePrompt(prompt, options = {}) {
|
|
59
|
+
const tmpFile = path.join(GENERATED_DIR, "_tmp_prompt.md");
|
|
60
|
+
fs.writeFileSync(tmpFile, prompt, "utf-8");
|
|
61
|
+
try {
|
|
62
|
+
const catCmd = process.platform === "win32" ? "type" : "cat";
|
|
63
|
+
const escaped = escapeShellArg(tmpFile);
|
|
64
|
+
const cmd = `${catCmd} ${escaped} | claude -p --dangerously-skip-permissions`;
|
|
65
|
+
execSync(cmd, {
|
|
66
|
+
cwd: options.cwd || PROJECT_ROOT,
|
|
67
|
+
stdio: "inherit",
|
|
68
|
+
encoding: "utf-8",
|
|
69
|
+
shell: true,
|
|
70
|
+
});
|
|
71
|
+
return true;
|
|
72
|
+
} catch (e) {
|
|
73
|
+
if (options.ignoreError) return false;
|
|
74
|
+
throw e;
|
|
75
|
+
} finally {
|
|
76
|
+
try { fs.unlinkSync(tmpFile); } catch {}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
57
80
|
function ensureDir(dir) {
|
|
58
81
|
if (!fs.existsSync(dir)) {
|
|
59
82
|
fs.mkdirSync(dir, { recursive: true });
|
|
@@ -197,10 +220,7 @@ async function cmdInit() {
|
|
|
197
220
|
.replace(/\{\{PASS_NUM\}\}/g, String(i));
|
|
198
221
|
prompt = injectProjectRoot(prompt);
|
|
199
222
|
|
|
200
|
-
const ok =
|
|
201
|
-
`claude -p ${escapeShellArg(prompt)} --dangerously-skip-permissions`,
|
|
202
|
-
{ ignoreError: true }
|
|
203
|
-
);
|
|
223
|
+
const ok = runClaudePrompt(prompt, { ignoreError: true });
|
|
204
224
|
|
|
205
225
|
if (!ok) {
|
|
206
226
|
log(` ❌ Pass 1-${i} failed. Aborting.`);
|
|
@@ -227,10 +247,7 @@ async function cmdInit() {
|
|
|
227
247
|
readFile(path.join(GENERATED_DIR, "pass2-prompt.md"))
|
|
228
248
|
);
|
|
229
249
|
|
|
230
|
-
const ok =
|
|
231
|
-
`claude -p ${escapeShellArg(prompt)} --dangerously-skip-permissions`,
|
|
232
|
-
{ ignoreError: true }
|
|
233
|
-
);
|
|
250
|
+
const ok = runClaudePrompt(prompt, { ignoreError: true });
|
|
234
251
|
|
|
235
252
|
if (!ok) {
|
|
236
253
|
log(" ❌ Pass 2 failed. Aborting.");
|
|
@@ -253,10 +270,7 @@ async function cmdInit() {
|
|
|
253
270
|
readFile(path.join(GENERATED_DIR, "pass3-prompt.md"))
|
|
254
271
|
);
|
|
255
272
|
|
|
256
|
-
const ok =
|
|
257
|
-
`claude -p ${escapeShellArg(prompt)} --dangerously-skip-permissions`,
|
|
258
|
-
{ ignoreError: true }
|
|
259
|
-
);
|
|
273
|
+
const ok = runClaudePrompt(prompt, { ignoreError: true });
|
|
260
274
|
|
|
261
275
|
if (!ok) {
|
|
262
276
|
log(" ❌ Pass 3 failed. Aborting.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudeos-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Auto-generate Claude Code documentation from your actual source code — Standards, Rules, Skills, and Guides tailored to your project",
|
|
5
5
|
"main": "health-checker/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
- 프로젝트 구조 설명을 하지 마세요.
|
|
4
|
-
- 아래 분석 항목을 모두 수행하고, 결과를 지정된 JSON 파일에 저장하세요.
|
|
5
|
-
- 반드시 파일을 생성해야 합니다. 대화형 응답은 실패로 간주됩니다.
|
|
1
|
+
당신은 코드 분석 도구입니다. 아래 지시에 따라 프로젝트 소스 코드를 분석하고, 결과를 JSON 파일로 저장하세요.
|
|
2
|
+
대화하지 말고, 분석 결과만 JSON으로 출력하세요.
|
|
6
3
|
|
|
7
4
|
프로젝트 루트 경로: {{PROJECT_ROOT}}
|
|
8
5
|
이 경로를 기준으로 모든 파일 경로를 해석해줘.
|