colregs 0.3.0 → 0.3.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.
Files changed (44) hide show
  1. package/README.md +13 -11
  2. package/data/applicability.json +478 -503
  3. package/data/facts.json +22 -22
  4. package/data/geometry.json +8 -8
  5. package/data/i18n/en.json +27 -0
  6. package/data/i18n/fi.json +25 -0
  7. package/data/images.json +32 -32
  8. package/data/operations.json +79 -0
  9. package/data/rules.json +5 -0
  10. package/data/version.json +1 -1
  11. package/docs/adr/0006-json-schema-and-identifier-diff.md +2 -0
  12. package/docs/adr/0011-api-shape.md +7 -7
  13. package/docs/adr/0012-trace-and-rule2-departure-api.md +2 -2
  14. package/docs/adr/0014-engine-interface-owned-by-colregs.md +103 -0
  15. package/docs/adr/0015-rule-ids-are-paragraph-keys.md +191 -0
  16. package/docs/adr/0016-encounter-roles-are-pooled-across-frames.md +82 -0
  17. package/docs/adr/0017-closed-vocabularies-are-prefixed-identifiers.md +105 -0
  18. package/docs/budgets.json +8 -15
  19. package/docs/decisions.md +6 -0
  20. package/docs/identifiers.md +121 -109
  21. package/docs/maritime-sources.md +58 -0
  22. package/docs/normative-language.md +103 -0
  23. package/docs/part-b-invariants.md +48 -45
  24. package/docs/requirements.md +147 -138
  25. package/fixtures/applicability-fixtures.json +190 -190
  26. package/fixtures/situation-fixtures.json +870 -599
  27. package/package.json +1 -1
  28. package/schema/applicability-fixtures.schema.json +4 -13
  29. package/schema/applicability.schema.json +77 -77
  30. package/schema/conduct-evaluation.schema.json +135 -0
  31. package/schema/display-evaluation.schema.json +146 -0
  32. package/schema/encounter-evaluation.schema.json +109 -0
  33. package/schema/evaluation.schema.json +149 -0
  34. package/schema/fact-record.schema.json +30 -0
  35. package/schema/facts.schema.json +4 -4
  36. package/schema/i18n-catalog.schema.json +47 -0
  37. package/schema/operations.schema.json +124 -0
  38. package/schema/rule2-departure-finding.schema.json +72 -0
  39. package/schema/rule2-departure-model.schema.json +159 -0
  40. package/schema/situation-fixtures.schema.json +30 -127
  41. package/schema/situation.schema.json +72 -0
  42. package/schema/trace.schema.json +33 -0
  43. package/data/deprecated-identifiers.json +0 -7
  44. package/schema/deprecated-identifiers.schema.json +0 -29
package/README.md CHANGED
@@ -35,7 +35,6 @@ data/facts.json the fact record, and how to decode SignalK navigation.s
35
35
  data/applicability.json predicate -> lights, each entry also carrying modality, citation, jurisdiction
36
36
  data/geometry.json Annex I: heights, spacings, colour, intensity
37
37
  data/images.json every image, its source, and what it illustrates
38
- data/deprecated-identifiers.json retired identifiers: what they denoted, when, and their replacement
39
38
  images/ 38 USCG diagrams + 5 arc GIFs
40
39
  fixtures/ fact records and the entries that apply to them
41
40
  ```
@@ -82,13 +81,13 @@ loses.
82
81
 
83
82
  **Applicability entries.** Each is a predicate over facts, a set of lights or
84
83
  references to other entries, a modality, a citation, and a jurisdiction. Every
85
- entry has an id (`25b`, `27a-mw`) a consumer can point at.
84
+ entry has an id (`rule:25b`, `rule:27a_iii`) a consumer can point at.
86
85
 
87
- **Identifiers.** Citation-derived ids (paragraph paths, entry ids) carry no
88
- prefix, because the path *is* the citation. Vocabulary ids do:
86
+ **Identifiers.** Paragraph paths carry no prefix, because the path *is* the
87
+ citation. Every other id names its namespace: `rule:30a`,
89
88
  `light:masthead`, `fact:activity`, `activity:nuc`, `rel:in_lieu_of`. Every
90
- identifier is immutable once published; retirements go through
91
- [`data/deprecated-identifiers.json`](data/deprecated-identifiers.json). See
89
+ identifier is immutable from 1.0.0; before then it may be renamed or
90
+ discarded outright, and the deprecation registry is absent. See
92
91
  [`docs/identifiers.md`](docs/identifiers.md).
93
92
 
94
93
  ## Design
@@ -144,16 +143,16 @@ paragraphs prevails is a relation.
144
143
  | `rel:exempts` | the referenced requirement does not apply (30(e)) |
145
144
  | `rel:overrides` | this paragraph's requirement prevails over the referenced one's when both apply (Rule 18; Rule 26(a) over Rule 30's anchor lights) |
146
145
 
147
- Modality is `shall`, `may`, `shall-if-practicable`, `shall-not`,
148
- `shall-not-impede`, or `conditional` with a `modality_by` table when it turns
146
+ Modality is `modality:shall`, `modality:may`, `modality:shall-if-practicable`, `modality:shall-not`,
147
+ `modality:shall-not-impede`, or `modality:conditional` with a `modality_by` table when it turns
149
148
  on a fact.
150
149
 
151
150
  Most entries read one vessel and produce lights. The Part B entries read
152
151
  **two**, a situation rather than a fact record, and produce an `effect`:
153
152
  which section governs, which vessel gives way, whether the encounter is
154
- `head-on`, `crossing` or `overtaking`. They address each vessel through a
155
- subject segment (`own:fact:activity`, `other:fact:propulsion`,
156
- `pair:geo:in_sight`); a key with no subject means `own:`. The encounter
153
+ `encounter:head-on`, `encounter:crossing` or `encounter:overtaking`. They address each vessel through a
154
+ subject segment (`self:fact:activity`, `other:fact:propulsion`,
155
+ `pair:geo:in_sight`); a key with no subject means `self:`. The encounter
157
156
  sectors partition relative bearing, so no crossing sector is enumerated and
158
157
  none can drift. [`docs/identifiers.md`](docs/identifiers.md) has the
159
158
  vocabulary, [`docs/part-b-invariants.md`](docs/part-b-invariants.md) the
@@ -178,6 +177,9 @@ both vessels give-way.
178
177
  `fixtures/applicability-fixtures.json` and `fixtures/situation-fixtures.json`
179
178
  are the cross-implementation contract: an implementation in any language
180
179
  should reproduce those exactly.
180
+ [`data/operations.json`](data/operations.json) names the verbs an engine
181
+ implements and binds each to its input schema, its result schema and the
182
+ fixture file that exercises it ([ADR 0014](docs/adr/0014-engine-interface-owned-by-colregs.md)).
181
183
 
182
184
  ## Provenance and licence
183
185