@almadar/std 3.12.1 → 3.13.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.
Files changed (149) hide show
  1. package/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  2. package/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  3. package/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  4. package/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  5. package/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  6. package/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  7. package/behaviors/exports/atoms/std-agent-search.orb +418 -0
  8. package/behaviors/exports/atoms/std-agent-session.orb +825 -0
  9. package/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  10. package/behaviors/exports/atoms/std-wizard.orb +63 -70
  11. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  12. package/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  13. package/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  14. package/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  15. package/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  16. package/behaviors/exports/molecules/std-detail.orb +4 -0
  17. package/behaviors/exports/molecules/std-geospatial.orb +4 -0
  18. package/behaviors/exports/molecules/std-inventory.orb +8 -0
  19. package/behaviors/exports/molecules/std-list.orb +18 -1
  20. package/behaviors/exports/molecules/std-messaging.orb +4 -0
  21. package/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  22. package/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  23. package/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  24. package/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  25. package/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  26. package/behaviors/exports/organisms/std-api-gateway.orb +18 -1
  27. package/behaviors/exports/organisms/std-booking-system.orb +131 -104
  28. package/behaviors/exports/organisms/std-cicd-pipeline.orb +18 -1
  29. package/behaviors/exports/organisms/std-cms.orb +40 -2
  30. package/behaviors/exports/organisms/std-crm.orb +40 -2
  31. package/behaviors/exports/organisms/std-devops-dashboard.orb +18 -1
  32. package/behaviors/exports/organisms/std-finance-tracker.orb +22 -1
  33. package/behaviors/exports/organisms/std-healthcare.orb +167 -136
  34. package/behaviors/exports/organisms/std-helpdesk.orb +22 -1
  35. package/behaviors/exports/organisms/std-hr-portal.orb +115 -88
  36. package/behaviors/exports/organisms/std-iot-dashboard.orb +18 -1
  37. package/behaviors/exports/organisms/std-lms.orb +97 -87
  38. package/behaviors/exports/organisms/std-platformer-app.orb +8 -0
  39. package/behaviors/exports/organisms/std-project-manager.orb +36 -2
  40. package/behaviors/exports/organisms/std-realtime-chat.orb +22 -1
  41. package/behaviors/exports/organisms/std-rpg-game.orb +8 -0
  42. package/behaviors/exports/organisms/std-service-marketplace.orb +36 -2
  43. package/behaviors/exports/organisms/std-social-feed.orb +8 -0
  44. package/behaviors/exports/organisms/std-trading-dashboard.orb +18 -1
  45. package/behaviors/exports/validation-report.json +1425 -0
  46. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  47. package/dist/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  48. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  49. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  50. package/dist/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  51. package/dist/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  52. package/dist/behaviors/exports/atoms/std-agent-search.orb +418 -0
  53. package/dist/behaviors/exports/atoms/std-agent-session.orb +825 -0
  54. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  55. package/dist/behaviors/exports/atoms/std-wizard.orb +63 -70
  56. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  57. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  58. package/dist/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  59. package/dist/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  60. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  61. package/dist/behaviors/exports/molecules/std-detail.orb +4 -0
  62. package/dist/behaviors/exports/molecules/std-geospatial.orb +4 -0
  63. package/dist/behaviors/exports/molecules/std-inventory.orb +8 -0
  64. package/dist/behaviors/exports/molecules/std-list.orb +18 -1
  65. package/dist/behaviors/exports/molecules/std-messaging.orb +4 -0
  66. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  67. package/dist/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  68. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  69. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  70. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  71. package/dist/behaviors/exports/organisms/std-api-gateway.orb +18 -1
  72. package/dist/behaviors/exports/organisms/std-booking-system.orb +131 -104
  73. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +18 -1
  74. package/dist/behaviors/exports/organisms/std-cms.orb +40 -2
  75. package/dist/behaviors/exports/organisms/std-crm.orb +40 -2
  76. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +18 -1
  77. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +22 -1
  78. package/dist/behaviors/exports/organisms/std-healthcare.orb +167 -136
  79. package/dist/behaviors/exports/organisms/std-helpdesk.orb +22 -1
  80. package/dist/behaviors/exports/organisms/std-hr-portal.orb +115 -88
  81. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +18 -1
  82. package/dist/behaviors/exports/organisms/std-lms.orb +97 -87
  83. package/dist/behaviors/exports/organisms/std-platformer-app.orb +8 -0
  84. package/dist/behaviors/exports/organisms/std-project-manager.orb +36 -2
  85. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +22 -1
  86. package/dist/behaviors/exports/organisms/std-rpg-game.orb +8 -0
  87. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +36 -2
  88. package/dist/behaviors/exports/organisms/std-social-feed.orb +8 -0
  89. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +18 -1
  90. package/dist/behaviors/exports/validation-report.json +1425 -0
  91. package/dist/behaviors/exports-reader.js +6345 -175
  92. package/dist/behaviors/exports-reader.js.map +1 -1
  93. package/dist/behaviors/functions/index.d.ts +620 -1
  94. package/dist/behaviors/functions/index.js +6285 -176
  95. package/dist/behaviors/functions/index.js.map +1 -1
  96. package/dist/behaviors/index.d.ts +1 -1
  97. package/dist/behaviors/index.js +6348 -178
  98. package/dist/behaviors/index.js.map +1 -1
  99. package/dist/behaviors/query.js +6347 -177
  100. package/dist/behaviors/query.js.map +1 -1
  101. package/dist/exports/atoms/std-agent-classifier.orb +402 -0
  102. package/dist/exports/atoms/std-agent-completion.orb +469 -0
  103. package/dist/exports/atoms/std-agent-context-window.orb +790 -0
  104. package/dist/exports/atoms/std-agent-conversation.orb +737 -0
  105. package/dist/exports/atoms/std-agent-memory.orb +627 -0
  106. package/dist/exports/atoms/std-agent-provider.orb +402 -0
  107. package/dist/exports/atoms/std-agent-search.orb +418 -0
  108. package/dist/exports/atoms/std-agent-session.orb +825 -0
  109. package/dist/exports/atoms/std-agent-tool-call.orb +380 -0
  110. package/dist/exports/atoms/std-wizard.orb +63 -70
  111. package/dist/exports/molecules/std-agent-fix-loop.orb +1213 -0
  112. package/dist/exports/molecules/std-agent-learner.orb +1143 -0
  113. package/dist/exports/molecules/std-agent-planner.orb +898 -0
  114. package/dist/exports/molecules/std-agent-rag.orb +736 -0
  115. package/dist/exports/molecules/std-agent-tool-loop.orb +1237 -0
  116. package/dist/exports/molecules/std-detail.orb +4 -0
  117. package/dist/exports/molecules/std-geospatial.orb +4 -0
  118. package/dist/exports/molecules/std-inventory.orb +8 -0
  119. package/dist/exports/molecules/std-list.orb +18 -1
  120. package/dist/exports/molecules/std-messaging.orb +4 -0
  121. package/dist/exports/organisms/std-agent-assistant.orb +2288 -0
  122. package/dist/exports/organisms/std-agent-builder.orb +2664 -0
  123. package/dist/exports/organisms/std-agent-pipeline.orb +2307 -0
  124. package/dist/exports/organisms/std-agent-reviewer.orb +1743 -0
  125. package/dist/exports/organisms/std-agent-tutor.orb +2303 -0
  126. package/dist/exports/organisms/std-api-gateway.orb +18 -1
  127. package/dist/exports/organisms/std-booking-system.orb +131 -104
  128. package/dist/exports/organisms/std-cicd-pipeline.orb +18 -1
  129. package/dist/exports/organisms/std-cms.orb +40 -2
  130. package/dist/exports/organisms/std-crm.orb +40 -2
  131. package/dist/exports/organisms/std-devops-dashboard.orb +18 -1
  132. package/dist/exports/organisms/std-finance-tracker.orb +22 -1
  133. package/dist/exports/organisms/std-healthcare.orb +167 -136
  134. package/dist/exports/organisms/std-helpdesk.orb +22 -1
  135. package/dist/exports/organisms/std-hr-portal.orb +115 -88
  136. package/dist/exports/organisms/std-iot-dashboard.orb +18 -1
  137. package/dist/exports/organisms/std-lms.orb +97 -87
  138. package/dist/exports/organisms/std-platformer-app.orb +8 -0
  139. package/dist/exports/organisms/std-project-manager.orb +36 -2
  140. package/dist/exports/organisms/std-realtime-chat.orb +22 -1
  141. package/dist/exports/organisms/std-rpg-game.orb +8 -0
  142. package/dist/exports/organisms/std-service-marketplace.orb +36 -2
  143. package/dist/exports/organisms/std-social-feed.orb +8 -0
  144. package/dist/exports/organisms/std-trading-dashboard.orb +18 -1
  145. package/dist/exports/validation-report.json +1425 -0
  146. package/dist/index.d.ts +1 -1
  147. package/dist/index.js +6348 -178
  148. package/dist/index.js.map +1 -1
  149. package/package.json +1 -1
@@ -0,0 +1,2664 @@
1
+ {
2
+ "name": "Schema Builder",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "BuildTaskOrbital",
7
+ "entity": {
8
+ "name": "BuildTask",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "prompt",
18
+ "type": "string",
19
+ "default": ""
20
+ },
21
+ {
22
+ "name": "plan",
23
+ "type": "string",
24
+ "default": ""
25
+ },
26
+ {
27
+ "name": "schema",
28
+ "type": "string",
29
+ "default": ""
30
+ },
31
+ {
32
+ "name": "validationStatus",
33
+ "type": "string",
34
+ "default": "pending"
35
+ },
36
+ {
37
+ "name": "buildPhase",
38
+ "type": "string",
39
+ "default": "idle"
40
+ },
41
+ {
42
+ "name": "attempts",
43
+ "type": "number",
44
+ "default": 0
45
+ },
46
+ {
47
+ "name": "sessionId",
48
+ "type": "string",
49
+ "default": ""
50
+ },
51
+ {
52
+ "name": "error",
53
+ "type": "string",
54
+ "default": ""
55
+ }
56
+ ]
57
+ },
58
+ "traits": [
59
+ {
60
+ "name": "BuildPlanner",
61
+ "linkedEntity": "BuildTask",
62
+ "category": "interaction",
63
+ "emits": [
64
+ {
65
+ "event": "PLAN_READY",
66
+ "description": "Plan is complete, begin building",
67
+ "scope": "internal"
68
+ },
69
+ {
70
+ "event": "PLAN_READY",
71
+ "description": "Plan complete, begin building",
72
+ "scope": "external"
73
+ }
74
+ ],
75
+ "stateMachine": {
76
+ "states": [
77
+ {
78
+ "name": "idle",
79
+ "isInitial": true
80
+ },
81
+ {
82
+ "name": "planning"
83
+ },
84
+ {
85
+ "name": "planned"
86
+ }
87
+ ],
88
+ "events": [
89
+ {
90
+ "key": "INIT",
91
+ "name": "Initialize"
92
+ },
93
+ {
94
+ "key": "START_PLANNING",
95
+ "name": "Start Planning",
96
+ "payload": [
97
+ {
98
+ "name": "prompt",
99
+ "type": "string",
100
+ "required": true
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "key": "PLAN_GENERATED",
106
+ "name": "Plan Generated"
107
+ },
108
+ {
109
+ "key": "BEGIN_BUILD",
110
+ "name": "Begin Build"
111
+ }
112
+ ],
113
+ "transitions": [
114
+ {
115
+ "from": "idle",
116
+ "to": "idle",
117
+ "event": "INIT",
118
+ "effects": [
119
+ [
120
+ "set",
121
+ "@entity.sessionId",
122
+ [
123
+ "agent/session-id"
124
+ ]
125
+ ],
126
+ [
127
+ "fetch",
128
+ "BuildTask"
129
+ ],
130
+ [
131
+ "render-ui",
132
+ "main",
133
+ {
134
+ "type": "dashboard-layout",
135
+ "appName": "Schema Builder",
136
+ "navItems": [
137
+ {
138
+ "label": "Plan",
139
+ "href": "/plan",
140
+ "icon": "clipboard-list"
141
+ },
142
+ {
143
+ "label": "Build",
144
+ "href": "/build",
145
+ "icon": "hammer"
146
+ },
147
+ {
148
+ "label": "Fix",
149
+ "href": "/fix",
150
+ "icon": "wrench"
151
+ },
152
+ {
153
+ "label": "Learnings",
154
+ "href": "/learnings",
155
+ "icon": "brain"
156
+ }
157
+ ],
158
+ "children": [
159
+ {
160
+ "type": "stack",
161
+ "direction": "vertical",
162
+ "gap": "lg",
163
+ "children": [
164
+ {
165
+ "type": "stack",
166
+ "direction": "horizontal",
167
+ "gap": "sm",
168
+ "align": "center",
169
+ "children": [
170
+ {
171
+ "type": "icon",
172
+ "name": "clipboard-list",
173
+ "size": "lg"
174
+ },
175
+ {
176
+ "type": "typography",
177
+ "content": "Build Planner",
178
+ "variant": "h2"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "type": "divider"
184
+ },
185
+ {
186
+ "type": "card",
187
+ "children": [
188
+ {
189
+ "type": "stack",
190
+ "direction": "vertical",
191
+ "gap": "md",
192
+ "children": [
193
+ {
194
+ "type": "typography",
195
+ "content": "Describe what you want to build. The agent will plan, generate, and validate the schema.",
196
+ "variant": "body"
197
+ },
198
+ {
199
+ "type": "form-section",
200
+ "entity": "BuildTask",
201
+ "mode": "edit",
202
+ "submitEvent": "START_PLANNING",
203
+ "fields": [
204
+ "prompt"
205
+ ]
206
+ }
207
+ ]
208
+ }
209
+ ]
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ ]
216
+ ]
217
+ },
218
+ {
219
+ "from": "idle",
220
+ "to": "planning",
221
+ "event": "START_PLANNING",
222
+ "effects": [
223
+ [
224
+ "set",
225
+ "@entity.prompt",
226
+ "@payload.prompt"
227
+ ],
228
+ [
229
+ "set",
230
+ "@entity.buildPhase",
231
+ "planning"
232
+ ],
233
+ [
234
+ "agent/label",
235
+ "plan-start"
236
+ ],
237
+ [
238
+ "agent/generate",
239
+ "@payload.prompt"
240
+ ],
241
+ [
242
+ "render-ui",
243
+ "main",
244
+ {
245
+ "type": "dashboard-layout",
246
+ "appName": "Schema Builder",
247
+ "navItems": [
248
+ {
249
+ "label": "Plan",
250
+ "href": "/plan",
251
+ "icon": "clipboard-list"
252
+ },
253
+ {
254
+ "label": "Build",
255
+ "href": "/build",
256
+ "icon": "hammer"
257
+ },
258
+ {
259
+ "label": "Fix",
260
+ "href": "/fix",
261
+ "icon": "wrench"
262
+ },
263
+ {
264
+ "label": "Learnings",
265
+ "href": "/learnings",
266
+ "icon": "brain"
267
+ }
268
+ ],
269
+ "children": [
270
+ {
271
+ "type": "stack",
272
+ "direction": "vertical",
273
+ "gap": "lg",
274
+ "align": "center",
275
+ "children": [
276
+ {
277
+ "type": "icon",
278
+ "name": "cpu",
279
+ "size": "lg"
280
+ },
281
+ {
282
+ "type": "typography",
283
+ "content": "Planning build steps...",
284
+ "variant": "h3"
285
+ },
286
+ {
287
+ "type": "spinner",
288
+ "size": "lg"
289
+ }
290
+ ]
291
+ }
292
+ ]
293
+ }
294
+ ]
295
+ ]
296
+ },
297
+ {
298
+ "from": "planning",
299
+ "to": "planned",
300
+ "event": "PLAN_GENERATED",
301
+ "effects": [
302
+ [
303
+ "set",
304
+ "@entity.buildPhase",
305
+ "planned"
306
+ ],
307
+ [
308
+ "agent/fork",
309
+ "plan-checkpoint"
310
+ ],
311
+ [
312
+ "render-ui",
313
+ "main",
314
+ {
315
+ "type": "dashboard-layout",
316
+ "appName": "Schema Builder",
317
+ "navItems": [
318
+ {
319
+ "label": "Plan",
320
+ "href": "/plan",
321
+ "icon": "clipboard-list"
322
+ },
323
+ {
324
+ "label": "Build",
325
+ "href": "/build",
326
+ "icon": "hammer"
327
+ },
328
+ {
329
+ "label": "Fix",
330
+ "href": "/fix",
331
+ "icon": "wrench"
332
+ },
333
+ {
334
+ "label": "Learnings",
335
+ "href": "/learnings",
336
+ "icon": "brain"
337
+ }
338
+ ],
339
+ "children": [
340
+ {
341
+ "type": "stack",
342
+ "direction": "vertical",
343
+ "gap": "lg",
344
+ "children": [
345
+ {
346
+ "type": "stack",
347
+ "direction": "horizontal",
348
+ "gap": "sm",
349
+ "align": "center",
350
+ "children": [
351
+ {
352
+ "type": "icon",
353
+ "name": "check-circle",
354
+ "size": "lg"
355
+ },
356
+ {
357
+ "type": "typography",
358
+ "content": "Plan Ready",
359
+ "variant": "h2"
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "type": "divider"
365
+ },
366
+ {
367
+ "type": "card",
368
+ "children": [
369
+ {
370
+ "type": "stack",
371
+ "direction": "vertical",
372
+ "gap": "md",
373
+ "children": [
374
+ {
375
+ "type": "typography",
376
+ "content": "Build Plan",
377
+ "variant": "caption"
378
+ },
379
+ {
380
+ "type": "typography",
381
+ "content": "@entity.plan",
382
+ "variant": "body"
383
+ }
384
+ ]
385
+ }
386
+ ]
387
+ },
388
+ {
389
+ "type": "button",
390
+ "label": "Start Building",
391
+ "event": "BEGIN_BUILD",
392
+ "variant": "primary",
393
+ "icon": "hammer"
394
+ }
395
+ ]
396
+ }
397
+ ]
398
+ }
399
+ ]
400
+ ]
401
+ },
402
+ {
403
+ "from": "planned",
404
+ "to": "idle",
405
+ "event": "BEGIN_BUILD",
406
+ "effects": [
407
+ [
408
+ "emit",
409
+ "PLAN_READY"
410
+ ],
411
+ [
412
+ "render-ui",
413
+ "main",
414
+ {
415
+ "type": "dashboard-layout",
416
+ "appName": "Schema Builder",
417
+ "navItems": [
418
+ {
419
+ "label": "Plan",
420
+ "href": "/plan",
421
+ "icon": "clipboard-list"
422
+ },
423
+ {
424
+ "label": "Build",
425
+ "href": "/build",
426
+ "icon": "hammer"
427
+ },
428
+ {
429
+ "label": "Fix",
430
+ "href": "/fix",
431
+ "icon": "wrench"
432
+ },
433
+ {
434
+ "label": "Learnings",
435
+ "href": "/learnings",
436
+ "icon": "brain"
437
+ }
438
+ ],
439
+ "children": [
440
+ {
441
+ "type": "stack",
442
+ "direction": "vertical",
443
+ "gap": "lg",
444
+ "children": [
445
+ {
446
+ "type": "stack",
447
+ "direction": "horizontal",
448
+ "gap": "sm",
449
+ "align": "center",
450
+ "children": [
451
+ {
452
+ "type": "icon",
453
+ "name": "clipboard-list",
454
+ "size": "lg"
455
+ },
456
+ {
457
+ "type": "typography",
458
+ "content": "Build Planner",
459
+ "variant": "h2"
460
+ }
461
+ ]
462
+ },
463
+ {
464
+ "type": "divider"
465
+ },
466
+ {
467
+ "type": "card",
468
+ "children": [
469
+ {
470
+ "type": "stack",
471
+ "direction": "vertical",
472
+ "gap": "md",
473
+ "children": [
474
+ {
475
+ "type": "typography",
476
+ "content": "Describe what you want to build. The agent will plan, generate, and validate the schema.",
477
+ "variant": "body"
478
+ },
479
+ {
480
+ "type": "form-section",
481
+ "entity": "BuildTask",
482
+ "mode": "edit",
483
+ "submitEvent": "START_PLANNING",
484
+ "fields": [
485
+ "prompt"
486
+ ]
487
+ }
488
+ ]
489
+ }
490
+ ]
491
+ }
492
+ ]
493
+ }
494
+ ]
495
+ }
496
+ ]
497
+ ]
498
+ }
499
+ ]
500
+ }
501
+ },
502
+ {
503
+ "name": "SchemaBuilder",
504
+ "linkedEntity": "BuildTask",
505
+ "category": "interaction",
506
+ "emits": [
507
+ {
508
+ "event": "BUILD_DONE",
509
+ "description": "Schema generated, needs validation",
510
+ "scope": "internal"
511
+ },
512
+ {
513
+ "event": "BUILD_FAILED",
514
+ "description": "Build failed after max attempts",
515
+ "scope": "internal"
516
+ },
517
+ {
518
+ "event": "BUILD_FAILED",
519
+ "description": "Build failed, attempt fix",
520
+ "scope": "external"
521
+ }
522
+ ],
523
+ "stateMachine": {
524
+ "states": [
525
+ {
526
+ "name": "idle",
527
+ "isInitial": true
528
+ },
529
+ {
530
+ "name": "building"
531
+ },
532
+ {
533
+ "name": "validating"
534
+ },
535
+ {
536
+ "name": "completed"
537
+ },
538
+ {
539
+ "name": "failed"
540
+ }
541
+ ],
542
+ "events": [
543
+ {
544
+ "key": "INIT",
545
+ "name": "Initialize"
546
+ },
547
+ {
548
+ "key": "BUILD",
549
+ "name": "Build"
550
+ },
551
+ {
552
+ "key": "SCHEMA_GENERATED",
553
+ "name": "Schema Generated"
554
+ },
555
+ {
556
+ "key": "VALIDATION_PASSED",
557
+ "name": "Validation Passed"
558
+ },
559
+ {
560
+ "key": "VALIDATION_FAILED",
561
+ "name": "Validation Failed",
562
+ "payload": [
563
+ {
564
+ "name": "errors",
565
+ "type": "string",
566
+ "required": true
567
+ }
568
+ ]
569
+ },
570
+ {
571
+ "key": "RETRY",
572
+ "name": "Retry"
573
+ },
574
+ {
575
+ "key": "RESET",
576
+ "name": "Reset"
577
+ }
578
+ ],
579
+ "transitions": [
580
+ {
581
+ "from": "idle",
582
+ "to": "idle",
583
+ "event": "INIT",
584
+ "effects": [
585
+ [
586
+ "fetch",
587
+ "BuildTask"
588
+ ],
589
+ [
590
+ "render-ui",
591
+ "main",
592
+ {
593
+ "type": "dashboard-layout",
594
+ "appName": "Schema Builder",
595
+ "navItems": [
596
+ {
597
+ "label": "Plan",
598
+ "href": "/plan",
599
+ "icon": "clipboard-list"
600
+ },
601
+ {
602
+ "label": "Build",
603
+ "href": "/build",
604
+ "icon": "hammer"
605
+ },
606
+ {
607
+ "label": "Fix",
608
+ "href": "/fix",
609
+ "icon": "wrench"
610
+ },
611
+ {
612
+ "label": "Learnings",
613
+ "href": "/learnings",
614
+ "icon": "brain"
615
+ }
616
+ ],
617
+ "children": [
618
+ {
619
+ "type": "stack",
620
+ "direction": "vertical",
621
+ "gap": "lg",
622
+ "align": "center",
623
+ "children": [
624
+ {
625
+ "type": "icon",
626
+ "name": "hammer",
627
+ "size": "lg"
628
+ },
629
+ {
630
+ "type": "typography",
631
+ "content": "Generating schema...",
632
+ "variant": "h3"
633
+ },
634
+ {
635
+ "type": "spinner",
636
+ "size": "lg"
637
+ },
638
+ {
639
+ "type": "typography",
640
+ "content": "Attempt: @entity.attempts",
641
+ "variant": "caption"
642
+ }
643
+ ]
644
+ }
645
+ ]
646
+ }
647
+ ]
648
+ ]
649
+ },
650
+ {
651
+ "from": "idle",
652
+ "to": "building",
653
+ "event": "BUILD",
654
+ "effects": [
655
+ [
656
+ "set",
657
+ "@entity.buildPhase",
658
+ "building"
659
+ ],
660
+ [
661
+ "set",
662
+ "@entity.attempts",
663
+ [
664
+ "+",
665
+ "@entity.attempts",
666
+ 1
667
+ ]
668
+ ],
669
+ [
670
+ "agent/generate",
671
+ "@entity.plan"
672
+ ],
673
+ [
674
+ "render-ui",
675
+ "main",
676
+ {
677
+ "type": "dashboard-layout",
678
+ "appName": "Schema Builder",
679
+ "navItems": [
680
+ {
681
+ "label": "Plan",
682
+ "href": "/plan",
683
+ "icon": "clipboard-list"
684
+ },
685
+ {
686
+ "label": "Build",
687
+ "href": "/build",
688
+ "icon": "hammer"
689
+ },
690
+ {
691
+ "label": "Fix",
692
+ "href": "/fix",
693
+ "icon": "wrench"
694
+ },
695
+ {
696
+ "label": "Learnings",
697
+ "href": "/learnings",
698
+ "icon": "brain"
699
+ }
700
+ ],
701
+ "children": [
702
+ {
703
+ "type": "stack",
704
+ "direction": "vertical",
705
+ "gap": "lg",
706
+ "align": "center",
707
+ "children": [
708
+ {
709
+ "type": "icon",
710
+ "name": "hammer",
711
+ "size": "lg"
712
+ },
713
+ {
714
+ "type": "typography",
715
+ "content": "Generating schema...",
716
+ "variant": "h3"
717
+ },
718
+ {
719
+ "type": "spinner",
720
+ "size": "lg"
721
+ },
722
+ {
723
+ "type": "typography",
724
+ "content": "Attempt: @entity.attempts",
725
+ "variant": "caption"
726
+ }
727
+ ]
728
+ }
729
+ ]
730
+ }
731
+ ]
732
+ ]
733
+ },
734
+ {
735
+ "from": "building",
736
+ "to": "validating",
737
+ "event": "SCHEMA_GENERATED",
738
+ "effects": [
739
+ [
740
+ "set",
741
+ "@entity.buildPhase",
742
+ "validating"
743
+ ],
744
+ [
745
+ "agent/invoke",
746
+ "validate",
747
+ "@entity.schema"
748
+ ],
749
+ [
750
+ "render-ui",
751
+ "main",
752
+ {
753
+ "type": "dashboard-layout",
754
+ "appName": "Schema Builder",
755
+ "navItems": [
756
+ {
757
+ "label": "Plan",
758
+ "href": "/plan",
759
+ "icon": "clipboard-list"
760
+ },
761
+ {
762
+ "label": "Build",
763
+ "href": "/build",
764
+ "icon": "hammer"
765
+ },
766
+ {
767
+ "label": "Fix",
768
+ "href": "/fix",
769
+ "icon": "wrench"
770
+ },
771
+ {
772
+ "label": "Learnings",
773
+ "href": "/learnings",
774
+ "icon": "brain"
775
+ }
776
+ ],
777
+ "children": [
778
+ {
779
+ "type": "stack",
780
+ "direction": "vertical",
781
+ "gap": "lg",
782
+ "align": "center",
783
+ "children": [
784
+ {
785
+ "type": "icon",
786
+ "name": "shield-check",
787
+ "size": "lg"
788
+ },
789
+ {
790
+ "type": "typography",
791
+ "content": "Validating schema...",
792
+ "variant": "h3"
793
+ },
794
+ {
795
+ "type": "spinner",
796
+ "size": "lg"
797
+ }
798
+ ]
799
+ }
800
+ ]
801
+ }
802
+ ]
803
+ ]
804
+ },
805
+ {
806
+ "from": "validating",
807
+ "to": "completed",
808
+ "event": "VALIDATION_PASSED",
809
+ "effects": [
810
+ [
811
+ "set",
812
+ "@entity.validationStatus",
813
+ "passed"
814
+ ],
815
+ [
816
+ "set",
817
+ "@entity.buildPhase",
818
+ "completed"
819
+ ],
820
+ [
821
+ "agent/fork",
822
+ "build-complete"
823
+ ],
824
+ [
825
+ "emit",
826
+ "BUILD_DONE"
827
+ ],
828
+ [
829
+ "render-ui",
830
+ "main",
831
+ {
832
+ "type": "dashboard-layout",
833
+ "appName": "Schema Builder",
834
+ "navItems": [
835
+ {
836
+ "label": "Plan",
837
+ "href": "/plan",
838
+ "icon": "clipboard-list"
839
+ },
840
+ {
841
+ "label": "Build",
842
+ "href": "/build",
843
+ "icon": "hammer"
844
+ },
845
+ {
846
+ "label": "Fix",
847
+ "href": "/fix",
848
+ "icon": "wrench"
849
+ },
850
+ {
851
+ "label": "Learnings",
852
+ "href": "/learnings",
853
+ "icon": "brain"
854
+ }
855
+ ],
856
+ "children": [
857
+ {
858
+ "type": "stack",
859
+ "direction": "vertical",
860
+ "gap": "lg",
861
+ "children": [
862
+ {
863
+ "type": "stack",
864
+ "direction": "horizontal",
865
+ "gap": "sm",
866
+ "align": "center",
867
+ "children": [
868
+ {
869
+ "type": "icon",
870
+ "name": "check-circle",
871
+ "size": "lg"
872
+ },
873
+ {
874
+ "type": "typography",
875
+ "content": "Build Complete",
876
+ "variant": "h2"
877
+ }
878
+ ]
879
+ },
880
+ {
881
+ "type": "divider"
882
+ },
883
+ {
884
+ "type": "alert",
885
+ "variant": "success",
886
+ "message": "Schema generated and validated successfully."
887
+ },
888
+ {
889
+ "type": "card",
890
+ "children": [
891
+ {
892
+ "type": "stack",
893
+ "direction": "vertical",
894
+ "gap": "md",
895
+ "children": [
896
+ {
897
+ "type": "typography",
898
+ "content": "Generated Schema",
899
+ "variant": "caption"
900
+ },
901
+ {
902
+ "type": "typography",
903
+ "content": "@entity.schema",
904
+ "variant": "body"
905
+ }
906
+ ]
907
+ }
908
+ ]
909
+ },
910
+ {
911
+ "type": "button",
912
+ "label": "New Build",
913
+ "event": "RESET",
914
+ "variant": "ghost",
915
+ "icon": "rotate-ccw"
916
+ }
917
+ ]
918
+ }
919
+ ]
920
+ }
921
+ ]
922
+ ]
923
+ },
924
+ {
925
+ "from": "validating",
926
+ "to": "failed",
927
+ "event": "VALIDATION_FAILED",
928
+ "effects": [
929
+ [
930
+ "set",
931
+ "@entity.validationStatus",
932
+ "failed"
933
+ ],
934
+ [
935
+ "set",
936
+ "@entity.error",
937
+ "@payload.errors"
938
+ ],
939
+ [
940
+ "set",
941
+ "@entity.buildPhase",
942
+ "failed"
943
+ ],
944
+ [
945
+ "emit",
946
+ "BUILD_FAILED"
947
+ ],
948
+ [
949
+ "render-ui",
950
+ "main",
951
+ {
952
+ "type": "dashboard-layout",
953
+ "appName": "Schema Builder",
954
+ "navItems": [
955
+ {
956
+ "label": "Plan",
957
+ "href": "/plan",
958
+ "icon": "clipboard-list"
959
+ },
960
+ {
961
+ "label": "Build",
962
+ "href": "/build",
963
+ "icon": "hammer"
964
+ },
965
+ {
966
+ "label": "Fix",
967
+ "href": "/fix",
968
+ "icon": "wrench"
969
+ },
970
+ {
971
+ "label": "Learnings",
972
+ "href": "/learnings",
973
+ "icon": "brain"
974
+ }
975
+ ],
976
+ "children": [
977
+ {
978
+ "type": "stack",
979
+ "direction": "vertical",
980
+ "gap": "lg",
981
+ "align": "center",
982
+ "children": [
983
+ {
984
+ "type": "icon",
985
+ "name": "alert-triangle",
986
+ "size": "lg"
987
+ },
988
+ {
989
+ "type": "typography",
990
+ "content": "Build Failed",
991
+ "variant": "h2"
992
+ },
993
+ {
994
+ "type": "alert",
995
+ "variant": "error",
996
+ "message": "@entity.error"
997
+ },
998
+ {
999
+ "type": "stack",
1000
+ "direction": "horizontal",
1001
+ "gap": "sm",
1002
+ "children": [
1003
+ {
1004
+ "type": "button",
1005
+ "label": "Retry",
1006
+ "event": "RETRY",
1007
+ "variant": "primary",
1008
+ "icon": "refresh-cw"
1009
+ },
1010
+ {
1011
+ "type": "button",
1012
+ "label": "New Build",
1013
+ "event": "RESET",
1014
+ "variant": "ghost",
1015
+ "icon": "rotate-ccw"
1016
+ }
1017
+ ]
1018
+ }
1019
+ ]
1020
+ }
1021
+ ]
1022
+ }
1023
+ ]
1024
+ ]
1025
+ },
1026
+ {
1027
+ "from": "failed",
1028
+ "to": "building",
1029
+ "event": "RETRY",
1030
+ "effects": [
1031
+ [
1032
+ "set",
1033
+ "@entity.buildPhase",
1034
+ "building"
1035
+ ],
1036
+ [
1037
+ "set",
1038
+ "@entity.attempts",
1039
+ [
1040
+ "+",
1041
+ "@entity.attempts",
1042
+ 1
1043
+ ]
1044
+ ],
1045
+ [
1046
+ "agent/generate",
1047
+ "@entity.plan"
1048
+ ],
1049
+ [
1050
+ "render-ui",
1051
+ "main",
1052
+ {
1053
+ "type": "dashboard-layout",
1054
+ "appName": "Schema Builder",
1055
+ "navItems": [
1056
+ {
1057
+ "label": "Plan",
1058
+ "href": "/plan",
1059
+ "icon": "clipboard-list"
1060
+ },
1061
+ {
1062
+ "label": "Build",
1063
+ "href": "/build",
1064
+ "icon": "hammer"
1065
+ },
1066
+ {
1067
+ "label": "Fix",
1068
+ "href": "/fix",
1069
+ "icon": "wrench"
1070
+ },
1071
+ {
1072
+ "label": "Learnings",
1073
+ "href": "/learnings",
1074
+ "icon": "brain"
1075
+ }
1076
+ ],
1077
+ "children": [
1078
+ {
1079
+ "type": "stack",
1080
+ "direction": "vertical",
1081
+ "gap": "lg",
1082
+ "align": "center",
1083
+ "children": [
1084
+ {
1085
+ "type": "icon",
1086
+ "name": "hammer",
1087
+ "size": "lg"
1088
+ },
1089
+ {
1090
+ "type": "typography",
1091
+ "content": "Generating schema...",
1092
+ "variant": "h3"
1093
+ },
1094
+ {
1095
+ "type": "spinner",
1096
+ "size": "lg"
1097
+ },
1098
+ {
1099
+ "type": "typography",
1100
+ "content": "Attempt: @entity.attempts",
1101
+ "variant": "caption"
1102
+ }
1103
+ ]
1104
+ }
1105
+ ]
1106
+ }
1107
+ ]
1108
+ ]
1109
+ },
1110
+ {
1111
+ "from": "completed",
1112
+ "to": "idle",
1113
+ "event": "RESET",
1114
+ "effects": [
1115
+ [
1116
+ "set",
1117
+ "@entity.buildPhase",
1118
+ "idle"
1119
+ ],
1120
+ [
1121
+ "set",
1122
+ "@entity.attempts",
1123
+ 0
1124
+ ],
1125
+ [
1126
+ "set",
1127
+ "@entity.schema",
1128
+ ""
1129
+ ],
1130
+ [
1131
+ "set",
1132
+ "@entity.error",
1133
+ ""
1134
+ ],
1135
+ [
1136
+ "render-ui",
1137
+ "main",
1138
+ {
1139
+ "type": "dashboard-layout",
1140
+ "appName": "Schema Builder",
1141
+ "navItems": [
1142
+ {
1143
+ "label": "Plan",
1144
+ "href": "/plan",
1145
+ "icon": "clipboard-list"
1146
+ },
1147
+ {
1148
+ "label": "Build",
1149
+ "href": "/build",
1150
+ "icon": "hammer"
1151
+ },
1152
+ {
1153
+ "label": "Fix",
1154
+ "href": "/fix",
1155
+ "icon": "wrench"
1156
+ },
1157
+ {
1158
+ "label": "Learnings",
1159
+ "href": "/learnings",
1160
+ "icon": "brain"
1161
+ }
1162
+ ],
1163
+ "children": [
1164
+ {
1165
+ "type": "stack",
1166
+ "direction": "vertical",
1167
+ "gap": "lg",
1168
+ "children": [
1169
+ {
1170
+ "type": "stack",
1171
+ "direction": "horizontal",
1172
+ "gap": "sm",
1173
+ "align": "center",
1174
+ "children": [
1175
+ {
1176
+ "type": "icon",
1177
+ "name": "clipboard-list",
1178
+ "size": "lg"
1179
+ },
1180
+ {
1181
+ "type": "typography",
1182
+ "content": "Build Planner",
1183
+ "variant": "h2"
1184
+ }
1185
+ ]
1186
+ },
1187
+ {
1188
+ "type": "divider"
1189
+ },
1190
+ {
1191
+ "type": "card",
1192
+ "children": [
1193
+ {
1194
+ "type": "stack",
1195
+ "direction": "vertical",
1196
+ "gap": "md",
1197
+ "children": [
1198
+ {
1199
+ "type": "typography",
1200
+ "content": "Describe what you want to build. The agent will plan, generate, and validate the schema.",
1201
+ "variant": "body"
1202
+ },
1203
+ {
1204
+ "type": "form-section",
1205
+ "entity": "BuildTask",
1206
+ "mode": "edit",
1207
+ "submitEvent": "START_PLANNING",
1208
+ "fields": [
1209
+ "prompt"
1210
+ ]
1211
+ }
1212
+ ]
1213
+ }
1214
+ ]
1215
+ }
1216
+ ]
1217
+ }
1218
+ ]
1219
+ }
1220
+ ]
1221
+ ]
1222
+ },
1223
+ {
1224
+ "from": "failed",
1225
+ "to": "idle",
1226
+ "event": "RESET",
1227
+ "effects": [
1228
+ [
1229
+ "set",
1230
+ "@entity.buildPhase",
1231
+ "idle"
1232
+ ],
1233
+ [
1234
+ "set",
1235
+ "@entity.attempts",
1236
+ 0
1237
+ ],
1238
+ [
1239
+ "set",
1240
+ "@entity.error",
1241
+ ""
1242
+ ],
1243
+ [
1244
+ "render-ui",
1245
+ "main",
1246
+ {
1247
+ "type": "dashboard-layout",
1248
+ "appName": "Schema Builder",
1249
+ "navItems": [
1250
+ {
1251
+ "label": "Plan",
1252
+ "href": "/plan",
1253
+ "icon": "clipboard-list"
1254
+ },
1255
+ {
1256
+ "label": "Build",
1257
+ "href": "/build",
1258
+ "icon": "hammer"
1259
+ },
1260
+ {
1261
+ "label": "Fix",
1262
+ "href": "/fix",
1263
+ "icon": "wrench"
1264
+ },
1265
+ {
1266
+ "label": "Learnings",
1267
+ "href": "/learnings",
1268
+ "icon": "brain"
1269
+ }
1270
+ ],
1271
+ "children": [
1272
+ {
1273
+ "type": "stack",
1274
+ "direction": "vertical",
1275
+ "gap": "lg",
1276
+ "children": [
1277
+ {
1278
+ "type": "stack",
1279
+ "direction": "horizontal",
1280
+ "gap": "sm",
1281
+ "align": "center",
1282
+ "children": [
1283
+ {
1284
+ "type": "icon",
1285
+ "name": "clipboard-list",
1286
+ "size": "lg"
1287
+ },
1288
+ {
1289
+ "type": "typography",
1290
+ "content": "Build Planner",
1291
+ "variant": "h2"
1292
+ }
1293
+ ]
1294
+ },
1295
+ {
1296
+ "type": "divider"
1297
+ },
1298
+ {
1299
+ "type": "card",
1300
+ "children": [
1301
+ {
1302
+ "type": "stack",
1303
+ "direction": "vertical",
1304
+ "gap": "md",
1305
+ "children": [
1306
+ {
1307
+ "type": "typography",
1308
+ "content": "Describe what you want to build. The agent will plan, generate, and validate the schema.",
1309
+ "variant": "body"
1310
+ },
1311
+ {
1312
+ "type": "form-section",
1313
+ "entity": "BuildTask",
1314
+ "mode": "edit",
1315
+ "submitEvent": "START_PLANNING",
1316
+ "fields": [
1317
+ "prompt"
1318
+ ]
1319
+ }
1320
+ ]
1321
+ }
1322
+ ]
1323
+ }
1324
+ ]
1325
+ }
1326
+ ]
1327
+ }
1328
+ ]
1329
+ ]
1330
+ }
1331
+ ]
1332
+ },
1333
+ "listens": [
1334
+ {
1335
+ "event": "PLAN_READY",
1336
+ "triggers": "BUILD",
1337
+ "scope": "external"
1338
+ }
1339
+ ]
1340
+ }
1341
+ ],
1342
+ "pages": [
1343
+ {
1344
+ "name": "PlanPage",
1345
+ "path": "/plan",
1346
+ "isInitial": true,
1347
+ "traits": [
1348
+ {
1349
+ "ref": "BuildPlanner"
1350
+ }
1351
+ ]
1352
+ },
1353
+ {
1354
+ "name": "BuildPage",
1355
+ "path": "/build",
1356
+ "traits": [
1357
+ {
1358
+ "ref": "SchemaBuilder"
1359
+ }
1360
+ ]
1361
+ }
1362
+ ]
1363
+ },
1364
+ {
1365
+ "name": "FixTaskOrbital",
1366
+ "entity": {
1367
+ "name": "FixTask",
1368
+ "persistence": "runtime",
1369
+ "fields": [
1370
+ {
1371
+ "name": "id",
1372
+ "type": "string",
1373
+ "required": true
1374
+ },
1375
+ {
1376
+ "name": "originalSchema",
1377
+ "type": "string",
1378
+ "default": ""
1379
+ },
1380
+ {
1381
+ "name": "validationErrors",
1382
+ "type": "string",
1383
+ "default": ""
1384
+ },
1385
+ {
1386
+ "name": "fixedSchema",
1387
+ "type": "string",
1388
+ "default": ""
1389
+ },
1390
+ {
1391
+ "name": "fixAttempt",
1392
+ "type": "number",
1393
+ "default": 0
1394
+ },
1395
+ {
1396
+ "name": "maxAttempts",
1397
+ "type": "number",
1398
+ "default": 3
1399
+ },
1400
+ {
1401
+ "name": "fixStatus",
1402
+ "type": "string",
1403
+ "default": "idle"
1404
+ }
1405
+ ]
1406
+ },
1407
+ "traits": [
1408
+ {
1409
+ "name": "FixLoop",
1410
+ "linkedEntity": "FixTask",
1411
+ "category": "interaction",
1412
+ "emits": [
1413
+ {
1414
+ "event": "FIX_SUCCEEDED",
1415
+ "description": "Fix succeeded, record learning",
1416
+ "scope": "internal"
1417
+ },
1418
+ {
1419
+ "event": "FIX_SUCCEEDED",
1420
+ "description": "Record successful fix pattern",
1421
+ "scope": "external"
1422
+ }
1423
+ ],
1424
+ "stateMachine": {
1425
+ "states": [
1426
+ {
1427
+ "name": "idle",
1428
+ "isInitial": true
1429
+ },
1430
+ {
1431
+ "name": "fixing"
1432
+ }
1433
+ ],
1434
+ "events": [
1435
+ {
1436
+ "key": "INIT",
1437
+ "name": "Initialize"
1438
+ },
1439
+ {
1440
+ "key": "START_FIX",
1441
+ "name": "Start Fix",
1442
+ "payload": [
1443
+ {
1444
+ "name": "schema",
1445
+ "type": "string",
1446
+ "required": true
1447
+ },
1448
+ {
1449
+ "name": "errors",
1450
+ "type": "string",
1451
+ "required": true
1452
+ }
1453
+ ]
1454
+ },
1455
+ {
1456
+ "key": "FIX_GENERATED",
1457
+ "name": "Fix Generated"
1458
+ },
1459
+ {
1460
+ "key": "FIX_FAILED",
1461
+ "name": "Fix Failed"
1462
+ }
1463
+ ],
1464
+ "transitions": [
1465
+ {
1466
+ "from": "idle",
1467
+ "to": "idle",
1468
+ "event": "INIT",
1469
+ "effects": [
1470
+ [
1471
+ "fetch",
1472
+ "FixTask"
1473
+ ],
1474
+ [
1475
+ "render-ui",
1476
+ "main",
1477
+ {
1478
+ "type": "dashboard-layout",
1479
+ "appName": "Schema Builder",
1480
+ "navItems": [
1481
+ {
1482
+ "label": "Plan",
1483
+ "href": "/plan",
1484
+ "icon": "clipboard-list"
1485
+ },
1486
+ {
1487
+ "label": "Build",
1488
+ "href": "/build",
1489
+ "icon": "hammer"
1490
+ },
1491
+ {
1492
+ "label": "Fix",
1493
+ "href": "/fix",
1494
+ "icon": "wrench"
1495
+ },
1496
+ {
1497
+ "label": "Learnings",
1498
+ "href": "/learnings",
1499
+ "icon": "brain"
1500
+ }
1501
+ ],
1502
+ "children": [
1503
+ {
1504
+ "type": "stack",
1505
+ "direction": "vertical",
1506
+ "gap": "lg",
1507
+ "children": [
1508
+ {
1509
+ "type": "stack",
1510
+ "direction": "horizontal",
1511
+ "gap": "sm",
1512
+ "align": "center",
1513
+ "children": [
1514
+ {
1515
+ "type": "icon",
1516
+ "name": "wrench",
1517
+ "size": "lg"
1518
+ },
1519
+ {
1520
+ "type": "typography",
1521
+ "content": "Fix Loop",
1522
+ "variant": "h2"
1523
+ }
1524
+ ]
1525
+ },
1526
+ {
1527
+ "type": "divider"
1528
+ },
1529
+ {
1530
+ "type": "typography",
1531
+ "content": "Waiting for validation results...",
1532
+ "variant": "body"
1533
+ }
1534
+ ]
1535
+ }
1536
+ ]
1537
+ }
1538
+ ]
1539
+ ]
1540
+ },
1541
+ {
1542
+ "from": "idle",
1543
+ "to": "fixing",
1544
+ "event": "START_FIX",
1545
+ "effects": [
1546
+ [
1547
+ "set",
1548
+ "@entity.originalSchema",
1549
+ "@payload.schema"
1550
+ ],
1551
+ [
1552
+ "set",
1553
+ "@entity.validationErrors",
1554
+ "@payload.errors"
1555
+ ],
1556
+ [
1557
+ "set",
1558
+ "@entity.fixAttempt",
1559
+ [
1560
+ "+",
1561
+ "@entity.fixAttempt",
1562
+ 1
1563
+ ]
1564
+ ],
1565
+ [
1566
+ "set",
1567
+ "@entity.fixStatus",
1568
+ "fixing"
1569
+ ],
1570
+ [
1571
+ "agent/generate",
1572
+ "@payload.errors"
1573
+ ],
1574
+ [
1575
+ "render-ui",
1576
+ "main",
1577
+ {
1578
+ "type": "dashboard-layout",
1579
+ "appName": "Schema Builder",
1580
+ "navItems": [
1581
+ {
1582
+ "label": "Plan",
1583
+ "href": "/plan",
1584
+ "icon": "clipboard-list"
1585
+ },
1586
+ {
1587
+ "label": "Build",
1588
+ "href": "/build",
1589
+ "icon": "hammer"
1590
+ },
1591
+ {
1592
+ "label": "Fix",
1593
+ "href": "/fix",
1594
+ "icon": "wrench"
1595
+ },
1596
+ {
1597
+ "label": "Learnings",
1598
+ "href": "/learnings",
1599
+ "icon": "brain"
1600
+ }
1601
+ ],
1602
+ "children": [
1603
+ {
1604
+ "type": "stack",
1605
+ "direction": "vertical",
1606
+ "gap": "lg",
1607
+ "align": "center",
1608
+ "children": [
1609
+ {
1610
+ "type": "icon",
1611
+ "name": "wrench",
1612
+ "size": "lg"
1613
+ },
1614
+ {
1615
+ "type": "typography",
1616
+ "content": "Fixing validation errors...",
1617
+ "variant": "h3"
1618
+ },
1619
+ {
1620
+ "type": "spinner",
1621
+ "size": "lg"
1622
+ },
1623
+ {
1624
+ "type": "typography",
1625
+ "content": "Fix attempt: @entity.fixAttempt / @entity.maxAttempts",
1626
+ "variant": "caption"
1627
+ }
1628
+ ]
1629
+ }
1630
+ ]
1631
+ }
1632
+ ]
1633
+ ]
1634
+ },
1635
+ {
1636
+ "from": "fixing",
1637
+ "to": "idle",
1638
+ "event": "FIX_GENERATED",
1639
+ "effects": [
1640
+ [
1641
+ "set",
1642
+ "@entity.fixStatus",
1643
+ "idle"
1644
+ ],
1645
+ [
1646
+ "agent/memorize",
1647
+ "@entity.fixedSchema",
1648
+ "fix-pattern"
1649
+ ],
1650
+ [
1651
+ "emit",
1652
+ "FIX_SUCCEEDED"
1653
+ ],
1654
+ [
1655
+ "render-ui",
1656
+ "main",
1657
+ {
1658
+ "type": "dashboard-layout",
1659
+ "appName": "Schema Builder",
1660
+ "navItems": [
1661
+ {
1662
+ "label": "Plan",
1663
+ "href": "/plan",
1664
+ "icon": "clipboard-list"
1665
+ },
1666
+ {
1667
+ "label": "Build",
1668
+ "href": "/build",
1669
+ "icon": "hammer"
1670
+ },
1671
+ {
1672
+ "label": "Fix",
1673
+ "href": "/fix",
1674
+ "icon": "wrench"
1675
+ },
1676
+ {
1677
+ "label": "Learnings",
1678
+ "href": "/learnings",
1679
+ "icon": "brain"
1680
+ }
1681
+ ],
1682
+ "children": [
1683
+ {
1684
+ "type": "stack",
1685
+ "direction": "vertical",
1686
+ "gap": "lg",
1687
+ "children": [
1688
+ {
1689
+ "type": "stack",
1690
+ "direction": "horizontal",
1691
+ "gap": "sm",
1692
+ "align": "center",
1693
+ "children": [
1694
+ {
1695
+ "type": "icon",
1696
+ "name": "wrench",
1697
+ "size": "lg"
1698
+ },
1699
+ {
1700
+ "type": "typography",
1701
+ "content": "Fix Loop",
1702
+ "variant": "h2"
1703
+ }
1704
+ ]
1705
+ },
1706
+ {
1707
+ "type": "divider"
1708
+ },
1709
+ {
1710
+ "type": "typography",
1711
+ "content": "Waiting for validation results...",
1712
+ "variant": "body"
1713
+ }
1714
+ ]
1715
+ }
1716
+ ]
1717
+ }
1718
+ ]
1719
+ ]
1720
+ },
1721
+ {
1722
+ "from": "fixing",
1723
+ "to": "idle",
1724
+ "event": "FIX_FAILED",
1725
+ "guard": [
1726
+ ">=",
1727
+ "@entity.fixAttempt",
1728
+ "@entity.maxAttempts"
1729
+ ],
1730
+ "effects": [
1731
+ [
1732
+ "set",
1733
+ "@entity.fixStatus",
1734
+ "exhausted"
1735
+ ],
1736
+ [
1737
+ "render-ui",
1738
+ "main",
1739
+ {
1740
+ "type": "dashboard-layout",
1741
+ "appName": "Schema Builder",
1742
+ "navItems": [
1743
+ {
1744
+ "label": "Plan",
1745
+ "href": "/plan",
1746
+ "icon": "clipboard-list"
1747
+ },
1748
+ {
1749
+ "label": "Build",
1750
+ "href": "/build",
1751
+ "icon": "hammer"
1752
+ },
1753
+ {
1754
+ "label": "Fix",
1755
+ "href": "/fix",
1756
+ "icon": "wrench"
1757
+ },
1758
+ {
1759
+ "label": "Learnings",
1760
+ "href": "/learnings",
1761
+ "icon": "brain"
1762
+ }
1763
+ ],
1764
+ "children": [
1765
+ {
1766
+ "type": "stack",
1767
+ "direction": "vertical",
1768
+ "gap": "lg",
1769
+ "children": [
1770
+ {
1771
+ "type": "stack",
1772
+ "direction": "horizontal",
1773
+ "gap": "sm",
1774
+ "align": "center",
1775
+ "children": [
1776
+ {
1777
+ "type": "icon",
1778
+ "name": "wrench",
1779
+ "size": "lg"
1780
+ },
1781
+ {
1782
+ "type": "typography",
1783
+ "content": "Fix Loop",
1784
+ "variant": "h2"
1785
+ }
1786
+ ]
1787
+ },
1788
+ {
1789
+ "type": "divider"
1790
+ },
1791
+ {
1792
+ "type": "typography",
1793
+ "content": "Waiting for validation results...",
1794
+ "variant": "body"
1795
+ }
1796
+ ]
1797
+ }
1798
+ ]
1799
+ }
1800
+ ]
1801
+ ]
1802
+ },
1803
+ {
1804
+ "from": "fixing",
1805
+ "to": "fixing",
1806
+ "event": "FIX_FAILED",
1807
+ "guard": [
1808
+ "<",
1809
+ "@entity.fixAttempt",
1810
+ "@entity.maxAttempts"
1811
+ ],
1812
+ "effects": [
1813
+ [
1814
+ "set",
1815
+ "@entity.fixAttempt",
1816
+ [
1817
+ "+",
1818
+ "@entity.fixAttempt",
1819
+ 1
1820
+ ]
1821
+ ],
1822
+ [
1823
+ "agent/generate",
1824
+ "@entity.validationErrors"
1825
+ ],
1826
+ [
1827
+ "render-ui",
1828
+ "main",
1829
+ {
1830
+ "type": "dashboard-layout",
1831
+ "appName": "Schema Builder",
1832
+ "navItems": [
1833
+ {
1834
+ "label": "Plan",
1835
+ "href": "/plan",
1836
+ "icon": "clipboard-list"
1837
+ },
1838
+ {
1839
+ "label": "Build",
1840
+ "href": "/build",
1841
+ "icon": "hammer"
1842
+ },
1843
+ {
1844
+ "label": "Fix",
1845
+ "href": "/fix",
1846
+ "icon": "wrench"
1847
+ },
1848
+ {
1849
+ "label": "Learnings",
1850
+ "href": "/learnings",
1851
+ "icon": "brain"
1852
+ }
1853
+ ],
1854
+ "children": [
1855
+ {
1856
+ "type": "stack",
1857
+ "direction": "vertical",
1858
+ "gap": "lg",
1859
+ "align": "center",
1860
+ "children": [
1861
+ {
1862
+ "type": "icon",
1863
+ "name": "wrench",
1864
+ "size": "lg"
1865
+ },
1866
+ {
1867
+ "type": "typography",
1868
+ "content": "Fixing validation errors...",
1869
+ "variant": "h3"
1870
+ },
1871
+ {
1872
+ "type": "spinner",
1873
+ "size": "lg"
1874
+ },
1875
+ {
1876
+ "type": "typography",
1877
+ "content": "Fix attempt: @entity.fixAttempt / @entity.maxAttempts",
1878
+ "variant": "caption"
1879
+ }
1880
+ ]
1881
+ }
1882
+ ]
1883
+ }
1884
+ ]
1885
+ ]
1886
+ }
1887
+ ]
1888
+ },
1889
+ "listens": [
1890
+ {
1891
+ "event": "BUILD_FAILED",
1892
+ "triggers": "START_FIX",
1893
+ "scope": "external"
1894
+ }
1895
+ ]
1896
+ }
1897
+ ],
1898
+ "pages": [
1899
+ {
1900
+ "name": "FixPage",
1901
+ "path": "/fix",
1902
+ "traits": [
1903
+ {
1904
+ "ref": "FixLoop"
1905
+ }
1906
+ ]
1907
+ }
1908
+ ]
1909
+ },
1910
+ {
1911
+ "name": "LearningOrbital",
1912
+ "entity": {
1913
+ "name": "Learning",
1914
+ "persistence": "persistent",
1915
+ "collection": "learnings",
1916
+ "fields": [
1917
+ {
1918
+ "name": "id",
1919
+ "type": "string",
1920
+ "required": true
1921
+ },
1922
+ {
1923
+ "name": "content",
1924
+ "type": "string",
1925
+ "default": ""
1926
+ },
1927
+ {
1928
+ "name": "category",
1929
+ "type": "string",
1930
+ "default": "general"
1931
+ },
1932
+ {
1933
+ "name": "strength",
1934
+ "type": "number",
1935
+ "default": 1
1936
+ },
1937
+ {
1938
+ "name": "pinned",
1939
+ "type": "boolean",
1940
+ "default": false
1941
+ },
1942
+ {
1943
+ "name": "scope",
1944
+ "type": "string",
1945
+ "default": "session"
1946
+ },
1947
+ {
1948
+ "name": "lastAccessedAt",
1949
+ "type": "string",
1950
+ "default": ""
1951
+ },
1952
+ {
1953
+ "name": "createdAt",
1954
+ "type": "string",
1955
+ "default": ""
1956
+ }
1957
+ ]
1958
+ },
1959
+ "traits": [
1960
+ {
1961
+ "name": "LearningLifecycle",
1962
+ "linkedEntity": "Learning",
1963
+ "category": "interaction",
1964
+ "stateMachine": {
1965
+ "states": [
1966
+ {
1967
+ "name": "idle",
1968
+ "isInitial": true
1969
+ },
1970
+ {
1971
+ "name": "active"
1972
+ }
1973
+ ],
1974
+ "events": [
1975
+ {
1976
+ "key": "INIT",
1977
+ "name": "Initialize"
1978
+ },
1979
+ {
1980
+ "key": "MEMORIZE",
1981
+ "name": "Memorize",
1982
+ "payload": [
1983
+ {
1984
+ "name": "content",
1985
+ "type": "string",
1986
+ "required": true
1987
+ },
1988
+ {
1989
+ "name": "category",
1990
+ "type": "string",
1991
+ "required": false
1992
+ }
1993
+ ]
1994
+ },
1995
+ {
1996
+ "key": "RECALL",
1997
+ "name": "Recall",
1998
+ "payload": [
1999
+ {
2000
+ "name": "query",
2001
+ "type": "string",
2002
+ "required": true
2003
+ }
2004
+ ]
2005
+ },
2006
+ {
2007
+ "key": "PIN",
2008
+ "name": "Pin",
2009
+ "payload": [
2010
+ {
2011
+ "name": "id",
2012
+ "type": "string",
2013
+ "required": true
2014
+ }
2015
+ ]
2016
+ },
2017
+ {
2018
+ "key": "FORGET",
2019
+ "name": "Forget",
2020
+ "payload": [
2021
+ {
2022
+ "name": "id",
2023
+ "type": "string",
2024
+ "required": true
2025
+ }
2026
+ ]
2027
+ },
2028
+ {
2029
+ "key": "REINFORCE",
2030
+ "name": "Reinforce",
2031
+ "payload": [
2032
+ {
2033
+ "name": "id",
2034
+ "type": "string",
2035
+ "required": true
2036
+ }
2037
+ ]
2038
+ },
2039
+ {
2040
+ "key": "DECAY",
2041
+ "name": "Decay"
2042
+ }
2043
+ ],
2044
+ "transitions": [
2045
+ {
2046
+ "from": "idle",
2047
+ "to": "idle",
2048
+ "event": "INIT",
2049
+ "effects": [
2050
+ [
2051
+ "fetch",
2052
+ "Learning"
2053
+ ],
2054
+ [
2055
+ "render-ui",
2056
+ "main",
2057
+ {
2058
+ "type": "dashboard-layout",
2059
+ "appName": "Schema Builder",
2060
+ "navItems": [
2061
+ {
2062
+ "label": "Plan",
2063
+ "href": "/plan",
2064
+ "icon": "clipboard-list"
2065
+ },
2066
+ {
2067
+ "label": "Build",
2068
+ "href": "/build",
2069
+ "icon": "hammer"
2070
+ },
2071
+ {
2072
+ "label": "Fix",
2073
+ "href": "/fix",
2074
+ "icon": "wrench"
2075
+ },
2076
+ {
2077
+ "label": "Learnings",
2078
+ "href": "/learnings",
2079
+ "icon": "brain"
2080
+ }
2081
+ ],
2082
+ "children": [
2083
+ {
2084
+ "type": "stack",
2085
+ "direction": "vertical",
2086
+ "gap": "lg",
2087
+ "children": [
2088
+ {
2089
+ "type": "stack",
2090
+ "direction": "horizontal",
2091
+ "gap": "sm",
2092
+ "align": "center",
2093
+ "children": [
2094
+ {
2095
+ "type": "icon",
2096
+ "name": "brain",
2097
+ "size": "lg"
2098
+ },
2099
+ {
2100
+ "type": "typography",
2101
+ "content": "Learning Manager",
2102
+ "variant": "h2"
2103
+ }
2104
+ ]
2105
+ },
2106
+ {
2107
+ "type": "divider"
2108
+ },
2109
+ {
2110
+ "type": "stack",
2111
+ "direction": "horizontal",
2112
+ "gap": "sm",
2113
+ "children": [
2114
+ {
2115
+ "type": "button",
2116
+ "label": "Memorize",
2117
+ "event": "MEMORIZE",
2118
+ "variant": "primary",
2119
+ "icon": "plus"
2120
+ },
2121
+ {
2122
+ "type": "button",
2123
+ "label": "Recall",
2124
+ "event": "RECALL",
2125
+ "variant": "secondary",
2126
+ "icon": "search"
2127
+ },
2128
+ {
2129
+ "type": "button",
2130
+ "label": "Decay All",
2131
+ "event": "DECAY",
2132
+ "variant": "ghost",
2133
+ "icon": "clock"
2134
+ }
2135
+ ]
2136
+ }
2137
+ ]
2138
+ }
2139
+ ]
2140
+ }
2141
+ ]
2142
+ ]
2143
+ },
2144
+ {
2145
+ "from": "idle",
2146
+ "to": "active",
2147
+ "event": "MEMORIZE",
2148
+ "effects": [
2149
+ [
2150
+ "agent/memorize",
2151
+ "@payload.content",
2152
+ "@payload.category"
2153
+ ],
2154
+ [
2155
+ "set",
2156
+ "@entity.content",
2157
+ "@payload.content"
2158
+ ],
2159
+ [
2160
+ "set",
2161
+ "@entity.category",
2162
+ "@payload.category"
2163
+ ],
2164
+ [
2165
+ "set",
2166
+ "@entity.createdAt",
2167
+ "@now"
2168
+ ],
2169
+ [
2170
+ "render-ui",
2171
+ "main",
2172
+ {
2173
+ "type": "dashboard-layout",
2174
+ "appName": "Schema Builder",
2175
+ "navItems": [
2176
+ {
2177
+ "label": "Plan",
2178
+ "href": "/plan",
2179
+ "icon": "clipboard-list"
2180
+ },
2181
+ {
2182
+ "label": "Build",
2183
+ "href": "/build",
2184
+ "icon": "hammer"
2185
+ },
2186
+ {
2187
+ "label": "Fix",
2188
+ "href": "/fix",
2189
+ "icon": "wrench"
2190
+ },
2191
+ {
2192
+ "label": "Learnings",
2193
+ "href": "/learnings",
2194
+ "icon": "brain"
2195
+ }
2196
+ ],
2197
+ "children": [
2198
+ {
2199
+ "type": "stack",
2200
+ "direction": "vertical",
2201
+ "gap": "lg",
2202
+ "children": [
2203
+ {
2204
+ "type": "stack",
2205
+ "direction": "horizontal",
2206
+ "gap": "sm",
2207
+ "align": "center",
2208
+ "children": [
2209
+ {
2210
+ "type": "icon",
2211
+ "name": "brain",
2212
+ "size": "lg"
2213
+ },
2214
+ {
2215
+ "type": "typography",
2216
+ "content": "Learning Active",
2217
+ "variant": "h2"
2218
+ }
2219
+ ]
2220
+ },
2221
+ {
2222
+ "type": "divider"
2223
+ },
2224
+ {
2225
+ "type": "typography",
2226
+ "variant": "body",
2227
+ "content": "@entity.content"
2228
+ },
2229
+ {
2230
+ "type": "stack",
2231
+ "direction": "horizontal",
2232
+ "gap": "sm",
2233
+ "children": [
2234
+ {
2235
+ "type": "badge",
2236
+ "label": "@entity.category"
2237
+ },
2238
+ {
2239
+ "type": "badge",
2240
+ "label": "@entity.strength"
2241
+ }
2242
+ ]
2243
+ },
2244
+ {
2245
+ "type": "stack",
2246
+ "direction": "horizontal",
2247
+ "gap": "sm",
2248
+ "children": [
2249
+ {
2250
+ "type": "button",
2251
+ "label": "Pin",
2252
+ "event": "PIN",
2253
+ "variant": "secondary",
2254
+ "icon": "pin"
2255
+ },
2256
+ {
2257
+ "type": "button",
2258
+ "label": "Reinforce",
2259
+ "event": "REINFORCE",
2260
+ "variant": "secondary",
2261
+ "icon": "zap"
2262
+ },
2263
+ {
2264
+ "type": "button",
2265
+ "label": "Forget",
2266
+ "event": "FORGET",
2267
+ "variant": "destructive",
2268
+ "icon": "trash"
2269
+ }
2270
+ ]
2271
+ }
2272
+ ]
2273
+ }
2274
+ ]
2275
+ }
2276
+ ]
2277
+ ]
2278
+ },
2279
+ {
2280
+ "from": "idle",
2281
+ "to": "active",
2282
+ "event": "RECALL",
2283
+ "effects": [
2284
+ [
2285
+ "agent/recall",
2286
+ "@payload.query"
2287
+ ],
2288
+ [
2289
+ "render-ui",
2290
+ "main",
2291
+ {
2292
+ "type": "dashboard-layout",
2293
+ "appName": "Schema Builder",
2294
+ "navItems": [
2295
+ {
2296
+ "label": "Plan",
2297
+ "href": "/plan",
2298
+ "icon": "clipboard-list"
2299
+ },
2300
+ {
2301
+ "label": "Build",
2302
+ "href": "/build",
2303
+ "icon": "hammer"
2304
+ },
2305
+ {
2306
+ "label": "Fix",
2307
+ "href": "/fix",
2308
+ "icon": "wrench"
2309
+ },
2310
+ {
2311
+ "label": "Learnings",
2312
+ "href": "/learnings",
2313
+ "icon": "brain"
2314
+ }
2315
+ ],
2316
+ "children": [
2317
+ {
2318
+ "type": "stack",
2319
+ "direction": "vertical",
2320
+ "gap": "lg",
2321
+ "children": [
2322
+ {
2323
+ "type": "stack",
2324
+ "direction": "horizontal",
2325
+ "gap": "sm",
2326
+ "align": "center",
2327
+ "children": [
2328
+ {
2329
+ "type": "icon",
2330
+ "name": "brain",
2331
+ "size": "lg"
2332
+ },
2333
+ {
2334
+ "type": "typography",
2335
+ "content": "Learning Active",
2336
+ "variant": "h2"
2337
+ }
2338
+ ]
2339
+ },
2340
+ {
2341
+ "type": "divider"
2342
+ },
2343
+ {
2344
+ "type": "typography",
2345
+ "variant": "body",
2346
+ "content": "@entity.content"
2347
+ },
2348
+ {
2349
+ "type": "stack",
2350
+ "direction": "horizontal",
2351
+ "gap": "sm",
2352
+ "children": [
2353
+ {
2354
+ "type": "badge",
2355
+ "label": "@entity.category"
2356
+ },
2357
+ {
2358
+ "type": "badge",
2359
+ "label": "@entity.strength"
2360
+ }
2361
+ ]
2362
+ },
2363
+ {
2364
+ "type": "stack",
2365
+ "direction": "horizontal",
2366
+ "gap": "sm",
2367
+ "children": [
2368
+ {
2369
+ "type": "button",
2370
+ "label": "Pin",
2371
+ "event": "PIN",
2372
+ "variant": "secondary",
2373
+ "icon": "pin"
2374
+ },
2375
+ {
2376
+ "type": "button",
2377
+ "label": "Reinforce",
2378
+ "event": "REINFORCE",
2379
+ "variant": "secondary",
2380
+ "icon": "zap"
2381
+ },
2382
+ {
2383
+ "type": "button",
2384
+ "label": "Forget",
2385
+ "event": "FORGET",
2386
+ "variant": "destructive",
2387
+ "icon": "trash"
2388
+ }
2389
+ ]
2390
+ }
2391
+ ]
2392
+ }
2393
+ ]
2394
+ }
2395
+ ]
2396
+ ]
2397
+ },
2398
+ {
2399
+ "from": "active",
2400
+ "to": "active",
2401
+ "event": "PIN",
2402
+ "guard": [
2403
+ "not",
2404
+ [
2405
+ "agent/is-pinned",
2406
+ "@payload.id"
2407
+ ]
2408
+ ],
2409
+ "effects": [
2410
+ [
2411
+ "agent/pin",
2412
+ "@payload.id"
2413
+ ],
2414
+ [
2415
+ "set",
2416
+ "@entity.pinned",
2417
+ true
2418
+ ]
2419
+ ]
2420
+ },
2421
+ {
2422
+ "from": "active",
2423
+ "to": "idle",
2424
+ "event": "FORGET",
2425
+ "effects": [
2426
+ [
2427
+ "agent/forget",
2428
+ "@payload.id"
2429
+ ],
2430
+ [
2431
+ "render-ui",
2432
+ "main",
2433
+ {
2434
+ "type": "dashboard-layout",
2435
+ "appName": "Schema Builder",
2436
+ "navItems": [
2437
+ {
2438
+ "label": "Plan",
2439
+ "href": "/plan",
2440
+ "icon": "clipboard-list"
2441
+ },
2442
+ {
2443
+ "label": "Build",
2444
+ "href": "/build",
2445
+ "icon": "hammer"
2446
+ },
2447
+ {
2448
+ "label": "Fix",
2449
+ "href": "/fix",
2450
+ "icon": "wrench"
2451
+ },
2452
+ {
2453
+ "label": "Learnings",
2454
+ "href": "/learnings",
2455
+ "icon": "brain"
2456
+ }
2457
+ ],
2458
+ "children": [
2459
+ {
2460
+ "type": "stack",
2461
+ "direction": "vertical",
2462
+ "gap": "lg",
2463
+ "children": [
2464
+ {
2465
+ "type": "stack",
2466
+ "direction": "horizontal",
2467
+ "gap": "sm",
2468
+ "align": "center",
2469
+ "children": [
2470
+ {
2471
+ "type": "icon",
2472
+ "name": "brain",
2473
+ "size": "lg"
2474
+ },
2475
+ {
2476
+ "type": "typography",
2477
+ "content": "Learning Manager",
2478
+ "variant": "h2"
2479
+ }
2480
+ ]
2481
+ },
2482
+ {
2483
+ "type": "divider"
2484
+ },
2485
+ {
2486
+ "type": "stack",
2487
+ "direction": "horizontal",
2488
+ "gap": "sm",
2489
+ "children": [
2490
+ {
2491
+ "type": "button",
2492
+ "label": "Memorize",
2493
+ "event": "MEMORIZE",
2494
+ "variant": "primary",
2495
+ "icon": "plus"
2496
+ },
2497
+ {
2498
+ "type": "button",
2499
+ "label": "Recall",
2500
+ "event": "RECALL",
2501
+ "variant": "secondary",
2502
+ "icon": "search"
2503
+ },
2504
+ {
2505
+ "type": "button",
2506
+ "label": "Decay All",
2507
+ "event": "DECAY",
2508
+ "variant": "ghost",
2509
+ "icon": "clock"
2510
+ }
2511
+ ]
2512
+ }
2513
+ ]
2514
+ }
2515
+ ]
2516
+ }
2517
+ ]
2518
+ ]
2519
+ },
2520
+ {
2521
+ "from": "active",
2522
+ "to": "active",
2523
+ "event": "REINFORCE",
2524
+ "effects": [
2525
+ [
2526
+ "agent/reinforce",
2527
+ "@payload.id"
2528
+ ]
2529
+ ]
2530
+ },
2531
+ {
2532
+ "from": "idle",
2533
+ "to": "idle",
2534
+ "event": "DECAY",
2535
+ "effects": [
2536
+ [
2537
+ "agent/decay"
2538
+ ]
2539
+ ]
2540
+ },
2541
+ {
2542
+ "from": "active",
2543
+ "to": "idle",
2544
+ "event": "DECAY",
2545
+ "effects": [
2546
+ [
2547
+ "agent/decay"
2548
+ ],
2549
+ [
2550
+ "render-ui",
2551
+ "main",
2552
+ {
2553
+ "type": "dashboard-layout",
2554
+ "appName": "Schema Builder",
2555
+ "navItems": [
2556
+ {
2557
+ "label": "Plan",
2558
+ "href": "/plan",
2559
+ "icon": "clipboard-list"
2560
+ },
2561
+ {
2562
+ "label": "Build",
2563
+ "href": "/build",
2564
+ "icon": "hammer"
2565
+ },
2566
+ {
2567
+ "label": "Fix",
2568
+ "href": "/fix",
2569
+ "icon": "wrench"
2570
+ },
2571
+ {
2572
+ "label": "Learnings",
2573
+ "href": "/learnings",
2574
+ "icon": "brain"
2575
+ }
2576
+ ],
2577
+ "children": [
2578
+ {
2579
+ "type": "stack",
2580
+ "direction": "vertical",
2581
+ "gap": "lg",
2582
+ "children": [
2583
+ {
2584
+ "type": "stack",
2585
+ "direction": "horizontal",
2586
+ "gap": "sm",
2587
+ "align": "center",
2588
+ "children": [
2589
+ {
2590
+ "type": "icon",
2591
+ "name": "brain",
2592
+ "size": "lg"
2593
+ },
2594
+ {
2595
+ "type": "typography",
2596
+ "content": "Learning Manager",
2597
+ "variant": "h2"
2598
+ }
2599
+ ]
2600
+ },
2601
+ {
2602
+ "type": "divider"
2603
+ },
2604
+ {
2605
+ "type": "stack",
2606
+ "direction": "horizontal",
2607
+ "gap": "sm",
2608
+ "children": [
2609
+ {
2610
+ "type": "button",
2611
+ "label": "Memorize",
2612
+ "event": "MEMORIZE",
2613
+ "variant": "primary",
2614
+ "icon": "plus"
2615
+ },
2616
+ {
2617
+ "type": "button",
2618
+ "label": "Recall",
2619
+ "event": "RECALL",
2620
+ "variant": "secondary",
2621
+ "icon": "search"
2622
+ },
2623
+ {
2624
+ "type": "button",
2625
+ "label": "Decay All",
2626
+ "event": "DECAY",
2627
+ "variant": "ghost",
2628
+ "icon": "clock"
2629
+ }
2630
+ ]
2631
+ }
2632
+ ]
2633
+ }
2634
+ ]
2635
+ }
2636
+ ]
2637
+ ]
2638
+ }
2639
+ ]
2640
+ },
2641
+ "listens": [
2642
+ {
2643
+ "event": "FIX_SUCCEEDED",
2644
+ "triggers": "MEMORIZE",
2645
+ "scope": "external"
2646
+ }
2647
+ ]
2648
+ }
2649
+ ],
2650
+ "pages": [
2651
+ {
2652
+ "name": "LearningsPage",
2653
+ "path": "/learnings",
2654
+ "traits": [
2655
+ {
2656
+ "ref": "LearningLifecycle"
2657
+ }
2658
+ ]
2659
+ }
2660
+ ]
2661
+ }
2662
+ ],
2663
+ "description": "Schema builder agent organism. Full build cycle that plans, generates, validates, and fixes .orb programs. Composes session forking for checkpoints, tool execution for validation, and learning from outcomes. Composed from: - inline PlannerTrait: breaks prompt into build plan with steps - inline BuilderTrait: generates schema via agent/generate, validates via agent/invoke - inline FixLoopTrait: iterates on validation failures with agent/generate - stdAgentMemory: learns from outcomes (memorize successes, forget failures) Cross-trait events: - PLAN_READY (Planner -> Builder): plan complete, begin building - BUILD_DONE (Builder -> FixLoop): schema generated, validate it - FIX_SUCCEEDED (FixLoop -> Memory): record successful fix pattern - BUILD_FAILED (Builder -> FixLoop): build failed, attempt fix Pages: /plan (initial), /build, /fix, /learnings"
2664
+ }