Skip to content

openehr-specs: scaffold a computable/BMM schema in new repositories - #9

Merged
sebastian-iancu merged 1 commit into
mainfrom
feat/openehr-specs-scaffold-bmm
Oct 9, 2026
Merged

sebastian-iancu merged 1 commit into
mainfrom
feat/openehr-specs-scaffold-bmm

Conversation

@sebastian-iancu

Copy link
Copy Markdown
Member

Summary

/openehr-specs:scaffold now gives a new repository a BMM schema in computable/BMM/, laid out as in BASE and RM, so class generation works from the first commit. This is scaffold template set revision 3, which adds file id bmm with the new strategy bmm-seed.

  • Bundled schema. In init mode the script lists the schemas that the local ghcr.io/openehr/bmm-publisher image bundles in /app/resources, and copies the highest openehr_<component>_<x.y.z> byte for byte. It uses docker run --pull never, so planning never downloads anything.
  • Empty schema. When the image bundles none (it has schemas only for AM, BASE, LANG, RM and TERM), the script renders openehr_<component>_<first_release>. Its header follows P_BMM_SCHEMA/BMM_SCHEMA_CORE (LANG bmm_persistence): BMM version 2.4, revision <release>.1, state development. It has one root package org.openehr.<name>, no classes, and BASE in includes for other components, as in RM and LANG. bmm-publisher refuses a schema without a package ("Schema must contain at least one package"), which is why the root package is there.
  • No Docker or no image. Only the bmm file is blocked; the other files are still written. The detail says how to proceed: start Docker or docker pull and plan again, or pass --var bmm_schema_id=<id> to create the empty schema without the check.
  • Existing repositories are not offered a schema (skipped); --overwrite bmm asks for one. Migration 0003.json has no steps.
  • Variables. derived variables can now take a regex group (match + group). That gives the new bmm_schema_name and bmm_rm_release. The schema id is decided before the other files are planned, so AGENTS.md names the file that will be written and loads BASE with -d.

SKILL.md (the new blocked/skipped actions, the finish step), references/maintaining.md (strategy table, inference, the grounding for the empty template, known limits), the root AGENTS.md dependencies, the plugin README and the CHANGELOG are updated.

Verification

  • 132 unit tests pass, including 15 new ones for the BMM paths. The tests stub docker by default so the host's Docker never leaks in.
  • I ran the script against the real image (0.12.0, latest), in throwaway repos with a sibling BASE clone:
    • specifications-XYZ: got the empty openehr_xyz_0.1.0 with BASE included. The class-table command from its generated AGENTS.md exited 0; the only output was the expected "Empty package org.openehr.xyz" warning. A second run reports the schema as exists.
    • specifications-TERM: got openehr_term_3.1.0, byte-identical to bmm-publisher/resources/openehr_term_3.1.0.bmm.json.

Known limit

init means none of the standard files exists yet, so a new repository that already has, for example, a README.md needs --overwrite bmm. This is listed in maintaining.md.

Checklist

  • python3 scripts/validate.py and python3 -m unittest discover -s scripts -p 'test_*.py' pass
  • Skill triggering tested locally in Claude Code: not done. scaffold is user-only (disable-model-invocation), so its triggering is unchanged. The script was exercised end to end as described above, but not through /openehr-specs:scaffold.
  • Cursor install tested locally: not done. No manifest changes.
  • Both marketplaces: not applicable, no plugin metadata changed
  • CHANGELOG.md updated under Unreleased; no version bump
  • Content grounded in published openEHR specifications: the empty schema's header items come from P_BMM_SCHEMA and BMM_SCHEMA_CORE; the includes form, the version and the naming come from the RM, LANG and BASE schemas.

🤖 Generated with Claude Code

…ries

Template set revision 3 adds a bmm file (strategy bmm-seed). In init mode the script lists the schemas that the local ghcr.io/openehr/bmm-publisher image bundles (docker run --pull never) and copies the highest version for the component; when there is none it renders an empty schema openehr_<component>_<first_release> with one root package and BASE in includes, because bmm-publisher refuses a schema without a package. Without Docker or the image the file is blocked and the rest is still written; existing repositories are not offered a schema unless --overwrite bmm is given. Derived variables gain a regex form (match + group) for bmm_schema_name and bmm_rm_release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sebastian-iancu
sebastian-iancu merged commit 1c145b5 into main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant