@domandigital/craft 0.20.2 → 0.20.3

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.
@@ -0,0 +1,421 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/@domandigital/craft/design-review.schema.json",
4
+ "title": "design-review.json",
5
+ "description": "A review of a page, kept apart from the art direction: what was said, how well the visitor's problem is known, what was proposed, and the smallest change that answers it. The reasoning rules (observed needs something inspected, structural change needs reasons, nothing duplicated, unexamined widths stay unknown) are enforced by `craft direction review`; this schema only checks the shape.",
6
+ "type": "object",
7
+ "required": [
8
+ "version",
9
+ "subject",
10
+ "notes"
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "type": "string"
15
+ },
16
+ "version": {
17
+ "const": 1
18
+ },
19
+ "subject": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "notes": {
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "#/$defs/note"
27
+ }
28
+ },
29
+ "context": {
30
+ "enum": [
31
+ "publication",
32
+ "protected-staging"
33
+ ],
34
+ "default": "publication",
35
+ "description": "Protected staging may reserve marked placeholders; outstanding requirements still block publication."
36
+ }
37
+ },
38
+ "$defs": {
39
+ "proposal": {
40
+ "type": "object",
41
+ "required": [
42
+ "change",
43
+ "step"
44
+ ],
45
+ "properties": {
46
+ "change": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "step": {
51
+ "enum": [
52
+ "copy",
53
+ "relocate",
54
+ "group",
55
+ "imagery",
56
+ "trust-placement",
57
+ "adjust-component",
58
+ "remove-redundancy",
59
+ "restructure",
60
+ "new-component"
61
+ ],
62
+ "description": "Smallest first. restructure and new-component are structural."
63
+ },
64
+ "adds": {
65
+ "type": "array",
66
+ "items": {
67
+ "enum": [
68
+ "carousel",
69
+ "javascript",
70
+ "dependency",
71
+ "animation",
72
+ "testimonial",
73
+ "cta",
74
+ "duplicate-content"
75
+ ]
76
+ },
77
+ "description": "Things that cost something. Each needs a reason."
78
+ },
79
+ "touches": {
80
+ "enum": [
81
+ "hero",
82
+ "logos",
83
+ "stats",
84
+ "cards",
85
+ "marquee",
86
+ "text",
87
+ "other",
88
+ "cta-band",
89
+ "footer-cta",
90
+ "pricing",
91
+ "testimonials",
92
+ "faq",
93
+ "process",
94
+ "features",
95
+ "team",
96
+ "contact"
97
+ ],
98
+ "description": "The section role it moves, removes or replaces."
99
+ },
100
+ "comparisons": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "required": [
105
+ "existing",
106
+ "samePurpose",
107
+ "because"
108
+ ],
109
+ "properties": {
110
+ "existing": {
111
+ "type": "string",
112
+ "minLength": 1
113
+ },
114
+ "samePurpose": {
115
+ "type": "boolean"
116
+ },
117
+ "because": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "note": {
127
+ "type": "object",
128
+ "required": [
129
+ "id",
130
+ "lens",
131
+ "observation",
132
+ "raisedBy",
133
+ "basis",
134
+ "evidence",
135
+ "recommend"
136
+ ],
137
+ "properties": {
138
+ "id": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "page": {
143
+ "enum": [
144
+ "home",
145
+ "service",
146
+ "about",
147
+ "pricing",
148
+ "booking",
149
+ "contact",
150
+ "article",
151
+ "landing"
152
+ ]
153
+ },
154
+ "lens": {
155
+ "enum": [
156
+ "relevance",
157
+ "hierarchy",
158
+ "evidence",
159
+ "identity",
160
+ "action",
161
+ "disclosure",
162
+ "personality",
163
+ "differentiation",
164
+ "mobile"
165
+ ]
166
+ },
167
+ "observation": {
168
+ "type": "string",
169
+ "description": "What was said or seen, as it was said."
170
+ },
171
+ "raisedBy": {
172
+ "type": "string",
173
+ "description": "Who said it, or what found it."
174
+ },
175
+ "problem": {
176
+ "type": "string",
177
+ "description": "The visitor's problem underneath it, in the visitor's terms."
178
+ },
179
+ "basis": {
180
+ "enum": [
181
+ "observed",
182
+ "inferred",
183
+ "preference",
184
+ "unknown"
185
+ ],
186
+ "description": "observed needs something inspected; reported evidence alone makes it inferred."
187
+ },
188
+ "evidence": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "object",
192
+ "required": [
193
+ "kind",
194
+ "ref"
195
+ ],
196
+ "properties": {
197
+ "kind": {
198
+ "enum": [
199
+ "screenshot",
200
+ "rendered",
201
+ "source",
202
+ "measurement",
203
+ "content",
204
+ "audit",
205
+ "stakeholder",
206
+ "customer"
207
+ ]
208
+ },
209
+ "ref": {
210
+ "type": "string",
211
+ "minLength": 1
212
+ },
213
+ "viewport": {
214
+ "enum": [
215
+ "mobile",
216
+ "tablet",
217
+ "desktop"
218
+ ]
219
+ },
220
+ "note": {
221
+ "type": "string"
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "impact": {
227
+ "type": "string",
228
+ "description": "What the problem costs this visitor, about this client's job."
229
+ },
230
+ "appliesTo": {
231
+ "type": "array",
232
+ "items": {
233
+ "enum": [
234
+ "mobile",
235
+ "tablet",
236
+ "desktop"
237
+ ]
238
+ }
239
+ },
240
+ "suggested": {
241
+ "$ref": "#/$defs/proposal",
242
+ "description": "What the person proposed, judged apart from the problem."
243
+ },
244
+ "existing": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "string"
248
+ },
249
+ "description": "What the page already has that bears on this."
250
+ },
251
+ "recommend": {
252
+ "type": "object",
253
+ "required": [
254
+ "class"
255
+ ],
256
+ "properties": {
257
+ "change": {
258
+ "type": "string",
259
+ "minLength": 1
260
+ },
261
+ "step": {
262
+ "enum": [
263
+ "copy",
264
+ "relocate",
265
+ "group",
266
+ "imagery",
267
+ "trust-placement",
268
+ "adjust-component",
269
+ "remove-redundancy",
270
+ "restructure",
271
+ "new-component"
272
+ ],
273
+ "description": "Smallest first. restructure and new-component are structural."
274
+ },
275
+ "adds": {
276
+ "type": "array",
277
+ "items": {
278
+ "enum": [
279
+ "carousel",
280
+ "javascript",
281
+ "dependency",
282
+ "animation",
283
+ "testimonial",
284
+ "cta",
285
+ "duplicate-content"
286
+ ]
287
+ },
288
+ "description": "Things that cost something. Each needs a reason."
289
+ },
290
+ "touches": {
291
+ "enum": [
292
+ "hero",
293
+ "logos",
294
+ "stats",
295
+ "cards",
296
+ "marquee",
297
+ "text",
298
+ "other",
299
+ "cta-band",
300
+ "footer-cta",
301
+ "pricing",
302
+ "testimonials",
303
+ "faq",
304
+ "process",
305
+ "features",
306
+ "team",
307
+ "contact"
308
+ ],
309
+ "description": "The section role it moves, removes or replaces."
310
+ },
311
+ "class": {
312
+ "enum": [
313
+ "confirmed-correction",
314
+ "design-hypothesis",
315
+ "optional-refinement",
316
+ "no-change"
317
+ ],
318
+ "description": "no-change is a result, not a failure to answer."
319
+ },
320
+ "because": {
321
+ "type": "string"
322
+ },
323
+ "whyEnough": {
324
+ "type": "string"
325
+ },
326
+ "smaller": {
327
+ "type": "array",
328
+ "items": {
329
+ "type": "object",
330
+ "required": [
331
+ "step",
332
+ "whyNot"
333
+ ],
334
+ "properties": {
335
+ "step": {
336
+ "enum": [
337
+ "copy",
338
+ "relocate",
339
+ "group",
340
+ "imagery",
341
+ "trust-placement",
342
+ "adjust-component",
343
+ "remove-redundancy",
344
+ "restructure",
345
+ "new-component"
346
+ ]
347
+ },
348
+ "whyNot": {
349
+ "type": "string"
350
+ }
351
+ }
352
+ }
353
+ },
354
+ "validation": {
355
+ "type": "string"
356
+ },
357
+ "requires": {
358
+ "type": "array",
359
+ "items": {
360
+ "type": "object",
361
+ "required": [
362
+ "what"
363
+ ],
364
+ "properties": {
365
+ "what": {
366
+ "type": "string"
367
+ },
368
+ "source": {
369
+ "type": "string"
370
+ },
371
+ "phase": {
372
+ "enum": [
373
+ "implementation",
374
+ "publication"
375
+ ],
376
+ "default": "implementation"
377
+ },
378
+ "placeholder": {
379
+ "type": "string",
380
+ "description": "Describe the explicitly marked placeholder used only in protected staging."
381
+ },
382
+ "kind": {
383
+ "enum": [
384
+ "asset",
385
+ "fact"
386
+ ],
387
+ "default": "fact"
388
+ }
389
+ }
390
+ }
391
+ },
392
+ "comparisons": {
393
+ "type": "array",
394
+ "items": {
395
+ "type": "object",
396
+ "required": [
397
+ "existing",
398
+ "samePurpose",
399
+ "because"
400
+ ],
401
+ "properties": {
402
+ "existing": {
403
+ "type": "string",
404
+ "minLength": 1
405
+ },
406
+ "samePurpose": {
407
+ "type": "boolean"
408
+ },
409
+ "because": {
410
+ "type": "string",
411
+ "minLength": 1
412
+ }
413
+ }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ }
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  describeTypicality,
7
7
  loadNull
8
- } from "./chunk-YRXMPI3T.js";
8
+ } from "./chunk-KQF44RI3.js";
9
9
  import {
10
10
  SOURCE_FILE,
11
11
  finish,
@@ -14,7 +14,7 @@ import {
14
14
  parseFlags,
15
15
  prepareReport,
16
16
  readPaths
17
- } from "./chunk-JLLULDVW.js";
17
+ } from "./chunk-NQAYRK2K.js";
18
18
  import {
19
19
  toJson
20
20
  } from "./chunk-QIEDBL4J.js";
@@ -4,13 +4,13 @@ import {
4
4
  formatDirectionMatches,
5
5
  summariseDirection,
6
6
  validateDirection
7
- } from "./chunk-2OBDCIVW.js";
7
+ } from "./chunk-S3L7TEJF.js";
8
8
  import {
9
9
  loadNull
10
- } from "./chunk-YRXMPI3T.js";
10
+ } from "./chunk-KQF44RI3.js";
11
11
  import {
12
12
  parseFlags
13
- } from "./chunk-JLLULDVW.js";
13
+ } from "./chunk-NQAYRK2K.js";
14
14
  import {
15
15
  toJson
16
16
  } from "./chunk-QIEDBL4J.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-OQXTQQAU.js";
4
4
  import {
5
5
  parseFlags
6
- } from "./chunk-JLLULDVW.js";
6
+ } from "./chunk-NQAYRK2K.js";
7
7
  import {
8
8
  toJson
9
9
  } from "./chunk-QIEDBL4J.js";
@@ -379,6 +379,7 @@ Usage
379
379
  craft direction init [--snapshot <file | url>] [--client <name>] [--brief "<text>"] [--out <file>]
380
380
  craft direction validate [--snapshot <file | url>] [--page home] [--estate <estate.json>] [--direction <file>] [--strict] [--json]
381
381
  craft direction research [--brief "<who, where, what>"] [--visual]
382
+ craft direction review --notes <design-review.json> [--direction <file>] [--json]
382
383
  craft direction propose [--snapshot <file>] [--estate <estate.json | dir>] [--out <file>]
383
384
  craft null build --brief "<text>" --out <dir> [--runs 20] [--parallel 4] [--model <name>]
384
385
  craft null import <dir> --builder <name> --brief "<text>" [--out <dir>] [--model <name>]
@@ -501,6 +502,7 @@ var VALUE_FLAGS = {
501
502
  "--component": "component",
502
503
  "--competitor": "competitor",
503
504
  "--page": "page",
505
+ "--notes": "notes",
504
506
  "--builder": "builder",
505
507
  "--scheme": "scheme"
506
508
  };
@@ -631,7 +633,7 @@ async function briefFor(flags, cwd) {
631
633
  if (typeof brief === "string" && brief.trim()) return brief;
632
634
  } else if (flags.direction) throw new Error(`no such file: ${flags.direction}`);
633
635
  if (flags.null) {
634
- const { loadNull } = await import("./cli-KJRHO3YO.js");
636
+ const { loadNull } = await import("./cli-AFKXDGUH.js");
635
637
  return loadNull(flags.null, cwd).brief;
636
638
  }
637
639
  return void 0;
@@ -657,37 +659,37 @@ async function compareWithCompetitor(flags, io) {
657
659
  function run(argv, io) {
658
660
  const [command, ...rest] = argv;
659
661
  if (command === "direction") {
660
- return import("./cli-YQEVPRL5.js").then((m) => m.runDirection(rest, io));
662
+ return import("./cli-6AZVLNWL.js").then((m) => m.runDirection(rest, io));
661
663
  }
662
664
  if (command === "report" || command === "retrofit") {
663
- return import("./cli-A6SNEMRL.js").then((m) => m.runReport(command, rest, io));
665
+ return import("./cli-7HKVVL3P.js").then((m) => m.runReport(command, rest, io));
664
666
  }
665
667
  if (command === "register") {
666
668
  return import("./cli-ZXDGVDYU.js").then((m) => m.runRegister(rest, io));
667
669
  }
668
670
  if (command === "estate") {
669
- return import("./cli-DZGQOIBX.js").then((m) => m.runEstate(rest, io));
671
+ return import("./cli-QGJB6OUB.js").then((m) => m.runEstate(rest, io));
670
672
  }
671
673
  if (command === "null") {
672
- return import("./cli-KJRHO3YO.js").then((m) => m.runNull(rest, io));
674
+ return import("./cli-AFKXDGUH.js").then((m) => m.runNull(rest, io));
673
675
  }
674
676
  if (command === "calibrate") {
675
- return import("./cli-LVYTLT2A.js").then((m) => m.runCalibrate(rest, io));
677
+ return import("./cli-AK4EQHUF.js").then((m) => m.runCalibrate(rest, io));
676
678
  }
677
679
  if (command === "tells" && rest[0] === "harvest") {
678
- return import("./cli-KJRHO3YO.js").then((m) => m.runHarvest(rest, io)).catch((error) => {
680
+ return import("./cli-AFKXDGUH.js").then((m) => m.runHarvest(rest, io)).catch((error) => {
679
681
  io.err(`craft: ${error.message}`);
680
682
  return 2;
681
683
  });
682
684
  }
683
685
  if (command === "phone-first") {
684
- return import("./cli-FF2YDHA4.js").then((m) => m.runPhoneFirst(rest, io));
686
+ return import("./cli-6INEFJYN.js").then((m) => m.runPhoneFirst(rest, io));
685
687
  }
686
688
  if (command === "viewports") {
687
689
  return import("./viewports-cli-WWWWEBKI.js").then((m) => m.runViewports(rest, io));
688
690
  }
689
691
  if (command === "snapshot" || command === "audit") {
690
- return import("./cli-U7PJQKZT.js").then((m) => m.runAudit(command, rest, io));
692
+ return import("./cli-OYVZOHHV.js").then((m) => m.runAudit(command, rest, io));
691
693
  }
692
694
  if (!command || command === "help" || command === "--help" || command === "-h") {
693
695
  io.out(HELP);