qfai 1.7.9 → 1.7.13

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 (151) hide show
  1. package/README.md +34 -70
  2. package/assets/init/.qfai/README.md +11 -16
  3. package/assets/init/.qfai/assistant/agents/acceptance-test-engineer.md +51 -0
  4. package/assets/init/.qfai/assistant/agents/architecture-reviewer.md +57 -0
  5. package/assets/init/.qfai/assistant/agents/backend-engineer.md +40 -31
  6. package/assets/init/.qfai/assistant/agents/completion-reviewer.md +48 -0
  7. package/assets/init/.qfai/assistant/agents/delivery-planner.md +52 -0
  8. package/assets/init/.qfai/assistant/agents/devops-ci-engineer.md +31 -28
  9. package/assets/init/.qfai/assistant/agents/discovery-analyst.md +50 -0
  10. package/assets/init/.qfai/assistant/agents/doc-steward.md +30 -20
  11. package/assets/init/.qfai/assistant/agents/frontend-engineer.md +40 -31
  12. package/assets/init/.qfai/assistant/agents/implementation-reviewer.md +58 -0
  13. package/assets/init/.qfai/assistant/agents/orchestrator.md +19 -2
  14. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +59 -0
  15. package/assets/init/.qfai/assistant/agents/product-surface-reviewer.md +60 -0
  16. package/assets/init/.qfai/assistant/agents/qa-gatekeeper.md +53 -48
  17. package/assets/init/.qfai/assistant/agents/qa-strategist.md +49 -0
  18. package/assets/init/.qfai/assistant/agents/requirements-analyst.md +32 -29
  19. package/assets/init/.qfai/assistant/agents/requirements-reviewer.md +48 -0
  20. package/assets/init/.qfai/assistant/agents/solution-architect.md +59 -0
  21. package/assets/init/.qfai/assistant/agents/test-design-analyst.md +64 -0
  22. package/assets/init/.qfai/assistant/instructions/agent-selection.md +64 -50
  23. package/assets/init/.qfai/assistant/instructions/communication.md +17 -0
  24. package/assets/init/.qfai/assistant/instructions/constitution.md +36 -1
  25. package/assets/init/.qfai/assistant/instructions/drift-protocol.md +1 -1
  26. package/assets/init/.qfai/assistant/instructions/requirements-decomposition.md +20 -13
  27. package/assets/init/.qfai/assistant/instructions/workflow.md +2 -1
  28. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +32 -31
  29. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md +80 -0
  30. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +21 -15
  31. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +95 -61
  32. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md +17 -85
  33. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +9 -1
  34. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/02_Inception-Deck.md +1 -1
  35. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +17 -60
  36. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/04_Sources.md +69 -2
  37. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/06_REQ.md +1 -1
  38. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/07_NFR.md +1 -1
  39. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/09_Constraints.md +1 -1
  40. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/10_Policy.md +1 -1
  41. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/11_OQ-Register.md +1 -1
  42. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/12_OQ-Resolution-Log.md +1 -1
  43. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/13_Deferred.md +1 -1
  44. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +25 -16
  45. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/99_delta.md +1 -1
  46. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/prototyping.yaml +9 -0
  47. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +8 -4
  48. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +11 -7
  49. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/summary.json +6 -44
  50. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/00_index.md +29 -14
  51. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +20 -0
  52. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/11_design_taste_interview.md +45 -0
  53. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/20_design_eval_invariant.md +68 -0
  54. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_design_eval_trend_derived.md +68 -0
  55. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/22_design_eval_product_specific.md +68 -0
  56. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +41 -0
  57. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/24_design_eval_dynamic_overrides.md +28 -0
  58. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_option_comparison.md +56 -0
  59. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_selected_anchor_screen.md +42 -0
  60. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +44 -0
  61. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +36 -0
  62. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +65 -67
  63. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +171 -279
  64. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +91 -57
  65. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/rcp_footer.md +21 -80
  66. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/evidence/import-lite.md +1 -1
  67. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/11_Slice-Policy.md +50 -0
  68. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/06_Test-Cases.md +23 -3
  69. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +25 -17
  70. package/assets/init/.qfai/assistant/steering/agent-catalog.yml +194 -0
  71. package/assets/init/.qfai/assistant/steering/agent-routing.yml +176 -0
  72. package/assets/init/.qfai/assistant/steering/cli-ux-guidelines.md +49 -0
  73. package/assets/init/.qfai/assistant/steering/manifest.md +44 -19
  74. package/assets/init/.qfai/assistant/steering/product.md +53 -11
  75. package/assets/init/.qfai/assistant/steering/research-first-protocol.md +58 -0
  76. package/assets/init/.qfai/assistant/steering/review-gate.rules.yml +17 -66
  77. package/assets/init/.qfai/assistant/steering/review-profiles.yml +30 -0
  78. package/assets/init/.qfai/assistant/steering/structure.md +30 -16
  79. package/assets/init/.qfai/assistant/steering/tech.md +37 -21
  80. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +54 -0
  81. package/assets/init/.qfai/contracts/README.md +10 -4
  82. package/assets/init/.qfai/contracts/design/README.md +32 -0
  83. package/assets/init/.qfai/contracts/ui/README.md +5 -3
  84. package/assets/init/.qfai/discussion/README.md +52 -5
  85. package/assets/init/.qfai/evidence/README.md +143 -116
  86. package/assets/init/.qfai/report/README.md +1 -1
  87. package/assets/init/.qfai/review/README.md +24 -9
  88. package/assets/init/.qfai/specs/README.md +5 -2
  89. package/assets/init/root/qfai.config.yaml +13 -0
  90. package/assets/uix-rev/comparison-review.md +24 -7
  91. package/assets/uix-rev/contracts-review.md +17 -10
  92. package/assets/uix-rev/scoring-review.md +42 -6
  93. package/assets/uix-rev/strategy-review.md +13 -9
  94. package/dist/cli/index.cjs +15618 -11547
  95. package/dist/cli/index.cjs.map +1 -1
  96. package/dist/cli/index.mjs +15487 -11415
  97. package/dist/cli/index.mjs.map +1 -1
  98. package/dist/index.cjs +10486 -6080
  99. package/dist/index.cjs.map +1 -1
  100. package/dist/index.d.cts +766 -198
  101. package/dist/index.d.ts +766 -198
  102. package/dist/index.mjs +10823 -6420
  103. package/dist/index.mjs.map +1 -1
  104. package/package.json +11 -3
  105. package/assets/init/.qfai/assistant/agents/architect-reviewer.md +0 -65
  106. package/assets/init/.qfai/assistant/agents/architect.md +0 -49
  107. package/assets/init/.qfai/assistant/agents/atdd-api-implementer.md +0 -49
  108. package/assets/init/.qfai/assistant/agents/atdd-e2e-implementer.md +0 -48
  109. package/assets/init/.qfai/assistant/agents/atdd-integration-implementer.md +0 -48
  110. package/assets/init/.qfai/assistant/agents/backend-reviewer.md +0 -66
  111. package/assets/init/.qfai/assistant/agents/code-reviewer.md +0 -67
  112. package/assets/init/.qfai/assistant/agents/contract-designer.md +0 -49
  113. package/assets/init/.qfai/assistant/agents/coverage-planner.md +0 -49
  114. package/assets/init/.qfai/assistant/agents/design-owner.md +0 -48
  115. package/assets/init/.qfai/assistant/agents/design-review-lead.md +0 -68
  116. package/assets/init/.qfai/assistant/agents/facilitator.md +0 -48
  117. package/assets/init/.qfai/assistant/agents/frontend-reviewer.md +0 -66
  118. package/assets/init/.qfai/assistant/agents/interviewer.md +0 -45
  119. package/assets/init/.qfai/assistant/agents/option-explorer.md +0 -51
  120. package/assets/init/.qfai/assistant/agents/option-reviewer.md +0 -66
  121. package/assets/init/.qfai/assistant/agents/oq-harvester.md +0 -50
  122. package/assets/init/.qfai/assistant/agents/oq-reviewer.md +0 -70
  123. package/assets/init/.qfai/assistant/agents/planner.md +0 -48
  124. package/assets/init/.qfai/assistant/agents/project-lead.md +0 -47
  125. package/assets/init/.qfai/assistant/agents/prototyping-coverage-auditor.md +0 -46
  126. package/assets/init/.qfai/assistant/agents/qa-engineer.md +0 -47
  127. package/assets/init/.qfai/assistant/agents/qa-lead.md +0 -44
  128. package/assets/init/.qfai/assistant/agents/qa-reviewer.md +0 -66
  129. package/assets/init/.qfai/assistant/agents/researcher.md +0 -47
  130. package/assets/init/.qfai/assistant/agents/reviewer.md +0 -62
  131. package/assets/init/.qfai/assistant/agents/runtime-gatekeeper.md +0 -46
  132. package/assets/init/.qfai/assistant/agents/test-case-owner.md +0 -53
  133. package/assets/init/.qfai/assistant/agents/test-engineer.md +0 -50
  134. package/assets/init/.qfai/assistant/agents/test-volume-estimator.md +0 -48
  135. package/assets/init/.qfai/assistant/agents/ui-ux-reviewer.md +0 -71
  136. package/assets/init/.qfai/assistant/agents/unit-test-scope-enforcer.md +0 -46
  137. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_strategy.md +0 -28
  138. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/20_eval_axis_usability.md +0 -31
  139. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_eval_axis_consistency.md +0 -31
  140. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/22_eval_axis_accessibility.md +0 -31
  141. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_eval_axis_delight.md +0 -56
  142. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_comparison.md +0 -45
  143. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_anchor.md +0 -27
  144. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_contracts.md +0 -51
  145. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_bundle.md +0 -31
  146. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/60_critique_loop.md +0 -23
  147. package/assets/init/.qfai/assistant/skills/qfai-prototyping-full-harness/SKILL.md +0 -185
  148. package/assets/init/.qfai/assistant/steering/review-roster.yml +0 -128
  149. package/assets/init/.qfai/evidence/.gitignore +0 -3
  150. package/assets/init/.qfai/report/.gitignore +0 -3
  151. package/assets/init/.qfai/review/.gitignore +0 -5
