AI assistants

The Event Modeling HCL plugin

The plugin teaches Claude, Codex, and ChatGPT the Event Modeling method and the .em.hcl language.

With a Git connector, a team can also view, change, and review one shared model through the assistant. Each change goes to a merge request (MR). A person reviews and merges it.

What the plugin contains

The plugin repository holds two Claude plugins in one marketplace. The name of the marketplace is event-modeling-hcl. Both plugins use the Apache-2.0 license and release together under one tag. The current release is v0.2.0. It targets Specification v0.8.0 and needs emhcl v0.17.0 or newer.

PluginContentsNeeds
event-modeling-skills32 method skills and the event-modeling-hcl language skill. The method skills discover, review, and plan a business model. The language skill owns HCL syntax and emhcl commands.Nothing for business modeling. A shell with emhcl to validate HCL.
event-modeling-hcl-pluginThe em-collaborate skill with six team procedures: em-setup, em-view, em-validate, em-change, em-review, and em-sync.A shell, network access, and a GitLab or GitHub connector.

The same skills are also available in two other packages:

SurfaceModeling guidanceRepository proceduresDiagrams
Claude plugins32 method skills and the language skillSix procedures through the GitLab or GitHub MCP serverClaude artifacts when the app supports them. Otherwise an HTML file.
Local Codex CLI and IDEThe same 33 modeling skillsThe same six procedures through configured Git MCP tools and a shellA local HTML file
ChatGPT and Codex pluginThe same 33 modeling skillsThe same six procedures when a shell and Git MCP tools are availableA local HTML file

The method text uses original wording based on community ideas. Event Modeling comes from Adam Dymitruk at Adaptech Group. The plugin also credits Martin Dilger.

Install the plugin

Claude Code

Add the marketplace, then install the collaboration plugin:

claude plugin marketplace add event-modeling-hcl/event-modeling-hcl-plugin claude plugin install event-modeling-hcl-plugin@event-modeling-hcl

Claude Code also installs event-modeling-skills as a dependency. If you want only the skills without the Git procedures, install event-modeling-skills@event-modeling-hcl instead.

Claude chat and Cowork

Install the two plugins separately from Customize > Plugins. Add the repository through Add > Add marketplace. Alternatively, upload each plugin folder as its own ZIP file through Add > Upload plugin. Each ZIP file must contain .claude-plugin/plugin.json at its root or inside one top-level folder. Do not upload a ZIP file of the whole marketplace repository.

Local Codex CLI and IDE

You need Python 3. In a checkout of the plugin repository, build the package and install it into your model repository:

python3 scripts/build-codex.py python3 scripts/install-codex.py --source dist/codex --project /path/to/model-repo

The installer puts the 34 skills in .agents/skills/ of that repository. To install them for all projects in ~/.agents/skills/, use --user instead of --project. The installer does not replace a skill that already exists. To upgrade a managed installation, add --update. Restart Codex after the installation.

ChatGPT and Codex plugin

In a checkout of the plugin repository, build the plugin and register the repository as a marketplace:

python3 scripts/build-chatgpt.py codex plugin marketplace add /absolute/path/to/event-modeling-hcl-plugin

The builder writes the plugin to dist/chatgpt. The output folder must be absent or empty. Restart the ChatGPT desktop app, select Event Modeling HCL in the Plugins Directory, and install event-modeling-hcl-plugin. To install it in Codex, run:

codex plugin add event-modeling-hcl-plugin@event-modeling-hcl

In Codex, call a plugin skill with its plugin prefix, for example $event-modeling-hcl-plugin:em-collaborate em-view for OWNER/REPOSITORY. Use the plugin or the standalone Codex skills in one session, not both.

The installation does not give access to a repository and does not supply a shell. If the shell, the network, or the Git connector is not available, a repository procedure stops and does not report a result.

Upgrade from the development names

The plugins had other names before v0.1.0. If you installed emhcl@event-modeling-hcl, uninstall it and install event-modeling-hcl-plugin@event-modeling-hcl. If you installed emhcl-skills@event-modeling-hcl, uninstall it and install event-modeling-skills@event-modeling-hcl:

claude plugin uninstall emhcl@event-modeling-hcl claude plugin uninstall emhcl-skills@event-modeling-hcl claude plugin install event-modeling-hcl-plugin@event-modeling-hcl

Model a business workflow

Business modeling in plain words needs no HCL file, no shell, and no Git connector. Each method skill owns one part of the model, for example the events, the read models, the lifecycles, or the command scenarios. The skills exchange questions, decisions, and evidence through the model.

Select the skill by the size of the task:

TaskSkill
A complete event model from start to endeventmodeling-orchestrating-workflow. It runs the gates of the method contract in order.
A live workshop with a groupeventmodeling-facilitating-workshop. It manages participants and time. The specialist skills record the model.
One part of the modelThe specialist that owns the part, for example eventmodeling-brainstorming-events or eventmodeling-writing-command-scenarios.
Syntax repair, formatting, conversion, or a language questionevent-modeling-hcl. It does not repeat the business discovery.

