phasegate 0.160.0 → 0.160.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/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.160.1] - 2026-05-14
11
+
12
+ ### Fixed
13
+
14
+ - **WI-181 / WI-182 / WI-183 — downstream install and package contract** — declares `tinyglobby` as a packaged runtime dependency, updates pre-commit and AIDLC workflow templates to call the published `phasegate` bin instead of monorepo-only scripts, and makes the workflow choose npm/yarn/pnpm install commands from lockfiles.
15
+
10
16
  ## [0.160.0] - 2026-05-13
11
17
 
12
18
  ### Added
@@ -1,13 +1,13 @@
1
1
  # Phasegate — PR検証ワークフロー
2
2
  #
3
3
  # 使い方:
4
- # このファイルを .github/workflows/aidlc-gate.yml にコピーして使用する。
4
+ # phasegate install または ci:generate-template で配置する。
5
5
  #
6
6
  # 実行タイミング: Pull Request(open / synchronize / reopen)
7
7
  # 実行内容:
8
8
  # 1. bypass:audit — bypass trailer / evidence 監査
9
- # 2. harness:lint — L1 Biome AST ルール検証
10
- # 3. harness:ci-check — L3 CI バリデータ(security / performance / coverage / nyquist)
9
+ # 2. phasegate lint — L1 Biome AST ルール検証
10
+ # 3. phasegate:ci-check — L3 CI バリデータ(security / performance / coverage / nyquist)
11
11
  # 4. 失敗時: PR にエラーサマリーをコメント
12
12
 
13
13
  name: AIDLC Quality Gate
@@ -33,15 +33,21 @@ jobs:
33
33
  uses: actions/setup-node@v4
34
34
  with:
35
35
  node-version: '20'
36
- cache: 'pnpm'
37
36
 
38
- - name: Install pnpm
39
- uses: pnpm/action-setup@v4
40
- with:
41
- version: 9
37
+ - name: Enable Corepack
38
+ run: corepack enable
42
39
 
43
40
  - name: Install dependencies
