@auto-engineer/information-architect 0.13.3 → 0.15.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/CHANGELOG.md +26 -0
- package/README.md +166 -358
- package/dist/src/commands/generate-ia.d.ts +9 -1
- package/dist/src/commands/generate-ia.d.ts.map +1 -1
- package/dist/src/commands/generate-ia.js +34 -7
- package/dist/src/commands/generate-ia.js.map +1 -1
- package/dist/src/generate-ia-schema.js +4 -4
- package/dist/src/generate-ia-schema.js.map +1 -1
- package/dist/src/ia-agent.d.ts +13 -5
- package/dist/src/ia-agent.d.ts.map +1 -1
- package/dist/src/ia-agent.js +72 -7
- package/dist/src/ia-agent.js.map +1 -1
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -9
- package/src/commands/generate-ia.ts +55 -14
- package/src/generate-ia-schema.ts +5 -5
- package/src/ia-agent.ts +116 -7
- package/src/index.ts +8 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/information-architect@0.
|
|
2
|
+
> @auto-engineer/information-architect@0.15.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @auto-engineer/information-architect
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- version bump
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @auto-engineer/message-bus@0.15.0
|
|
13
|
+
- @auto-engineer/ai-gateway@0.15.0
|
|
14
|
+
- @auto-engineer/narrative@0.15.0
|
|
15
|
+
|
|
16
|
+
## 0.14.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- Rewrite CLI and Pipeline
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies []:
|
|
25
|
+
- @auto-engineer/ai-gateway@0.14.0
|
|
26
|
+
- @auto-engineer/message-bus@0.14.0
|
|
27
|
+
- @auto-engineer/narrative@0.14.0
|
|
28
|
+
|
|
3
29
|
## 0.13.3
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,408 +1,216 @@
|
|
|
1
1
|
# @auto-engineer/information-architect
|
|
2
2
|
|
|
3
|
-
AI-powered
|
|
3
|
+
AI-powered Information Architecture generation that transforms narrative models into UI component specifications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Without `@auto-engineer/information-architect`, you would have to manually design component hierarchies from business requirements, maintain consistency across atomic design layers, and validate composition references by hand.
|
|
6
10
|
|
|
7
|
-
This
|
|
11
|
+
This package generates structured UI component architectures from business flow models. It uses AI to analyze narrative models and produces specifications for atoms, molecules, organisms, and pages following Atomic Design methodology.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
8
16
|
|
|
9
17
|
```bash
|
|
10
|
-
|
|
11
|
-
npm install @auto-engineer/information-architect
|
|
18
|
+
pnpm add @auto-engineer/information-architect
|
|
12
19
|
```
|
|
13
20
|
|
|
14
|
-
##
|
|
21
|
+
## Quick Start
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
Register the handler and generate an IA scheme:
|
|
24
|
+
|
|
25
|
+
### 1. Register the handlers
|
|
17
26
|
|
|
18
27
|
```typescript
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'@auto-engineer/information-architect',
|
|
22
|
-
// ... other plugins
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
```
|
|
28
|
+
import { COMMANDS } from '@auto-engineer/information-architect';
|
|
29
|
+
import { createMessageBus } from '@auto-engineer/message-bus';
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
This plugin provides the following commands:
|
|
30
|
-
|
|
31
|
-
- `generate:ia` - Generate information architecture from requirements
|
|
32
|
-
|
|
33
|
-
## What does this plugin do?
|
|
34
|
-
|
|
35
|
-
The Information Architect plugin analyzes business requirements and generates structured information architectures that serve as blueprints for application development. It creates user experience flows, content hierarchies, navigation structures, and interaction patterns that guide the development of frontend and server systems.
|
|
36
|
-
|
|
37
|
-
## Key Features
|
|
38
|
-
|
|
39
|
-
### Requirements Analysis
|
|
40
|
-
|
|
41
|
-
- Parses business requirements
|
|
42
|
-
- Identifies user personas and use cases
|
|
43
|
-
- Extracts functional and non-functional requirements
|
|
44
|
-
- Maps business processes to application features
|
|
45
|
-
|
|
46
|
-
### Information Architecture Generation
|
|
47
|
-
|
|
48
|
-
- Creates content structures
|
|
49
|
-
- Defines navigation patterns and user flows
|
|
50
|
-
- Establishes data relationships and dependencies
|
|
51
|
-
- Generates wireframes and interaction specifications
|
|
52
|
-
|
|
53
|
-
### User Experience Design
|
|
54
|
-
|
|
55
|
-
- Maps user journeys and task flows
|
|
56
|
-
- Identifies key interaction points and decision moments
|
|
57
|
-
- Defines responsive design requirements
|
|
58
|
-
- Creates accessibility and usability guidelines
|
|
59
|
-
|
|
60
|
-
### Technical Specifications
|
|
61
|
-
|
|
62
|
-
- Generates API requirements and data models
|
|
63
|
-
- Creates component hierarchies for frontend development
|
|
64
|
-
- Defines integration points and external dependencies
|
|
65
|
-
- Establishes performance and scalability requirements
|
|
66
|
-
|
|
67
|
-
## Generated Architecture Components
|
|
68
|
-
|
|
69
|
-
### Site Map and Navigation
|
|
70
|
-
|
|
71
|
-
Creates comprehensive navigation structures:
|
|
72
|
-
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"siteMap": {
|
|
76
|
-
"root": "/",
|
|
77
|
-
"sections": [
|
|
78
|
-
{
|
|
79
|
-
"name": "Dashboard",
|
|
80
|
-
"path": "/dashboard",
|
|
81
|
-
"access": "authenticated",
|
|
82
|
-
"children": [
|
|
83
|
-
{
|
|
84
|
-
"name": "Analytics",
|
|
85
|
-
"path": "/dashboard/analytics",
|
|
86
|
-
"description": "Performance metrics and insights"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "Settings",
|
|
90
|
-
"path": "/dashboard/settings",
|
|
91
|
-
"description": "Account and application settings"
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"name": "Products",
|
|
97
|
-
"path": "/products",
|
|
98
|
-
"access": "public",
|
|
99
|
-
"children": [
|
|
100
|
-
{
|
|
101
|
-
"name": "Catalog",
|
|
102
|
-
"path": "/products/catalog",
|
|
103
|
-
"description": "Browse all available products"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "Product Details",
|
|
107
|
-
"path": "/products/:id",
|
|
108
|
-
"description": "Detailed product information and purchasing options"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
31
|
+
const bus = createMessageBus();
|
|
32
|
+
COMMANDS.forEach(cmd => bus.registerCommand(cmd));
|
|
115
33
|
```
|
|
116
34
|
|
|
117
|
-
###
|
|
118
|
-
|
|
119
|
-
Defines target users and their interaction patterns:
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"personas": [
|
|
124
|
-
{
|
|
125
|
-
"name": "End Consumer",
|
|
126
|
-
"description": "Individual purchasing products for personal use",
|
|
127
|
-
"goals": ["Find products quickly", "Compare options easily", "Complete purchases securely"],
|
|
128
|
-
"painPoints": ["Complex checkout process", "Limited product information", "Poor mobile experience"],
|
|
129
|
-
"journeys": [
|
|
130
|
-
{
|
|
131
|
-
"name": "Product Purchase",
|
|
132
|
-
"steps": [
|
|
133
|
-
{
|
|
134
|
-
"stage": "Discovery",
|
|
135
|
-
"actions": ["Browse catalog", "Search products", "Filter results"],
|
|
136
|
-
"touchpoints": ["/products", "/search"],
|
|
137
|
-
"requirements": ["Fast search", "Intuitive filters", "Product recommendations"]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"stage": "Evaluation",
|
|
141
|
-
"actions": ["View details", "Compare products", "Read reviews"],
|
|
142
|
-
"touchpoints": ["/products/:id", "/compare"],
|
|
143
|
-
"requirements": ["Detailed information", "High-quality images", "Social proof"]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"stage": "Purchase",
|
|
147
|
-
"actions": ["Add to cart", "Checkout", "Payment"],
|
|
148
|
-
"touchpoints": ["/cart", "/checkout"],
|
|
149
|
-
"requirements": ["Simple checkout", "Multiple payment options", "Security indicators"]
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
```
|
|
35
|
+
### 2. Send a command
|
|
158
36
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"type": "grid",
|
|
172
|
-
"responsive": true,
|
|
173
|
-
"components": [
|
|
174
|
-
{
|
|
175
|
-
"name": "SearchBar",
|
|
176
|
-
"position": "header",
|
|
177
|
-
"functionality": "Real-time product search with autocomplete"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"name": "FilterSidebar",
|
|
181
|
-
"position": "left",
|
|
182
|
-
"functionality": "Category, price, and attribute filtering"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"name": "ProductGrid",
|
|
186
|
-
"position": "main",
|
|
187
|
-
"functionality": "Paginated grid of product cards with sorting options"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "Pagination",
|
|
191
|
-
"position": "footer",
|
|
192
|
-
"functionality": "Navigate through product results"
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
},
|
|
196
|
-
"dataRequirements": [
|
|
197
|
-
"Product catalog with metadata",
|
|
198
|
-
"Category hierarchy",
|
|
199
|
-
"Search indexing",
|
|
200
|
-
"User preferences"
|
|
201
|
-
],
|
|
202
|
-
"apiEndpoints": ["GET /api/products", "GET /api/categories", "GET /api/search"]
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
}
|
|
37
|
+
```typescript
|
|
38
|
+
const result = await bus.dispatch({
|
|
39
|
+
type: 'GenerateIA',
|
|
40
|
+
data: {
|
|
41
|
+
modelPath: './.context/schema.json',
|
|
42
|
+
outputDir: './.context',
|
|
43
|
+
},
|
|
44
|
+
requestId: 'req-123',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
console.log(result);
|
|
48
|
+
// → { type: 'IAGenerated', data: { outputDir: './.context', schemaPath: './.context/auto-ia-scheme.json' } }
|
|
206
49
|
```
|
|
207
50
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Defines reusable component specifications:
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"components": [
|
|
215
|
-
{
|
|
216
|
-
"name": "ProductCard",
|
|
217
|
-
"type": "organism",
|
|
218
|
-
"purpose": "Display product information in a card format",
|
|
219
|
-
"props": [
|
|
220
|
-
{
|
|
221
|
-
"name": "product",
|
|
222
|
-
"type": "Product",
|
|
223
|
-
"required": true,
|
|
224
|
-
"description": "Product data object"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"name": "onAddToCart",
|
|
228
|
-
"type": "function",
|
|
229
|
-
"required": false,
|
|
230
|
-
"description": "Callback when add to cart is clicked"
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"composition": ["ProductImage", "ProductTitle", "ProductPrice", "AddToCartButton", "ProductRating"],
|
|
234
|
-
"states": ["loading", "outOfStock", "onSale"],
|
|
235
|
-
"interactions": [
|
|
236
|
-
"hover: show quick actions",
|
|
237
|
-
"click: navigate to product details",
|
|
238
|
-
"cart button: add to cart with feedback"
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
```
|
|
51
|
+
The command generates `auto-ia-scheme.json` with atoms, molecules, organisms, and pages.
|
|
244
52
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
"name": "Product",
|
|
254
|
-
"description": "Core product entity",
|
|
255
|
-
"fields": [
|
|
256
|
-
{
|
|
257
|
-
"name": "id",
|
|
258
|
-
"type": "string",
|
|
259
|
-
"required": true,
|
|
260
|
-
"description": "Unique product identifier"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"name": "name",
|
|
264
|
-
"type": "string",
|
|
265
|
-
"required": true,
|
|
266
|
-
"description": "Product display name"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"name": "price",
|
|
270
|
-
"type": "decimal",
|
|
271
|
-
"required": true,
|
|
272
|
-
"description": "Product price in base currency"
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"name": "category",
|
|
276
|
-
"type": "Category",
|
|
277
|
-
"required": true,
|
|
278
|
-
"relationship": "many-to-one"
|
|
279
|
-
}
|
|
280
|
-
],
|
|
281
|
-
"relationships": [
|
|
282
|
-
{
|
|
283
|
-
"type": "one-to-many",
|
|
284
|
-
"target": "Review",
|
|
285
|
-
"description": "Products can have multiple reviews"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"type": "many-to-many",
|
|
289
|
-
"target": "Tag",
|
|
290
|
-
"description": "Products can have multiple tags for categorization"
|
|
291
|
-
}
|
|
292
|
-
]
|
|
293
|
-
}
|
|
294
|
-
]
|
|
295
|
-
}
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## How-to Guides
|
|
56
|
+
|
|
57
|
+
### Run via CLI
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
auto generate:ia --output-dir=./.context --model-path=./.context/schema.json
|
|
296
61
|
```
|
|
297
62
|
|
|
298
|
-
|
|
63
|
+
### Run via Script
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pnpm generate-ia-schema ./.context
|
|
67
|
+
```
|
|
299
68
|
|
|
300
|
-
|
|
69
|
+
### Run Programmatically
|
|
301
70
|
|
|
302
71
|
```typescript
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
'@auto-engineer/information-architect',
|
|
308
|
-
{
|
|
309
|
-
// Analysis preferences
|
|
310
|
-
includeUserPersonas: true,
|
|
311
|
-
includeUserJourneys: true,
|
|
312
|
-
includeWireframes: false,
|
|
313
|
-
|
|
314
|
-
// Output format
|
|
315
|
-
outputFormat: 'json', // or 'markdown', 'html'
|
|
316
|
-
|
|
317
|
-
// Detail level
|
|
318
|
-
detailLevel: 'comprehensive', // or 'basic', 'detailed'
|
|
319
|
-
|
|
320
|
-
// Target platforms
|
|
321
|
-
platforms: ['web', 'mobile'],
|
|
322
|
-
|
|
323
|
-
// Design system integration
|
|
324
|
-
useDesignSystem: true,
|
|
325
|
-
designSystemPath: './design-system',
|
|
326
|
-
},
|
|
327
|
-
],
|
|
328
|
-
],
|
|
329
|
-
};
|
|
72
|
+
import { processFlowsWithAI, validateCompositionReferences } from '@auto-engineer/information-architect';
|
|
73
|
+
|
|
74
|
+
const iaSchema = await processFlowsWithAI(model, uxSchema, undefined, existingAtoms);
|
|
75
|
+
const errors = validateCompositionReferences(iaSchema, atomNames);
|
|
330
76
|
```
|
|
331
77
|
|
|
332
|
-
|
|
78
|
+
### Handle Errors
|
|
333
79
|
|
|
334
|
-
|
|
80
|
+
```typescript
|
|
81
|
+
if (result.type === 'IAGenerationFailed') {
|
|
82
|
+
console.error(result.data.error);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (result.type === 'IAValidationFailed') {
|
|
86
|
+
console.error('Composition validation errors:', result.data.errors);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Enable Debug Logging
|
|
335
91
|
|
|
336
|
-
|
|
337
|
-
-
|
|
338
|
-
|
|
339
|
-
- **@auto-engineer/design-system-importer**: Applies design system constraints to IA components
|
|
340
|
-
- **@auto-engineer/frontend-implementer**: Implements pages and components per IA specifications
|
|
92
|
+
```bash
|
|
93
|
+
DEBUG=auto:information-architect:* pnpm generate-ia-schema ./.context
|
|
94
|
+
```
|
|
341
95
|
|
|
342
|
-
|
|
96
|
+
---
|
|
343
97
|
|
|
344
|
-
|
|
98
|
+
## API Reference
|
|
345
99
|
|
|
346
|
-
|
|
100
|
+
### Exports
|
|
347
101
|
|
|
348
|
-
```
|
|
349
|
-
|
|
102
|
+
```typescript
|
|
103
|
+
import {
|
|
104
|
+
COMMANDS,
|
|
105
|
+
InformationArchitectAgent,
|
|
106
|
+
processFlowsWithAI,
|
|
107
|
+
validateCompositionReferences,
|
|
108
|
+
} from '@auto-engineer/information-architect';
|
|
109
|
+
|
|
110
|
+
import type {
|
|
111
|
+
GenerateIACommand,
|
|
112
|
+
IAGeneratedEvent,
|
|
113
|
+
IAGenerationFailedEvent,
|
|
114
|
+
IAValidationFailedEvent,
|
|
115
|
+
AIAgentOutput,
|
|
116
|
+
UXSchema,
|
|
117
|
+
ValidationError,
|
|
118
|
+
} from '@auto-engineer/information-architect';
|
|
350
119
|
```
|
|
351
120
|
|
|
352
|
-
###
|
|
121
|
+
### Commands
|
|
122
|
+
|
|
123
|
+
| Command | CLI Alias | Description |
|
|
124
|
+
|---------|-----------|-------------|
|
|
125
|
+
| `GenerateIA` | `generate:ia` | Generate IA scheme from narrative model |
|
|
126
|
+
|
|
127
|
+
### GenerateIACommand
|
|
353
128
|
|
|
354
|
-
|
|
129
|
+
```typescript
|
|
130
|
+
type GenerateIACommand = Command<'GenerateIA', {
|
|
131
|
+
modelPath: string;
|
|
132
|
+
outputDir: string;
|
|
133
|
+
previousErrors?: string;
|
|
134
|
+
}>;
|
|
135
|
+
```
|
|
355
136
|
|
|
356
|
-
|
|
357
|
-
- User personas and journey maps
|
|
358
|
-
- Page specifications with component breakdowns
|
|
359
|
-
- Data model requirements
|
|
360
|
-
- API endpoint specifications
|
|
361
|
-
- Technical requirements and constraints
|
|
137
|
+
### processFlowsWithAI
|
|
362
138
|
|
|
363
|
-
|
|
139
|
+
```typescript
|
|
140
|
+
function processFlowsWithAI(
|
|
141
|
+
model: Model,
|
|
142
|
+
uxSchema: UXSchema,
|
|
143
|
+
existingSchema?: object,
|
|
144
|
+
atoms?: { name: string; props: { name: string; type: string }[] }[],
|
|
145
|
+
previousErrors?: string
|
|
146
|
+
): Promise<AIAgentOutput>
|
|
147
|
+
```
|
|
364
148
|
|
|
365
|
-
|
|
149
|
+
### validateCompositionReferences
|
|
366
150
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
151
|
+
```typescript
|
|
152
|
+
function validateCompositionReferences(
|
|
153
|
+
schema: unknown,
|
|
154
|
+
designSystemAtoms?: string[]
|
|
155
|
+
): ValidationError[]
|
|
156
|
+
```
|
|
372
157
|
|
|
373
|
-
|
|
158
|
+
Returns errors when components reference non-existent dependencies.
|
|
374
159
|
|
|
375
|
-
|
|
160
|
+
### ValidationError
|
|
376
161
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
162
|
+
```typescript
|
|
163
|
+
interface ValidationError {
|
|
164
|
+
component: string;
|
|
165
|
+
type: 'molecule' | 'organism';
|
|
166
|
+
field: string;
|
|
167
|
+
invalidReferences: string[];
|
|
168
|
+
message: string;
|
|
169
|
+
}
|
|
170
|
+
```
|
|
381
171
|
|
|
382
|
-
|
|
172
|
+
---
|
|
383
173
|
|
|
384
|
-
|
|
174
|
+
## Architecture
|
|
385
175
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
-
|
|
390
|
-
|
|
176
|
+
```
|
|
177
|
+
src/
|
|
178
|
+
├── index.ts
|
|
179
|
+
├── ia-agent.ts
|
|
180
|
+
├── types.ts
|
|
181
|
+
├── auto-ux-schema.json
|
|
182
|
+
└── commands/
|
|
183
|
+
└── generate-ia.ts
|
|
184
|
+
```
|
|
391
185
|
|
|
392
|
-
|
|
186
|
+
The following diagram shows the generation flow:
|
|
187
|
+
|
|
188
|
+
```mermaid
|
|
189
|
+
flowchart TB
|
|
190
|
+
A[GenerateIA] --> B[Load Model]
|
|
191
|
+
B --> C[Flatten Client Specs]
|
|
192
|
+
C --> D[Extract Design System Atoms]
|
|
193
|
+
D --> E[Generate via AI]
|
|
194
|
+
E --> F[Validate Compositions]
|
|
195
|
+
F --> G{Valid?}
|
|
196
|
+
G -->|Yes| H[IAGeneratedEvent]
|
|
197
|
+
G -->|No| I[IAValidationFailedEvent]
|
|
198
|
+
```
|
|
393
199
|
|
|
394
|
-
|
|
200
|
+
*Flow: Command loads model, processes specs, generates IA via AI, validates compositions.*
|
|
395
201
|
|
|
396
|
-
|
|
397
|
-
- Supports incremental requirement additions
|
|
398
|
-
- Maintains architecture consistency across changes
|
|
399
|
-
- Tracks requirement evolution and impact
|
|
202
|
+
### Composition Rules
|
|
400
203
|
|
|
401
|
-
|
|
204
|
+
- Atoms do NOT compose other atoms
|
|
205
|
+
- Molecules compose ONLY atoms
|
|
206
|
+
- Organisms compose atoms AND molecules (never other organisms)
|
|
207
|
+
- Pages can reference organisms, molecules, and atoms
|
|
402
208
|
|
|
403
|
-
|
|
404
|
-
- Addresses responsive design requirements
|
|
405
|
-
- Includes mobile-first considerations
|
|
406
|
-
- Plans for progressive web app features
|
|
209
|
+
### Dependencies
|
|
407
210
|
|
|
408
|
-
|
|
211
|
+
| Package | Usage |
|
|
212
|
+
|---------|-------|
|
|
213
|
+
| `@auto-engineer/ai-gateway` | AI text generation |
|
|
214
|
+
| `@auto-engineer/message-bus` | Command/event infrastructure |
|
|
215
|
+
| `@auto-engineer/narrative` | Model type definitions |
|
|
216
|
+
| `fast-glob` | File pattern matching |
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Command, type Event } from '@auto-engineer/message-bus';
|
|
2
|
+
import { type ValidationError } from '../index';
|
|
2
3
|
export type GenerateIACommand = Command<'GenerateIA', {
|
|
3
4
|
modelPath: string;
|
|
4
5
|
outputDir: string;
|
|
6
|
+
previousErrors?: string;
|
|
5
7
|
}>;
|
|
6
8
|
export type IAGeneratedEvent = Event<'IAGenerated', {
|
|
7
9
|
outputPath: string;
|
|
@@ -11,12 +13,18 @@ export type IAGenerationFailedEvent = Event<'IAGenerationFailed', {
|
|
|
11
13
|
error: string;
|
|
12
14
|
outputDir: string;
|
|
13
15
|
}>;
|
|
14
|
-
export type
|
|
16
|
+
export type IAValidationFailedEvent = Event<'IAValidationFailed', {
|
|
17
|
+
errors: ValidationError[];
|
|
18
|
+
outputDir: string;
|
|
19
|
+
modelPath: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type GenerateIAEvents = IAGeneratedEvent | IAGenerationFailedEvent | IAValidationFailedEvent;
|
|
15
22
|
export declare const commandHandler: import("@auto-engineer/message-bus").UnifiedCommandHandler<Readonly<{
|
|
16
23
|
type: "GenerateIA";
|
|
17
24
|
data: Readonly<{
|
|
18
25
|
modelPath: string;
|
|
19
26
|
outputDir: string;
|
|
27
|
+
previousErrors?: string;
|
|
20
28
|
}>;
|
|
21
29
|
timestamp?: Date;
|
|
22
30
|
requestId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-ia.d.ts","sourceRoot":"","sources":["../../../src/commands/generate-ia.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-ia.d.ts","sourceRoot":"","sources":["../../../src/commands/generate-ia.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAAwB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAG5F,OAAO,EAAsB,KAAK,eAAe,EAAiC,MAAM,UAAU,CAAC;AAanG,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACrC,YAAY,EACZ;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAClC,aAAa,EACb;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CACzC,oBAAoB,EACpB;IACE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CACzC,oBAAoB,EACpB;IACE,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CACF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,uBAAuB,GAAG,uBAAuB,CAAC;AAEpG,eAAO,MAAM,cAAc;;;mBAjCZ,MAAM;mBACN,MAAM;yBACA,MAAM;;;;;GAsEzB,CAAC;AA4LH,eAAe,cAAc,CAAC"}
|