fix(plugins): default AML field references to the new r() syntax#20
Merged
Conversation
datbth
approved these changes
Jun 19, 2026
534c551 to
12b364d
Compare
instruct AI to use the new field ref syntax add update r() for reporting skills Update FieldRef documentation to promote new r() syntax over ref() add more details on the field ref in dataset field and model field update notes on adhoc metric and dataset field reference
12b364d to
8f5cb2a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When asked to build a dashboard FilterBlock/VizBlock, the skill agent emitted the old field-reference syntax
ref('model', 'field')instead of the newr(model.field)syntax (https://docs.holistics.io/release-notes/2025-08-field-ref-validation).ref()still works, but new code should user(), which the AML compiler statically typechecks.In
references/aml/type_definitions/data_model.aml,Func ref(model_name, field_name)had a full, copyable signature whileFunc r() {}was an empty stub — so when the agent traced the type defs (FieldFilterSource.field: FieldRef→ a defined function), it copiedref(). The dataset example also usedref('...')in its permission blocks, reinforcing it.Changes
All edits are made in the
holistics-commonsource and propagated toholistics-development/holistics-reportingviapnpm sync-links(thosereferences/dirs are linked copies — hence the 3× file count).data_model.aml—r()is now the documented, canonical builder;ref()is marked legacy. Added a field-kind taxonomy comment covering how to reference each:r(model.field)r(dataset.metric)r(dataset, model.dimension)'name', notr()dataset.aml— one-line pointers onType Metric/Type DatasetDimensionidentifying them as dataset fields and pointing toFunc r()for reference syntax.demo_ecommerce.dataset.aml— converted the 3 permission examples fromref('...', '...')tor(...).car_retails.page.aml— added a FilterBlock (the exact construct the agent got wrong) plus a DataTable that demonstrates every reference form (model field, dataset metric, dataset dimension two-arg, and adhoc-calc-as-string), with inline comments.Verification
grep -rn "ref('" plugins/ | grep -v "rel_config\|relationship("→ no matches.holistics-common).