dreative 0.5.1 → 0.5.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.
Files changed (48) hide show
  1. package/README.md +49 -27
  2. package/dist/cli/audit.js +206 -0
  3. package/dist/cli/audit.test.js +79 -0
  4. package/dist/cli/docsCheck.js +163 -0
  5. package/dist/cli/docsCheck.test.js +8 -0
  6. package/dist/cli/index.js +45 -9
  7. package/dist/server/preview.js +73 -73
  8. package/dist/server/store.js +11 -0
  9. package/dist/shared/artifacts.js +220 -0
  10. package/dist/shared/design.js +45 -24
  11. package/dist/shared/ruleSystem.js +220 -0
  12. package/dist/shared/ruleSystem.test.js +262 -0
  13. package/dist/shared/skillSystem.js +173 -0
  14. package/dist/shared/skillSystem.test.js +110 -0
  15. package/dist/ui/assets/{index--vztc_MR.js → index-CKwmbx2j.js} +13 -13
  16. package/dist/ui/index.html +12 -12
  17. package/package.json +5 -3
  18. package/skill/dreative/DESIGN.md +144 -108
  19. package/skill/dreative/PLAN.md +285 -116
  20. package/skill/dreative/SKILL.md +237 -144
  21. package/skill/dreative/frameworks/nextjs.md +13 -0
  22. package/skill/dreative/frameworks/react-vite.md +12 -0
  23. package/skill/dreative/frameworks/styling.md +14 -0
  24. package/skill/dreative/frameworks/sveltekit.md +10 -0
  25. package/skill/dreative/frameworks/vue-nuxt.md +12 -0
  26. package/skill/dreative/recipes/3d-recipes.md +44 -0
  27. package/skill/dreative/recipes/cinematic-recipes.md +19 -0
  28. package/skill/dreative/recipes/immersive-recipes.md +18 -0
  29. package/skill/dreative/recipes/media-recipes.md +60 -0
  30. package/skill/dreative/recipes/motion-recipes.md +68 -0
  31. package/skill/dreative/references/ARTIFACTS.md +196 -0
  32. package/skill/dreative/references/REFLEX_FONTS.json +44 -0
  33. package/skill/dreative/references/RULES.json +186 -0
  34. package/skill/dreative/references/SKILL_CONTRACT.md +30 -0
  35. package/skill/dreative/references/TIERS.md +44 -0
  36. package/skill/dreative/schemas/plan.schema.json +309 -0
  37. package/skill/dreative/schemas/verify.schema.json +75 -0
  38. package/skill/dreative/skills/3d.md +94 -267
  39. package/skill/dreative/skills/cinematic.md +56 -232
  40. package/skill/dreative/skills/experimental.md +108 -95
  41. package/skill/dreative/skills/immersive.md +61 -223
  42. package/skill/dreative/skills/interaction.md +9 -1
  43. package/skill/dreative/skills/media.md +149 -564
  44. package/skill/dreative/skills/mobile.md +129 -117
  45. package/skill/dreative/skills/motion.md +126 -256
  46. package/skill/dreative/skills/refined.md +116 -102
  47. package/skill/dreative/skills/ux.md +155 -144
  48. package/dist/server/ai.js +0 -177
