spec-runner 1.0.0-alpha.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/LICENSE +34 -0
- package/README.md +193 -0
- package/bin/spec-runner.js +715 -0
- package/install.sh +80 -0
- package/package.json +45 -0
- package/templates/base/.github/PULL_REQUEST_TEMPLATE.md +43 -0
- package/templates/base/.github/workflows/phase-gate-check.yml +216 -0
- package/templates/base/docs/adr/TEMPLATE.md +46 -0
- package/templates/base/docs/glossary.md +51 -0
- package/templates/base/docs/review/debt.md +8 -0
- package/templates/base/scripts/spec-runner.sh +1079 -0
- package/templates/base/templates/requirement/template.md +40 -0
- package/templates/claude/.claude/commands/sr-complete.md +9 -0
- package/templates/claude/.claude/commands/sr-configure.md +11 -0
- package/templates/claude/.claude/commands/sr-design-detail.md +9 -0
- package/templates/claude/.claude/commands/sr-design-high.md +9 -0
- package/templates/claude/.claude/commands/sr-fix.md +9 -0
- package/templates/claude/.claude/commands/sr-hotfix.md +9 -0
- package/templates/claude/.claude/commands/sr-implement.md +9 -0
- package/templates/claude/.claude/commands/sr-init.md +10 -0
- package/templates/claude/.claude/commands/sr-review.md +9 -0
- package/templates/claude/.claude/commands/sr-set-gate.md +9 -0
- package/templates/claude/.claude/commands/sr-status.md +9 -0
- package/templates/claude/.claude/commands/sr-test-design.md +9 -0
- package/templates/claude/.claude/hooks/pre-tool-use.sh +79 -0
- package/templates/claude/.claude/settings.json +29 -0
- package/templates/claude/CLAUDE.md +141 -0
- package/templates/copilot/.github/copilot-instructions.md +25 -0
- package/templates/copilot/.github/prompts/sr-complete.prompt.md +13 -0
- package/templates/copilot/.github/prompts/sr-configure.prompt.md +13 -0
- package/templates/copilot/.github/prompts/sr-design-detail.prompt.md +14 -0
- package/templates/copilot/.github/prompts/sr-design-high.prompt.md +13 -0
- package/templates/copilot/.github/prompts/sr-fix.prompt.md +14 -0
- package/templates/copilot/.github/prompts/sr-hotfix.prompt.md +14 -0
- package/templates/copilot/.github/prompts/sr-implement.prompt.md +13 -0
- package/templates/copilot/.github/prompts/sr-init.prompt.md +15 -0
- package/templates/copilot/.github/prompts/sr-review.prompt.md +14 -0
- package/templates/copilot/.github/prompts/sr-set-gate.prompt.md +14 -0
- package/templates/copilot/.github/prompts/sr-status.prompt.md +13 -0
- package/templates/copilot/.github/prompts/sr-test-design.prompt.md +13 -0
- package/templates/cursor/.cursor/commands/sr-complete.md +9 -0
- package/templates/cursor/.cursor/commands/sr-configure.md +11 -0
- package/templates/cursor/.cursor/commands/sr-design-detail.md +9 -0
- package/templates/cursor/.cursor/commands/sr-design-high.md +9 -0
- package/templates/cursor/.cursor/commands/sr-fix.md +9 -0
- package/templates/cursor/.cursor/commands/sr-hotfix.md +9 -0
- package/templates/cursor/.cursor/commands/sr-implement.md +9 -0
- package/templates/cursor/.cursor/commands/sr-init.md +10 -0
- package/templates/cursor/.cursor/commands/sr-review.md +9 -0
- package/templates/cursor/.cursor/commands/sr-set-gate.md +9 -0
- package/templates/cursor/.cursor/commands/sr-status.md +9 -0
- package/templates/cursor/.cursor/commands/sr-test-design.md +9 -0
- package/templates/cursor/.cursorrules +25 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# /sr-design-detail
|
|
2
|
+
|
|
3
|
+
以下を**必ずターミナルで実行**してください。ユーザーが続けて入力したサブフェーズ(domain / usecase / table / infra)を渡します(例: `/sr-design-detail domain`)。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
./scripts/spec-runner.sh design-detail <ユーザーが入力したサブフェーズ>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
引数が空、または domain / usecase / table / infra 以外の場合は、ユーザーに「サブフェーズを指定してください: domain, usecase, table, infra」と伝えてください。
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# /sr-init
|
|
2
|
+
|
|
3
|
+
以下を**必ずターミナルで実行**してください。ユーザーが `/sr-init` の後に続けて入力した文字列を引数として渡します(例: `/sr-init 顧客登録 顧客管理`)。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
./scripts/spec-runner.sh init <ユーザーが入力した引数>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- **引数あり**(例: `顧客登録 顧客管理`): 未設定なら詳細設定の対話 → 続けてユースケース作成。
|
|
10
|
+
- **引数が空**の場合は、ユーザーに「ユースケース名(と任意で集約名)を指定してください」と伝えるか、**設定対話だけ**したい場合は `/sr-configure` を案内してください。
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# spec-runner(Cursor 用ルール)
|
|
2
|
+
|
|
3
|
+
このプロジェクトは **scripts/spec-runner.sh** によるフェーズゲートで運用している。実装前に必ずフェーズを確認すること。
|
|
4
|
+
|
|
5
|
+
## 最優先
|
|
6
|
+
|
|
7
|
+
- 実装コードを書く前に **必ず** `./scripts/spec-runner.sh status` を実行する。
|
|
8
|
+
- `phase` が `implement` でないときは実装コードを生成しない。ユーザーに「現在のフェーズを確認してください」と伝える。
|
|
9
|
+
- ユーザーが「init して」「status 確認して」「design-high で進めて」などと言ったら、対応する `./scripts/spec-runner.sh` をターミナルで実行する。
|
|
10
|
+
- スラッシュコマンド `/sr-init` などは `.cursor/commands/` に定義済み。チャットで `/sr-status` のように呼び出せる(Agent 経由でシェル実行)。
|
|
11
|
+
|
|
12
|
+
## TDD(テスト駆動)— デフォルトで有効
|
|
13
|
+
|
|
14
|
+
- 実装前に **テスト設計ドキュメント** と **テストコード** を必ず書く。テストを先に書いて Red → 実装で Green。
|
|
15
|
+
- `.spec-runner/config.sh` の `TDD_ENABLED=false` で無効化すると、テストなしでも implement に進める(オプション)。
|
|
16
|
+
|
|
17
|
+
## フェーズとコマンド
|
|
18
|
+
|
|
19
|
+
- require → design-high → design-detail (domain → usecase → table → infra) → test-design → implement
|
|
20
|
+
- 各フェーズ完了時: `./scripts/spec-runner.sh review-pass <該当ファイル>`
|
|
21
|
+
- ゲート: `./scripts/spec-runner.sh set-gate glossary_checked` など
|
|
22
|
+
- 実装完了: `./scripts/spec-runner.sh complete`
|
|
23
|
+
- 修正: `./scripts/spec-runner.sh fix "内容"` / `./scripts/spec-runner.sh hotfix "内容"`
|
|
24
|
+
|
|
25
|
+
詳細はプロジェクトの CLAUDE.md または README を参照。
|