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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* capture-screenshots.js — Headless screenshot capture utility for qfai-prototyping.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node capture-screenshots.js --url <url> --out <dir> [--width <px>] [--height <px>]
|
|
7
|
+
*
|
|
8
|
+
* Outputs:
|
|
9
|
+
* <dir>/screenshot-<ISOtimestamp>.png — full-page screenshot
|
|
10
|
+
* <dir>/manifest.json — { url, capturedAt, files: [{path, timestamp}] }
|
|
11
|
+
*
|
|
12
|
+
* Exit codes:
|
|
13
|
+
* 0 — success (at least one screenshot captured)
|
|
14
|
+
* 1 — argument error (missing --url or --out)
|
|
15
|
+
* 2 — capture error (unreachable URL or write failure)
|
|
16
|
+
*
|
|
17
|
+
* Input/output contract:
|
|
18
|
+
* Input : --url (string, required) — the page URL to capture
|
|
19
|
+
* --out (string, required) — directory to write screenshots; created if absent
|
|
20
|
+
* --width (number, default 1280) — viewport width in px
|
|
21
|
+
* --height (number, default 800) — viewport height in px
|
|
22
|
+
*
|
|
23
|
+
* Output: each screenshot filename includes an ISO-8601-like timestamp suffix
|
|
24
|
+
* (e.g. screenshot-2026-04-18T130000123Z.png) so filenames are
|
|
25
|
+
* sortable and unique per run.
|
|
26
|
+
*
|
|
27
|
+
* spec-0012 TC-0012-0291 / AC-0012-0176
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
"use strict";
|
|
31
|
+
|
|
32
|
+
import fs from "node:fs";
|
|
33
|
+
import path from "node:path";
|
|
34
|
+
import { execSync } from "node:child_process";
|
|
35
|
+
|
|
36
|
+
function parseArgs(argv) {
|
|
37
|
+
const args = {};
|
|
38
|
+
for (let i = 0; i < argv.length; i++) {
|
|
39
|
+
if (argv[i] === "--url" && argv[i + 1]) {
|
|
40
|
+
args.url = argv[++i];
|
|
41
|
+
} else if (argv[i] === "--out" && argv[i + 1]) {
|
|
42
|
+
args.out = argv[++i];
|
|
43
|
+
} else if (argv[i] === "--width" && argv[i + 1]) {
|
|
44
|
+
args.width = parseInt(argv[++i], 10);
|
|
45
|
+
} else if (argv[i] === "--height" && argv[i + 1]) {
|
|
46
|
+
args.height = parseInt(argv[++i], 10);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return args;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isoTimestamp() {
|
|
53
|
+
return new Date().toISOString().replace(/[:.]/g, "").replace("T", "T").slice(0, -1) + "Z";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function main() {
|
|
57
|
+
const args = parseArgs(process.argv.slice(2));
|
|
58
|
+
|
|
59
|
+
if (!args.url) {
|
|
60
|
+
console.error("Error: --url is required");
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
if (!args.out) {
|
|
64
|
+
console.error("Error: --out is required");
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const outDir = path.resolve(args.out);
|
|
69
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
70
|
+
|
|
71
|
+
const timestamp = isoTimestamp();
|
|
72
|
+
const filename = `screenshot-${timestamp}.png`;
|
|
73
|
+
const screenshotPath = path.join(outDir, filename);
|
|
74
|
+
|
|
75
|
+
let captured = false;
|
|
76
|
+
let captureError = null;
|
|
77
|
+
try {
|
|
78
|
+
// Try puppeteer-based capture (available when installed). Any failure
|
|
79
|
+
// must surface as a capture error; writing fake PNG bytes would corrupt
|
|
80
|
+
// the evidence chain by making downstream steps think capture succeeded.
|
|
81
|
+
const puppeteerScript = `
|
|
82
|
+
const puppeteer = require('puppeteer');
|
|
83
|
+
(async () => {
|
|
84
|
+
const browser = await puppeteer.launch({ args: ['--no-sandbox'] });
|
|
85
|
+
const page = await browser.newPage();
|
|
86
|
+
await page.setViewport({ width: ${args.width || 1280}, height: ${args.height || 800} });
|
|
87
|
+
await page.goto(${JSON.stringify(args.url)}, { waitUntil: 'networkidle0', timeout: 30000 });
|
|
88
|
+
await page.screenshot({ path: ${JSON.stringify(screenshotPath)}, fullPage: true });
|
|
89
|
+
await browser.close();
|
|
90
|
+
})();
|
|
91
|
+
`;
|
|
92
|
+
const tmpScript = path.join(outDir, `_tmp_capture_${timestamp}.js`);
|
|
93
|
+
fs.writeFileSync(tmpScript, puppeteerScript, "utf-8");
|
|
94
|
+
try {
|
|
95
|
+
execSync(`node "${tmpScript}"`, { timeout: 60000, stdio: "pipe" });
|
|
96
|
+
captured = true;
|
|
97
|
+
} finally {
|
|
98
|
+
try {
|
|
99
|
+
fs.unlinkSync(tmpScript);
|
|
100
|
+
} catch {
|
|
101
|
+
/* ignore */
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} catch (error) {
|
|
105
|
+
captureError = error;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!captured) {
|
|
109
|
+
const detail =
|
|
110
|
+
captureError && typeof captureError.message === "string"
|
|
111
|
+
? captureError.message
|
|
112
|
+
: String(captureError || "unknown error");
|
|
113
|
+
console.error(`Error: capture failed (${detail})`);
|
|
114
|
+
process.exit(2);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const manifest = {
|
|
118
|
+
url: args.url,
|
|
119
|
+
capturedAt: new Date().toISOString(),
|
|
120
|
+
files: [{ path: screenshotPath, timestamp }],
|
|
121
|
+
};
|
|
122
|
+
fs.writeFileSync(path.join(outDir, "manifest.json"), JSON.stringify(manifest, null, 2), "utf-8");
|
|
123
|
+
|
|
124
|
+
console.log(screenshotPath);
|
|
125
|
+
process.exit(0);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
main();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UIX-REV: Comparison Review
|
|
2
2
|
|
|
3
|
-
Review
|
|
3
|
+
Review only `30_option_comparison.md` as the option comparison artifact.
|
|
4
4
|
|
|
5
5
|
## Comparison Quality (30_option_comparison.md)
|
|
6
6
|
|
|
@@ -9,22 +9,10 @@ Review option comparison and selected anchor screen as independent artifacts.
|
|
|
9
9
|
- Evaluation criteria must reference the 3-layer evaluation family
|
|
10
10
|
- Rejected/deferred options must have explicit rationale
|
|
11
11
|
- Reconsideration conditions must be documented for deferred options
|
|
12
|
+
- Do not move selected anchor ownership back into `30_option_comparison.md`
|
|
12
13
|
|
|
13
14
|
### Trend-derived conversion check
|
|
14
15
|
|
|
15
16
|
- Trend scan results are converted to comparison axes
|
|
16
17
|
- Stale / overused AI slop avoidance is reflected in comparison criteria
|
|
17
|
-
|
|
18
|
-
## Selected Direction Quality (31_selected_anchor_screen.md)
|
|
19
|
-
|
|
20
|
-
- `selected_option` must reference one of the compared options in `30_option_comparison.md`
|
|
21
|
-
- `why_selected` must provide rationale aligned with 3-layer evaluation family
|
|
22
|
-
- Anchor screen must represent the canonical visual direction
|
|
23
|
-
- Downstream strategy (`10_implementation_strategy.md`) must align with selected direction
|
|
24
|
-
- Downstream contracts (`40_screen_contracts.md`) must be consistent with selected direction
|
|
25
|
-
- Deferred options must document reconsideration conditions
|
|
26
|
-
|
|
27
|
-
### Trend-derived conversion check
|
|
28
|
-
|
|
29
|
-
- Trend scan results are reflected in selected direction rationale
|
|
30
|
-
- Stale / overused AI slop avoidance is reflected in selection
|
|
18
|
+
- Keep selected-anchor ownership in `31_selected_anchor_screen.md` and scoring-ready field ownership in `50_review_input_bundle.md`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# UIX-REV: Screen Contracts Review (40_screen_contracts.md)
|
|
1
|
+
# UIX-REV: Screen Contracts Review (`40_screen_contracts.md`)
|
|
2
2
|
|
|
3
3
|
Review screen contracts for canonical 11-field schema completeness.
|
|
4
4
|
|
|
@@ -22,4 +22,7 @@ Review screen contracts for canonical 11-field schema completeness.
|
|
|
22
22
|
- Routes must be unique across all contracts
|
|
23
23
|
- Required states must include `default`, `loading`, `empty`, and `error`
|
|
24
24
|
- All 11 fields must be present and non-empty for each screen
|
|
25
|
-
- Screen contracts must
|
|
25
|
+
- Screen contracts must stay consistent with `31_selected_anchor_screen.md`
|
|
26
|
+
- Screen contracts must stay consistent with Browser QA findings and screen-linked evidence
|
|
27
|
+
- Do not reference legacy filenames such as `40_contracts.md`
|
|
28
|
+
- Keep wording aligned with scoring-ready canonical fields and avoid stale migration vocabulary
|
|
@@ -25,9 +25,11 @@ Each evaluation axis must include:
|
|
|
25
25
|
|
|
26
26
|
## Evaluation Axes Quality
|
|
27
27
|
|
|
28
|
-
- Each trend-derived row must include source_translation
|
|
29
28
|
- Axes must be measurable and verifiable
|
|
30
29
|
- No generic/boilerplate axes without taste/trend derivation
|
|
30
|
+
- Each axis must define `origin`, `intent`, `why_it_matters`, `score_scale`, `score_anchors.low/mid/high`
|
|
31
|
+
- Each axis must define `positive_signals`, `negative_signals`, `anti_patterns`, `evidence_required`, `minimum_floor`
|
|
32
|
+
- Each axis must define `source_refs`, `goal_refs`, and `review_questions`
|
|
31
33
|
|
|
32
34
|
## Aggregate Scoring Rules
|
|
33
35
|
|
|
@@ -46,5 +48,11 @@ Canonical field names (must match `23_design_eval_aggregate.md`):
|
|
|
46
48
|
### Trend-derived conversion check
|
|
47
49
|
|
|
48
50
|
- Trend scan results are converted to scoring axes
|
|
49
|
-
- Trend scan results are reflected in selected
|
|
51
|
+
- Trend scan results are reflected in selected anchor
|
|
50
52
|
- Stale / overused AI slop avoidance is reflected in comparison and selection
|
|
53
|
+
|
|
54
|
+
## Aggregate Review Focus
|
|
55
|
+
|
|
56
|
+
- Review axis quality, overlap, and minimum floors as a single aggregate system
|
|
57
|
+
- Review `source_refs` and `goal_refs` linkage for every scored axis
|
|
58
|
+
- Remove old aggregate vocabulary and keep wording aligned with `23_design_eval_aggregate.md`
|
|
@@ -2,22 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Review the UI/UX strategy document (`10_implementation_strategy.md`) for completeness and quality.
|
|
4
4
|
|
|
5
|
-
This review is scoped to strategy completeness only. Selected
|
|
5
|
+
This review is scoped to strategy completeness only. Selected anchor evaluation belongs to `comparison-review.md`.
|
|
6
6
|
|
|
7
7
|
## Required Fields
|
|
8
8
|
|
|
9
9
|
- `surface`
|
|
10
|
+
- `selection_required`
|
|
10
11
|
- `decision`
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
-
|
|
12
|
+
- `candidate_options`
|
|
13
|
+
- `chosen_option`
|
|
14
|
+
- `rationale`
|
|
15
|
+
- `verification_expectations`
|
|
16
|
+
- `notes_for_reviewer`
|
|
16
17
|
|
|
17
18
|
## Alignment Check
|
|
18
19
|
|
|
19
|
-
-
|
|
20
|
+
- `chosen_option` must exist in `candidate_options`
|
|
21
|
+
- `decision` and `chosen_option` should use coherent vocabulary
|
|
22
|
+
- Strategy `decision` must be consistent with the selected anchor in `31_selected_anchor_screen.md` (cross-reference only; SSOT judgment is in comparison-review)
|
|
20
23
|
- Strategy must not contradict screen contracts in `40_screen_contracts.md`
|
|
24
|
+
- `selection_required=false` with multiple `candidate_options` should be treated as a warning
|
|
21
25
|
|
|
22
26
|
## Verdict
|
|
23
27
|
|