@@ -6,358 +6,250 @@ argument-hint: "[--auto]"
6
6
  allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
7
7
  roles:
8
8
  [
9
- FullStackEngineer,
10
- BackendEngineer,
11
- FrontendEngineer,
12
- DBEngineer,
13
- DevOpsCIEngineer,
14
- QAEngineer,
15
- RuntimeGatekeeper,
16
- UIUXReviewer,
17
- CodeReviewer,
9
+ orchestrator,
10
+ delivery-planner,
11
+ product-experience-architect,
12
+ frontend-engineer,
13
+ backend-engineer,
14
+ devops-ci-engineer,
15
+ completion-reviewer,
16
+ product-surface-reviewer,
17
+ qa-gatekeeper,
18
18
  ]
19
+ routing-profile: ui-bearing
19
20
  mode: execution-focused
20
21
  ---
21
22
 
22
- <!--
23
- QFAI Skill Body (SSOT)
24
- - This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
25
- - Keep wrappers thin and route users to this skill body.
26
- -->
23
+ <!-- QFAI Skill Body (SSOT) -->
27
24
 
28
25
  ## /qfai-prototyping
29
26
 
30
27
  [DRIFT-PROTOCOL:MANDATORY]
31
28
 
32
- ## User Questions (AskUserQuestion Protocol)
29
+ This skill is **static-first**. File-based checks and evidence are the default. Runtime-heavy verification is reserved for **explicit full-harness** runs only.
33
30
 
