Skip to content

Commit 59c2903

Browse files
akoclaude
andcommitted
docs: update version-aware proposal with design decisions
Resolve open questions based on feedback: - YAML as source of truth for the version feature registry - Fine-grained per-capability granularity (OQL functions, DB connector features, REST enhancements tracked individually per minor release) - SHOW FEATURES works without a project (FOR VERSION 10.24 syntax) - SHOW UPGRADE OPPORTUNITIES analyzes current project for improvable patterns - Minor version granularity by default - Non-interactive upgrade advisor (lint --upgrade-hints) Expanded the YAML example to show per-capability entries across all areas (OQL functions, microflow activities, page features, integration). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9cc0921 commit 59c2903

File tree

1 file changed

+150
-20
lines changed

1 file changed

+150
-20
lines changed

docs/11-proposals/PROPOSAL_version_aware_agent_support.md

Lines changed: 150 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,69 +67,150 @@ lts_versions: ["10.24"]
6767
mts_versions: ["10.6", "10.12", "10.18"]
6868

6969
features:
70+
# --- Domain Model ---
7071
domain_model:
7172
entities:
7273
introduced: "10.0"
7374
mdl: "CREATE PERSISTENT ENTITY Module.Name (...)"
75+
non_persistent_entities:
76+
introduced: "10.0"
77+
mdl: "CREATE NON-PERSISTENT ENTITY Module.Name (...)"
7478
view_entities:
7579
introduced: "10.18"
7680
mdl: "CREATE VIEW ENTITY Module.Name (...) AS SELECT ..."
77-
notes: "OQL stored inline on OqlViewEntitySource (Oql field)"
81+
bson_notes: "10.x: OQL stored inline on OqlViewEntitySource; 11.0+: removed"
7882
calculated_attributes:
7983
introduced: "10.0"
8084
mdl: "CALCULATED BY Module.Microflow"
8185
entity_generalization:
8286
introduced: "10.0"
8387
mdl: "EXTENDS Module.ParentEntity"
88+
alter_entity:
89+
introduced: "10.0"
90+
mdl: "ALTER ENTITY Module.Name ADD ATTRIBUTE ..."
91+
92+
# --- OQL Functions (used in VIEW ENTITY queries) ---
93+
oql_functions:
94+
basic_select:
95+
introduced: "10.18"
96+
mdl: "SELECT, FROM, WHERE, AS, AND, OR, NOT"
97+
aggregate_functions:
98+
introduced: "10.18"
99+
mdl: "COUNT, SUM, AVG, MIN, MAX, GROUP BY"
100+
subqueries:
101+
introduced: "10.18"
102+
mdl: "Inline subqueries in SELECT and WHERE"
103+
join_types:
104+
introduced: "10.18"
105+
mdl: "INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN"
106+
# New OQL functions added per minor release:
107+
# string_length: { introduced: "10.20" }
108+
# date_diff: { introduced: "10.21" }
109+
# (to be populated from release notes)
84110

111+
# --- Microflows ---
85112
microflows:
86113
basic:
87114
introduced: "10.0"
115+
mdl: "CREATE MICROFLOW Module.Name (...) BEGIN ... END"
88116
show_page_with_params:
89117
introduced: null
90118
available_in: "11.0+"
91119
workaround: "Pass data via a non-persistent entity or microflow parameter"
92120
send_rest_request:
93121
introduced: "10.1"
94-
notes: "Query parameters require 11.0+"
122+
mdl: "SEND REST REQUEST ..."
123+
send_rest_query_params:
124+
introduced: null
125+
available_in: "11.0+"
126+
notes: "Query parameters in REST requests"
127+
execute_database_query:
128+
introduced: "10.6"
129+
mdl: "EXECUTE DATABASE QUERY ..."
130+
execute_database_query_runtime_connection:
131+
introduced: null
132+
available_in: "11.0+"
133+
notes: "Runtime connection override for database queries"
134+
loop_in_branch:
135+
introduced: "10.0"
136+
notes: "LOOP inside IF/ELSE branches"
95137

138+
# --- Pages ---
96139
pages:
140+
basic:
141+
introduced: "10.0"
142+
mdl: "CREATE PAGE Module.Name (...) { ... }"
97143
page_parameters:
98144
introduced: null
99145
available_in: "11.0+"
146+
workaround: "Use non-persistent entity or microflow parameter"
147+
page_variables:
148+
introduced: null
149+
available_in: "11.0+"
100150
pluggable_widgets:
101151
introduced: "10.0"
102-
widgets:
103-
- ComboBox
104-
- DataGrid2
105-
- Gallery
106-
- Image
152+
widgets: [ComboBox, DataGrid2, Gallery, Image, TextFilter, NumberFilter, DateFilter, DropdownFilter]
107153
notes: "Widget templates are version-specific; MPK augmentation handles drift"
108154
design_properties_v3:
109155
introduced: null
110156
available_in: "11.0+"
111157
notes: "Atlas v3 design properties (Card style, Disable row wrap)"
158+
alter_page:
159+
introduced: "10.0"
160+
mdl: "ALTER PAGE Module.Name SET/INSERT/DROP/REPLACE ..."
112161

162+
# --- Security ---
113163
security:
114164
module_roles:
115165
introduced: "10.0"
166+
user_roles:
167+
introduced: "10.0"
168+
entity_access:
169+
introduced: "10.0"
116170
demo_users:
117171
introduced: "10.0"
118172

