qfai 1.1.1 → 1.1.2

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
@@ -61,6 +61,7 @@ QFAI includes a small set of custom prompts (stored under `.qfai/assistant/promp
61
61
  - **qfai-discuss**: Turn an idea into clear requirements by discussing scope, constraints, risks, and open questions.
62
62
  - **qfai-require**: Produce `.qfai/require/require.md` from your idea or discussion output.
63
63
  - **qfai-spec**: Produce `.qfai/specs/*` and `.qfai/contracts/*` from the requirements, including traceability scaffolding.
64
+ - Includes a preflight step that bootstraps missing `qfai.config.yaml` and `assistant/steering/*` when run directly after init.
64
65
  - **qfai-scenario-test**: Implement acceptance tests (ATDD) driven by specs/scenarios.
65
66
  - **qfai-unit-test**: Implement unit tests (TDD) driven by specs/scenarios.
66
67
  - **qfai-implement**: Implement the feature; iterate test→fix until all quality gates are green.
@@ -97,6 +98,7 @@ AG->>R: Create/Update requirements docs
97
98
  AG-->>U: Requirements ready
98
99
 
99
100
  U->>AG: Run /qfai-spec
101
+ Note over U,AG: /qfai-spec performs a preflight to converge config/steering when /qfai-configure is skipped.
100
102
  AG->>Q: Read .qfai/assistant/prompts/qfai-spec.md
101
103
  AG->>R: Create specs + contracts + scenario.feature
102
104
  AG-->>U: SDD artifacts ready
@@ -22,6 +22,9 @@ mode: evidence-focused
22
22
 
23
23
  Analyze the repository and update `qfai.config.yaml` so QFAI traceability checks (especially SC->Test) are actionable without manual tuning, and optionally tune required spec sections if requested.
24
24
 
25
+ Note: /qfai-spec includes a preflight step that bootstraps missing config/steering when run directly after init.
26
+ /qfai-configure remains the recommended way to tune `qfai.config.yaml` early with a clean, minimal diff.
27
+
25
28
  ## Success Criteria (Definition of Done)
26
29
 
27
30
  - `qfai.config.yaml` is updated with a **minimal diff** focused on traceability globs.
@@ -133,28 +133,61 @@ Before producing any deliverable, **thoroughly analyze the current project** so
133
133
 
134
134
  If analysis cannot be performed (missing access), clearly state what could not be verified and proceed with minimal-risk assumptions.
135
135
 
136
- ## Step 0.5Steering Bootstrap / Refresh (mandatory when incomplete)
136
+ ## Step 0.4Preflight: Config + Steering convergence (mandatory)
137
137
 
138
- QFAI expects `assistant/steering/` to contain **project‑specific facts** so all subsequent design/test/implementation fits this repository.
138
+ QFAI prompt operations are flexible. In some workflows, the user may run **/qfai-spec directly after init** without running /qfai-configure.
139
+ Therefore, /qfai-spec MUST converge the workspace into a usable state before writing spec packs.
139
140
 
140
- ### What to do
141
+ ### Preflight goals
141
142
 
142
- 1. Open these files:
143
+ - Ensure `qfai.config.yaml` exists and is schema-valid.
144
+ - Ensure `validation.traceability.testFileGlobs` is not empty and not obviously zero-match.
145
+ - Ensure `assistant/steering/*` is populated to a usable level.
143
146
 
144
- - `.qfai/assistant/steering/product.md`
145
- - `.qfai/assistant/steering/tech.md`
146
- - `.qfai/assistant/steering/structure.md`
147
+ ### Steering completion levels (definition)
147
148
 
148
- 2. If they are missing, mostly empty, or still have placeholders (e.g., `- ` only), **populate them by analyzing the current repository**:
149
+ - L0: files exist
150
+ - L1: format skeleton is present (headings / minimum sections)
151
+ - L2: evidence-based repo facts are filled
152
+ - L3: human-judgment areas are marked as TBD/OQ and impact is reflected in spec outputs
153
+ - L4: human-judgment areas are confirmed
149
154
 
150
- - derive “what/why/users/success/non-goals” from README/docs/issues (product.md)
151
- - derive runtime/tooling versions + constraints from package.json, CI config, lockfiles (tech.md)
152
- - derive repo layout + key directories + gate commands from the file tree and scripts (structure.md)
155
+ Target for /qfai-spec preflight: **L2-L3**.
153
156
 
154
- 3. Do **not** invent facts. If something cannot be verified, write it as:
157
+ ### 0.4-A Ensure qfai.config.yaml
155
158
 
156
- - `TBD` + what evidence is missing, or
157
- - an Open Question (if it blocks correctness)
159
+ 1. If `qfai.config.yaml` does not exist:
160
+
161
+ - Create a schema-valid minimal config.
162
+ - Derive reasonable `validation.traceability.testFileGlobs` from repo evidence (package.json, test configs, file tree).
163
+
164
+ 2. If it exists:
165
+
166
+ - Validate the structure (do not invent keys).
167
+ - If clearly broken (missing required keys / invalid YAML), do a minimal repair OR record an Open Question and proceed with the safest assumptions.
168
+
169
+ ### 0.4-B Converge traceability globs
170
+
171
+ - If `validation.traceability.testFileGlobs` is empty OR it matches 0 test files:
172
+ - Run a lightweight "configure" procedure:
173
+ - inspect test runner config and conventions
174
+ - propose 3-10 include globs
175
+ - add exclude globs only when needed
176
+ - update `qfai.config.yaml` with a minimal diff
177
+
178
+ - Evidence requirement:
179
+ - Always sample 5-15 matched test files and include them in the output.
180
+
181
+ ### 0.4-C Steering bootstrap/refresh
182
+
183
+ - Open these files:
184
+ - `.qfai/assistant/steering/product.md`
185
+ - `.qfai/assistant/steering/tech.md`
186
+ - `.qfai/assistant/steering/structure.md`
187
+
188
+ - If missing/empty/placeholder:
189
+ - Fill the evidence-based parts from repo docs and configs.
190
+ - Never invent facts. Use `TBD` + missing evidence, or Open Questions.
158
191
 
159
192
  ### Steering refresh checklist
160
193
 
@@ -162,6 +195,16 @@ QFAI expects `assistant/steering/` to contain **project‑specific facts** so al
162
195
  - [ ] tech.md: Node / package manager / TS / test / lint / CI constraints
163
196
  - [ ] structure.md: repo layout, key packages, entrypoints, standard gate commands, how to run locally
164
197
 
198
+ ### Preflight output contract
199
+
200
+ Your final response MUST include:
201
+
202
+ - Whether preflight changed any files (and which ones)
203
+ - Why changes were needed
204
+ - Evidence samples (matched test files, referenced repo docs)
205
+ - Remaining TBD / Open Questions (blocking vs non-blocking)
206
+ - A short "Preflight summary" (max 10 lines), followed by details
207
+
165
208
  ## Step 1 — Determine spec pack identity
166
209
 
167
210
  If the user does not provide an ID:
@@ -1067,8 +1067,8 @@ var import_promises7 = require("fs/promises");
1067
1067
  var import_node_path9 = __toESM(require("path"), 1);
1068
1068
  var import_node_url2 = require("url");
1069
1069
  async function resolveToolVersion() {
1070
- if ("1.1.1".length > 0) {
1071
- return "1.1.1";
1070
+ if ("1.1.2".length > 0) {
1071
+ return "1.1.2";
1072
1072
  }
1073
1073
  try {
1074
1074
  const packagePath = resolvePackageJsonPath();
@@ -1048,8 +1048,8 @@ import { readFile as readFile4 } from "fs/promises";
1048
1048
  import path9 from "path";
1049
1049
  import { fileURLToPath as fileURLToPath2 } from "url";
1050
1050
  async function resolveToolVersion() {
1051
- if ("1.1.1".length > 0) {
1052
- return "1.1.1";
1051
+ if ("1.1.2".length > 0) {
1052
+ return "1.1.2";
1053
1053
  }
1054
1054
  try {
1055
1055
  const packagePath = resolvePackageJsonPath();
package/dist/index.cjs CHANGED
@@ -1699,8 +1699,8 @@ var import_promises8 = require("fs/promises");
1699
1699
  var import_node_path9 = __toESM(require("path"), 1);
1700
1700
  var import_node_url = require("url");
1701
1701
  async function resolveToolVersion() {
1702
- if ("1.1.1".length > 0) {
1703
- return "1.1.1";
1702
+ if ("1.1.2".length > 0) {
1703
+ return "1.1.2";
1704
1704
  }
1705
1705
  try {
1706
1706
  const packagePath = resolvePackageJsonPath();
package/dist/index.mjs CHANGED
@@ -1639,8 +1639,8 @@ import { readFile as readFile5 } from "fs/promises";
1639
1639
  import path9 from "path";
1640
1640
  import { fileURLToPath } from "url";
1641
1641
  async function resolveToolVersion() {
1642
- if ("1.1.1".length > 0) {
1643
- return "1.1.1";
1642
+ if ("1.1.2".length > 0) {
1643
+ return "1.1.2";
1644
1644
  }
1645
1645
  try {
1646
1646
  const packagePath = resolvePackageJsonPath();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qfai",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Quality-first AI-driven development toolkit (SDD × ATDD × TDD).",
5
5
  "license": "MIT",
6
6
  "repository": {