34
- - When a question to the user is needed (e.g., implementation scope decisions, runtime environment confirmation),
35
- the agent MUST use AskUserQuestion if the tool is available.
36
- - When AskUserQuestion supports structured choices (radio/multi-select),
37
- the agent MUST prefer structured choices over free-text input.
38
- - If AskUserQuestion is technically unavailable, present the same question as a normal message
39
- with explicit numbered choices.
40
- The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
41
- The reason for unavailability MUST be stated.
31
+ ## CRITICAL CONSTRAINTS (Read First)
42
32
 
43
- Run prototyping as an **all-spec stage**. Scope is fixed to **ALL specs** resolved from `.qfai/specs/spec-*`.
33
+ - Scope is **ALL specs** from `.qfai/specs/spec-*`.
34
+ - Evidence is mandatory in **markdown + json** under `.qfai/evidence/`.
35
+ - `DONE is forbidden` until prototyping evidence, reviewer gate, and `qfai validate --fail-on error` pass.
36
+ - `qfai prototyping run` is available as an auxiliary generate-side command, not the primary surface for this skill.
37
+ - Defaulting to full-harness is prohibited.
38
+ - If a required API endpoint still returns `404`, the run is incomplete.
39
+ - `L1` and `L2` critique findings must be reflected in the evidence pack or justified as `REVISE`.
40
+ - `uiFidelity` is the canonical UI evidence block for UI-bearing surfaces.
41
+ - non-ui skip semantics must be preserved. UI-only placeholders are not required when the surface is non-ui.
42
+ - Review rendered output, screenshot evidence, HTML snapshots, or preview artifacts before closing any UI-affecting run.
43
+ - Read the canonical sidecar family first: option comparison / `30_option_comparison.md` -> selected anchor screen / `31_selected_anchor_screen.md` -> strategy / `10_implementation_strategy.md` -> taste interview / `11_design_taste_interview.md` -> trend scan / `04_Sources.md` -> 3-layer evaluation family (`20/21/22/23` + optional `24`) -> screen contracts / `40_screen_contracts.md` -> review input bundle / `50_review_input_bundle.md`.
44
44
 
45
- This stage is complete only when all specs pass the minimum contract:
45
+ ## Goal
46
46
 
47
- - Static checks confirm declared routes, endpoints, and schema objects exist in code.
48
- - Evidence is captured and validate can enforce it.
49
- - Runtime verification (browser, live API) is reserved for full-harness mode only.
47
+ Build the minimum runnable vertical slice for **ALL specs** and produce canonical prototyping evidence under `.qfai/evidence/`.
50
48
 
51
- ## Visual Review Guard
49
+ ## Non-goals
52
50
 
53
- - Review rendered output, screenshot captures, or generated HTML for every UI-affecting slice; code-only inspection is insufficient.
54
- - Read the DDP (Design Direction Pack) first before comparing visuals or wiring critique outcomes into implementation.
55
- - Read order: DDP -> Design Token -> UI Contract -> HTML Mock -> Flow.
56
- - If rendered/HTML evidence disagrees with code intent, fix the rendered result before declaring completion.
51
+ - Acceptance test automation (`/qfai-atdd`)
52
+ - Contract redesign
53
+ - Public CLI surface expansion
57
54
 
