@auto-engineer/information-architect 1.7.0 → 1.9.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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +1 -1
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +42 -0
- package/dist/auto-ux-schema.json +42 -7
- package/dist/src/auto-ux-schema.json +42 -7
- package/dist/src/ia-agent.d.ts +1 -1
- package/dist/src/ia-agent.d.ts.map +1 -1
- package/dist/src/ia-agent.js +149 -28
- package/dist/src/ia-agent.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/auto-ux-schema.json +42 -7
- package/src/ia-agent.ts +170 -30
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/information-architect@1.
|
|
2
|
+
> @auto-engineer/information-architect@1.9.0 build /home/runner/work/auto-engineer/auto-engineer/packages/information-architect
|
|
3
3
|
> tsc && tsx ../../scripts/fix-esm-imports.ts && cp src/auto-ux-schema.json dist/
|
|
4
4
|
|
|
5
5
|
Fixed ESM imports in dist/
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/information-architect@1.
|
|
2
|
+
> @auto-engineer/information-architect@1.9.0 test /home/runner/work/auto-engineer/auto-engineer/packages/information-architect
|
|
3
3
|
> vitest run --reporter=dot
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/information-architect@1.
|
|
2
|
+
> @auto-engineer/information-architect@1.9.0 type-check /home/runner/work/auto-engineer/auto-engineer/packages/information-architect
|
|
3
3
|
> tsc --noEmit
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @auto-engineer/information-architect
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`9cca67b`](https://github.com/BeOnAuto/auto-engineer/commit/9cca67b7c85953d297a632a268829cc18a168e3a) Thanks [@github-actions[bot]](https://github.com/github-actions%5Bbot%5D)! - - **cli**: implement delegation pattern for FileSyncer reset
|
|
8
|
+
- **global**: version packages
|
|
9
|
+
- **global**: add changeset
|
|
10
|
+
- **global**: update ketchup settings
|
|
11
|
+
- **cli**: update ketchup plan with completed burst
|
|
12
|
+
|
|
13
|
+
- [#43](https://github.com/BeOnAuto/auto-engineer/pull/43) [`af76242`](https://github.com/BeOnAuto/auto-engineer/commit/af762423f8adfad0796f2f3a6483fb931c7b0bf1) Thanks [@osamanar](https://github.com/osamanar)! - - Added template generation capability to frontend app generation in the information architect package
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#43](https://github.com/BeOnAuto/auto-engineer/pull/43) [`31aab4f`](https://github.com/BeOnAuto/auto-engineer/commit/31aab4f3114d6fd8f60fa2239fff9d567a78e321) Thanks [@osamanar](https://github.com/osamanar)! - - Fixed package manager lock file to ensure consistent dependency installation
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`31aab4f`](https://github.com/BeOnAuto/auto-engineer/commit/31aab4f3114d6fd8f60fa2239fff9d567a78e321), [`9cca67b`](https://github.com/BeOnAuto/auto-engineer/commit/9cca67b7c85953d297a632a268829cc18a168e3a), [`af76242`](https://github.com/BeOnAuto/auto-engineer/commit/af762423f8adfad0796f2f3a6483fb931c7b0bf1)]:
|
|
20
|
+
- @auto-engineer/ai-gateway@1.9.0
|
|
21
|
+
- @auto-engineer/message-bus@1.9.0
|
|
22
|
+
- @auto-engineer/narrative@1.9.0
|
|
23
|
+
|
|
24
|
+
## 1.8.0
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- [`c383ec4`](https://github.com/BeOnAuto/auto-engineer/commit/c383ec4bae483e32d6b747575f2311a67e488a41) Thanks [@rami-hatoum](https://github.com/rami-hatoum)! - - Implemented delegation pattern for FileSyncer reset, allowing the server to swap file syncer instances without re-registering socket handlers
|
|
29
|
+
- Made FileSyncer stop operation async and idempotent with proper startup/shutdown guards
|
|
30
|
+
- Updated ketchup development workflow settings
|
|
31
|
+
|
|
32
|
+
- [`9479f7a`](https://github.com/BeOnAuto/auto-engineer/commit/9479f7a5ebb999907028873cdfcc43b692bfe28a) Thanks [@github-actions[bot]](https://github.com/github-actions%5Bbot%5D)! - - **cli**: default file sync directory to narratives
|
|
33
|
+
- **husky**: handle non-zero exit codes from changeset generator under sh -e
|
|
34
|
+
- **global**: version packages
|
|
35
|
+
- **global**: add changeset
|
|
36
|
+
- **global**: exclude .ketchup from biome checks
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`c383ec4`](https://github.com/BeOnAuto/auto-engineer/commit/c383ec4bae483e32d6b747575f2311a67e488a41), [`9479f7a`](https://github.com/BeOnAuto/auto-engineer/commit/9479f7a5ebb999907028873cdfcc43b692bfe28a)]:
|
|
41
|
+
- @auto-engineer/ai-gateway@1.8.0
|
|
42
|
+
- @auto-engineer/message-bus@1.8.0
|
|
43
|
+
- @auto-engineer/narrative@1.8.0
|
|
44
|
+
|
|
3
45
|
## 1.7.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
package/dist/auto-ux-schema.json
CHANGED
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
},
|
|
165
165
|
"required": ["description", "items"]
|
|
166
166
|
},
|
|
167
|
-
"
|
|
168
|
-
"description": "
|
|
167
|
+
"templates": {
|
|
168
|
+
"description": "Page-level layout structures that place organisms into a layout. Templates define the skeletal framework and content structure without real data.",
|
|
169
169
|
"type": "object",
|
|
170
170
|
"properties": {
|
|
171
171
|
"description": {
|
|
@@ -177,9 +177,6 @@
|
|
|
177
177
|
"^[A-Z][a-zA-Z0-9]*$": {
|
|
178
178
|
"type": "object",
|
|
179
179
|
"properties": {
|
|
180
|
-
"route": {
|
|
181
|
-
"type": "string"
|
|
182
|
-
},
|
|
183
180
|
"description": {
|
|
184
181
|
"type": "string"
|
|
185
182
|
},
|
|
@@ -195,6 +192,44 @@
|
|
|
195
192
|
},
|
|
196
193
|
"required": ["organisms"]
|
|
197
194
|
},
|
|
195
|
+
"specs": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"items": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"description": "Optional. Array of behavioral test specifications. Uses ' → ' to show nested context."
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": ["description", "layout"]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": ["description", "items"]
|
|
209
|
+
},
|
|
210
|
+
"pages": {
|
|
211
|
+
"description": "Specific instances of templates with real representative content. Tied to routes and populated with actual data.",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"description": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"patternProperties": {
|
|
220
|
+
"^[A-Z][a-zA-Z0-9]*$": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"properties": {
|
|
223
|
+
"route": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"description": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"template": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "Reference to a template that defines the page's layout structure."
|
|
232
|
+
},
|
|
198
233
|
"navigation": {
|
|
199
234
|
"type": "array",
|
|
200
235
|
"items": {
|
|
@@ -257,7 +292,7 @@
|
|
|
257
292
|
"description": "Optional. Array of behavioral test specifications. Uses ' → ' to show nested context."
|
|
258
293
|
}
|
|
259
294
|
},
|
|
260
|
-
"required": ["route", "description", "
|
|
295
|
+
"required": ["route", "description", "template"]
|
|
261
296
|
}
|
|
262
297
|
}
|
|
263
298
|
}
|
|
@@ -265,5 +300,5 @@
|
|
|
265
300
|
"required": ["description", "items"]
|
|
266
301
|
}
|
|
267
302
|
},
|
|
268
|
-
"required": ["schema_description", "atoms", "molecules", "organisms", "pages"]
|
|
303
|
+
"required": ["schema_description", "atoms", "molecules", "organisms", "templates", "pages"]
|
|
269
304
|
}
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
},
|
|
165
165
|
"required": ["description", "items"]
|
|
166
166
|
},
|
|
167
|
-
"
|
|
168
|
-
"description": "
|
|
167
|
+
"templates": {
|
|
168
|
+
"description": "Page-level layout structures that place organisms into a layout. Templates define the skeletal framework and content structure without real data.",
|
|
169
169
|
"type": "object",
|
|
170
170
|
"properties": {
|
|
171
171
|
"description": {
|
|
@@ -177,9 +177,6 @@
|
|
|
177
177
|
"^[A-Z][a-zA-Z0-9]*$": {
|
|
178
178
|
"type": "object",
|
|
179
179
|
"properties": {
|
|
180
|
-
"route": {
|
|
181
|
-
"type": "string"
|
|
182
|
-
},
|
|
183
180
|
"description": {
|
|
184
181
|
"type": "string"
|
|
185
182
|
},
|
|
@@ -195,6 +192,44 @@
|
|
|
195
192
|
},
|
|
196
193
|
"required": ["organisms"]
|
|
197
194
|
},
|
|
195
|
+
"specs": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"items": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"description": "Optional. Array of behavioral test specifications. Uses ' → ' to show nested context."
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": ["description", "layout"]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": ["description", "items"]
|
|
209
|
+
},
|
|
210
|
+
"pages": {
|
|
211
|
+
"description": "Specific instances of templates with real representative content. Tied to routes and populated with actual data.",
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"description": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"patternProperties": {
|
|
220
|
+
"^[A-Z][a-zA-Z0-9]*$": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"properties": {
|
|
223
|
+
"route": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"description": {
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"template": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "Reference to a template that defines the page's layout structure."
|
|
232
|
+
},
|
|
198
233
|
"navigation": {
|
|
199
234
|
"type": "array",
|
|
200
235
|
"items": {
|
|
@@ -257,7 +292,7 @@
|
|
|
257
292
|
"description": "Optional. Array of behavioral test specifications. Uses ' → ' to show nested context."
|
|
258
293
|
}
|
|
259
294
|
},
|
|
260
|
-
"required": ["route", "description", "
|
|
295
|
+
"required": ["route", "description", "template"]
|
|
261
296
|
}
|
|
262
297
|
}
|
|
263
298
|
}
|
|
@@ -265,5 +300,5 @@
|
|
|
265
300
|
"required": ["description", "items"]
|
|
266
301
|
}
|
|
267
302
|
},
|
|
268
|
-
"required": ["schema_description", "atoms", "molecules", "organisms", "pages"]
|
|
303
|
+
"required": ["schema_description", "atoms", "molecules", "organisms", "templates", "pages"]
|
|
269
304
|
}
|
package/dist/src/ia-agent.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Model } from '@auto-engineer/narrative';
|
|
|
3
3
|
import type { AIAgentOutput, UXSchema } from './types.js';
|
|
4
4
|
export interface ValidationError {
|
|
5
5
|
component: string;
|
|
6
|
-
type: 'molecule' | 'organism';
|
|
6
|
+
type: 'molecule' | 'organism' | 'template' | 'page';
|
|
7
7
|
field: string;
|
|
8
8
|
invalidReferences: string[];
|
|
9
9
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ia-agent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AAa,CAAC;IAsBzB,OAAO,CAAC,eAAe;CAiNxB;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,cAAc,CAAC,EAAE,MAAM,EACvB,KAAK,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,EACnE,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,aAAa,CAAC,CAGxB"}
|
package/dist/src/ia-agent.js
CHANGED
|
@@ -18,6 +18,8 @@ export function validateCompositionReferences(schema, designSystemAtoms = []) {
|
|
|
18
18
|
const atomNames = new Set([...schemaAtoms, ...designSystemAtoms]);
|
|
19
19
|
const moleculeNames = new Set(Object.keys(s.molecules?.items ?? {}));
|
|
20
20
|
const organismNames = new Set(Object.keys(s.organisms?.items ?? {}));
|
|
21
|
+
const templateNames = new Set(Object.keys(s.templates?.items ?? {}));
|
|
22
|
+
// Validate molecules reference only atoms
|
|
21
23
|
for (const [name, def] of Object.entries(s.molecules?.items ?? {})) {
|
|
22
24
|
const referencedAtoms = def.composition?.atoms ?? [];
|
|
23
25
|
const invalidAtoms = referencedAtoms.filter((atom) => !atomNames.has(atom));
|
|
@@ -31,6 +33,7 @@ export function validateCompositionReferences(schema, designSystemAtoms = []) {
|
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
35
|
}
|
|
36
|
+
// Validate organisms reference only molecules
|
|
34
37
|
for (const [name, def] of Object.entries(s.organisms?.items ?? {})) {
|
|
35
38
|
const referencedMolecules = def.composition?.molecules ?? [];
|
|
36
39
|
const nonExistentMolecules = referencedMolecules.filter((mol) => !moleculeNames.has(mol) && !organismNames.has(mol));
|
|
@@ -54,6 +57,33 @@ export function validateCompositionReferences(schema, designSystemAtoms = []) {
|
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
}
|
|
60
|
+
// Validate templates reference only organisms
|
|
61
|
+
for (const [name, def] of Object.entries(s.templates?.items ?? {})) {
|
|
62
|
+
const referencedOrganisms = def.layout?.organisms ?? [];
|
|
63
|
+
const invalidOrganisms = referencedOrganisms.filter((org) => !organismNames.has(org));
|
|
64
|
+
if (invalidOrganisms.length > 0) {
|
|
65
|
+
errors.push({
|
|
66
|
+
component: name,
|
|
67
|
+
type: 'template',
|
|
68
|
+
field: 'layout.organisms',
|
|
69
|
+
invalidReferences: invalidOrganisms,
|
|
70
|
+
message: `Template "${name}" references non-existent organisms: ${invalidOrganisms.join(', ')}`,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Validate pages reference only templates
|
|
75
|
+
for (const [name, def] of Object.entries(s.pages?.items ?? {})) {
|
|
76
|
+
const referencedTemplate = def.template;
|
|
77
|
+
if (referencedTemplate && !templateNames.has(referencedTemplate)) {
|
|
78
|
+
errors.push({
|
|
79
|
+
component: name,
|
|
80
|
+
type: 'page',
|
|
81
|
+
field: 'template',
|
|
82
|
+
invalidReferences: [referencedTemplate],
|
|
83
|
+
message: `Page "${name}" references non-existent template: ${referencedTemplate}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
57
87
|
return errors;
|
|
58
88
|
}
|
|
59
89
|
export class InformationArchitectAgent {
|
|
@@ -97,16 +127,68 @@ ${errorContext}
|
|
|
97
127
|
IMPORTANT: Only generate pages and components that are directly referenced in the provided model's flows. Do NOT add any extra pages or components, and do NOT make assumptions outside the flows. If something is not mentioned in the flows, it should NOT appear in the output.
|
|
98
128
|
IMPORTANT: try your best to reuse the existing atoms, and try not to generate atoms with context: like Submit Button, because the submit part is mainly irrelevant, instead just use the Button atom if provided.
|
|
99
129
|
|
|
100
|
-
CRITICAL COMPOSITION RULES - THESE ARE STRICT AND MUST BE FOLLOWED:
|
|
130
|
+
CRITICAL COMPOSITION RULES - THESE ARE STRICT AND MUST BE FOLLOWED (Atomic Design Methodology):
|
|
101
131
|
1. Atoms: Basic UI primitives (Button, Text, Input, Icon, etc.). Atoms do NOT compose other atoms.
|
|
102
132
|
2. Molecules: Composed ONLY of atoms. A molecule's "composition.atoms" array must ONLY reference items that exist in "atoms.items".
|
|
103
133
|
3. Organisms: Composed of atoms AND molecules. An organism's "composition.molecules" array must ONLY reference items that exist in "molecules.items". An organism MUST NOT reference other organisms.
|
|
104
|
-
4.
|
|
134
|
+
4. Templates: Page-level layout structures that place organisms into a layout. A template's "layout.organisms" array must ONLY reference items that exist in "organisms.items". Templates define the skeletal framework without real content.
|
|
135
|
+
5. Pages: Specific instances of templates with real representative content. A page's "template" field must reference a template that exists in "templates.items". Pages are tied to routes and populated with actual data.
|
|
136
|
+
|
|
137
|
+
VISUAL DESIGN PRINCIPLES - Apply these to create beautiful, professional UIs:
|
|
138
|
+
|
|
139
|
+
1. TYPOGRAPHY HIERARCHY (every component should consider text sizing):
|
|
140
|
+
- Headlines/Titles: Large size, bold weight, commanding presence
|
|
141
|
+
- Subheadings: Medium-large size, semi-bold weight, clear section breaks
|
|
142
|
+
- Body text: Comfortable reading size with good line height
|
|
143
|
+
- Labels/Captions: Small size, subtle color, supporting information
|
|
144
|
+
|
|
145
|
+
2. COMPONENT PURPOSE & VISUAL ROLE:
|
|
146
|
+
- Molecules should be self-contained, visually complete units (cards, forms, list items)
|
|
147
|
+
- Organisms should compose molecules into meaningful sections (hero sections, feature grids, data tables)
|
|
148
|
+
- Templates define visual rhythm and spacing structure
|
|
149
|
+
|
|
150
|
+
3. INTERACTIVE ELEMENTS:
|
|
151
|
+
- Every interactive molecule/organism should specify hover, focus, and active states in specs
|
|
152
|
+
- Forms need clear validation states (success, error, loading)
|
|
153
|
+
- Lists need empty states and loading states
|
|
154
|
+
|
|
155
|
+
4. SEMANTIC NAMING FOR VISUAL CLARITY:
|
|
156
|
+
- Use descriptive names that hint at visual purpose: "HeroSection", "FeatureCard", "StatsGrid", "NavigationSidebar"
|
|
157
|
+
- Avoid generic names like "Section1" or "Component"
|
|
158
|
+
|
|
159
|
+
5. LAYOUT CONSIDERATIONS IN TEMPLATES:
|
|
160
|
+
- Define clear visual regions: header, sidebar, main content, footer
|
|
161
|
+
- Consider responsive behavior in template specs
|
|
162
|
+
- Use common patterns: dashboard layout, marketing layout, form-centric layout
|
|
163
|
+
|
|
164
|
+
6. TEMPLATE NAMING AND PURPOSE:
|
|
165
|
+
- Name templates based on their layout structure (e.g., SidebarLayout, CenteredLayout, FullWidthLayout)
|
|
166
|
+
- Templates should be reusable across different pages
|
|
167
|
+
- Include layout-related specs like "responsive sidebar" or "sticky header"
|
|
168
|
+
|
|
169
|
+
7. ORGANISM DESCRIPTIONS SHOULD SPECIFY VISUAL ROLE:
|
|
170
|
+
Good: "Card grid displaying items with image, title, and action buttons"
|
|
171
|
+
Good: "Navigation bar with logo, menu items, and user actions"
|
|
172
|
+
Bad: "Shows items" (too vague)
|
|
173
|
+
Bad: "Navigation" (no visual details)
|
|
174
|
+
|
|
175
|
+
8. SPECS SHOULD INCLUDE VISUAL BEHAVIORS:
|
|
176
|
+
Good specs:
|
|
177
|
+
- "displays loading skeleton while fetching data"
|
|
178
|
+
- "shows empty state with icon and action button when no items"
|
|
179
|
+
- "items have hover effect with shadow elevation"
|
|
180
|
+
- "responsive grid: 1 column mobile, 2 tablet, 3 desktop"
|
|
181
|
+
Bad specs (too vague):
|
|
182
|
+
- "shows data"
|
|
183
|
+
- "handles loading"
|
|
184
|
+
- "is responsive"
|
|
105
185
|
|
|
106
186
|
VALIDATION CHECKLIST (the schema will be rejected if these rules are violated):
|
|
107
187
|
- Every item in a molecule's "composition.atoms" MUST exist in "atoms.items"
|
|
108
188
|
- Every item in an organism's "composition.molecules" MUST exist in "molecules.items"
|
|
109
189
|
- An organism's "composition.molecules" MUST NOT contain names that only exist in "organisms.items"
|
|
190
|
+
- Every item in a template's "layout.organisms" MUST exist in "organisms.items"
|
|
191
|
+
- Every page's "template" MUST reference a template that exists in "templates.items"
|
|
110
192
|
- Cross-check all composition references before finalizing the output
|
|
111
193
|
|
|
112
194
|
$${atoms ? `Here is a list of available atomic components (atoms) from the design system. Use these atoms and their props as much as possible. Only create new atoms if absolutely necessary. And only put the new atoms created into the schema. \n\nAtoms:\n${JSON.stringify(atoms, null, 2)}\n` : ''}
|
|
@@ -121,25 +203,32 @@ Instructions:
|
|
|
121
203
|
|
|
122
204
|
- NEVER generate any data_requirements queries or mutations if NONE were provided from the flow schema
|
|
123
205
|
- Respond ONLY with a JSON object, no explanation, no markdown, no text before or after.
|
|
124
|
-
- The JSON should have
|
|
125
|
-
- In "
|
|
206
|
+
- The JSON should have sections for: "atoms", "molecules", "organisms", "templates", and "pages".
|
|
207
|
+
- In "atoms", "molecules", and "organisms", define composite UI elements with:
|
|
126
208
|
- A description
|
|
127
|
-
- A "composition" field listing the building blocks used
|
|
128
|
-
- "atoms"
|
|
129
|
-
- "molecules"
|
|
130
|
-
|
|
131
|
-
- Example:
|
|
209
|
+
- A "composition" field listing the building blocks used:
|
|
210
|
+
- For molecules: "atoms" array referencing atomic UI primitives
|
|
211
|
+
- For organisms: "molecules" array referencing molecule components
|
|
212
|
+
- Example for molecule:
|
|
132
213
|
"composition": {
|
|
133
|
-
"atoms": ["Button", "Text"]
|
|
134
|
-
"molecules": ["SearchBar"],
|
|
135
|
-
"organisms": ["TopNavBar"]
|
|
214
|
+
"atoms": ["Button", "Text"]
|
|
136
215
|
}
|
|
137
|
-
-
|
|
216
|
+
- Example for organism:
|
|
217
|
+
"composition": {
|
|
218
|
+
"molecules": ["SearchBar", "FilterPanel"]
|
|
219
|
+
}
|
|
220
|
+
- In "templates", define page-level layout structures with:
|
|
221
|
+
- description (what this layout structure provides - be specific about visual arrangement)
|
|
222
|
+
- layout.organisms (array of organisms that make up the template's skeleton)
|
|
223
|
+
- specs (optional array describing layout requirements like "responsive sidebar", "sticky header", "scrollable content area")
|
|
224
|
+
- Templates define the structural framework WITHOUT real content
|
|
225
|
+
- Common template patterns: DashboardTemplate (sidebar + main), MarketingTemplate (full-width sections), FormTemplate (centered narrow container)
|
|
226
|
+
- In "pages", define each page as a specific instance of a template, with:
|
|
138
227
|
- route (URL path)
|
|
139
228
|
- description
|
|
140
|
-
- template (
|
|
229
|
+
- template (reference to a template in "templates.items" that defines the page's layout)
|
|
141
230
|
- navigation (array of navigation actions, e.g., { "on": "Click Listing Card", "to": "ListingDetailPage" })
|
|
142
|
-
- data_requirements (array
|
|
231
|
+
- data_requirements (array for page-level data fetching - this is the "real content" that populates the template)
|
|
143
232
|
- For each component or page, if there are any specs defined in the model's flow slices, look at slice.client.specs which is an array of strings.
|
|
144
233
|
- These specs describe behavioral requirements with nested context preserved using ' → ' separator (e.g., "Form → Validation → shows error").
|
|
145
234
|
- Assign these specs directly to the 'specs' field for the corresponding component/page.
|
|
@@ -149,17 +238,37 @@ Use the following structure as a template for your response:
|
|
|
149
238
|
----
|
|
150
239
|
{
|
|
151
240
|
"atoms": {
|
|
241
|
+
"description": "Basic UI primitives",
|
|
152
242
|
"items": {
|
|
153
243
|
"AtomName": {
|
|
154
|
-
|
|
244
|
+
"description": "What this atom does."
|
|
155
245
|
}
|
|
156
246
|
}
|
|
157
247
|
},
|
|
158
248
|
"molecules": {
|
|
249
|
+
"description": "Components composed from atoms - these are reusable visual units",
|
|
250
|
+
"items": {
|
|
251
|
+
"MoleculeName": {
|
|
252
|
+
"description": "What this molecule does and its visual appearance (e.g., 'Card displaying user info with avatar, name, and action button').",
|
|
253
|
+
"composition": { "atoms": ["Atom1", "Atom2"] },
|
|
254
|
+
"specs": [
|
|
255
|
+
"hover state shows shadow elevation",
|
|
256
|
+
"click navigates to detail view"
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"organisms": {
|
|
262
|
+
"description": "Smart UI components composed of molecules - these are visually complete sections",
|
|
159
263
|
"items": {
|
|
160
|
-
"
|
|
161
|
-
"description": "What this
|
|
162
|
-
"composition": { "
|
|
264
|
+
"OrganismName": {
|
|
265
|
+
"description": "What this organism does and its visual role (e.g., 'Hero section with headline, subtext, and CTA buttons').",
|
|
266
|
+
"composition": { "molecules": ["Molecule1", "Molecule2"] },
|
|
267
|
+
"specs": [
|
|
268
|
+
"displays loading skeleton while fetching",
|
|
269
|
+
"shows empty state when no data",
|
|
270
|
+
"hover effect on interactive cards"
|
|
271
|
+
],
|
|
163
272
|
"data_requirements": [
|
|
164
273
|
{
|
|
165
274
|
"type": "query",
|
|
@@ -173,18 +282,30 @@ Use the following structure as a template for your response:
|
|
|
173
282
|
]
|
|
174
283
|
}
|
|
175
284
|
}
|
|
176
|
-
|
|
285
|
+
},
|
|
286
|
+
"templates": {
|
|
287
|
+
"description": "Page-level layout structures that define visual rhythm and regions",
|
|
288
|
+
"items": {
|
|
289
|
+
"TemplateName": {
|
|
290
|
+
"description": "What layout structure this template provides (e.g., 'Dashboard layout with collapsible sidebar and main content area').",
|
|
291
|
+
"layout": { "organisms": ["Organism1", "Organism2"] },
|
|
292
|
+
"specs": ["responsive sidebar collapses on mobile", "sticky header", "scrollable main content"]
|
|
293
|
+
}
|
|
294
|
+
}
|
|
177
295
|
},
|
|
178
296
|
"pages": {
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
297
|
+
"description": "Specific instances of templates with real content",
|
|
298
|
+
"items": {
|
|
299
|
+
"PageName": {
|
|
300
|
+
"route": "/route",
|
|
301
|
+
"description": "What this page does.",
|
|
302
|
+
"template": "TemplateName",
|
|
303
|
+
"navigation": [{ "on": "Event", "to": "TargetPage" }],
|
|
304
|
+
"data_requirements": [
|
|
305
|
+
// ... as above
|
|
306
|
+
]
|
|
307
|
+
}
|
|
186
308
|
}
|
|
187
|
-
// ... more pages
|
|
188
309
|
}
|
|
189
310
|
}
|
|
190
311
|
----
|
package/dist/src/ia-agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ia-agent.js","sourceRoot":"","sources":["../../src/ia-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,SAAS,uBAAuB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACtE,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;
|
|
1
|
+
{"version":3,"file":"ia-agent.js","sourceRoot":"","sources":["../../src/ia-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,SAAS,uBAAuB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACtE,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAgDD,MAAM,UAAU,6BAA6B,CAAC,MAAe,EAAE,oBAA8B,EAAE;IAC7F,MAAM,CAAC,GAAG,MAAkB,CAAC;IAC7B,MAAM,MAAM,GAAsB,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,WAAW,EAAE,GAAG,iBAAiB,CAA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