Skip to content

Commit 2bd2739

Browse files
akoclaude
andcommitted
docs: standardize version registry on min_version/max_version bounds
Incorporate feedback from #76: align the version feature registry format with Mendix Content API conventions. Replaces the ad-hoc mix of introduced/available_in/null with consistent min_version/max_version semver bounds. Adds Prior Art section documenting the Content API as prior art for the versioning format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0fe5ce7 commit 2bd2739

File tree

1 file changed

+76
-67
lines changed

1 file changed

+76
-67
lines changed

docs/11-proposals/PROPOSAL_version_aware_agent_support.md

Lines changed: 76 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ There is no way for an agent or user to **query** what's available, no **pre-fli
3030
5. **Incremental updates** -- Adding a new version's capabilities should be a data change, not a code change.
3131
6. **Reuse existing infrastructure** -- Linter rules, skills, executor commands follow established patterns.
3232

33+
## Prior Art: Mendix Content API
34+
35+
The Mendix Content API (Marketplace) already solves a similar version-availability problem for add-on modules. Each Marketplace component release carries a minimum (and sometimes maximum) Studio Pro version, and Studio Pro resolves the highest compatible release at download time. The conceptual model is the same — mapping capabilities to version ranges — just applied to external packages rather than internal platform features.
36+
37+
This proposal adopts the same **`min_version` / `max_version`** bound format used by the Content API. A single version-comparison implementation can then handle both "is this platform feature available?" and "is this Marketplace module compatible?" — which matters for agents that reason about both in the same session (e.g., creating entities *and* importing a module).
38+
39+
The proposal diverges from the Content API in scope: we use a per-feature YAML registry rather than the Marketplace's full component → releases → packages data model. The alignment is specifically about version bound format and comparison semantics.
40+
3341
## Architecture
3442

3543
```
@@ -57,166 +65,163 @@ sdk/versions/
5765
mendix-11.yaml
5866
```
5967

60-
Each file defines features, their introduction version, syntax, deprecations, and upgrade hints:
68+
Each file defines features with consistent `min_version` / `max_version` bounds (aligned with Mendix Content API conventions), syntax examples, deprecations, and upgrade hints:
6169