58
- ## Definition of Done by fidelity level (Mandatory)
55
+ ## Mode Selection Protocol
59
56
 
60
- - L1 (`skeleton`):
61
- - Route-level rendering exists for declared primary screens.
62
- - Surface shape is visible, but interactions may remain minimally wired.
63
- - L2 (`interactive`, default):
64
- - Declared primary interactions are wired with mockable behavior.
65
- - At least one declared mock path is executed and recorded per primary flow set.
66
- - `uiFidelity` is produced in `prototyping.json`.
67
- - Default target is L2 (`interactive`).
68
- - If L1 fallback is chosen, record explicit user approval and rationale in evidence.
69
- - Placeholder-only pages (single static string, lorem ipsum, or equivalent) are `REVISE`.
57
+ Mode selection precedence:
70
58
 
71
- ## Prototyping Modes
59
+ 1. explicit request (`mode=low-cost|standard|full-harness`)
60
+ 2. discussion recommendation from `prototyping.yaml`
61
+ 3. default `standard`
72
62
 
73
- This skill is **static-first**: validation relies on static checks and file-based analysis by default.
74
- No runtime execution (browser, live API, DB connection) is required unless full-harness mode is activated.
63
+ Record in `prototyping.json`:
75
64
 
76
- ### Low-cost
65
+ - `mode.requested` (optional)
66
+ - `mode.effective` (required)
67
+ - `mode.source` (required)
68
+ - `mode.rationale` (required)
69
+ - `mode.discussionRecommendation` (optional)
77
70
 
78
- - Static checks only: file existence, route declaration, schema presence.
79
- - Suitable for L1 fidelity targets.
80
- - No browser or server process needed.
71
+ ## Surface Semantics
81
72
 
82
- ### Standard
73
+ - `surface: non-ui` means UI-specific evidence is `n/a`.
74
+ - For non-ui projects, `uiFidelity`, render evidence, browser QA, and `runtimeGate.ui` may be absent.
75
+ - Absent is normal for non-ui. Do not force skipped placeholders unless the project intentionally emits them.
76
+ - For UI-bearing projects, route/contract fidelity must be captured when `uiFidelity` is required by mode.
83
77
 
84
- - Static checks plus optional light validation (mock data, stub handlers).
85
- - Suitable for L2 fidelity targets (default).
86
- - Runtime verification is NOT required; evidence is file-based.
78
+ ## Prototyping Modes
87
79
 
88
- ### Full-harness
80
+ ### Low-cost
89
81
 
90
- - Delegates to `/qfai-prototyping-full-harness` skill for runtime-heavy obligations.
91
- - Includes browser-based UI reachability, live endpoint availability checks, and DB object verification.
92
- - Suitable for L3–L5 fidelity targets.
93
- - Must be explicitly opted in via `--mode full-harness` or discussion recommendation.
82
+ - Static checks only.
83
+ - Suitable for early skeleton work.
84
+ - UI-bearing projects may include `uiFidelity` and render/browser artifacts, but they are optional.
85
+ - `skeleton` mode is allowed for lightweight UI proof.
94
86
 
95
- ## Non-UI Projects
87
+ ### Standard
96
88
 
97
- For projects with `surface: non-ui`, prototyping obligations are n/a.
98
- Non-UI surfaces skip UI route checks, screen rendering, and visual fidelity gates.
99
- Evidence should record `surface: non-ui` and mark UI-specific rows as n/a in the Coverage Matrix.
89
+ - Static checks plus optional light validation.
90
+ - This is the default mode.
91
+ - UI-bearing projects require `uiFidelity`.
92
+ - Runtime gate, render bundle, and browser QA bundle are optional.
100
93
 
101
- ## FORMAT SSOT (Mandatory)
94
+ ### Full-harness
102
95
 
103
- - Before writing or editing any `.qfai/**` artifact, read and follow the relevant directory README template and sample:
104
- - `.qfai/require/README.md`
105
- - `.qfai/specs/README.md`
106
- - `.qfai/contracts/**/README.md`
107
- - `.qfai/evidence/README.md`
108
- - Do not copy templates/samples into this prompt or into other prompt markdown.
109
- - Generated artifacts must match README-defined structure (headings, ordering, table columns).
110
- - Completion requires a Format Self-Check in evidence.
96
+ - Explicit opt-in only. Never auto-activate.
97
+ - Adds runtime-heavy obligations and full-harness audit metadata.
98
+ - UI-bearing projects require runtime gate, render bundle, browser QA bundle, and `fullHarness`.
99
+ - Non-ui projects require `fullHarness`, but UI-specific bundles remain n/a.
111
100
 
112
- ## Inputs Priority (Preflight)
101
+ ## Obligation Matrix
113
102
 
