qfai 0.3.8 → 0.4.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.md CHANGED
@@ -20,6 +20,7 @@ npx qfai report
20
20
 
21
21
  - `npx qfai init` によるテンプレート生成(specs/contracts に加え、`.qfai/require/README.md`、`.qfai/rules/pnpm.md`、`.qfai/prompts/require-to-spec.md`、`.qfai/promptpack/` を含む)
22
22
  - `npx qfai validate` による `.qfai/` 内ドキュメントの整合性・トレーサビリティ検査
23
+ - `npx qfai validate` による SC→Test 参照の検証(`tests/` 配下を走査)
23
24
  - `npx qfai report` によるレポート出力
24
25
 
25
26
  ## Usage
@@ -30,3 +31,9 @@ npx qfai report
30
31
 
31
32
  設定はリポジトリ直下の `qfai.config.yaml` で行います。
32
33
  命名規約は `docs/rules/naming.md` を参照してください。
34
+
35
+ SC→Test 検証は `validation.traceability.scMustHaveTest` と
36
+ `validation.traceability.scNoTestSeverity` で制御できます。
37
+
38
+ - `validation.traceability.scMustHaveTest`: SC→Test 検証の有効/無効を制御(`true` で有効、`false` で無効)
39
+ - `validation.traceability.scNoTestSeverity`: SC 未参照時の重要度を指定(`error` / `warning`)
@@ -9,6 +9,10 @@ npx qfai validate --fail-on error --format github
9
9
  npx qfai report
10
10
  ```
11
11
 
12
+ ## トレーサビリティ(SC→Test)
13
+
14
+ - `tests/` 配下のテストコードで `SC-xxxx` を参照する(コメント可)
15
+
12
16
  ## ディレクトリ概要
13
17
 
14
18
  - `specs/` : Spec Pack(spec.md / delta.md / scenario.md)
@@ -47,5 +47,5 @@
47
47
  - Spec: 必須セクション、SPEC/BR ID、BR Priority、ID 形式、Contract 参照の実在性
48
48
  - Delta: 変更区分(互換/変更)のチェック状態
49
49
  - Scenario: Feature/Scenario の存在、タグ要件、Given/When/Then
50
- - Traceability: BR→SC、SC→契約(UI/API/DATA)の接続、BR の所属 SPEC 整合
50
+ - Traceability: BR→SC、SC→契約(UI/API/DATA)、SC→Test の接続、BR の所属 SPEC 整合
51
51
  - IDs: 定義 ID の重複検知(Spec/Scenario/Contracts)
@@ -20,6 +20,8 @@ validation:
20
20
  traceability:
21
21
  brMustHaveSc: true
22
22
  scMustTouchContracts: true
23
+ scMustHaveTest: true
24
+ scNoTestSeverity: error
23
25
  allowOrphanContracts: false
24
26
  unknownContractIdSeverity: error
25
27
  output:
@@ -0,0 +1,2 @@
1
+ // Traceability sample: reference SC IDs in tests (comments are enough).
2
+ // SC-0001