Repository navigation
openehr-specs: scaffold a computable/BMM schema in new repositories - #9
Merged
Merged
Conversation
…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>
4 of 6 tasks
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.
Summary
/openehr-specs:scaffoldnow gives a new repository a BMM schema incomputable/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 idbmmwith the new strategybmm-seed.initmode the script lists the schemas that the localghcr.io/openehr/bmm-publisherimage bundles in/app/resources, and copies the highestopenehr_<component>_<x.y.z>byte for byte. It usesdocker run --pull never, so planning never downloads anything.openehr_<component>_<first_release>. Its header followsP_BMM_SCHEMA/BMM_SCHEMA_CORE(LANGbmm_persistence): BMM version 2.4, revision<release>.1, statedevelopment. It has one root packageorg.openehr.<name>, no classes, and BASE inincludesfor 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.bmmfile isblocked; the other files are still written. The detail says how to proceed: start Docker ordocker pulland plan again, or pass--var bmm_schema_id=<id>to create the empty schema without the check.skipped);--overwrite bmmasks for one. Migration0003.jsonhas no steps.derivedvariables can now take a regex group (match+group). That gives the newbmm_schema_nameandbmm_rm_release. The schema id is decided before the other files are planned, soAGENTS.mdnames the file that will be written and loads BASE with-d.SKILL.md (the new
blocked/skippedactions, the finish step),references/maintaining.md(strategy table, inference, the grounding for the empty template, known limits), the rootAGENTS.mddependencies, the plugin README and the CHANGELOG are updated.Verification
dockerby default so the host's Docker never leaks in.latest), in throwaway repos with a sibling BASE clone:specifications-XYZ: got the emptyopenehr_xyz_0.1.0with BASE included. The class-table command from its generatedAGENTS.mdexited 0; the only output was the expected "Empty package org.openehr.xyz" warning. A second run reports the schema asexists.specifications-TERM: gotopenehr_term_3.1.0, byte-identical tobmm-publisher/resources/openehr_term_3.1.0.bmm.json.Known limit
initmeans none of the standard files exists yet, so a new repository that already has, for example, aREADME.mdneeds--overwrite bmm. This is listed inmaintaining.md.Checklist
python3 scripts/validate.pyandpython3 -m unittest discover -s scripts -p 'test_*.py'passscaffoldis 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.Unreleased; no version bumpP_BMM_SCHEMAandBMM_SCHEMA_CORE; theincludesform, the version and the naming come from the RM, LANG and BASE schemas.🤖 Generated with Claude Code