114
- When unsure, read inputs in this order:
103
+ ### surface / mode
115
104
 
116
- - P1: `.qfai/assistant/instructions/*`
117
- - P2: `.qfai/assistant/steering/*`
118
- - P3: `.qfai/specs/spec-*/01_Spec.md` (Primary SSOT / Consumer View)
119
- - P4: `.qfai/contracts/ui/**`, `.qfai/specs/_policies/05_Contracts.md`, and each `spec-*/11_Contracts.md`
120
- - P5: `.qfai/specs/spec-*/09_delta.md` (Decision Records)
121
- - P6: existing evidence
105
+ | surface / mode | specs | runtimeGate | uiFidelity | render evidence | browser QA | fullHarness |
106
+ | ------------------------- | -------- | ----------- | --------------------------------- | ------------------------------------ | ------------ | ------------ |
107
+ | non-ui / low-cost | required | optional | n/a | n/a | n/a | absent |
108
+ | non-ui / standard | required | optional | n/a | n/a | n/a | absent |
109
+ | non-ui / full-harness | required | optional | n/a | n/a | n/a | required |
110
+ | ui-bearing / low-cost | required | optional | optional (`skeleton` allowed) | optional (`captured/skipped/failed`) | optional | absent |
111
+ | ui-bearing / standard | required | optional | **required** (`interactive` only) | optional (`captured/skipped/failed`) | optional | absent |
112
+ | ui-bearing / full-harness | required | required | **required** (`interactive` only) | **required** | **required** | **required** |
122
113
 
123
- ## Read Set Contract (Mandatory)
114
+ `uiFidelity.mode` policy:
124
115
 
125
- - Default Mode:
126
- - `.qfai/specs/spec-*/01_Spec.md`
127
- - relevant `.qfai/contracts/ui/**`
128
- - Escalation Mode:
129
- - allowed only when `01_Spec.md` Escalation Hook signals ambiguity / conflict / missing constraint / trade-off
130
- - read only `.qfai/specs/_policies/01_Objective.md`, `.qfai/specs/_policies/07_Constraints.md`, `.qfai/specs/_policies/08_Decisions.md`
131
- - Do not read `_policies/**` by default.
116
+ - `low-cost`: `skeleton` or `interactive`
117
+ - `standard`: `interactive` only — `skeleton` is rejected by the validator
118
+ - `full-harness`: `interactive` only — `skeleton` is rejected; render evidence, Browser QA, runtimeGate, and fullHarness block are all required
119
+ - `non-ui`: `uiFidelity` is not emitted
132
120
 
133
- ## Sub-agent Delegation (MANDATORY)
121
+ Interpretation:
134
122
 
135
- This section is mandatory and overrides conflicting fallback text.
123
+ - `required`: validator enforces presence and completeness
124
+ - `optional`: if present, schema must be valid; if absent, no issue
125
+ - `n/a`: absent is normal success
136
126
 
137
- ### Orchestrator Protocol (MUST)
127
+ ## Required Evidence
138
128
 
139
- - Orchestrator may only create work orders, delegate tasks, integrate outputs, and present results to the user.
140
- - Orchestrator MUST NOT generate the primary artifact first draft.
141
- - Orchestrator MUST NOT serve as Reviewer or skip delegation for convenience.
129
+ ### Evidence (MANDATORY)
142
130
 
143
- ### Capability Probe (MUST)
131
+ - `.qfai/evidence/prototyping.md`
132
+ - `.qfai/evidence/prototyping.json`
133
+ - `.qfai/evidence/render.json` when render evidence is emitted or required by mode
134
+ - `.qfai/evidence/browser-qa.json` when browser QA evidence is emitted or required by mode
135
+ - `Coverage Matrix` covering all specs
136
+ - critique summary with `L1` / `L2` findings and disposition
144
137
 
145
- 1. Run one harmless Probe Task (for example: "reply with ok") once at stage start.
146
- 2. If subagents are unavailable, explicitly ask the user for Simulation mode approval.
147
- 3. Without explicit approval, stop the stage.
138
+ ### low-cost obligations
148
139
 
149
- ### Simulation mode (Opt-in only)
140
+ - always: `specs[]`, `meta.generatedAt`, `meta.toolVersion`, `meta.commands[]`, `mode.*`
141
+ - ui-bearing: `uiFidelity` optional, render/browser optional
142
+ - non-ui: UI-specific evidence is n/a
150
143
 
151
- - Allowed only when the user explicitly states `Simulation mode allowed`.
152
- - Record both in evidence:
153
- - `Subagents: simulated (reason: <why unavailable>)`
154
- - `User approval: <quote or reference>`
144
+ ### standard obligations
155
145
 
156
- ## Work Orders Summary
146
+ - always: `specs[]`, `meta.*`, `mode.*`
147
+ - ui-bearing: `uiFidelity` required
148
+ - non-ui: UI-specific evidence is n/a
149
+ - runtime gate and browser QA remain optional
157
150
 
