authoring-cli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,232 @@
1
+ # Reviewing concepts against SNOMED CT terminology standards
2
+
3
+ `authoring-cli review-concepts` fetches the full representation — descriptions, relationships,
4
+ axioms — for every concept with pending stated changes on the task. It performs no validation of
5
+ its own; it exists purely to hand you the content to judge. This file is that judgment: a checklist
6
+ for whether the content is *right*, not whether it saves. A concept can be perfectly well-formed by
7
+ Snowstorm's own rules and still be wrong SNOMED CT content — a bad FSN, an inappropriate semantic
8
+ tag, an under-modelled definition, a primitive concept that should be sufficiently defined — because
9
+ none of that is a save-time constraint Snowstorm enforces. It's an editorial judgment call, which is
10
+ what this checklist is for.
11
+
12
+ Read each concept's real, current descriptions and axioms from `review-concepts`'s output — not a
13
+ note from earlier in the session; a concept can have changed since you last looked at it.
14
+
15
+ ## Naming conventions — apply without fetching anything
16
+
17
+ These are stable, general SNOMED CT Editorial Guide rules that apply to every concept regardless of
18
+ hierarchy, confirmed against the guide's `general-naming-conventions/` section:
19
+
20
+ - **No articles.** "Neoplasm of respiratory tract", not "Neoplasm of the respiratory tract" — omit
21
+ "the"/"a"/"an" from every description.
22
+ - **No abbreviations or acronyms in the FSN.** Allowed in a PT/synonym only with the expansion given
23
+ alongside it (`IBD - inflammatory bowel disease`). The FSN prohibition has real exceptions:
24
+ organism names, allergen components, long-established acronyms ("laser"), imaging modality
25
+ abbreviations (CT, MRI), rare-disease acronyms, and protein nomenclature — don't flag those as
26
+ violations.
27
+ - **Eponyms take no apostrophe-s by default** ("Down syndrome", not "Down's syndrome"), *except*
28
+ when the name naturally ends in "s" already, where the apostrophe alone is correct ("Meigs'
29
+ syndrome", not "Meigs syndrome" or "Meig's syndrome"). This is narrower than "common usage
30
+ decides" — check the actual published form rather than guessing from familiarity.
31
+ - **Morphology-to-anatomy preposition is "of", not "in"** — "Cyst of scalp", not "Cyst in scalp".
32
+ - **FSN uniqueness is case-sensitive.** Two FSNs differing only in capitalization ("Weak e
33
+ phenotype" vs "Weak E phenotype") are both legal and distinct — don't assume a near-duplicate hit
34
+ in `search-concepts` is the same concept without checking case.
35
+ - **FSN structure**: US English spelling, singular nouns, procedures stated in present tense, ending
36
+ in a semantic tag. No hyphens, no forward/backslashes, no numeric ranges, no "OR" (the disjunctive
37
+ "and/or" is the one allowed exception, lowercase), no reference to a specific instance, and — for
38
+ a procedure — no reason/indication baked into the name unless it actually changes the method.
39
+ - **Character limit is 4,096 per description** (FSN, PT, synonym, or text definition alike) — this
40
+ is generous enough that hitting it at all is itself worth double-checking, not a routine
41
+ constraint to design around.
42
+ - **US English in the International Edition; GB (and other dialect) spellings live in language
43
+ refsets only** — this is the same rule `SKILL.md`'s spelling-variant section already covers for
44
+ authoring; here it's a review check, not an authoring step.
45
+
46
+ ## Semantic tags and case significance
47
+
48
+ - **The semantic tag must name the concept's actual domain**, and disambiguates two concepts that
49
+ would otherwise share a term — "Hematoma (morphologic abnormality)" vs "Hematoma (disorder)" are
50
+ different concepts precisely because of the tag, not the same concept tagged two ways. A concept
51
+ filed with a tag that doesn't match how it's actually being used (e.g. a body-structure concept
52
+ carrying a `(finding)` tag) is a real content bug, not cosmetic.
53
+ - **A `(disorder)`-tagged concept must have `Disease (disorder)` as a parent or ancestor.** A
54
+ finding promoted to `(disorder)` without that ancestry is a common and easy-to-miss modelling
55
+ error — check it whenever you're reviewing a newly-tagged disorder.
56
+ - **Case significance** (`entireTermCaseSensitive` / `caseInsensitiveInitialLetter` /
57
+ `entireTermCaseSensitive` false, i.e. `ci`/`cI`/`CS`) should follow whether changing case would
58
+ change meaning: `CS` for things like "pH measurement" or "Down syndrome" where a capitalization
59
+ change alters the term itself; `cI` where only the first letter's case is free (most ordinary
60
+ clinical terms); `ci` where nothing case-sensitive occurs at all. A capitalized organism species
61
+ name ("Rubella virus") set to `ci`, or a lowercase disease-of-that-organism term ("rubella
62
+ syndrome") set to `CS`, are both worth flagging — the rule differs between naming the organism and
63
+ naming the disease it causes.
64
+
65
+ ## Modelling-quality checks
66
+
67
+ Read the axiom from `get-concept`, not a cached summary, and check:
68
+
69
+ - **Multiple stated parentage is clinically coherent** — each parent should independently be true of
70
+ the concept, not just "close enough" to the intended meaning. This is a judgment call distinct
71
+ from whether one stated parent is redundant given another (e.g. one is an ancestor of the other) —
72
+ that's a save-time drools check Snowstorm already runs (`Concept should not contain any
73
+ redundantly stated IsA relationships`, surfaced by `validate-concept` and every write; see
74
+ `SKILL.md`'s "Redundant stated Is-a relationships" section), not an editorial call for this
75
+ checklist to duplicate.
76
+ - **Attribute values aren't more general than the concept's position in the hierarchy implies.** A
77
+ specific disorder with an unusually generic `Finding site` is worth a second look even if nothing
78
+ rejects the save.
79
+ - **Grouping matches the Editorial Guide's grouping rules, not just "doesn't 409".** `Finding
80
+ site`/`Associated morphology` are grouped together whenever both are present and related to the
81
+ same nexus; `Occurrence`, `Causative agent`, and `Pathological process` join that same group when
82
+ they refer to it too. Attributes that describe the *whole* concept rather than one nexus —
83
+ `Associated with`, `Before`/`During`/`After`, `Due to`, `Clinical course`, `Temporally related to`
84
+ — are correctly self-grouped (ungrouped), and `Interprets`/`Has interpretation` group only with
85
+ each other. A concept where everything landed in one group, or where a self-grouped attribute got
86
+ swept into a clinical-finding group, has had its actual meaning changed even though it validates —
87
+ this is the judgment layer behind the `add-relationship --group N` compaction hazard documented in
88
+ `SKILL.md`.
89
+ - **Primitive vs. sufficiently-defined status is appropriate, not just consistent with the source
90
+ concept.** A concept should be sufficiently defined when its stated relationships are "adequate to
91
+ define it relative to its immediate supertypes" — i.e. another concept with the same parent and
92
+ the same attribute values would in fact be the same concept. If the defining attributes don't
93
+ actually distinguish it from siblings, it's genuinely primitive and forcing `FULLY_DEFINED` status
94
+ on it (or on a structurally-parallel batch generated from it — see `SKILL.md`'s substitution
95
+ pattern) misrepresents it, regardless of what `definitionStatus` the source concept happened to
96
+ carry.
97
+ - **The axiom should already be in authoring form** — Is-a the proximal primitive parent(s) plus
98
+ every currently-inferred attribute, not a more specific stated parent the classifier could
99
+ re-derive on its own. Unlike the judgment calls elsewhere in this checklist, this one is
100
+ mechanically checkable rather than a call to weigh, and `validate-review-concepts` already
101
+ surfaces it as a `WARNING` on any concept it can determine — you don't need a separate pass just
102
+ to notice it. Run `check-authoring-form --id <id>` per concept, or `get-concepts-for-review
103
+ --check-authoring-form` to check the whole review batch at once, only when you want the answer
104
+ without running full validation, or need the ones `validate-review-concepts` stays silent on
105
+ (not classified since the last stated edit, or more than one active class axiom). Treat anything
106
+ either surfaces as a warning, not a candidate for editorial debate — fix it with
107
+ `transform-axiom --id <id>`, and see `SKILL.md`'s "Collapsing an axiom to the standard authoring
108
+ form" for what that does and the one case it can't check (a concept that hasn't been classified
109
+ since its last stated edit).
110
+ - **MRCM domain/range conformance isn't fully visible from `get-concept` or `validate-concept`.**
111
+ Both surface Snowstorm's save-time checks, which catch cardinality and some domain/range
112
+ violations, but not every MRCM constraint is enforced synchronously at save. If an attribute's
113
+ appropriateness for the concept's domain is in doubt, cross-reference the MRCM reference sets (or
114
+ ask a colleague with editorial authority) rather than treating a clean save as confirmation.
115
+ - **Inactive descriptions still referenced by active relationships** are a known data-quality gap —
116
+ worth a targeted look when reviewing a concept that's had recent description churn.
117
+
118
+ ## Terminology quality issues to scan for
119
+
120
+ - **Synonym conflation** — a preferred term and an acceptable synonym on the same concept that
121
+ actually name two different clinical ideas, not two names for the same one.
122
+ `set-acceptability`/`add-description` will happily save either shape; only reading the terms
123
+ side by side catches the conflation.
124
+ - **No relationships beyond `Is a`** — likely under-modelled for a concept whose hierarchy position
125
+ implies it should carry at least one defining attribute (e.g. a disorder with no `Finding site`
126
+ or `Associated morphology` at all, when siblings all have one).
127
+ - **A parenthetical qualifier inside the FSN body, distinct from the semantic tag** — sometimes a
128
+ legitimate disambiguator, but can also signal that the concept should have been split, or that the
129
+ qualifying detail belongs in the definition/attributes instead of the name.
130
+ - **Value-set-style checks**: if the review surfaces a group of concepts meant to function as a set
131
+ (a batch you just authored, or an existing reference set), confirm every member is active — an
132
+ inactive code hiding inside an otherwise-active set is easy to miss one at a time and obvious once
133
+ counted.
134
+
135
+ ## Historical associations for inactive concepts encountered during review
136
+
137
+ If reviewing a reference chain leads to an inactive concept (an existing inactive target picked up
138
+ by `search-concepts`, or one you're about to inactivate yourself — see `SKILL.md`'s "Delete or
139
+ inactivate?"), `get-concept`'s association data is more informative than the inactivation reason
140
+ alone. Read the association type precisely, since each implies a different next step:
141
+
142
+ - `SAME AS` / `REPLACED BY` — a direct replacement exists; point new references at it.
143
+ - `WAS A` — only a partial or approximate replacement; don't auto-substitute, review the fit.
144
+ - `POSSIBLY EQUIVALENT TO` — genuinely uncertain; flag for a human editorial decision rather than
145
+ guessing.
146
+ - No association at all — retired with nothing to replace it; document that as a gap rather than
147
+ silently picking the nearest active concept.
148
+
149
+ ## Domain-specific modelling — consult the Editorial Guide, don't guess
150
+
151
+ The rules above are the ones stable enough to hold in your head across every hierarchy. Beyond
152
+ them, modelling correctness is domain-specific, and the SNOMED CT Editorial Guide is the
153
+ authoritative source — fetch the relevant page when you're about to make an editorial judgment on a
154
+ concept of that type, not speculatively for every review:
155
+
156
+ ```
157
+ https://raw.githubusercontent.com/SNOMED-Documents/snomed-editorial-guide/main/readme/authoring/
158
+ ```
159
+
160
+ | Concept type being reviewed | Fetch |
161
+ |---|---|
162
+ | Clinical finding / Disorder | `domain-specific-modeling/clinical-finding-and-disorder/README.md` |
163
+ | Clinical finding attributes | `domain-specific-modeling/clinical-finding-and-disorder/clinical-finding-attributes-summary.md` |
164
+ | Procedure | `domain-specific-modeling/procedure/README.md` |
165
+ | Body structure | `domain-specific-modeling/body-structure/README.md` |
166
+ | Morphologic abnormality | `domain-specific-modeling/body-structure/index-2/README.md` |
167
+ | Observable entity | `domain-specific-modeling/observable-entity/README.md` |
168
+ | Organism | `domain-specific-modeling/organisms/README.md` |
169
+ | Substance | `domain-specific-modeling/substances/README.md` |
170
+ | Qualifier value | `domain-specific-modeling/qualifier-value/README.md` |
171
+ | Situation with explicit context | `domain-specific-modeling/situation-with-explicit-context/README.md` |
172
+ | Pharmaceutical / biologic product | `domain-specific-modeling/pharmaceutical-biologic-product/README.md` |
173
+ | Physical object | `domain-specific-modeling/physical-object/README.md` |
174
+ | Record artifact | `domain-specific-modeling/record-artifact/README.md` |
175
+ | Staging and scales | `domain-specific-modeling/staging-and-scales/README.md` |
176
+ | Event | `domain-specific-modeling/event/README.md` |
177
+ | Relationship grouping rules | `general-modeling/relationship-group.md` |
178
+ | Sufficiently defined vs. primitive | `general-modeling/sufficiently-defined-vs-primitive-concept.md` |
179
+ | GCIs | `general-modeling/general-concept-inclusions-gcis.md` |
180
+ | Semantic tags | `general-naming-conventions/descriptions/semantic-tags/index.md` |
181
+ | Case significance | `general-naming-conventions/case-significance.md` |
182
+ | FSN rules specifically | `general-naming-conventions/descriptions/fully-specified-name.md` |
183
+ | Preferred Term rules | `general-naming-conventions/descriptions/preferred-term.md` |
184
+
185
+ The general naming-conventions and grouping/primitive-vs-defined pages above have been checked
186
+ against the rules stated earlier in this file; the domain-specific pages haven't all been read in
187
+ full — treat the table as where to look, confirm what it says before relying on a specific claim
188
+ from a page not summarized here, and strip GitBook markup (`{% hint %}` blocks, feedback-button
189
+ `<a>` tags) from whatever comes back.
190
+
191
+ ## Verifying concept meaning against the professional literature
192
+
193
+ The checks above assume you already know what the concept is supposed to mean — that you can
194
+ recognise a synonym conflation, judge whether an attribute value is too generic, or confirm an
195
+ eponym's published form. When the concept's subject matter is genuinely unfamiliar or ambiguous,
196
+ that assumption doesn't hold, and guessing at a plausible-sounding meaning risks signing off on
197
+ content that's wrong in a way none of the mechanical checks catch. In that case, web search for
198
+ reputable professional publications before making the call, not instead of it.
199
+
200
+ Reach for a search when:
201
+
202
+ - A description names a term you don't already recognise, or one that reads as plausibly meaning
203
+ two different clinical ideas — before deciding whether it's a synonym conflation or two
204
+ legitimate names for the same thing.
205
+ - An eponym's possessive form isn't obviously covered by the general rule above — confirm the
206
+ actual published form rather than guessing from familiarity.
207
+ - An attribute value (finding site, associated morphology, causative agent, and the like) looks
208
+ plausible from the axiom alone but you can't independently confirm it's the value a domain
209
+ expert would actually assert.
210
+ - The concept sits in a domain you don't have working familiarity with — a specific lab assay, a
211
+ rare syndrome, a device class — where the alternative to searching is silently endorsing content
212
+ on the strength of the name alone.
213
+
214
+ "Reputable" here means specialty society or college guidelines, peer-reviewed journal articles,
215
+ established clinical/technical textbooks, WHO or other national-authority classifications, and
216
+ regulatory or manufacturer documentation for substances and devices. General-audience sites, forum
217
+ answers, and unsourced summaries can point toward a real source but aren't themselves a basis for
218
+ an editorial decision — follow them to something citable before relying on it.
219
+
220
+ This is an input to the judgment calls already in this checklist, not a separate pass with its own
221
+ pass/fail criteria — a search that confirms existing content needs no write-up; one that changes a
222
+ decision should say what it found and where.
223
+
224
+ ## What this checklist is not
225
+
226
+ This is an editorial review, not a validation run — it doesn't check what Snowstorm enforces at
227
+ save time (MRCM cardinality, description constraints, and the like), and it isn't a substitute for
228
+ whatever command does check that. Almost nothing here can be delegated to a CLI flag: the whole
229
+ point of this pass is judging whether content is *right*, not whether it saves, which is exactly the
230
+ kind of residue no command can absorb. Authoring-form conformance is the one exception — it has a
231
+ single correct shape, not a range of defensible ones, so it's checked with `check-authoring-form`
232
+ rather than judged by eye; everything else above still needs a human or agent's editorial read.