semantic-difflisted
Install: claude install-skill Cadasto/openehr-assistant-plugin
# Semantic Diff
Compare two openEHR artefacts at the **semantic** level — not textual. Auto-detect whether the inputs are **archetypes** (ADL) or **templates** (OET, `.t.json`, OPT, web template), and whether the comparison is between two **versions** of the same concept or between **siblings / distinct concepts**, then produce the appropriate report.
## Instructions
1. Parse **$ARGUMENTS** into `<file-a>` and `<file-b>`. When invoked from conversation rather than `/semantic-diff` (no arguments), take the two artefact paths (or CKM ids) from the user's request. If only one artefact is identifiable, ask the user for the second and stop.
2. `Read` both files.
3. `Read` the rubric bundled with this skill — [`references/semantic-diff-rubric.md`](references/semantic-diff-rubric.md). Follow its classification rules exactly.
4. **Detect the artefact type** from the file content/extension:
- **Archetype** — ADL source (`.adl`; `archetype (...)` header, `definition`, `term_definitions`). Load the archetype rules guide:
```
guide_get("openehr://guides/archetypes/rules")
```
- **Template** — one of four serialisations; load the template rules guide, plus the serialisation map when the pair is not OET:
```
guide_get("openehr://guides/templates/rules")
guide_get("openehr://guides/templates/serialization-formats")
```
- **OET** (`.oet`) — authoring XML, `<template>`: diff archetype includes and `<Rule>` narrowing.
- **`.t.json`** — Arch