158
- Every major artifact in this stage MUST include this table:
151
+ ### full-harness obligations
159
152
 
160
- | Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
161
- | ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
162
- | 1 | <role> | <task> | <refs> | <refs> | PASS/REVISE |
153
+ - always: `specs[]`, `meta.*`, `mode.*`, `fullHarness`
154
+ - ui-bearing: `runtimeGate`, `.qfai/evidence/render.json`, `.qfai/evidence/browser-qa.json`, `uiFidelity`
155
+ - non-ui: UI-specific evidence remains n/a
163
156
 
164
- ### Reviewer Gate (MUST)
157
+ ## Full-harness minimum completeness
165
158
 
166
- - Final completion gate MUST be delegated to an independent Reviewer sub-agent.
167
- - Reviewer checks (minimum):
168
- - required roles were delegated (no orchestrator self-authoring),
169
- - evidence + validate gate is present,
170
- - Drift Protocol was enforced,
171
- - test-layer obligations match `test-layers.md` and plan,
172
- - floors and ratios are **signals, not gates**.
173
- - Reviewer returns only `PASS` or `REVISE`.
174
- - **All reviewers: alternative proposal obligation**:
175
- - Every reviewer MUST provide a concrete alternative or fix proposal when returning FAIL. Feedback without a concrete alternative is invalid and triggers re-judgment.
176
- - **devils-advocate gate**:
177
- - devils-advocate FAIL must include a concrete alternative proposal. Bare negation FAIL triggers re-judgment.
178
- - 3 consecutive FAILs trigger advisory demotion and allow progression to the next phase.
179
- - **pattern-doubler gate**:
180
- - Each pattern proposed by pattern-doubler must include rationale.
181
- - Artifacts with no ID-bearing items (US/AC/BR/EX/TC) are marked N/A.
182
-
183
- ### Work order template (copy/paste)
184
-
185
- ```text
186
- Task title: <short>
187
- Role: <sub-agent role>
188
- Goal: <what to decide/produce>
189
- Inputs (refs):
190
- - <file/section>
191
- Constraints:
192
- - must: enforce Drift Protocol
193
- - must: verify plan/test-layer adherence (`test-layers.md` + plan)
194
- - must: verify `qfai validate --fail-on error` evidence
195
- - must_not: accept floor/ratio as hard gate
196
- Output format:
197
- - <headings / bullet schema>
198
- Quality bar:
199
- - PASS if ...
200
- - REVISE if ...
201
- ```
202
-
203
- ### Reviewer response template
204
-
205
- ```text
206
- Result: PASS | REVISE
207
- Findings:
208
- - <issue>
209
- Required fixes:
210
- - <action>
211
- Evidence checked:
212
- - <refs>
213
- ```
214
-
215
- ## Stage 0 - Steering completion refresh (mandatory)
216
-
217
- Before implementation, refresh and verify:
218
-
219
- - `.qfai/assistant/steering/manifest.md`
220
- - `.qfai/assistant/steering/product.md`
221
- - `.qfai/assistant/steering/structure.md`
222
- - `.qfai/assistant/steering/tech.md`
223
-
224
- If facts are missing, record Open Questions and ask the user.
225
-
226
- ## Delta Rejected Guard (Mandatory)
227
-
228
- - Do not reintroduce options marked as rejected in 09_delta.md.
229
- - If reconsideration is needed, create a `[RE-OPEN]` Decision Record with explicit approval.
159
+ When `mode.effective = full-harness`, record:
230
160
 
231
- ## CRITICAL CONSTRAINTS (Read First)
161
+ - `fullHarness.enabled = true`
162
+ - `fullHarness.available`
163
+ - `fullHarness.runId`
164
+ - `fullHarness.iterationCount >= 1`
165
+ - `fullHarness.bestIteration >= 1`
166
+ - `fullHarness.terminationReason`
167
+ - `fullHarness.reviewerSignoff`
168
+ - `fullHarness.scoringTrace`
232
169
 
233
- - Scope is ALL specs from `.qfai/specs/spec-*`; do not shrink to one spec.
234
- - Contracts are strict inputs in this stage.
235
- - Do not create new files under `.qfai/contracts/**`.
236
- - If any spec has zero resolved contracts, STOP and route back to `/qfai-discussion`.
237
- - Do not add ATDD/TDD automation in this stage.
238
- - You MUST produce both prototyping evidence artifacts in `.qfai/evidence/`.
239
- - You MUST produce evidence via static checks and file-based validation.
240
- - DONE is forbidden when Coverage Matrix is incomplete or static analysis detects missing endpoints.
170
+ ## Canonical Bundles
241
171
 
242
- ## Completion Contract (Shared)
172
+ - render bundle: `.qfai/evidence/render.json`
173
+ - browser QA bundle: `.qfai/evidence/browser-qa.json`
243
174
 
