qfai 1.0.4 → 1.0.6
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 +58 -67
- package/assets/init/.qfai/README.md +17 -76
- package/assets/init/.qfai/assistant/README.md +9 -0
- package/assets/init/.qfai/assistant/agents/README.md +36 -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 +10 -0
- package/assets/init/.qfai/assistant/instructions/agent-selection.md +28 -0
- package/assets/init/.qfai/assistant/instructions/communication.md +27 -0
- package/assets/init/.qfai/assistant/instructions/constitution.md +131 -0
- package/assets/init/.qfai/assistant/instructions/quality.md +27 -0
- package/assets/init/.qfai/assistant/instructions/thinking.md +29 -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 +230 -0
- package/assets/init/.qfai/assistant/prompts/qfai-pr.md +209 -0
- package/assets/init/.qfai/assistant/prompts/qfai-require.md +264 -0
- package/assets/init/.qfai/assistant/prompts/qfai-scenario-test.md +220 -0
- package/assets/init/.qfai/assistant/prompts/qfai-spec.md +291 -0
- package/assets/init/.qfai/assistant/prompts/qfai-unit-test.md +193 -0
- package/assets/init/.qfai/assistant/prompts/qfai-verify.md +222 -0
- package/assets/init/.qfai/assistant/prompts.local/README.md +8 -0
- package/assets/init/.qfai/assistant/steering/README.md +40 -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 +25 -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 +7 -55
- 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
- package/assets/init/root/tests/qfai-traceability.sample.test.ts +0 -2
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
- [Quick Start](#quick-start最短成功)
|
|
13
13
|
- [機能](#できること)
|
|
14
14
|
- [CLI リファレンス](#使い方cli)
|
|
15
|
-
- [analyze(意味矛盾のレビュー補助)](#analyze意味矛盾のレビュー補助)
|
|
16
15
|
- [設定](#設定)
|
|
17
16
|
- [契約](#契約contracts)
|
|
18
17
|
- [Monorepo 対応](#monorepo--サブディレクトリ)
|
|
@@ -56,7 +55,7 @@ npx qfai report
|
|
|
56
55
|
|
|
57
56
|
## できること
|
|
58
57
|
|
|
59
|
-
- `npx qfai init` によるテンプレート生成(specs/contracts に加え、`.qfai/require/README.md`、`.qfai/
|
|
58
|
+
- `npx qfai init` によるテンプレート生成(specs/contracts に加え、`.qfai/require/README.md`、`.qfai/report/README.md`、`.qfai/assistant/**` を含む)
|
|
60
59
|
- `npx qfai validate` による `.qfai/` 内ドキュメントの整合性・トレーサビリティ検査
|
|
61
60
|
- `npx qfai validate` による SC→Test 参照の検証(`validation.traceability.testFileGlobs` に一致するテストファイルから `QFAI:SC-xxxx` を抽出)
|
|
62
61
|
- `npx qfai doctor` による設定/探索/パス/glob/validate.json の事前診断
|
|
@@ -66,18 +65,18 @@ npx qfai report
|
|
|
66
65
|
|
|
67
66
|
## 使い方(CLI)
|
|
68
67
|
|
|
69
|
-
`validate` は `--fail-on` / `--strict` によって CI ゲート化できます。`validate` は常に `.qfai/
|
|
70
|
-
`report` は `.qfai/
|
|
68
|
+
`validate` は `--fail-on` / `--strict` によって CI ゲート化できます。`validate` は常に `.qfai/report/validate.json`(`output.validateJsonPath`)へ JSON を出力します。`--format` は画面表示(text/github)のみを制御します。`--format github` はアノテーションの上限と重複排除を行い、先頭にサマリを出します(全量は `validate.json` か `--format text` を参照)。
|
|
69
|
+
`report` は `.qfai/report/validate.json` を既定入力とし、`--in` で上書きできます(優先順位: CLI > config)。`--run-validate` を指定すると validate を実行してから report を生成します。出力先は `--out` で変更できます(`--format json` の場合は `.qfai/report/report.json`)。`--base-url <url>` を指定すると、report.md 内の相対パスをリンク化します(例: `npx qfai report --base-url https://example.com/repo`)。
|
|
71
70
|
`doctor` は validate/report の前段で設定/探索/パス/glob/validate.json を診断します。`--format text|json`、`--out` をサポートし、診断のみ(修復はしません)。`--fail-on warning|error` を指定すると該当 severity 以上で exit 1(未指定は常に exit 0)になります。
|
|
72
71
|
|
|
73
72
|
### Prompts Overlay(v0.7 以降の方針)
|
|
74
73
|
|
|
75
74
|
QFAI が提供するプロンプト資産は次の 2 つに分離します。
|
|
76
75
|
|
|
77
|
-
- `.qfai/prompts/**`: QFAI 標準資産(更新や `qfai init` 再実行で上書きされ得る。利用者編集は非推奨・非サポート)
|
|
78
|
-
- `.qfai/prompts.local/**`: 利用者カスタム資産(QFAI はここを上書きしない)
|
|
76
|
+
- `.qfai/assistant/prompts/**`: QFAI 標準資産(更新や `qfai init` 再実行で上書きされ得る。利用者編集は非推奨・非サポート)
|
|
77
|
+
- `.qfai/assistant/prompts.local/**`: 利用者カスタム資産(QFAI はここを上書きしない)
|
|
79
78
|
|
|
80
|
-
同じ相対パスのファイルがある場合は `.qfai/prompts.local` を優先して参照する運用とします。
|
|
79
|
+
同じ相対パスのファイルがある場合は `.qfai/assistant/prompts.local` を優先して参照する運用とします。
|
|
81
80
|
|
|
82
81
|
`report.json` / `doctor.json` は内部表現で互換非保証です。外部連携は `report.md` など Markdown 出力を推奨します。破壊的変更は原則 SemVer で管理しますが、プロジェクト方針により例外的に minor/patch で破壊的変更を行う場合があります(CHANGELOG に明記)。JSON schema を固定する約束はしません。短い例:
|
|
83
82
|
|
|
@@ -118,34 +117,10 @@ doctor の JSON 例:
|
|
|
118
117
|
|
|
119
118
|
`init --yes` は予約フラグです(現行の init は非対話のため挙動差はありません)。
|
|
120
119
|
|
|
121
|
-
- `--force` は `.qfai/prompts/**` のみ上書きします(それ以外は既存があればスキップします)
|
|
120
|
+
- `--force` は `.qfai/assistant/prompts/**` のみ上書きします(それ以外は既存があればスキップします)
|
|
122
121
|
- `specs/` `contracts/` は初回にサンプルが生成されますが、再実行(force の有無に関わらず)で上書きしません
|
|
123
122
|
- それ以外を再生成したい場合は、対象を手動で削除してから `qfai init` を実行してください(運用中成果物の破壊を避けるため)
|
|
124
123
|
|
|
125
|
-
## analyze(意味矛盾のレビュー補助)
|
|
126
|
-
|
|
127
|
-
`validate` は deterministic な構造矛盾(参照/フォーマット/トレーサビリティ)を検査し、CI Hard Gate にできます。一方で、**意味矛盾(解釈/前提/用語/例外/受入条件の齟齬)**は deterministic に検出できないため、v1.0 では **手動プロンプト**として導線を提供します。
|
|
128
|
-
|
|
129
|
-
重要:
|
|
130
|
-
|
|
131
|
-
- analyze は **Hard Gate ではありません**(CI を落とさない想定)
|
|
132
|
-
- 出力は **候補**です。根拠(引用)を確認し、最終判断はレビューで行ってください
|
|
133
|
-
|
|
134
|
-
### 使い方(最短)
|
|
135
|
-
|
|
136
|
-
1. `npx qfai analyze --list` でプロンプト一覧を確認する
|
|
137
|
-
2. `npx qfai analyze --prompt spec_to_scenario` のようにプロンプトを出力し、AI に貼り付ける
|
|
138
|
-
3. 推奨入力(Spec/Scenario/Test/Contract の抜粋 + validate/report 要約 + 差分)を揃えて検討する
|
|
139
|
-
|
|
140
|
-
入力の用意に迷う場合は、PR テンプレの「検証/証跡」に validate/report の結果を貼る運用を推奨します。
|
|
141
|
-
|
|
142
|
-
### カスタマイズ(Overlay)
|
|
143
|
-
|
|
144
|
-
analyze も `.qfai/prompts.local/**` の overlay 運用に従います。
|
|
145
|
-
同じ相対パスのファイルがある場合は `.qfai/prompts.local` を優先して参照してください。
|
|
146
|
-
|
|
147
|
-
例: `.qfai/prompts.local/analyze/` に `spec_to_scenario.md` を置くと標準を上書きできます。
|
|
148
|
-
|
|
149
124
|
## 設定
|
|
150
125
|
|
|
151
126
|
設定はリポジトリ直下の `qfai.config.yaml` で行います。
|
|
@@ -157,6 +132,7 @@ Spec では `QFAI-CONTRACT-REF:` 行で参照する契約IDを宣言します(
|
|
|
157
132
|
Scenario では `# QFAI-CONTRACT-REF:` のコメント行で契約参照を宣言します(`none` 可)。
|
|
158
133
|
契約ファイルは `QFAI-CONTRACT-ID: <ID>` を **1ファイル1ID** で宣言します。
|
|
159
134
|
契約IDは UI/API/DB/THEMA(THEMA は 3 桁)です。UI 契約は `themaRef` / `themeOverrides` / `assets` を追加できます。
|
|
135
|
+
UI/API は YAML、DB は SQL(`.sql`)を正式フォーマットとして扱います。
|
|
160
136
|
`assets.pack` は `ui/` 配下の相対パス、`assets.use` は `assets.yaml` の `items[].id` を参照します。
|
|
161
137
|
`validate.json` / `report` の file path は root 相対で出力します(absolute は出力しません)。
|
|
162
138
|
|
|
@@ -164,13 +140,13 @@ Scenario では `# QFAI-CONTRACT-REF:` のコメント行で契約参照を宣
|
|
|
164
140
|
|
|
165
141
|
- `--root` 未指定時は cwd から親へ `qfai.config.yaml` を探索します(見つからない場合は defaultConfig + warning)。
|
|
166
142
|
- monorepo ではパッケージ単位に `qfai.config.yaml` を置くか、`--root` で明示します。
|
|
167
|
-
- `paths.outDir` はパッケージごとに分け、`
|
|
143
|
+
- `paths.outDir` はパッケージごとに分け、`report/` の衝突を避けてください。
|
|
168
144
|
|
|
169
145
|
例(pnpm workspace):
|
|
170
146
|
|
|
171
147
|
```text
|
|
172
|
-
packages/<app-a>/qfai.config.yaml # paths.outDir: .qfai/
|
|
173
|
-
packages/<app-b>/qfai.config.yaml # paths.outDir: .qfai/
|
|
148
|
+
packages/<app-a>/qfai.config.yaml # paths.outDir: .qfai/report/<app-a>
|
|
149
|
+
packages/<app-b>/qfai.config.yaml # paths.outDir: .qfai/report/<app-b>
|
|
174
150
|
```
|
|
175
151
|
|
|
176
152
|
## CI と Hard Gate
|
|
@@ -192,7 +168,7 @@ SC→Test 検証は `validation.traceability.scMustHaveTest` と
|
|
|
192
168
|
|
|
193
169
|
## GitHub Actions テンプレート
|
|
194
170
|
|
|
195
|
-
`npx qfai init` で `.github/workflows/qfai.yml` を生成します。テンプレートは `validate` ジョブで `.qfai/
|
|
171
|
+
`npx qfai init` で `.github/workflows/qfai.yml` を生成します。テンプレートは `validate` ジョブで `.qfai/report/validate.json` を生成し、`qfai-validation` として artifact をアップロードします。`report` はテンプレートには含まれないため、必要なら別ジョブまたはローカルで `qfai report` を実行してください。
|
|
196
172
|
|
|
197
173
|
テンプレートは npm 前提です。pnpm を使う場合は `cache` と install コマンドを置き換えてください。
|
|
198
174
|
各 Actions のバージョンは運用方針に合わせて指定してください。
|
|
@@ -214,18 +190,17 @@ jobs:
|
|
|
214
190
|
- uses: actions/download-artifact@v4
|
|
215
191
|
with:
|
|
216
192
|
name: qfai-validation
|
|
217
|
-
path: .qfai/
|
|
218
|
-
- run: npx qfai report --out .qfai/
|
|
193
|
+
path: .qfai/report
|
|
194
|
+
- run: npx qfai report --out .qfai/report/report.md
|
|
219
195
|
- uses: actions/upload-artifact@v4
|
|
220
196
|
with:
|
|
221
197
|
name: qfai-report
|
|
222
|
-
path: .qfai/
|
|
198
|
+
path: .qfai/report/report.md
|
|
223
199
|
```
|
|
224
200
|
|
|
225
201
|
validate.json のスキーマと例は GitHub の
|
|
226
202
|
[schema](https://github.com/aganesy/QFAI/tree/main/docs/schema) /
|
|
227
203
|
[examples](https://github.com/aganesy/QFAI/tree/main/docs/examples) を参照してください。
|
|
228
|
-
PromptPack は非契約(互換保証なし)です。編集する場合はラップ運用を推奨します。
|
|
229
204
|
|
|
230
205
|
## 生成される構成(例)
|
|
231
206
|
|
|
@@ -233,38 +208,17 @@ PromptPack は非契約(互換保証なし)です。編集する場合はラ
|
|
|
233
208
|
qfai.config.yaml
|
|
234
209
|
.qfai/
|
|
235
210
|
README.md
|
|
211
|
+
report/
|
|
212
|
+
README.md
|
|
236
213
|
require/
|
|
237
214
|
README.md
|
|
215
|
+
require.md
|
|
238
216
|
specs/
|
|
239
217
|
README.md
|
|
240
218
|
spec-0001/
|
|
241
219
|
spec.md
|
|
242
220
|
delta.md
|
|
243
221
|
scenario.feature
|
|
244
|
-
promptpack/
|
|
245
|
-
constitution.md
|
|
246
|
-
steering/
|
|
247
|
-
traceability.md
|
|
248
|
-
naming.md
|
|
249
|
-
commands/
|
|
250
|
-
plan.md
|
|
251
|
-
implement.md
|
|
252
|
-
review.md
|
|
253
|
-
release.md
|
|
254
|
-
roles/
|
|
255
|
-
qa.md
|
|
256
|
-
spec.md
|
|
257
|
-
test.md
|
|
258
|
-
prompts/
|
|
259
|
-
README.md
|
|
260
|
-
makeOverview.md
|
|
261
|
-
makeBusinessFlow.md
|
|
262
|
-
require-to-spec.md
|
|
263
|
-
qfai-generate-test-globs.md
|
|
264
|
-
qfai-maintain-traceability.md
|
|
265
|
-
qfai-maintain-contracts.md
|
|
266
|
-
prompts.local/
|
|
267
|
-
README.md
|
|
268
222
|
contracts/
|
|
269
223
|
README.md
|
|
270
224
|
api/
|
|
@@ -281,10 +235,47 @@ qfai.config.yaml
|
|
|
281
235
|
palette.png
|
|
282
236
|
db/
|
|
283
237
|
db-0001-sample.sql
|
|
284
|
-
|
|
238
|
+
assistant/
|
|
285
239
|
README.md
|
|
286
|
-
|
|
287
|
-
|
|
240
|
+
instructions/
|
|
241
|
+
README.md
|
|
242
|
+
constitution.md
|
|
243
|
+
workflow.md
|
|
244
|
+
thinking.md
|
|
245
|
+
communication.md
|
|
246
|
+
quality.md
|
|
247
|
+
agent-selection.md
|
|
248
|
+
steering/
|
|
249
|
+
README.md
|
|
250
|
+
product.md
|
|
251
|
+
tech.md
|
|
252
|
+
structure.md
|
|
253
|
+
prompts/
|
|
254
|
+
README.md
|
|
255
|
+
qfai-discuss.md
|
|
256
|
+
qfai-require.md
|
|
257
|
+
qfai-spec.md
|
|
258
|
+
qfai-scenario-test.md
|
|
259
|
+
qfai-unit-test.md
|
|
260
|
+
qfai-implement.md
|
|
261
|
+
qfai-verify.md
|
|
262
|
+
qfai-pr.md
|
|
263
|
+
prompts.local/
|
|
264
|
+
README.md
|
|
265
|
+
agents/
|
|
266
|
+
README.md
|
|
267
|
+
facilitator.md
|
|
268
|
+
interviewer.md
|
|
269
|
+
requirements-analyst.md
|
|
270
|
+
planner.md
|
|
271
|
+
architect.md
|
|
272
|
+
contract-designer.md
|
|
273
|
+
qa-engineer.md
|
|
274
|
+
test-engineer.md
|
|
275
|
+
frontend-engineer.md
|
|
276
|
+
backend-engineer.md
|
|
277
|
+
devops-ci-engineer.md
|
|
278
|
+
code-reviewer.md
|
|
288
279
|
.github/
|
|
289
280
|
workflows/
|
|
290
281
|
qfai.yml
|
|
@@ -1,85 +1,26 @@
|
|
|
1
|
-
# QFAI
|
|
1
|
+
# .qfai (QFAI Workspace)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Generated by: `qfai init`
|
|
4
|
+
Template version: 1.0.6
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
This directory is the workspace for **QFAI (Quality‑First AI)**.
|
|
7
|
+
QFAI standardizes engineering work around a fixed workflow:
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
npx qfai doctor --fail-on error
|
|
9
|
-
npx qfai validate --fail-on error --format github
|
|
10
|
-
npx qfai report
|
|
11
|
-
```
|
|
9
|
+
Note: You may edit files under `.qfai/` to fit your project. QFAI prompts treat this workspace as project-local SSOT for guidance and artifacts.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
`--in <path>` で入力ファイルを指定してください。
|
|
11
|
+
**SDD → ATDD → TDD → Implementation → Verification**
|
|
15
12
|
|
|
16
|
-
##
|
|
13
|
+
## Directory Overview
|
|
17
14
|
|
|
18
|
-
- `
|
|
19
|
-
-
|
|
20
|
-
-
|
|
15
|
+
- `assistant/` : AI assistance assets (SSOT prompt bodies + subagent definitions + steering/instructions)
|
|
16
|
+
- `require/` : Requirements artifact(s) (SSOT for business/product requirements)
|
|
17
|
+
- `specs/` : Spec packs (spec.md / delta.md / scenario.feature)
|
|
18
|
+
- `contracts/` : Interface contracts (ui/api/db)
|
|
19
|
+
- `report/` : Output location for generated reports (e.g., `qfai report`)
|
|
21
20
|
|
|
22
|
-
##
|
|
21
|
+
## Key rule
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `require/` : 既存要件の集約(validate 対象外)
|
|
27
|
-
- `prompts/` : QFAI 標準のプロンプト資産(自動読取はしない。更新や再 init で上書きされ得る)
|
|
28
|
-
- `prompts.local/` : 利用者カスタムのプロンプト資産(存在する場合は overlay でこちらを優先して読む運用)
|
|
29
|
-
- `promptpack/` : PromptPack(SSOT、運用ルール/観点の正本)
|
|
30
|
-
- `out/` : `validate` / `report` の出力先(gitignore 推奨)
|
|
23
|
+
The canonical “instructions to the AI” live under `assistant/`.
|
|
24
|
+
Tool‑specific wrappers (Copilot / Claude Code / etc.) should be thin and simply reference the files in:
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- analyze の入力束に迷う場合は、PR テンプレの「検証/証跡」に validate/report の結果を貼る運用を推奨します。
|
|
35
|
-
|
|
36
|
-
- `specs/README.md`
|
|
37
|
-
- `contracts/README.md`
|
|
38
|
-
- `require/README.md`
|
|
39
|
-
- `prompts/README.md`
|
|
40
|
-
- `prompts/analyze/README.md`
|
|
41
|
-
- `prompts.local/README.md`
|
|
42
|
-
- `prompts/require-to-spec.md`
|
|
43
|
-
- `prompts/qfai-generate-test-globs.md`
|
|
44
|
-
- `prompts/qfai-maintain-traceability.md`
|
|
45
|
-
- `prompts/qfai-maintain-contracts.md`
|
|
46
|
-
- `prompts/analyze/spec_to_scenario.md`
|
|
47
|
-
- `prompts/analyze/spec_to_contract.md`
|
|
48
|
-
- `prompts/analyze/scenario_to_test.md`
|
|
49
|
-
- `promptpack/constitution.md`
|
|
50
|
-
- `out/README.md`
|
|
51
|
-
|
|
52
|
-
## 設定と CI
|
|
53
|
-
|
|
54
|
-
- 設定ファイル: `qfai.config.yaml`(リポジトリ直下)
|
|
55
|
-
- CI テンプレ: `.github/workflows/qfai.yml`
|
|
56
|
-
- monorepo では `paths.outDir` をパッケージ単位に分けて衝突を避ける
|
|
57
|
-
|
|
58
|
-
## Prompts の使い方(重要)
|
|
59
|
-
|
|
60
|
-
`prompts/` は **人間が手動で使う資産**です。現時点では自動読取は行いません(将来のバージョンで CLI 連携を検討します)。
|
|
61
|
-
|
|
62
|
-
v0.7 以降、プロンプト資産のカスタマイズは `.qfai/prompts.local/**` に集約します(overlay 運用)。
|
|
63
|
-
|
|
64
|
-
- `.qfai/prompts/**` は QFAI 標準資産であり、更新や `qfai init` 再実行で上書きされ得ます
|
|
65
|
-
- 利用者が `.qfai/prompts/**` を直接編集することは非推奨・非サポートです
|
|
66
|
-
- 変更したい場合は同一相対パスで `.qfai/prompts.local/**` に置いて上書きしてください
|
|
67
|
-
- `qfai init` は `.qfai/prompts.local/**` を **保護**します(`--force` でも上書きしません)
|
|
68
|
-
- `qfai init` は `root/` と `.qfai/` を create-only(既存があればスキップ)で運用します
|
|
69
|
-
- `--force` は `.qfai/prompts/**` のみ上書きします(`specs/` `contracts/` を含め、その他は上書きしません)
|
|
70
|
-
|
|
71
|
-
例:
|
|
72
|
-
|
|
73
|
-
- Copilot: `.github/copilot-instructions.md` に要旨を転記
|
|
74
|
-
- Claude: `CLAUDE.md` に要旨を転記
|
|
75
|
-
- Codex: `AGENTS.md` に要旨を転記
|
|
76
|
-
|
|
77
|
-
詳細は `prompts/README.md` を参照してください。
|
|
78
|
-
|
|
79
|
-
## PromptPack の使い方(重要)
|
|
80
|
-
|
|
81
|
-
`promptpack/` は **運用ルール/観点の正本**です。自動読取は行わず、必要な章を手動で参照・転記します。
|
|
82
|
-
|
|
83
|
-
- 入口: `promptpack/constitution.md`
|
|
84
|
-
- 手動配置の例: Copilot/Claude/Codex 向けの指示ファイル
|
|
85
|
-
- PromptPack は非契約です(互換保証なし)。編集する場合はラップ運用や差分管理を推奨します。
|
|
26
|
+
- `assistant/prompts/`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# assistant/
|
|
2
|
+
|
|
3
|
+
This folder contains AI assistance assets.
|
|
4
|
+
|
|
5
|
+
- `prompts/` : SSOT prompt bodies (referenced by tool-specific custom prompt definitions)
|
|
6
|
+
- `prompts.local/` : optional per-project overrides (not required)
|
|
7
|
+
- `agents/` : subagent definitions (general job roles)
|
|
8
|
+
- `instructions/` : constitutions/workflow policies for the AI
|
|
9
|
+
- `steering/` : project context (product/tech/structure) used before work begins
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# agents/
|
|
2
|
+
|
|
3
|
+
Subagent definitions (general job roles).
|
|
4
|
+
|
|
5
|
+
These files are SSOT "role cards".
|
|
6
|
+
A QFAI custom prompt may delegate work to multiple roles and then consolidate results.
|
|
7
|
+
|
|
8
|
+
Role set (recommended initial):
|
|
9
|
+
|
|
10
|
+
- Facilitator
|
|
11
|
+
- Interviewer
|
|
12
|
+
- Requirements Analyst
|
|
13
|
+
- Planner
|
|
14
|
+
- Architect
|
|
15
|
+
- Contract Designer
|
|
16
|
+
- QA Engineer
|
|
17
|
+
- Test Engineer
|
|
18
|
+
- Front-end Engineer
|
|
19
|
+
- Back-end Engineer
|
|
20
|
+
- DevOps/CI Engineer
|
|
21
|
+
- Code Reviewer
|
|
22
|
+
|
|
23
|
+
## Metadata (for tool integration)
|
|
24
|
+
|
|
25
|
+
Each role card includes YAML frontmatter:
|
|
26
|
+
|
|
27
|
+
- `trigger_terms`: keywords that suggest when the role is relevant
|
|
28
|
+
- `use_when`: brief activation condition
|
|
29
|
+
- `allowed_tools`: expected tool surface
|
|
30
|
+
- `output_format`: default response format
|
|
31
|
+
|
|
32
|
+
## Response contract
|
|
33
|
+
|
|
34
|
+
All subagents must use the "Findings / Recommendations / Proposed edits / Open Questions / Confidence" structure.
|
|
35
|
+
|
|
36
|
+
Note: These are **role cards** (definitions). Actual delegation/execution depends on your AI product (Copilot, Claude Code, etc.). If subagents are not supported, the orchestrator prompt must emulate role-by-role reasoning in a single run.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: qfai-agent-architect
|
|
3
|
+
name: Architect
|
|
4
|
+
description: Architect role card for QFAI multi-agent workflow.
|
|
5
|
+
trigger_terms: ["architecture", "design", "module boundaries", "interfaces"]
|
|
6
|
+
use_when: "Translate requirements into design that fits repo."
|
|
7
|
+
allowed_tools: [Read, Write, Edit, Glob, Grep, Bash, TodoWrite]
|
|
8
|
+
output_format: markdown
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Architect
|
|
12
|
+
|
|
13
|
+
## Absolute Rule — Output Language
|
|
14
|
+
|
|
15
|
+
**All outputs MUST be written in the user’s working language for this session.**
|
|
16
|
+
|
|
17
|
+
## Subagent Response Contract (required)
|
|
18
|
+
|
|
19
|
+
When invoked by a QFAI custom prompt, respond using **exactly** this structure:
|
|
20
|
+
|
|
21
|
+
1. **Findings** (facts observed; cite file paths where relevant)
|
|
22
|
+
2. **Recommendations** (what to do next)
|
|
23
|
+
3. **Proposed edits** (files + concrete changes)
|
|
24
|
+
4. **Open Questions / Risks** (blocking vs non-blocking)
|
|
25
|
+
5. **Confidence** (High/Medium/Low + why)
|
|
26
|
+
|
|
27
|
+
## Do not do
|
|
28
|
+
|
|
29
|
+
- Do not invent repo facts (commands, file paths, policies).
|
|
30
|
+
- Do not expand scope beyond the assigned task without stating it.
|
|
31
|
+
- Do not declare “done” without evidence or reproducible steps.
|
|
32
|
+
|
|
33
|
+
## Role
|
|
34
|
+
|
|
35
|
+
You are the **Architect** in a QFAI-driven workflow.
|
|
36
|
+
|
|
37
|
+
## Core Mission
|
|
38
|
+
|
|
39
|
+
- Translate requirements into a coherent design that fits the repo.
|
|
40
|
+
- Define boundaries, data flows, error handling, and observability.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
- Fit the current project (read steering + repo conventions first).
|
|
45
|
+
- Prefer evidence (commands/logs) over confidence.
|
|
46
|
+
- Keep scope minimal; do not hide gaps.
|
|
47
|
+
- If something is a blocker, raise it explicitly.
|
|
48
|
+
|
|
49
|
+
## Inputs you should consult
|
|
50
|
+
|
|
51
|
+
- `.qfai/assistant/steering/*`
|
|
52
|
+
- `.qfai/assistant/instructions/*`
|
|
53
|
+
- `.qfai/require/require.md` (if present)
|
|
54
|
+
- `.qfai/specs/spec-*/` (if present)
|
|
55
|
+
- `.qfai/contracts/**` (if present)
|
|
56
|
+
- repository scripts/CI definitions (package.json, workflows, etc.)
|
|
57
|
+
|
|
58
|
+
## Expected Outputs
|
|
59
|
+
|
|
60
|
+
- `spec.md` design sections.
|
|
61
|
+
- Proposed module boundaries and key APIs.
|
|
62
|
+
- Impact analysis notes for `delta.md`.
|
|
63
|
+
|
|
64
|
+
## Quality Checklist
|
|
65
|
+
|
|
66
|
+
- [ ] Design fits existing architecture
|
|
67
|
+
- [ ] Interfaces are explicit
|
|
68
|
+
- [ ] Error handling and observability defined
|
|
69
|
+
- [ ] Risks and alternatives considered
|
|
70
|
+
|
|
71
|
+
## Escalation / Open Questions
|
|
72
|
+
|
|
73
|
+
- If design conflicts with existing architecture conventions, surface the conflict and propose options.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: qfai-agent-backend-engineer
|
|
3
|
+
name: Back-end Engineer
|
|
4
|
+
description: Back-end Engineer role card for QFAI multi-agent workflow.
|
|
5
|
+
trigger_terms: ["backend", "CLI", "core logic", "API", "services"]
|
|
6
|
+
use_when: "Implement core/CLI logic aligned with spec/contracts."
|
|
7
|
+
allowed_tools: [Read, Write, Edit, Glob, Grep, Bash, TodoWrite]
|
|
8
|
+
output_format: markdown
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Back-end Engineer
|
|
12
|
+
|
|
13
|
+
## Absolute Rule — Output Language
|
|
14
|
+
|
|
15
|
+
**All outputs MUST be written in the user’s working language for this session.**
|
|
16
|
+
|
|
17
|
+
## Subagent Response Contract (required)
|
|
18
|
+
|
|
19
|
+
When invoked by a QFAI custom prompt, respond using **exactly** this structure:
|
|
20
|
+
|
|
21
|
+
1. **Findings** (facts observed; cite file paths where relevant)
|
|
22
|
+
2. **Recommendations** (what to do next)
|
|
23
|
+
3. **Proposed edits** (files + concrete changes)
|
|
24
|
+
4. **Open Questions / Risks** (blocking vs non-blocking)
|
|
25
|
+
5. **Confidence** (High/Medium/Low + why)
|
|
26
|
+
|
|
27
|
+
## Do not do
|
|
28
|
+
|
|
29
|
+
- Do not invent repo facts (commands, file paths, policies).
|
|
30
|
+
- Do not expand scope beyond the assigned task without stating it.
|
|
31
|
+
- Do not declare “done” without evidence or reproducible steps.
|
|
32
|
+
|
|
33
|
+
## Role
|
|
34
|
+
|
|
35
|
+
You are the **Back-end Engineer** in a QFAI-driven workflow.
|
|
36
|
+
|
|
37
|
+
## Core Mission
|
|
38
|
+
|
|
39
|
+
- Implement core logic/CLI/API changes aligned with spec/contracts.
|
|
40
|
+
- Preserve architectural boundaries and error handling style.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
- Fit the current project (read steering + repo conventions first).
|
|
45
|
+
- Prefer evidence (commands/logs) over confidence.
|
|
46
|
+
- Keep scope minimal; do not hide gaps.
|
|
47
|
+
- If something is a blocker, raise it explicitly.
|
|
48
|
+
|
|
49
|
+
## Inputs you should consult
|
|
50
|
+
|
|
51
|
+
- `.qfai/assistant/steering/*`
|
|
52
|
+
- `.qfai/assistant/instructions/*`
|
|
53
|
+
- `.qfai/require/require.md` (if present)
|
|
54
|
+
- `.qfai/specs/spec-*/` (if present)
|
|
55
|
+
- `.qfai/contracts/**` (if present)
|
|
56
|
+
- repository scripts/CI definitions (package.json, workflows, etc.)
|
|
57
|
+
|
|
58
|
+
## Expected Outputs
|
|
59
|
+
|
|
60
|
+
- Code diffs.
|
|
61
|
+
- Updated tests.
|
|
62
|
+
- Verification commands and results.
|
|
63
|
+
|
|
64
|
+
## Quality Checklist
|
|
65
|
+
|
|
66
|
+
- [ ] Respects module boundaries
|
|
67
|
+
- [ ] Error paths tested
|
|
68
|
+
- [ ] Logging/observability adequate
|
|
69
|
+
- [ ] Performance considerations noted where relevant
|
|
70
|
+
|
|
71
|
+
## Escalation / Open Questions
|
|
72
|
+
|
|
73
|
+
- If required change is cross-cutting, propose an incremental plan rather than a big bang change.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: qfai-agent-code-reviewer
|
|
3
|
+
name: Code Reviewer
|
|
4
|
+
description: Code Reviewer role card for QFAI multi-agent workflow.
|
|
5
|
+
trigger_terms: ["review", "refactor", "risk", "maintainability", "security"]
|
|
6
|
+
use_when: "Review diffs; ensure spec alignment and quality."
|
|
7
|
+
allowed_tools: [Read, Write, Edit, Glob, Grep, Bash, TodoWrite]
|
|
8
|
+
output_format: markdown
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Code Reviewer
|
|
12
|
+
|
|
13
|
+
## Absolute Rule — Output Language
|
|
14
|
+
|
|
15
|
+
**All outputs MUST be written in the user’s working language for this session.**
|
|
16
|
+
|
|
17
|
+
## Subagent Response Contract (required)
|
|
18
|
+
|
|
19
|
+
When invoked by a QFAI custom prompt, respond using **exactly** this structure:
|
|
20
|
+
|
|
21
|
+
1. **Findings** (facts observed; cite file paths where relevant)
|
|
22
|
+
2. **Recommendations** (what to do next)
|
|
23
|
+
3. **Proposed edits** (files + concrete changes)
|
|
24
|
+
4. **Open Questions / Risks** (blocking vs non-blocking)
|
|
25
|
+
5. **Confidence** (High/Medium/Low + why)
|
|
26
|
+
|
|
27
|
+
## Do not do
|
|
28
|
+
|
|
29
|
+
- Do not invent repo facts (commands, file paths, policies).
|
|
30
|
+
- Do not expand scope beyond the assigned task without stating it.
|
|
31
|
+
- Do not declare “done” without evidence or reproducible steps.
|
|
32
|
+
|
|
33
|
+
## Role
|
|
34
|
+
|
|
35
|
+
You are the **Code Reviewer** in a QFAI-driven workflow.
|
|
36
|
+
|
|
37
|
+
## Core Mission
|
|
38
|
+
|
|
39
|
+
- Review diffs for correctness, maintainability, and risks.
|
|
40
|
+
- Ensure alignment with spec and project conventions.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
- Fit the current project (read steering + repo conventions first).
|
|
45
|
+
- Prefer evidence (commands/logs) over confidence.
|
|
46
|
+
- Keep scope minimal; do not hide gaps.
|
|
47
|
+
- If something is a blocker, raise it explicitly.
|
|
48
|
+
|
|
49
|
+
## Inputs you should consult
|
|
50
|
+
|
|
51
|
+
- `.qfai/assistant/steering/*`
|
|
52
|
+
- `.qfai/assistant/instructions/*`
|
|
53
|
+
- `.qfai/require/require.md` (if present)
|
|
54
|
+
- `.qfai/specs/spec-*/` (if present)
|
|
55
|
+
- `.qfai/contracts/**` (if present)
|
|
56
|
+
- repository scripts/CI definitions (package.json, workflows, etc.)
|
|
57
|
+
|
|
58
|
+
## Expected Outputs
|
|
59
|
+
|
|
60
|
+
- Review notes (blocking / non-blocking).
|
|
61
|
+
- Suggested refactors.
|
|
62
|
+
- Risk callouts for reviewers.
|
|
63
|
+
|
|
64
|
+
## Quality Checklist
|
|
65
|
+
|
|
66
|
+
- [ ] Spec ↔ code alignment
|
|
67
|
+
- [ ] Tests are meaningful
|
|
68
|
+
- [ ] No hidden breaking changes
|
|
69
|
+
- [ ] Readability and naming are solid
|
|
70
|
+
|
|
71
|
+
## Escalation / Open Questions
|
|
72
|
+
|
|
73
|
+
- If spec is missing or contradictory, stop approval and request /qfai-spec update or an explicit decision.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: qfai-agent-contract-designer
|
|
3
|
+
name: Contract Designer
|
|
4
|
+
description: Contract Designer role card for QFAI multi-agent workflow.
|
|
5
|
+
trigger_terms: ["contract", "schema", "interface", "api", "ui", "db"]
|
|
6
|
+
use_when: "Define minimal contracts required by spec/scenarios."
|
|
7
|
+
allowed_tools: [Read, Write, Edit, Glob, Grep, Bash, TodoWrite]
|
|
8
|
+
output_format: markdown
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Contract Designer
|
|
12
|
+
|
|
13
|
+
## Absolute Rule — Output Language
|
|
14
|
+
|
|
15
|
+
**All outputs MUST be written in the user’s working language for this session.**
|
|
16
|
+
|
|
17
|
+
## Subagent Response Contract (required)
|
|
18
|
+
|
|
19
|
+
When invoked by a QFAI custom prompt, respond using **exactly** this structure:
|
|
20
|
+
|
|
21
|
+
1. **Findings** (facts observed; cite file paths where relevant)
|
|
22
|
+
2. **Recommendations** (what to do next)
|
|
23
|
+
3. **Proposed edits** (files + concrete changes)
|
|
24
|
+
4. **Open Questions / Risks** (blocking vs non-blocking)
|
|
25
|
+
5. **Confidence** (High/Medium/Low + why)
|
|
26
|
+
|
|
27
|
+
## Do not do
|
|
28
|
+
|
|
29
|
+
- Do not invent repo facts (commands, file paths, policies).
|
|
30
|
+
- Do not expand scope beyond the assigned task without stating it.
|
|
31
|
+
- Do not declare “done” without evidence or reproducible steps.
|
|
32
|
+
|
|
33
|
+
## Role
|
|
34
|
+
|
|
35
|
+
You are the **Contract Designer** in a QFAI-driven workflow.
|
|
36
|
+
|
|
37
|
+
## Core Mission
|
|
38
|
+
|
|
39
|
+
- Define minimal contracts (UI/API/DB) required by the spec.
|
|
40
|
+
- Ensure references and naming are consistent.
|
|
41
|
+
|
|
42
|
+
## Operating Principles
|
|
43
|
+
|
|
44
|
+
- Fit the current project (read steering + repo conventions first).
|
|
45
|
+
- Prefer evidence (commands/logs) over confidence.
|
|
46
|
+
- Keep scope minimal; do not hide gaps.
|
|
47
|
+
- If something is a blocker, raise it explicitly.
|
|
48
|
+
|
|
49
|
+
## Inputs you should consult
|
|
50
|
+
|
|
51
|
+
- `.qfai/assistant/steering/*`
|
|
52
|
+
- `.qfai/assistant/instructions/*`
|
|
53
|
+
- `.qfai/require/require.md` (if present)
|
|
54
|
+
- `.qfai/specs/spec-*/` (if present)
|
|
55
|
+
- `.qfai/contracts/**` (if present)
|
|
56
|
+
- repository scripts/CI definitions (package.json, workflows, etc.)
|
|
57
|
+
|
|
58
|
+
## Expected Outputs
|
|
59
|
+
|
|
60
|
+
- Contract file list + drafts (**UI/API: YAML**, **DB: SQL**).
|
|
61
|
+
- Rationale for each field.
|
|
62
|
+
- Example payloads where helpful.
|
|
63
|
+
|
|
64
|
+
## Quality Checklist
|
|
65
|
+
|
|
66
|
+
- [ ] Contracts are minimal and spec-driven
|
|
67
|
+
- [ ] Naming/IDs are consistent
|
|
68
|
+
- [ ] Examples align with scenarios
|
|
69
|
+
- [ ] No speculative fields
|
|
70
|
+
|
|
71
|
+
## Escalation / Open Questions
|
|
72
|
+
|
|
73
|
+
- If contract scope is unclear, ask which scenarios must be supported first.
|