Skip to content
gluon

Your model as code

GOL is Gluon’s YAML ontology language: domains, objects, links, actions and policies in versioned files. Structure is JSON Schema 2020-12, every expression is CEL, and gluon validate checks every file before you publish.

Package
gluon-gol
Source
crates/gluon-gol
links.yamldomains/procurement/links.yaml
apiVersion: gluon/v1kind: LinkTypemetadata: {name: SupplierHoldsContract}spec:  semantics: association  from: {type: party.Supplier, role: supplier,  multiplicity: "1"}  to:   {type: Contract,       role: contracts, multiplicity: "0..*"}  backing: {kind: foreignKey, holder: to, property: supplierId}  onDelete: {from: restrict}
LinkType · SupplierHoldsContractComments and key order are kept
Problemsgluon validate

gluon validate examples/contoso

No errors. The validation passes ran over the package.

Exits 1 when there are errors. A reference that does not resolve names the nearest match as the fix.

What it does

§1The model

Domains, objects, links and actions in plain YAML.

29 kinds, from ObjectType and LinkType to Policy, Segment and Capability. The designer edits the same files and keeps your comments and key order when you switch between the two.

links.yamldomains/procurement/links.yaml
apiVersion: gluon/v1kind: LinkTypemetadata: {name: SupplierHoldsContract}spec:  semantics: association  from: {type: party.Supplier, role: supplier,  multiplicity: "1"}  to:   {type: Contract,       role: contracts, multiplicity: "0..*"}  backing: {kind: foreignKey, holder: to, property: supplierId}  onDelete: {from: restrict}
  1. Line 2LinkType, one of 29 kindsFrom ObjectType and LinkType to Policy, Segment and Capability.
  2. Lines 5–9The designer edits the same fileIt keeps your comments and key order.

§2The 29 kinds

29 kinds. One file format.

GOL is YAML in versioned files. Structure is JSON Schema 2020-12, every expression is CEL, and gluon validate checks every file before you publish. Each kind wears the tile the designer gives it and opens its page in the manual.

  1. Package and domains3

  2. Objects and links3

  3. Values4

  4. Behaviour4

  5. Sources and AI6

  6. Security5

  7. Versions and tests4

Each kind opens its page in the manual.

§3Validation

Checked before anything ships.

gluon validate runs the validation passes over a package and exits 1 when there are errors. A reference that does not resolve names the nearest match as the fix.

§4Policies

Rules next to the model, as CEL.

Who may do what, on which resources, over which channels, with which obligations. Conditions are CEL expressions, checked against the schema of your model.

renew-contracts.yamlsecurity/policies/renew-contracts.yaml
apiVersion: gluon/v1kind: Policymetadata: {name: renew-contracts}spec:  effect: allow  subjects: {anyOf: ["audience:emea-procurement"], where: "subject.clearance >= 2"}  actions: [execute]  resources:    - select: {domain: procurement, names: [RenewContract]}  context: {channels: [chat, apps, api]}  obligations:    - audit: full
  1. Line 6A condition in CELChecked against the schema of your model.
  2. Lines 10–12Channels and obligationsOver which channels, with which obligations.

§5Tests

Expected access and answers, in the package.

Test cases state who may read or act and what an answer must cite or never mention. gluon eval runs them, so a change that would leak a negotiated rate fails its test.

contract-access.yamltests/contract-access.yaml
kind: Testmetadata: {name: contract-access}spec:  access:    - {subject: anna, action: execute, type: procurement.RenewContract, channel: mcp, expect: deny}    - {subject: bob,  action: discover, type: procurement.Contract, expect: deny}  answers:    - subject: anna      question: Which supplier contracts renew next month?      expect: answer      cites: [c1]      neverMentions: ["4.5"]
  1. Lines 5–6Who may read or actgluon eval runs the cases.
  2. Lines 11–12What an answer must cite or never mentionA change that would leak a negotiated rate fails its test.

When to use it

  1. You want the business model in Git, reviewed like code.

  2. Several teams need one definition of business context.

  3. Policies, markings and tests belong next to the model they govern.

Try it

Build the CLI and validate Contoso, the complete example package in the repository.

The repository opens with the public release.

Terminal
cargo build --release -p gluon-clitarget/release/gluon validate examples/contoso   # validate the 60-resource example package

Questions

Do we need the designer to write GOL?

No. GOL is YAML in files you keep in Git. The designer is an editor for the same files, never a second model.

Which licence covers GOL?

The language, the schema and the validator are part of the core, under EUPL-1.2.

How many kinds does GOL have?

29 today, from Package and Domain to Skill, Query and ExtractionProfile, each with its JSON Schema.

The rest

  • The core with the decision point

    gluon

    Use it when every channel must follow the same rules, next to your sources.

    gluon serve

  • The ontology builder

    gluon-miner

    Use it when you start from your sources and want a first model from them.

    gluon-miner run