qfai 1.7.13 → 1.7.15
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 +35 -8
- package/assets/init/.qfai/assistant/agents/frontend-engineer.md +2 -2
- package/assets/init/.qfai/assistant/agents/product-experience-architect.md +2 -2
- package/assets/init/.qfai/assistant/agents/product-surface-reviewer.md +1 -1
- package/assets/init/.qfai/assistant/instructions/agent-selection.md +2 -0
- package/assets/init/.qfai/assistant/instructions/shared-skill-delegation-baseline.md +88 -0
- package/assets/init/.qfai/assistant/instructions/shared-skill-operating-baseline.md +49 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +28 -88
- package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +50 -114
- package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +137 -208
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-md-brand-catalog.md +90 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md +26 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-coverage-checklist.md +20 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/example-mapping-guide.md +18 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md +41 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md +22 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +50 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/platform_baselines.md +107 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/review_audit_playbook.md +104 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/trend_scan_playbook.md +76 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +143 -1005
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +9 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/04_Sources.md +83 -32
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +7 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/prototyping.yaml +12 -4
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +2 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +2 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +31 -13
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/12_design_system.md +115 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_design_eval_trend_derived.md +86 -24
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +12 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +2 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +27 -27
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +145 -155
- package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +118 -355
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +30 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +29 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +37 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +32 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +33 -0
- package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +50 -115
- package/assets/init/.qfai/assistant/steering/agent-catalog.yml +1 -1
- package/assets/init/.qfai/assistant/steering/agent-routing.yml +20 -8
- package/assets/init/.qfai/assistant/steering/manifest.md +4 -7
- package/assets/init/.qfai/assistant/steering/product.md +6 -6
- package/assets/init/.qfai/assistant/steering/review-profiles.yml +3 -0
- package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +7 -7
- package/assets/init/.qfai/contracts/README.md +15 -8
- package/assets/init/.qfai/contracts/ui/README.md +24 -26
- package/assets/init/.qfai/discussion/README.md +35 -32
- package/assets/init/.qfai/evidence/README.md +65 -181
- package/assets/init/.qfai/evidence/calibration.yaml +26 -0
- package/assets/init/.qfai/review/README.md +56 -11
- package/assets/init/.qfai/specs/README.md +2 -2
- package/assets/init/root/qfai.config.yaml +5 -6
- package/assets/scripts/capture-screenshots.js +128 -0
- package/assets/uix-rev/comparison-review.md +3 -15
- package/assets/uix-rev/contracts-review.md +5 -2
- package/assets/uix-rev/scoring-review.md +10 -2
- package/assets/uix-rev/strategy-review.md +11 -7
- package/dist/cli/index.cjs +8532 -4204
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +8599 -4271
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +9808 -5532
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +467 -277
- package/dist/index.d.ts +467 -277
- package/dist/index.mjs +8909 -4647
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/assets/uix-rev/migration-review.md +0 -17
|
@@ -49,14 +49,12 @@ When no explicit argument is given, detect the candidate spec and constrain exec
|
|
|
49
49
|
|
|
50
50
|
## User Questions (AskUserQuestion Protocol)
|
|
51
51
|
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
|
|
59
|
-
The reason for unavailability MUST be stated.
|
|
52
|
+
Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#user-questions-askuserquestion-protocol`.
|
|
53
|
+
|
|
54
|
+
Skill-specific examples:
|
|
55
|
+
|
|
56
|
+
- exception handling
|
|
57
|
+
- scope confirmation
|
|
60
58
|
|
|
61
59
|
## CRITICAL CONSTRAINTS (Read First)
|
|
62
60
|
|
|
@@ -77,8 +75,12 @@ Execute the TDD micro-cycle for each pending item in `test-list.md`, transitioni
|
|
|
77
75
|
## Visual Review Guard
|
|
78
76
|
|
|
79
77
|
- Review rendered output, screenshot evidence, or HTML output before closing any UI-affecting item.
|
|
80
|
-
- Read the sidecar family first (selected
|
|
81
|
-
- Read order: option comparison (30_option_comparison.md) → selected anchor screen (31_selected_anchor_screen.md) →
|
|
78
|
+
- Read the sidecar family first (selected anchor, strategy, screen contracts) whenever implementation touches UI or critique-driven behavior.
|
|
79
|
+
- Read order: option comparison (30_option_comparison.md) → selected anchor screen (31_selected_anchor_screen.md) →
|
|
80
|
+
strategy (10_implementation_strategy.md) → taste interview (11_design_taste_interview.md) →
|
|
81
|
+
trend scan (04_Sources.md#Trend Scan) → 3-layer evaluation family (20/21/22/23 + optional 24) →
|
|
82
|
+
screen contracts (40_screen_contracts.md) → review input bundle (50_review_input_bundle.md) →
|
|
83
|
+
optional design tokens → optional fallback mock → mermaid flows.
|
|
82
84
|
- If code intent and rendered output diverge, treat the rendered/HTML result as the blocking review input and reconcile before DONE.
|
|
83
85
|
|
|
84
86
|
## Non-goals
|
|
@@ -158,18 +160,21 @@ When transitioning to `exception`:
|
|
|
158
160
|
|
|
159
161
|
## Sub-agent Delegation (MANDATORY)
|
|
160
162
|
|
|
163
|
+
Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
|
|
164
|
+
|
|
161
165
|
### Orchestrator Protocol (MUST)
|
|
162
166
|
|
|
163
|
-
- Orchestrator
|
|
164
|
-
-
|
|
165
|
-
-
|
|
167
|
+
- Orchestrator MUST NOT write test or production code directly; delegate every TDD phase to the routed implementation agents.
|
|
168
|
+
- Additional implement-specific overrides:
|
|
169
|
+
- read `test-list.md`, determine the next pending item, and delegate each TDD phase;
|
|
170
|
+
- update `test-list.md` status after each phase completes.
|
|
166
171
|
|
|
167
172
|
### Formal Sub-agent Roster
|
|
168
173
|
|
|
169
174
|
This skill delegates through the centralized routing policy in `.qfai/assistant/steering/agent-routing.yml`.
|
|
170
175
|
|
|
171
176
|
- `delivery-planner`
|
|
172
|
-
- reads `test-list.md`, selects the next pending item, enforces Red-Green-Refactor ordering, and
|
|
177
|
+
- reads `test-list.md`, selects the next pending item, enforces Red-Green-Refactor ordering, and is the sole authority for parallel dispatch decisions
|
|
173
178
|
- `frontend-engineer` / `backend-engineer`
|
|
174
179
|
- implement the selected item only, write the failing test first, write minimal passing code, and refactor without unrelated changes
|
|
175
180
|
- `qa-gatekeeper`
|
|
@@ -194,28 +199,21 @@ All agent-to-agent transitions follow these contracts:
|
|
|
194
199
|
|
|
195
200
|
### Capability Probe (MUST)
|
|
196
201
|
|
|
197
|
-
|
|
198
|
-
2. If subagents are unavailable, explicitly ask for Simulation mode approval.
|
|
199
|
-
3. Without explicit approval, stop the stage.
|
|
202
|
+
- No additional overrides.
|
|
200
203
|
|
|
201
|
-
###
|
|
204
|
+
### Delegation Failure (Hard Stop)
|
|
202
205
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
- `Subagents: simulated (reason: <why unavailable>)`
|
|
206
|
-
- `User approval: <quote or reference>`
|
|
206
|
+
- No additional overrides.
|
|
207
|
+
- Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
|
|
207
208
|
|
|
208
209
|
## Work Orders Summary
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
| Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
|
|
213
|
-
| ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
|
|
214
|
-
| 1 | `role` | `task` | `refs` | `refs` | PASS/REVISE |
|
|
211
|
+
Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
|
|
215
212
|
|
|
216
213
|
### Reviewer Gate (MUST)
|
|
217
214
|
|
|
218
215
|
- Delegate final completion gate to an independent Reviewer.
|
|
216
|
+
- Reviewer response must include `Result: PASS | REVISE` (matching shared-skill-delegation-baseline.md#reviewer-response-template).
|
|
219
217
|
- Reviewer checks Drift Protocol compliance and alignment with `.qfai/assistant/steering/test-layers.md`.
|
|
220
218
|
- Test volume floors/ratios are not gates; they are signals.
|
|
221
219
|
- Do not declare DONE until Reviewer returns `PASS`; otherwise apply `REVISE`.
|
|
@@ -252,6 +250,8 @@ Every major artifact in this stage MUST include this table schema:
|
|
|
252
250
|
|
|
253
251
|
## Completion Contract (Shared)
|
|
254
252
|
|
|
253
|
+
Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#completion-contract-shared`.
|
|
254
|
+
|
|
255
255
|
### Item completion checklist (10-point gate)
|
|
256
256
|
|
|
257
257
|
An item in `test-list.md` may transition to `done` only when ALL of the following are satisfied:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qfai-prototyping
|
|
3
|
-
title: QFAI Prototyping (
|
|
4
|
-
description: "
|
|
3
|
+
title: QFAI Prototyping (Full-Harness Only)
|
|
4
|
+
description: "Build a contract-aligned UI prototype and block completion until full-harness evidence and validate gate pass."
|
|
5
5
|
argument-hint: "[--auto]"
|
|
6
6
|
allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
|
|
7
7
|
roles:
|
|
@@ -16,235 +16,225 @@ roles:
|
|
|
16
16
|
product-surface-reviewer,
|
|
17
17
|
qa-gatekeeper,
|
|
18
18
|
]
|
|
19
|
-
routing-profile: ui-
|
|
19
|
+
routing-profile: ui-surface-aware
|
|
20
20
|
mode: execution-focused
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
<!-- QFAI Skill Body (SSOT) -->
|
|
24
|
-
|
|
25
23
|
## /qfai-prototyping
|
|
26
24
|
|
|
27
25
|
[DRIFT-PROTOCOL:MANDATORY]
|
|
28
26
|
|
|
29
|
-
This skill is
|
|
27
|
+
This skill is static-first for planning and file review, but the package execution contract is `full-harness` only.
|
|
28
|
+
Do not default or downgrade prototyping modes.
|
|
30
29
|
|
|
31
30
|
## CRITICAL CONSTRAINTS (Read First)
|
|
32
31
|
|
|
33
|
-
- Scope is
|
|
34
|
-
- Evidence is mandatory in
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- `uiFidelity` is
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
32
|
+
- Scope is all specs from `.qfai/specs/spec-*`.
|
|
33
|
+
- Evidence is mandatory in markdown + json under `.qfai/evidence/`.
|
|
34
|
+
- DONE is forbidden until prototyping evidence, reviewer gate, and `qfai validate --fail-on error` pass.
|
|
35
|
+
- Supported prototyping surfaces are `web`, `mobile`, `desktop`, and `mixed`.
|
|
36
|
+
- `cli`, API-only, backend-only, and `ui_bearing: false` classifications are not prototyping execution targets.
|
|
37
|
+
- Canonical screen contracts in `discussion-*/uiux/40_screen_contracts.md` are mandatory.
|
|
38
|
+
- Browser QA, render evidence, runtimeGate, uiFidelity, specCoverage, and `fullHarness` are mandatory.
|
|
39
|
+
- `uiFidelity` is screen-level and must be built from real render/browser evidence.
|
|
40
|
+
- `mockPaths` is a negative-only issue ledger with `fail|finding` only.
|
|
41
|
+
- Calibration pack is the SSOT. Runtime and validator both resolve from `calibrationRef.packPath`.
|
|
42
|
+
- `--reviewer <id>` is mandatory and placeholder reviewer ids are rejected.
|
|
43
|
+
- L1 and L2 findings must be fixed or dispositioned before PASS.
|
|
44
44
|
|
|
45
45
|
## Goal
|
|
46
46
|
|
|
47
|
-
Build the minimum runnable
|
|
47
|
+
Build the minimum runnable slice for all specs and produce canonical `full-harness` evidence under `.qfai/evidence/`.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Mode
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
- Contract redesign
|
|
53
|
-
- Public CLI surface expansion
|
|
51
|
+
### Full-harness
|
|
54
52
|
|
|
55
|
-
|
|
53
|
+
- Full-harness is the package default when prototyping execution is valid.
|
|
54
|
+
- Each `qfai prototyping run --mode full-harness --reviewer <id>` invocation records exactly one measured iteration.
|
|
55
|
+
- Multiple iterations are formed only by real code changes between runs.
|
|
56
|
+
- The runtime does not self-modify code and does not fabricate evidence.
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
## Obligation matrix
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
| surface / mode | specs | runtimeGate | uiFidelity | render evidence | browser QA | fullHarness |
|
|
61
|
+
| ---------------------- | -------- | ----------- | ---------- | --------------- | ---------- | ----------- |
|
|
62
|
+
| web / full-harness | required | required | required | required | required | required |
|
|
63
|
+
| mobile / full-harness | required | required | required | required | required | required |
|
|
64
|
+
| desktop / full-harness | required | required | required | required | required | required |
|
|
65
|
+
| mixed / full-harness | required | required | required | required | required | required |
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
## Required evidence
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
- `mode.effective` (required)
|
|
67
|
-
- `mode.source` (required)
|
|
68
|
-
- `mode.rationale` (required)
|
|
69
|
-
- `mode.discussionRecommendation` (optional)
|
|
69
|
+
## Evidence (MANDATORY)
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
- `.qfai/evidence/prototyping.md`
|
|
72
|
+
- `.qfai/evidence/prototyping.json`
|
|
73
|
+
- `.qfai/evidence/render.json`
|
|
74
|
+
- `.qfai/evidence/browser-qa.json`
|
|
75
|
+
- `.qfai/evidence/fullHarness.exit.json`
|
|
76
|
+
- `.qfai/evidence/fullHarness.handoff.json`
|
|
77
|
+
- `.qfai/evidence/fullHarness.fakeUiDetection.json`
|
|
72
78
|
|
|
73
|
-
|
|
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.
|
|
79
|
+
## Truthfulness rules
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
- `mode.effective` must be `full-harness`.
|
|
82
|
+
- `runtimeGate` is observed-only. Synthetic status codes are invalid.
|
|
83
|
+
- `runtimeGate.evidenceRefs` must contain concrete render/browser QA/spec refs only.
|
|
84
|
+
- `specCoverage` must use concrete declared refs and concrete observed refs only.
|
|
85
|
+
- Browser QA evidence must be preserved per screen.
|
|
86
|
+
- `actionsWired` must reflect actionable control coverage, not finding counts.
|
|
87
|
+
- `reviewerSignoff.status` represents final decision, not mere completion.
|
|
88
|
+
- `reviewerLogs[].verdict` must align with decision/termination semantics.
|
|
79
89
|
|
|
80
|
-
|
|
90
|
+
## Review semantics
|
|
81
91
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
92
|
+
- `accepted` -> `approved`
|
|
93
|
+
- `rejected` -> `rejected`
|
|
94
|
+
- `abandoned` -> `abandoned`
|
|
95
|
+
- Plateau stop or max-iterations stop must not produce `approved`.
|
|
86
96
|
|
|
87
|
-
|
|
97
|
+
## Delegation Scope Table
|
|
88
98
|
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
- UI-bearing projects require `uiFidelity`.
|
|
92
|
-
- Runtime gate, render bundle, and browser QA bundle are optional.
|
|
99
|
+
All sub-agent delegation in this skill MUST follow the category-to-role mapping below.
|
|
100
|
+
Assigning a task to a role not listed for the category is a violation and MUST be flagged.
|
|
93
101
|
|
|
94
|
-
|
|
102
|
+
| Category | Allowed Role(s) |
|
|
103
|
+
| ------------------ | ------------------------------------------------------ |
|
|
104
|
+
| UI implementation | frontend-engineer, product-experience-architect |
|
|
105
|
+
| Screenshot capture | devops-ci-engineer |
|
|
106
|
+
| Evaluation L1-L2 | product-surface-reviewer, product-experience-architect |
|
|
107
|
+
| Build | devops-ci-engineer, backend-engineer |
|
|
95
108
|
|
|
96
|
-
|
|
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.
|
|
109
|
+
Any delegation map entry that assigns a category to an undefined or unlisted role (e.g., `"generic-code-writer"`) MUST produce a violation finding naming the undefined role and the category.
|
|
100
110
|
|
|
101
|
-
##
|
|
111
|
+
## Required process
|
|
102
112
|
|
|
103
|
-
###
|
|
113
|
+
### Step 0 — Execution Plan (executionPlan)
|
|
104
114
|
|
|
105
|
-
|
|
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** |
|
|
115
|
+
Before any code is written, create an `executionPlan` record with the following fields:
|
|
113
116
|
|
|
114
|
-
`
|
|
117
|
+
- `targetIterations`: integer; minimum 2 for full-harness
|
|
118
|
+
- `evaluationAxesSource`: reference to the discussion pack evaluation-family files (20/21/22/23)
|
|
119
|
+
- `delegationMap`: category-to-role assignments per Delegation Scope Table above
|
|
120
|
+
- `plannedAt`: ISO-8601 timestamp
|
|
115
121
|
|
|
116
|
-
|
|
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
|
|
122
|
+
The executionPlan MUST be present in `prototyping.json` when `mode=full-harness`. A validator MUST reject any full-harness record without an executionPlan.
|
|
120
123
|
|
|
121
|
-
|
|
124
|
+
### Iteration Gate
|
|
122
125
|
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
+
- full-harness convergence requires a minimum of 2 iterations.
|
|
127
|
+
- A single-iteration run that reports `converged=true` is invalid; the iteration gate MUST raise an error with message "minimum 2 iterations required before convergence".
|
|
128
|
+
- The phase transition from iteration N to N+1 is blocked until `terminationCondition` is met or the gate explicitly authorizes continuation.
|
|
126
129
|
|
|
127
|
-
|
|
130
|
+
### 5-Step Iteration Cycle
|
|
128
131
|
|
|
129
|
-
|
|
132
|
+
Each full-harness iteration follows this fixed sequence:
|
|
130
133
|
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
- critique summary with `L1` / `L2` findings and disposition
|
|
134
|
+
1. **Capture** — Run `packages/qfai/assets/scripts/capture-screenshots.js --url <url> --out <dir>` and record screenshot paths with timestamps under `scoringTrace[i].screenshotDir`.
|
|
135
|
+
2. **Evaluate** — Launch L1 and L2 evaluator sub-agents with full context bundle: (a) screenshots from Step 1, (b) axisDefs from evaluation-family 20/21/22/23, (c) previousScore from prior iteration, (d) designSystemChecklist from `uiux/12_design_system.md`.
|
|
136
|
+
3. **Identify** — Aggregate L1 + L2 findings; flag immediate-fix items.
|
|
137
|
+
4. **Fix** — Apply fixes per finding disposition; do not close items without evidence.
|
|
138
|
+
5. **Re-evaluate** — Re-run Steps 1–4; compare new score to prior score to check plateau.
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
The sequence MUST NOT be permuted. Parallel execution of Capture+Evaluate is prohibited.
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
- ui-bearing: `uiFidelity` optional, render/browser optional
|
|
142
|
-
- non-ui: UI-specific evidence is n/a
|
|
142
|
+
### Evaluator Input — 4 Required Elements
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
When launching any L1 or L2 evaluator sub-agent, all 4 elements MUST be present in the input:
|
|
145
145
|
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
(a) screenshots — paths produced by capture-screenshots.js for the current iteration
|
|
147
|
+
(b) axisDefs — scoring axes from discussion-pack evaluation-family (20/21/22/23)
|
|
148
|
+
(c) previousScore — aggregate score from the prior iteration (null for iteration 1)
|
|
149
|
+
(d) designSystemChecklist — the compliance checklist derived from `uiux/12_design_system.md`
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
If any element is missing, a reviewer check MUST raise a finding naming the missing element.
|
|
152
|
+
Missing element (d) is a common error when `uiux/12_design_system.md` is absent; the reviewer MUST still flag it.
|
|
152
153
|
|
|
153
|
-
|
|
154
|
-
- ui-bearing: `runtimeGate`, `.qfai/evidence/render.json`, `.qfai/evidence/browser-qa.json`, `uiFidelity`
|
|
155
|
-
- non-ui: UI-specific evidence remains n/a
|
|
154
|
+
### Visual Quality Structural Checklist
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
Each iteration evaluation MUST score all 6 visual categories:
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
1. Color — color palette adherence to design system tokens
|
|
159
|
+
2. Typography — type scale, weight, line-height compliance
|
|
160
|
+
3. Spacing — spacing scale and grid alignment
|
|
161
|
+
4. Border radius — border-radius consistency across components
|
|
162
|
+
5. Shadow — shadow elevation and opacity standards
|
|
163
|
+
6. Do's&Don'ts — adherence to explicit do/don't rules from `uiux/12_design_system.md`
|
|
160
164
|
|
|
161
|
-
|
|
162
|
-
- `fullHarness.available`
|
|
163
|
-
- `fullHarness.runId`
|
|
164
|
-
- `fullHarness.iterationCount >= 1`
|
|
165
|
-
- `fullHarness.bestIteration >= 1`
|
|
166
|
-
- `fullHarness.terminationReason`
|
|
167
|
-
- `fullHarness.reviewerSignoff`
|
|
168
|
-
- `fullHarness.scoringTrace`
|
|
165
|
+
### Lighthouse Gate (MUST for web full-harness)
|
|
169
166
|
|
|
170
|
-
|
|
167
|
+
When `surface=web` and `mode=full-harness`, a Lighthouse performance/accessibility report MUST be captured and attached to the evidence. The reviewer gate MUST raise an error "Lighthouse Gate is MUST for full-harness + web surface" when the report is absent.
|
|
171
168
|
|
|
172
|
-
|
|
173
|
-
- browser QA bundle: `.qfai/evidence/browser-qa.json`
|
|
169
|
+
### Steps (continued)
|
|
174
170
|
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
1. Read the latest discussion pack and verify `prototyping.yaml`, `04_Sources.md`, `20/21/22/23`, and `40_screen_contracts.md`.
|
|
172
|
+
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`) -> screen contracts / `40_screen_contracts.md`.
|
|
173
|
+
2. Verify the classification is UI-bearing and the surface is `web`, `mobile`, `desktop`, or `mixed`.
|
|
174
|
+
3. Create the executionPlan (Step 0 above).
|
|
175
|
+
4. Implement the minimum runnable slice for all specs.
|
|
176
|
+
5. Run `qfai prototyping run --mode full-harness --reviewer <id>` — this executes the 5-Step Iteration Cycle per iteration.
|
|
177
|
+
6. Review render evidence, HTML snapshots, Browser QA, runtimeGate, uiFidelity, and specCoverage for every declared screen.
|
|
178
|
+
7. Fix findings and rerun until the evidence is coherent.
|
|
179
|
+
8. Run `qfai validate --fail-on error`.
|
|
180
|
+
9. Route an independent reviewer and do not declare completion until the result is `PASS`.
|
|
177
181
|
|
|
178
|
-
##
|
|
182
|
+
## Reviewer gate
|
|
179
183
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
### Reviewer Gate (MUST)
|
|
185
|
+
|
|
186
|
+
- Reviewer must verify full-harness evidence completeness.
|
|
187
|
+
- Reviewer response must include `Result: PASS | REVISE` (matching shared-skill-delegation-baseline.md#reviewer-response-template).
|
|
188
|
+
- Reviewer must verify calibration pack usage via `calibrationRef`.
|
|
189
|
+
- Reviewer must reject self-reference, synthetic refs, and `mockPaths.status="pass"`.
|
|
190
|
+
- Reviewer must verify `reviewerSignoff`, `reviewerLogs`, `terminationReason`, and `finalDecision` are semantically aligned.
|
|
191
|
+
- Reviewer must verify Drift Protocol compliance and alignment with `test-layers.md`.
|
|
192
|
+
- Review volume guidance remains signals, not gates.
|
|
193
|
+
- Reviewer returns PASS or REVISE only.
|
|
189
194
|
|
|
190
195
|
## Sub-agent Delegation (MANDATORY)
|
|
191
196
|
|
|
197
|
+
Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
|
|
198
|
+
|
|
192
199
|
### Orchestrator Protocol (MUST)
|
|
193
200
|
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
201
|
+
- Additional prototyping-specific overrides:
|
|
202
|
+
- do not self-approve;
|
|
203
|
+
- keep evidence paths canonical and integrate delegated results only.
|
|
197
204
|
|
|
198
205
|
### Capability Probe (MUST)
|
|
199
206
|
|
|
200
|
-
|
|
201
|
-
2. If subagents are unavailable, explicitly ask for Simulation mode approval.
|
|
202
|
-
3. Without explicit approval, stop the stage.
|
|
207
|
+
- No additional overrides.
|
|
203
208
|
|
|
204
|
-
###
|
|
209
|
+
### Delegation Failure (Hard Stop)
|
|
205
210
|
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
- `Subagents: simulated (reason: <why unavailable>)`
|
|
209
|
-
- `User approval: <quote or reference>`
|
|
211
|
+
- No additional overrides.
|
|
212
|
+
- Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
|
|
210
213
|
|
|
211
214
|
## Work Orders Summary
|
|
212
215
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
| Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
|
|
216
|
-
| ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
|
|
217
|
-
| 1 | `role` | `task` | `refs` | `refs` | PASS/REVISE |
|
|
218
|
-
|
|
219
|
-
### Reviewer Gate (MUST)
|
|
220
|
-
|
|
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`.
|
|
216
|
+
Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
|
|
226
217
|
|
|
227
218
|
## Completion Contract (Shared)
|
|
228
219
|
|
|
229
|
-
|
|
220
|
+
Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#completion-contract-shared`.
|
|
221
|
+
|
|
222
|
+
Prototyping-specific additions:
|
|
230
223
|
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
- non-ui runs must preserve `n/a` semantics without fake placeholders
|
|
224
|
+
- all specs are covered;
|
|
225
|
+
- full-harness evidence is complete and truthful;
|
|
226
|
+
- `qfai validate --fail-on error` passes;
|
|
227
|
+
- reviewer returns `PASS`.
|
|
236
228
|
|
|
237
229
|
## FINAL CHECKLIST (Check Last)
|
|
238
230
|
|
|
239
231
|
### Completion Checklist (MUST)
|
|
240
232
|
|
|
241
233
|
- All specs are covered in the Coverage Matrix.
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
- `uiFidelity` is present when required.
|
|
247
|
-
- Reviewer returned `PASS`; otherwise status is `REVISE`.
|
|
234
|
+
- Required full-harness evidence is present.
|
|
235
|
+
- 404 findings are resolved or the run is not complete.
|
|
236
|
+
- uiFidelity is present when required.
|
|
237
|
+
- Reviewer returned PASS; otherwise status is REVISE.
|
|
248
238
|
|
|
249
239
|
## Completion Message & Next Actions (MUST)
|
|
250
240
|
|