expressir 2.1.30 → 2.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docs.yml +98 -0
  3. data/.github/workflows/links.yml +100 -0
  4. data/.github/workflows/rake.yml +4 -0
  5. data/.github/workflows/release.yml +5 -0
  6. data/.github/workflows/validate_schemas.yml +1 -1
  7. data/.gitignore +3 -0
  8. data/.rubocop.yml +1 -1
  9. data/.rubocop_todo.yml +244 -39
  10. data/Gemfile +2 -1
  11. data/README.adoc +621 -54
  12. data/docs/Gemfile +12 -0
  13. data/docs/_config.yml +141 -0
  14. data/docs/_guides/changes/changes-format.adoc +778 -0
  15. data/docs/_guides/changes/importing-eengine.adoc +898 -0
  16. data/docs/_guides/changes/index.adoc +396 -0
  17. data/docs/_guides/changes/programmatic-usage.adoc +1038 -0
  18. data/docs/_guides/changes/validating-changes.adoc +681 -0
  19. data/docs/_guides/cli/benchmark-performance.adoc +834 -0
  20. data/docs/_guides/cli/coverage-analysis.adoc +921 -0
  21. data/docs/_guides/cli/format-schemas.adoc +547 -0
  22. data/docs/_guides/cli/index.adoc +8 -0
  23. data/docs/_guides/cli/managing-changes.adoc +927 -0
  24. data/docs/_guides/cli/validate-ascii.adoc +645 -0
  25. data/docs/_guides/cli/validate-schemas.adoc +534 -0
  26. data/docs/_guides/index.adoc +165 -0
  27. data/docs/_guides/ler/creating-packages.adoc +664 -0
  28. data/docs/_guides/ler/index.adoc +305 -0
  29. data/docs/_guides/ler/loading-packages.adoc +707 -0
  30. data/docs/_guides/ler/package-formats.adoc +748 -0
  31. data/docs/_guides/ler/querying-packages.adoc +826 -0
  32. data/docs/_guides/ler/validating-packages.adoc +750 -0
  33. data/docs/_guides/liquid/basic-templates.adoc +813 -0
  34. data/docs/_guides/liquid/documentation-generation.adoc +1042 -0
  35. data/docs/_guides/liquid/drops-reference.adoc +829 -0
  36. data/docs/_guides/liquid/filters-and-tags.adoc +912 -0
  37. data/docs/_guides/liquid/index.adoc +468 -0
  38. data/docs/_guides/manifests/creating-manifests.adoc +483 -0
  39. data/docs/_guides/manifests/index.adoc +307 -0
  40. data/docs/_guides/manifests/resolving-manifests.adoc +557 -0
  41. data/docs/_guides/manifests/validating-manifests.adoc +713 -0
  42. data/docs/_guides/ruby-api/formatting-schemas.adoc +605 -0
  43. data/docs/_guides/ruby-api/index.adoc +257 -0
  44. data/docs/_guides/ruby-api/parsing-files.adoc +421 -0
  45. data/docs/_guides/ruby-api/search-engine.adoc +609 -0
  46. data/docs/_guides/ruby-api/working-with-repository.adoc +577 -0
  47. data/docs/_pages/data-model.adoc +665 -0
  48. data/docs/_pages/express-language.adoc +506 -0
  49. data/docs/_pages/getting-started.adoc +414 -0
  50. data/docs/_pages/index.adoc +116 -0
  51. data/docs/_pages/introduction.adoc +256 -0
  52. data/docs/_pages/ler-packages.adoc +837 -0
  53. data/docs/_pages/parsers.adoc +683 -0
  54. data/docs/_pages/schema-manifests.adoc +431 -0
  55. data/docs/_references/index.adoc +228 -0
  56. data/docs/_tutorials/creating-ler-package.adoc +735 -0
  57. data/docs/_tutorials/documentation-coverage.adoc +795 -0
  58. data/docs/_tutorials/index.adoc +221 -0
  59. data/docs/_tutorials/liquid-templates.adoc +806 -0
  60. data/docs/_tutorials/parsing-your-first-schema.adoc +522 -0
  61. data/docs/_tutorials/querying-schemas.adoc +751 -0
  62. data/docs/_tutorials/working-with-multiple-schemas.adoc +676 -0
  63. data/docs/index.adoc +242 -0
  64. data/docs/lychee.toml +84 -0
  65. data/examples/demo_ler_usage.sh +86 -0
  66. data/examples/ler/README.md +111 -0
  67. data/examples/ler/simple_example.ler +0 -0
  68. data/examples/ler/simple_schema.exp +33 -0
  69. data/examples/ler_build.rb +75 -0
  70. data/examples/ler_cli.rb +79 -0
  71. data/examples/ler_demo_complete.rb +276 -0
  72. data/examples/ler_query.rb +91 -0
  73. data/examples/ler_query_examples.rb +305 -0
  74. data/examples/ler_stats.rb +81 -0
  75. data/examples/phase3_demo.rb +159 -0
  76. data/examples/query_demo_simple.rb +131 -0
  77. data/expressir.gemspec +2 -0
  78. data/lib/expressir/cli.rb +12 -4
  79. data/lib/expressir/commands/manifest.rb +427 -0
  80. data/lib/expressir/commands/package.rb +1274 -0
  81. data/lib/expressir/commands/validate.rb +70 -37
  82. data/lib/expressir/commands/validate_ascii.rb +607 -0
  83. data/lib/expressir/commands/validate_load.rb +88 -0
  84. data/lib/expressir/express/formatter.rb +5 -1
  85. data/lib/expressir/express/formatters/remark_item_formatter.rb +25 -0
  86. data/lib/expressir/express/parser.rb +33 -0
  87. data/lib/expressir/manifest/resolver.rb +213 -0
  88. data/lib/expressir/manifest/validator.rb +195 -0
  89. data/lib/expressir/model/declarations/entity.rb +6 -0
  90. data/lib/expressir/model/dependency_resolver.rb +270 -0
  91. data/lib/expressir/model/indexes/entity_index.rb +103 -0
  92. data/lib/expressir/model/indexes/reference_index.rb +148 -0
  93. data/lib/expressir/model/indexes/type_index.rb +149 -0
  94. data/lib/expressir/model/interface_validator.rb +384 -0
  95. data/lib/expressir/model/repository.rb +400 -5
  96. data/lib/expressir/model/repository_validator.rb +295 -0
  97. data/lib/expressir/model/search_engine.rb +525 -0
  98. data/lib/expressir/model.rb +4 -94
  99. data/lib/expressir/package/builder.rb +200 -0
  100. data/lib/expressir/package/metadata.rb +81 -0
  101. data/lib/expressir/package/reader.rb +165 -0
  102. data/lib/expressir/schema_manifest.rb +11 -1
  103. data/lib/expressir/version.rb +1 -1
  104. data/lib/expressir.rb +15 -2
  105. metadata +114 -4
  106. data/docs/benchmarking.adoc +0 -107
  107. data/docs/liquid_drops.adoc +0 -1547
