qfai 1.9.0 → 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.
Files changed (25) hide show
  1. package/assets/init/.qfai/assistant/agents/requirements-analyst.md +6 -0
  2. package/assets/init/.qfai/assistant/manifest/agent-catalog.yml +13 -46
  3. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +21 -0
  4. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +21 -0
  5. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +22 -0
  6. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +4 -1
  7. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +21 -0
  8. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +81 -55
  9. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +46 -0
  10. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +96 -6
  11. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +21 -0
  12. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-contract-guide.md +61 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/ui-contract.sample.yaml +9 -0
  14. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +21 -0
  15. package/dist/cli/index.cjs +21118 -15483
  16. package/dist/cli/index.cjs.map +1 -1
  17. package/dist/cli/index.mjs +18057 -12413
  18. package/dist/cli/index.mjs.map +1 -1
  19. package/dist/index.cjs +2386 -659
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +44 -5
  22. package/dist/index.d.ts +44 -5
  23. package/dist/index.mjs +2369 -636
  24. package/dist/index.mjs.map +1 -1
  25. package/package.json +3 -1
@@ -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.
@@ -12,6 +12,15 @@ screens:
12
12
  - id: order_create
13
13
  title: Create Order
14
14
  route: /orders/new
15
+ # primary_tasks: at least one entry required per screen (QFAI-AUD-001).
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).
22
+ primary_tasks:
23
+ - submit a new order
15
24
  elements:
16
25
  - id: customer_id_input
17
26
  label: Customer ID
@@ -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.