dsh-desktop-kit 2.23.26 → 2.24.0
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/CHANGELOG.md +31 -2
- package/README.md +75 -19
- package/client.js +1 -1
- package/cordis.patch.yml +151 -5
- package/docs/ARCHITECTURE.md +15 -6
- package/docs/COMPATIBILITY.md +8 -1
- package/docs/DEVELOPMENT.md +1 -0
- package/docs/TEST-2.23.23.md +27 -0
- package/docs/TEST-2.23.27.md +111 -0
- package/docs/TEST-2.24.0.md +123 -0
- package/package.json +3 -3
- package/plugins/dsh-agent-extensions/lib/agents.js +38 -13
- package/plugins/dsh-agent-extensions/lib/board.js +12 -6
- package/plugins/dsh-agent-extensions/lib/swarm.js +3 -1
- package/plugins/dsh-browser-qa/index.js +24 -1
- package/plugins/dsh-browser-qa/lib/pages.js +28 -7
- package/plugins/dsh-browser-qa/lib/qa.js +82 -1
- package/plugins/dsh-browser-qa/lib/ui-gate.js +25 -3
- package/plugins/dsh-project-memory/index.js +15 -9
- package/plugins/dsh-skill-autopilot/index.js +17 -7
- package/skills/manifest.json +11 -6
- package/skills/web-quality/SKILL.md +73 -0
- package/skills-baseline.json +8 -2
|
@@ -14,6 +14,48 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
14
14
|
export const DEFAULT_WIDTHS = Object.freeze([390, 768, 1440]);
|
|
15
15
|
export const DEFAULT_VIEWPORT = Object.freeze({ width: 1440, height: 900 });
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* The responsive matrix an audit must cover for UI work: phones and tablets in
|
|
19
|
+
* both orientations, plus desktop. `matrix: "full"` expands to these pairs.
|
|
20
|
+
*/
|
|
21
|
+
export const RESPONSIVE_MATRIX = Object.freeze([
|
|
22
|
+
{ width: 390, height: 844 },
|
|
23
|
+
{ width: 844, height: 390 },
|
|
24
|
+
{ width: 768, height: 1024 },
|
|
25
|
+
{ width: 1024, height: 768 },
|
|
26
|
+
{ width: 1440, height: 900 },
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
/** Orientation classes the UI gate insists on before a turn may close. */
|
|
30
|
+
export const REQUIRED_ORIENTATIONS = Object.freeze([
|
|
31
|
+
"phone-portrait",
|
|
32
|
+
"phone-landscape",
|
|
33
|
+
"tablet-portrait",
|
|
34
|
+
"tablet-landscape",
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
/** WCAG 1.4.10 reflow floor: 320 CSS px is what a 1280 px viewport becomes at 400% zoom. */
|
|
38
|
+
export const REFLOW_FLOOR_WIDTH = 320;
|
|
39
|
+
|
|
40
|
+
export function deviceClassOf(width, height) {
|
|
41
|
+
// A landscape phone is wide but short, so the short side decides "phone";
|
|
42
|
+
// above that the CSS width separates tablets from desktop.
|
|
43
|
+
const short = Math.min(width, height);
|
|
44
|
+
if (short <= 500) return "phone";
|
|
45
|
+
if (width <= 1200) return "tablet";
|
|
46
|
+
return "desktop";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function orientationOf(width, height) {
|
|
50
|
+
return width > height ? "landscape" : "portrait";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** `phone-portrait`, `tablet-landscape`, `desktop` — the label the gate reads. */
|
|
54
|
+
export function deviceLabel(width, height) {
|
|
55
|
+
const device = deviceClassOf(width, height);
|
|
56
|
+
return device === "desktop" ? "desktop" : `${device}-${orientationOf(width, height)}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
17
59
|
export const LIMITS = Object.freeze({
|
|
18
60
|
minWidth: 200,
|
|
19
61
|
maxWidth: 3840,
|
|
@@ -68,6 +110,28 @@ export function parseWidths(widths, fallback = DEFAULT_WIDTHS) {
|
|
|
68
110
|
return result.length > 0 ? result : [...fallback];
|
|
69
111
|
}
|
|
70
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Explicit audit viewports: `{width, height}` pairs clamped to the viewport
|
|
115
|
+
* range, de-duplicated, at most six. Invalid entries are dropped; an empty
|
|
116
|
+
* result means "use the widths/matrix path".
|
|
117
|
+
*/
|
|
118
|
+
export function parseViewports(viewports) {
|
|
119
|
+
const source = Array.isArray(viewports) ? viewports : [];
|
|
120
|
+
const seen = new Set();
|
|
121
|
+
const result = [];
|
|
122
|
+
for (const raw of source) {
|
|
123
|
+
if (result.length >= LIMITS.maxWidths) break;
|
|
124
|
+
const width = clampInt(raw?.width, LIMITS.minWidth, LIMITS.maxWidth, null);
|
|
125
|
+
const height = clampInt(raw?.height, LIMITS.minHeight, LIMITS.maxHeight, null);
|
|
126
|
+
if (width === null || height === null) continue;
|
|
127
|
+
const key = `${width}x${height}`;
|
|
128
|
+
if (seen.has(key)) continue;
|
|
129
|
+
seen.add(key);
|
|
130
|
+
result.push({ width, height, label: deviceLabel(width, height) });
|
|
131
|
+
}
|
|
132
|
+
return result;
|
|
133
|
+
}
|
|
134
|
+
|
|
71
135
|
export function parseTimeout(value, fallback = LIMITS.defaultTimeoutMs) {
|
|
72
136
|
return clampInt(value, LIMITS.minTimeoutMs, LIMITS.maxTimeoutMs, fallback);
|
|
73
137
|
}
|
|
@@ -695,7 +759,18 @@ export function summarizeAudit(reports = []) {
|
|
|
695
759
|
const list = Array.isArray(reports) ? reports : [];
|
|
696
760
|
const measured = list.filter((report) => report && report.error === undefined && report.skipped !== true);
|
|
697
761
|
const failed = list.filter((report) => report && typeof report.error === "string");
|
|
762
|
+
const orientations = [
|
|
763
|
+
...new Set(
|
|
764
|
+
measured
|
|
765
|
+
.map((report) => report.deviceLabel)
|
|
766
|
+
.filter((label) => typeof label === "string" && label.length > 0),
|
|
767
|
+
),
|
|
768
|
+
];
|
|
769
|
+
const missingOrientations = REQUIRED_ORIENTATIONS.filter((label) => !orientations.includes(label));
|
|
698
770
|
return {
|
|
771
|
+
orientations,
|
|
772
|
+
missingOrientations,
|
|
773
|
+
matrixComplete: missingOrientations.length === 0,
|
|
699
774
|
widthsRequested: list.length,
|
|
700
775
|
widthsChecked: measured.length,
|
|
701
776
|
widthsWithOverflow: measured.filter((report) => report.horizontalOverflow?.hasOverflow === true).length,
|
|
@@ -771,7 +846,7 @@ export function formatAuditText(report = {}) {
|
|
|
771
846
|
];
|
|
772
847
|
if (item.loadTimedOut === true) bits.push("load timeout");
|
|
773
848
|
if (typeof item.screenshot?.path === "string") bits.push(`PNG: ${item.screenshot.path}`);
|
|
774
|
-
lines.push(`- ${item.width}px: ${bits.join(", ")}`);
|
|
849
|
+
lines.push(`- ${item.width}px: ${bits.join(", ")}${typeof item.deviceLabel === "string" ? ` [${item.deviceLabel}]` : ""}`);
|
|
775
850
|
if (Array.isArray(markup.issues) && markup.issues.length > 0) {
|
|
776
851
|
const top = markup.issues.slice(0, 3).map((issue) => `${issue.rule}${issue.selector ? ` (${issue.selector})` : ""}`);
|
|
777
852
|
lines.push(` markup: ${top.join("; ")}${markup.total > top.length ? `; ещё ${markup.total - top.length}` : ""}`);
|
|
@@ -779,9 +854,15 @@ export function formatAuditText(report = {}) {
|
|
|
779
854
|
if (typeof item.markupError === "string") lines.push(` markup: ошибка проверки — ${item.markupError}`);
|
|
780
855
|
}
|
|
781
856
|
const summary = report.summary ?? {};
|
|
857
|
+
const checkedOrientations = Array.isArray(summary.orientations) ? summary.orientations : [];
|
|
858
|
+
lines.push(
|
|
859
|
+
`Покрытие: ${REQUIRED_ORIENTATIONS.map((label) => `${label} ${checkedOrientations.includes(label) ? "✓" : "✗"}`).join(" · ")}` +
|
|
860
|
+
` (matrix ${REQUIRED_ORIENTATIONS.filter((label) => checkedOrientations.includes(label)).length}/${REQUIRED_ORIENTATIONS.length})`,
|
|
861
|
+
);
|
|
782
862
|
lines.push(
|
|
783
863
|
`Итог: overflow на ${summary.widthsWithOverflow ?? 0} из ${summary.widthsChecked ?? 0} ширин · ` +
|
|
784
864
|
`console errors: ${summary.consoleErrors ?? 0} · markup: ${summary.markupIssues ?? 0}` +
|
|
865
|
+
(summary.matrixComplete === true ? " · matrix: полная" : " · matrix: НЕ ПОЛНАЯ") +
|
|
785
866
|
(report.outDir ? ` · PNG: ${report.outDir}` : ""),
|
|
786
867
|
);
|
|
787
868
|
if (report.warnings && report.warnings.length > 0) lines.push(`Предупреждения: ${report.warnings.join("; ")}`);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* accidental infinite turn.
|
|
9
9
|
*/
|
|
10
10
|
import crypto from "node:crypto";
|
|
11
|
+
import { REQUIRED_ORIENTATIONS } from "./qa.js";
|
|
11
12
|
|
|
12
13
|
const UI_FILE = /\.(?:html?|xhtml|css|scss|sass|less|jsx|tsx|vue|svelte|astro|mdx)$/iu;
|
|
13
14
|
const SKIP_PATH = /(?:^|[\\/])(?:node_modules|\.git|\.dsh|dist|build|coverage|qa)(?:[\\/]|$)/iu;
|
|
@@ -63,6 +64,12 @@ function auditFromText(result) {
|
|
|
63
64
|
if (result?.isError === true) return null;
|
|
64
65
|
const text = resultText(result);
|
|
65
66
|
if (!text.includes("browser_qa audit:")) return null;
|
|
67
|
+
const coverage = text.match(/Покрытие: ([^\n]+)/u);
|
|
68
|
+
const orientations = coverage
|
|
69
|
+
? [...coverage[1].matchAll(/(phone-portrait|phone-landscape|tablet-portrait|tablet-landscape)\s*(✓|✗)/gu)]
|
|
70
|
+
.filter((match) => match[2] === "✓")
|
|
71
|
+
.map((match) => match[1])
|
|
72
|
+
: [];
|
|
66
73
|
const summary = text.match(/Итог: overflow на (\d+) из (\d+)[^\n]*console errors: (\d+)[^\n]*markup: (\d+)/iu);
|
|
67
74
|
if (summary) {
|
|
68
75
|
return {
|
|
@@ -72,6 +79,8 @@ function auditFromText(result) {
|
|
|
72
79
|
widthsChecked: Number(summary[2]),
|
|
73
80
|
consoleErrors: Number(summary[3]),
|
|
74
81
|
markupIssues: Number(summary[4]),
|
|
82
|
+
orientations,
|
|
83
|
+
matrixComplete: REQUIRED_ORIENTATIONS.every((label) => orientations.includes(label)),
|
|
75
84
|
},
|
|
76
85
|
};
|
|
77
86
|
}
|
|
@@ -84,14 +93,24 @@ function auditFromText(result) {
|
|
|
84
93
|
widthsChecked: rows.length,
|
|
85
94
|
consoleErrors: rows.reduce((sum, row) => sum + Number(row[3]), 0),
|
|
86
95
|
markupIssues: rows.reduce((sum, row) => sum + Number(row[4]), 0),
|
|
96
|
+
orientations,
|
|
97
|
+
matrixComplete: REQUIRED_ORIENTATIONS.every((label) => orientations.includes(label)),
|
|
87
98
|
},
|
|
88
99
|
};
|
|
89
100
|
}
|
|
90
101
|
|
|
102
|
+
/**
|
|
103
|
+
* A clean audit means zero overflow, console and markup issues *and* coverage
|
|
104
|
+
* of every required orientation. Phones and tablets in both orientations are
|
|
105
|
+
* the contract; a 3-width desktop-centred pass is not clean.
|
|
106
|
+
*/
|
|
91
107
|
function cleanAudit(summary) {
|
|
92
108
|
const checked = Number(summary?.widthsChecked ?? 1);
|
|
109
|
+
const orientations = Array.isArray(summary?.orientations) ? summary.orientations : [];
|
|
110
|
+
const matrixComplete = REQUIRED_ORIENTATIONS.every((label) => orientations.includes(label));
|
|
93
111
|
return (
|
|
94
112
|
checked > 0 &&
|
|
113
|
+
matrixComplete &&
|
|
95
114
|
Number(summary?.widthsWithOverflow ?? 0) === 0 &&
|
|
96
115
|
Number(summary?.consoleErrors ?? 0) === 0 &&
|
|
97
116
|
Number(summary?.markupIssues ?? 0) === 0
|
|
@@ -100,7 +119,9 @@ function cleanAudit(summary) {
|
|
|
100
119
|
|
|
101
120
|
function summaryText(summary) {
|
|
102
121
|
if (!summary) return "audit ещё не запускался";
|
|
103
|
-
|
|
122
|
+
const orientations = Array.isArray(summary?.orientations) ? summary.orientations : [];
|
|
123
|
+
const coverage = REQUIRED_ORIENTATIONS.filter((label) => orientations.includes(label)).length;
|
|
124
|
+
return `audit: overflow ${summary.widthsWithOverflow ?? "?"} · console ${summary.consoleErrors ?? "?"} · markup ${summary.markupIssues ?? "?"} · matrix ${coverage}/${REQUIRED_ORIENTATIONS.length}`;
|
|
104
125
|
}
|
|
105
126
|
|
|
106
127
|
export function createUiGate(ctx) {
|
|
@@ -169,8 +190,9 @@ export function createUiGate(ctx) {
|
|
|
169
190
|
"<ui-gate>",
|
|
170
191
|
`Изменены UI-файлы: ${files}.`,
|
|
171
192
|
`Последний ${summaryText(state.summary)}.`,
|
|
172
|
-
"Ход не закрыт: запусти browser_qa action=audit
|
|
173
|
-
"
|
|
193
|
+
"Ход не закрыт: запусти browser_qa action=audit matrix=full (телефон 390×844 и 844×390, планшет 768×1024 и 1024×768, десктоп 1440×900; лучше с outDir).",
|
|
194
|
+
"Overflow проверяй отдельно на каждой ширине и ориентации: назови элементы-виновники, почини, прогони audit заново.",
|
|
195
|
+
"Исправь также console errors и markup (alt, label, duplicate id, heading order). Не заявляй «готово», пока audit не чистый и покрытие не 4/4.",
|
|
174
196
|
"</ui-gate>",
|
|
175
197
|
].join("\n");
|
|
176
198
|
try {
|
|
@@ -1387,19 +1387,25 @@ ${summary}
|
|
|
1387
1387
|
let activation;
|
|
1388
1388
|
try {
|
|
1389
1389
|
const prompt = buildCuratorPrompt(project, session, entry, reason);
|
|
1390
|
-
|
|
1390
|
+
const curatorRequest = {
|
|
1391
|
+
parent: agent,
|
|
1392
|
+
prompt: [{ type: "text", text: prompt }],
|
|
1393
|
+
cwd: project.roots[0],
|
|
1394
|
+
agentPreset: "standard",
|
|
1395
|
+
maxDepth: 1,
|
|
1396
|
+
};
|
|
1397
|
+
const curatorBase = {
|
|
1391
1398
|
provider: "spawn",
|
|
1392
1399
|
label: "project-memory curator",
|
|
1393
1400
|
delivery: "caller",
|
|
1394
1401
|
signal: controller.signal,
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
});
|
|
1402
|
+
};
|
|
1403
|
+
/* DSH 0.2.2-rc.3 flattened the nested `request` into the activation spec. */
|
|
1404
|
+
activation = subagents.startActivation(
|
|
1405
|
+
typeof subagents.list === "function"
|
|
1406
|
+
? { ...curatorBase, request: curatorRequest }
|
|
1407
|
+
: { ...curatorBase, ...curatorRequest },
|
|
1408
|
+
);
|
|
1403
1409
|
logAccess(`curator-start session=${sessionId} child=${String(activation.childId)} project=${project.slug}`);
|
|
1404
1410
|
const result = await activation.result;
|
|
1405
1411
|
const output = typeof result?.output === "string" ? result.output.replace(/\s+/gu, " ").trim() : "";
|
|
@@ -36,15 +36,25 @@ function readKitSettings() {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function qualityContractText() {
|
|
39
|
-
const
|
|
39
|
+
const researchFirst = readKitSettings().researchFirst !== false;
|
|
40
|
+
const clauses = [
|
|
41
|
+
researchFirst
|
|
42
|
+
? "0) Референс сначала: перед задачей собери 2+ реально существующих примера и практики (аналогичные сайты и платформы, галереи, официальные доки) — с датой и ссылкой; для рекомендаций дай 2–3 варианта и объясни выбор."
|
|
43
|
+
: "0) Внешние факты — только web_search/web_fetch: 2+ независимых источника со ссылкой и датой.",
|
|
44
|
+
"1) UI всегда премиального уровня: сетка 4/8, дизайн-токены, типографическая шкала, все состояния (default, hover, focus-visible, active, disabled, loading, empty, error, success), подсказки рядом с полями.",
|
|
45
|
+
"2) Адаптив всегда: десктоп, планшет (портрет и ландшафт), телефон (портрет и ландшафт). «Только 1440» — брак.",
|
|
46
|
+
"3) OVERFLOW проверяй отдельно на КАЖДОЙ ширине и ориентации: browser_qa action=audit matrix=full, назови элементы-виновники, почини, прогони заново. Отдельный прогон обязателен, даже если «выглядит нормально».",
|
|
47
|
+
"4) Типографика и подсказки по делу: helper text, единицы, примеры; пустые и ошибочные состояния — полноценные экраны, а не заглушки.",
|
|
48
|
+
"5) Качество премиальное: контраст 4.5:1, видимый focus, тап-таргеты ≥44px, движение 150–250 мс с prefers-reduced-motion, у кнопок и ссылок понятные имена.",
|
|
49
|
+
"6) Тестируй всё: программные тесты + браузер; правь и тестируй снова, пока не чисто. «Готово» без прогонов не существует.",
|
|
50
|
+
"7) Инструменты по делу: один нужный навык (UI — wow-design/ui-craft, проверка — visual-qa, референсы — web-research), код — repo_map/checkpoint; если проверить нельзя — скажи честно.",
|
|
51
|
+
];
|
|
52
|
+
return [
|
|
40
53
|
"<quality-contract>",
|
|
41
|
-
"
|
|
54
|
+
"Правила действуют в каждом проекте и каждом пресете.",
|
|
55
|
+
...clauses,
|
|
42
56
|
"</quality-contract>",
|
|
43
57
|
].join("\n");
|
|
44
|
-
if (readKitSettings().researchFirst === false) {
|
|
45
|
-
return full.replace("1) ПЕРЕД любой задачей — короткий web_search/web_fetch по лучшим мировым практикам и референсам; даже локальную задачу проверь на более качественный современный подход; 2) дай 2+ независимых источника, дату и ссылки; 3) для рекомендаций предложи 2–3 конкретных референса/варианта и объясни выбор; 4) внешние claims — research_ledger, проверка ссылок и дат перед выводами;", "1) внешние факты — web_search/web_fetch, 2+ источника со ссылками и датами; 2) для рекомендаций — 2–3 варианта с обоснованием;");
|
|
46
|
-
}
|
|
47
|
-
return full;
|
|
48
58
|
}
|
|
49
59
|
let skillMetaCache = { at: 0, map: new Map() };
|
|
50
60
|
|
|
@@ -69,7 +79,7 @@ const RULES = [
|
|
|
69
79
|
id: "quality",
|
|
70
80
|
label: "Качество UI",
|
|
71
81
|
any: ["отступ", "адаптив", "горизонт", "overflow", "скриншот", "мобил", "планшет", "поехал", "съехал", "вёрстк", "верстк"],
|
|
72
|
-
skills: ["ui-craft", "visual-qa"],
|
|
82
|
+
skills: ["web-quality", "ui-craft", "visual-qa"],
|
|
73
83
|
},
|
|
74
84
|
{
|
|
75
85
|
id: "markup",
|
package/skills/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"kitVersion": "2.
|
|
4
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"kitVersion": "2.24.0",
|
|
4
|
+
"generatedAt": "2026-11-23T05:31:07.838Z",
|
|
5
5
|
"skills": {
|
|
6
6
|
"code-review-checklist": {
|
|
7
7
|
"hash": "e665bf72cfbfb77948a3cd6df6ebced38777f9aff543d7b9c80b2ced8cccc662",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"bytes": 4257
|
|
85
85
|
},
|
|
86
86
|
"seo": {
|
|
87
|
-
"hash": "
|
|
87
|
+
"hash": "ed48ebc4c1278f857ff430f9a5ec55f638c2f9ba07cc406185cfb94be18ee80d",
|
|
88
88
|
"files": 29,
|
|
89
|
-
"bytes":
|
|
89
|
+
"bytes": 386169
|
|
90
90
|
},
|
|
91
91
|
"service-desk-conventions": {
|
|
92
92
|
"hash": "22ae6c29b7debb0154d183bc732795b67557aeaa0ac906d7b038134aea8ba39a",
|
|
@@ -143,15 +143,20 @@
|
|
|
143
143
|
"files": 2,
|
|
144
144
|
"bytes": 4118
|
|
145
145
|
},
|
|
146
|
+
"web-quality": {
|
|
147
|
+
"hash": "9cffe064faac7ec5763d4644c52e28e7993adca633e0ad92bbd4a88c67ceee23",
|
|
148
|
+
"files": 1,
|
|
149
|
+
"bytes": 5692
|
|
150
|
+
},
|
|
146
151
|
"web-research": {
|
|
147
152
|
"hash": "9bf4d8ba6d2a0fc39c241cdd9f5fe54835af28872473aa617941589c526387c8",
|
|
148
153
|
"files": 3,
|
|
149
154
|
"bytes": 14150
|
|
150
155
|
},
|
|
151
156
|
"wow-design": {
|
|
152
|
-
"hash": "
|
|
157
|
+
"hash": "81139f32fc759f438a36eb4c0212ed3ea17df9d8075e909580e12bc47a0848dd",
|
|
153
158
|
"files": 52,
|
|
154
|
-
"bytes":
|
|
159
|
+
"bytes": 913669
|
|
155
160
|
}
|
|
156
161
|
}
|
|
157
162
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-quality
|
|
3
|
+
description: "Глобальная планка веба: референс из реальных продуктов, премиальный UI, адаптив во всех ориентациях, отдельная проверка overflow, типографика и подсказки, цикл тест → фикс → тест."
|
|
4
|
+
whenToUse: "Любая задача с интерфейсом, вёрсткой, компонентом, страницей или формой; перед сдачей UI-работы и релизом."
|
|
5
|
+
user-invocable: true
|
|
6
|
+
autoLoad: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Web quality — референс, планка, проверка
|
|
10
|
+
|
|
11
|
+
> ≈400 токенов. Ниже — обязательный порядок для любой UI-работы.
|
|
12
|
+
|
|
13
|
+
## 1. Референс сначала (всегда)
|
|
14
|
+
|
|
15
|
+
1. Собери 2+ **реально существующих** примера: официальные доки и дизайн-системы (Material, Carbon, Primer, GOV.UK), галереи (Awwwards, Mobbin, Land-book, Page Flows, Siteinspire, Refero).
|
|
16
|
+
2. Выпиши, что забираешь: композиция, сетка, типографическая шкала, состояния формы, пустые экраны, плотность, микротекст.
|
|
17
|
+
3. У каждого источника — дата и ссылка. Практики старше 12–18 месяцев перепроверяй.
|
|
18
|
+
4. Если находка меняет UX, риск, объём или цену — 2–3 варианта с рекомендацией **до** работы. Иначе — одна строка и сразу работа.
|
|
19
|
+
|
|
20
|
+
## 2. Премиальная планка
|
|
21
|
+
|
|
22
|
+
- Сетка 4/8, дизайн-токены, максимум два шрифта, шкала 1.25–1.333.
|
|
23
|
+
- Все состояния: default, hover, focus-visible, active, disabled, loading, empty, error, success.
|
|
24
|
+
- Контраст ≥ 4.5:1, видимый focus, тап-таргеты ≥ 44 px, движение 150–250 мс (`prefers-reduced-motion`).
|
|
25
|
+
- Воздух важнее плотности: один акцент на экран, без «пёстрых» теней и градиентов ради градиентов.
|
|
26
|
+
|
|
27
|
+
## 3. Адаптив во всех ориентациях
|
|
28
|
+
|
|
29
|
+
Матрица обязательного покрытия:
|
|
30
|
+
|
|
31
|
+
| Класс | Размер |
|
|
32
|
+
|---|---|
|
|
33
|
+
| телефон, портрет | 390×844 |
|
|
34
|
+
| телефон, ландшафт | 844×390 |
|
|
35
|
+
| планшет, портрет | 768×1024 |
|
|
36
|
+
| планшет, ландшафт | 1024×768 |
|
|
37
|
+
| десктоп | 1440×900 |
|
|
38
|
+
| пол (WCAG 1.4.10) | 320 px |
|
|
39
|
+
|
|
40
|
+
Частые причины поломки: `width` вместо `max-width`, `100vw`, `white-space: nowrap`, длинные URL/токены без `overflow-wrap: anywhere`, отрицательные `margin`, таблицы без своего скролл-контейнера, grid/flex без `min-width: 0`. Типографика — `clamp()`, поля — `env(safe-area-inset-*)`.
|
|
41
|
+
|
|
42
|
+
## 4. Overflow проверяется отдельно и всегда
|
|
43
|
+
|
|
44
|
+
1. `browser_qa action=audit url=... matrix=full outDir=.dsh/browser-qa` — 5 вьюпортов, PNG на каждый.
|
|
45
|
+
2. В отчёте смотри строку `Покрытие:` — нужно 4/4 (phone/tablet × portrait/landscape). Если меньше — добавь `viewports=[{width,height},…]`.
|
|
46
|
+
3. Для каждой ширины: `scrollWidth > clientWidth` → в списке виновников найди конкретный элемент, а не «страницу».
|
|
47
|
+
4. Почини и **прогони audit заново**. Чистый аудит = overflow 0, console errors 0, markup 0, покрытие 4/4.
|
|
48
|
+
5. Скриншот «на глаз» не считается проверкой: только отчёт + PNG по каждому вьюпорту.
|
|
49
|
+
|
|
50
|
+
## 5. Типографика и подсказки
|
|
51
|
+
|
|
52
|
+
- Подсказка рядом с полем, а не только placeholder: формат, единицы, пример («Почта для чеков, например name@company.ru»).
|
|
53
|
+
- Ошибка — под полем, что именно не так и как исправить; без вины и капса.
|
|
54
|
+
- Пустые состояния — с действием; длинные числа и пути переносятся, не обрезаются.
|
|
55
|
+
- Заголовки по порядку (h1 → h2 → h3), подписи связаны с полями (`label for`), у иконок-кнопок есть имя.
|
|
56
|
+
|
|
57
|
+
## 6. Цикл: тест → фикс → тест
|
|
58
|
+
|
|
59
|
+
1. Программные проверки проекта (тесты, линт, типы).
|
|
60
|
+
2. Браузер: audit `matrix=full` + скриншоты; посмотреть каждый PNG.
|
|
61
|
+
3. Есть замечания — фикс, снова шаг 1–2. Повторять, пока не чисто.
|
|
62
|
+
4. В отчёте: что прогнал, что осталось непроверенным и почему.
|
|
63
|
+
|
|
64
|
+
## 7. Чек-лист перед сдачей
|
|
65
|
+
|
|
66
|
+
- [ ] 2+ референса с датами и ссылками
|
|
67
|
+
- [ ] Все состояния компонентов и экранов
|
|
68
|
+
- [ ] Матрица 4/4, 320 px не ломается
|
|
69
|
+
- [ ] Overflow 0 на каждой ширине, виновники названы
|
|
70
|
+
- [ ] Console errors 0, markup 0
|
|
71
|
+
- [ ] Подсказки и микротекст на месте
|
|
72
|
+
- [ ] Скриншоты приложены
|
|
73
|
+
- [ ] Тесты/линт прогнаны, «готово» подтверждено отчётом
|
package/skills-baseline.json
CHANGED
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
"context-economy": "bc8fa2e15327d21cf9ebd187b0df5f620d6a5b617976fa88910ae7877eb46b75",
|
|
8
8
|
"database-safety": "56f43f6bac270aefce34355e2a932192e4d17725d8faec5f91f476792b28c617",
|
|
9
9
|
"debugging-playbook": "0d70b8102f04d29774e466efd81abb448c84a6537a2ca3438f6931a2d6fe0c3a",
|
|
10
|
+
"delivery-gate": "7b76909a8d5ce099d03813533a1f935aef62d8fe11e63080961c38fd9835e47f",
|
|
10
11
|
"design-critique": "bbc6ca34b0b76798d581dcd78e83a59040dfac028b5e10d8e7a9be28225410b8",
|
|
11
12
|
"dev-workflow": "832d36da6d3dc3e6e7d1feb18c38260ed8669c7702dffbd2d7a96fc9bc93d22f",
|
|
12
|
-
"git-and-ci": "
|
|
13
|
+
"git-and-ci": "a2dc59c5920190bbc715a4a523f3a1592e1914e6d06385ec07341fb76897a6b6",
|
|
13
14
|
"pg-upgrade-verify": "d734178c5dad317fc55842215bbeeba85230cdd8e7b0ea46d74eed92910b8dea",
|
|
14
15
|
"project-deep-dive": "a70355f2a40b42a6ff03e745ba42389549b4efe4f392c98033fe5073f946452e",
|
|
15
16
|
"project-memory-maintenance": "648f175093f6a86e20157156d8731b8e9602badedc79188e77160b18832f4893",
|
|
16
17
|
"release-and-deploy": "e6ed27856b00e8759d31659162290307c16e203d2b5d28fcacb574be17fc795b",
|
|
17
|
-
"requirements-and-planning": "
|
|
18
|
+
"requirements-and-planning": "16f3235a9dcdcd1858112806854ef03d76f77588b56434bbacab803bd204f005",
|
|
19
|
+
"research-first": "ea5e3684d20529fca65a233044e914ba5b7be56a3d93ce283d8632e87904c23e",
|
|
18
20
|
"security-review": "8665b2c469de8e83aca670021d5c335fa8c9b93b8dc6bb866759e6062b1abde4",
|
|
19
21
|
"seo": "ed48ebc4c1278f857ff430f9a5ec55f638c2f9ba07cc406185cfb94be18ee80d",
|
|
20
22
|
"service-desk-conventions": "22ae6c29b7debb0154d183bc732795b67557aeaa0ac906d7b038134aea8ba39a",
|
|
@@ -23,8 +25,12 @@
|
|
|
23
25
|
"service-desk-testing": "eaff64154a596590684308cdccb3f55099240589b57c0f506a85e5b38ddf5ac5",
|
|
24
26
|
"service-desk-ui": "a3a0e78ab147f4837e4ca9736f4d87cf77a6638c2db7c5859629df70abdd2c1c",
|
|
25
27
|
"skills-router": "63c2dcdeb07dd4af464a30a8065465bd06b73e4caa8aa874802e5188d4d5a4ae",
|
|
28
|
+
"subagent-playbook": "72d10995462d43891e7ec2d028caa0ccbca7932875410d4a0d6cfa75c5fe2df9",
|
|
26
29
|
"testing-strategy": "773fdf1e389e59841b7766862f8890a11fba4a2fce42a2022b9c4bfaae8f6ecc",
|
|
30
|
+
"ui-craft": "0fbca80ca2ca434828b3238ecd901fce54b5dc306456cb81a4ed52f7a95921c5",
|
|
27
31
|
"ui-design-system": "19244221171995b758dbad02f2e3602859308370b50cc37d93c6f2a6d44cd6f1",
|
|
32
|
+
"visual-qa": "97ff6c9c02bbab4bb38c8591a39792f4f51c45bfe278dd7ea839d6cad27c7cf9",
|
|
33
|
+
"web-quality": "9cffe064faac7ec5763d4644c52e28e7993adca633e0ad92bbd4a88c67ceee23",
|
|
28
34
|
"web-research": "9bf4d8ba6d2a0fc39c241cdd9f5fe54835af28872473aa617941589c526387c8",
|
|
29
35
|
"wow-design": "81139f32fc759f438a36eb4c0212ed3ea17df9d8075e909580e12bc47a0848dd"
|
|
30
36
|
},
|