qfai 1.9.1 → 1.9.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/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +21 -0
- package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +21 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +22 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +4 -1
- package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +21 -0
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +21 -0
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +46 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +21 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-contract-guide.md +61 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/ui-contract.sample.yaml +6 -1
- package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +21 -0
- package/dist/cli/index.cjs +27975 -24157
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +17579 -13764
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +2163 -644
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.mjs +2149 -624
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -374,6 +374,27 @@ When this skill is complete, provide a final user-facing completion message and
|
|
|
374
374
|
- Acceptance tests need fixes: rerun `/qfai-atdd`.
|
|
375
375
|
Action: close uncovered `US` / `TC` / `CON-API` obligations and rerun validation.
|
|
376
376
|
|
|
377
|
+
## Default Autopilot Policy
|
|
378
|
+
|
|
379
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
380
|
+
|
|
381
|
+
- auto-decide:
|
|
382
|
+
- output formatting
|
|
383
|
+
- ID / sequence numbering
|
|
384
|
+
- append-vs-create on subject overlap
|
|
385
|
+
- equivalent-option pick
|
|
386
|
+
- ask-user:
|
|
387
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
388
|
+
- destructive operations (rm / overwrite / force-push)
|
|
389
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
390
|
+
- scope expansions outside the active envelope
|
|
391
|
+
- hard-required:
|
|
392
|
+
- `companyName`
|
|
393
|
+
- brand intent
|
|
394
|
+
- `primarySpecId` (when absent from inputs)
|
|
395
|
+
|
|
396
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
397
|
+
|
|
377
398
|
project_memory:
|
|
378
399
|
|
|
379
400
|
- Coverage obligations stay layer-pinned: tests/e2e/** must cover all required US; tests/integration/** all required TC; tests/api/\*\* all required CON-API.
|
|
@@ -444,6 +444,27 @@ When this skill is complete, provide a final user-facing completion message and
|
|
|
444
444
|
- Configuration needs refinement: rerun `/qfai-configure`.
|
|
445
445
|
Action: provide additional include/exclude evidence and update `qfai.config.yaml`.
|
|
446
446
|
|
|
447
|
+
## Default Autopilot Policy
|
|
448
|
+
|
|
449
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
450
|
+
|
|
451
|
+
- auto-decide:
|
|
452
|
+
- output formatting
|
|
453
|
+
- ID / sequence numbering
|
|
454
|
+
- append-vs-create on subject overlap
|
|
455
|
+
- equivalent-option pick
|
|
456
|
+
- ask-user:
|
|
457
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
458
|
+
- destructive operations (rm / overwrite / force-push)
|
|
459
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
460
|
+
- scope expansions outside the active envelope
|
|
461
|
+
- hard-required:
|
|
462
|
+
- `companyName`
|
|
463
|
+
- brand intent
|
|
464
|
+
- `primarySpecId` (when absent from inputs)
|
|
465
|
+
|
|
466
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
467
|
+
|
|
447
468
|
project_memory:
|
|
448
469
|
|
|
449
470
|
- qfai-configure is the user-facing entrypoint for editing `qfai.config.yaml` and the `.qfai/assistant/manifest/` declarative manifests; edits to those files MUST go through this skill so the agent-catalog / agent-routing / review-profiles SSOTs stay consistent.
|
|
@@ -36,6 +36,7 @@ Produce a unified 15-file discussion pack plus exploration-first UI sidecars so
|
|
|
36
36
|
- UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
|
|
37
37
|
- Completion requires `Disposition: open` count to be zero in `11_OQ-Register.md`.
|
|
38
38
|
- If UI requirements exist, behavior obligations are primary and HTML+CSS mock is optional fallback only.
|
|
39
|
+
- When an HTML+CSS mock includes links, author them in anchor-form (`<a href="#name">`); external `http(s)://` links are also allowed. Do NOT use same-origin absolute paths (`/orders/`) — a static mock cannot serve them and the validator rejects them (QFAI-MOCK-010).
|
|
39
40
|
- Discussion is planner-first: do not select a single visual winner and do not finalize the design system here.
|
|
40
41
|
- Use artifact files, not conversational summaries, as the downstream handoff.
|
|
41
42
|
|
|
@@ -121,6 +122,27 @@ You MUST end the user-facing output with a handoff sentence to `/qfai-sdd` in th
|
|
|
121
122
|
- Japanese output (use this exact sentence):
|
|
122
123
|
ディスカッションが完了しました。他に要望などがあればご提示ください。問題なければ『/qfai-sdd』と入力してください。
|
|
123
124
|
|
|
125
|
+
## Default Autopilot Policy
|
|
126
|
+
|
|
127
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
128
|
+
|
|
129
|
+
- auto-decide:
|
|
130
|
+
- output formatting
|
|
131
|
+
- ID / sequence numbering
|
|
132
|
+
- append-vs-create on subject overlap
|
|
133
|
+
- equivalent-option pick
|
|
134
|
+
- ask-user:
|
|
135
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
136
|
+
- destructive operations (rm / overwrite / force-push)
|
|
137
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
138
|
+
- scope expansions outside the active envelope
|
|
139
|
+
- hard-required:
|
|
140
|
+
- `companyName`
|
|
141
|
+
- brand intent
|
|
142
|
+
- `primarySpecId` (when absent from inputs)
|
|
143
|
+
|
|
144
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
145
|
+
|
|
124
146
|
project_memory:
|
|
125
147
|
|
|
126
148
|
- 15-file mandatory output set is fixed; the UI-bearing sidecar family (40_screen_contracts.md + 50_review_input_bundle.md + root DESIGN.md) is required only when the target is UI-bearing.
|
|
@@ -75,12 +75,15 @@ Screen-level contract details are finalized in `uiux/40_screen_contracts.md`. Pr
|
|
|
75
75
|
<!-- Optional fallback only — do not use as the primary UI definition artifact.
|
|
76
76
|
Include only when it materially clarifies the selected anchor.
|
|
77
77
|
Behavior Obligations and sidecar artifacts (uiux/) are the primary UI definitions.
|
|
78
|
-
The required state SSOT is uiux/40_screen_contracts.md (`default/loading/empty/error`).
|
|
78
|
+
The required state SSOT is uiux/40_screen_contracts.md (`default/loading/empty/error`).
|
|
79
|
+
Links MUST be anchor-form (`<a href="#name">`) — never same-origin absolute
|
|
80
|
+
paths (`/orders/`), which a static mock cannot serve and which the validator rejects. -->
|
|
79
81
|
|
|
80
82
|
```html
|
|
81
83
|
<section class="screen-mock">
|
|
82
84
|
<h1>Screen Title</h1>
|
|
83
85
|
<p>Primary information shown to the user.</p>
|
|
86
|
+
<a href="#orders">View Orders</a>
|
|
84
87
|
<button type="button">Primary Action</button>
|
|
85
88
|
</section>
|
|
86
89
|
```
|
|
@@ -349,6 +349,27 @@ When this skill is complete, provide a final user-facing completion message and
|
|
|
349
349
|
- Acceptance tests: `/qfai-atdd`.
|
|
350
350
|
Action: ensure acceptance test coverage aligns with implementation.
|
|
351
351
|
|
|
352
|
+
## Default Autopilot Policy
|
|
353
|
+
|
|
354
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
355
|
+
|
|
356
|
+
- auto-decide:
|
|
357
|
+
- output formatting
|
|
358
|
+
- ID / sequence numbering
|
|
359
|
+
- append-vs-create on subject overlap
|
|
360
|
+
- equivalent-option pick
|
|
361
|
+
- ask-user:
|
|
362
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
363
|
+
- destructive operations (rm / overwrite / force-push)
|
|
364
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
365
|
+
- scope expansions outside the active envelope
|
|
366
|
+
- hard-required:
|
|
367
|
+
- `companyName`
|
|
368
|
+
- brand intent
|
|
369
|
+
- `primarySpecId` (when absent from inputs)
|
|
370
|
+
|
|
371
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
372
|
+
|
|
352
373
|
project_memory:
|
|
353
374
|
|
|
354
375
|
- One TDD item at a time from test-list.md; status lifecycle is forward-only (todo → red → green → refactor → done); exception requires DR-ID.
|
|
@@ -201,6 +201,27 @@ Follow `.qfai/assistant/constitution/shared-skill-operating-baseline.md#gate-fai
|
|
|
201
201
|
|
|
202
202
|
- `/qfai-atdd` / `/qfai-implement` / `/qfai-verify`
|
|
203
203
|
|
|
204
|
+
## Default Autopilot Policy
|
|
205
|
+
|
|
206
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
207
|
+
|
|
208
|
+
- auto-decide:
|
|
209
|
+
- output formatting
|
|
210
|
+
- ID / sequence numbering
|
|
211
|
+
- append-vs-create on subject overlap
|
|
212
|
+
- equivalent-option pick
|
|
213
|
+
- ask-user:
|
|
214
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
215
|
+
- destructive operations (rm / overwrite / force-push)
|
|
216
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
217
|
+
- scope expansions outside the active envelope
|
|
218
|
+
- hard-required:
|
|
219
|
+
- `companyName`
|
|
220
|
+
- brand intent
|
|
221
|
+
- `primarySpecId` (when absent from inputs)
|
|
222
|
+
|
|
223
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
224
|
+
|
|
204
225
|
project_memory:
|
|
205
226
|
|
|
206
227
|
- Iteration count cap is 10; --cycle is 0-indexed; reaching cycle 9 on a non-converged iteration set exits 65 directly (no cycle-mismatch path).
|
package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Evidence Requirements: `taskFidelity` section
|
|
2
|
+
|
|
3
|
+
Prototyping evidence files MUST include a `taskFidelity` section so the
|
|
4
|
+
`QFAI-CRIT-009` gate passes. Below is the required keyword set and
|
|
5
|
+
the canonical markdown shape consumed by the validator and the
|
|
6
|
+
`qfai prototyping iterate --capture` template emitter.
|
|
7
|
+
|
|
8
|
+
## Required keywords
|
|
9
|
+
|
|
10
|
+
Every evidence file that records a critique iteration MUST surface
|
|
11
|
+
these `taskFidelity` keys with concrete values:
|
|
12
|
+
|
|
13
|
+
- `cta_visibility` — does the primary call-to-action stay on-screen and
|
|
14
|
+
visually distinct at both desktop (>= 1024px) and mobile (<= 480px)
|
|
15
|
+
viewports?
|
|
16
|
+
- `four_state_check` — has the interactive flow been checked in all
|
|
17
|
+
four reachable states (default / hover / focused / disabled), with a
|
|
18
|
+
pass/fail observation per state?
|
|
19
|
+
|
|
20
|
+
The SSOT for this list lives at
|
|
21
|
+
`packages/qfai/src/core/validators/taskFidelityKeywords.ts`
|
|
22
|
+
(`TASK_FIDELITY_REQUIRED_KEYWORDS`). The validator (`QFAI-CRIT-009`),
|
|
23
|
+
the `--capture` template emitter, and this document all read from
|
|
24
|
+
that constant so the keyword set cannot silently drift between the
|
|
25
|
+
three surfaces.
|
|
26
|
+
|
|
27
|
+
## Canonical markdown structure
|
|
28
|
+
|
|
29
|
+
The validator detects the section via the literal heading
|
|
30
|
+
`## taskFidelity`. The minimal accepted shape is:
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
## taskFidelity
|
|
34
|
+
|
|
35
|
+
- step_count: 3
|
|
36
|
+
- max_primary_steps: 5
|
|
37
|
+
- cta_visibility: PASS — primary CTA stays anchored at the viewport bottom on
|
|
38
|
+
desktop (1440px) and remains tappable on mobile (375px).
|
|
39
|
+
- four_state_check: PASS — default / hover / focused / disabled states each
|
|
40
|
+
render the expected variant; disabled is non-interactive.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Authors may add free-form prose between the bullets so long as each
|
|
44
|
+
required keyword appears at least once. The `--capture` template emits
|
|
45
|
+
a stub with TODO placeholders for every required keyword so the
|
|
46
|
+
operator never silently forgets one.
|
|
@@ -272,6 +272,27 @@ When this skill completes, provide a final user-facing message enumerating next
|
|
|
272
272
|
- Spec pack needs correction: rerun `/qfai-sdd` and regenerate evidence.
|
|
273
273
|
- Confirm contracts referenced by `_policies/05_Contracts.md` exist under `.qfai/contracts/**`.
|
|
274
274
|
|
|
275
|
+
## Default Autopilot Policy
|
|
276
|
+
|
|
277
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
278
|
+
|
|
279
|
+
- auto-decide:
|
|
280
|
+
- output formatting
|
|
281
|
+
- ID / sequence numbering
|
|
282
|
+
- append-vs-create on subject overlap
|
|
283
|
+
- equivalent-option pick
|
|
284
|
+
- ask-user:
|
|
285
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
286
|
+
- destructive operations (rm / overwrite / force-push)
|
|
287
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
288
|
+
- scope expansions outside the active envelope
|
|
289
|
+
- hard-required:
|
|
290
|
+
- `companyName`
|
|
291
|
+
- brand intent
|
|
292
|
+
- `primarySpecId` (when absent from inputs)
|
|
293
|
+
|
|
294
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
295
|
+
|
|
275
296
|
project_memory:
|
|
276
297
|
|
|
277
298
|
- Phase order is fixed: Stage 0 Preflight → Stage 1 Triage → Phase 0 Contracts-first → Phase 1 Outline → Phase 2 Slice → Phase 3 Plan finalize → Phase 4 Delta update; do not reorder.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# UI Contract Authoring Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to author a UI contract YAML under
|
|
4
|
+
`.qfai/contracts/ui/` so it satisfies the QFAI validate lanes
|
|
5
|
+
(`QFAI-AUD-001` empty-slot, `QFAI-AUD-020` recommended count band) and
|
|
6
|
+
the downstream `/qfai-prototyping` preflight gates.
|
|
7
|
+
|
|
8
|
+
## `screens[].primary_tasks` shape
|
|
9
|
+
|
|
10
|
+
Each entry in `screens[]` MUST carry a `primary_tasks:` slot. Each
|
|
11
|
+
slot entry may be authored in one of two shapes:
|
|
12
|
+
|
|
13
|
+
1. **String-only (legacy)** — a plain bullet such as
|
|
14
|
+
`- Review pending orders`. Accepted during the deprecation window
|
|
15
|
+
for backwards compatibility with contracts authored before the
|
|
16
|
+
structured shape was introduced.
|
|
17
|
+
|
|
18
|
+
2. **Structured (closed schema)** — a mapping with exactly three
|
|
19
|
+
required keys, no additional keys allowed:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
- id: t1
|
|
23
|
+
label: Mark order shipped
|
|
24
|
+
acceptance: order status flips to shipped
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `id` — short stable handle for the task (used by ATDD scaffolds).
|
|
28
|
+
- `label` — human-readable task name.
|
|
29
|
+
- `acceptance` — testable acceptance condition; anchors downstream
|
|
30
|
+
TODO assertions in ATDD scaffolding.
|
|
31
|
+
|
|
32
|
+
A structured entry missing any of `id` / `label` / `acceptance`, or
|
|
33
|
+
carrying any extra key (e.g. `priority`, `owner`), is rejected at
|
|
34
|
+
validate time. The schema is intentionally closed (no
|
|
35
|
+
`additionalProperties: true`) — see the related design decision in
|
|
36
|
+
`_policies/08_Decisions.md` for rationale.
|
|
37
|
+
|
|
38
|
+
## Recommended count band: 3..7
|
|
39
|
+
|
|
40
|
+
The recommended count band for `screens[].primary_tasks` is **3..7
|
|
41
|
+
entries per screen** (inclusive bounds). Outside the band, validate
|
|
42
|
+
emits `QFAI-AUD-020` at severity=warning, naming the band 3..7
|
|
43
|
+
explicitly:
|
|
44
|
+
|
|
45
|
+
| count | validate behavior |
|
|
46
|
+
| ----- | ------------------------------------------ |
|
|
47
|
+
| 0 | `QFAI-AUD-001` error (empty primary_tasks) |
|
|
48
|
+
| 1..2 | `QFAI-AUD-020` warning (below 3..7 band) |
|
|
49
|
+
| 3..7 | passes silently |
|
|
50
|
+
| 8+ | `QFAI-AUD-020` warning (above 3..7 band) |
|
|
51
|
+
|
|
52
|
+
The 3..7 band reflects multi-screen SaaS / dashboard workloads where
|
|
53
|
+
5–6 primary tasks per surface is common; tighter ceilings (e.g. 1..3
|
|
54
|
+
or "single primary CTA") over-flag legitimate productivity surfaces.
|
|
55
|
+
|
|
56
|
+
## Template
|
|
57
|
+
|
|
58
|
+
The shipped UI contract template at
|
|
59
|
+
`templates/contracts/ui-contract.sample.yaml` includes inline comments
|
|
60
|
+
that re-state the 3..7 band and the structured-shape schema, so an
|
|
61
|
+
author who reads only the template still learns the contract.
|
package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/ui-contract.sample.yaml
CHANGED
|
@@ -13,7 +13,12 @@ screens:
|
|
|
13
13
|
title: Create Order
|
|
14
14
|
route: /orders/new
|
|
15
15
|
# primary_tasks: at least one entry required per screen (QFAI-AUD-001).
|
|
16
|
-
#
|
|
16
|
+
# Recommended count band: 3..7 entries per screen (QFAI-AUD-020).
|
|
17
|
+
# Counts outside the 3..7 band warn at validate time; tune the list
|
|
18
|
+
# so it covers the screen's core user actions without over-loading
|
|
19
|
+
# the surface. See references/ui-contract-guide.md for the rationale.
|
|
20
|
+
# Each entry may be either a plain string (legacy) or a structured
|
|
21
|
+
# `{id, label, acceptance}` object (closed schema — no other keys).
|
|
17
22
|
primary_tasks:
|
|
18
23
|
- submit a new order
|
|
19
24
|
elements:
|
|
@@ -508,6 +508,27 @@ When this skill is complete, provide a final user-facing completion message and
|
|
|
508
508
|
- Need a report artifact:
|
|
509
509
|
Action: run `qfai report` after validation outputs are up to date.
|
|
510
510
|
|
|
511
|
+
## Default Autopilot Policy
|
|
512
|
+
|
|
513
|
+
The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
|
|
514
|
+
|
|
515
|
+
- auto-decide:
|
|
516
|
+
- output formatting
|
|
517
|
+
- ID / sequence numbering
|
|
518
|
+
- append-vs-create on subject overlap
|
|
519
|
+
- equivalent-option pick
|
|
520
|
+
- ask-user:
|
|
521
|
+
- CREATE / DELETE / SPLIT / MERGE / SUPERSEDE / UPDATE:REMOVE triage operations (each with a prompt template that names the target and rationale)
|
|
522
|
+
- destructive operations (rm / overwrite / force-push)
|
|
523
|
+
- version-pin changes (`package.json#version`, branch pin)
|
|
524
|
+
- scope expansions outside the active envelope
|
|
525
|
+
- hard-required:
|
|
526
|
+
- `companyName`
|
|
527
|
+
- brand intent
|
|
528
|
+
- `primarySpecId` (when absent from inputs)
|
|
529
|
+
|
|
530
|
+
A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
|
|
531
|
+
|
|
511
532
|
project_memory:
|
|
512
533
|
|
|
513
534
|
- Verify is the full-scan approval gate; per-skill validate runs (sdd/atdd/tdd) are signals, the verify gate is the binding pass.
|