qfai 1.0.6 → 1.1.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 +327 -245
- package/assets/init/.qfai/README.md +2 -1
- package/assets/init/.qfai/assistant/README.md +1 -1
- package/assets/init/.qfai/assistant/prompts/README.md +1 -1
- package/assets/init/.qfai/assistant/prompts/qfai-configure.md +197 -0
- package/assets/init/.qfai/assistant/prompts/qfai-verify.md +1 -1
- package/assets/init/.qfai/assistant/steering/README.md +6 -0
- package/assets/init/.qfai/assistant/steering/manifest.md +43 -0
- package/assets/init/.qfai/contracts/db/README.md +10 -3
- package/assets/init/.qfai/samples/guardrails/delta_with_guardrails.md +19 -0
- package/assets/init/.qfai/specs/README.md +4 -0
- package/assets/init/root/.claude/commands/qfai-configure.md +14 -0
- package/assets/init/root/.claude/commands/qfai-discuss.md +14 -0
- package/assets/init/root/.claude/commands/qfai-implement.md +14 -0
- package/assets/init/root/.claude/commands/qfai-require.md +14 -0
- package/assets/init/root/.claude/commands/qfai-scenario-test.md +14 -0
- package/assets/init/root/.claude/commands/qfai-spec.md +14 -0
- package/assets/init/root/.claude/commands/qfai-unit-test.md +14 -0
- package/assets/init/root/.claude/commands/qfai-verify.md +14 -0
- package/assets/init/root/.codex/README.md +16 -0
- package/assets/init/root/.codex/skills/qfai-configure/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-discuss/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-implement/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-require/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-scenario-test/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-spec/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-unit-test/SKILL.md +18 -0
- package/assets/init/root/.codex/skills/qfai-verify/SKILL.md +18 -0
- package/assets/init/root/.github/copilot-instructions.md +14 -0
- package/assets/init/root/.github/prompts/qfai-configure.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-discuss.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-implement.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-require.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-scenario-test.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-spec.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-unit-test.prompt.md +17 -0
- package/assets/init/root/.github/prompts/qfai-verify.prompt.md +17 -0
- package/assets/init/root/.github/workflows/qfai.yml +0 -2
- package/assets/init/root/qfai.config.yaml +1 -8
- package/dist/cli/index.cjs +880 -196
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +866 -182
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +731 -221
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +91 -1
- package/dist/index.d.ts +91 -1
- package/dist/index.mjs +719 -216
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/assets/init/.qfai/assistant/prompts/qfai-pr.md +0 -209
package/README.md
CHANGED
|
@@ -1,297 +1,379 @@
|
|
|
1
|
-
# QFAI
|
|
1
|
+
# QFAI (Quality-First AI)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](https://nodejs.org/)
|
|
3
|
+
QFAI is a quality-first development kit for AI coding agents.
|
|
4
|
+
Its purpose is to improve the quality of AI-generated software outputs by enforcing a structured workflow and validating traceability.
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
Modern AI coding agents can write code quickly, but they can also misunderstand requirements, drift from intended behavior, or “sound correct” while being wrong.
|
|
7
|
+
QFAI addresses these failure modes by standardizing an end-to-end delivery loop and forcing objective checks.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- SDD clarifies what to build, so the agent does not invent requirements while coding.
|
|
10
|
+
- ATDD defines acceptance goals as executable scenarios, so correctness is measured rather than assumed.
|
|
11
|
+
- TDD enables a self-correcting loop: implement → run tests → fix → repeat.
|
|
12
|
+
- Traceability validation enforces that SDD → ATDD → TDD → implementation stays aligned, reducing hallucination-driven drift.
|
|
13
|
+
- Result: higher output quality, fewer review cycles, and lower human supervision cost.
|
|
10
14
|
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- [機能](#できること)
|
|
14
|
-
- [CLI リファレンス](#使い方cli)
|
|
15
|
-
- [設定](#設定)
|
|
16
|
-
- [契約](#契約contracts)
|
|
17
|
-
- [Monorepo 対応](#monorepo--サブディレクトリ)
|
|
18
|
-
- [CI 統合](#ci-と-hard-gate)
|
|
19
|
-
- [GitHub Actions](#github-actions-テンプレート)
|
|
20
|
-
- [開発](#開発)
|
|
21
|
-
- [ライセンス](#ライセンス)
|
|
15
|
+
QFAI is designed for a prompt-driven operating model: engineers select a prepared custom prompt and provide only the task intent.
|
|
16
|
+
The agent reads the repository, produces the required artifacts, and iterates until the hard gates pass.
|
|
22
17
|
|
|
23
|
-
##
|
|
18
|
+
## Quick start
|
|
24
19
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
または
|
|
30
|
-
|
|
31
|
-
```sh
|
|
20
|
+
```bash
|
|
21
|
+
# 1) Initialize QFAI assets in your repository
|
|
32
22
|
npx qfai init
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
pnpm の場合(推奨):
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
pnpm add -D qfai
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**必要環境**: Node.js >= 18.0.0(Supported) / Tested: Node.js 18, 20 / Recommended: Node.js 20 LTS 以上
|
|
42
23
|
|
|
43
|
-
|
|
24
|
+
# 2) Validate traceability (use this in CI as a hard gate)
|
|
25
|
+
npx qfai validate
|
|
44
26
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Quick Start(最短成功)
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
npx qfai init
|
|
51
|
-
npx qfai doctor --fail-on error
|
|
52
|
-
npx qfai validate --fail-on error --format github
|
|
27
|
+
# 3) Generate a human-readable report (Markdown)
|
|
53
28
|
npx qfai report
|
|
54
29
|
```
|
|
55
30
|
|
|
56
|
-
##
|
|
31
|
+
## What you can do (CLI commands)
|
|
32
|
+
|
|
33
|
+
- `npx qfai init`
|
|
34
|
+
- Creates the QFAI workspace under `.qfai/` (requirements/specs/contracts/report) and installs the AI assistant kit (`assistant/` with prompts, instructions, agents, and steering templates for product/tech/structure/manifest), plus a default GitHub Actions workflow and `qfai.config.yaml`.
|
|
35
|
+
- `npx qfai validate`
|
|
36
|
+
- Validates specs/contracts/scenarios/traceability and writes `.qfai/report/validate.json`; use `--fail-on error` (or `--fail-on warning`) to turn it into a CI gate, and `--format github` to emit GitHub-friendly annotations.
|
|
37
|
+
- `npx qfai report`
|
|
38
|
+
- Produces a human-readable report (`report.md` by default) or an internal JSON export (`report.json`) from `validate.json`; use `--base-url` to link file paths in Markdown to your repository viewer.
|
|
39
|
+
- `npx qfai doctor`
|
|
40
|
+
- Diagnoses configuration discovery, path resolution, glob scanning, and `validate.json` inputs before running validate/report; use `--fail-on` to enforce failures in CI.
|
|
41
|
+
- `npx qfai guardrails`
|
|
42
|
+
- Lists, extracts, or checks Decision Guardrails in `delta.md` (`list` / `extract` / `check`); use `--path` to point at samples or custom locations.
|
|
43
|
+
|
|
44
|
+
## Operating model (prompt-driven workflow)
|
|
45
|
+
|
|
46
|
+
QFAI assumes you operate the project primarily via prepared custom prompts.
|
|
47
|
+
A custom prompt is a reusable task instruction set for your AI coding agent (for example, an editor “slash command”, or an external prompt file that links to these QFAI prompt bodies).
|
|
48
|
+
The agent reads QFAI assets under `.qfai/assistant/` and produces or updates SDD/ATDD/TDD artifacts and code.
|
|
49
|
+
|
|
50
|
+
### Where the prompts live
|
|
51
|
+
|
|
52
|
+
- QFAI standard prompt bodies: `.qfai/assistant/prompts/**` (may be overwritten when you re-run `qfai init`).
|
|
53
|
+
- Your local overrides: `.qfai/assistant/prompts.local/**` (never overwritten by QFAI; prefer this for customizations).
|
|
54
|
+
- Rule: if the same relative path exists in both, treat `prompts.local/` as the higher-priority source.
|
|
55
|
+
|
|
56
|
+
### Minimal custom prompt set
|
|
57
|
+
|
|
58
|
+
QFAI includes a small set of custom prompts (stored under `.qfai/assistant/prompts/`) designed to keep the workflow opinionated and repeatable.
|
|
59
|
+
|
|
60
|
+
- **qfai-configure**: Analyze the repository (language, frameworks, test layout, directory structure) and update steering (`product.md`, `tech.md`, `structure.md`, `manifest.md`) plus `qfai.config.yaml` with a minimal diff (especially `testFileGlobs`, and optionally `validation.require.specSections` when you want strict headings). Run this once right after `npx qfai init`, and re-run it when the repository structure changes or when you want to enforce required spec headings. Output: updated steering + YAML + validation checklist.
|
|
61
|
+
- **qfai-discuss**: Turn an idea into clear requirements by discussing scope, constraints, risks, and open questions.
|
|
62
|
+
- **qfai-require**: Produce `.qfai/require/require.md` from your idea or discussion output.
|
|
63
|
+
- **qfai-spec**: Produce `.qfai/specs/*` and `.qfai/contracts/*` from the requirements, including traceability scaffolding.
|
|
64
|
+
- **qfai-scenario-test**: Implement acceptance tests (ATDD) driven by specs/scenarios.
|
|
65
|
+
- **qfai-unit-test**: Implement unit tests (TDD) driven by specs/scenarios.
|
|
66
|
+
- **qfai-implement**: Implement the feature; iterate test→fix until all quality gates are green.
|
|
67
|
+
- **qfai-verify**: Run/interpret the local quality gates and produce a PR-ready summary.
|
|
68
|
+
|
|
69
|
+
### Workflow sequence (example)
|
|
70
|
+
|
|
71
|
+
This sequence shows which prompt to run, in what order, and what artifacts to expect.
|
|
72
|
+
|
|
73
|
+
```mermaid
|
|
74
|
+
sequenceDiagram
|
|
75
|
+
participant U as User
|
|
76
|
+
participant AG as AI Agent
|
|
77
|
+
participant Q as QFAI Kit (.qfai)
|
|
78
|
+
participant R as Repo (codebase)
|
|
79
|
+
|
|
80
|
+
U->>R: Create a repo (or open an existing one)
|
|
81
|
+
U->>R: Run npx qfai init
|
|
82
|
+
R-->>U: .qfai kit installed (prompts, instructions, agents)
|
|
83
|
+
|
|
84
|
+
U->>AG: Run /qfai-configure
|
|
85
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-configure.md
|
|
86
|
+
AG->>R: Update qfai.config.yaml (testFileGlobs, optional specSections)
|
|
87
|
+
AG-->>U: Config tuned to this repo
|
|
88
|
+
|
|
89
|
+
opt If you only have an idea
|
|
90
|
+
U->>AG: Run /qfai-discuss
|
|
91
|
+
AG-->>U: Clarified requirements (notes)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
U->>AG: Run /qfai-require
|
|
95
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-require.md
|
|
96
|
+
AG->>R: Create/Update requirements docs
|
|
97
|
+
AG-->>U: Requirements ready
|
|
98
|
+
|
|
99
|
+
U->>AG: Run /qfai-spec
|
|
100
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-spec.md
|
|
101
|
+
AG->>R: Create specs + contracts + scenario.feature
|
|
102
|
+
AG-->>U: SDD artifacts ready
|
|
103
|
+
|
|
104
|
+
U->>AG: Run /qfai-scenario-test
|
|
105
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-scenario-test.md
|
|
106
|
+
AG->>R: Implement acceptance tests
|
|
107
|
+
AG-->>U: Scenario tests ready
|
|
108
|
+
|
|
109
|
+
U->>AG: Run /qfai-unit-test
|
|
110
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-unit-test.md
|
|
111
|
+
AG->>R: Implement unit tests
|
|
112
|
+
AG-->>U: Unit tests ready
|
|
113
|
+
|
|
114
|
+
U->>AG: Run /qfai-implement
|
|
115
|
+
AG->>Q: Read .qfai/assistant/prompts/qfai-implement.md
|
|
116
|
+
loop Implement and fix until green
|
|
117
|
+
AG->>R: Implement code changes
|
|
118
|
+
AG->>R: Run project tests locally
|
|
119
|
+
end
|
|
120
|
+
AG-->>U: Working implementation (quality gates passing)
|
|
121
|
+
|
|
122
|
+
U->>R: Run npx qfai validate
|
|
123
|
+
U->>R: Run npx qfai report
|
|
124
|
+
R-->>U: Traceability checks and report artifacts
|
|
125
|
+
```
|
|
57
126
|
|
|
58
|
-
|
|
59
|
-
- `npx qfai validate` による `.qfai/` 内ドキュメントの整合性・トレーサビリティ検査
|
|
60
|
-
- `npx qfai validate` による SC→Test 参照の検証(`validation.traceability.testFileGlobs` に一致するテストファイルから `QFAI:SC-xxxx` を抽出)
|
|
61
|
-
- `npx qfai doctor` による設定/探索/パス/glob/validate.json の事前診断
|
|
62
|
-
- `npx qfai report` によるレポート出力
|
|
127
|
+
Operational notes.
|
|
63
128
|
|
|
64
|
-
|
|
129
|
+
- Each custom prompt must output in the user’s language (absolute requirement).
|
|
130
|
+
- Except `qfai-discuss`, each prompt must analyze the project context (architecture, tech stack, test framework, repo structure) before generating artifacts or code.
|
|
131
|
+
- Prompts should delegate work to multiple role-based sub-agents (Planner, Architect, Contract Designer, QA, Code Reviewer, etc.) to emulate a real delivery flow.
|
|
65
132
|
|
|
66
|
-
##
|
|
133
|
+
## Configuration
|
|
67
134
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
135
|
+
Configuration is stored at the repository root as `qfai.config.yaml`.
|
|
136
|
+
Most projects only customize `paths` and `validation.traceability`.
|
|
137
|
+
`.qfai/require` is currently a fixed location (not configurable).
|
|
71
138
|
|
|
72
|
-
|
|
139
|
+
Example: a schema-valid configuration.
|
|
73
140
|
|
|
74
|
-
|
|
141
|
+
```yaml
|
|
142
|
+
paths:
|
|
143
|
+
specsDir: .qfai/specs
|
|
144
|
+
contractsDir: .qfai/contracts
|
|
145
|
+
outDir: .qfai/report
|
|
146
|
+
promptsDir: .qfai/assistant/prompts
|
|
147
|
+
srcDir: src
|
|
148
|
+
testsDir: tests
|
|
149
|
+
|
|
150
|
+
validation:
|
|
151
|
+
failOn: error # error | warning | never
|
|
152
|
+
traceability:
|
|
153
|
+
testFileGlobs:
|
|
154
|
+
- "src/**/*.test.ts"
|
|
155
|
+
- "tests/**/*.spec.ts"
|
|
156
|
+
testFileExcludeGlobs:
|
|
157
|
+
- "**/fixtures/**"
|
|
158
|
+
scMustHaveTest: true
|
|
159
|
+
scNoTestSeverity: warning # error | warning
|
|
160
|
+
|
|
161
|
+
output:
|
|
162
|
+
validateJsonPath: .qfai/report/validate.json
|
|
163
|
+
```
|
|
75
164
|
|
|
76
|
-
|
|
77
|
-
- `.qfai/assistant/prompts.local/**`: 利用者カスタム資産(QFAI はここを上書きしない)
|
|
165
|
+
### Spec validation (BR lines and required sections)
|
|
78
166
|
|
|
79
|
-
|
|
167
|
+
BR lines are required and must use the format `- [BR-0001][P1] ...` (priority P0-P3). Headings can be in any language.
|
|
168
|
+
`validation.require.specSections` controls required H2 section titles in `spec.md`. The default is an empty list to support multi-language specs.
|
|
169
|
+
If you want strict required headings, run `/qfai-configure` and specify your desired spec template headings.
|
|
80
170
|
|
|
81
|
-
|
|
171
|
+
Example (Japanese):
|
|
82
172
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
173
|
+
```yaml
|
|
174
|
+
validation:
|
|
175
|
+
require:
|
|
176
|
+
specSections:
|
|
177
|
+
- 背景
|
|
178
|
+
- スコープ
|
|
179
|
+
- 非ゴール
|
|
180
|
+
- 用語
|
|
181
|
+
- 前提
|
|
182
|
+
- 決定事項
|
|
183
|
+
- 業務ルール
|
|
93
184
|
```
|
|
94
185
|
|
|
95
|
-
|
|
186
|
+
Example (English):
|
|
96
187
|
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"checks": [
|
|
109
|
-
{
|
|
110
|
-
"id": "config.search",
|
|
111
|
-
"severity": "ok",
|
|
112
|
-
"message": "qfai.config.yaml found"
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
188
|
+
```yaml
|
|
189
|
+
validation:
|
|
190
|
+
require:
|
|
191
|
+
specSections:
|
|
192
|
+
- Background
|
|
193
|
+
- Scope
|
|
194
|
+
- Non-goals
|
|
195
|
+
- Glossary
|
|
196
|
+
- Assumptions
|
|
197
|
+
- Decisions
|
|
198
|
+
- Business Rules
|
|
116
199
|
```
|
|
117
200
|
|
|
118
|
-
|
|
201
|
+
Notes.
|
|
119
202
|
|
|
120
|
-
-
|
|
121
|
-
- `
|
|
122
|
-
-
|
|
203
|
+
- `validate.json`, `report.json`, and `doctor.json` are internal exports and are not a stable external contract; prefer `report.md` for integrations that must survive tool upgrades.
|
|
204
|
+
- `--strict` is a CLI option for `qfai validate` (treat warnings as failures); it is not a YAML setting.
|
|
205
|
+
- Scenario files are expected to use the Gherkin extension `*.feature` (not `*.md`).
|
|
123
206
|
|
|
124
|
-
##
|
|
207
|
+
## Specifications and contracts (SDD)
|
|
125
208
|
|
|
126
|
-
|
|
127
|
-
命名規約は GitHub の[命名規約ドキュメント](https://github.com/aganesy/QFAI/blob/main/docs/rules/naming.md)を参照してください。
|
|
209
|
+
QFAI uses a small, opinionated set of artifacts to reduce ambiguity and prevent agents from “inventing” behavior.
|
|
128
210
|
|
|
129
|
-
|
|
211
|
+
- Requirements: what you want to achieve, constraints, and explicit non-goals.
|
|
212
|
+
- Specs: structured expected behaviors, inputs/outputs, edge cases, and invariants.
|
|
213
|
+
- Contracts:
|
|
214
|
+
- UI contracts: YAML (`.yaml` / `.yml`)
|
|
215
|
+
- API contracts: YAML (`.yaml` / `.yml`)
|
|
216
|
+
- DB contracts: SQL (`.sql`)
|
|
217
|
+
- Scenarios (ATDD): Gherkin `.feature` files
|
|
130
218
|
|
|
131
|
-
|
|
132
|
-
Scenario では `# QFAI-CONTRACT-REF:` のコメント行で契約参照を宣言します(`none` 可)。
|
|
133
|
-
契約ファイルは `QFAI-CONTRACT-ID: <ID>` を **1ファイル1ID** で宣言します。
|
|
134
|
-
契約IDは UI/API/DB/THEMA(THEMA は 3 桁)です。UI 契約は `themaRef` / `themeOverrides` / `assets` を追加できます。
|
|
135
|
-
UI/API は YAML、DB は SQL(`.sql`)を正式フォーマットとして扱います。
|
|
136
|
-
`assets.pack` は `ui/` 配下の相対パス、`assets.use` は `assets.yaml` の `items[].id` を参照します。
|
|
137
|
-
`validate.json` / `report` の file path は root 相対で出力します(absolute は出力しません)。
|
|
219
|
+
Traceability is validated across these artifacts, so code changes remain grounded in the specs and the tests prove compliance.
|
|
138
220
|
|
|
139
|
-
##
|
|
221
|
+
## Continuous integration (GitHub Actions)
|
|
140
222
|
|
|
141
|
-
|
|
142
|
-
- monorepo ではパッケージ単位に `qfai.config.yaml` を置くか、`--root` で明示します。
|
|
143
|
-
- `paths.outDir` はパッケージごとに分け、`report/` の衝突を避けてください。
|
|
223
|
+
(GitHub Actions)
|
|
144
224
|
|
|
145
|
-
|
|
225
|
+
`npx qfai init` generates `.github/workflows/qfai.yml` which runs `npx qfai validate --fail-on error` on pull requests and on pushes to `main`, and uploads `.qfai/report/validate.json` as an artifact.
|
|
146
226
|
|
|
147
|
-
|
|
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>
|
|
150
|
-
```
|
|
227
|
+
What works out-of-the-box.
|
|
151
228
|
|
|
152
|
-
|
|
229
|
+
- The generated workflow runs without installing repository dependencies; it only executes `npx qfai validate --fail-on error`, so it works even if your repo is not a Node project.
|
|
230
|
+
- The default workflow does not enable `actions/setup-node` caching, so it does not require a lockfile.
|
|
231
|
+
- If you want to pin the QFAI version, install your repo dependencies (e.g., to run tests), or enable dependency caching, customize the workflow accordingly.
|
|
232
|
+
- The default validate gate fails only on `error`; use `--fail-on warning` or `--strict` if you want a stricter gate.
|
|
153
233
|
|
|
154
|
-
|
|
155
|
-
- 「Hard Gate」= `--fail-on error` で CI を停止する領域
|
|
156
|
-
- Spec→下流参照禁止は Hard Gate にしない(検出する場合でも warning に留める)
|
|
234
|
+
Optional cache example (requires a lockfile):
|
|
157
235
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- `validation.traceability.testFileExcludeGlobs`: 追加の除外 glob(配列、任意)
|
|
166
|
-
- `validation.traceability.scMustHaveTest`: SC→Test 検証の有効/無効を制御(`true` で有効、`false` で無効)
|
|
167
|
-
- `validation.traceability.scNoTestSeverity`: SC 未参照時の重要度を指定(`error` / `warning`)
|
|
236
|
+
```yaml
|
|
237
|
+
- uses: actions/setup-node@v4
|
|
238
|
+
with:
|
|
239
|
+
node-version: 20
|
|
240
|
+
cache: npm
|
|
241
|
+
# cache-dependency-path: package-lock.json
|
|
242
|
+
```
|
|
168
243
|
|
|
169
|
-
|
|
244
|
+
Typical customizations.
|
|
170
245
|
|
|
171
|
-
|
|
246
|
+
- Add a second job to generate `report.md` from the uploaded `validate.json`.
|
|
247
|
+
- Add a `doctor` step before validate if you want to fail fast on path/glob/config issues.
|
|
248
|
+
- Tune traceability globs in `qfai.config.yaml` to match your test layout.
|
|
172
249
|
|
|
173
|
-
|
|
174
|
-
各 Actions のバージョンは運用方針に合わせて指定してください。
|
|
250
|
+
## Generated structure
|
|
175
251
|
|
|
176
|
-
|
|
252
|
+
`npx qfai init` generates the following structure in your repository.
|
|
177
253
|
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
254
|
+
```text
|
|
255
|
+
.
|
|
256
|
+
├── .claude
|
|
257
|
+
│ └── commands
|
|
258
|
+
│ ├── qfai-configure.md
|
|
259
|
+
│ ├── qfai-discuss.md
|
|
260
|
+
│ ├── qfai-implement.md
|
|
261
|
+
│ ├── qfai-require.md
|
|
262
|
+
│ ├── qfai-scenario-test.md
|
|
263
|
+
│ ├── qfai-spec.md
|
|
264
|
+
│ ├── qfai-unit-test.md
|
|
265
|
+
│ └── qfai-verify.md
|
|
266
|
+
├── .codex
|
|
267
|
+
│ └── skills
|
|
268
|
+
│ ├── qfai-configure
|
|
269
|
+
│ │ └── SKILL.md
|
|
270
|
+
│ ├── qfai-discuss
|
|
271
|
+
│ │ └── SKILL.md
|
|
272
|
+
│ ├── qfai-implement
|
|
273
|
+
│ │ └── SKILL.md
|
|
274
|
+
│ ├── qfai-require
|
|
275
|
+
│ │ └── SKILL.md
|
|
276
|
+
│ ├── qfai-scenario-test
|
|
277
|
+
│ │ └── SKILL.md
|
|
278
|
+
│ ├── qfai-spec
|
|
279
|
+
│ │ └── SKILL.md
|
|
280
|
+
│ ├── qfai-unit-test
|
|
281
|
+
│ │ └── SKILL.md
|
|
282
|
+
│ └── qfai-verify
|
|
283
|
+
│ └── SKILL.md
|
|
284
|
+
├── .github
|
|
285
|
+
│ ├── prompts
|
|
286
|
+
│ │ ├── qfai-configure.prompt.md
|
|
287
|
+
│ │ ├── qfai-discuss.prompt.md
|
|
288
|
+
│ │ ├── qfai-implement.prompt.md
|
|
289
|
+
│ │ ├── qfai-require.prompt.md
|
|
290
|
+
│ │ ├── qfai-scenario-test.prompt.md
|
|
291
|
+
│ │ ├── qfai-spec.prompt.md
|
|
292
|
+
│ │ ├── qfai-unit-test.prompt.md
|
|
293
|
+
│ │ └── qfai-verify.prompt.md
|
|
294
|
+
│ ├── workflows
|
|
295
|
+
│ │ └── qfai.yml
|
|
296
|
+
│ └── copilot-instructions.md
|
|
297
|
+
├── .qfai
|
|
298
|
+
│ ├── assistant
|
|
299
|
+
│ │ ├── agents
|
|
300
|
+
│ │ │ ├── README.md
|
|
301
|
+
│ │ │ ├── architect.md
|
|
302
|
+
│ │ │ ├── backend-engineer.md
|
|
303
|
+
│ │ │ ├── code-reviewer.md
|
|
304
|
+
│ │ │ ├── contract-designer.md
|
|
305
|
+
│ │ │ ├── devops-ci-engineer.md
|
|
306
|
+
│ │ │ ├── facilitator.md
|
|
307
|
+
│ │ │ ├── frontend-engineer.md
|
|
308
|
+
│ │ │ ├── interviewer.md
|
|
309
|
+
│ │ │ ├── planner.md
|
|
310
|
+
│ │ │ ├── qa-engineer.md
|
|
311
|
+
│ │ │ ├── requirements-analyst.md
|
|
312
|
+
│ │ │ └── test-engineer.md
|
|
313
|
+
│ │ ├── instructions
|
|
314
|
+
│ │ │ ├── README.md
|
|
315
|
+
│ │ │ ├── agent-selection.md
|
|
316
|
+
│ │ │ ├── communication.md
|
|
317
|
+
│ │ │ ├── constitution.md
|
|
318
|
+
│ │ │ ├── quality.md
|
|
319
|
+
│ │ │ ├── thinking.md
|
|
320
|
+
│ │ │ └── workflow.md
|
|
321
|
+
│ │ ├── prompts
|
|
322
|
+
│ │ │ ├── README.md
|
|
323
|
+
│ │ │ ├── qfai-configure.md
|
|
324
|
+
│ │ │ ├── qfai-discuss.md
|
|
325
|
+
│ │ │ ├── qfai-implement.md
|
|
326
|
+
│ │ │ ├── qfai-require.md
|
|
327
|
+
│ │ │ ├── qfai-scenario-test.md
|
|
328
|
+
│ │ │ ├── qfai-spec.md
|
|
329
|
+
│ │ │ ├── qfai-unit-test.md
|
|
330
|
+
│ │ │ └── qfai-verify.md
|
|
331
|
+
│ │ ├── prompts.local
|
|
332
|
+
│ │ │ └── README.md
|
|
333
|
+
│ │ ├── steering
|
|
334
|
+
│ │ │ ├── README.md
|
|
335
|
+
│ │ │ ├── product.md
|
|
336
|
+
│ │ │ ├── structure.md
|
|
337
|
+
│ │ │ ├── manifest.md
|
|
338
|
+
│ │ │ └── tech.md
|
|
339
|
+
│ │ └── README.md
|
|
340
|
+
│ ├── contracts
|
|
341
|
+
│ │ ├── api
|
|
342
|
+
│ │ │ └── README.md
|
|
343
|
+
│ │ ├── db
|
|
344
|
+
│ │ │ └── README.md
|
|
345
|
+
│ │ ├── ui
|
|
346
|
+
│ │ │ └── README.md
|
|
347
|
+
│ │ └── README.md
|
|
348
|
+
│ ├── report
|
|
349
|
+
│ │ └── README.md
|
|
350
|
+
│ ├── require
|
|
351
|
+
│ │ ├── README.md
|
|
352
|
+
│ │ └── require.md
|
|
353
|
+
│ ├── specs
|
|
354
|
+
│ │ └── README.md
|
|
355
|
+
│ ├── samples
|
|
356
|
+
│ │ ├── guardrails
|
|
357
|
+
│ │ │ └── delta_with_guardrails.md
|
|
358
|
+
│ └── README.md
|
|
359
|
+
└── qfai.config.yaml
|
|
199
360
|
```
|
|
200
361
|
|
|
201
|
-
|
|
202
|
-
[schema](https://github.com/aganesy/QFAI/tree/main/docs/schema) /
|
|
203
|
-
[examples](https://github.com/aganesy/QFAI/tree/main/docs/examples) を参照してください。
|
|
362
|
+
## Agent integrations (Copilot / Claude Code / Codex)
|
|
204
363
|
|
|
205
|
-
|
|
364
|
+
`npx qfai init` also installs lightweight integration stubs so your AI coding agent can invoke QFAI custom prompts directly.
|
|
206
365
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
.
|
|
210
|
-
|
|
211
|
-
report/
|
|
212
|
-
README.md
|
|
213
|
-
require/
|
|
214
|
-
README.md
|
|
215
|
-
require.md
|
|
216
|
-
specs/
|
|
217
|
-
README.md
|
|
218
|
-
spec-0001/
|
|
219
|
-
spec.md
|
|
220
|
-
delta.md
|
|
221
|
-
scenario.feature
|
|
222
|
-
contracts/
|
|
223
|
-
README.md
|
|
224
|
-
api/
|
|
225
|
-
api-0001-sample.yaml
|
|
226
|
-
ui/
|
|
227
|
-
ui-0001-sample.yaml
|
|
228
|
-
thema-001-facebook-like.yml
|
|
229
|
-
assets/
|
|
230
|
-
ui-0001-sample/
|
|
231
|
-
assets.yaml
|
|
232
|
-
snapshots/login__desktop__light__default.png
|
|
233
|
-
thema-001-facebook-like/
|
|
234
|
-
assets.yaml
|
|
235
|
-
palette.png
|
|
236
|
-
db/
|
|
237
|
-
db-0001-sample.sql
|
|
238
|
-
assistant/
|
|
239
|
-
README.md
|
|
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
|
|
279
|
-
.github/
|
|
280
|
-
workflows/
|
|
281
|
-
qfai.yml
|
|
282
|
-
```
|
|
366
|
+
- **GitHub Copilot prompt files**: `.github/prompts/*.prompt.md` (invoke from Copilot Chat as `/qfai-...`).
|
|
367
|
+
- **GitHub Copilot repository instructions**: `.github/copilot-instructions.md` (baseline behavior guidance for Copilot in this repo).
|
|
368
|
+
- **Claude Code slash commands**: `.claude/commands/*.md` (invoke as `/qfai-...`).
|
|
369
|
+
- **OpenAI Codex skills**: `.codex/skills/*/SKILL.md` (invoke as Codex skills; each skill points to the canonical QFAI prompt).
|
|
283
370
|
|
|
284
|
-
|
|
371
|
+
Each of these files is intentionally thin and forwards to the canonical source of truth under `.qfai/assistant/prompts/`.
|
|
285
372
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
pnpm format:check
|
|
290
|
-
pnpm lint
|
|
291
|
-
pnpm check-types
|
|
292
|
-
pnpm test:assets
|
|
293
|
-
```
|
|
373
|
+
## Contributing (for QFAI maintainers)
|
|
374
|
+
|
|
375
|
+
This repository is a monorepo, and the distributable package is under `packages/qfai`; if you change documentation, keep the repository root README and the package README aligned (the CI enforces this).
|
|
294
376
|
|
|
295
|
-
##
|
|
377
|
+
## License
|
|
296
378
|
|
|
297
|
-
|
|
379
|
+
MIT
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# .qfai (QFAI Workspace)
|
|
2
2
|
|
|
3
3
|
Generated by: `qfai init`
|
|
4
|
-
Template version: 1.0
|
|
4
|
+
Template version: 1.1.0
|
|
5
|
+
This kit is generated by the installed QFAI version. See the QFAI changelog for release details.
|
|
5
6
|
|
|
6
7
|
This directory is the workspace for **QFAI (Quality‑First AI)**.
|
|
7
8
|
QFAI standardizes engineering work around a fixed workflow:
|
|
@@ -6,4 +6,4 @@ This folder contains AI assistance assets.
|
|
|
6
6
|
- `prompts.local/` : optional per-project overrides (not required)
|
|
7
7
|
- `agents/` : subagent definitions (general job roles)
|
|
8
8
|
- `instructions/` : constitutions/workflow policies for the AI
|
|
9
|
-
- `steering/` : project context (product/tech/structure) used before work begins
|
|
9
|
+
- `steering/` : project context (product/tech/structure/manifest) used before work begins
|
|
@@ -10,10 +10,10 @@ Rule:
|
|
|
10
10
|
Files:
|
|
11
11
|
|
|
12
12
|
- qfai-discuss.md (optional)
|
|
13
|
+
- qfai-configure.md (run after init; updates steering + qfai.config.yaml testFileGlobs; outputs updated YAML + validation checklist)
|
|
13
14
|
- qfai-require.md
|
|
14
15
|
- qfai-spec.md
|
|
15
16
|
- qfai-scenario-test.md
|
|
16
17
|
- qfai-unit-test.md
|
|
17
18
|
- qfai-implement.md
|
|
18
19
|
- qfai-verify.md
|
|
19
|
-
- qfai-pr.md (optional)
|