phasegate 0.15.0 → 0.16.0
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.ja.md +32 -32
- package/README.md +4 -4
- package/bin/{harness → phasegate} +1 -1
- package/docs/guide/cli-reference.md +9 -9
- package/docs/guide/configuration.md +1 -1
- package/docs/guide/hooks-integration.md +1 -1
- package/docs/guide/installation.md +6 -6
- package/docs/guide/layer-model.md +5 -5
- package/docs/guide/skills-overview.md +1 -1
- package/package.json +9 -9
- package/scripts/harness/agent-integration/application/usecases/handle-pre-tool-use-usecase.ts +1 -1
- package/scripts/harness/agent-integration/application/usecases/handle-stop-usecase.ts +1 -1
- package/scripts/harness/agent-integration/domain/services/hook-to-cli-translator.ts +4 -4
- package/scripts/harness/agent-integration/infrastructure/adapters/child-process-cli-executor-adapter.ts +2 -2
- package/scripts/harness/agent-integration/infrastructure/adapters/harness-api-cli-command-registry-adapter.ts +10 -10
- package/scripts/harness/ci-governance/infrastructure/adapters/agents-md-file-adapter.ts +2 -2
- package/scripts/harness/ci-governance/infrastructure/adapters/yaml-template-renderer-adapter.ts +2 -2
- package/scripts/harness/harness-api/application/usecases/decide-exit-code-usecase.ts +3 -3
- package/scripts/harness/harness-api/domain/services/command-dispatch-service.ts +16 -16
- package/scripts/harness/harness-api/domain/services/command-registry.ts +3 -3
- package/scripts/harness/harness-api/domain/value-objects/cli-command-definition.ts +10 -10
- package/scripts/harness/harness-api/presentation/handlers/check-phase-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/check-ready-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/ci-check-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/complete-check-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/detect-drift-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/impact-analysis-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/lint-handler.ts +1 -1
- package/scripts/harness/harness-api/presentation/handlers/status-handler.ts +3 -3
- package/scripts/harness/main.ts +19 -19
- package/scripts/harness/quick-mode/application/usecases/execute-quick-ci-check-usecase.ts +1 -1
- package/scripts/harness/quick-mode/presentation/handlers/ci-check-quick-mode-handler.ts +1 -1
- package/scripts/harness/validator-system/composition-root.ts +3 -3
package/README.ja.md
CHANGED
|
@@ -60,7 +60,7 @@ AIエージェント(Claude Code, Codex, Cursor, その他)が生成する
|
|
|
60
60
|
║ hook-config .harness-hooks.yml設定検証 ║
|
|
61
61
|
║ gate-check 完了ゲートチェック ║
|
|
62
62
|
║ ║
|
|
63
|
-
║ 実行: npx
|
|
63
|
+
║ 実行: npx phasegate validate --layer L0 ║
|
|
64
64
|
╠══════════════════════════════════════════════════════════════╣
|
|
65
65
|
║ L1 EDITOR TIME: Biome AST Rules ║
|
|
66
66
|
║ ───────────────────────────────────────────────────────── ║
|
|
@@ -70,7 +70,7 @@ AIエージェント(Claude Code, Codex, Cursor, その他)が生成する
|
|
|
70
70
|
║ no-comment-flood no-code-duplication ║
|
|
71
71
|
║ + it-test-mock-detection + stub-comment-detection ║
|
|
72
72
|
║ ║
|
|
73
|
-
║ 実行: npx
|
|
73
|
+
║ 実行: npx phasegate lint ║
|
|
74
74
|
╠══════════════════════════════════════════════════════════════╣
|
|
75
75
|
║ L2 PRE-COMMIT: Validators ║
|
|
76
76
|
║ ───────────────────────────────────────────────────────── ║
|
|
@@ -78,7 +78,7 @@ AIエージェント(Claude Code, Codex, Cursor, その他)が生成する
|
|
|
78
78
|
║ metadata @unit/@layer/@US-XXX/@story の完全性検証 ║
|
|
79
79
|
║ test-quality AAA / actual / single-act / no-domain-mock ║
|
|
80
80
|
║ ║
|
|
81
|
-
║ 実行: npx
|
|
81
|
+
║ 実行: npx phasegate validate --layer L2 ║
|
|
82
82
|
╠══════════════════════════════════════════════════════════════╣
|
|
83
83
|
║ L3 CI/CD: Validators ║
|
|
84
84
|
║ ───────────────────────────────────────────────────────── ║
|
|
@@ -87,7 +87,7 @@ AIエージェント(Claude Code, Codex, Cursor, その他)が生成する
|
|
|
87
87
|
║ coverage カバレッジ閾値 (standard: 90% / strict: 95%) ║
|
|
88
88
|
║ nyquist 要件→テスト双方向トレーサビリティ検証 ║
|
|
89
89
|
║ ║
|
|
90
|
-
║ 実行: npx
|
|
90
|
+
║ 実行: npx phasegate validate --layer L3 ║
|
|
91
91
|
╠══════════════════════════════════════════════════════════════╣
|
|
92
92
|
║ L4 SCHEDULED: Validators ║
|
|
93
93
|
║ ───────────────────────────────────────────────────────── ║
|
|
@@ -95,7 +95,7 @@ AIエージェント(Claude Code, Codex, Cursor, その他)が生成する
|
|
|
95
95
|
║ consistency-check 文書間レイヤー整合性チェック ║
|
|
96
96
|
║ dead-code 未使用エクスポート・到達不能コード検出 ║
|
|
97
97
|
║ ║
|
|
98
|
-
║ 実行: npx
|
|
98
|
+
║ 実行: npx phasegate validate --layer L4 ║
|
|
99
99
|
╚══════════════════════════════════════════════════════════════╝
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -147,7 +147,7 @@ npm install --save-dev phasegate
|
|
|
147
147
|
### 1. プロジェクト初期化
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
npx
|
|
150
|
+
npx phasegate init --name <プロジェクト名>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
実行されること:
|
|
@@ -183,7 +183,7 @@ claude # プロジェクトルートで起動
|
|
|
183
183
|
```bash
|
|
184
184
|
# ハーネスを更新後、スキルを最新版に同期
|
|
185
185
|
npm update phasegate
|
|
186
|
-
npx
|
|
186
|
+
npx phasegate update-skills
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
---
|
|
@@ -250,7 +250,7 @@ npx harness update-skills
|
|
|
250
250
|
## CLIコマンドリファレンス
|
|
251
251
|
|
|
252
252
|
```bash
|
|
253
|
-
npx
|
|
253
|
+
npx phasegate <command> [options]
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
### セットアップ
|
|
@@ -277,14 +277,14 @@ npx harness <command> [options]
|
|
|
277
277
|
|
|
278
278
|
| コマンド | 説明 | オプション |
|
|
279
279
|
|---|---|---|
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
| `
|
|
287
|
-
| `
|
|
280
|
+
| `phasegate:status` | ハーネス全体の健全性サマリ | `--json` |
|
|
281
|
+
| `phasegate:check-ready` | 全storyのPhase Gate通過状態 | `--json` |
|
|
282
|
+
| `phasegate:check-phase` | 指定Unitの現在フェーズ | `--unit <unitId>` `--json` |
|
|
283
|
+
| `phasegate:ci-check` | 全L3バリデータ実行結果 | `--json` |
|
|
284
|
+
| `phasegate:detect-drift` | 設計-コード乖離レポート | `--json` |
|
|
285
|
+
| `phasegate:lint` | harness-api経由のlint | `--target <path>` `--json` |
|
|
286
|
+
| `phasegate:complete-check` | L2-L4全チェック | `--json` |
|
|
287
|
+
| `phasegate:impact-analysis` | ストーリー影響範囲分析 | `<storyId>` `--json` |
|
|
288
288
|
|
|
289
289
|
### ADR管理
|
|
290
290
|
|
|
@@ -540,7 +540,7 @@ describe('ConfigSchema', () => {
|
|
|
540
540
|
|---|---|---|
|
|
541
541
|
| **PreToolUse** | ファイル書き込み前 | Phase Gate強制・保護ファイルへの変更をブロック。ブロック時はアクショナブルなエラーメッセージ(違反理由・不足成果物・次に使うべきスキル)を返却 |
|
|
542
542
|
| **PostToolUse** | ファイル書き込み後 | Biome ASTルールを自動実行、違反があれば即時フィードバック |
|
|
543
|
-
| **Stop** | セッション終了前 | `
|
|
543
|
+
| **Stop** | セッション終了前 | `phasegate:complete-check` (L2-L4全チェック) を実行、全グリーンでないとセッション終了を保留 |
|
|
544
544
|
|
|
545
545
|
### PreToolUse エラーメッセージ (v0.9.0)
|
|
546
546
|
|
|
@@ -641,7 +641,7 @@ PreToolUse Hook がブロックした際、AIエージェントが自律的に
|
|
|
641
641
|
軽微な変更(バグ修正、ドキュメント修正、テスト追加、設定変更)に対してハーネスの一部を緩和するモード。
|
|
642
642
|
|
|
643
643
|
```bash
|
|
644
|
-
npx
|
|
644
|
+
npx phasegate ci-check --quick
|
|
645
645
|
```
|
|
646
646
|
|
|
647
647
|
| レイヤー | 通常モード | Quick Mode |
|
|
@@ -694,9 +694,9 @@ npx harness ci-check --quick
|
|
|
694
694
|
|
|
695
695
|
```bash
|
|
696
696
|
# 3種のテンプレートを生成
|
|
697
|
-
npx
|
|
698
|
-
npx
|
|
699
|
-
npx
|
|
697
|
+
npx phasegate ci:generate-template --type github-actions
|
|
698
|
+
npx phasegate ci:generate-template --type pre-commit
|
|
699
|
+
npx phasegate ci:generate-template --type weekly-check
|
|
700
700
|
```
|
|
701
701
|
|
|
702
702
|
| テンプレート | 用途 | 配置先 |
|
|
@@ -709,10 +709,10 @@ npx harness ci:generate-template --type weekly-check
|
|
|
709
709
|
|
|
710
710
|
```bash
|
|
711
711
|
# aidlc-gate.yml を .github/workflows/ にコピー
|
|
712
|
-
npx
|
|
712
|
+
npx phasegate ci:generate-template --type github-actions --render > .github/workflows/aidlc-gate.yml
|
|
713
713
|
|
|
714
714
|
# pre-commit フックを設定
|
|
715
|
-
npx
|
|
715
|
+
npx phasegate ci:generate-template --type pre-commit --render > .husky/pre-commit
|
|
716
716
|
chmod +x .husky/pre-commit
|
|
717
717
|
```
|
|
718
718
|
|
|
@@ -724,22 +724,22 @@ chmod +x .husky/pre-commit
|
|
|
724
724
|
|
|
725
725
|
```bash
|
|
726
726
|
# K1-K13 非交渉要件の回帰テスト(16件)
|
|
727
|
-
npx
|
|
727
|
+
npx phasegate regression:run-k-requirements
|
|
728
728
|
|
|
729
729
|
# Go/No-Go Gate 品質側3条件(3件)
|
|
730
|
-
npx
|
|
730
|
+
npx phasegate regression:run-gng-gate
|
|
731
731
|
|
|
732
732
|
# K14(Phase Dependency Model)/ K15(Plan文書必須)(2件)
|
|
733
|
-
npx
|
|
733
|
+
npx phasegate regression:run-k14-k15
|
|
734
734
|
|
|
735
735
|
# エージェント非依存性ガード(3件)
|
|
736
|
-
npx
|
|
736
|
+
npx phasegate regression:run-agent-guard
|
|
737
737
|
```
|
|
738
738
|
|
|
739
739
|
JSON出力:
|
|
740
740
|
|
|
741
741
|
```bash
|
|
742
|
-
npx
|
|
742
|
+
npx phasegate regression:run-k-requirements --format json
|
|
743
743
|
```
|
|
744
744
|
|
|
745
745
|
**非交渉要件 (K1-K15) 概要:**
|
|
@@ -789,7 +789,7 @@ phasegate/
|
|
|
789
789
|
│ ├── regression-suite/ # K1-K15回帰テストスイート
|
|
790
790
|
│ ├── fuse-hooks-engine/ # Hooks Engine (.harness-hooks.yml・完了ゲート)
|
|
791
791
|
│ └── phase2-extensions/ # freshness/pointer/e2e-template (v2)
|
|
792
|
-
├── skills/ # 28スキル (npx
|
|
792
|
+
├── skills/ # 28スキル (npx phasegate init で .claude/skills/ に展開)
|
|
793
793
|
├── templates/
|
|
794
794
|
│ └── phasegate.config.json # 設定テンプレート
|
|
795
795
|
└── docs/
|
|
@@ -830,14 +830,14 @@ your-project/
|
|
|
830
830
|
└── .claude/
|
|
831
831
|
├── CLAUDE.md
|
|
832
832
|
├── settings.json # Hooks設定
|
|
833
|
-
└── skills/ # npx
|
|
833
|
+
└── skills/ # npx phasegate init で展開(gitignore推奨)
|
|
834
834
|
```
|
|
835
835
|
|
|
836
836
|
### .gitignore 推奨設定
|
|
837
837
|
|
|
838
838
|
```
|
|
839
839
|
node_modules/
|
|
840
|
-
.claude/skills/ # npx
|
|
840
|
+
.claude/skills/ # npx phasegate init で再生成可能
|
|
841
841
|
dist/
|
|
842
842
|
reports/
|
|
843
843
|
.harness/
|
|
@@ -869,7 +869,7 @@ git push origin main --tags
|
|
|
869
869
|
npm update phasegate
|
|
870
870
|
|
|
871
871
|
# スキルを最新版に同期
|
|
872
|
-
npx
|
|
872
|
+
npx phasegate update-skills
|
|
873
873
|
```
|
|
874
874
|
|
|
875
875
|
> メジャーバージョンアップ時のみ `package.json` の `semver:^X.Y.Z` を手動で更新してください。
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ npm install --save-dev phasegate
|
|
|
42
42
|
### 2. Initialize
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
npx
|
|
45
|
+
npx phasegate init --name my-project
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
This deploys 28 skills to `.claude/skills/` and generates `phasegate.config.json`.
|
|
@@ -202,7 +202,7 @@ All hook errors use the `HarnessError` format with ADR references and fix exampl
|
|
|
202
202
|
## CLI Reference
|
|
203
203
|
|
|
204
204
|
```bash
|
|
205
|
-
npx
|
|
205
|
+
npx phasegate <command> [options]
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
| Command | Description |
|
|
@@ -212,8 +212,8 @@ npx harness <command> [options]
|
|
|
212
212
|
| `validate --layer <L1-L4\|all>` | Run validators for specified layer |
|
|
213
213
|
| `ci-check` | Full CI check (L2-L4) |
|
|
214
214
|
| `update-skills` | Update skills to latest version |
|
|
215
|
-
| `
|
|
216
|
-
| `
|
|
215
|
+
| `phasegate:status` | Display overall harness health summary |
|
|
216
|
+
| `phasegate:check-phase --unit <id>` | Check current phase for a Unit |
|
|
217
217
|
| `list-errors --layer <L0-L4>` | List error definitions with fix examples |
|
|
218
218
|
|
|
219
219
|
See the [Japanese README](README.ja.md) for the complete CLI reference.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Entry point:
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
npx
|
|
6
|
+
npx phasegate <command> [options]
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
---
|
|
@@ -38,14 +38,14 @@ Commands exposed as npm scripts (`npm run <command>`).
|
|
|
38
38
|
|
|
39
39
|
| Command | Options | Description |
|
|
40
40
|
|---|---|---|
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
41
|
+
| `phasegate:status` | `--json` | Health summary |
|
|
42
|
+
| `phasegate:check-ready` | `--json` | Phase Gate pass status for all stories |
|
|
43
|
+
| `phasegate:check-phase` | `--unit <unitId>` `--json` | Current phase for a unit |
|
|
44
|
+
| `phasegate:ci-check` | `--json` | All L3 validators |
|
|
45
|
+
| `phasegate:detect-drift` | `--json` | Design-code drift report |
|
|
46
|
+
| `phasegate:lint` | `--target <path>` `--json` | Lint via harness-api |
|
|
47
|
+
| `phasegate:complete-check` | `--json` | L2-L4 full check |
|
|
48
|
+
| `phasegate:impact-analysis` | `<storyId>` `--json` | Story impact analysis |
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## phasegate.config.json
|
|
4
4
|
|
|
5
|
-
Place at project root. Generated by `npx
|
|
5
|
+
Place at project root. Generated by `npx phasegate init`.
|
|
6
6
|
|
|
7
7
|
This file is the **Single Source of Truth** for all quality configuration in a Phasegate project. Every layer validator, skill, and harness behavior reads from this file.
|
|
8
8
|
|
|
@@ -72,7 +72,7 @@ Use /quick-implementor skill for version changes in package.json.
|
|
|
72
72
|
- Provides immediate feedback on violations
|
|
73
73
|
|
|
74
74
|
### Stop (before session end)
|
|
75
|
-
- Runs `
|
|
75
|
+
- Runs `phasegate:complete-check` (L2-L4 full validation)
|
|
76
76
|
- Session end is held if checks are not all green
|
|
77
77
|
|
|
78
78
|
## Optional Shell Script Hooks
|
|
@@ -33,7 +33,7 @@ npm install
|
|
|
33
33
|
### 1. Initialize
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npx
|
|
36
|
+
npx phasegate init --name <project-name>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
This deploys 28 skills to `.claude/skills/` and generates `phasegate.config.json`.
|
|
@@ -62,14 +62,14 @@ Run `/product-architect` to begin the AIDLC process.
|
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
npm update phasegate
|
|
65
|
-
npx
|
|
65
|
+
npx phasegate update-skills
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Recommended .gitignore additions
|
|
69
69
|
|
|
70
70
|
```
|
|
71
71
|
node_modules/
|
|
72
|
-
.claude/skills/ # regenerated by npx
|
|
72
|
+
.claude/skills/ # regenerated by npx phasegate init
|
|
73
73
|
dist/
|
|
74
74
|
reports/
|
|
75
75
|
.harness/
|
|
@@ -78,7 +78,7 @@ reports/
|
|
|
78
78
|
## Verify Installation
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
npx
|
|
82
|
-
npx
|
|
83
|
-
npm run
|
|
81
|
+
npx phasegate --version
|
|
82
|
+
npx phasegate lint
|
|
83
|
+
npm run phasegate:status
|
|
84
84
|
```
|
|
@@ -31,7 +31,7 @@ The Hooks Engine validates agent hook configuration and enforces completion gate
|
|
|
31
31
|
**Command:**
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npx
|
|
34
|
+
npx phasegate validate --layer L0
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -68,7 +68,7 @@ L1 rules run in real-time as code is written. They are implemented as Biome AST
|
|
|
68
68
|
**Command:**
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
npx
|
|
71
|
+
npx phasegate lint
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
---
|
|
@@ -86,7 +86,7 @@ L2 validators run before every commit. They enforce process discipline and test
|
|
|
86
86
|
**Command:**
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npx
|
|
89
|
+
npx phasegate validate --layer L2
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -105,7 +105,7 @@ L3 validators run in the CI/CD pipeline before a merge is permitted. They cover
|
|
|
105
105
|
**Command:**
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
npx
|
|
108
|
+
npx phasegate validate --layer L3
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
---
|
|
@@ -123,7 +123,7 @@ L4 validators run on a weekly schedule. They detect slow-moving drift that accum
|
|
|
123
123
|
**Command:**
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
npx
|
|
126
|
+
npx phasegate validate --layer L4
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skills Overview
|
|
2
2
|
|
|
3
|
-
Phasegate provides 28 skills covering the full AIDLC (AI-Driven Development Life Cycle). Skills are deployed to `.claude/skills/` by `npx
|
|
3
|
+
Phasegate provides 28 skills covering the full AIDLC (AI-Driven Development Life Cycle). Skills are deployed to `.claude/skills/` by `npx phasegate init` and invoked as slash commands in AI agent sessions.
|
|
4
4
|
|
|
5
5
|
## AIDLC Process — Skill Execution Order
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phasegate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"packageManager": "pnpm@10.30.1",
|
|
5
5
|
"description": "Phasegate — AI-agnostic quality defense toolkit. Enforces structural integrity between design intent and code.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"files": [
|
|
29
|
-
"bin/
|
|
29
|
+
"bin/phasegate",
|
|
30
30
|
"scripts/harness/**/*.ts",
|
|
31
31
|
"!scripts/harness/__tests__/**",
|
|
32
32
|
"scripts/harness/**/*.json",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"CHANGELOG.md"
|
|
41
41
|
],
|
|
42
42
|
"bin": {
|
|
43
|
-
"
|
|
43
|
+
"phasegate": "./bin/phasegate"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
46
|
+
"phasegate": "npx tsx scripts/harness/main.ts",
|
|
47
|
+
"phasegate:status": "npx tsx scripts/harness/main.ts harness:status",
|
|
48
|
+
"phasegate:enable": "npx tsx scripts/harness/main.ts enable-feature",
|
|
49
|
+
"phasegate:disable": "npx tsx scripts/harness/main.ts disable-feature",
|
|
50
|
+
"phasegate:check-phase": "npx tsx scripts/harness/main.ts harness:check-phase",
|
|
51
|
+
"phasegate:check-ready": "npx tsx scripts/harness/main.ts harness:check-ready",
|
|
52
52
|
"test": "vitest run --config scripts/harness/__tests__/vitest.config.ts"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
package/scripts/harness/agent-integration/application/usecases/handle-pre-tool-use-usecase.ts
CHANGED
|
@@ -129,7 +129,7 @@ export class HandlePreToolUseUseCase {
|
|
|
129
129
|
{
|
|
130
130
|
pattern: /(?:^|\/)harness\.config\.json$/,
|
|
131
131
|
message: (fp) =>
|
|
132
|
-
`保護ファイルへの書き込みがブロックされました: ${fp}\nハーネス設定は CLI 経由で変更してください: npx
|
|
132
|
+
`保護ファイルへの書き込みがブロックされました: ${fp}\nハーネス設定は CLI 経由で変更してください: npx phasegate config ...`,
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
pattern: /(?:^|\/)\.claude\/settings\.json$/,
|
|
@@ -68,7 +68,7 @@ export class HandleStopUseCase {
|
|
|
68
68
|
await this.reentryGuardStatePort.writeActive();
|
|
69
69
|
|
|
70
70
|
try {
|
|
71
|
-
const cliResult = await this.cliExecutorPort.execute('
|
|
71
|
+
const cliResult = await this.cliExecutorPort.execute('phasegate:complete-check', []);
|
|
72
72
|
return {
|
|
73
73
|
executed: true,
|
|
74
74
|
cliResult,
|
|
@@ -120,7 +120,7 @@ export class HookToCliTranslator {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// Check command registry
|
|
123
|
-
const commandName = '
|
|
123
|
+
const commandName = 'phasegate:lint';
|
|
124
124
|
const hasCommand = (() => {
|
|
125
125
|
const reg = this.cliCommandRegistryPort;
|
|
126
126
|
if (reg.has) {
|
|
@@ -154,7 +154,7 @@ export class HookToCliTranslator {
|
|
|
154
154
|
return HookTranslationResult.skip('REENTRY_DETECTED');
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
return HookTranslationResult.execute('
|
|
157
|
+
return HookTranslationResult.execute('phasegate:complete-check', [], 0);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -281,7 +281,7 @@ export class AsyncHookToCliTranslator {
|
|
|
281
281
|
return HookTranslationResult.skip('HOOK_DISABLED');
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
const commandName = '
|
|
284
|
+
const commandName = 'phasegate:lint';
|
|
285
285
|
const hasCommand = await this.cliCommandRegistryPort.hasCommand(commandName);
|
|
286
286
|
if (!hasCommand) {
|
|
287
287
|
throw new CommandNotRegisteredError(commandName);
|
|
@@ -295,6 +295,6 @@ export class AsyncHookToCliTranslator {
|
|
|
295
295
|
if (isActive) {
|
|
296
296
|
return HookTranslationResult.skip('REENTRY_DETECTED');
|
|
297
297
|
}
|
|
298
|
-
return HookTranslationResult.execute('
|
|
298
|
+
return HookTranslationResult.execute('phasegate:complete-check', [], 0);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -12,12 +12,12 @@ import { TimeoutError } from '../ports/cli-executor-port.js';
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* CommandName を実行可能なコマンドに変換する
|
|
15
|
-
* 例: '
|
|
15
|
+
* 例: 'phasegate:lint' → ['npx', 'tsx', 'scripts/harness/cli/lint.ts']
|
|
16
16
|
* テスト時は直接スクリプトパスで execute を呼ぶことも可能
|
|
17
17
|
*/
|
|
18
18
|
function resolveCommand(commandName: string): { cmd: string; args: string[] } {
|
|
19
19
|
// コマンド名をファイルパスに変換
|
|
20
|
-
const slug = commandName.replace('
|
|
20
|
+
const slug = commandName.replace('phasegate:', '');
|
|
21
21
|
return {
|
|
22
22
|
cmd: 'npx',
|
|
23
23
|
args: ['tsx', `scripts/harness/cli/${slug}.ts`],
|
|
@@ -10,16 +10,16 @@ import type { CliCommandRegistryPort } from '../../domain/ports/cli-command-regi
|
|
|
10
10
|
|
|
11
11
|
/** integration_contract.md §3.1 に定義された登録済みコマンド一覧 */
|
|
12
12
|
const REGISTERED_COMMANDS: readonly string[] = [
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
13
|
+
'phasegate:check-ready',
|
|
14
|
+
'phasegate:check-phase',
|
|
15
|
+
'phasegate:ci-check',
|
|
16
|
+
'phasegate:detect-drift',
|
|
17
|
+
'phasegate:status',
|
|
18
|
+
'phasegate:lint',
|
|
19
|
+
'phasegate:complete-check',
|
|
20
|
+
'phasegate:impact-analysis',
|
|
21
|
+
'phasegate:enable',
|
|
22
|
+
'phasegate:disable',
|
|
23
23
|
];
|
|
24
24
|
|
|
25
25
|
const COMMAND_SET = new Set<string>(REGISTERED_COMMANDS);
|
|
@@ -50,12 +50,12 @@ export class AgentsMdFileAdapter implements AgentsMdPort {
|
|
|
50
50
|
const adrLinks: string[] = [];
|
|
51
51
|
|
|
52
52
|
for (const line of lines) {
|
|
53
|
-
const cmdMatch = line.match(/^- \[cmd:([^\]]+)\]\(
|
|
53
|
+
const cmdMatch = line.match(/^- \[cmd:([^\]]+)\]\(phasegate:([^)]+)\)\s*(.*)$/);
|
|
54
54
|
if (cmdMatch) {
|
|
55
55
|
try {
|
|
56
56
|
pointers.push(PointerEntry.createCommand({
|
|
57
57
|
key: cmdMatch[1].trim(),
|
|
58
|
-
command: `
|
|
58
|
+
command: `phasegate:${cmdMatch[2].trim()}`,
|
|
59
59
|
description: cmdMatch[3].trim(),
|
|
60
60
|
}));
|
|
61
61
|
} catch { /* skip invalid */ }
|
package/scripts/harness/ci-governance/infrastructure/adapters/yaml-template-renderer-adapter.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class YamlTemplateRendererAdapter implements TemplateRendererPort {
|
|
|
33
33
|
'#!/bin/sh',
|
|
34
34
|
'. "$(dirname "$0")/_/husky.sh"',
|
|
35
35
|
'',
|
|
36
|
-
`npx
|
|
36
|
+
`npx phasegate lint --validators ${config.targetValidatorIds.join(',')}`,
|
|
37
37
|
].join('\n');
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -47,7 +47,7 @@ export class YamlTemplateRendererAdapter implements TemplateRendererPort {
|
|
|
47
47
|
` runs-on: ubuntu-latest`,
|
|
48
48
|
` steps:`,
|
|
49
49
|
` - uses: actions/checkout@v4`,
|
|
50
|
-
` - run: npx
|
|
50
|
+
` - run: npx phasegate lint --validators ${config.targetValidatorIds.join(',')}`,
|
|
51
51
|
].filter((l) => l !== '').join('\n');
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -8,11 +8,11 @@ export class DecideExitCodeUseCase {
|
|
|
8
8
|
execute(input: ExitCodeDecisionInput): ExitCodeDecisionOutput {
|
|
9
9
|
const { status, commandName } = input;
|
|
10
10
|
|
|
11
|
-
// D5ルール:
|
|
12
|
-
if (commandName === '
|
|
11
|
+
// D5ルール: phasegate:status は fail でも exitCode=0 を返す
|
|
12
|
+
if (commandName === 'phasegate:status' && status === 'fail') {
|
|
13
13
|
return {
|
|
14
14
|
exitCode: 0 as ExitCode,
|
|
15
|
-
reason: 'D5ルール適用:
|
|
15
|
+
reason: 'D5ルール適用: phasegate:statusコマンドはfailでもexitCode=0を返す(情報提供コマンドのため)',
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -35,14 +35,14 @@ function makeError(message: string): HarnessError {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const KNOWN_COMMANDS = new Set([
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
38
|
+
'phasegate:check-ready',
|
|
39
|
+
'phasegate:check-phase',
|
|
40
|
+
'phasegate:ci-check',
|
|
41
|
+
'phasegate:detect-drift',
|
|
42
|
+
'phasegate:status',
|
|
43
|
+
'phasegate:lint',
|
|
44
|
+
'phasegate:complete-check',
|
|
45
|
+
'phasegate:impact-analysis',
|
|
46
46
|
]);
|
|
47
47
|
|
|
48
48
|
export class CommandDispatchService {
|
|
@@ -104,7 +104,7 @@ export class CommandDispatchService {
|
|
|
104
104
|
summary: { totalChecks: number; passed: number; failed: number; warnings: number }
|
|
105
105
|
): Promise<DispatchResult<T>> {
|
|
106
106
|
switch (commandName) {
|
|
107
|
-
case '
|
|
107
|
+
case 'phasegate:check-ready': {
|
|
108
108
|
const stories = await this.ports.phaseGateQueryPort.queryAllStories();
|
|
109
109
|
const result = CheckReadyResult.fromStories(stories);
|
|
110
110
|
if (result.allPassed) {
|
|
@@ -117,7 +117,7 @@ export class CommandDispatchService {
|
|
|
117
117
|
return { status: 'fail', errors: r.errors, summary: r.summary, data: result as unknown as T, exitCode: 1 };
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
case '
|
|
120
|
+
case 'phasegate:check-phase': {
|
|
121
121
|
const unitId = args.unit ?? '';
|
|
122
122
|
const phaseInfo = await this.ports.phaseGateQueryPort.queryUnit(unitId);
|
|
123
123
|
if (phaseInfo === null) {
|
|
@@ -129,7 +129,7 @@ export class CommandDispatchService {
|
|
|
129
129
|
return { status: 'pass', errors: [], summary: r.summary, data: phaseInfo as unknown as T, exitCode: 0 };
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
case '
|
|
132
|
+
case 'phasegate:ci-check': {
|
|
133
133
|
const validatorResults = await this.ports.validatorExecutionPort.runL3Validators();
|
|
134
134
|
const result = CiCheckResult.fromResults(validatorResults);
|
|
135
135
|
if (result.allPassed) {
|
|
@@ -144,7 +144,7 @@ export class CommandDispatchService {
|
|
|
144
144
|
return { status: 'fail', errors: r.errors, summary: r.summary, data: result as unknown as T, exitCode: 1 };
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
case '
|
|
147
|
+
case 'phasegate:detect-drift': {
|
|
148
148
|
const drifts = await this.ports.validatorExecutionPort.runDriftDetection();
|
|
149
149
|
const result = DriftReportSummary.fromDrifts(drifts);
|
|
150
150
|
if (!result.hasDrift()) {
|
|
@@ -156,7 +156,7 @@ export class CommandDispatchService {
|
|
|
156
156
|
return { status: 'fail', errors: r.errors, summary: r.summary, data: result as unknown as T, exitCode: 1 };
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
case '
|
|
159
|
+
case 'phasegate:status': {
|
|
160
160
|
const scanResult = await this.ports.artifactScannerPort.scan();
|
|
161
161
|
let presetInfo = { name: 'standard' as const, enabledLayers: ['L1', 'L2', 'L3'] as ('L1' | 'L2' | 'L3' | 'L4')[] };
|
|
162
162
|
const configPort = this.ports.configQueryPort;
|
|
@@ -176,7 +176,7 @@ export class CommandDispatchService {
|
|
|
176
176
|
return { status: 'pass', errors: [], summary: r.summary, data: statusSummary as unknown as T, exitCode: 0 };
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
case '
|
|
179
|
+
case 'phasegate:lint': {
|
|
180
180
|
const lintResult = await this.ports.biomeLintPort.runLint();
|
|
181
181
|
if (lintResult.passed) {
|
|
182
182
|
const r = HarnessApiResponse.pass({ ...summary, passed: 1 });
|
|
@@ -187,7 +187,7 @@ export class CommandDispatchService {
|
|
|
187
187
|
return { status: 'fail', errors: r.errors, summary: r.summary, data: undefined, exitCode: 1 };
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
case '
|
|
190
|
+
case 'phasegate:complete-check': {
|
|
191
191
|
const [validatorResults, lintResult] = await Promise.all([
|
|
192
192
|
this.ports.validatorExecutionPort.runAllValidators(),
|
|
193
193
|
this.ports.biomeLintPort.runLint(),
|
|
@@ -211,7 +211,7 @@ export class CommandDispatchService {
|
|
|
211
211
|
return { status: 'fail', errors: r.errors, summary: r.summary, data: undefined, exitCode: 1 };
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
case '
|
|
214
|
+
case 'phasegate:impact-analysis': {
|
|
215
215
|
const storyId = args.storyId ?? '';
|
|
216
216
|
const result = await this.ports.impactAnalysisPort.analyze(storyId);
|
|
217
217
|
if (result === null) {
|
|
@@ -6,12 +6,12 @@ export class CommandRegistry {
|
|
|
6
6
|
private readonly commands: Map<string, CliCommandDefinition> = new Map();
|
|
7
7
|
|
|
8
8
|
registerCommand(definition: CliCommandDefinition): void {
|
|
9
|
-
// INV-2:
|
|
9
|
+
// INV-2: phasegate: プレフィックス必須
|
|
10
10
|
if (!definition.commandName || definition.commandName.trim() === '') {
|
|
11
11
|
throw new Error('HarnessApiDomainError: commandName must not be empty');
|
|
12
12
|
}
|
|
13
|
-
if (!definition.commandName.startsWith('
|
|
14
|
-
throw new Error(`DuplicateCommandNameError: commandName must start with '
|
|
13
|
+
if (!definition.commandName.startsWith('phasegate:')) {
|
|
14
|
+
throw new Error(`DuplicateCommandNameError: commandName must start with 'phasegate:': ${definition.commandName}`);
|
|
15
15
|
}
|
|
16
16
|
// INV-1: 同一コマンド名の重複禁止
|
|
17
17
|
if (this.commands.has(definition.commandName)) {
|
|
@@ -15,17 +15,17 @@ export type CommandOutputType =
|
|
|
15
15
|
| 'complete-check'
|
|
16
16
|
| 'impact-analysis';
|
|
17
17
|
|
|
18
|
-
const COMMAND_NAME_REGEX = /^
|
|
18
|
+
const COMMAND_NAME_REGEX = /^phasegate:[a-z][a-z0-9-]*$/;
|
|
19
19
|
|
|
20
20
|
const OUTPUT_TYPE_MAP: Record<string, CommandOutputType> = {
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
21
|
+
'phasegate:check-ready': 'check-ready',
|
|
22
|
+
'phasegate:check-phase': 'check-phase',
|
|
23
|
+
'phasegate:ci-check': 'ci-check',
|
|
24
|
+
'phasegate:detect-drift': 'detect-drift',
|
|
25
|
+
'phasegate:status': 'status',
|
|
26
|
+
'phasegate:lint': 'lint',
|
|
27
|
+
'phasegate:complete-check': 'complete-check',
|
|
28
|
+
'phasegate:impact-analysis': 'impact-analysis',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export interface CliCommandDefinitionProps {
|
|
@@ -68,7 +68,7 @@ export class CliCommandDefinition {
|
|
|
68
68
|
}
|
|
69
69
|
): CliCommandDefinition {
|
|
70
70
|
if (!commandName || !COMMAND_NAME_REGEX.test(commandName)) {
|
|
71
|
-
throw new Error(`InvalidCommandNameError: invalid command name '${commandName}'. Must match ^
|
|
71
|
+
throw new Error(`InvalidCommandNameError: invalid command name '${commandName}'. Must match ^phasegate:[a-z][a-z0-9-]*$`);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const outputType =
|
|
@@ -17,7 +17,7 @@ export class DetectDriftHandler {
|
|
|
17
17
|
options: CLIOutputOptions = {}
|
|
18
18
|
): Promise<void> {
|
|
19
19
|
const result = await this.dispatchUseCase.execute({
|
|
20
|
-
commandName: '
|
|
20
|
+
commandName: 'phasegate:detect-drift',
|
|
21
21
|
args,
|
|
22
22
|
flags: { ...flags, json: true },
|
|
23
23
|
});
|
|
@@ -20,15 +20,15 @@ export class StatusHandler {
|
|
|
20
20
|
options: CLIOutputOptions = {}
|
|
21
21
|
): Promise<void> {
|
|
22
22
|
const result = await this.dispatchUseCase.execute({
|
|
23
|
-
commandName: '
|
|
23
|
+
commandName: 'phasegate:status',
|
|
24
24
|
args,
|
|
25
25
|
flags,
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
// Apply D5 rule:
|
|
28
|
+
// Apply D5 rule: phasegate:status never returns exitCode 1
|
|
29
29
|
const exitDecision = this.decideExitCodeUseCase.execute({
|
|
30
30
|
status: result.response.status,
|
|
31
|
-
commandName: '
|
|
31
|
+
commandName: 'phasegate:status',
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
const json = HarnessApiJsonFormatter.format(result.response, options);
|
package/scripts/harness/main.ts
CHANGED
|
@@ -38,7 +38,7 @@ function getProjectRoot(): string {
|
|
|
38
38
|
|
|
39
39
|
function printUsage(): void {
|
|
40
40
|
const usage = `
|
|
41
|
-
Usage:
|
|
41
|
+
Usage: phasegate <command> [options]
|
|
42
42
|
|
|
43
43
|
Setup:
|
|
44
44
|
init Initialize project: deploy skills + create phasegate.config.json
|
|
@@ -65,14 +65,14 @@ Commands:
|
|
|
65
65
|
validate Run validators (--layer L0|L2|L3|L4|all, --unit, --format human|agent|ci)
|
|
66
66
|
ci-check CI check (--quick for quick mode, --fail-on-reject, --dry-run, --files)
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
phasegate:check-ready Check ready status (--json)
|
|
69
|
+
phasegate:check-phase Check phase gate (--unit <unitId>, --json)
|
|
70
|
+
phasegate:ci-check Full CI check (--json)
|
|
71
|
+
phasegate:detect-drift Detect design/code drift (--json)
|
|
72
|
+
phasegate:status Phasegate overall status (--json)
|
|
73
|
+
phasegate:lint Lint via harness-api (--target <path>, --json)
|
|
74
|
+
phasegate:complete-check Complete L2-L4 check (--json)
|
|
75
|
+
phasegate:impact-analysis Impact analysis for story (<storyId>, --json)
|
|
76
76
|
|
|
77
77
|
ci:generate-template Generate CI template (--preset <id>, --type <type>, --render, --json)
|
|
78
78
|
ci:migrate-agents-md Migrate AGENTS.md (--dry-run, --validate-only, --json)
|
|
@@ -547,7 +547,7 @@ async function main(): Promise<void> {
|
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
// ── harness-api ──
|
|
550
|
-
case '
|
|
550
|
+
case 'phasegate:check-ready': {
|
|
551
551
|
const mod = createHarnessApiModule();
|
|
552
552
|
const flags: Record<string, boolean | string> = {};
|
|
553
553
|
if (json) flags.json = true;
|
|
@@ -555,7 +555,7 @@ async function main(): Promise<void> {
|
|
|
555
555
|
break;
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
-
case '
|
|
558
|
+
case 'phasegate:check-phase': {
|
|
559
559
|
const mod = createHarnessApiModule();
|
|
560
560
|
const unit = parseFlag(args, '--unit') ?? args[1] ?? '';
|
|
561
561
|
const flags: Record<string, boolean | string> = {};
|
|
@@ -564,7 +564,7 @@ async function main(): Promise<void> {
|
|
|
564
564
|
break;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
case '
|
|
567
|
+
case 'phasegate:ci-check': {
|
|
568
568
|
const mod = createHarnessApiModule();
|
|
569
569
|
const flags: Record<string, boolean | string> = {};
|
|
570
570
|
if (json) flags.json = true;
|
|
@@ -572,7 +572,7 @@ async function main(): Promise<void> {
|
|
|
572
572
|
break;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
case '
|
|
575
|
+
case 'phasegate:detect-drift': {
|
|
576
576
|
const mod = createHarnessApiModule();
|
|
577
577
|
const flags: Record<string, boolean | string> = {};
|
|
578
578
|
if (json) flags.json = true;
|
|
@@ -580,7 +580,7 @@ async function main(): Promise<void> {
|
|
|
580
580
|
break;
|
|
581
581
|
}
|
|
582
582
|
|
|
583
|
-
case '
|
|
583
|
+
case 'phasegate:status': {
|
|
584
584
|
const mod = createHarnessApiModule();
|
|
585
585
|
const flags: Record<string, boolean | string> = {};
|
|
586
586
|
if (json) flags.json = true;
|
|
@@ -588,7 +588,7 @@ async function main(): Promise<void> {
|
|
|
588
588
|
break;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
case '
|
|
591
|
+
case 'phasegate:lint': {
|
|
592
592
|
const mod = createHarnessApiModule();
|
|
593
593
|
const flags: Record<string, boolean | string> = {};
|
|
594
594
|
if (json) flags.json = true;
|
|
@@ -598,7 +598,7 @@ async function main(): Promise<void> {
|
|
|
598
598
|
break;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
-
case '
|
|
601
|
+
case 'phasegate:complete-check': {
|
|
602
602
|
const mod = createHarnessApiModule();
|
|
603
603
|
const flags: Record<string, boolean | string> = {};
|
|
604
604
|
if (json) flags.json = true;
|
|
@@ -606,7 +606,7 @@ async function main(): Promise<void> {
|
|
|
606
606
|
break;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
case '
|
|
609
|
+
case 'phasegate:impact-analysis': {
|
|
610
610
|
const mod = createHarnessApiModule();
|
|
611
611
|
const storyId = args[1] && !args[1].startsWith('--') ? args[1] : (parseFlag(args, '--story-id') ?? '');
|
|
612
612
|
const flags: Record<string, boolean | string> = {};
|
|
@@ -843,7 +843,7 @@ async function main(): Promise<void> {
|
|
|
843
843
|
if (subCommand === 'info') {
|
|
844
844
|
const skillName = args[2];
|
|
845
845
|
if (!skillName) {
|
|
846
|
-
console.error('Usage:
|
|
846
|
+
console.error('Usage: phasegate skills info <skill-name>');
|
|
847
847
|
process.exit(2);
|
|
848
848
|
}
|
|
849
849
|
const { promises: fs } = await import('node:fs');
|
|
@@ -859,7 +859,7 @@ async function main(): Promise<void> {
|
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
|
|
862
|
-
console.error('Usage:
|
|
862
|
+
console.error('Usage: phasegate skills <list|info <name>>');
|
|
863
863
|
process.exit(2);
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @layer application
|
|
3
3
|
* @unit quick-mode
|
|
4
4
|
*
|
|
5
|
-
* H10-03:
|
|
5
|
+
* H10-03: phasegate:ci-check --quick の実行フロー全体を調停するUseCase
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { JudgeQuickModeEligibilityUseCase } from './judge-quick-mode-eligibility-usecase.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @layer presentation
|
|
3
3
|
* @unit quick-mode
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* phasegate:ci-check --quick フラグを受け取り、ExecuteQuickCiCheckUseCase を呼ぶハンドラー
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { HumanQuickModeFormatter } from '../formatters/human-quick-mode-formatter.js';
|
|
@@ -185,9 +185,9 @@ export function createValidatorSystemModule(config?: object): ValidatorSystemMod
|
|
|
185
185
|
const aggregateValidationResultsUseCase = new AggregateValidationResultsUseCase();
|
|
186
186
|
const KNOWN_CLI_COMMANDS = [
|
|
187
187
|
'validate', 'lint', 'ci-check', 'detect-drift',
|
|
188
|
-
'
|
|
189
|
-
'
|
|
190
|
-
'
|
|
188
|
+
'phasegate:check-ready', 'phasegate:check-phase', 'phasegate:ci-check',
|
|
189
|
+
'phasegate:detect-drift', 'phasegate:lint', 'phasegate:complete-check',
|
|
190
|
+
'phasegate:impact-analysis', 'phasegate:status',
|
|
191
191
|
];
|
|
192
192
|
const cwd = process.cwd();
|
|
193
193
|
const itTestFileAnalyzerPort = new ItTestFileAnalyzerAdapter({
|