244
- Before declaring completion, you MUST:
175
+ Render bundle uses `captured | skipped | failed`.
176
+ Browser QA bundle uses `completed | skipped | failed`.
245
177
 
246
- - resolve or explicitly defer ambiguous items,
247
- - verify every required artifact exists and is complete,
248
- - scan outputs for placeholders (TBD/TODO/OPEN QUESTION and equivalents),
249
- - run the smallest executable smoke proof and record outcomes.
178
+ ## Required Process
250
179
 
251
- ## Goal
252
-
253
- Build the minimum runnable vertical slice for **all specs** so `/qfai-atdd` can proceed without hidden scope gaps.
254
-
255
- ## Non-goals
256
-
257
- - Acceptance test automation (`/qfai-atdd`).
258
- - Unit/component tests (TDD phases).
259
- - Contract redesign during prototyping.
260
-
261
- ## Mandatory Outputs
180
+ 1. Read `.qfai/specs/spec-*` and determine the surface and requested mode.
181
+ 2. Build the minimum runnable slice across **ALL specs**.
182
+ 3. Produce `prototyping.md` and `prototyping.json` with a complete Coverage Matrix.
183
+ 4. If UI-bearing, capture `uiFidelity`; if full-harness, capture runtime gate, render bundle, and browser QA bundle.
184
+ 5. Review rendered output, screenshot evidence, HTML snapshots, or preview artifacts against the canonical sidecar family.
185
+ 6. Record critique findings, classify each as `L1` or `L2`, and either fix or mark the result `REVISE`.
186
+ 7. Use the read order `option comparison (30_option_comparison.md) -> selected anchor screen (31_selected_anchor_screen.md) -> strategy (10_implementation_strategy.md) -> taste interview (11_design_taste_interview.md) -> trend scan (04_Sources.md) -> 3-layer evaluation family (20/21/22/23 + optional 24) -> screen contracts (40_screen_contracts.md) -> review input bundle (50_review_input_bundle.md)` when the project is UI-bearing.
187
+ 8. Run `qfai validate --fail-on error`.
188
+ 9. Route reviewer gate and do not declare completion until the result is `PASS`.
262
189
 
263
- - Updated runnable skeleton implementation.
264
- - Coverage Matrix for all specs.
265
- - Runtime Gate v2 log for declared UI routes and API endpoints.
266
- - Prototyping evidence artifacts (markdown + json) under `.qfai/evidence/`.
267
- - `prototyping.json` includes `uiFidelity` for L2 reporting.
268
- - Reviewer result (`PASS` or actionable `REVISE`).
269
-
270
- ## Scope SSOT (ALL contracts -> ALL specs)
271
-
272
- 1. Enumerate all specs from `.qfai/specs/spec-*`.
273
- 2. Resolve each spec's contracts via `_policies/05_Contracts.md` and/or `spec-*/11_Contracts.md`.
274
- 3. Do not declare completion while any spec lacks contract assignment.
275
-
276
- ## Preflight (required)
277
-
278
- - Build spec list first and create Coverage Matrix rows for every spec.
279
- - Resolve declared counts per spec:
280
- - `uiRoutes`
281
- - `apiEndpoints`
282
- - `dbObjects`
283
- - Stop conditions:
284
- - any spec has zero contract assignment,
285
- - UI primary flow is undefined for a spec,
286
- - evidence schema cannot represent all specs.
190
+ ## Sub-agent Delegation (MANDATORY)
287
191
 
288
- ## Execution (required)
192
+ ### Orchestrator Protocol (MUST)
289
193
 
290
- Process specs in dependency order (foundation first, then business modules):
194
+ - Orchestrator may only create work orders, delegate tasks, integrate outputs, and present results.
195
+ - Orchestrator MUST NOT self-approve.
196
+ - Orchestrator MUST keep evidence paths canonical and ensure outputs stay under `.qfai/evidence/`.
291
197
 
292
- - UI: primary route renders (stub data is acceptable).
293
- - API: declared endpoints return non-404 status (stub handler is acceptable).
294
- - DB: minimum schema/store exists so runtime does not crash.
295
- - UI quality floor: avoid placeholder-only pages; this must be marked `REVISE`.
198
+ ### Capability Probe (MUST)
296
199
 
297
- ## Runtime Interaction Gate v2 (required)
200
+ 1. Run one harmless Probe Task once at stage start.
201
+ 2. If subagents are unavailable, explicitly ask for Simulation mode approval.
202
+ 3. Without explicit approval, stop the stage.
298
203
 
299
- Check the **full declared list** from preflight and record all results:
204
+ ### Simulation mode (Opt-in only)
300
205
 
301
- - UI routes: HTTP GET / route navigation checks.
302
- - API endpoints: runtime calls with status capture (`404` is forbidden).
303
- - DB objects: presence checks against schema or temporary store.
304
- - Mock paths: record at least one pass path for interactive flows when L2 is targeted.
206
+ - Simulation mode allowed only when user explicitly states `Simulation mode allowed`.
207
+ - Record both:
208
+ - `Subagents: simulated (reason: <why unavailable>)`
209
+ - `User approval: <quote or reference>`
305
210
 