@@ -0,0 +1,309 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dreative.local/schemas/plan.schema.json",
4
+ "title": "Dreative Multi-Page Direct Design Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "request", "createdAt", "tier", "depth", "skills", "skillPolicy", "designRead", "pages", "preservationManifest", "decisionLedger"],
8
+ "properties": {
9
+ "version": { "const": 2 },
10
+ "doctrineVersion": { "const": 2 },
11
+ "request": { "type": "string", "minLength": 1 },
12
+ "createdAt": { "type": "string", "format": "date-time" },
13
+ "tier": { "enum": ["solid", "premium", "expressive", "award"] },
14
+ "depth": { "enum": ["restyle", "relayout", "restructure", "reimagine"] },
15
+ "skills": { "$ref": "#/$defs/skillList" },
16
+ "skillPolicy": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["mode", "global", "routingApproved", "userAssignments"],
20
+ "properties": {
21
+ "mode": { "const": "hybrid" },
22
+ "global": { "$ref": "#/$defs/skillList" },
23
+ "routingApproved": { "const": true },
24
+ "userAssignments": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["pageId", "skills"],
30
+ "properties": {
31
+ "pageId": { "type": "string", "minLength": 1 },
32
+ "skills": { "$ref": "#/$defs/treatmentList" }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ },
38
+ "designRead": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["register", "concept", "signature"],
42
+ "properties": {
43
+ "register": { "type": "string", "minLength": 1 },
44
+ "concept": { "type": "string", "minLength": 1 },
45
+ "signature": { "type": "string", "minLength": 1 }
46
+ }
47
+ },
48
+ "implementationStartedAt": { "type": "string", "format": "date-time" },
49
+ "ruleExceptions": { "type": "array", "items": { "$ref": "#/$defs/ruleException" } },
50
+ "creativeStrategy": { "$ref": "#/$defs/creativeStrategy" },
51
+ "motionComplexityBudget": { "$ref": "#/$defs/motionComplexityBudget" },
52
+ "fontDecision": { "$ref": "#/$defs/fontDecision" },
53
+ "experimentalPlan": { "$ref": "#/$defs/experimentalPlan" },
54
+ "conceptExploration": { "$ref": "#/$defs/conceptExploration" },
55
+ "recipeAccess": { "type": "array", "items": { "$ref": "#/$defs/recipeAccess" } },
56
+ "pages": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/page" } },
57
+ "preservationManifest": { "type": "string", "minLength": 1 },
58
+ "decisionLedger": { "type": "string", "minLength": 1 }
59
+ },
60
+ "$defs": {
61
+ "skill": { "enum": ["ux", "mobile", "refined", "motion", "interaction", "media", "3d", "immersive", "cinematic", "experimental"] },
62
+ "skillList": {
63
+ "type": "array",
64
+ "uniqueItems": true,
65
+ "allOf": [{ "contains": { "const": "ux" } }, { "contains": { "const": "mobile" } }],
66
+ "items": { "$ref": "#/$defs/skill" }
67
+ },
68
+ "treatmentList": {
69
+ "type": "array",
70
+ "uniqueItems": true,
71
+ "items": { "$ref": "#/$defs/skill" }
72
+ },
73
+ "status": { "enum": ["planned", "shipped", "fallback", "cut"] },
74
+ "ruleException": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["ruleId", "decision", "declaredAt", "reason", "alternative", "successCriteria", "evidenceIds"],
78
+ "properties": {
79
+ "ruleId": { "type": "string", "minLength": 1 },
80
+ "decision": { "const": "substituted" },
81
+ "declaredAt": { "type": "string", "format": "date-time" },
82
+ "reason": { "type": "string", "minLength": 20 },
83
+ "alternative": { "type": "string", "minLength": 30 },
84
+ "successCriteria": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 12 } },
85
+ "evidenceIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
86
+ }
87
+ },
88
+ "creativeStrategy": {
89
+ "oneOf": [
90
+ {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["path", "mechanisms", "drivers"],
94
+ "properties": {
95
+ "path": { "const": "diversity" },
96
+ "mechanisms": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
97
+ "drivers": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
98
+ }
99
+ },
100
+ {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": ["path", "signatureMechanism", "states", "secondaryMechanisms", "drivers"],
104
+ "properties": {
105
+ "path": { "const": "development" },
106
+ "signatureMechanism": { "type": "string", "minLength": 1 },
107
+ "states": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "type": "string", "minLength": 12 } },
108
+ "secondaryMechanisms": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
109
+ "drivers": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ "motionComplexityBudget": {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": ["heroMoments", "calmSectionIds", "sharedLanguage", "deviceLimits", "progressiveEnhancement", "antiDefaultReview"],
118
+ "properties": {
119
+ "heroMoments": {
120
+ "type": "array",
121
+ "minItems": 1,
122
+ "maxItems": 3,
123
+ "items": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["sectionId", "reason"],
127
+ "properties": {
128
+ "sectionId": { "type": "string", "minLength": 1 },
129
+ "reason": { "type": "string", "minLength": 20 }
130
+ }
131
+ }
132
+ },
133
+ "calmSectionIds": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
134
+ "sharedLanguage": { "type": "string", "minLength": 20 },
135
+ "deviceLimits": { "type": "string", "minLength": 20 },
136
+ "progressiveEnhancement": { "type": "string", "minLength": 20 },
137
+ "antiDefaultReview": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": ["basicMotionAssessment", "compositionHandoff", "visualStateChange", "conceptSpecificity", "memorableMoment"],
141
+ "properties": {
142
+ "basicMotionAssessment": { "type": "string", "minLength": 20 },
143
+ "compositionHandoff": { "type": "string", "minLength": 20 },
144
+ "visualStateChange": { "type": "string", "minLength": 20 },
145
+ "conceptSpecificity": { "type": "string", "minLength": 20 },
146
+ "memorableMoment": { "type": "string", "minLength": 20 }
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "fontDecision": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["selected", "candidates", "recentDisplayFonts"],
155
+ "properties": {
156
+ "selected": { "type": "string", "minLength": 1 },
157
+ "candidates": {
158
+ "type": "array",
159
+ "minItems": 3,
160
+ "items": {
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": ["name", "reflex", "rationale"],
164
+ "properties": {
165
+ "name": { "type": "string", "minLength": 1 },
166
+ "reflex": { "type": "boolean" },
167
+ "rationale": { "type": "string", "minLength": 12 }
168
+ }
169
+ }
170
+ },
171
+ "recentDisplayFonts": { "type": "array", "maxItems": 3, "items": { "type": "string" } },
172
+ "reasonKinds": {
173
+ "type": "array",
174
+ "uniqueItems": true,
175
+ "items": {
176
+ "enum": ["existing-brand", "design-system-metrics", "product-register", "supplied-reference", "language-coverage", "variable-font-capability", "performance", "physical-editorial-historical-reference"]
177
+ }
178
+ },
179
+ "justification": { "type": "string", "minLength": 20 },
180
+ "repeatJustification": { "type": "string", "minLength": 20 }
181
+ }
182
+ },
183
+ "experimentalPlan": {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": ["majorSectionIds", "candidates"],
187
+ "properties": {
188
+ "majorSectionIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
189
+ "candidates": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "required": ["id", "sectionId", "idea", "selected"],
195
+ "properties": {
196
+ "id": { "type": "string", "minLength": 1 },
197
+ "sectionId": { "type": "string", "minLength": 1 },
198
+ "idea": { "type": "string", "minLength": 20 },
199
+ "selected": { "type": "boolean" }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "conceptExploration": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "required": ["recordedAt", "concepts"],
209
+ "properties": {
210
+ "recordedAt": { "type": "string", "format": "date-time" },
211
+ "concepts": {
212
+ "type": "array",
213
+ "minItems": 3,
214
+ "items": {
215
+ "type": "object",
216
+ "additionalProperties": false,
217
+ "required": ["name", "concept", "brandConnection"],
218
+ "properties": {
219
+ "name": { "type": "string", "minLength": 1 },
220
+ "concept": { "type": "string", "minLength": 20 },
221
+ "brandConnection": { "type": "string", "minLength": 20 }
222
+ }
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "recipeAccess": {
228
+ "type": "object",
229
+ "additionalProperties": false,
230
+ "required": ["file", "loadedAt", "purpose"],
231
+ "properties": {
232
+ "file": { "type": "string", "minLength": 1 },
233
+ "loadedAt": { "type": "string", "format": "date-time" },
234
+ "purpose": { "enum": ["feasibility", "implementation", "performance", "fallback", "concept-repair"] }
235
+ }
236
+ },
237
+ "asset": {
238
+ "type": "object",
239
+ "additionalProperties": false,
240
+ "required": ["id", "path", "purpose", "importance", "preparation", "status"],
241
+ "properties": {
242
+ "id": { "type": "string", "minLength": 1 },
243
+ "path": { "type": "string", "minLength": 1 },
244
+ "purpose": { "type": "string", "minLength": 1 },
245
+ "importance": { "enum": ["supporting", "key"] },
246
+ "preparation": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "required": ["decision", "derivatives", "rationale"],
250
+ "properties": {
251
+ "decision": { "enum": ["flat", "decompose", "variants", "sequence"] },
252
+ "derivatives": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
253
+ "rationale": { "type": "string", "minLength": 12 }
254
+ }
255
+ },
256
+ "status": { "$ref": "#/$defs/status" },
257
+ "reason": { "type": "string", "minLength": 1 }
258
+ }
259
+ },
260
+ "section": {
261
+ "type": "object",
262
+ "additionalProperties": false,
263
+ "required": ["id", "name", "layoutFamily", "skills", "interactions", "mobile", "fallback", "verification", "assets", "status"],
264
+ "properties": {
265
+ "id": { "type": "string", "minLength": 1 },
266
+ "name": { "type": "string", "minLength": 1 },
267
+ "layoutFamily": { "type": "string", "minLength": 1 },
268
+ "skills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/skill" } },
269
+ "interactions": { "type": "array", "items": { "type": "string" } },
270
+ "motionTreatment": { "$ref": "#/$defs/motionTreatment" },
271
+ "mobile": { "type": "string", "minLength": 1 },
272
+ "fallback": { "type": "string", "minLength": 1 },
273
+ "verification": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
274
+ "assets": { "type": "array", "items": { "$ref": "#/$defs/asset" } },
275
+ "status": { "$ref": "#/$defs/status" },
276
+ "reason": { "type": "string", "minLength": 1 }
277
+ }
278
+ },
279
+ "motionTreatment": {
280
+ "type": "object",
281
+ "additionalProperties": false,
282
+ "required": ["class", "staticComposition", "startState", "endState", "changes", "pinnedElements", "handoff", "purpose", "mechanism", "mobile", "reducedMotion"],
283
+ "properties": {
284
+ "class": { "enum": ["none", "decorative", "structural", "transformational"] },
285
+ "staticComposition": { "type": "string", "minLength": 12 },
286
+ "startState": { "type": "string", "minLength": 12 },
287
+ "endState": { "type": "string", "minLength": 12 },
288
+ "changes": { "type": "array", "items": { "type": "string", "minLength": 1 } },
289
+ "pinnedElements": { "type": "array", "items": { "type": "string", "minLength": 1 } },
290
+ "handoff": { "type": "string", "minLength": 12 },
291
+ "purpose": { "type": "string", "minLength": 12 },
292
+ "mechanism": { "type": "string", "minLength": 12 },
293
+ "mobile": { "type": "string", "minLength": 12 },
294
+ "reducedMotion": { "type": "string", "minLength": 12 }
295
+ }
296
+ },
297
+ "page": {
298
+ "type": "object",
299
+ "additionalProperties": false,
300
+ "required": ["id", "name", "skills", "sections"],
301
+ "properties": {
302
+ "id": { "type": "string", "minLength": 1 },
303
+ "name": { "type": "string", "minLength": 1 },
304
+ "skills": { "$ref": "#/$defs/skillList" },
305
+ "sections": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/section" } }
306
+ }
307
+ }
308
+ }
309
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dreative.local/schemas/verify.schema.json",
4
+ "title": "Dreative Verification Report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["version", "generatedAt", "evidence"],
8
+ "properties": {
9
+ "version": { "const": 1 },
10
+ "generatedAt": { "type": "string", "format": "date-time" },
11
+ "evidence": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["id", "criterion", "status", "evidence", "proof"],
17
+ "properties": {
18
+ "id": { "type": "string", "minLength": 1 },
19
+ "criterion": { "type": "string", "minLength": 1 },
20
+ "status": { "enum": ["pass", "fail", "not-applicable"] },
21
+ "evidence": { "type": "string", "minLength": 1 },
22
+ "timelineState": {
23
+ "enum": ["initial", "early", "mid-transition", "final", "handoff", "pinned-midpoint", "pinned-exit", "mobile", "reduced-motion"]
24
+ },
25
+ "proof": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["timestamp"],
29
+ "properties": {
30
+ "timestamp": { "type": "string", "format": "date-time" },
31
+ "artifactPath": { "type": "string", "minLength": 1 },
32
+ "viewport": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["width", "height"],
36
+ "properties": {
37
+ "width": { "type": "number", "exclusiveMinimum": 0 },
38
+ "height": { "type": "number", "exclusiveMinimum": 0 },
39
+ "dpr": { "type": "number", "exclusiveMinimum": 0 }
40
+ }
41
+ },
42
+ "command": { "type": "string", "minLength": 1 },
43
+ "exitCode": { "type": "integer" },
44
+ "consoleErrorCount": { "type": "integer", "minimum": 0 },
45
+ "testedUrl": { "type": "string", "minLength": 1 },
46
+ "averageFps": { "type": "number", "exclusiveMinimum": 0 },
47
+ "maxFrameTimeMs": { "type": "number", "minimum": 0 },
48
+ "playwrightTestId": { "type": "string", "minLength": 1 }
49
+ },
50
+ "anyOf": [
51
+ { "required": ["artifactPath"] },
52
+ { "required": ["command", "exitCode"] },
53
+ { "required": ["consoleErrorCount"] },
54
+ { "required": ["testedUrl"] },
55
+ { "required": ["averageFps"] },
56
+ { "required": ["maxFrameTimeMs"] },
57
+ { "required": ["playwrightTestId"] }
58
+ ]
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "refinement": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["inspectedAt", "findings", "changes", "evidenceIds"],
67
+ "properties": {
68
+ "inspectedAt": { "type": "string", "format": "date-time" },
69
+ "findings": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
70
+ "changes": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
71
+ "evidenceIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
72
+ }
73
+ }
74
+ }
75
+ }