6270
```yaml
6371
# sdk/versions/mendix-10.yaml
6472
major: 10
65-
supported_range: "10.0..10.24"
73+
supported_range: "10.0.0..10.24.99"
6674
lts_versions: ["10.24"]
6775
mts_versions: ["10.6", "10.12", "10.18"]
6876

6977
features:
7078
# --- Domain Model ---
7179
domain_model:
7280
entities:
73-
introduced: "10.0"
81+
min_version: "10.0.0"
7482
mdl: "CREATE PERSISTENT ENTITY Module.Name (...)"
7583
non_persistent_entities:
76-
introduced: "10.0"
84+
min_version: "10.0.0"
7785
mdl: "CREATE NON-PERSISTENT ENTITY Module.Name (...)"
7886
view_entities:
79-
introduced: "10.18"
87+
min_version: "10.18.0"
8088
mdl: "CREATE VIEW ENTITY Module.Name (...) AS SELECT ..."
81-
bson_notes: "10.x: OQL stored inline on OqlViewEntitySource; 11.0+: removed"
89+
notes: "OQL stored inline on OqlViewEntitySource in 10.x"
8290
calculated_attributes:
83-
introduced: "10.0"
91+
min_version: "10.0.0"
8492
mdl: "CALCULATED BY Module.Microflow"
8593
entity_generalization:
86-
introduced: "10.0"
94+
min_version: "10.0.0"
8795
mdl: "EXTENDS Module.ParentEntity"
8896
alter_entity:
89-
introduced: "10.0"
97+
min_version: "10.0.0"
9098
mdl: "ALTER ENTITY Module.Name ADD ATTRIBUTE ..."
9199

92100
# --- OQL Functions (used in VIEW ENTITY queries) ---
93101
oql_functions:
94102
basic_select:
95-
introduced: "10.18"
103+
min_version: "10.18.0"
96104
mdl: "SELECT, FROM, WHERE, AS, AND, OR, NOT"
97105
aggregate_functions:
98-
introduced: "10.18"
106+
min_version: "10.18.0"
99107
mdl: "COUNT, SUM, AVG, MIN, MAX, GROUP BY"
100108
subqueries:
101-
introduced: "10.18"
109+
min_version: "10.18.0"
102110
mdl: "Inline subqueries in SELECT and WHERE"
103111
join_types:
104-
introduced: "10.18"
112+
min_version: "10.18.0"
105113
mdl: "INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN"
106114
# New OQL functions added per minor release:
107-
# string_length: { introduced: "10.20" }
108-
# date_diff: { introduced: "10.21" }
115+
# string_length: { min_version: "10.20.0" }
116+
# date_diff: { min_version: "10.21.0" }
109117
# (to be populated from release notes)
110118

111119
# --- Microflows ---
112120
microflows:
113121
basic:
114-
introduced: "10.0"
122+
min_version: "10.0.0"
115123
mdl: "CREATE MICROFLOW Module.Name (...) BEGIN ... END"
116124
show_page_with_params:
117-
introduced: null
118-
available_in: "11.0+"
119-
workaround: "Pass data via a non-persistent entity or microflow parameter"
125+
min_version: "11.0.0"
126+
workaround:
127+
description: "Pass data via a non-persistent entity or microflow parameter"
128+
max_version: "10.99.99"
120129
send_rest_request:
121-
introduced: "10.1"
130+
min_version: "10.1.0"
122131
mdl: "SEND REST REQUEST ..."
123132
send_rest_query_params:
124-
introduced: null
125-
available_in: "11.0+"
133+
min_version: "11.0.0"
126134
notes: "Query parameters in REST requests"
127135
execute_database_query:
128-
introduced: "10.6"
136+
min_version: "10.6.0"
129137
mdl: "EXECUTE DATABASE QUERY ..."
130138
execute_database_query_runtime_connection:
131-
introduced: null
132-
available_in: "11.0+"
139+
min_version: "11.0.0"
133140
notes: "Runtime connection override for database queries"
134141
loop_in_branch:
135-
introduced: "10.0"
142+
min_version: "10.0.0"
136143
notes: "LOOP inside IF/ELSE branches"
137144

138145
# --- Pages ---
139146
pages:
140147
basic:
141-
introduced: "10.0"
148+
min_version: "10.0.0"
142149
mdl: "CREATE PAGE Module.Name (...) { ... }"
143150
page_parameters:
144-
introduced: null
145-
available_in: "11.0+"
146-
workaround: "Use non-persistent entity or microflow parameter"
151+
min_version: "11.0.0"
152+
workaround:
153+
description: "Use non-persistent entity or microflow parameter"
154+
max_version: "10.99.99"
147155
page_variables:
148-
introduced: null
149-
available_in: "11.0+"
156+
min_version: "11.0.0"
150157
pluggable_widgets:
151-
introduced: "10.0"
158+
min_version: "10.0.0"
152159
widgets: [ComboBox, DataGrid2, Gallery, Image, TextFilter, NumberFilter, DateFilter, DropdownFilter]
153160
notes: "Widget templates are version-specific; MPK augmentation handles drift"
154161
design_properties_v3:
155-
introduced: null
156-
available_in: "11.0+"
162+
min_version: "11.0.0"
157163
notes: "Atlas v3 design properties (Card style, Disable row wrap)"
158164
alter_page:
159-
introduced: "10.0"
165+
min_version: "10.0.0"
160166
mdl: "ALTER PAGE Module.Name SET/INSERT/DROP/REPLACE ..."
161167

162168
# --- Security ---
163169
security:
164170
module_roles:
165-
introduced: "10.0"
171+
min_version: "10.0.0"
166172
user_roles:
167-
introduced: "10.0"
173+
min_version: "10.0.0"
168174
entity_access:
169-
introduced: "10.0"
175+
min_version: "10.0.0"
170176
demo_users:
171-
introduced: "10.0"
177+
min_version: "10.0.0"
172178

173179
# --- Integration ---
174180
integration:
175181
rest_client_basic:
176-
introduced: "10.1"
182+
min_version: "10.1.0"
177183
mdl: "CREATE REST CLIENT Module.Name ..."
178184
rest_client_query_params:
179-
introduced: null
180-
available_in: "11.0+"
185+
min_version: "11.0.0"
181186
rest_client_headers:
182-
introduced: "10.4"
187+
min_version: "10.4.0"
183188
database_connector_basic:
184-
introduced: "10.6"
189+
min_version: "10.6.0"
185190
mdl: "CREATE DATABASE CONNECTION Module.Name ..."
186191
database_connector_execute:
187-
introduced: "10.6"
192+
min_version: "10.6.0"
188193
mdl: "EXECUTE DATABASE QUERY in microflows"
189-
bson_notes: "Full BSON format requires 11.0+"
194+
notes: "Full BSON format requires 11.0+"
190195
business_events:
191-
introduced: "10.0"
196+
min_version: "10.0.0"
192197
mdl: "CREATE BUSINESS EVENT SERVICE Module.Name ..."
193198
odata_client:
194-
introduced: "10.0"
199+
min_version: "10.0.0"
195200

196201
# --- Workflows ---
197202
workflows:
198203
basic:
199-
introduced: "9.0"
204+
min_version: "9.0.0"
200205
mdl: "CREATE WORKFLOW Module.Name ..."
201206
parallel_split:
202-
introduced: "9.0"
207+
min_version: "9.0.0"
203208
user_task:
204-
introduced: "9.0"
209+
min_version: "9.0.0"
205210

206211
# --- Navigation ---
207212
navigation:
208213
profiles:
209-
introduced: "10.0"
214+
min_version: "10.0.0"
210215
menu_items:
211-
introduced: "10.0"
216+
min_version: "10.0.0"
212217
home_pages:
213-
introduced: "10.0"
218+
min_version: "10.0.0"
214219

215220
deprecated:
216221
- id: "DEP001"
217222
pattern: "Persistable: false on view entities"
218223
replaced_by: "Persistable: true (auto-set)"
219-
since: "10.18"
224+
since: "10.18.0"
220225
severity: "info"
221226

222227
upgrade_opportunities:
@@ -489,23 +494,27 @@ BSON Layer Schema Registry "How do I serialize this?"
489494

490495
## Design Decisions
491496

492-
1. **YAML as source of truth.** Human-readable, easy to edit, reviewed in PRs. Compiled to embedded Go structs at build time via `go:embed` + YAML parser.
497+
1. **YAML as source of truth.** Human-readable, easy to edit, reviewed in PRs. Compiled to embedded Go structs at build time via `go:embed` + YAML parser. Version bounds use `min_version` / `max_version` semver notation consistent with the Mendix Content API (see Prior Art section).
498+
499+
2. **Consistent version bound format.** The registry uses `min_version` / `max_version` fields with semver-style notation (e.g., `"10.18.0"`), aligned with the Mendix Content API's versioning conventions. This replaces an earlier draft that mixed `introduced`, `available_in`, and `null` — which was ad-hoc and required special-case handling. With consistent bounds, a single `IsInRange(projectVersion, min, max)` comparison handles all checks. The `max_version` field is optional and defaults to unbounded (feature available in all later versions). This format also enables future unification: the same version-comparison logic can evaluate both platform feature availability and Marketplace module compatibility.
493500

494-
2. **Fine-grained features.** Mendix adds capabilities per minor release across all areas (new OQL functions, database connector features, REST enhancements, page properties). The registry must track at the **per-capability** level, not just per-concept. Example: `oql_functions.string_length` introduced in 10.8, `oql_functions.date_diff` in 10.12, `rest_client.query_parameters` in 11.0. Grouping by area with individual capability entries:
501+
3. **Fine-grained features with feature-level bounds and optional property overrides.** Mendix adds capabilities per minor release across all areas. The registry tracks at the **per-capability** level, not just per-concept. Each capability has its own `min_version`. Where a capability gains sub-features in later releases, property-level overrides can be added without changing the parent entry:
495502

496503
```yaml
497504
oql_functions:
498-
string_length: { introduced: "10.8" }
499-
date_diff: { introduced: "10.12" }
500-
coalesce: { introduced: "10.14" }
505+
string_length: { min_version: "10.20.0" }
506+
date_diff: { min_version: "10.21.0" }
507+
coalesce: { min_version: "10.14.0" }
501508
database_connector:
502-
basic_query: { introduced: "10.6" }
503-
parameterized_query: { introduced: "10.12" }
504-
runtime_connection: { introduced: "11.0" }
509+
basic_query: { min_version: "10.6.0" }
510+
parameterized_query: { min_version: "10.12.0" }
511+
runtime_connection: { min_version: "11.0.0" }
505512
```
506513
507-
3. **SHOW FEATURES works without a project.** `SHOW FEATURES FOR VERSION 10.24` queries the registry directly without an MPR connection. When connected, it defaults to the project's version. Useful for upgrade planning: `SHOW FEATURES ADDED SINCE 10.24` shows what upgrading to the latest would gain; `SHOW FEATURES FOR VERSION 11.6` shows the full capability set of a target version. When connected, also supports: `SHOW UPGRADE OPPORTUNITIES` to identify patterns in the current project that could benefit from the project's own version capabilities (e.g., detecting workarounds that are no longer needed).
514+
This mirrors how the Marketplace handles it — a module has one compatibility range, but release notes call out property-level changes.
515+
516+
4. **SHOW FEATURES works without a project.** `SHOW FEATURES FOR VERSION 10.24` queries the registry directly without an MPR connection. When connected, it defaults to the project's version. Useful for upgrade planning: `SHOW FEATURES ADDED SINCE 10.24` shows what upgrading to the latest would gain; `SHOW FEATURES FOR VERSION 11.6` shows the full capability set of a target version. When connected, also supports: `SHOW UPGRADE OPPORTUNITIES` to identify patterns in the current project that could benefit from the project's own version capabilities (e.g., detecting workarounds that are no longer needed).
508517

509-
4. **Minor version granularity by default.** Metamodel changes happen at the minor release level. Patch-level overrides supported where needed but expected to be rare.
518+
5. **Minor version granularity by default.** Metamodel changes happen at the minor release level. Patch-level overrides supported where needed but expected to be rare. All `min_version` values use three-part semver (`major.minor.patch`) for consistency, with `.0` patch for minor-release features.
510519

511-
5. **Non-interactive upgrade advisor for now.** `mxcli lint --upgrade-hints --target-version 11.6` outputs a report. Interactive `mxcli upgrade` can be added later as the tooling matures.
520+
6. **Non-interactive upgrade advisor for now.** `mxcli lint --upgrade-hints --target-version 11.6` outputs a report. Interactive `mxcli upgrade` can be added later as the tooling matures.

0 commit comments

Comments
 (0)