dreative 0.5.1 → 0.5.2

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 +162 -0
  10. package/dist/shared/design.js +42 -22
  11. package/dist/shared/ruleSystem.js +130 -0
  12. package/dist/shared/ruleSystem.test.js +187 -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 +121 -93
  19. package/skill/dreative/PLAN.md +229 -92
  20. package/skill/dreative/SKILL.md +218 -137
  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 +44 -0
  31. package/skill/dreative/references/ARTIFACTS.md +180 -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 +42 -0
  36. package/skill/dreative/schemas/plan.schema.json +241 -0
  37. package/skill/dreative/schemas/verify.schema.json +61 -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 +135 -564
  44. package/skill/dreative/skills/mobile.md +128 -117
  45. package/skill/dreative/skills/motion.md +89 -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,241 @@
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
+ "fontDecision": { "$ref": "#/$defs/fontDecision" },
52
+ "experimentalPlan": { "$ref": "#/$defs/experimentalPlan" },
53
+ "conceptExploration": { "$ref": "#/$defs/conceptExploration" },
54
+ "recipeAccess": { "type": "array", "items": { "$ref": "#/$defs/recipeAccess" } },
55
+ "pages": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/page" } },
56
+ "preservationManifest": { "type": "string", "minLength": 1 },
57
+ "decisionLedger": { "type": "string", "minLength": 1 }
58
+ },
59
+ "$defs": {
60
+ "skill": { "enum": ["ux", "mobile", "refined", "motion", "interaction", "media", "3d", "immersive", "cinematic", "experimental"] },
61
+ "skillList": {
62
+ "type": "array",
63
+ "uniqueItems": true,
64
+ "allOf": [{ "contains": { "const": "ux" } }, { "contains": { "const": "mobile" } }],
65
+ "items": { "$ref": "#/$defs/skill" }
66
+ },
67
+ "treatmentList": {
68
+ "type": "array",
69
+ "uniqueItems": true,
70
+ "items": { "$ref": "#/$defs/skill" }
71
+ },
72
+ "status": { "enum": ["planned", "shipped", "fallback", "cut"] },
73
+ "ruleException": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["ruleId", "decision", "declaredAt", "reason", "alternative", "successCriteria", "evidenceIds"],
77
+ "properties": {
78
+ "ruleId": { "type": "string", "minLength": 1 },
79
+ "decision": { "const": "substituted" },
80
+ "declaredAt": { "type": "string", "format": "date-time" },
81
+ "reason": { "type": "string", "minLength": 20 },
82
+ "alternative": { "type": "string", "minLength": 30 },
83
+ "successCriteria": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 12 } },
84
+ "evidenceIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
85
+ }
86
+ },
87
+ "creativeStrategy": {
88
+ "oneOf": [
89
+ {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": ["path", "mechanisms", "drivers"],
93
+ "properties": {
94
+ "path": { "const": "diversity" },
95
+ "mechanisms": { "type": "array", "minItems": 4, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
96
+ "drivers": { "type": "array", "minItems": 3, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
97
+ }
98
+ },
99
+ {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": ["path", "signatureMechanism", "states", "secondaryMechanisms", "drivers"],
103
+ "properties": {
104
+ "path": { "const": "development" },
105
+ "signatureMechanism": { "type": "string", "minLength": 1 },
106
+ "states": { "type": "array", "minItems": 3, "uniqueItems": true, "items": { "type": "string", "minLength": 12 } },
107
+ "secondaryMechanisms": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
108
+ "drivers": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
109
+ }
110
+ }
111
+ ]
112
+ },
113
+ "fontDecision": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": ["selected", "candidates", "recentDisplayFonts"],
117
+ "properties": {
118
+ "selected": { "type": "string", "minLength": 1 },
119
+ "candidates": {
120
+ "type": "array",
121
+ "minItems": 3,
122
+ "items": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["name", "reflex", "rationale"],
126
+ "properties": {
127
+ "name": { "type": "string", "minLength": 1 },
128
+ "reflex": { "type": "boolean" },
129
+ "rationale": { "type": "string", "minLength": 12 }
130
+ }
131
+ }
132
+ },
133
+ "recentDisplayFonts": { "type": "array", "maxItems": 3, "items": { "type": "string" } },
134
+ "reasonKinds": {
135
+ "type": "array",
136
+ "uniqueItems": true,
137
+ "items": {
138
+ "enum": ["existing-brand", "design-system-metrics", "product-register", "supplied-reference", "language-coverage", "variable-font-capability", "performance", "physical-editorial-historical-reference"]
139
+ }
140
+ },
141
+ "justification": { "type": "string", "minLength": 20 },
142
+ "repeatJustification": { "type": "string", "minLength": 20 }
143
+ }
144
+ },
145
+ "experimentalPlan": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["majorSectionIds", "candidates"],
149
+ "properties": {
150
+ "majorSectionIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
151
+ "candidates": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": ["id", "sectionId", "idea", "selected"],
157
+ "properties": {
158
+ "id": { "type": "string", "minLength": 1 },
159
+ "sectionId": { "type": "string", "minLength": 1 },
160
+ "idea": { "type": "string", "minLength": 20 },
161
+ "selected": { "type": "boolean" }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "conceptExploration": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": ["recordedAt", "concepts"],
171
+ "properties": {
172
+ "recordedAt": { "type": "string", "format": "date-time" },
173
+ "concepts": {
174
+ "type": "array",
175
+ "minItems": 3,
176
+ "items": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["name", "concept", "brandConnection"],
180
+ "properties": {
181
+ "name": { "type": "string", "minLength": 1 },
182
+ "concept": { "type": "string", "minLength": 20 },
183
+ "brandConnection": { "type": "string", "minLength": 20 }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "recipeAccess": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": ["file", "loadedAt", "purpose"],
193
+ "properties": {
194
+ "file": { "type": "string", "minLength": 1 },
195
+ "loadedAt": { "type": "string", "format": "date-time" },
196
+ "purpose": { "enum": ["feasibility", "implementation", "performance", "fallback", "concept-repair"] }
197
+ }
198
+ },
199
+ "asset": {
200
+ "type": "object",
201
+ "additionalProperties": false,
202
+ "required": ["id", "path", "purpose", "status"],
203
+ "properties": {
204
+ "id": { "type": "string", "minLength": 1 },
205
+ "path": { "type": "string", "minLength": 1 },
206
+ "purpose": { "type": "string", "minLength": 1 },
207
+ "status": { "$ref": "#/$defs/status" },
208
+ "reason": { "type": "string", "minLength": 1 }
209
+ }
210
+ },
211
+ "section": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["id", "name", "layoutFamily", "skills", "interactions", "mobile", "fallback", "verification", "assets", "status"],
215
+ "properties": {
216
+ "id": { "type": "string", "minLength": 1 },
217
+ "name": { "type": "string", "minLength": 1 },
218
+ "layoutFamily": { "type": "string", "minLength": 1 },
219
+ "skills": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/skill" } },
220
+ "interactions": { "type": "array", "items": { "type": "string" } },
221
+ "mobile": { "type": "string", "minLength": 1 },
222
+ "fallback": { "type": "string", "minLength": 1 },
223
+ "verification": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
224
+ "assets": { "type": "array", "items": { "$ref": "#/$defs/asset" } },
225
+ "status": { "$ref": "#/$defs/status" },
226
+ "reason": { "type": "string", "minLength": 1 }
227
+ }
228
+ },
229
+ "page": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": ["id", "name", "skills", "sections"],
233
+ "properties": {
234
+ "id": { "type": "string", "minLength": 1 },
235
+ "name": { "type": "string", "minLength": 1 },
236
+ "skills": { "$ref": "#/$defs/skillList" },
237
+ "sections": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/section" } }
238
+ }
239
+ }
240
+ }
241
+ }
@@ -0,0 +1,61 @@
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
+ "proof": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["timestamp"],
26
+ "properties": {
27
+ "timestamp": { "type": "string", "format": "date-time" },
28
+ "artifactPath": { "type": "string", "minLength": 1 },
29
+ "viewport": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["width", "height"],
33
+ "properties": {
34
+ "width": { "type": "number", "exclusiveMinimum": 0 },
35
+ "height": { "type": "number", "exclusiveMinimum": 0 },
36
+ "dpr": { "type": "number", "exclusiveMinimum": 0 }
37
+ }
38
+ },
39
+ "command": { "type": "string", "minLength": 1 },
40
+ "exitCode": { "type": "integer" },
41
+ "consoleErrorCount": { "type": "integer", "minimum": 0 },
42
+ "testedUrl": { "type": "string", "minLength": 1 },
43
+ "averageFps": { "type": "number", "exclusiveMinimum": 0 },
44
+ "maxFrameTimeMs": { "type": "number", "minimum": 0 },
45
+ "playwrightTestId": { "type": "string", "minLength": 1 }
46
+ },
47
+ "anyOf": [
48
+ { "required": ["artifactPath"] },
49
+ { "required": ["command", "exitCode"] },
50
+ { "required": ["consoleErrorCount"] },
51
+ { "required": ["testedUrl"] },
52
+ { "required": ["averageFps"] },
53
+ { "required": ["maxFrameTimeMs"] },
54
+ { "required": ["playwrightTestId"] }
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }