@praxisui/visual-builder 9.0.0-beta.9 → 9.0.0-rc.1

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.
@@ -0,0 +1,1911 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "generatedAt": "2026-07-24T21:07:35.880Z",
4
+ "packageName": "@praxisui/visual-builder",
5
+ "packageVersion": "9.0.0-rc.1",
6
+ "sourceRegistry": "praxis-component-registry-ingestion",
7
+ "sourceRegistryVersion": "1.0.0",
8
+ "componentCount": 1,
9
+ "components": {
10
+ "praxis-visual-builder": {
11
+ "id": "praxis-visual-builder",
12
+ "description": "Visual rule builder with JSON Logic authoring and governed compatibility for legacy payloads.",
13
+ "category": "builder",
14
+ "inputs": [
15
+ {
16
+ "name": "config",
17
+ "type": "RuleBuilderConfig | null",
18
+ "required": false,
19
+ "description": "Configuracao do builder (schemas, templates, UI e validacoes).",
20
+ "label": "Configuracao"
21
+ },
22
+ {
23
+ "name": "initialRules",
24
+ "type": "any",
25
+ "required": false,
26
+ "description": "Estado inicial de regras para carregar no editor.",
27
+ "label": "Regras iniciais"
28
+ }
29
+ ],
30
+ "outputs": [
31
+ {
32
+ "name": "rulesChanged",
33
+ "type": "RuleBuilderState",
34
+ "required": false,
35
+ "description": "Disparado quando o grafo/estado de regras e alterado.",
36
+ "label": "Regras alteradas"
37
+ },
38
+ {
39
+ "name": "exportRequested",
40
+ "type": "ExportOptions",
41
+ "required": false,
42
+ "description": "Disparado quando o usuario solicita exportacao.",
43
+ "label": "Exportacao solicitada"
44
+ },
45
+ {
46
+ "name": "importRequested",
47
+ "type": "ImportOptions",
48
+ "required": false,
49
+ "description": "Disparado quando o usuario solicita importacao.",
50
+ "label": "Importacao solicitada"
51
+ }
52
+ ],
53
+ "configSchemaId": null,
54
+ "selector": "praxis-visual-builder",
55
+ "friendlyName": "Praxis Visual Builder",
56
+ "tags": [
57
+ "widget",
58
+ "rules",
59
+ "configurable"
60
+ ],
61
+ "lib": "@praxisui/visual-builder",
62
+ "source": "projects/praxis-visual-builder/src/lib/praxis-visual-builder.metadata.ts",
63
+ "exportName": "PRAXIS_VISUAL_BUILDER_COMPONENT_METADATA",
64
+ "componentContext": {
65
+ "version": "v1",
66
+ "optionsByPath": {
67
+ "ui.theme": {
68
+ "mode": "enum",
69
+ "options": [
70
+ {
71
+ "value": "light",
72
+ "label": "Light"
73
+ },
74
+ {
75
+ "value": "dark",
76
+ "label": "Dark"
77
+ },
78
+ {
79
+ "value": "auto",
80
+ "label": "Auto"
81
+ }
82
+ ]
83
+ },
84
+ "validation.strictness": {
85
+ "mode": "enum",
86
+ "options": [
87
+ {
88
+ "value": "strict",
89
+ "label": "Strict"
90
+ },
91
+ {
92
+ "value": "normal",
93
+ "label": "Normal"
94
+ },
95
+ {
96
+ "value": "loose",
97
+ "label": "Loose"
98
+ }
99
+ ]
100
+ },
101
+ "exportImport.defaultExportFormat": {
102
+ "mode": "enum",
103
+ "options": [
104
+ {
105
+ "value": "json",
106
+ "label": "JSON"
107
+ },
108
+ {
109
+ "value": "typescript",
110
+ "label": "TypeScript"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ "actionCatalog": [
116
+ {
117
+ "id": "ui.theme.set",
118
+ "intentExamples": [
119
+ "theme",
120
+ "light",
121
+ "dark",
122
+ "auto theme"
123
+ ],
124
+ "patchTemplate": {
125
+ "ui": {
126
+ "theme": "{{value}}"
127
+ }
128
+ }
129
+ },
130
+ {
131
+ "id": "ui.showInlineErrors.enable",
132
+ "intentExamples": [
133
+ "inline errors",
134
+ "show errors"
135
+ ],
136
+ "patchTemplate": {
137
+ "ui": {
138
+ "showInlineErrors": true
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "id": "ui.showInlineErrors.disable",
144
+ "intentExamples": [
145
+ "hide errors",
146
+ "no inline errors"
147
+ ],
148
+ "patchTemplate": {
149
+ "ui": {
150
+ "showInlineErrors": false
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "id": "ui.autoSaveInterval.set",
156
+ "intentExamples": [
157
+ "autosave",
158
+ "auto save",
159
+ "save interval"
160
+ ],
161
+ "patchTemplate": {
162
+ "ui": {
163
+ "autoSaveInterval": "{{value}}"
164
+ }
165
+ }
166
+ },
167
+ {
168
+ "id": "validation.realTime.enable",
169
+ "intentExamples": [
170
+ "real-time validation",
171
+ "live validation"
172
+ ],
173
+ "patchTemplate": {
174
+ "validation": {
175
+ "realTime": true
176
+ }
177
+ }
178
+ },
179
+ {
180
+ "id": "validation.realTime.disable",
181
+ "intentExamples": [
182
+ "disable validation",
183
+ "no live validation"
184
+ ],
185
+ "patchTemplate": {
186
+ "validation": {
187
+ "realTime": false
188
+ }
189
+ }
190
+ },
191
+ {
192
+ "id": "validation.strictness.set",
193
+ "intentExamples": [
194
+ "strictness",
195
+ "validation level"
196
+ ],
197
+ "patchTemplate": {
198
+ "validation": {
199
+ "strictness": "{{value}}"
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "id": "exportImport.defaultExportFormat.set",
205
+ "intentExamples": [
206
+ "export format",
207
+ "default export",
208
+ "json logic export"
209
+ ],
210
+ "patchTemplate": {
211
+ "exportImport": {
212
+ "defaultExportFormat": "{{value}}"
213
+ }
214
+ }
215
+ },
216
+ {
217
+ "id": "template.add",
218
+ "intentExamples": [
219
+ "add template",
220
+ "new template",
221
+ "create template"
222
+ ],
223
+ "patchTemplate": {
224
+ "templates": [
225
+ {
226
+ "id": "{{target}}",
227
+ "name": "{{value}}",
228
+ "description": "{{params.description}}",
229
+ "category": "{{params.category}}",
230
+ "tags": [
231
+ "{{params.tag}}"
232
+ ],
233
+ "nodes": [],
234
+ "rootNodes": []
235
+ }
236
+ ]
237
+ }
238
+ }
239
+ ],
240
+ "fieldResolvers": {
241
+ "templates[]": [
242
+ "id",
243
+ "name"
244
+ ]
245
+ },
246
+ "hints": [
247
+ "Use templates[].id as merge key; avoid array indexes.",
248
+ "Rule graph and node structures are complex; prefer editing via templates or UI config toggles."
249
+ ]
250
+ },
251
+ "authoringManifest": {
252
+ "schemaVersion": "1.0.0",
253
+ "componentId": "praxis-visual-builder",
254
+ "ownerPackage": "@praxisui/visual-builder",
255
+ "configSchemaId": "RuleBuilderState",
256
+ "manifestVersion": "1.0.0",
257
+ "runtimeInputs": [
258
+ {
259
+ "name": "mode",
260
+ "type": "'rules' | 'condition'",
261
+ "description": "Rendering mode. rules edits full property rules; condition edits only a JSON Logic condition expression."
262
+ },
263
+ {
264
+ "name": "config",
265
+ "type": "RuleBuilderConfig | null",
266
+ "description": "Builder configuration with field schemas, target schemas, context variables, validation and export/import settings."
267
+ },
268
+ {
269
+ "name": "initialRules",
270
+ "type": "RuleBuilderState | FormLayoutRule[] | JsonLogicExpression | null",
271
+ "description": "Initial rules loaded into the visual builder."
272
+ },
273
+ {
274
+ "name": "initialCondition",
275
+ "type": "JsonLogicExpression | null",
276
+ "description": "Initial JSON Logic expression used when mode is condition."
277
+ },
278
+ {
279
+ "name": "rulesChanged",
280
+ "type": "RuleBuilderState",
281
+ "description": "Emitted visual builder state after graph or JSON Logic changes."
282
+ },
283
+ {
284
+ "name": "conditionChanged",
285
+ "type": "JsonLogicExpression | null",
286
+ "description": "Emitted JSON Logic expression when condition-mode authoring changes."
287
+ },
288
+ {
289
+ "name": "exportRequested",
290
+ "type": "ExportOptions",
291
+ "description": "Emitted export request for JSON, TypeScript or form-config payloads."
292
+ },
293
+ {
294
+ "name": "importRequested",
295
+ "type": "ImportOptions",
296
+ "description": "Emitted import request for JSON or form-config payloads."
297
+ }
298
+ ],
299
+ "editableTargets": [
300
+ {
301
+ "kind": "node",
302
+ "resolver": "rule-node-by-id",
303
+ "description": "Visual rule graph node keyed by stable RuleNode.id."
304
+ },
305
+ {
306
+ "kind": "edge",
307
+ "resolver": "rule-node-edge-by-source-target",
308
+ "description": "Parent-child or semantic graph edge between existing rule nodes."
309
+ },
310
+ {
311
+ "kind": "variable",
312
+ "resolver": "context-variable-by-name-scope",
313
+ "description": "Context variable governed by ContextManagementService for contextual/template flows; visual field-condition references are not authorable until a canonical JSON Logic shape exists."
314
+ },
315
+ {
316
+ "kind": "condition",
317
+ "resolver": "json-logic-condition-by-node",
318
+ "description": "JSON Logic condition attached to a node or represented by condition nodes."
319
+ },
320
+ {
321
+ "kind": "effect",
322
+ "resolver": "property-effect-by-node",
323
+ "description": "Targeted property effect persisted as propertyRule/FormLayoutRule semantics."
324
+ },
325
+ {
326
+ "kind": "dslDocument",
327
+ "resolver": "rule-builder-json-logic-document",
328
+ "description": "Serialized JSON Logic/form-config document produced from the visual model."
329
+ }
330
+ ],
331
+ "operations": [
332
+ {
333
+ "operationId": "node.add",
334
+ "title": "Add visual rule node",
335
+ "scope": "rules",
336
+ "targetKind": "node",
337
+ "target": {
338
+ "kind": "node",
339
+ "resolver": "rule-node-by-id",
340
+ "ambiguityPolicy": "fail",
341
+ "required": true
342
+ },
343
+ "inputSchema": {
344
+ "type": "object",
345
+ "required": [
346
+ "nodeId",
347
+ "nodeType"
348
+ ],
349
+ "properties": {
350
+ "nodeId": {
351
+ "type": "string"
352
+ },
353
+ "nodeType": {
354
+ "enum": [
355
+ "fieldCondition",
356
+ "propertyRule",
357
+ "andGroup",
358
+ "orGroup",
359
+ "notGroup",
360
+ "xorGroup",
361
+ "impliesGroup",
362
+ "requiredIf",
363
+ "visibleIf",
364
+ "disabledIf",
365
+ "readonlyIf",
366
+ "forEach",
367
+ "uniqueBy",
368
+ "minLength",
369
+ "maxLength",
370
+ "ifDefined",
371
+ "ifNotNull",
372
+ "ifExists",
373
+ "withDefault",
374
+ "functionCall",
375
+ "fieldToField",
376
+ "contextual",
377
+ "atLeast",
378
+ "exactly",
379
+ "expression",
380
+ "contextualTemplate",
381
+ "custom"
382
+ ]
383
+ },
384
+ "label": {
385
+ "type": "string"
386
+ },
387
+ "parentId": {
388
+ "type": "string"
389
+ },
390
+ "config": {
391
+ "type": "object"
392
+ },
393
+ "metadata": {
394
+ "type": "object"
395
+ }
396
+ }
397
+ },
398
+ "effects": [
399
+ {
400
+ "kind": "compile-domain-patch",
401
+ "handler": "visual-builder-node-add",
402
+ "handlerContract": {
403
+ "reads": [
404
+ "RuleBuilderState.nodes",
405
+ "RuleBuilderState.rootNodes",
406
+ "RuleNodeRegistryService",
407
+ "RuleBuilderService.addNode"
408
+ ],
409
+ "writes": [
410
+ "RuleBuilderState.nodes",
411
+ "RuleBuilderState.rootNodes",
412
+ "RuleNodeRegistryService"
413
+ ],
414
+ "identityKeys": [
415
+ "nodeId"
416
+ ],
417
+ "inputSchema": {
418
+ "type": "object",
419
+ "required": [
420
+ "nodeId",
421
+ "nodeType"
422
+ ],
423
+ "properties": {
424
+ "nodeId": {
425
+ "type": "string"
426
+ },
427
+ "nodeType": {
428
+ "enum": [
429
+ "fieldCondition",
430
+ "propertyRule",
431
+ "andGroup",
432
+ "orGroup",
433
+ "notGroup",
434
+ "xorGroup",
435
+ "impliesGroup",
436
+ "requiredIf",
437
+ "visibleIf",
438
+ "disabledIf",
439
+ "readonlyIf",
440
+ "forEach",
441
+ "uniqueBy",
442
+ "minLength",
443
+ "maxLength",
444
+ "ifDefined",
445
+ "ifNotNull",
446
+ "ifExists",
447
+ "withDefault",
448
+ "functionCall",
449
+ "fieldToField",
450
+ "contextual",
451
+ "atLeast",
452
+ "exactly",
453
+ "expression",
454
+ "contextualTemplate",
455
+ "custom"
456
+ ]
457
+ },
458
+ "label": {
459
+ "type": "string"
460
+ },
461
+ "parentId": {
462
+ "type": "string"
463
+ },
464
+ "config": {
465
+ "type": "object"
466
+ },
467
+ "metadata": {
468
+ "type": "object"
469
+ }
470
+ }
471
+ },
472
+ "failureModes": [
473
+ "duplicate-node-id",
474
+ "unsupported-node-type",
475
+ "parent-node-not-found",
476
+ "graph-cycle-created"
477
+ ],
478
+ "description": "Adds a rule node by stable id and validates graph integrity before the state can be serialized."
479
+ }
480
+ }
481
+ ],
482
+ "validators": [
483
+ "node-id-unique",
484
+ "node-type-supported",
485
+ "parent-node-exists",
486
+ "graph-valid",
487
+ "dsl-round-trip-stable"
488
+ ],
489
+ "affectedPaths": [
490
+ "RuleBuilderState.nodes",
491
+ "RuleBuilderState.rootNodes",
492
+ "RuleNodeRegistryService"
493
+ ],
494
+ "submissionImpact": "config-only",
495
+ "preconditions": [
496
+ "rule-builder-state-loaded"
497
+ ],
498
+ "destructive": false,
499
+ "requiresConfirmation": false
500
+ },
501
+ {
502
+ "operationId": "node.remove",
503
+ "title": "Remove visual rule node",
504
+ "scope": "rules",
505
+ "targetKind": "node",
506
+ "target": {
507
+ "kind": "node",
508
+ "resolver": "rule-node-by-id",
509
+ "ambiguityPolicy": "fail",
510
+ "required": true
511
+ },
512
+ "inputSchema": {
513
+ "type": "object",
514
+ "required": [
515
+ "nodeId"
516
+ ],
517
+ "properties": {
518
+ "nodeId": {
519
+ "type": "string"
520
+ },
521
+ "removeDescendants": {
522
+ "type": "boolean"
523
+ },
524
+ "preserveDisconnectedChildren": {
525
+ "type": "boolean"
526
+ }
527
+ }
528
+ },
529
+ "effects": [
530
+ {
531
+ "kind": "compile-domain-patch",
532
+ "handler": "visual-builder-node-remove",
533
+ "handlerContract": {
534
+ "reads": [
535
+ "RuleBuilderState.nodes",
536
+ "RuleBuilderState.rootNodes",
537
+ "RuleNodeRegistryService",
538
+ "RuleBuilderService.removeNode"
539
+ ],
540
+ "writes": [
541
+ "RuleBuilderState.nodes",
542
+ "RuleBuilderState.rootNodes",
543
+ "RuleNodeRegistryService"
544
+ ],
545
+ "identityKeys": [
546
+ "nodeId"
547
+ ],
548
+ "inputSchema": {
549
+ "type": "object",
550
+ "required": [
551
+ "nodeId"
552
+ ],
553
+ "properties": {
554
+ "nodeId": {
555
+ "type": "string"
556
+ },
557
+ "removeDescendants": {
558
+ "type": "boolean"
559
+ },
560
+ "preserveDisconnectedChildren": {
561
+ "type": "boolean"
562
+ }
563
+ }
564
+ },
565
+ "failureModes": [
566
+ "node-not-found",
567
+ "destructive-removal-not-confirmed",
568
+ "orphaned-edge-created",
569
+ "dsl-round-trip-failed"
570
+ ],
571
+ "description": "Removes a node and governed descendants by id, requiring confirmation because conditions/effects can be lost."
572
+ }
573
+ }
574
+ ],
575
+ "destructive": true,
576
+ "requiresConfirmation": true,
577
+ "validators": [
578
+ "node-exists",
579
+ "destructive-removal-confirmed",
580
+ "edges-reference-existing-nodes",
581
+ "dsl-round-trip-stable"
582
+ ],
583
+ "affectedPaths": [
584
+ "RuleBuilderState.nodes",
585
+ "RuleBuilderState.rootNodes",
586
+ "RuleNodeRegistryService"
587
+ ],
588
+ "submissionImpact": "config-only",
589
+ "preconditions": [
590
+ "rule-builder-state-loaded",
591
+ "explicit-confirmation-provided"
592
+ ]
593
+ },
594
+ {
595
+ "operationId": "node.configure",
596
+ "title": "Configure visual rule node",
597
+ "scope": "rules",
598
+ "targetKind": "node",
599
+ "target": {
600
+ "kind": "node",
601
+ "resolver": "rule-node-by-id",
602
+ "ambiguityPolicy": "fail",
603
+ "required": true
604
+ },
605
+ "inputSchema": {
606
+ "type": "object",
607
+ "required": [
608
+ "nodeId"
609
+ ],
610
+ "properties": {
611
+ "nodeId": {
612
+ "type": "string"
613
+ },
614
+ "label": {
615
+ "type": "string"
616
+ },
617
+ "configPatch": {
618
+ "type": "object"
619
+ },
620
+ "metadataPatch": {
621
+ "type": "object"
622
+ },
623
+ "expanded": {
624
+ "type": "boolean"
625
+ }
626
+ }
627
+ },
628
+ "effects": [
629
+ {
630
+ "kind": "compile-domain-patch",
631
+ "handler": "visual-builder-node-configure",
632
+ "handlerContract": {
633
+ "reads": [
634
+ "RuleBuilderState.nodes",
635
+ "RuleBuilderService.updateNode",
636
+ "RuleNodeRegistryService"
637
+ ],
638
+ "writes": [
639
+ "RuleBuilderState.nodes",
640
+ "RuleBuilderState.currentJSON"
641
+ ],
642
+ "identityKeys": [
643
+ "nodeId"
644
+ ],
645
+ "inputSchema": {
646
+ "type": "object",
647
+ "required": [
648
+ "nodeId"
649
+ ],
650
+ "properties": {
651
+ "nodeId": {
652
+ "type": "string"
653
+ },
654
+ "label": {
655
+ "type": "string"
656
+ },
657
+ "configPatch": {
658
+ "type": "object"
659
+ },
660
+ "metadataPatch": {
661
+ "type": "object"
662
+ },
663
+ "expanded": {
664
+ "type": "boolean"
665
+ }
666
+ }
667
+ },
668
+ "failureModes": [
669
+ "node-not-found",
670
+ "config-shape-invalid",
671
+ "node-type-config-mismatch",
672
+ "dsl-round-trip-failed"
673
+ ],
674
+ "description": "Applies a typed patch to a rule node while preserving node identity and JSON Logic serialization."
675
+ }
676
+ }
677
+ ],
678
+ "validators": [
679
+ "node-exists",
680
+ "node-config-compatible",
681
+ "graph-valid",
682
+ "dsl-round-trip-stable"
683
+ ],
684
+ "affectedPaths": [
685
+ "RuleBuilderState.nodes",
686
+ "RuleBuilderState.currentJSON"
687
+ ],
688
+ "submissionImpact": "config-only",
689
+ "preconditions": [
690
+ "rule-builder-state-loaded"
691
+ ],
692
+ "destructive": false,
693
+ "requiresConfirmation": false
694
+ },
695
+ {
696
+ "operationId": "edge.connect",
697
+ "title": "Connect visual graph edge",
698
+ "scope": "interaction",
699
+ "targetKind": "edge",
700
+ "target": {
701
+ "kind": "edge",
702
+ "resolver": "rule-node-edge-by-source-target",
703
+ "ambiguityPolicy": "fail",
704
+ "required": true
705
+ },
706
+ "inputSchema": {
707
+ "type": "object",
708
+ "required": [
709
+ "sourceNodeId",
710
+ "targetNodeId"
711
+ ],
712
+ "properties": {
713
+ "sourceNodeId": {
714
+ "type": "string"
715
+ },
716
+ "targetNodeId": {
717
+ "type": "string"
718
+ },
719
+ "edgeKind": {
720
+ "enum": [
721
+ "child",
722
+ "condition",
723
+ "effect"
724
+ ]
725
+ },
726
+ "insertIndex": {
727
+ "type": "number"
728
+ }
729
+ }
730
+ },
731
+ "effects": [
732
+ {
733
+ "kind": "compile-domain-patch",
734
+ "handler": "visual-builder-edge-connect",
735
+ "handlerContract": {
736
+ "reads": [
737
+ "RuleBuilderState.nodes",
738
+ "RuleNodeRegistryService.validateIntegrity"
739
+ ],
740
+ "writes": [
741
+ "RuleBuilderState.nodes[].children",
742
+ "RuleBuilderState.nodes[].parentId"
743
+ ],
744
+ "identityKeys": [
745
+ "sourceNodeId",
746
+ "targetNodeId",
747
+ "edgeKind"
748
+ ],
749
+ "inputSchema": {
750
+ "type": "object",
751
+ "required": [
752
+ "sourceNodeId",
753
+ "targetNodeId"
754
+ ],
755
+ "properties": {
756
+ "sourceNodeId": {
757
+ "type": "string"
758
+ },
759
+ "targetNodeId": {
760
+ "type": "string"
761
+ },
762
+ "edgeKind": {
763
+ "enum": [
764
+ "child",
765
+ "condition",
766
+ "effect"
767
+ ]
768
+ },
769
+ "insertIndex": {
770
+ "type": "number"
771
+ }
772
+ }
773
+ },
774
+ "failureModes": [
775
+ "source-node-not-found",
776
+ "target-node-not-found",
777
+ "duplicate-edge",
778
+ "graph-cycle-created"
779
+ ],
780
+ "description": "Connects two existing nodes and rejects edges that break registry integrity or acyclic graph requirements."
781
+ }
782
+ }
783
+ ],
784
+ "validators": [
785
+ "node-exists",
786
+ "edges-reference-existing-nodes",
787
+ "graph-acyclic-where-required",
788
+ "dsl-round-trip-stable"
789
+ ],
790
+ "affectedPaths": [
791
+ "RuleBuilderState.nodes[].children",
792
+ "RuleBuilderState.nodes[].parentId"
793
+ ],
794
+ "submissionImpact": "config-only",
795
+ "preconditions": [
796
+ "rule-builder-state-loaded"
797
+ ],
798
+ "destructive": false,
799
+ "requiresConfirmation": false
800
+ },
801
+ {
802
+ "operationId": "edge.remove",
803
+ "title": "Remove visual graph edge",
804
+ "scope": "interaction",
805
+ "targetKind": "edge",
806
+ "target": {
807
+ "kind": "edge",
808
+ "resolver": "rule-node-edge-by-source-target",
809
+ "ambiguityPolicy": "fail",
810
+ "required": true
811
+ },
812
+ "inputSchema": {
813
+ "type": "object",
814
+ "required": [
815
+ "sourceNodeId",
816
+ "targetNodeId"
817
+ ],
818
+ "properties": {
819
+ "sourceNodeId": {
820
+ "type": "string"
821
+ },
822
+ "targetNodeId": {
823
+ "type": "string"
824
+ },
825
+ "edgeKind": {
826
+ "enum": [
827
+ "child",
828
+ "condition",
829
+ "effect"
830
+ ]
831
+ },
832
+ "removeOrphanTarget": {
833
+ "type": "boolean"
834
+ }
835
+ }
836
+ },
837
+ "effects": [
838
+ {
839
+ "kind": "compile-domain-patch",
840
+ "handler": "visual-builder-edge-remove",
841
+ "handlerContract": {
842
+ "reads": [
843
+ "RuleBuilderState.nodes",
844
+ "RuleNodeRegistryService.validateIntegrity"
845
+ ],
846
+ "writes": [
847
+ "RuleBuilderState.nodes[].children",
848
+ "RuleBuilderState.nodes[].parentId"
849
+ ],
850
+ "identityKeys": [
851
+ "sourceNodeId",
852
+ "targetNodeId",
853
+ "edgeKind"
854
+ ],
855
+ "inputSchema": {
856
+ "type": "object",
857
+ "required": [
858
+ "sourceNodeId",
859
+ "targetNodeId"
860
+ ],
861
+ "properties": {
862
+ "sourceNodeId": {
863
+ "type": "string"
864
+ },
865
+ "targetNodeId": {
866
+ "type": "string"
867
+ },
868
+ "edgeKind": {
869
+ "enum": [
870
+ "child",
871
+ "condition",
872
+ "effect"
873
+ ]
874
+ },
875
+ "removeOrphanTarget": {
876
+ "type": "boolean"
877
+ }
878
+ }
879
+ },
880
+ "failureModes": [
881
+ "edge-not-found",
882
+ "destructive-removal-not-confirmed",
883
+ "orphaned-node-created",
884
+ "dsl-round-trip-failed"
885
+ ],
886
+ "description": "Removes a graph edge by source and target ids with confirmation when the target can become orphaned."
887
+ }
888
+ }
889
+ ],
890
+ "destructive": true,
891
+ "requiresConfirmation": true,
892
+ "validators": [
893
+ "edge-exists",
894
+ "destructive-removal-confirmed",
895
+ "graph-valid",
896
+ "dsl-round-trip-stable"
897
+ ],
898
+ "affectedPaths": [
899
+ "RuleBuilderState.nodes[].children",
900
+ "RuleBuilderState.nodes[].parentId"
901
+ ],
902
+ "submissionImpact": "config-only",
903
+ "preconditions": [
904
+ "rule-builder-state-loaded",
905
+ "explicit-confirmation-provided"
906
+ ]
907
+ },
908
+ {
909
+ "operationId": "variable.add",
910
+ "title": "Add context variable",
911
+ "scope": "dataBinding",
912
+ "targetKind": "variable",
913
+ "target": {
914
+ "kind": "variable",
915
+ "resolver": "context-variable-by-name-scope",
916
+ "ambiguityPolicy": "fail",
917
+ "required": true
918
+ },
919
+ "inputSchema": {
920
+ "type": "object",
921
+ "required": [
922
+ "name",
923
+ "scope",
924
+ "type"
925
+ ],
926
+ "properties": {
927
+ "name": {
928
+ "type": "string"
929
+ },
930
+ "scope": {
931
+ "type": "string"
932
+ },
933
+ "type": {
934
+ "enum": [
935
+ "string",
936
+ "number",
937
+ "boolean",
938
+ "object",
939
+ "array"
940
+ ]
941
+ },
942
+ "defaultValue": {},
943
+ "description": {
944
+ "type": "string"
945
+ }
946
+ }
947
+ },
948
+ "effects": [
949
+ {
950
+ "kind": "compile-domain-patch",
951
+ "handler": "visual-builder-variable-add",
952
+ "handlerContract": {
953
+ "reads": [
954
+ "RuleBuilderConfig.contextVariables",
955
+ "ContextManagementService"
956
+ ],
957
+ "writes": [
958
+ "RuleBuilderConfig.contextVariables",
959
+ "ContextManagementService"
960
+ ],
961
+ "identityKeys": [
962
+ "scope",
963
+ "name"
964
+ ],
965
+ "inputSchema": {
966
+ "type": "object",
967
+ "required": [
968
+ "name",
969
+ "scope",
970
+ "type"
971
+ ],
972
+ "properties": {
973
+ "name": {
974
+ "type": "string"
975
+ },
976
+ "scope": {
977
+ "type": "string"
978
+ },
979
+ "type": {
980
+ "enum": [
981
+ "string",
982
+ "number",
983
+ "boolean",
984
+ "object",
985
+ "array"
986
+ ]
987
+ },
988
+ "defaultValue": {},
989
+ "description": {
990
+ "type": "string"
991
+ }
992
+ }
993
+ },
994
+ "failureModes": [
995
+ "duplicate-variable",
996
+ "scope-not-found",
997
+ "variable-type-invalid",
998
+ "context-token-conflict"
999
+ ],
1000
+ "description": "Adds a governed context variable to ContextManagementService for contextual/template flows. Field-condition references stay unsupported until a canonical JSON Logic shape exists."
1001
+ }
1002
+ }
1003
+ ],
1004
+ "validators": [
1005
+ "variable-id-unique",
1006
+ "variable-scope-exists",
1007
+ "context-variable-reference-valid",
1008
+ "dsl-round-trip-stable"
1009
+ ],
1010
+ "affectedPaths": [
1011
+ "RuleBuilderConfig.contextVariables",
1012
+ "ContextManagementService"
1013
+ ],
1014
+ "submissionImpact": "config-only",
1015
+ "preconditions": [
1016
+ "rule-builder-config-loaded"
1017
+ ],
1018
+ "destructive": false,
1019
+ "requiresConfirmation": false
1020
+ },
1021
+ {
1022
+ "operationId": "condition.set",
1023
+ "title": "Set JSON Logic condition",
1024
+ "scope": "rules",
1025
+ "targetKind": "condition",
1026
+ "target": {
1027
+ "kind": "condition",
1028
+ "resolver": "json-logic-condition-by-node",
1029
+ "ambiguityPolicy": "fail",
1030
+ "required": true
1031
+ },
1032
+ "inputSchema": {
1033
+ "type": "object",
1034
+ "required": [
1035
+ "nodeId",
1036
+ "condition"
1037
+ ],
1038
+ "properties": {
1039
+ "nodeId": {
1040
+ "type": "string"
1041
+ },
1042
+ "condition": {
1043
+ "type": "object"
1044
+ },
1045
+ "mode": {
1046
+ "enum": [
1047
+ "replace",
1048
+ "merge"
1049
+ ]
1050
+ },
1051
+ "source": {
1052
+ "enum": [
1053
+ "visual",
1054
+ "jsonLogic"
1055
+ ]
1056
+ }
1057
+ }
1058
+ },
1059
+ "effects": [
1060
+ {
1061
+ "kind": "compile-domain-patch",
1062
+ "handler": "visual-builder-condition-set",
1063
+ "handlerContract": {
1064
+ "reads": [
1065
+ "RuleBuilderState.nodes",
1066
+ "RuleBuilderService.loadFromConditionExpression",
1067
+ "RuleBuilderService.buildConditionExpressionFromGraph"
1068
+ ],
1069
+ "writes": [
1070
+ "RuleBuilderState.nodes[].config.condition",
1071
+ "RuleBuilderState.currentJSON"
1072
+ ],
1073
+ "identityKeys": [
1074
+ "nodeId"
1075
+ ],
1076
+ "inputSchema": {
1077
+ "type": "object",
1078
+ "required": [
1079
+ "nodeId",
1080
+ "condition"
1081
+ ],
1082
+ "properties": {
1083
+ "nodeId": {
1084
+ "type": "string"
1085
+ },
1086
+ "condition": {
1087
+ "type": "object"
1088
+ },
1089
+ "mode": {
1090
+ "enum": [
1091
+ "replace",
1092
+ "merge"
1093
+ ]
1094
+ },
1095
+ "source": {
1096
+ "enum": [
1097
+ "visual",
1098
+ "jsonLogic"
1099
+ ]
1100
+ }
1101
+ }
1102
+ },
1103
+ "failureModes": [
1104
+ "node-not-found",
1105
+ "json-logic-invalid",
1106
+ "unsupported-operator",
1107
+ "visual-parse-failed",
1108
+ "dsl-round-trip-failed"
1109
+ ],
1110
+ "description": "Sets a canonical JSON Logic condition within the runtime-supported visual subset and proves it can parse back into the visual graph."
1111
+ }
1112
+ }
1113
+ ],
1114
+ "validators": [
1115
+ "json-logic-valid",
1116
+ "condition-operators-supported",
1117
+ "condition-fields-known",
1118
+ "dsl-round-trip-stable"
1119
+ ],
1120
+ "affectedPaths": [
1121
+ "RuleBuilderState.nodes[].config.condition",
1122
+ "RuleBuilderState.currentJSON"
1123
+ ],
1124
+ "submissionImpact": "config-only",
1125
+ "preconditions": [
1126
+ "rule-builder-state-loaded"
1127
+ ],
1128
+ "destructive": false,
1129
+ "requiresConfirmation": false
1130
+ },
1131
+ {
1132
+ "operationId": "effect.set",
1133
+ "title": "Set visual property effect",
1134
+ "scope": "rules",
1135
+ "targetKind": "effect",
1136
+ "target": {
1137
+ "kind": "effect",
1138
+ "resolver": "property-effect-by-node",
1139
+ "ambiguityPolicy": "fail",
1140
+ "required": true
1141
+ },
1142
+ "inputSchema": {
1143
+ "type": "object",
1144
+ "required": [
1145
+ "nodeId",
1146
+ "targetType",
1147
+ "targets",
1148
+ "properties"
1149
+ ],
1150
+ "properties": {
1151
+ "nodeId": {
1152
+ "type": "string"
1153
+ },
1154
+ "targetType": {
1155
+ "enum": [
1156
+ "field",
1157
+ "section",
1158
+ "action",
1159
+ "row",
1160
+ "column",
1161
+ "visualBlock"
1162
+ ]
1163
+ },
1164
+ "targets": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string"
1168
+ }
1169
+ },
1170
+ "properties": {
1171
+ "type": "object"
1172
+ },
1173
+ "propertiesWhenFalse": {
1174
+ "type": "object"
1175
+ },
1176
+ "conditionNodeId": {
1177
+ "type": "string"
1178
+ }
1179
+ }
1180
+ },
1181
+ "effects": [
1182
+ {
1183
+ "kind": "compile-domain-patch",
1184
+ "handler": "visual-builder-effect-set",
1185
+ "handlerContract": {
1186
+ "reads": [
1187
+ "RuleBuilderState.nodes",
1188
+ "RuleBuilderConfig.targetPropertySchemas",
1189
+ "RULE_PROPERTY_SCHEMA",
1190
+ "RuleBuilderService.export"
1191
+ ],
1192
+ "writes": [
1193
+ "RuleBuilderState.nodes[].config.targetType",
1194
+ "RuleBuilderState.nodes[].config.targets",
1195
+ "RuleBuilderState.nodes[].config.properties",
1196
+ "RuleBuilderState.nodes[].config.propertiesWhenFalse",
1197
+ "RuleBuilderState.currentJSON"
1198
+ ],
1199
+ "identityKeys": [
1200
+ "nodeId",
1201
+ "targetType",
1202
+ "targets"
1203
+ ],
1204
+ "inputSchema": {
1205
+ "type": "object",
1206
+ "required": [
1207
+ "nodeId",
1208
+ "targetType",
1209
+ "targets",
1210
+ "properties"
1211
+ ],
1212
+ "properties": {
1213
+ "nodeId": {
1214
+ "type": "string"
1215
+ },
1216
+ "targetType": {
1217
+ "enum": [
1218
+ "field",
1219
+ "section",
1220
+ "action",
1221
+ "row",
1222
+ "column",
1223
+ "visualBlock"
1224
+ ]
1225
+ },
1226
+ "targets": {
1227
+ "type": "array",
1228
+ "items": {
1229
+ "type": "string"
1230
+ }
1231
+ },
1232
+ "properties": {
1233
+ "type": "object"
1234
+ },
1235
+ "propertiesWhenFalse": {
1236
+ "type": "object"
1237
+ },
1238
+ "conditionNodeId": {
1239
+ "type": "string"
1240
+ }
1241
+ }
1242
+ },
1243
+ "failureModes": [
1244
+ "node-not-found",
1245
+ "target-not-found",
1246
+ "property-not-allowed-for-target",
1247
+ "effect-value-invalid",
1248
+ "dsl-round-trip-failed"
1249
+ ],
1250
+ "description": "Sets a property effect using governed target property schemas so export to FormLayoutRule remains deterministic."
1251
+ }
1252
+ }
1253
+ ],
1254
+ "validators": [
1255
+ "effect-targets-exist",
1256
+ "effect-properties-governed",
1257
+ "effect-values-valid",
1258
+ "dsl-round-trip-stable"
1259
+ ],
1260
+ "affectedPaths": [
1261
+ "RuleBuilderState.nodes[].config.targetType",
1262
+ "RuleBuilderState.nodes[].config.targets",
1263
+ "RuleBuilderState.nodes[].config.properties",
1264
+ "RuleBuilderState.nodes[].config.propertiesWhenFalse",
1265
+ "RuleBuilderState.currentJSON"
1266
+ ],
1267
+ "submissionImpact": "affects-schema-backed-data",
1268
+ "preconditions": [
1269
+ "rule-builder-state-loaded",
1270
+ "target-schema-loaded"
1271
+ ],
1272
+ "destructive": false,
1273
+ "requiresConfirmation": false
1274
+ },
1275
+ {
1276
+ "operationId": "dsl.roundTrip.validate",
1277
+ "title": "Validate visual and DSL round trip",
1278
+ "scope": "runtimeCoverage",
1279
+ "targetKind": "dslDocument",
1280
+ "target": {
1281
+ "kind": "dslDocument",
1282
+ "resolver": "rule-builder-json-logic-document",
1283
+ "ambiguityPolicy": "fail",
1284
+ "required": false
1285
+ },
1286
+ "inputSchema": {
1287
+ "type": "object",
1288
+ "properties": {
1289
+ "format": {
1290
+ "enum": [
1291
+ "json"
1292
+ ]
1293
+ },
1294
+ "requireStableIds": {
1295
+ "type": "boolean"
1296
+ },
1297
+ "compareMode": {
1298
+ "enum": [
1299
+ "semantic",
1300
+ "exact"
1301
+ ]
1302
+ }
1303
+ }
1304
+ },
1305
+ "effects": [
1306
+ {
1307
+ "kind": "compile-domain-patch",
1308
+ "handler": "visual-builder-dsl-round-trip-validate",
1309
+ "handlerContract": {
1310
+ "reads": [
1311
+ "RuleBuilderState",
1312
+ "RuleBuilderService.export",
1313
+ "RuleBuilderService.import",
1314
+ "RuleBuilderService.buildConditionExpressionFromGraph",
1315
+ "RuleNodeRegistryService.validateIntegrity"
1316
+ ],
1317
+ "writes": [
1318
+ "RuleBuilderState.validationErrors",
1319
+ "RuleBuilderState.currentJSON"
1320
+ ],
1321
+ "identityKeys": [
1322
+ "format",
1323
+ "compareMode"
1324
+ ],
1325
+ "inputSchema": {
1326
+ "type": "object",
1327
+ "properties": {
1328
+ "format": {
1329
+ "enum": [
1330
+ "json"
1331
+ ]
1332
+ },
1333
+ "requireStableIds": {
1334
+ "type": "boolean"
1335
+ },
1336
+ "compareMode": {
1337
+ "enum": [
1338
+ "semantic",
1339
+ "exact"
1340
+ ]
1341
+ }
1342
+ }
1343
+ },
1344
+ "failureModes": [
1345
+ "graph-invalid",
1346
+ "export-failed",
1347
+ "import-failed",
1348
+ "semantic-drift",
1349
+ "unstable-node-identity"
1350
+ ],
1351
+ "description": "Exports the visual model to JSON, imports it back and rejects semantic drift or unstable identity."
1352
+ }
1353
+ }
1354
+ ],
1355
+ "validators": [
1356
+ "graph-valid",
1357
+ "dsl-round-trip-stable",
1358
+ "json-logic-valid",
1359
+ "registry-integrity-valid"
1360
+ ],
1361
+ "affectedPaths": [
1362
+ "RuleBuilderState.currentJSON",
1363
+ "RuleBuilderState.validationErrors"
1364
+ ],
1365
+ "submissionImpact": "none",
1366
+ "preconditions": [
1367
+ "rule-builder-state-loaded"
1368
+ ],
1369
+ "destructive": false,
1370
+ "requiresConfirmation": false
1371
+ }
1372
+ ],
1373
+ "validators": [
1374
+ {
1375
+ "validatorId": "node-id-unique",
1376
+ "level": "error",
1377
+ "code": "VISUAL_BUILDER_NODE_ID_UNIQUE",
1378
+ "description": "Rule node ids must be unique and stable."
1379
+ },
1380
+ {
1381
+ "validatorId": "node-exists",
1382
+ "level": "error",
1383
+ "code": "VISUAL_BUILDER_NODE_EXISTS",
1384
+ "description": "Target node must exist before it is configured or removed."
1385
+ },
1386
+ {
1387
+ "validatorId": "node-type-supported",
1388
+ "level": "error",
1389
+ "code": "VISUAL_BUILDER_NODE_TYPE_SUPPORTED",
1390
+ "description": "Node type must be supported by the rule node registry and visual editor."
1391
+ },
1392
+ {
1393
+ "validatorId": "node-config-compatible",
1394
+ "level": "error",
1395
+ "code": "VISUAL_BUILDER_NODE_CONFIG_COMPATIBLE",
1396
+ "description": "Node config must match the declared node type."
1397
+ },
1398
+ {
1399
+ "validatorId": "parent-node-exists",
1400
+ "level": "error",
1401
+ "code": "VISUAL_BUILDER_PARENT_NODE_EXISTS",
1402
+ "description": "Parent node must exist when adding a child node."
1403
+ },
1404
+ {
1405
+ "validatorId": "edge-exists",
1406
+ "level": "error",
1407
+ "code": "VISUAL_BUILDER_EDGE_EXISTS",
1408
+ "description": "Target edge must exist before removal."
1409
+ },
1410
+ {
1411
+ "validatorId": "edges-reference-existing-nodes",
1412
+ "level": "error",
1413
+ "code": "VISUAL_BUILDER_EDGES_REFERENCE_NODES",
1414
+ "description": "Every edge must reference existing source and target nodes."
1415
+ },
1416
+ {
1417
+ "validatorId": "graph-valid",
1418
+ "level": "error",
1419
+ "code": "VISUAL_BUILDER_GRAPH_VALID",
1420
+ "description": "Graph structure must pass registry integrity validation."
1421
+ },
1422
+ {
1423
+ "validatorId": "graph-acyclic-where-required",
1424
+ "level": "error",
1425
+ "code": "VISUAL_BUILDER_GRAPH_ACYCLIC",
1426
+ "description": "Hierarchical rule graph edges must not introduce cycles."
1427
+ },
1428
+ {
1429
+ "validatorId": "destructive-removal-confirmed",
1430
+ "level": "error",
1431
+ "code": "VISUAL_BUILDER_DESTRUCTIVE_REMOVAL_CONFIRMED",
1432
+ "description": "Destructive node or edge removal requires explicit confirmation."
1433
+ },
1434
+ {
1435
+ "validatorId": "variable-id-unique",
1436
+ "level": "error",
1437
+ "code": "VISUAL_BUILDER_VARIABLE_ID_UNIQUE",
1438
+ "description": "Context variable name and scope must be unique."
1439
+ },
1440
+ {
1441
+ "validatorId": "variable-scope-exists",
1442
+ "level": "error",
1443
+ "code": "VISUAL_BUILDER_VARIABLE_SCOPE_EXISTS",
1444
+ "description": "Context variable scope must exist in ContextManagementService before variables are added."
1445
+ },
1446
+ {
1447
+ "validatorId": "context-variable-reference-valid",
1448
+ "level": "error",
1449
+ "code": "VISUAL_BUILDER_CONTEXT_VARIABLE_VALID",
1450
+ "description": "Contextual/template variable references must resolve to declared variables."
1451
+ },
1452
+ {
1453
+ "validatorId": "json-logic-valid",
1454
+ "level": "error",
1455
+ "code": "VISUAL_BUILDER_JSON_LOGIC_VALID",
1456
+ "description": "Conditions must be valid JSON Logic objects, not JavaScript or legacy textual DSL."
1457
+ },
1458
+ {
1459
+ "validatorId": "condition-operators-supported",
1460
+ "level": "error",
1461
+ "code": "VISUAL_BUILDER_CONDITION_OPERATORS_SUPPORTED",
1462
+ "description": "Condition operators must be supported by visual parsing and export."
1463
+ },
1464
+ {
1465
+ "validatorId": "condition-fields-known",
1466
+ "level": "error",
1467
+ "code": "VISUAL_BUILDER_CONDITION_FIELDS_KNOWN",
1468
+ "description": "Condition field references must resolve to configured field schemas; field-to-field comparisons use JSON Logic var operands."
1469
+ },
1470
+ {
1471
+ "validatorId": "effect-targets-exist",
1472
+ "level": "error",
1473
+ "code": "VISUAL_BUILDER_EFFECT_TARGETS_EXIST",
1474
+ "description": "Effect targets must exist in configured target schemas."
1475
+ },
1476
+ {
1477
+ "validatorId": "effect-properties-governed",
1478
+ "level": "error",
1479
+ "code": "VISUAL_BUILDER_EFFECT_PROPERTIES_GOVERNED",
1480
+ "description": "Effect properties must be allowed for the target type."
1481
+ },
1482
+ {
1483
+ "validatorId": "effect-values-valid",
1484
+ "level": "error",
1485
+ "code": "VISUAL_BUILDER_EFFECT_VALUES_VALID",
1486
+ "description": "Effect property values must satisfy target property schema types."
1487
+ },
1488
+ {
1489
+ "validatorId": "registry-integrity-valid",
1490
+ "level": "error",
1491
+ "code": "VISUAL_BUILDER_REGISTRY_INTEGRITY_VALID",
1492
+ "description": "RuleNodeRegistryService integrity checks must pass."
1493
+ },
1494
+ {
1495
+ "validatorId": "dsl-round-trip-stable",
1496
+ "level": "error",
1497
+ "code": "VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE",
1498
+ "description": "Serialized JSON output must import back to the same semantic visual model."
1499
+ }
1500
+ ],
1501
+ "roundTripRequirements": [
1502
+ "RuleBuilderState is the visual source of truth; JSON export must import back without semantic drift.",
1503
+ "RuleNode.id and context variable scope/name are canonical identities for their own surfaces; array indexes are not canonical identities.",
1504
+ "Edges must reference existing nodes and must not create cycles in hierarchical rule graphs.",
1505
+ "Conditions are canonical JSON Logic objects. JavaScript expressions and legacy textual DSL must not be introduced as persisted authoring payloads.",
1506
+ "Effects must be constrained by target property schemas and RULE_PROPERTY_SCHEMA so exported FormLayoutRule payloads stay deterministic.",
1507
+ "Component-specific configuration belongs to child component manifests; visual-builder owns graph, supported JSON Logic, context-variable registry and property-effect orchestration."
1508
+ ],
1509
+ "examples": [
1510
+ {
1511
+ "id": "add-field-condition",
1512
+ "request": "Add a condition that age is greater than 18.",
1513
+ "operationId": "node.add",
1514
+ "params": {
1515
+ "nodeId": "age-gt-18",
1516
+ "nodeType": "fieldCondition",
1517
+ "label": "Age over 18",
1518
+ "config": {
1519
+ "type": "fieldCondition",
1520
+ "fieldName": "age",
1521
+ "operator": "gt",
1522
+ "value": 18
1523
+ }
1524
+ },
1525
+ "isPositive": true
1526
+ },
1527
+ {
1528
+ "id": "add-property-rule",
1529
+ "request": "Add a rule that hides the spouse section.",
1530
+ "operationId": "node.add",
1531
+ "params": {
1532
+ "nodeId": "hide-spouse-section",
1533
+ "nodeType": "propertyRule",
1534
+ "config": {
1535
+ "type": "propertyRule",
1536
+ "targetType": "section",
1537
+ "targets": [
1538
+ "spouse"
1539
+ ],
1540
+ "properties": {
1541
+ "visible": false
1542
+ }
1543
+ }
1544
+ },
1545
+ "isPositive": true
1546
+ },
1547
+ {
1548
+ "id": "configure-node",
1549
+ "request": "Rename the eligibility rule and mark it expanded.",
1550
+ "operationId": "node.configure",
1551
+ "params": {
1552
+ "nodeId": "eligibility",
1553
+ "label": "Eligibility rule",
1554
+ "expanded": true
1555
+ },
1556
+ "isPositive": true
1557
+ },
1558
+ {
1559
+ "id": "connect-edge",
1560
+ "request": "Make the age condition a child of the AND group.",
1561
+ "operationId": "edge.connect",
1562
+ "params": {
1563
+ "sourceNodeId": "eligibility-and",
1564
+ "targetNodeId": "age-gt-18",
1565
+ "edgeKind": "child"
1566
+ },
1567
+ "isPositive": true
1568
+ },
1569
+ {
1570
+ "id": "remove-edge",
1571
+ "request": "Disconnect the age condition from the AND group.",
1572
+ "operationId": "edge.remove",
1573
+ "params": {
1574
+ "sourceNodeId": "eligibility-and",
1575
+ "targetNodeId": "age-gt-18",
1576
+ "edgeKind": "child"
1577
+ },
1578
+ "isPositive": true
1579
+ },
1580
+ {
1581
+ "id": "add-variable",
1582
+ "request": "Add a global variable for current tenant.",
1583
+ "operationId": "variable.add",
1584
+ "params": {
1585
+ "name": "tenantId",
1586
+ "scope": "global",
1587
+ "type": "string",
1588
+ "description": "Current tenant id"
1589
+ },
1590
+ "isPositive": true
1591
+ },
1592
+ {
1593
+ "id": "set-condition",
1594
+ "request": "Set this condition to require country equal Brazil.",
1595
+ "operationId": "condition.set",
1596
+ "params": {
1597
+ "nodeId": "country-br",
1598
+ "condition": {
1599
+ "===": [
1600
+ {
1601
+ "var": "country"
1602
+ },
1603
+ "BR"
1604
+ ]
1605
+ },
1606
+ "source": "jsonLogic"
1607
+ },
1608
+ "isPositive": true
1609
+ },
1610
+ {
1611
+ "id": "set-effect",
1612
+ "request": "Make the salary field readonly when the condition is true.",
1613
+ "operationId": "effect.set",
1614
+ "params": {
1615
+ "nodeId": "salary-readonly",
1616
+ "targetType": "field",
1617
+ "targets": [
1618
+ "salary"
1619
+ ],
1620
+ "properties": {
1621
+ "readonly": true
1622
+ }
1623
+ },
1624
+ "isPositive": true
1625
+ },
1626
+ {
1627
+ "id": "validate-round-trip",
1628
+ "request": "Validate that this graph exports and imports without drift.",
1629
+ "operationId": "dsl.roundTrip.validate",
1630
+ "params": {
1631
+ "format": "json",
1632
+ "requireStableIds": true,
1633
+ "compareMode": "semantic"
1634
+ },
1635
+ "isPositive": true
1636
+ },
1637
+ {
1638
+ "id": "reject-duplicate-node",
1639
+ "request": "Add another node with id age-gt-18.",
1640
+ "operationId": "node.add",
1641
+ "params": {
1642
+ "nodeId": "age-gt-18",
1643
+ "nodeType": "fieldCondition"
1644
+ },
1645
+ "isPositive": false
1646
+ },
1647
+ {
1648
+ "id": "reject-cycle",
1649
+ "request": "Connect a child back to its parent and create a cycle.",
1650
+ "operationId": "edge.connect",
1651
+ "params": {
1652
+ "sourceNodeId": "age-gt-18",
1653
+ "targetNodeId": "eligibility-and",
1654
+ "edgeKind": "child"
1655
+ },
1656
+ "isPositive": false
1657
+ },
1658
+ {
1659
+ "id": "reject-javascript-condition",
1660
+ "request": "Use age > 18 as a JavaScript expression.",
1661
+ "operationId": "condition.set",
1662
+ "params": {
1663
+ "nodeId": "age-gt-18",
1664
+ "condition": "age > 18"
1665
+ },
1666
+ "isPositive": false
1667
+ },
1668
+ {
1669
+ "id": "reject-unknown-effect-property",
1670
+ "request": "Set an unknown field property named sparkle.",
1671
+ "operationId": "effect.set",
1672
+ "params": {
1673
+ "nodeId": "sparkle-field",
1674
+ "targetType": "field",
1675
+ "targets": [
1676
+ "name"
1677
+ ],
1678
+ "properties": {
1679
+ "sparkle": true
1680
+ }
1681
+ },
1682
+ "isPositive": false
1683
+ },
1684
+ {
1685
+ "id": "reject-drift",
1686
+ "request": "Accept the graph even though export/import changes node meaning.",
1687
+ "operationId": "dsl.roundTrip.validate",
1688
+ "params": {
1689
+ "format": "json",
1690
+ "compareMode": "exact"
1691
+ },
1692
+ "isPositive": false
1693
+ }
1694
+ ]
1695
+ },
1696
+ "chunks": [
1697
+ {
1698
+ "chunkIndex": 0,
1699
+ "chunkKind": "summary",
1700
+ "content": "Component ID: praxis-visual-builder\nSelector: praxis-visual-builder\nFriendly Name: Praxis Visual Builder\nDescription: Visual rule builder with JSON Logic authoring and governed compatibility for legacy payloads.\nCategory: builder\nLib/Package: @praxisui/visual-builder\nTags: widget, rules, configurable\nInputs:\n - config (RuleBuilderConfig | null)\n - initialRules (any)\nOutputs:\n - rulesChanged (RuleBuilderState)\n - exportRequested (ExportOptions)\n - importRequested (ImportOptions)\n",
1701
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/praxis-visual-builder.metadata.ts",
1702
+ "contentHash": "ef015150143709e923d98f84823003dd8de5955c71eddf70cb40fa5fd26dd200",
1703
+ "sourceKind": "component_definition",
1704
+ "sourceId": "praxis-visual-builder",
1705
+ "corpusVersion": "1.0.0"
1706
+ },
1707
+ {
1708
+ "chunkIndex": 1,
1709
+ "chunkKind": "authoring_manifest",
1710
+ "content": "{\"operationId\":\"node.add\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Add visual rule node Effects: compile-domain-patch. Add a condition that age is greater than 18. Add a rule that hides the spouse section. Add another node with id age-gt-18.\",\"scope\":\"rules\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"required\":true},\"inputContract\":{\"required\":[\"nodeId\",\"nodeType\"],\"properties\":[\"nodeId\",\"nodeType\",\"label\",\"parentId\",\"config\",\"metadata\"],\"semanticTerms\":[\"nodeId\",\"nodeType\",\"label\",\"parentId\",\"config\",\"metadata\",\"fieldCondition\",\"propertyRule\",\"andGroup\",\"orGroup\",\"notGroup\",\"xorGroup\",\"impliesGroup\",\"requiredIf\",\"visibleIf\",\"disabledIf\",\"readonlyIf\",\"forEach\",\"uniqueBy\",\"minLength\",\"maxLength\",\"ifDefined\",\"ifNotNull\",\"ifExists\",\"withDefault\",\"functionCall\",\"fieldToField\",\"contextual\",\"atLeast\",\"exactly\",\"expression\",\"contextualTemplate\",\"custom\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"validators\":[{\"validatorId\":\"node-id-unique\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_ID_UNIQUE\",\"description\":\"Rule node ids must be unique and stable.\"},{\"validatorId\":\"node-type-supported\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_TYPE_SUPPORTED\",\"description\":\"Node type must be supported by the rule node registry and visual editor.\"},{\"validatorId\":\"parent-node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_PARENT_NODE_EXISTS\",\"description\":\"Parent node must exist when adding a child node.\"},{\"validatorId\":\"graph-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_VALID\",\"description\":\"Graph structure must pass registry integrity validation.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"add-field-condition\",\"request\":\"Add a condition that age is greater than 18.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"age-gt-18\",\"nodeType\":\"fieldCondition\",\"label\":\"Age over 18\",\"config\":{\"type\":\"fieldCondition\",\"fieldName\":\"age\",\"operator\":\"gt\",\"value\":18}},\"isPositive\":true},{\"id\":\"add-property-rule\",\"request\":\"Add a rule that hides the spouse section.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"hide-spouse-section\",\"nodeType\":\"propertyRule\",\"config\":{\"type\":\"propertyRule\",\"targetType\":\"section\",\"targets\":[\"spouse\"],\"properties\":{\"visible\":false}}},\"isPositive\":true}],\"negativeExamples\":[{\"id\":\"reject-duplicate-node\",\"request\":\"Add another node with id age-gt-18.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"age-gt-18\",\"nodeType\":\"fieldCondition\"},\"isPositive\":false}]}",
1711
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1712
+ "contentHash": "f257af5687de46645235b500406a5ef412d80866b3ce9ddfa5e6f192559c5314",
1713
+ "sourceKind": "component_definition",
1714
+ "sourceId": "praxis-visual-builder",
1715
+ "corpusVersion": "1.0.0"
1716
+ },
1717
+ {
1718
+ "chunkIndex": 2,
1719
+ "chunkKind": "authoring_manifest",
1720
+ "content": "{\"operationId\":\"node.remove\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Remove visual rule node Effects: compile-domain-patch.\",\"scope\":\"rules\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"required\":true},\"inputContract\":{\"required\":[\"nodeId\"],\"properties\":[\"nodeId\",\"removeDescendants\",\"preserveDisconnectedChildren\"],\"semanticTerms\":[\"nodeId\",\"removeDescendants\",\"preserveDisconnectedChildren\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"validators\":[{\"validatorId\":\"node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_EXISTS\",\"description\":\"Target node must exist before it is configured or removed.\"},{\"validatorId\":\"destructive-removal-confirmed\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DESTRUCTIVE_REMOVAL_CONFIRMED\",\"description\":\"Destructive node or edge removal requires explicit confirmation.\"},{\"validatorId\":\"edges-reference-existing-nodes\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EDGES_REFERENCE_NODES\",\"description\":\"Every edge must reference existing source and target nodes.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\",\"explicit-confirmation-provided\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[],\"negativeExamples\":[]}",
1721
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1722
+ "contentHash": "2d5323754e6a25f516dad734655bf119ea0c0bb8d25e803619734b68f390a7a4",
1723
+ "sourceKind": "component_definition",
1724
+ "sourceId": "praxis-visual-builder",
1725
+ "corpusVersion": "1.0.0"
1726
+ },
1727
+ {
1728
+ "chunkIndex": 3,
1729
+ "chunkKind": "authoring_manifest",
1730
+ "content": "{\"operationId\":\"node.configure\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Configure visual rule node Effects: compile-domain-patch. Rename the eligibility rule and mark it expanded.\",\"scope\":\"rules\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"required\":true},\"inputContract\":{\"required\":[\"nodeId\"],\"properties\":[\"nodeId\",\"label\",\"configPatch\",\"metadataPatch\",\"expanded\"],\"semanticTerms\":[\"nodeId\",\"label\",\"configPatch\",\"metadataPatch\",\"expanded\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.currentJSON\"],\"validators\":[{\"validatorId\":\"node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_EXISTS\",\"description\":\"Target node must exist before it is configured or removed.\"},{\"validatorId\":\"node-config-compatible\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_CONFIG_COMPATIBLE\",\"description\":\"Node config must match the declared node type.\"},{\"validatorId\":\"graph-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_VALID\",\"description\":\"Graph structure must pass registry integrity validation.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"configure-node\",\"request\":\"Rename the eligibility rule and mark it expanded.\",\"operationId\":\"node.configure\",\"params\":{\"nodeId\":\"eligibility\",\"label\":\"Eligibility rule\",\"expanded\":true},\"isPositive\":true}],\"negativeExamples\":[]}",
1731
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1732
+ "contentHash": "a0764d7bceb35b42a08847d824c071ab388b4ef4be6e81113f751c9d75e8fe79",
1733
+ "sourceKind": "component_definition",
1734
+ "sourceId": "praxis-visual-builder",
1735
+ "corpusVersion": "1.0.0"
1736
+ },
1737
+ {
1738
+ "chunkIndex": 4,
1739
+ "chunkKind": "authoring_manifest",
1740
+ "content": "{\"operationId\":\"edge.connect\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Connect visual graph edge Effects: compile-domain-patch. Make the age condition a child of the AND group. Connect a child back to its parent and create a cycle.\",\"scope\":\"interaction\",\"target\":{\"kind\":\"edge\",\"resolver\":\"rule-node-edge-by-source-target\",\"required\":true},\"inputContract\":{\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\",\"insertIndex\"],\"semanticTerms\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\",\"insertIndex\",\"child\",\"condition\",\"effect\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"validators\":[{\"validatorId\":\"node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_EXISTS\",\"description\":\"Target node must exist before it is configured or removed.\"},{\"validatorId\":\"edges-reference-existing-nodes\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EDGES_REFERENCE_NODES\",\"description\":\"Every edge must reference existing source and target nodes.\"},{\"validatorId\":\"graph-acyclic-where-required\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_ACYCLIC\",\"description\":\"Hierarchical rule graph edges must not introduce cycles.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"connect-edge\",\"request\":\"Make the age condition a child of the AND group.\",\"operationId\":\"edge.connect\",\"params\":{\"sourceNodeId\":\"eligibility-and\",\"targetNodeId\":\"age-gt-18\",\"edgeKind\":\"child\"},\"isPositive\":true}],\"negativeExamples\":[{\"id\":\"reject-cycle\",\"request\":\"Connect a child back to its parent and create a cycle.\",\"operationId\":\"edge.connect\",\"params\":{\"sourceNodeId\":\"age-gt-18\",\"targetNodeId\":\"eligibility-and\",\"edgeKind\":\"child\"},\"isPositive\":false}]}",
1741
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1742
+ "contentHash": "1b0fdddf70590490a741d5247a261fffdf64fef9ccccdf8a77043daf9433c6d3",
1743
+ "sourceKind": "component_definition",
1744
+ "sourceId": "praxis-visual-builder",
1745
+ "corpusVersion": "1.0.0"
1746
+ },
1747
+ {
1748
+ "chunkIndex": 5,
1749
+ "chunkKind": "authoring_manifest",
1750
+ "content": "{\"operationId\":\"edge.remove\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Remove visual graph edge Effects: compile-domain-patch. Disconnect the age condition from the AND group.\",\"scope\":\"interaction\",\"target\":{\"kind\":\"edge\",\"resolver\":\"rule-node-edge-by-source-target\",\"required\":true},\"inputContract\":{\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\",\"removeOrphanTarget\"],\"semanticTerms\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\",\"removeOrphanTarget\",\"child\",\"condition\",\"effect\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"validators\":[{\"validatorId\":\"edge-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EDGE_EXISTS\",\"description\":\"Target edge must exist before removal.\"},{\"validatorId\":\"destructive-removal-confirmed\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DESTRUCTIVE_REMOVAL_CONFIRMED\",\"description\":\"Destructive node or edge removal requires explicit confirmation.\"},{\"validatorId\":\"graph-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_VALID\",\"description\":\"Graph structure must pass registry integrity validation.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\",\"explicit-confirmation-provided\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"remove-edge\",\"request\":\"Disconnect the age condition from the AND group.\",\"operationId\":\"edge.remove\",\"params\":{\"sourceNodeId\":\"eligibility-and\",\"targetNodeId\":\"age-gt-18\",\"edgeKind\":\"child\"},\"isPositive\":true}],\"negativeExamples\":[]}",
1751
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1752
+ "contentHash": "cb05afe7353a5fbcd0e631c5a7f980fb45ea5e845a3e75b2451d665e3b57886c",
1753
+ "sourceKind": "component_definition",
1754
+ "sourceId": "praxis-visual-builder",
1755
+ "corpusVersion": "1.0.0"
1756
+ },
1757
+ {
1758
+ "chunkIndex": 6,
1759
+ "chunkKind": "authoring_manifest",
1760
+ "content": "{\"operationId\":\"variable.add\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Add context variable Effects: compile-domain-patch. Add a global variable for current tenant.\",\"scope\":\"dataBinding\",\"target\":{\"kind\":\"variable\",\"resolver\":\"context-variable-by-name-scope\",\"required\":true},\"inputContract\":{\"required\":[\"name\",\"scope\",\"type\"],\"properties\":[\"name\",\"scope\",\"type\",\"defaultValue\",\"description\"],\"semanticTerms\":[\"name\",\"scope\",\"type\",\"defaultValue\",\"description\",\"string\",\"number\",\"boolean\",\"object\",\"array\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderConfig.contextVariables\",\"ContextManagementService\"],\"validators\":[{\"validatorId\":\"variable-id-unique\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_VARIABLE_ID_UNIQUE\",\"description\":\"Context variable name and scope must be unique.\"},{\"validatorId\":\"variable-scope-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_VARIABLE_SCOPE_EXISTS\",\"description\":\"Context variable scope must exist in ContextManagementService before variables are added.\"},{\"validatorId\":\"context-variable-reference-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONTEXT_VARIABLE_VALID\",\"description\":\"Contextual/template variable references must resolve to declared variables.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-config-loaded\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"add-variable\",\"request\":\"Add a global variable for current tenant.\",\"operationId\":\"variable.add\",\"params\":{\"name\":\"tenantId\",\"scope\":\"global\",\"type\":\"string\",\"description\":\"Current tenant id\"},\"isPositive\":true}],\"negativeExamples\":[]}",
1761
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1762
+ "contentHash": "b3b0ba5eb2368c19882bd3bbc6eb71a06066c6ce4d091abdd0728c39792c6eb7",
1763
+ "sourceKind": "component_definition",
1764
+ "sourceId": "praxis-visual-builder",
1765
+ "corpusVersion": "1.0.0"
1766
+ },
1767
+ {
1768
+ "chunkIndex": 7,
1769
+ "chunkKind": "authoring_manifest",
1770
+ "content": "{\"operationId\":\"condition.set\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Set JSON Logic condition Effects: compile-domain-patch. Set this condition to require country equal Brazil. Use age > 18 as a JavaScript expression.\",\"scope\":\"rules\",\"target\":{\"kind\":\"condition\",\"resolver\":\"json-logic-condition-by-node\",\"required\":true},\"inputContract\":{\"required\":[\"nodeId\",\"condition\"],\"properties\":[\"nodeId\",\"condition\",\"mode\",\"source\"],\"semanticTerms\":[\"nodeId\",\"condition\",\"mode\",\"source\",\"replace\",\"merge\",\"visual\",\"jsonLogic\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].config.condition\",\"RuleBuilderState.currentJSON\"],\"validators\":[{\"validatorId\":\"json-logic-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_JSON_LOGIC_VALID\",\"description\":\"Conditions must be valid JSON Logic objects, not JavaScript or legacy textual DSL.\"},{\"validatorId\":\"condition-operators-supported\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONDITION_OPERATORS_SUPPORTED\",\"description\":\"Condition operators must be supported by visual parsing and export.\"},{\"validatorId\":\"condition-fields-known\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONDITION_FIELDS_KNOWN\",\"description\":\"Condition field references must resolve to configured field schemas; field-to-field comparisons use JSON Logic var operands.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\"],\"submissionImpact\":\"config-only\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"set-condition\",\"request\":\"Set this condition to require country equal Brazil.\",\"operationId\":\"condition.set\",\"params\":{\"nodeId\":\"country-br\",\"condition\":{\"===\":[{\"var\":\"country\"},\"BR\"]},\"source\":\"jsonLogic\"},\"isPositive\":true}],\"negativeExamples\":[{\"id\":\"reject-javascript-condition\",\"request\":\"Use age > 18 as a JavaScript expression.\",\"operationId\":\"condition.set\",\"params\":{\"nodeId\":\"age-gt-18\",\"condition\":\"age > 18\"},\"isPositive\":false}]}",
1771
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1772
+ "contentHash": "1f8decc57d2f3c998627954f38fa57857502014431028b8292189087c96cee96",
1773
+ "sourceKind": "component_definition",
1774
+ "sourceId": "praxis-visual-builder",
1775
+ "corpusVersion": "1.0.0"
1776
+ },
1777
+ {
1778
+ "chunkIndex": 8,
1779
+ "chunkKind": "authoring_manifest",
1780
+ "content": "{\"operationId\":\"effect.set\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Set visual property effect Effects: compile-domain-patch. Make the salary field readonly when the condition is true. Set an unknown field property named sparkle.\",\"scope\":\"rules\",\"target\":{\"kind\":\"effect\",\"resolver\":\"property-effect-by-node\",\"required\":true},\"inputContract\":{\"required\":[\"nodeId\",\"targetType\",\"targets\",\"properties\"],\"properties\":[\"nodeId\",\"targetType\",\"targets\",\"properties\",\"propertiesWhenFalse\",\"conditionNodeId\"],\"semanticTerms\":[\"nodeId\",\"targetType\",\"targets\",\"properties\",\"propertiesWhenFalse\",\"conditionNodeId\",\"field\",\"section\",\"action\",\"row\",\"column\",\"visualBlock\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].config.targetType\",\"RuleBuilderState.nodes[].config.targets\",\"RuleBuilderState.nodes[].config.properties\",\"RuleBuilderState.nodes[].config.propertiesWhenFalse\",\"RuleBuilderState.currentJSON\"],\"validators\":[{\"validatorId\":\"effect-targets-exist\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_TARGETS_EXIST\",\"description\":\"Effect targets must exist in configured target schemas.\"},{\"validatorId\":\"effect-properties-governed\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_PROPERTIES_GOVERNED\",\"description\":\"Effect properties must be allowed for the target type.\"},{\"validatorId\":\"effect-values-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_VALUES_VALID\",\"description\":\"Effect property values must satisfy target property schema types.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}],\"preconditions\":[\"rule-builder-state-loaded\",\"target-schema-loaded\"],\"submissionImpact\":\"affects-schema-backed-data\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"set-effect\",\"request\":\"Make the salary field readonly when the condition is true.\",\"operationId\":\"effect.set\",\"params\":{\"nodeId\":\"salary-readonly\",\"targetType\":\"field\",\"targets\":[\"salary\"],\"properties\":{\"readonly\":true}},\"isPositive\":true}],\"negativeExamples\":[{\"id\":\"reject-unknown-effect-property\",\"request\":\"Set an unknown field property named sparkle.\",\"operationId\":\"effect.set\",\"params\":{\"nodeId\":\"sparkle-field\",\"targetType\":\"field\",\"targets\":[\"name\"],\"properties\":{\"sparkle\":true}},\"isPositive\":false}]}",
1781
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1782
+ "contentHash": "07f08a9153e61968fc164b3d84ac152de52c622e11531c42649d60061c915ad4",
1783
+ "sourceKind": "component_definition",
1784
+ "sourceId": "praxis-visual-builder",
1785
+ "corpusVersion": "1.0.0"
1786
+ },
1787
+ {
1788
+ "chunkIndex": 9,
1789
+ "chunkKind": "authoring_manifest",
1790
+ "content": "{\"operationId\":\"dsl.roundTrip.validate\",\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operation_card\",\"semanticSummary\":\"Validate visual and DSL round trip Effects: compile-domain-patch. Validate that this graph exports and imports without drift. Accept the graph even though export/import changes node meaning.\",\"scope\":\"runtimeCoverage\",\"target\":{\"kind\":\"dslDocument\",\"resolver\":\"rule-builder-json-logic-document\",\"required\":false},\"inputContract\":{\"required\":[],\"properties\":[\"format\",\"requireStableIds\",\"compareMode\"],\"semanticTerms\":[\"format\",\"requireStableIds\",\"compareMode\",\"json\",\"semantic\",\"exact\"]},\"effects\":[\"compile-domain-patch\"],\"affectedPaths\":[\"RuleBuilderState.currentJSON\",\"RuleBuilderState.validationErrors\"],\"validators\":[{\"validatorId\":\"graph-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_VALID\",\"description\":\"Graph structure must pass registry integrity validation.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"},{\"validatorId\":\"json-logic-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_JSON_LOGIC_VALID\",\"description\":\"Conditions must be valid JSON Logic objects, not JavaScript or legacy textual DSL.\"},{\"validatorId\":\"registry-integrity-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_REGISTRY_INTEGRITY_VALID\",\"description\":\"RuleNodeRegistryService integrity checks must pass.\"}],\"preconditions\":[\"rule-builder-state-loaded\"],\"submissionImpact\":\"none\",\"presentationAffordances\":[],\"positiveExamples\":[{\"id\":\"validate-round-trip\",\"request\":\"Validate that this graph exports and imports without drift.\",\"operationId\":\"dsl.roundTrip.validate\",\"params\":{\"format\":\"json\",\"requireStableIds\":true,\"compareMode\":\"semantic\"},\"isPositive\":true}],\"negativeExamples\":[{\"id\":\"reject-drift\",\"request\":\"Accept the graph even though export/import changes node meaning.\",\"operationId\":\"dsl.roundTrip.validate\",\"params\":{\"format\":\"json\",\"compareMode\":\"exact\"},\"isPositive\":false}]}",
1791
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1792
+ "contentHash": "163bc86ff2acb24ef46af83956221adc5bee014bc7d25888ed3afbc64fec983f",
1793
+ "sourceKind": "component_definition",
1794
+ "sourceId": "praxis-visual-builder",
1795
+ "corpusVersion": "1.0.0"
1796
+ },
1797
+ {
1798
+ "chunkIndex": 10,
1799
+ "chunkKind": "authoring_manifest",
1800
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"identity\"}",
1801
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1802
+ "contentHash": "6ddf5ab584087b044ccfbd10483bd2bb0070ea919e66bd704142ca74cadd2f53",
1803
+ "sourceKind": "component_definition",
1804
+ "sourceId": "praxis-visual-builder",
1805
+ "corpusVersion": "1.0.0"
1806
+ },
1807
+ {
1808
+ "chunkIndex": 11,
1809
+ "chunkKind": "authoring_manifest",
1810
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"runtimeInputs\",\"runtimeInputs\":[{\"name\":\"mode\",\"type\":\"'rules' | 'condition'\",\"description\":\"Rendering mode. rules edits full property rules; condition edits only a JSON Logic condition expression.\"},{\"name\":\"config\",\"type\":\"RuleBuilderConfig | null\",\"description\":\"Builder configuration with field schemas, target schemas, context variables, validation and export/import settings.\"},{\"name\":\"initialRules\",\"type\":\"RuleBuilderState | FormLayoutRule[] | JsonLogicExpression | null\",\"description\":\"Initial rules loaded into the visual builder.\"},{\"name\":\"initialCondition\",\"type\":\"JsonLogicExpression | null\",\"description\":\"Initial JSON Logic expression used when mode is condition.\"},{\"name\":\"rulesChanged\",\"type\":\"RuleBuilderState\",\"description\":\"Emitted visual builder state after graph or JSON Logic changes.\"},{\"name\":\"conditionChanged\",\"type\":\"JsonLogicExpression | null\",\"description\":\"Emitted JSON Logic expression when condition-mode authoring changes.\"},{\"name\":\"exportRequested\",\"type\":\"ExportOptions\",\"description\":\"Emitted export request for JSON, TypeScript or form-config payloads.\"},{\"name\":\"importRequested\",\"type\":\"ImportOptions\",\"description\":\"Emitted import request for JSON or form-config payloads.\"}]}",
1811
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1812
+ "contentHash": "5737d3c68fc7605c1e0aa35ce532b20632018b6b3b6fd2813099e389a5143cef",
1813
+ "sourceKind": "component_definition",
1814
+ "sourceId": "praxis-visual-builder",
1815
+ "corpusVersion": "1.0.0"
1816
+ },
1817
+ {
1818
+ "chunkIndex": 12,
1819
+ "chunkKind": "authoring_manifest",
1820
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"editableTargets\",\"editableTargets\":[{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"description\":\"Visual rule graph node keyed by stable RuleNode.id.\"},{\"kind\":\"edge\",\"resolver\":\"rule-node-edge-by-source-target\",\"description\":\"Parent-child or semantic graph edge between existing rule nodes.\"},{\"kind\":\"variable\",\"resolver\":\"context-variable-by-name-scope\",\"description\":\"Context variable governed by ContextManagementService for contextual/template flows; visual field-condition references are not authorable until a canonical JSON Logic shape exists.\"},{\"kind\":\"condition\",\"resolver\":\"json-logic-condition-by-node\",\"description\":\"JSON Logic condition attached to a node or represented by condition nodes.\"},{\"kind\":\"effect\",\"resolver\":\"property-effect-by-node\",\"description\":\"Targeted property effect persisted as propertyRule/FormLayoutRule semantics.\"},{\"kind\":\"dslDocument\",\"resolver\":\"rule-builder-json-logic-document\",\"description\":\"Serialized JSON Logic/form-config document produced from the visual model.\"}]}",
1821
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1822
+ "contentHash": "4af4cadce63c82c10663a4916039afeee01547ffecfaf35dd9711eecee8d70ee",
1823
+ "sourceKind": "component_definition",
1824
+ "sourceId": "praxis-visual-builder",
1825
+ "corpusVersion": "1.0.0"
1826
+ },
1827
+ {
1828
+ "chunkIndex": 13,
1829
+ "chunkKind": "authoring_manifest",
1830
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operations\",\"operations\":[{\"operationId\":\"node.add\",\"title\":\"Add visual rule node\",\"scope\":\"rules\",\"targetKind\":\"node\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"nodeType\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"nodeType\":{\"enum\":[\"fieldCondition\",\"propertyRule\",\"andGroup\",\"orGroup\",\"notGroup\",\"xorGroup\",\"impliesGroup\",\"requiredIf\",\"visibleIf\",\"disabledIf\",\"readonlyIf\",\"forEach\",\"uniqueBy\",\"minLength\",\"maxLength\",\"ifDefined\",\"ifNotNull\",\"ifExists\",\"withDefault\",\"functionCall\",\"fieldToField\",\"contextual\",\"atLeast\",\"exactly\",\"expression\",\"contextualTemplate\",\"custom\"]},\"label\":{\"type\":\"string\"},\"parentId\":{\"type\":\"string\"},\"config\":{\"type\":\"object\"},\"metadata\":{\"type\":\"object\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-node-add\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\",\"RuleBuilderService.addNode\"],\"writes\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"identityKeys\":[\"nodeId\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"nodeType\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"nodeType\":{\"enum\":[\"fieldCondition\",\"propertyRule\",\"andGroup\",\"orGroup\",\"notGroup\",\"xorGroup\",\"impliesGroup\",\"requiredIf\",\"visibleIf\",\"disabledIf\",\"readonlyIf\",\"forEach\",\"uniqueBy\",\"minLength\",\"maxLength\",\"ifDefined\",\"ifNotNull\",\"ifExists\",\"withDefault\",\"functionCall\",\"fieldToField\",\"contextual\",\"atLeast\",\"exactly\",\"expression\",\"contextualTemplate\",\"custom\"]},\"label\":{\"type\":\"string\"},\"parentId\":{\"type\":\"string\"},\"config\":{\"type\":\"object\"},\"metadata\":{\"type\":\"object\"}}},\"failureModes\":[\"duplicate-node-id\",\"unsupported-node-type\",\"parent-node-not-found\",\"graph-cycle-created\"],\"description\":\"Adds a rule node by stable id and validates graph integrity before the state can be serialized.\"}}],\"validators\":[\"node-id-unique\",\"node-type-supported\",\"parent-node-exists\",\"graph-valid\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\"],\"destructive\":false,\"requiresConfirmation\":false},{\"operationId\":\"node.remove\",\"title\":\"Remove visual rule node\",\"scope\":\"rules\",\"targetKind\":\"node\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"removeDescendants\":{\"type\":\"boolean\"},\"preserveDisconnectedChildren\":{\"type\":\"boolean\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-node-remove\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\",\"RuleBuilderService.removeNode\"],\"writes\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"identityKeys\":[\"nodeId\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"removeDescendants\":{\"type\":\"boolean\"},\"preserveDisconnectedChildren\":{\"type\":\"boolean\"}}},\"failureModes\":[\"node-not-found\",\"destructive-removal-not-confirmed\",\"orphaned-edge-created\",\"dsl-round-trip-failed\"],\"description\":\"Removes a node and governed descendants by id, requiring confirmation because conditions/effects can be lost.\"}}],\"destructive\":true,\"requiresConfirmation\":true,\"validators\":[\"node-exists\",\"destructive-removal-confirmed\",\"edges-reference-existing-nodes\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.rootNodes\",\"RuleNodeRegistryService\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\",\"explicit-confirmation-provided\"]},{\"operationId\":\"node.configure\",\"title\":\"Configure visual rule node\",\"scope\":\"rules\",\"targetKind\":\"node\",\"target\":{\"kind\":\"node\",\"resolver\":\"rule-node-by-id\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"label\":{\"type\":\"string\"},\"configPatch\":{\"type\":\"object\"},\"metadataPatch\":{\"type\":\"object\"},\"expanded\":{\"type\":\"boolean\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-node-configure\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleBuilderService.updateNode\",\"RuleNodeRegistryService\"],\"writes\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.currentJSON\"],\"identityKeys\":[\"nodeId\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"label\":{\"type\":\"string\"},\"configPatch\":{\"type\":\"object\"},\"metadataPatch\":{\"type\":\"object\"},\"expanded\":{\"type\":\"boolean\"}}},\"failureModes\":[\"node-not-found\",\"config-shape-invalid\",\"node-type-config-mismatch\",\"dsl-round-trip-failed\"],\"description\":\"Applies a typed patch to a rule node while preserving node identity and JSON Logic serialization.\"}}],\"validators\":[\"node-exists\",\"node-config-compatible\",\"graph-valid\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes\",\"RuleBuilderState.currentJSON\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\"],\"destructive\":false,\"requiresConfirmation\":false},{\"operationId\":\"edge.connect\",\"title\":\"Connect visual graph edge\",\"scope\":\"interaction\",\"targetKind\":\"edge\",\"target\":{\"kind\":\"edge\",\"resolver\":\"rule-node-edge-by-source-target\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":{\"sourceNodeId\":{\"type\":\"string\"},\"targetNodeId\":{\"type\":\"string\"},\"edgeKind\":{\"enum\":[\"child\",\"condition\",\"effect\"]},\"insertIndex\":{\"type\":\"number\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-edge-connect\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleNodeRegistryService.validateIntegrity\"],\"writes\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"identityKeys\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":{\"sourceNodeId\":{\"type\":\"string\"},\"targetNodeId\":{\"type\":\"string\"},\"edgeKind\":{\"enum\":[\"child\",\"condition\",\"effect\"]},\"insertIndex\":{\"type\":\"number\"}}},\"failureModes\":[\"source-node-not-found\",\"target-node-not-found\",\"duplicate-edge\",\"graph-cycle-created\"],\"description\":\"Connects two existing nodes and rejects edges that break registry integrity or acyclic graph requirements.\"}}],\"validators\":[\"node-exists\",\"edges-reference-existing-nodes\",\"graph-acyclic-where-required\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\"],\"destructive\":false,\"requiresConfirmation\":false}]}",
1831
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1832
+ "contentHash": "66a94e8ba43262e606d4f2b77704332bbf82010735a3ed60df467b4a910a5593",
1833
+ "sourceKind": "component_definition",
1834
+ "sourceId": "praxis-visual-builder",
1835
+ "corpusVersion": "1.0.0"
1836
+ },
1837
+ {
1838
+ "chunkIndex": 14,
1839
+ "chunkKind": "authoring_manifest",
1840
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operations\",\"operations\":[{\"operationId\":\"edge.remove\",\"title\":\"Remove visual graph edge\",\"scope\":\"interaction\",\"targetKind\":\"edge\",\"target\":{\"kind\":\"edge\",\"resolver\":\"rule-node-edge-by-source-target\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":{\"sourceNodeId\":{\"type\":\"string\"},\"targetNodeId\":{\"type\":\"string\"},\"edgeKind\":{\"enum\":[\"child\",\"condition\",\"effect\"]},\"removeOrphanTarget\":{\"type\":\"boolean\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-edge-remove\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleNodeRegistryService.validateIntegrity\"],\"writes\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"identityKeys\":[\"sourceNodeId\",\"targetNodeId\",\"edgeKind\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"sourceNodeId\",\"targetNodeId\"],\"properties\":{\"sourceNodeId\":{\"type\":\"string\"},\"targetNodeId\":{\"type\":\"string\"},\"edgeKind\":{\"enum\":[\"child\",\"condition\",\"effect\"]},\"removeOrphanTarget\":{\"type\":\"boolean\"}}},\"failureModes\":[\"edge-not-found\",\"destructive-removal-not-confirmed\",\"orphaned-node-created\",\"dsl-round-trip-failed\"],\"description\":\"Removes a graph edge by source and target ids with confirmation when the target can become orphaned.\"}}],\"destructive\":true,\"requiresConfirmation\":true,\"validators\":[\"edge-exists\",\"destructive-removal-confirmed\",\"graph-valid\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].children\",\"RuleBuilderState.nodes[].parentId\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\",\"explicit-confirmation-provided\"]},{\"operationId\":\"variable.add\",\"title\":\"Add context variable\",\"scope\":\"dataBinding\",\"targetKind\":\"variable\",\"target\":{\"kind\":\"variable\",\"resolver\":\"context-variable-by-name-scope\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"name\",\"scope\",\"type\"],\"properties\":{\"name\":{\"type\":\"string\"},\"scope\":{\"type\":\"string\"},\"type\":{\"enum\":[\"string\",\"number\",\"boolean\",\"object\",\"array\"]},\"defaultValue\":{},\"description\":{\"type\":\"string\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-variable-add\",\"handlerContract\":{\"reads\":[\"RuleBuilderConfig.contextVariables\",\"ContextManagementService\"],\"writes\":[\"RuleBuilderConfig.contextVariables\",\"ContextManagementService\"],\"identityKeys\":[\"scope\",\"name\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"name\",\"scope\",\"type\"],\"properties\":{\"name\":{\"type\":\"string\"},\"scope\":{\"type\":\"string\"},\"type\":{\"enum\":[\"string\",\"number\",\"boolean\",\"object\",\"array\"]},\"defaultValue\":{},\"description\":{\"type\":\"string\"}}},\"failureModes\":[\"duplicate-variable\",\"scope-not-found\",\"variable-type-invalid\",\"context-token-conflict\"],\"description\":\"Adds a governed context variable to ContextManagementService for contextual/template flows. Field-condition references stay unsupported until a canonical JSON Logic shape exists.\"}}],\"validators\":[\"variable-id-unique\",\"variable-scope-exists\",\"context-variable-reference-valid\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderConfig.contextVariables\",\"ContextManagementService\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-config-loaded\"],\"destructive\":false,\"requiresConfirmation\":false},{\"operationId\":\"condition.set\",\"title\":\"Set JSON Logic condition\",\"scope\":\"rules\",\"targetKind\":\"condition\",\"target\":{\"kind\":\"condition\",\"resolver\":\"json-logic-condition-by-node\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"condition\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"condition\":{\"type\":\"object\"},\"mode\":{\"enum\":[\"replace\",\"merge\"]},\"source\":{\"enum\":[\"visual\",\"jsonLogic\"]}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-condition-set\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleBuilderService.loadFromConditionExpression\",\"RuleBuilderService.buildConditionExpressionFromGraph\"],\"writes\":[\"RuleBuilderState.nodes[].config.condition\",\"RuleBuilderState.currentJSON\"],\"identityKeys\":[\"nodeId\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"condition\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"condition\":{\"type\":\"object\"},\"mode\":{\"enum\":[\"replace\",\"merge\"]},\"source\":{\"enum\":[\"visual\",\"jsonLogic\"]}}},\"failureModes\":[\"node-not-found\",\"json-logic-invalid\",\"unsupported-operator\",\"visual-parse-failed\",\"dsl-round-trip-failed\"],\"description\":\"Sets a canonical JSON Logic condition within the runtime-supported visual subset and proves it can parse back into the visual graph.\"}}],\"validators\":[\"json-logic-valid\",\"condition-operators-supported\",\"condition-fields-known\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].config.condition\",\"RuleBuilderState.currentJSON\"],\"submissionImpact\":\"config-only\",\"preconditions\":[\"rule-builder-state-loaded\"],\"destructive\":false,\"requiresConfirmation\":false},{\"operationId\":\"effect.set\",\"title\":\"Set visual property effect\",\"scope\":\"rules\",\"targetKind\":\"effect\",\"target\":{\"kind\":\"effect\",\"resolver\":\"property-effect-by-node\",\"ambiguityPolicy\":\"fail\",\"required\":true},\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"targetType\",\"targets\",\"properties\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"targetType\":{\"enum\":[\"field\",\"section\",\"action\",\"row\",\"column\",\"visualBlock\"]},\"targets\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"properties\":{\"type\":\"object\"},\"propertiesWhenFalse\":{\"type\":\"object\"},\"conditionNodeId\":{\"type\":\"string\"}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-effect-set\",\"handlerContract\":{\"reads\":[\"RuleBuilderState.nodes\",\"RuleBuilderConfig.targetPropertySchemas\",\"RULE_PROPERTY_SCHEMA\",\"RuleBuilderService.export\"],\"writes\":[\"RuleBuilderState.nodes[].config.targetType\",\"RuleBuilderState.nodes[].config.targets\",\"RuleBuilderState.nodes[].config.properties\",\"RuleBuilderState.nodes[].config.propertiesWhenFalse\",\"RuleBuilderState.currentJSON\"],\"identityKeys\":[\"nodeId\",\"targetType\",\"targets\"],\"inputSchema\":{\"type\":\"object\",\"required\":[\"nodeId\",\"targetType\",\"targets\",\"properties\"],\"properties\":{\"nodeId\":{\"type\":\"string\"},\"targetType\":{\"enum\":[\"field\",\"section\",\"action\",\"row\",\"column\",\"visualBlock\"]},\"targets\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"properties\":{\"type\":\"object\"},\"propertiesWhenFalse\":{\"type\":\"object\"},\"conditionNodeId\":{\"type\":\"string\"}}},\"failureModes\":[\"node-not-found\",\"target-not-found\",\"property-not-allowed-for-target\",\"effect-value-invalid\",\"dsl-round-trip-failed\"],\"description\":\"Sets a property effect using governed target property schemas so export to FormLayoutRule remains deterministic.\"}}],\"validators\":[\"effect-targets-exist\",\"effect-properties-governed\",\"effect-values-valid\",\"dsl-round-trip-stable\"],\"affectedPaths\":[\"RuleBuilderState.nodes[].config.targetType\",\"RuleBuilderState.nodes[].config.targets\",\"RuleBuilderState.nodes[].config.properties\",\"RuleBuilderState.nodes[].config.propertiesWhenFalse\",\"RuleBuilderState.currentJSON\"],\"submissionImpact\":\"affects-schema-backed-data\",\"preconditions\":[\"rule-builder-state-loaded\",\"target-schema-loaded\"],\"destructive\":false,\"requiresConfirmation\":false}]}",
1841
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1842
+ "contentHash": "78a538a7955dcc016a50169b132097c00532de85ba8df331b101e9996a425f49",
1843
+ "sourceKind": "component_definition",
1844
+ "sourceId": "praxis-visual-builder",
1845
+ "corpusVersion": "1.0.0"
1846
+ },
1847
+ {
1848
+ "chunkIndex": 15,
1849
+ "chunkKind": "authoring_manifest",
1850
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"operations\",\"operations\":[{\"operationId\":\"dsl.roundTrip.validate\",\"title\":\"Validate visual and DSL round trip\",\"scope\":\"runtimeCoverage\",\"targetKind\":\"dslDocument\",\"target\":{\"kind\":\"dslDocument\",\"resolver\":\"rule-builder-json-logic-document\",\"ambiguityPolicy\":\"fail\",\"required\":false},\"inputSchema\":{\"type\":\"object\",\"properties\":{\"format\":{\"enum\":[\"json\"]},\"requireStableIds\":{\"type\":\"boolean\"},\"compareMode\":{\"enum\":[\"semantic\",\"exact\"]}}},\"effects\":[{\"kind\":\"compile-domain-patch\",\"handler\":\"visual-builder-dsl-round-trip-validate\",\"handlerContract\":{\"reads\":[\"RuleBuilderState\",\"RuleBuilderService.export\",\"RuleBuilderService.import\",\"RuleBuilderService.buildConditionExpressionFromGraph\",\"RuleNodeRegistryService.validateIntegrity\"],\"writes\":[\"RuleBuilderState.validationErrors\",\"RuleBuilderState.currentJSON\"],\"identityKeys\":[\"format\",\"compareMode\"],\"inputSchema\":{\"type\":\"object\",\"properties\":{\"format\":{\"enum\":[\"json\"]},\"requireStableIds\":{\"type\":\"boolean\"},\"compareMode\":{\"enum\":[\"semantic\",\"exact\"]}}},\"failureModes\":[\"graph-invalid\",\"export-failed\",\"import-failed\",\"semantic-drift\",\"unstable-node-identity\"],\"description\":\"Exports the visual model to JSON, imports it back and rejects semantic drift or unstable identity.\"}}],\"validators\":[\"graph-valid\",\"dsl-round-trip-stable\",\"json-logic-valid\",\"registry-integrity-valid\"],\"affectedPaths\":[\"RuleBuilderState.currentJSON\",\"RuleBuilderState.validationErrors\"],\"submissionImpact\":\"none\",\"preconditions\":[\"rule-builder-state-loaded\"],\"destructive\":false,\"requiresConfirmation\":false}]}",
1851
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1852
+ "contentHash": "71cd3d63cf19a159d2134328ab96facb09606573d567d0540dc3644c7afb0fc7",
1853
+ "sourceKind": "component_definition",
1854
+ "sourceId": "praxis-visual-builder",
1855
+ "corpusVersion": "1.0.0"
1856
+ },
1857
+ {
1858
+ "chunkIndex": 16,
1859
+ "chunkKind": "authoring_manifest",
1860
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"validators\",\"validators\":[{\"validatorId\":\"node-id-unique\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_ID_UNIQUE\",\"description\":\"Rule node ids must be unique and stable.\"},{\"validatorId\":\"node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_EXISTS\",\"description\":\"Target node must exist before it is configured or removed.\"},{\"validatorId\":\"node-type-supported\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_TYPE_SUPPORTED\",\"description\":\"Node type must be supported by the rule node registry and visual editor.\"},{\"validatorId\":\"node-config-compatible\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_NODE_CONFIG_COMPATIBLE\",\"description\":\"Node config must match the declared node type.\"},{\"validatorId\":\"parent-node-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_PARENT_NODE_EXISTS\",\"description\":\"Parent node must exist when adding a child node.\"},{\"validatorId\":\"edge-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EDGE_EXISTS\",\"description\":\"Target edge must exist before removal.\"},{\"validatorId\":\"edges-reference-existing-nodes\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EDGES_REFERENCE_NODES\",\"description\":\"Every edge must reference existing source and target nodes.\"},{\"validatorId\":\"graph-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_VALID\",\"description\":\"Graph structure must pass registry integrity validation.\"},{\"validatorId\":\"graph-acyclic-where-required\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_GRAPH_ACYCLIC\",\"description\":\"Hierarchical rule graph edges must not introduce cycles.\"},{\"validatorId\":\"destructive-removal-confirmed\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DESTRUCTIVE_REMOVAL_CONFIRMED\",\"description\":\"Destructive node or edge removal requires explicit confirmation.\"},{\"validatorId\":\"variable-id-unique\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_VARIABLE_ID_UNIQUE\",\"description\":\"Context variable name and scope must be unique.\"},{\"validatorId\":\"variable-scope-exists\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_VARIABLE_SCOPE_EXISTS\",\"description\":\"Context variable scope must exist in ContextManagementService before variables are added.\"},{\"validatorId\":\"context-variable-reference-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONTEXT_VARIABLE_VALID\",\"description\":\"Contextual/template variable references must resolve to declared variables.\"},{\"validatorId\":\"json-logic-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_JSON_LOGIC_VALID\",\"description\":\"Conditions must be valid JSON Logic objects, not JavaScript or legacy textual DSL.\"},{\"validatorId\":\"condition-operators-supported\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONDITION_OPERATORS_SUPPORTED\",\"description\":\"Condition operators must be supported by visual parsing and export.\"},{\"validatorId\":\"condition-fields-known\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_CONDITION_FIELDS_KNOWN\",\"description\":\"Condition field references must resolve to configured field schemas; field-to-field comparisons use JSON Logic var operands.\"},{\"validatorId\":\"effect-targets-exist\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_TARGETS_EXIST\",\"description\":\"Effect targets must exist in configured target schemas.\"},{\"validatorId\":\"effect-properties-governed\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_PROPERTIES_GOVERNED\",\"description\":\"Effect properties must be allowed for the target type.\"},{\"validatorId\":\"effect-values-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_EFFECT_VALUES_VALID\",\"description\":\"Effect property values must satisfy target property schema types.\"},{\"validatorId\":\"registry-integrity-valid\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_REGISTRY_INTEGRITY_VALID\",\"description\":\"RuleNodeRegistryService integrity checks must pass.\"},{\"validatorId\":\"dsl-round-trip-stable\",\"level\":\"error\",\"code\":\"VISUAL_BUILDER_DSL_ROUND_TRIP_STABLE\",\"description\":\"Serialized JSON output must import back to the same semantic visual model.\"}]}",
1861
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1862
+ "contentHash": "549d21516ec00a57c1dc7b077c46419edeb95496b6c1c82a7ae76e3ad3745a3b",
1863
+ "sourceKind": "component_definition",
1864
+ "sourceId": "praxis-visual-builder",
1865
+ "corpusVersion": "1.0.0"
1866
+ },
1867
+ {
1868
+ "chunkIndex": 17,
1869
+ "chunkKind": "authoring_manifest",
1870
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"roundTripRequirements\",\"roundTripRequirements\":[\"RuleBuilderState is the visual source of truth; JSON export must import back without semantic drift.\",\"RuleNode.id and context variable scope/name are canonical identities for their own surfaces; array indexes are not canonical identities.\",\"Edges must reference existing nodes and must not create cycles in hierarchical rule graphs.\",\"Conditions are canonical JSON Logic objects. JavaScript expressions and legacy textual DSL must not be introduced as persisted authoring payloads.\",\"Effects must be constrained by target property schemas and RULE_PROPERTY_SCHEMA so exported FormLayoutRule payloads stay deterministic.\",\"Component-specific configuration belongs to child component manifests; visual-builder owns graph, supported JSON Logic, context-variable registry and property-effect orchestration.\"]}",
1871
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1872
+ "contentHash": "a78305c81fa0e11bb3974f3e6e19959f99707cb721a394abf21e8f00f650dc48",
1873
+ "sourceKind": "component_definition",
1874
+ "sourceId": "praxis-visual-builder",
1875
+ "corpusVersion": "1.0.0"
1876
+ },
1877
+ {
1878
+ "chunkIndex": 18,
1879
+ "chunkKind": "authoring_manifest",
1880
+ "content": "{\"schemaVersion\":\"1.0.0\",\"manifestVersion\":\"1.0.0\",\"componentId\":\"praxis-visual-builder\",\"ownerPackage\":\"@praxisui/visual-builder\",\"configSchemaId\":\"RuleBuilderState\",\"chunkSection\":\"examples\",\"examples\":[{\"id\":\"add-field-condition\",\"request\":\"Add a condition that age is greater than 18.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"age-gt-18\",\"nodeType\":\"fieldCondition\",\"label\":\"Age over 18\",\"config\":{\"type\":\"fieldCondition\",\"fieldName\":\"age\",\"operator\":\"gt\",\"value\":18}},\"isPositive\":true},{\"id\":\"add-property-rule\",\"request\":\"Add a rule that hides the spouse section.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"hide-spouse-section\",\"nodeType\":\"propertyRule\",\"config\":{\"type\":\"propertyRule\",\"targetType\":\"section\",\"targets\":[\"spouse\"],\"properties\":{\"visible\":false}}},\"isPositive\":true},{\"id\":\"configure-node\",\"request\":\"Rename the eligibility rule and mark it expanded.\",\"operationId\":\"node.configure\",\"params\":{\"nodeId\":\"eligibility\",\"label\":\"Eligibility rule\",\"expanded\":true},\"isPositive\":true},{\"id\":\"connect-edge\",\"request\":\"Make the age condition a child of the AND group.\",\"operationId\":\"edge.connect\",\"params\":{\"sourceNodeId\":\"eligibility-and\",\"targetNodeId\":\"age-gt-18\",\"edgeKind\":\"child\"},\"isPositive\":true},{\"id\":\"remove-edge\",\"request\":\"Disconnect the age condition from the AND group.\",\"operationId\":\"edge.remove\",\"params\":{\"sourceNodeId\":\"eligibility-and\",\"targetNodeId\":\"age-gt-18\",\"edgeKind\":\"child\"},\"isPositive\":true},{\"id\":\"add-variable\",\"request\":\"Add a global variable for current tenant.\",\"operationId\":\"variable.add\",\"params\":{\"name\":\"tenantId\",\"scope\":\"global\",\"type\":\"string\",\"description\":\"Current tenant id\"},\"isPositive\":true},{\"id\":\"set-condition\",\"request\":\"Set this condition to require country equal Brazil.\",\"operationId\":\"condition.set\",\"params\":{\"nodeId\":\"country-br\",\"condition\":{\"===\":[{\"var\":\"country\"},\"BR\"]},\"source\":\"jsonLogic\"},\"isPositive\":true},{\"id\":\"set-effect\",\"request\":\"Make the salary field readonly when the condition is true.\",\"operationId\":\"effect.set\",\"params\":{\"nodeId\":\"salary-readonly\",\"targetType\":\"field\",\"targets\":[\"salary\"],\"properties\":{\"readonly\":true}},\"isPositive\":true},{\"id\":\"validate-round-trip\",\"request\":\"Validate that this graph exports and imports without drift.\",\"operationId\":\"dsl.roundTrip.validate\",\"params\":{\"format\":\"json\",\"requireStableIds\":true,\"compareMode\":\"semantic\"},\"isPositive\":true},{\"id\":\"reject-duplicate-node\",\"request\":\"Add another node with id age-gt-18.\",\"operationId\":\"node.add\",\"params\":{\"nodeId\":\"age-gt-18\",\"nodeType\":\"fieldCondition\"},\"isPositive\":false},{\"id\":\"reject-cycle\",\"request\":\"Connect a child back to its parent and create a cycle.\",\"operationId\":\"edge.connect\",\"params\":{\"sourceNodeId\":\"age-gt-18\",\"targetNodeId\":\"eligibility-and\",\"edgeKind\":\"child\"},\"isPositive\":false},{\"id\":\"reject-javascript-condition\",\"request\":\"Use age > 18 as a JavaScript expression.\",\"operationId\":\"condition.set\",\"params\":{\"nodeId\":\"age-gt-18\",\"condition\":\"age > 18\"},\"isPositive\":false},{\"id\":\"reject-unknown-effect-property\",\"request\":\"Set an unknown field property named sparkle.\",\"operationId\":\"effect.set\",\"params\":{\"nodeId\":\"sparkle-field\",\"targetType\":\"field\",\"targets\":[\"name\"],\"properties\":{\"sparkle\":true}},\"isPositive\":false},{\"id\":\"reject-drift\",\"request\":\"Accept the graph even though export/import changes node meaning.\",\"operationId\":\"dsl.roundTrip.validate\",\"params\":{\"format\":\"json\",\"compareMode\":\"exact\"},\"isPositive\":false}]}",
1881
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/praxis-visual-builder-authoring-manifest.ts",
1882
+ "contentHash": "6a46ac03988d851f8f0fd47b20fc4cf158d74c6c5ba9fd1ebb685f60fccd1ecd",
1883
+ "sourceKind": "component_definition",
1884
+ "sourceId": "praxis-visual-builder",
1885
+ "corpusVersion": "1.0.0"
1886
+ },
1887
+ {
1888
+ "chunkIndex": 19,
1889
+ "chunkKind": "context_pack",
1890
+ "content": "{\"componentContext\":{\"version\":\"v1\",\"optionsByPath\":{\"ui.theme\":{\"mode\":\"enum\",\"options\":[{\"value\":\"light\",\"label\":\"Light\"},{\"value\":\"dark\",\"label\":\"Dark\"},{\"value\":\"auto\",\"label\":\"Auto\"}]},\"validation.strictness\":{\"mode\":\"enum\",\"options\":[{\"value\":\"strict\",\"label\":\"Strict\"},{\"value\":\"normal\",\"label\":\"Normal\"},{\"value\":\"loose\",\"label\":\"Loose\"}]},\"exportImport.defaultExportFormat\":{\"mode\":\"enum\",\"options\":[{\"value\":\"json\",\"label\":\"JSON\"},{\"value\":\"typescript\",\"label\":\"TypeScript\"}]}},\"actionCatalog\":[{\"id\":\"ui.theme.set\",\"intentExamples\":[\"theme\",\"light\",\"dark\",\"auto theme\"],\"patchTemplate\":{\"ui\":{\"theme\":\"{{value}}\"}}},{\"id\":\"ui.showInlineErrors.enable\",\"intentExamples\":[\"inline errors\",\"show errors\"],\"patchTemplate\":{\"ui\":{\"showInlineErrors\":true}}},{\"id\":\"ui.showInlineErrors.disable\",\"intentExamples\":[\"hide errors\",\"no inline errors\"],\"patchTemplate\":{\"ui\":{\"showInlineErrors\":false}}},{\"id\":\"ui.autoSaveInterval.set\",\"intentExamples\":[\"autosave\",\"auto save\",\"save interval\"],\"patchTemplate\":{\"ui\":{\"autoSaveInterval\":\"{{value}}\"}}},{\"id\":\"validation.realTime.enable\",\"intentExamples\":[\"real-time validation\",\"live validation\"],\"patchTemplate\":{\"validation\":{\"realTime\":true}}},{\"id\":\"validation.realTime.disable\",\"intentExamples\":[\"disable validation\",\"no live validation\"],\"patchTemplate\":{\"validation\":{\"realTime\":false}}},{\"id\":\"validation.strictness.set\",\"intentExamples\":[\"strictness\",\"validation level\"],\"patchTemplate\":{\"validation\":{\"strictness\":\"{{value}}\"}}},{\"id\":\"exportImport.defaultExportFormat.set\",\"intentExamples\":[\"export format\",\"default export\",\"json logic export\"],\"patchTemplate\":{\"exportImport\":{\"defaultExportFormat\":\"{{value}}\"}}},{\"id\":\"template.add\",\"intentExamples\":[\"add template\",\"new template\",\"create template\"],\"patchTemplate\":{\"templates\":[{\"id\":\"{{target}}\",\"name\":\"{{value}}\",\"description\":\"{{params.description}}\",\"category\":\"{{params.category}}\",\"tags\":[\"{{params.tag}}\"],\"nodes\":[],\"rootNodes\":[]}]}}],\"fieldResolvers\":{\"templates[]\":[\"id\",\"name\"]},\"hints\":[\"Use templates[].id as merge key; avoid array indexes.\",\"Rule graph and node structures are complex; prefer editing via templates or UI config toggles.\"]}}",
1891
+ "sourcePointer": "projects/praxis-visual-builder/src/lib/ai/visual-builder-context-pack.ts",
1892
+ "contentHash": "83cf2aba304f724a73982e1a31d9afe6e95e91d6d80bb9352bf503acd0028377",
1893
+ "sourceKind": "component_definition",
1894
+ "sourceId": "praxis-visual-builder",
1895
+ "corpusVersion": "1.0.0"
1896
+ },
1897
+ {
1898
+ "chunkIndex": 20,
1899
+ "chunkKind": "recipe",
1900
+ "content": "{\"_comment\":\"Receita para o Visual Builder de Regras (DSL/Flow).\",\"templateMeta\":{\"registryKey\":\"praxis-visual-builder\",\"variantId\":\"base\",\"useWhen\":\"Base visual rule builder configuration.\",\"examplePrompts\":[\"create a visual rule builder flow\",\"add nodes and connections in the rule graph\"]},\"config\":{\"ruleGraph\":{\"nodes\":[{\"id\":\"node-1\",\"type\":\"trigger\",\"label\":\"Quando Pedido Criado\",\"x\":100,\"y\":100},{\"id\":\"node-2\",\"type\":\"condition\",\"label\":\"Valor > 1000\",\"expression\":\"amount > 1000\",\"x\":300,\"y\":100},{\"id\":\"node-3\",\"type\":\"action\",\"label\":\"Aprovar Automaticamente\",\"action\":\"approve\",\"x\":500,\"y\":50},{\"id\":\"node-4\",\"type\":\"action\",\"label\":\"Solicitar Aprovação\",\"action\":\"request_approval\",\"x\":500,\"y\":150}],\"edges\":[{\"from\":\"node-1\",\"to\":\"node-2\"},{\"from\":\"node-2\",\"to\":\"node-3\",\"label\":\"Sim\"},{\"from\":\"node-2\",\"to\":\"node-4\",\"label\":\"Não\"}]},\"palette\":[{\"type\":\"condition\",\"icon\":\"help\",\"label\":\"Condição\"},{\"type\":\"action\",\"icon\":\"play_arrow\",\"label\":\"Ação\"}],\"context\":{\"variables\":[{\"name\":\"amount\",\"type\":\"number\"},{\"name\":\"customerType\",\"type\":\"string\"}]},\"validation\":{\"rules\":[\"no-orphans\",\"valid-expressions\"]},\"preview\":{\"enabled\":true,\"sampleData\":{\"amount\":1500,\"customerType\":\"VIP\"}}}}",
1901
+ "sourcePointer": "examples/ai-recipes/praxis-visual-rule-builder.json",
1902
+ "contentHash": "c45cf95f068659e923a11db51892e87f0b6c06d9a6bc1085bff83e18fa86b4a3",
1903
+ "sourceKind": "component_definition",
1904
+ "sourceId": "praxis-visual-builder",
1905
+ "corpusVersion": "1.0.0"
1906
+ }
1907
+ ]
1908
+ }
1909
+ },
1910
+ "note": "Package-scoped Praxis component registry for source-free agent discovery. Use the canonical ingestion registry for cross-package aggregate analysis."
1911
+ }