qfai 1.0.4 → 1.0.5
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 +53 -65
- package/assets/init/.qfai/README.md +17 -77
- package/assets/init/.qfai/assistant/README.md +9 -0
- package/assets/init/.qfai/assistant/agents/README.md +34 -0
- package/assets/init/.qfai/assistant/agents/architect.md +73 -0
- package/assets/init/.qfai/assistant/agents/backend-engineer.md +73 -0
- package/assets/init/.qfai/assistant/agents/code-reviewer.md +73 -0
- package/assets/init/.qfai/assistant/agents/contract-designer.md +73 -0
- package/assets/init/.qfai/assistant/agents/devops-ci-engineer.md +73 -0
- package/assets/init/.qfai/assistant/agents/facilitator.md +74 -0
- package/assets/init/.qfai/assistant/agents/frontend-engineer.md +73 -0
- package/assets/init/.qfai/assistant/agents/interviewer.md +72 -0
- package/assets/init/.qfai/assistant/agents/planner.md +73 -0
- package/assets/init/.qfai/assistant/agents/qa-engineer.md +73 -0
- package/assets/init/.qfai/assistant/agents/requirements-analyst.md +73 -0
- package/assets/init/.qfai/assistant/agents/test-engineer.md +73 -0
- package/assets/init/.qfai/assistant/instructions/README.md +6 -0
- package/assets/init/.qfai/assistant/instructions/constitution.md +131 -0
- package/assets/init/.qfai/assistant/instructions/workflow.md +75 -0
- package/assets/init/.qfai/assistant/prompts/README.md +19 -0
- package/assets/init/.qfai/assistant/prompts/qfai-discuss.md +173 -0
- package/assets/init/.qfai/assistant/prompts/qfai-implement.md +239 -0
- package/assets/init/.qfai/assistant/prompts/qfai-pr.md +218 -0
- package/assets/init/.qfai/assistant/prompts/qfai-require.md +273 -0
- package/assets/init/.qfai/assistant/prompts/qfai-scenario-test.md +229 -0
- package/assets/init/.qfai/assistant/prompts/qfai-spec.md +287 -0
- package/assets/init/.qfai/assistant/prompts/qfai-unit-test.md +202 -0
- package/assets/init/.qfai/assistant/prompts/qfai-verify.md +231 -0
- package/assets/init/.qfai/assistant/prompts.local/README.md +6 -0
- package/assets/init/.qfai/assistant/steering/README.md +33 -0
- package/assets/init/.qfai/assistant/steering/product.md +32 -0
- package/assets/init/.qfai/assistant/steering/structure.md +34 -0
- package/assets/init/.qfai/assistant/steering/tech.md +37 -0
- package/assets/init/.qfai/contracts/README.md +7 -87
- package/assets/init/.qfai/contracts/api/README.md +8 -0
- package/assets/init/.qfai/contracts/db/README.md +8 -0
- package/assets/init/.qfai/contracts/ui/README.md +8 -0
- package/assets/init/.qfai/report/README.md +13 -0
- package/assets/init/.qfai/require/README.md +4 -26
- package/assets/init/.qfai/require/require.md +74 -0
- package/assets/init/.qfai/specs/README.md +6 -56
- package/assets/init/root/.github/workflows/qfai.yml +1 -1
- package/assets/init/root/qfai.config.yaml +3 -3
- package/dist/cli/index.cjs +306 -423
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +288 -405
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +29 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +29 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/assets/init/.qfai/contracts/api/api-0001-sample.yaml +0 -15
- package/assets/init/.qfai/contracts/db/db-0001-sample.sql +0 -7
- package/assets/init/.qfai/contracts/ui/assets/thema-001-facebook-like/assets.yaml +0 -6
- package/assets/init/.qfai/contracts/ui/assets/thema-001-facebook-like/palette.png +0 -0
- package/assets/init/.qfai/contracts/ui/assets/ui-0001-sample/assets.yaml +0 -6
- package/assets/init/.qfai/contracts/ui/assets/ui-0001-sample/snapshots/login__desktop__light__default.png +0 -0
- package/assets/init/.qfai/contracts/ui/thema-001-facebook-like.yml +0 -13
- package/assets/init/.qfai/contracts/ui/ui-0001-sample.yaml +0 -17
- package/assets/init/.qfai/out/README.md +0 -17
- package/assets/init/.qfai/promptpack/commands/implement.md +0 -8
- package/assets/init/.qfai/promptpack/commands/plan.md +0 -11
- package/assets/init/.qfai/promptpack/commands/release.md +0 -6
- package/assets/init/.qfai/promptpack/commands/review.md +0 -6
- package/assets/init/.qfai/promptpack/constitution.md +0 -15
- package/assets/init/.qfai/promptpack/roles/qa.md +0 -4
- package/assets/init/.qfai/promptpack/roles/spec.md +0 -4
- package/assets/init/.qfai/promptpack/roles/test.md +0 -4
- package/assets/init/.qfai/promptpack/steering/naming.md +0 -7
- package/assets/init/.qfai/promptpack/steering/traceability.md +0 -25
- package/assets/init/.qfai/prompts/README.md +0 -68
- package/assets/init/.qfai/prompts/analyze/README.md +0 -21
- package/assets/init/.qfai/prompts/analyze/scenario_test_consistency.md +0 -8
- package/assets/init/.qfai/prompts/analyze/scenario_to_test.md +0 -56
- package/assets/init/.qfai/prompts/analyze/spec_contract_consistency.md +0 -8
- package/assets/init/.qfai/prompts/analyze/spec_scenario_consistency.md +0 -8
- package/assets/init/.qfai/prompts/analyze/spec_to_contract.md +0 -54
- package/assets/init/.qfai/prompts/analyze/spec_to_scenario.md +0 -56
- package/assets/init/.qfai/prompts/makeBusinessFlow.md +0 -34
- package/assets/init/.qfai/prompts/makeOverview.md +0 -27
- package/assets/init/.qfai/prompts/qfai-generate-test-globs.md +0 -29
- package/assets/init/.qfai/prompts/qfai-maintain-contracts.md +0 -35
- package/assets/init/.qfai/prompts/qfai-maintain-traceability.md +0 -36
- package/assets/init/.qfai/prompts/require-to-spec.md +0 -40
- package/assets/init/.qfai/prompts.local/README.md +0 -31
- package/assets/init/.qfai/specs/spec-0001/delta.md +0 -25
- package/assets/init/.qfai/specs/spec-0001/scenario.feature +0 -11
- package/assets/init/.qfai/specs/spec-0001/spec.md +0 -40
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# report/
|
|
2
|
+
|
|
3
|
+
This directory is reserved for generated outputs.
|
|
4
|
+
|
|
5
|
+
Examples:
|
|
6
|
+
|
|
7
|
+
- `qfai report` output
|
|
8
|
+
- generated traceability reports
|
|
9
|
+
- diagnostic artifacts you choose to store
|
|
10
|
+
|
|
11
|
+
Recommended:
|
|
12
|
+
|
|
13
|
+
- commit policy is project-dependent (often: do NOT commit large generated files)
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# require/
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
QFAI は `.qfai/require/` を **入力(上流)** として扱い、ここに置かれた内容を根拠に Spec を作成します。
|
|
3
|
+
This folder contains the Requirements SSOT.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- `.qfai/require/req-0001-<slug>.md`
|
|
9
|
-
- `.qfai/require/links.md`(外部ドキュメントへのリンク集)
|
|
10
|
-
- `.qfai/require/raw/`(PDFや画像などの原本)
|
|
11
|
-
|
|
12
|
-
> 形式は限定しません。内容が参照可能であることを優先してください。
|
|
13
|
-
|
|
14
|
-
## 参照ルール(重要)
|
|
15
|
-
|
|
16
|
-
- `.qfai/require/` は **上流のSSOT** です。
|
|
17
|
-
- `.qfai/specs` や `contracts` は **.qfai/require を参照してよい**。
|
|
18
|
-
- `.qfai/require` 側から `.qfai/specs` や `contracts` を参照するのは **禁止**(循環参照防止)。
|
|
19
|
-
|
|
20
|
-
## AI プロンプトの利用
|
|
21
|
-
|
|
22
|
-
- `.qfai/prompts/require-to-spec.md` を使用し、要件から Spec を作成します。
|
|
23
|
-
- 生成後は必ず人間がレビューし、Spec/Scenario/Contracts の整合を確認してください。
|
|
24
|
-
|
|
25
|
-
## 注意
|
|
26
|
-
|
|
27
|
-
- `.qfai/require/` の内容は QFAI の validate 対象外です。
|
|
28
|
-
- 機密情報の取り扱いは各プロジェクトのルールに従ってください。
|
|
5
|
+
- `require.md` is the single-file requirements artifact.
|
|
6
|
+
- Keep requirements **testable** (EARS) and avoid implementation detail.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Requirements
|
|
2
|
+
|
|
3
|
+
> Fill this in using `/qfai-require`.
|
|
4
|
+
|
|
5
|
+
## 1. Overview
|
|
6
|
+
|
|
7
|
+
- Problem / opportunity:
|
|
8
|
+
- Target users:
|
|
9
|
+
- Success definition:
|
|
10
|
+
|
|
11
|
+
## 2. Scope
|
|
12
|
+
|
|
13
|
+
### In scope
|
|
14
|
+
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
### Out of scope
|
|
18
|
+
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
## 3. Constraints & Assumptions
|
|
22
|
+
|
|
23
|
+
### Constraints
|
|
24
|
+
|
|
25
|
+
-
|
|
26
|
+
|
|
27
|
+
### Assumptions
|
|
28
|
+
|
|
29
|
+
-
|
|
30
|
+
|
|
31
|
+
## 4. Glossary
|
|
32
|
+
|
|
33
|
+
-
|
|
34
|
+
|
|
35
|
+
## 5. Functional Requirements (EARS)
|
|
36
|
+
|
|
37
|
+
### REQ-FUNC-001: <title>
|
|
38
|
+
|
|
39
|
+
- Statement (EARS):
|
|
40
|
+
- Rationale:
|
|
41
|
+
- Acceptance criteria:
|
|
42
|
+
- Notes / edge cases:
|
|
43
|
+
|
|
44
|
+
## 6. Non‑Functional Requirements
|
|
45
|
+
|
|
46
|
+
### Security
|
|
47
|
+
|
|
48
|
+
-
|
|
49
|
+
|
|
50
|
+
### Performance
|
|
51
|
+
|
|
52
|
+
-
|
|
53
|
+
|
|
54
|
+
### Reliability / Availability
|
|
55
|
+
|
|
56
|
+
-
|
|
57
|
+
|
|
58
|
+
### Observability
|
|
59
|
+
|
|
60
|
+
-
|
|
61
|
+
|
|
62
|
+
## 7. Acceptance Criteria (summary)
|
|
63
|
+
|
|
64
|
+
-
|
|
65
|
+
|
|
66
|
+
## 8. Open Questions
|
|
67
|
+
|
|
68
|
+
### Blocking
|
|
69
|
+
|
|
70
|
+
-
|
|
71
|
+
|
|
72
|
+
### Non‑blocking
|
|
73
|
+
|
|
74
|
+
-
|
|
@@ -1,59 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# specs/
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A **spec pack** lives under `specs/spec-XXXX/` and contains:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- `spec.md` : SDD spec (source of truth for behavior)
|
|
6
|
+
- `delta.md` : impact / migration / verification plan
|
|
7
|
+
- `scenario.feature` : Gherkin scenarios (ATDD skeleton)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- `spec-0001/delta.md`(必須)
|
|
9
|
-
- `spec-0001/scenario.feature`(必須・Gherkin)
|
|
10
|
-
|
|
11
|
-
> `spec-0001` は **4桁連番**。Spec ID も **4桁(SPEC-0001)** です。
|
|
12
|
-
|
|
13
|
-
## Spec(spec.md)最小例
|
|
14
|
-
|
|
15
|
-
```md
|
|
16
|
-
# SPEC-0001: 注文登録の最小要件
|
|
17
|
-
|
|
18
|
-
QFAI-CONTRACT-REF: UI-0001, API-0001, DB-0001, THEMA-001
|
|
19
|
-
|
|
20
|
-
## 背景
|
|
21
|
-
|
|
22
|
-
- 例: 受注の登録ルールを明文化し、手戻りを減らすため
|
|
23
|
-
|
|
24
|
-
## 業務ルール
|
|
25
|
-
|
|
26
|
-
- [BR-0001][P2] 受注は承認者が承認するまで確定しない
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### BR の書き方
|
|
30
|
-
|
|
31
|
-
- **1ルール = 1 BR** を守る
|
|
32
|
-
- Priority は **P0/P1/P2/P3** のいずれかを必ず付与
|
|
33
|
-
- BR 定義は **`## 業務ルール` セクション内のみ**(他セクションは参照扱い)
|
|
34
|
-
|
|
35
|
-
### Contract 参照の書き方
|
|
36
|
-
|
|
37
|
-
- `QFAI-CONTRACT-REF:` 行で契約IDを宣言する(複数行可)
|
|
38
|
-
- 参照不要な場合は `QFAI-CONTRACT-REF: none`
|
|
39
|
-
|
|
40
|
-
## Delta(delta.md)
|
|
41
|
-
|
|
42
|
-
- 変更の要約・根拠・影響範囲・受入観点を明記する
|
|
43
|
-
|
|
44
|
-
## Scenario(scenario.feature)最小要件
|
|
45
|
-
|
|
46
|
-
- **Gherkin 記法**(Given/When/Then)
|
|
47
|
-
- **1ファイル = 1 Scenario**(Scenario Outline 含む)
|
|
48
|
-
- `# QFAI-CONTRACT-REF: ...` をコメント行で **必須宣言**(参照なしは `none`)
|
|
49
|
-
- `@SPEC-xxxx` は Feature レベルに **ちょうど1つ**必要
|
|
50
|
-
- Scenario / Scenario Outline には `@SC-xxxx` が **ちょうど1つ**必要
|
|
51
|
-
- Scenario / Scenario Outline には `@BR-xxxx` が **1つ以上**必要
|
|
52
|
-
|
|
53
|
-
## CI でチェックされること(抜粋)
|
|
54
|
-
|
|
55
|
-
- Spec: 必須セクション、SPEC/BR ID、BR Priority、ID 形式、Contract 参照の実在性、Contract 参照の必須宣言
|
|
56
|
-
- Delta: delta.md の存在
|
|
57
|
-
- Scenario: Feature/Scenario の存在、タグ要件、Given/When/Then、契約参照の宣言/形式
|
|
58
|
-
- Traceability: BR→SC、Spec→Contract、SC→Test の接続、BR の所属 SPEC 整合
|
|
59
|
-
- IDs: 定義 ID の重複検知(Spec/Scenario/Contracts)
|
|
9
|
+
Create/update spec packs with `/qfai-spec`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
paths:
|
|
2
2
|
specsDir: .qfai/specs
|
|
3
3
|
contractsDir: .qfai/contracts
|
|
4
|
-
outDir: .qfai/
|
|
5
|
-
promptsDir: .qfai/prompts
|
|
4
|
+
outDir: .qfai/report
|
|
5
|
+
promptsDir: .qfai/assistant/prompts
|
|
6
6
|
srcDir: src
|
|
7
7
|
testsDir: tests
|
|
8
8
|
validation:
|
|
@@ -29,4 +29,4 @@ validation:
|
|
|
29
29
|
orphanContractsPolicy: error
|
|
30
30
|
unknownContractIdSeverity: error
|
|
31
31
|
output:
|
|
32
|
-
validateJsonPath: .qfai/
|
|
32
|
+
validateJsonPath: .qfai/report/validate.json
|