@@ -0,0 +1,778 @@
1
+ ---
2
+ title: Changes Format Specification
3
+ parent: Changes
4
+ grand_parent: Guides
5
+ nav_order: 1
6
+ ---
7
+
8
+ = Changes Format Specification
9
+
10
+ == Purpose
11
+
12
+ This document provides the complete YAML format specification for EXPRESS
13
+ Changes files. Understanding this format is essential for creating, editing,
14
+ and validating changes files.
15
+
16
+ == References
17
+
18
+ * link:index.html[Changes Overview] - Introduction to Changes files
19
+ * link:validating-changes.html[Validating Changes] - Validation guide
20
+ * link:programmatic-usage.html[Programmatic Usage] - Ruby API reference
21
+
22
+ == File structure
23
+
24
+ A Changes file follows this hierarchical structure:
25
+
26
+ [source]
27
+ ----
28
+ schema: {schema_name}
29
+ versions:
30
+ - version: {version_number}
31
+ description: {version_description}
32
+ additions: [{item_changes}]
33
+ modifications: [{item_changes}]
34
+ deletions: [{item_changes}]
35
+ mappings: [{mapping_changes}]
36
+ changes: [{mapping_changes}]
37
+ ----
38
+
39
+ == Schema-level fields
40
+
41
+ === schema
42
+
43
+ Type:: String (required)
44
+ Purpose:: Name of the EXPRESS schema being tracked
45
+ Format:: Must match the schema name in the EXPRESS files
46
+
47
+ .Example
48
+ [example]
49
+ ====
50
+ [source,yaml]
51
+ ----
52
+ schema: action_schema
53
+ ----
54
+ ====
55
+
56
+ === versions
57
+
58
+ Type:: Array of version objects (optional)
59
+ Purpose:: List of version changes, ordered chronologically
60
+ Format:: Each element is a version change object
61
+
62
+ .Example with multiple versions
63
+ [example]
64
+ ====
65
+ [source,yaml]
66
+ ----
67
+ schema: action_schema
68
+ versions:
69
+ - version: 2
70
+ description: Initial changes
71
+ additions: [...]
72
+ - version: 3
73
+ description: Further updates
74
+ modifications: [...]
75
+ ----
76
+ ====
77
+
78
+ == Version structure
79
+
80
+ Each version in the `versions` array has the following fields:
81
+
82
+ === version
83
+
84
+ Type:: Integer or string (required)
85
+ Purpose:: Version identifier for this set of changes
86
+ Format:: Typically an integer (2, 3, 4) or string ("2", "1.1", "v2")
87
+
88
+ .Version numbering examples
89
+ [example]
90
+ ====
91
+ [source,yaml]
92
+ ----
93
+ # Integer versions
94
+ - version: 2
95
+ - version: 3
96
+ - version: 4
97
+
98
+ # String versions
99
+ - version: "2.1"
100
+ - version: "v3"
101
+ - version: "1.0.0"
102
+ ----
103
+ ====
104
+
105
+ === description
106
+
107
+ Type:: String (optional)
108
+ Purpose:: Description of what changed in this version
109
+ Format:: Free-form text, can be multi-line
110
+
111
+ .Description examples
112
+ [example]
113
+ ====
114
+ [source,yaml]
115
+ ----
116
+ # Simple description
117
+ - version: 2
118
+ description: Added new entity types
119
+
120
+ # Multi-line description
121
+ - version: 3
122
+ description: |-
123
+ Added support for external references.
124
+ Modified existing entities for compatibility.
125
+ Removed deprecated functions.
126
+ ----
127
+ ====
128
+
129
+ === additions
130
+
131
+ Type:: Array of item change objects (optional)
132
+ Purpose:: New elements added in this version
133
+ Format:: Each element describes one added item
134
+
135
+ .Additions example
136
+ [example]
137
+ ====
138
+ [source,yaml]
139
+ ----
140
+ - version: 2
141
+ additions:
142
+ - type: ENTITY
143
+ name: new_product_entity
144
+ description:
145
+ - Represents product information
146
+ - type: FUNCTION
147
+ name: validate_product
148
+ description:
149
+ - Validates product data
150
+ ----
151
+ ====
152
+
153
+ === modifications
154
+
155
+ Type:: Array of item change objects (optional)
156
+ Purpose:: Existing elements modified in this version
157
+ Format:: Each element describes one modified item
158
+
159
+ .Modifications example
160
+ [example]
161
+ ====
162
+ [source,yaml]
163
+ ----
164
+ - version: 2
165
+ modifications:
166
+ - type: ENTITY
167
+ name: existing_entity
168
+ description:
169
+ - Added new attributes
170
+ - Changed subtypes
171
+ - type: FUNCTION
172
+ name: existing_function
173
+ description:
174
+ - Updated parameters
175
+ - Improved algorithm
176
+ ----
177
+ ====
178
+
179
+ === deletions
180
+
181
+ Type:: Array of item change objects (optional)
182
+ Purpose:: Elements removed in this version
183
+ Format:: Each element describes one deleted item
184
+
185
+ .Deletions example
186
+ [example]
187
+ ====
188
+ [source,yaml]
189
+ ----
190
+ - version: 2
191
+ deletions:
192
+ - type: CONSTANT
193
+ name: deprecated_constant
194
+ description:
195
+ - Removed as no longer needed
196
+ - type: FUNCTION
197
+ name: old_function
198
+ description:
199
+ - Replaced by new_function
200
+ ----
201
+ ====
202
+
203
+ === mappings
204
+
205
+ Type:: Array of mapping change objects (optional)
206
+ Purpose:: Mapping-related changes for ARM/MIM schemas
207
+ Format:: Each element describes one mapping change
208
+
209
+ .Mappings example
210
+ [example]
211
+ ====
212
+ [source,yaml]
213
+ ----
214
+ - version: 2
215
+ mappings:
216
+ - name: Entity_name
217
+ description: ENTITY mapping updated for new structure
218
+ - name: Type_name
219
+ description: TYPE mapping simplified
220
+ ----
221
+ ====
222
+
223
+ === changes
224
+
225
+ Type:: Array of mapping change objects (optional)
226
+ Purpose:: Alternative field name for mapping changes
227
+ Format:: Same as `mappings`, used in some contexts
228
+
229
+ NOTE: The `changes` field is an alias for `mappings` and serves the same
230
+ purpose. Use either `mappings` or `changes`, but not both.
231
+
232
+ == Item change structure
233
+
234
+ Item changes (in `additions`, `modifications`, `deletions`) have these fields:
235
+
236
+ === type
237
+
238
+ Type:: String (required)
239
+ Purpose:: Type of EXPRESS construct being changed
240
+ Format:: One of the valid EXPRESS types
241
+
242
+ Valid types::
243
+ * `ENTITY` - Entity definitions
244
+ * `TYPE` - Type definitions
245
+ * `FUNCTION` - Function definitions
246
+ * `PROCEDURE` - Procedure definitions
247
+ * `RULE` - Rule definitions
248
+ * `CONSTANT` - Constant definitions
249
+ * `SUBTYPE_CONSTRAINT` - Subtype constraints
250
+ * `USE_FROM` - Interface imports
251
+ * `REFERENCE_FROM` - Interface references
252
+
253
+ .Type examples
254
+ [example]
255
+ ====
256
+ [source,yaml]
257
+ ----
258
+ additions:
259
+ - type: ENTITY
260
+ name: product
261
+ - type: FUNCTION
262
+ name: validate
263
+ - type: USE_FROM
264
+ name: geometry_schema
265
+ interfaced_items: point
266
+ ----
267
+ ====
268
+
269
+ === name
270
+
271
+ Type:: String (required)
272
+ Purpose:: Name of the EXPRESS construct
273
+ Format:: Must match the actual name in the schema
274
+
275
+ For interface types (`USE_FROM`, `REFERENCE_FROM`), this is the name of the
276
+ schema being referenced, not the items being imported.
277
+
278
+ .Name examples
279
+ [example]
280
+ ====
281
+ [source,yaml]
282
+ ----
283
+ # Regular entities
284
+ - type: ENTITY
285
+ name: action_directive
286
+
287
+ # Interface imports
288
+ - type: USE_FROM
289
+ name: support_resource_schema # Schema name, not item name
290
+ interfaced_items: bag_to_set # Item being imported
291
+ ----
292
+ ====
293
+
294
+ === description
295
+
296
+ Type:: String or array of strings (optional)
297
+ Purpose:: Description of the change
298
+ Format:: Single string or array of bullet points
299
+
300
+ .Description formats
301
+ [example]
302
+ ====
303
+ [source,yaml]
304
+ ----
305
+ # Single-line description
306
+ - type: ENTITY
307
+ name: product
308
+ description: Added to support product management
309
+
310
+ # Multi-line description (array)
311
+ - type: FUNCTION
312
+ name: validate_data
313
+ description:
314
+ - Updated parameters to support new types
315
+ - Improved validation logic
316
+ - Added error handling
317
+
318
+ # Multi-line description (literal)
319
+ - type: ENTITY
320
+ name: component
321
+ description: |-
322
+ This entity was significantly modified.
323
+ It now supports hierarchical structures.
324
+ ----
325
+ ====
326
+
327
+ === interfaced_items
328
+
329
+ Type:: String (optional)
330
+ Purpose:: Specifies items imported/referenced for interface changes
331
+ Format:: Comma-separated list or single item name
332
+ Use:: Only for `USE_FROM` and `REFERENCE_FROM` types
333
+
334
+ .Interface changes with interfaced_items
335
+ [example]
336
+ ====
337
+ [source,yaml]
338
+ ----
339
+ additions:
340
+ # Single item
341
+ - type: USE_FROM
342
+ name: geometric_model_schema
343
+ interfaced_items: convex_hexahedron
344
+
345
+ # Another single item from same schema
346
+ - type: USE_FROM
347
+ name: geometric_model_schema
348
+ interfaced_items: cyclide_segment_solid
349
+
350
+ # Reference from another schema
351
+ - type: REFERENCE_FROM
352
+ name: measure_schema
353
+ interfaced_items: length_measure
354
+ ----
355
+ ====
356
+
357
+ == Mapping change structure
358
+
359
+ Mapping changes (in `mappings` or `changes`) have these fields:
360
+
361
+ === name
362
+
363
+ Type:: String (required)
364
+ Purpose:: Name of the mapping being changed
365
+ Format:: Typically the entity or type name
366
+
367
+ .Mapping name example
368
+ [example]
369
+ ====
370
+ [source,yaml]
371
+ ----
372
+ mappings:
373
+ - name: Product_entity
374
+ description: Updated ARM-to-MIM mapping
375
+ ----
376
+ ====
377
+
378
+ === description
379
+
380
+ Type:: String (required)
381
+ Purpose:: Description of the mapping change
382
+ Format:: Free-form text describing the mapping update
383
+
384
+ .Mapping description example
385
+ [example]
386
+ ====
387
+ [source,yaml]
388
+ ----
389
+ mappings:
390
+ - name: Address
391
+ description: ENTITY mapping updated to support international formats
392
+ - name: Identifier
393
+ description: TYPE mapping simplified for better performance
394
+ ----
395
+ ====
396
+
397
+ == Complete examples
398
+
399
+ === Minimal valid file
400
+
401
+ [source,yaml]
402
+ ----
403
+ schema: my_schema
404
+ ----
405
+
406
+ === Single version with all change types
407
+
408
+ [source,yaml]
409
+ ----
410
+ schema: action_schema
411
+ versions:
412
+ - version: 2
413
+ description: Comprehensive update with multiple changes
414
+ additions:
415
+ - type: ENTITY
416
+ name: new_action_entity
417
+ description:
418
+ - Represents a new type of action
419
+ - type: FUNCTION
420
+ name: validate_action
421
+ description:
422
+ - Validates action data
423
+ modifications:
424
+ - type: ENTITY
425
+ name: action_directive
426
+ description:
427
+ - Added new attributes
428
+ - Modified subtypes
429
+ - type: FUNCTION
430
+ name: bag_to_set
431
+ description:
432
+ - Updated parameters
433
+ deletions:
434
+ - type: CONSTANT
435
+ name: old_constant
436
+ description:
437
+ - No longer used
438
+ ----
439
+
440
+ === Multiple versions building history
441
+
442
+ [source,yaml]
443
+ ----
444
+ schema: support_resource_schema
445
+ versions:
446
+ - version: 2
447
+ description: Initial enhancements
448
+ additions:
449
+ - type: FUNCTION
450
+ name: type_check_function
451
+ modifications:
452
+ - type: ENTITY
453
+ name: action
454
+ description:
455
+ - Updated attributes
456
+ - version: 3
457
+ description: Added external references
458
+ additions:
459
+ - type: USE_FROM
460
+ name: measure_schema
461
+ interfaced_items: length_measure
462
+ - version: 4
463
+ description: Further improvements
464
+ modifications:
465
+ - type: FUNCTION
466
+ name: type_check_function
467
+ description:
468
+ - Enhanced validation logic
469
+ deletions:
470
+ - type: CONSTANT
471
+ name: deprecated_value
472
+ ----
473
+
474
+ === ARM/MIM schema with mappings
475
+
476
+ [source,yaml]
477
+ ----
478
+ schema: action_arm
479
+ versions:
480
+ - version: 2
481
+ description: Updated ARM mappings
482
+ additions:
483
+ - type: ENTITY
484
+ name: new_arm_entity
485
+ mappings:
486
+ - name: Action
487
+ description: ENTITY mapping updated for new MIM structure
488
+ - name: Action_directive
489
+ description: ENTITY mapping simplified
490
+ - version: 3
491
+ description: Added new mappings
492
+ mappings:
493
+ - name: Resource
494
+ description: New ENTITY mapping added
495
+ ----
496
+
497
+ === Interface changes example
498
+
499
+ [source,yaml]
500
+ ----
501
+ schema: aic_csg
502
+ versions:
503
+ - version: 2
504
+ description: Added external schema references
505
+ additions:
506
+ - type: USE_FROM
507
+ name: geometric_model_schema
508
+ interfaced_items: convex_hexahedron
509
+ - type: USE_FROM
510
+ name: geometric_model_schema
511
+ interfaced_items: cyclide_segment_solid
512
+ - type: REFERENCE_FROM
513
+ name: measure_schema
514
+ interfaced_items: length_measure
515
+ - type: REFERENCE_FROM
516
+ name: topology_schema
517
+ interfaced_items: vertex
518
+ ----
519
+
520
+ == Field requirements summary
521
+
522
+ [options="header"]
523
+ |===
524
+ | Field | Level | Type | Required | Description
525
+
526
+ | `schema`
527
+ | Top
528
+ | String
529
+ | Yes
530
+ | Schema name
531
+
532
+ | `versions`
533
+ | Top
534
+ | Array
535
+ | No
536
+ | List of versions
537
+
538
+ | `version`
539
+ | Version
540
+ | Integer/String
541
+ | Yes
542
+ | Version identifier
543
+
544
+ | `description`
545
+ | Version
546
+ | String
547
+ | No
548
+ | Version description
549
+
550
+ | `additions`
551
+ | Version
552
+ | Array
553
+ | No
554
+ | Added items
555
+
556
+ | `modifications`
557
+ | Version
558
+ | Array
559
+ | No
560
+ | Modified items
561
+
562
+ | `deletions`
563
+ | Version
564
+ | Array
565
+ | No
566
+ | Deleted items
567
+
568
+ | `mappings`
569
+ | Version
570
+ | Array
571
+ | No
572
+ | Mapping changes
573
+
574
+ | `changes`
575
+ | Version
576
+ | Array
577
+ | No
578
+ | Alternative to mappings
579
+
580
+ | `type`
581
+ | Item
582
+ | String
583
+ | Yes
584
+ | EXPRESS construct type
585
+
586
+ | `name`
587
+ | Item
588
+ | String
589
+ | Yes
590
+ | Construct name
591
+
592
+ | `description`
593
+ | Item
594
+ | String/Array
595
+ | No
596
+ | Change description
597
+
598
+ | `interfaced_items`
599
+ | Item
600
+ | String
601
+ | No*
602
+ | For USE_FROM/REFERENCE_FROM
603
+
604
+ | `name`
605
+ | Mapping
606
+ | String
607
+ | Yes
608
+ | Mapping name
609
+
610
+ | `description`
611
+ | Mapping
612
+ | String
613
+ | Yes
614
+ | Mapping description
615
+ |===
616
+
617
+ *Required for `USE_FROM` and `REFERENCE_FROM` types
618
+
619
+ == Best practices
620
+
621
+ === Version organization
622
+
623
+ Chronological order:: List versions in chronological order (oldest to newest)
624
+ +
625
+ [source,yaml]
626
+ ----
627
+ versions:
628
+ - version: 2 # First
629
+ - version: 3 # Second
630
+ - version: 4 # Third
631
+ ----
632
+
633
+ Consistent numbering:: Use consistent version numbering scheme throughout
634
+ +
635
+ [source,yaml]
636
+ ----
637
+ # Good: consistent integers
638
+ versions:
639
+ - version: 2
640
+ - version: 3
641
+ - version: 4
642
+
643
+ # Also good: consistent semantic versions
644
+ versions:
645
+ - version: "1.0.0"
646
+ - version: "1.1.0"
647
+ - version: "2.0.0"
648
+ ----
649
+
650
+ === Description guidelines
651
+
652
+ Be specific:: Describe what changed, not just that something changed
653
+ +
654
+ [source,yaml]
655
+ ----
656
+ # Vague (avoid)
657
+ description: Modified entity
658
+
659
+ # Specific (better)
660
+ description:
661
+ - Added new required attribute 'status'
662
+ - Changed 'date' attribute to optional
663
+ - Added subtype relationship to 'base_entity'
664
+ ----
665
+
666
+ Use arrays for multiple points:: Use array format for multiple distinct changes
667
+ +
668
+ [source,yaml]
669
+ ----
670
+ description:
671
+ - Added new attributes
672
+ - Modified subtype constraints
673
+ - Updated WHERE rules
674
+ ----
675
+
676
+ === Interface changes
677
+
678
+ Separate entries per item:: Create separate entries for each imported item
679
+ +
680
+ [source,yaml]
681
+ ----
682
+ # Good: clear and explicit
683
+ additions:
684
+ - type: USE_FROM
685
+ name: geometry_schema
686
+ interfaced_items: point
687
+ - type: USE_FROM
688
+ name: geometry_schema
689
+ interfaced_items: vector
690
+
691
+ # Avoid: combining items (not standard)
692
+ additions:
693
+ - type: USE_FROM
694
+ name: geometry_schema
695
+ interfaced_items: point, vector
696
+ ----
697
+
698
+ === Change categorization
699
+
700
+ Choose correct category:: Use the right change type for each modification
701
+ +
702
+ * **Additions**: Only for completely new items
703
+ * **Modifications**: For changes to existing items
704
+ * **Deletions**: For removed items
705
+
706
+ Modifications vs additions:: If an entity was modified, use modifications even
707
+ if attributes were added
708
+ +
709
+ [source,yaml]
710
+ ----
711
+ # Entity exists but has new attributes
712
+ modifications:
713
+ - type: ENTITY
714
+ name: existing_entity
715
+ description:
716
+ - Added new attributes
717
+
718
+ # Not additions, because entity already existed
719
+ ----
720
+
721
+ == YAML schema support
722
+
723
+ Changes files include a schema hint for editor support:
724
+
725
+ [source,yaml]
726
+ ----
727
+ # yaml-language-server: $schema=https://www.expresslang.org/schemas/changes/v1/schema_changes.yaml
728
+ schema: action_schema
729
+ versions: [...]
730
+ ----
731
+
732
+ This is automatically added when files are created via
733
+ [`SchemaChange#to_file`](../../references/data-model/changes.html#to_file).
734
+
735
+ == File naming conventions
736
+
737
+ Standard naming:: Use `.changes.yaml` extension
738
+ +
739
+ [source]
740
+ ----
741
+ schema_name.changes.yaml
742
+ ----
743
+
744
+ Examples::
745
+ * `action_schema.changes.yaml`
746
+ * `geometry_schema.changes.yaml`
747
+ * `product_schema.changes.yaml`
748
+
749
+ == Next steps
750
+
751
+ Now that you understand the format:
752
+
753
+ * link:validating-changes.html[Validate Changes] - Validate your changes files
754
+ * link:importing-eengine.html[Import from Express Engine] - Import from XML
755
+ * link:programmatic-usage.html[Programmatic Usage] - Create changes via API
756
+
757
+ == Summary
758
+
759
+ The EXPRESS Changes YAML format provides structured change tracking:
760
+
761
+ * Simple hierarchical structure with schema and versions
762
+ * Four change categories: additions, modifications, deletions, mappings
763
+ * Support for all EXPRESS construct types
764
+ * Special handling for interface changes via `interfaced_items`
765
+ * Optional descriptions at version and item levels
766
+ * YAML format for easy editing and version control
767
+ * Clear field requirements and validation rules
768
+
769
+ Key takeaways:
770
+
771
+ * `schema` and version-level `version` are required fields
772
+ * Item changes require `type` and `name` fields
773
+ * Use `interfaced_items` for `USE_FROM` and `REFERENCE_FROM`
774
+ * Descriptions can be strings or arrays
775
+ * Organize versions chronologically
776
+ * Be specific in descriptions
777
+ * Validate files before committing
778
+ * Follow standard naming conventions