Ask in plain words. The assistant selects the skill. For example:

Make a complete event model for room bookings in a small hotel. List the events of this domain. Write the scenarios of the command open_booking. Repair the EM202 diagnostic in model/20-bookings.em.hcl without a change to the business meaning.

If a discussion follows screens instead of work, ask for a paper-world reset. The skills then follow one real case through its actors, decisions, information, and handoffs.

The language skill targets Specification v0.8.0. It writes the method facts of that version: lifecycles, field sources, evidence, decisions, and dispatch assertions. See Method facts. To validate a model, the language skill runs emhcl v0.17.0 or newer.

A valid model does not prove that it describes the business. A domain expert must review the result. The skills keep an open question as a hotspot and do not invent a business rule to make strict validation pass.

Work on a team model in Git

The collaboration plugin connects the assistant to one model repository on GitLab or GitHub. It does not merge, and it does not write to the default branch.

CommandWhat it doesWrites to Git
em-setupMakes sure that the connector, the validator, and .emhcl.yml are available. If .emhcl.yml is missing, it proposes the file through an MR.Only an MR
em-viewShows a branch as a diagram and answers questions about it.No
em-validateValidates a branch with a profile and explains each diagnostic in plain words.No
em-changeTurns a request in plain words into edits, validates them, publishes a diagram, and opens an MR.A new branch and an MR
em-reviewValidates the head of an MR, lists the changed slices, and publishes a diagram.One comment
em-syncPublishes the shared team diagram again from the default branch.No

In Cowork and Claude Code, run a command with the plugin prefix:

/event-modeling-hcl-plugin:em-change Add a cancellation fee when a guest cancels less than 24 hours before arrival

In Claude chat, ask in plain words. Claude uses the matching procedure.

Each procedure needs one Git connector:

  • GitLab: the official GitLab MCP server. em-change needs GitLab 19.4 or later, because it starts each branch at an exact commit.
  • GitHub: the GitHub MCP server.

Then ask the assistant to run em-setup for your repository.

Set up a model repository

  1. Keep the model in one folder. emhcl reads only the .em.hcl files directly in that folder and ignores subfolders. If the model is for specification v0.4.0, run emhcl migrate -w <folder> first.
  2. Add .emhcl.yml at the root of the repository. em-setup proposes this file.
  3. Add the CI job of your Git host, and use fast-forward merges.

This is the .emhcl.yml of the pet-clinic example:

emhcl_version: 0.17.0 model_path: model branch_prefix: model/ mr_labels: [event-model] reviewers_hint: "slice owner from CODEOWNERS" merge_profile: strict draft_profile: workshop canonical_url: "" team_artifact_url: ""
KeyMeaningValue when absent
emhcl_versionThe emhcl release that the assistant and CI install. Both validate each commit with the same release.None. The installer stops.
model_pathThe folder of the model, relative to the repository root.model
branch_prefixThe start of the name of each new branch.model/
mr_labelsThe labels on each new MR. GitHub pull requests get no labels.[]
reviewers_hintText in the MR description that names the reviewer to ask. The plugin does not assign reviewers.""
merge_profileThe validation profile of the CI gate. If the model fails it, em-change opens a draft MR.strict
draft_profileThe profile of em-view and em-validate when you name no profile.workshop
canonical_urlThe Pages URL where CI publishes the diagram of the default branch.""
team_artifact_urlThe shared Claude artifact that shows the default branch. em-sync publishes to it.""

GitLab CI

Add this include to .gitlab-ci.yml:

include: - remote: https://raw.githubusercontent.com/event-modeling-hcl/event-modeling-hcl-plugin/v0.2.0/ci-templates/emhcl.gitlab-ci.yml inputs: plugin_ref: v0.2.0

Set the merge method to "Fast-forward merge" and turn on "Pipelines must succeed". The job emhcl-validate validates with merge_profile. The job pages publishes the default branch to GitLab Pages.

GitHub Actions

Add this workflow as .github/workflows/model.yml:

on: pull_request: push: branches: [main] jobs: model: uses: event-modeling-hcl/event-modeling-hcl-plugin/.github/workflows/emhcl-model.yml@v0.2.0 with: plugin_ref: v0.2.0 permissions: contents: read pages: write id-token: write

On the default branch, require the status check model / emhcl-validate and a linear history.

Diagrams

GitLab Pages or GitHub Pages shows the canonical diagram of the default branch. em-change and em-review publish one proposal diagram for each MR. The title of each diagram names the branch and the short commit SHA.

If the app can publish artifacts, each new artifact is private. To give access to other people, use the Share button on its page. If the app cannot publish artifacts, the procedure returns the HTML file that emhcl diagram wrote. That file has no shared URL.

Language changes go to the specification and to emhcl, not to the plugin.