44
- run: pnpm install --frozen-lockfile
41
+ run: |
42
+ if [ -f pnpm-lock.yaml ]; then
43
+ pnpm install --frozen-lockfile
44
+ elif [ -f yarn.lock ]; then
45
+ yarn install --immutable || yarn install --frozen-lockfile
46
+ elif [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
47
+ npm ci
48
+ else
49
+ npm install
50
+ fi
45
51
 
46
52
  # Bypass audit: local `git commit --no-verify` can skip hooks, but CI
47
53
  # replays the gate over the PR range and requires structured evidence.
@@ -63,7 +69,7 @@ jobs:
63
69
  id: lint
64
70
  run: |
65
71
  set +e
66
- RESULT=$(pnpm run harness lint --json 2>&1)
72
+ RESULT=$(npx phasegate lint --json 2>&1)
67
73
  EXIT_CODE=$?
68
74
  echo "result<<EOF" >> $GITHUB_OUTPUT
69
75
  echo "$RESULT" >> $GITHUB_OUTPUT
@@ -77,7 +83,7 @@ jobs:
77
83
  if: always()
78
84
  run: |
79
85
  set +e
80
- RESULT=$(pnpm run harness harness:ci-check --json 2>&1)
86
+ RESULT=$(npx phasegate phasegate:ci-check --json 2>&1)
81
87
  EXIT_CODE=$?
82
88
  echo "result<<EOF" >> $GITHUB_OUTPUT
83
89
  echo "$RESULT" >> $GITHUB_OUTPUT
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env sh
2
2
  # GSDLC Quality Harness — Pre-commit Hook テンプレート
3
3
  #
4
- # 使い方:
5
- # 1. このファイルを .husky/pre-commit にコピーする
6
- # 2. chmod +x .husky/pre-commit
7
- # 3. pnpm add --save-dev husky && npx husky install
4
+ # Managed by phasegate install / ci:generate-template.
5
+ # Requires phasegate to be available through package.json devDependencies or npx.
8
6
  #
9
7
  # 実行内容:
10
8
  # L1: Biome AST ルール(require-unit-comment, no-layer-violation など 8ルール)
@@ -15,7 +13,7 @@
15
13
 
16
14
  . "$(dirname -- "$0")/_/husky.sh"
17
15
 
18
- HARNESS_CMD="npx tsx scripts/harness/main.ts"
16
+ PHASEGATE_CMD="${PHASEGATE_CMD:-npx phasegate}"
19
17
 
20
18
  echo "🔍 AIDLC Quality Gate (Pre-commit)"
21
19
  echo "──────────────────────────────────"
@@ -24,14 +22,14 @@ echo "────────────────────────
24
22
  # L1: Biome AST ルール
25
23
  # -----------------------------------------------------------------------
26
24
  echo "▶ L1 Lint (Biome AST)..."
27
- $HARNESS_CMD lint
25
+ $PHASEGATE_CMD lint
28
26
  L1_EXIT=$?
29
27
 
30
28
  if [ $L1_EXIT -ne 0 ]; then
31
29
  echo ""
32
30
  echo "❌ L1 Lint が失敗しました。"
33
31
  echo " 修正してから再度コミットしてください。"
34
- echo " 詳細: pnpm run harness lint"
32
+ echo " 詳細: npx phasegate lint"
35
33
  exit 1
36
34
  fi
37
35
  echo "✅ L1 Lint: passed"
@@ -42,10 +40,10 @@ echo "✅ L1 Lint: passed"
42
40
  # Quick Mode では phase-gate をスキップ
43
41
  if [ "${HARNESS_QUICK_MODE:-0}" = "1" ]; then
44
42
  echo "▶ L2 Validators (Quick Mode: phase-gate スキップ)..."
45
- $HARNESS_CMD check-phase-gate --skip-phase-gate
43
+ $PHASEGATE_CMD validate --layer L2 --format human --no-l4
46
44
  else
47
45
  echo "▶ L2 Validators (phase-gate / metadata / test-quality)..."
48
- $HARNESS_CMD check-phase-gate
46
+ $PHASEGATE_CMD validate --layer L2 --format human
49
47
  fi
50
48
  L2_EXIT=$?
51
49
 
@@ -53,7 +51,7 @@ if [ $L2_EXIT -ne 0 ]; then
53
51
  echo ""
54
52
  echo "❌ L2 Validators が失敗しました。"
55
53
  echo " 修正してから再度コミットしてください。"
56
- echo " 詳細: pnpm run harness check-phase-gate"
54
+ echo " 詳細: npx phasegate validate --layer L2 --format human"
57
55
  exit 1
58
56
  fi
59
57
  echo "✅ L2 Validators: passed"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phasegate",
3
- "version": "0.160.0",
3
+ "version": "0.160.1",
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": "MIT",
@@ -64,6 +64,7 @@
64
64
  "dependencies": {
65
65
  "ajv": "^8.18.0",
66
66
  "picomatch": "^4.0.4",
67
+ "tinyglobby": "^0.2.15",
67
68
  "tsx": "^4.0.0"
68
69
  },
69
70
  "devDependencies": {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @layer infrastructure
3
3
  * @unit ci-governance
4
+ * @work-item-id WI-182 / WI-183
4
5
  *
5
6
  * TemplateRendererPort実装(YAML書き出し)
6
7
  */
@@ -4,6 +4,8 @@
4
4
  // @work-item-id WI-174
5
5
  // @work-item-id WI-175
6
6
  // @work-item-id WI-177
7
+ // @work-item-id WI-182
8
+ // @work-item-id WI-183
7
9
 
8
10
  import { mkdir, readFile, writeFile, copyFile, chmod, access, lstat, readlink, symlink } from "node:fs/promises";
9
11
  import { dirname, join } from "node:path";
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @layer infrastructure
3
3
  * @unit skill-quality
4
+ * @work-item-id WI-181
4
5
  * Composition Root - wires all dependencies together
5
6
  */
6
7