306
- If any check fails, completion is blocked.
211
+ ## Work Orders Summary
307
212
 
308
- ## Evidence (MANDATORY)
213
+ Every major artifact in this stage MUST include this table schema:
309
214
 
310
- Create/update both artifacts in `.qfai/evidence/`:
215
+ | Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
216
+ | ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
217
+ | 1 | `role` | `task` | `refs` | `refs` | PASS/REVISE |
311
218
 
312
- 1. Markdown evidence with sections:
313
- - Coverage Matrix
314
- - Runtime Gate Log
315
- - Deviations / Exceptions
316
- - Work Orders Summary
317
- - Format Self-Check
318
- 2. JSON evidence with minimum fields:
319
- - `specs[]` with `specId`, `declared`, `checked`, `missing`
320
- - `runtimeGate.ui[]` and `runtimeGate.api[]`
321
- - `uiFidelity.version`, `uiFidelity.mode`, `uiFidelity.screens[]` for L2
322
- - `meta.generatedAt`, `meta.toolVersion`, `meta.commands[]`
219
+ ### Reviewer Gate (MUST)
323
220
 
324
- `uiFidelity` is a stage DoD requirement in this skill.
325
- Validator compatibility remains backward-compatible: existing required fields stay unchanged.
221
+ - Delegate final completion gate to an independent Reviewer.
222
+ - Reviewer checks Drift Protocol compliance and alignment with `.qfai/assistant/steering/test-layers.md`.
223
+ - Test volume floors/ratios are not gates; they are signals.
224
+ - Reviewer must verify evidence obligations for the chosen `surface / mode`.
225
+ - Do not declare DONE until Reviewer returns `PASS`; otherwise apply `REVISE`.
326
226
 
327
- ## DONE Declaration (Mandatory Output)
227
+ ## Completion Contract (Shared)
328
228
 
329
- When declaring DONE, include:
229
+ Before DONE:
330
230
 
331
- - referenced instructions/steering/spec inputs,
332
- - DR-IDs checked and rejected-option result,
333
- - confirmation that evidence and validate gate both passed.
231
+ - package assets and generated evidence must match the obligation matrix
232
+ - `qfai validate --fail-on error` must pass
233
+ - reviewer gate must return PASS
234
+ - UI-bearing runs must reconcile `uiFidelity`, render evidence, and critique outputs
235
+ - non-ui runs must preserve `n/a` semantics without fake placeholders
334
236
 
335
237
  ## FINAL CHECKLIST (Check Last)
336
238
 
337
- - [ ] ALL specs from `.qfai/specs/spec-*` are covered in Coverage Matrix.
338
- - [ ] Every spec satisfies UI/API/DB minimum runtime conditions.
339
- - [ ] API runtime gate has zero 404 results.
340
- - [ ] Prototyping evidence artifacts are updated.
341
- - [ ] `prototyping.json` includes `uiFidelity` for L2 output.
342
- - [ ] Placeholder-only pages are not accepted (marked `REVISE` if present).
343
- - [ ] `qfai validate --fail-on error` passes.
344
- - [ ] Independent Reviewer returned PASS.
345
-
346
- ## Completion Checklist (MUST)
239
+ ### Completion Checklist (MUST)
347
240
 
348
- - [ ] This skill's Definition of Done is satisfied.
349
- - [ ] Required artifacts were produced or updated.
350
- - [ ] Open questions were logged when needed.
351
- - [ ] Completion message was presented to the user.
352
- - [ ] Next actions were enumerated.
241
+ - All specs are covered in the Coverage Matrix.
242
+ - `prototyping.md` and `prototyping.json` are both updated.
243
+ - Required mode/surface evidence is present.
244
+ - `404` findings are resolved or the run is not complete.
245
+ - `L1` / `L2` critique findings are documented and dispositioned.
246
+ - `uiFidelity` is present when required.
247
+ - Reviewer returned `PASS`; otherwise status is `REVISE`.
353
248
 
354
249
  ## Completion Message & Next Actions (MUST)
355
250
 
356
- When complete, provide a final user-facing completion message and list actions.
251
+ Action:
357
252
 
358
- - Proceed (recommended): `/qfai-atdd`.
359
- Action: implement acceptance tests against the all-spec prototype runtime behavior.
360
- - Quality gate run: `/qfai-verify`.
361
- Action: run full validation/report flow and publish gate evidence.
362
- - Rework prototyping: rerun `/qfai-prototyping`.
363
- Action: fix missing matrix rows, 404 findings, or unresolved contract mapping gaps.
253
+ - Proceed: `/qfai-atdd`
254
+ - Quality gate: `/qfai-verify`
255
+ - Rework prototyping: rerun `/qfai-prototyping` with corrected evidence