spec-runner 1.1.8 → 1.1.10
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.
|
@@ -119,7 +119,17 @@ function isTTY() {
|
|
|
119
119
|
|
|
120
120
|
function promptLine(question) {
|
|
121
121
|
process.stdout.write(question);
|
|
122
|
-
|
|
122
|
+
// stdin (fd 0) may be in non-blocking mode (EAGAIN); read from /dev/tty directly
|
|
123
|
+
try {
|
|
124
|
+
const { execSync } = require("child_process");
|
|
125
|
+
const result = execSync('IFS= read -r REPLY < /dev/tty && printf "%s" "$REPLY"', {
|
|
126
|
+
shell: "/bin/sh",
|
|
127
|
+
stdio: ["ignore", "pipe", "inherit"],
|
|
128
|
+
});
|
|
129
|
+
return String(result || "").trim();
|
|
130
|
+
} catch {
|
|
131
|
+
return String(fs.readFileSync(0, "utf8") || "").trim();
|
|
132
|
+
}
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
function promptTargetInteractive() {
|
|
@@ -326,28 +336,20 @@ function printBanner() {
|
|
|
326
336
|
console.log("");
|
|
327
337
|
}
|
|
328
338
|
|
|
329
|
-
function printNextSteps(
|
|
339
|
+
function printNextSteps(archStatus) {
|
|
330
340
|
console.log("─────────────────────────────────────────");
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (mode === "existing") {
|
|
334
|
-
console.log(" 1. /existing-project-to-docs");
|
|
335
|
-
console.log(" 既存コードから docs の draft と architecture contract を生成してください。");
|
|
341
|
+
if (archStatus === "decided") {
|
|
342
|
+
console.log("次のステップ:");
|
|
336
343
|
console.log("");
|
|
337
|
-
console.log(" 2. /architecture-skill-development");
|
|
338
|
-
console.log(" architecture contract を元に、プロジェクト専用の skill を作成してください。");
|
|
339
|
-
} else if (archStatus === "decided") {
|
|
340
344
|
console.log(" 1. .spec-runner/architecture/architecture.yaml を用意してください。");
|
|
341
345
|
console.log(" (既に決まっているアーキテクチャを記述)");
|
|
342
346
|
console.log("");
|
|
343
|
-
console.log(" 2. /architecture-skill-development");
|
|
344
|
-
console.log(" architecture contract を元に、プロジェクト専用の skill を作成してください。");
|
|
347
|
+
console.log(" 2. Claude Code を開いて /architecture-skill-development を実行してください。");
|
|
345
348
|
} else {
|
|
346
|
-
console.log("
|
|
347
|
-
console.log(" 対話形式でアーキテクチャを決め、docs と architecture contract を生成してください。");
|
|
349
|
+
console.log("次のステップ:");
|
|
348
350
|
console.log("");
|
|
349
|
-
console.log("
|
|
350
|
-
console.log("
|
|
351
|
+
console.log(" Claude Code を開いて、作りたいものを伝えてください。");
|
|
352
|
+
console.log(" セットアップが自動で始まります。");
|
|
351
353
|
}
|
|
352
354
|
console.log("─────────────────────────────────────────");
|
|
353
355
|
}
|
|
@@ -373,6 +375,12 @@ function main() {
|
|
|
373
375
|
throw new Error(`Claude テンプレートが見つかりません: ${CLAUDE_TEMPLATE_DIR}`);
|
|
374
376
|
}
|
|
375
377
|
|
|
378
|
+
// CLAUDE.md をプロジェクトルートへインストール(target によらず常に配置)
|
|
379
|
+
const claudeMdSrc = path.join(TEMPLATE_ROOT, "CLAUDE.md");
|
|
380
|
+
if (exists(claudeMdSrc)) {
|
|
381
|
+
copyFileWithPolicy(claudeMdSrc, path.join(CWD, "CLAUDE.md"), archiveRoot);
|
|
382
|
+
}
|
|
383
|
+
|
|
376
384
|
console.log("");
|
|
377
385
|
if (target === "claude" || target === "both") {
|
|
378
386
|
mirrorTreeTo(DEST_CLAUDE_DIR, CLAUDE_TEMPLATE_DIR, archiveRoot);
|
|
@@ -395,7 +403,7 @@ function main() {
|
|
|
395
403
|
else if (target === "copilot") console.log("完了: .github/ を導入しました。");
|
|
396
404
|
else console.log("完了: .claude/ と .github/ を導入しました。");
|
|
397
405
|
console.log("");
|
|
398
|
-
printNextSteps(
|
|
406
|
+
printNextSteps(archStatus);
|
|
399
407
|
}
|
|
400
408
|
|
|
401
409
|
main();
|
package/package.json
CHANGED
|
@@ -48,10 +48,13 @@ Phase 5: 次の skill へ引き渡し
|
|
|
48
48
|
- testing_policy
|
|
49
49
|
3. ユーザーに確認・承認を得る
|
|
50
50
|
|
|
51
|
-
## Phase 5:
|
|
51
|
+
## Phase 5: architecture-skill-development へ自動移行
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Phase 4 が承認されたら、**ユーザーにコマンドを打たせずに `architecture-skill-development` を続けて開始する**。
|
|
54
|
+
|
|
55
|
+
1. `architecture-skill-development` に渡す前提(docs と architecture.yaml の所在)を要約する
|
|
54
56
|
2. project 専用 skill に切り出すべき反復フローを列挙する
|
|
57
|
+
3. 確認なしに `architecture-skill-development` Phase 1 へ進む
|
|
55
58
|
|
|
56
59
|
## 原則
|
|
57
60
|
|
|
@@ -48,10 +48,13 @@ Phase 5: 次の skill へ引き渡し
|
|
|
48
48
|
- testing_policy
|
|
49
49
|
3. ユーザーに確認・承認を得る
|
|
50
50
|
|
|
51
|
-
## Phase 5:
|
|
51
|
+
## Phase 5: architecture-skill-development へ自動移行
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Phase 4 が承認されたら、**ユーザーにコマンドを打たせずに `architecture-skill-development` を続けて開始する**。
|
|
54
|
+
|
|
55
|
+
1. `architecture-skill-development` に渡す前提(docs と architecture.yaml の所在)を要約する
|
|
54
56
|
2. project 専用 skill に切り出すべき反復フローを列挙する
|
|
57
|
+
3. 確認なしに `architecture-skill-development` Phase 1 へ進む
|
|
55
58
|
|
|
56
59
|
## 原則
|
|
57
60
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## spec-runner セットアップ
|
|
2
|
+
|
|
3
|
+
### 初回自動起動
|
|
4
|
+
|
|
5
|
+
ユーザーが最初に話しかけてきたとき、以下の条件を確認して自動的にセットアップを開始する。**ユーザーにスラッシュコマンドを打たせない。**
|
|
6
|
+
|
|
7
|
+
| 状態 | 判定方法 | 自動起動するスキル |
|
|
8
|
+
|------|---------|-----------------|
|
|
9
|
+
| 新規プロジェクト | `docs/` が存在しないか空 | `architecture-definition` |
|
|
10
|
+
| 既存プロジェクト | `docs/` にファイルがある | `existing-project-to-docs` |
|
|
11
|
+
|
|
12
|
+
どちらの場合も、そのスキルが完了したら続けて `architecture-skill-development` を自動起動する。
|
|
13
|
+
|
|
14
|
+
### 判定の注意
|
|
15
|
+
|
|
16
|
+
- `docs/` の中身を確認してから判断する(ディレクトリ存在だけで判断しない)
|
|
17
|
+
- ユーザーが「〇〇を作りたい」「〇〇の開発を始めたい」のように要件・作業開始を示す発言をしたら起動する
|
|
18
|
+
- 雑談や質問など、明らかに要件でない場合は起動しない
|