173+
# --- Integration ---
119174
integration:
120-
rest_client:
175+
rest_client_basic:
121176
introduced: "10.1"
122-
notes: "Full BSON format requires 11.0+"
123-
database_connector:
177+
mdl: "CREATE REST CLIENT Module.Name ..."
178+
rest_client_query_params:
179+
introduced: null
180+
available_in: "11.0+"
181+
rest_client_headers:
182+
introduced: "10.4"
183+
database_connector_basic:
124184
introduced: "10.6"
125-
notes: "EXECUTE DATABASE QUERY BSON format requires 11.0+"
185+
mdl: "CREATE DATABASE CONNECTION Module.Name ..."
186+
database_connector_execute:
187+
introduced: "10.6"
188+
mdl: "EXECUTE DATABASE QUERY in microflows"
189+
bson_notes: "Full BSON format requires 11.0+"
126190
business_events:
127191
introduced: "10.0"
192+
mdl: "CREATE BUSINESS EVENT SERVICE Module.Name ..."
193+
odata_client:
194+
introduced: "10.0"
128195

196+
# --- Workflows ---
129197
workflows:
130198
basic:
131-
introduced: null
132-
available_in: "9.0+"
199+
introduced: "9.0"
200+
mdl: "CREATE WORKFLOW Module.Name ..."
201+
parallel_split:
202+
introduced: "9.0"
203+
user_task:
204+
introduced: "9.0"
205+
206+
# --- Navigation ---
207+
navigation:
208+
profiles:
209+
introduced: "10.0"
210+
menu_items:
211+
introduced: "10.0"
212+
home_pages:
213+
introduced: "10.0"
133214

134215
deprecated:
135216
- id: "DEP001"
@@ -146,6 +227,12 @@ upgrade_opportunities:
146227
- feature: "design_properties_v3"
147228
description: "Atlas v3 design properties available for richer styling"
148229
effort: "low"
230+
- feature: "rest_client_query_params"
231+
description: "REST clients can now define query parameters directly"
232+
effort: "low"
233+
- feature: "database_connector_runtime_connection"
234+
description: "Database queries can override connection at runtime"
235+
effort: "low"
149236
- feature: "association_storage"
150237
description: "New association storage format (automatic on project upgrade)"
151238
effort: "none"
@@ -155,10 +242,20 @@ upgrade_opportunities:
155242
156243
#### `SHOW FEATURES`
157244

158-
Lists all features available for the connected project's Mendix version:
245+
Lists all features available for the connected project's Mendix version, or for a specified version without a project connection:
159246

160247
```sql
248+
-- When connected to a project (uses project's Mendix version)
161249
SHOW FEATURES;
250+
251+
-- Without a project connection (query any version)
252+
SHOW FEATURES FOR VERSION 10.24;
253+
254+
-- Filter by area
255+
SHOW FEATURES IN integration;
256+
257+
-- Show only features available in the project's version
258+
SHOW FEATURES WHERE available = true;
162259
```
163260

164261
Output:
@@ -194,6 +291,28 @@ Output:
194291
| Portable app format | 11.6 | New deployment format | None |
195292
```
196293

294+
#### `SHOW UPGRADE OPPORTUNITIES`
295+
296+
When connected, analyzes the current project for patterns that could benefit from the project's own version or a target version:
297+
298+
```sql
299+
-- What can I improve using my current version's capabilities?
300+
SHOW UPGRADE OPPORTUNITIES;
301+
302+
-- What would upgrading to 11.6 enable?
303+
SHOW UPGRADE OPPORTUNITIES TO 11.6;
304+
```
305+
306+
Output:
307+
```
308+
| Opportunity | Target | Description | Effort |
309+
|----------------------------|---------|------------------------------------------------------|--------|
310+
| Page parameters | 11.0 | 12 pages use NP entity workaround for parameter passing | Low |
311+
| Design properties v3 | 11.0 | 8 containers could use Card style / row wrap | Low |
312+
| REST query parameters | 11.0 | 3 REST clients build query strings manually | Low |
313+
| Database runtime connection| 11.0 | 2 microflows hardcode DB connection | Low |
314+
```
315+
197316
#### `SHOW DEPRECATED`
198317

199318
Lists deprecated patterns in the current project:
@@ -368,14 +487,25 @@ MDL Layer Executor pre-checks "Will this work?"
368487
BSON Layer Schema Registry "How do I serialize this?"
369488
```
370489

371-
## Open Questions
490+
## Design Decisions
372491

373-
1. **YAML vs JSON for registry?** YAML is more readable for humans editing it; JSON is easier to parse. Could use YAML as source, compile to embedded JSON at build time.
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.
374493

375-
2. **Granularity of features?** Per-statement (`CREATE VIEW ENTITY`), per-property (`Params:` on pages), or per-concept (`view_entities`)? Probably per-concept with per-property notes.
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:
495+
496+
```yaml
497+
oql_functions:
498+
string_length: { introduced: "10.8" }
499+
date_diff: { introduced: "10.12" }
500+
coalesce: { introduced: "10.14" }
501+
database_connector:
502+
basic_query: { introduced: "10.6" }
503+
parameterized_query: { introduced: "10.12" }
504+
runtime_connection: { introduced: "11.0" }
505+
```
376506
377-
3. **Should SHOW FEATURES work without a connected project?** Could accept `SHOW FEATURES FOR VERSION 10.24` without needing an MPR file. Useful for planning.
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).
378508

379-
4. **How to handle patch-level differences?** Most changes are at the minor level, but some patch releases introduce fixes. Use minor as the default, with patch-level overrides where needed.
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.
380510

381-
5. **Should the upgrade advisor be interactive?** E.g., `mxcli upgrade --from 10.24 --to 11.6 --dry-run` that shows a migration plan and optionally applies changes.
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.

0 commit comments

Comments
 (0)