colregs 0.1.1 → 0.2.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.
- package/LICENSE +194 -26
- package/PROVENANCE.md +45 -12
- package/README.md +222 -23
- package/data/applicability.json +1252 -190
- package/data/deprecated-identifiers.json +7 -0
- package/data/facts.json +556 -113
- package/data/geometry.json +33 -33
- package/data/images.json +51 -25
- package/data/lights.json +35 -35
- package/data/rules.json +787 -3
- package/docs/adr/0001-name-and-jurisdiction-model.md +119 -1
- package/docs/adr/0003-language-as-a-dimension.md +220 -0
- package/docs/adr/0004-licence-layering.md +78 -0
- package/docs/adr/0005-rule-categories-and-the-situation-record.md +323 -0
- package/docs/adr/0006-json-schema-and-identifier-diff.md +95 -0
- package/docs/adr/0007-rule26-overrides-and-aground.md +68 -0
- package/docs/adr/0008-mooring-buoy-modifier.md +87 -0
- package/docs/budgets.json +162 -0
- package/docs/conventions.md +27 -0
- package/docs/gates.json +84 -0
- package/docs/identifiers.md +435 -0
- package/docs/part-b-invariants.md +922 -0
- package/docs/requirements.md +1251 -23
- package/docs/verification/2026-08-30-q6-q8.md +278 -0
- package/docs/verification/2026-09-05-rule27f-rule28-anchor-scenarios.md +330 -0
- package/fixtures/applicability-fixtures.json +361 -227
- package/fixtures/situation-fixtures.json +3673 -0
- package/package.json +16 -4
- package/schema/applicability-fixtures.schema.json +49 -0
- package/schema/applicability.schema.json +401 -0
- package/schema/deprecated-identifiers.schema.json +29 -0
- package/schema/facts.schema.json +793 -0
- package/schema/geometry.schema.json +239 -0
- package/schema/images.schema.json +53 -0
- package/schema/lights.schema.json +131 -0
- package/schema/rules.schema.json +50 -0
- package/schema/situation-fixtures.schema.json +325 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Prose budgets enforced by prose-budget (the engine in dotfiles .local/bin), run locally by npm test and in CI by the shared workflow. Raising a number or adding an exception is a deliberate, reviewable diff.",
|
|
3
|
+
"lines": {
|
|
4
|
+
"README.md": 360,
|
|
5
|
+
"AGENTS.md": 120,
|
|
6
|
+
"CLAUDE.md": 10,
|
|
7
|
+
"docs/requirements.md": 1500,
|
|
8
|
+
"docs/identifiers.md": 450,
|
|
9
|
+
"docs/part-b-invariants.md": 950,
|
|
10
|
+
"docs/adr/0007-rule26-overrides-and-aground.md": 90,
|
|
11
|
+
"docs/adr/0008-mooring-buoy-modifier.md": 90,
|
|
12
|
+
"required": true,
|
|
13
|
+
"pending": []
|
|
14
|
+
},
|
|
15
|
+
"json_prose": {
|
|
16
|
+
"targets": [
|
|
17
|
+
"data/*.json",
|
|
18
|
+
"fixtures/*.json"
|
|
19
|
+
],
|
|
20
|
+
"keys": [
|
|
21
|
+
"note",
|
|
22
|
+
"gap",
|
|
23
|
+
"narrative",
|
|
24
|
+
"settled_by",
|
|
25
|
+
"rationale",
|
|
26
|
+
"why"
|
|
27
|
+
],
|
|
28
|
+
"max_chars": 450,
|
|
29
|
+
"grandfathered": [
|
|
30
|
+
"data/applicability.json#/effects/note",
|
|
31
|
+
"data/applicability.json#/known_omissions/9/why",
|
|
32
|
+
"data/applicability.json#/known_omissions/10/why",
|
|
33
|
+
"data/applicability.json#/known_omissions/11/why",
|
|
34
|
+
"data/applicability.json#/entries/43/note",
|
|
35
|
+
"data/applicability.json#/entries/44/note",
|
|
36
|
+
"data/applicability.json#/entries/45/note",
|
|
37
|
+
"data/applicability.json#/entries/47/note",
|
|
38
|
+
"data/applicability.json#/entries/50/note",
|
|
39
|
+
"data/applicability.json#/entries/51/note",
|
|
40
|
+
"data/applicability.json#/entries/52/note",
|
|
41
|
+
"data/applicability.json#/entries/53/note",
|
|
42
|
+
"data/applicability.json#/entries/55/note",
|
|
43
|
+
"data/applicability.json#/entries/56/note",
|
|
44
|
+
"data/applicability.json#/entries/60/note",
|
|
45
|
+
"data/applicability.json#/entries/61/note",
|
|
46
|
+
"data/applicability.json#/entries/62/note",
|
|
47
|
+
"data/applicability.json#/entries/63/note",
|
|
48
|
+
"data/applicability.json#/entries/64/note",
|
|
49
|
+
"data/applicability.json#/entries/64/gap",
|
|
50
|
+
"data/applicability.json#/entries/65/note",
|
|
51
|
+
"data/applicability.json#/entries/65/gap",
|
|
52
|
+
"data/applicability.json#/entries/66/note",
|
|
53
|
+
"data/applicability.json#/entries/67/note",
|
|
54
|
+
"data/applicability.json#/entries/68/note",
|
|
55
|
+
"data/applicability.json#/entries/68/gap",
|
|
56
|
+
"data/applicability.json#/entries/69/note",
|
|
57
|
+
"data/facts.json#/derived/note",
|
|
58
|
+
"data/facts.json#/derived/fact:rule18_class/note",
|
|
59
|
+
"data/facts.json#/derived/fact:rule18_class/decode/1/note",
|
|
60
|
+
"data/facts.json#/derived/fact:rule18_class/decode/2/note",
|
|
61
|
+
"data/facts.json#/situation/kinematics/kin:wind_side/note",
|
|
62
|
+
"data/facts.json#/situation/geometry/directional/geo:rel_bearing_deg/note",
|
|
63
|
+
"data/facts.json#/situation/geometry/consistency/note",
|
|
64
|
+
"data/facts.json#/situation/history/hist:was_overtaking/note",
|
|
65
|
+
"data/facts.json#/situation/constants/note",
|
|
66
|
+
"fixtures/situation-fixtures.json#/case_status/note",
|
|
67
|
+
"fixtures/situation-fixtures.json#/cases/0/narrative",
|
|
68
|
+
"fixtures/situation-fixtures.json#/cases/1/narrative",
|
|
69
|
+
"fixtures/situation-fixtures.json#/cases/2/narrative",
|
|
70
|
+
"fixtures/situation-fixtures.json#/cases/46/narrative",
|
|
71
|
+
"fixtures/situation-fixtures.json#/cases/63/narrative",
|
|
72
|
+
"fixtures/situation-fixtures.json#/cases/76/narrative",
|
|
73
|
+
"fixtures/situation-fixtures.json#/cases/77/narrative",
|
|
74
|
+
"fixtures/situation-fixtures.json#/cases/78/narrative",
|
|
75
|
+
"fixtures/situation-fixtures.json#/cases/79/narrative"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"narration": {
|
|
79
|
+
"targets": [
|
|
80
|
+
"README.md",
|
|
81
|
+
"AGENTS.md",
|
|
82
|
+
"CLAUDE.md",
|
|
83
|
+
"data/*.json",
|
|
84
|
+
"fixtures/*.json",
|
|
85
|
+
"test/*.mjs",
|
|
86
|
+
"docs/**/*.md"
|
|
87
|
+
],
|
|
88
|
+
"scope": {
|
|
89
|
+
"pr": [
|
|
90
|
+
"README.md",
|
|
91
|
+
"AGENTS.md",
|
|
92
|
+
"CLAUDE.md",
|
|
93
|
+
"data/*.json",
|
|
94
|
+
"fixtures/*.json",
|
|
95
|
+
"test/*.mjs"
|
|
96
|
+
],
|
|
97
|
+
"issue": [
|
|
98
|
+
"README.md",
|
|
99
|
+
"AGENTS.md",
|
|
100
|
+
"CLAUDE.md",
|
|
101
|
+
"data/*.json",
|
|
102
|
+
"fixtures/*.json",
|
|
103
|
+
"test/*.mjs"
|
|
104
|
+
],
|
|
105
|
+
"phase": [
|
|
106
|
+
"README.md",
|
|
107
|
+
"AGENTS.md",
|
|
108
|
+
"CLAUDE.md",
|
|
109
|
+
"data/*.json",
|
|
110
|
+
"fixtures/*.json",
|
|
111
|
+
"test/*.mjs"
|
|
112
|
+
],
|
|
113
|
+
"split": [
|
|
114
|
+
"README.md",
|
|
115
|
+
"AGENTS.md",
|
|
116
|
+
"CLAUDE.md",
|
|
117
|
+
"data/*.json",
|
|
118
|
+
"fixtures/*.json",
|
|
119
|
+
"test/*.mjs"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"grandfathered": [
|
|
123
|
+
{
|
|
124
|
+
"file": "data/applicability.json",
|
|
125
|
+
"hash": "447b3984d57b",
|
|
126
|
+
"match": "PR #24"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"file": "data/applicability.json",
|
|
130
|
+
"hash": "5ff9d39319b8",
|
|
131
|
+
"match": "PR #24"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"file": "docs/conventions.md",
|
|
135
|
+
"hash": "d1f1ed997431",
|
|
136
|
+
"match": "the session"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"file": "docs/requirements.md",
|
|
140
|
+
"hash": "cdbdaf145c0a",
|
|
141
|
+
"match": "seeded 2026-"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"voice": {
|
|
146
|
+
"scope": "tree",
|
|
147
|
+
"targets": [
|
|
148
|
+
"README.md",
|
|
149
|
+
"AGENTS.md",
|
|
150
|
+
"CLAUDE.md",
|
|
151
|
+
"docs/**/*.md",
|
|
152
|
+
"data/*.json",
|
|
153
|
+
"fixtures/*.json"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"unique_ids": [
|
|
157
|
+
{
|
|
158
|
+
"file": "docs/requirements.md",
|
|
159
|
+
"pattern": "\\*\\*(Q-\\d+|REQ-[A-Z]+-\\d+)\\*\\*"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Conventions
|
|
2
|
+
|
|
3
|
+
## Ink, pencil, open
|
|
4
|
+
|
|
5
|
+
Design documents in this project mark each decision with a confidence
|
|
6
|
+
level. The level is not a comment on the author's certainty; it is the
|
|
7
|
+
**rule for who may change it and on what grounds.** A session reads the
|
|
8
|
+
level before it reads the content, and behaves accordingly.
|
|
9
|
+
|
|
10
|
+
| level | marker | who changes it | on what grounds |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| **Ink** | none (default in ADRs) | Mark | significant evidence: a counterexample, a verification result, a primary source. A session may argue, citing the evidence. It never edits ink itself. |
|
|
13
|
+
| **Pencil** | `✎` | any session | a better idea. Log the change and why. Each pencilled item names what would settle it. |
|
|
14
|
+
| **Open** | `?` | anyone proposes | a proposal moves it to pencil |
|
|
15
|
+
|
|
16
|
+
How to ask a session about them:
|
|
17
|
+
|
|
18
|
+
- "What's in pencil?" — list them, with what would settle each.
|
|
19
|
+
- "Should we change this pencil item?" — give an opinion and change it if
|
|
20
|
+
Mark agrees, or on your own if the doc says the session may.
|
|
21
|
+
- "Should we change this ink item?" — answer only with evidence. If there is
|
|
22
|
+
none, say "no evidence to reopen it" and stop.
|
|
23
|
+
|
|
24
|
+
Ink and pencil are per item, not per document. A document is mostly ink
|
|
25
|
+
with pencilled items, or mostly pencil with a few ink anchors; both are
|
|
26
|
+
normal. Moving an item from pencil to ink is a decision Mark makes, and it
|
|
27
|
+
gets a one-line log entry saying what settled it.
|
package/docs/gates.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"note": "Machine-readable mirror of the reversibility gates in docs/requirements.md \u00a710. Governance metadata about this repository, not COLREGS data \u2014 it deliberately lives in docs/ rather than data/, which is the consumer-facing model. REQ-GATE-3 is enforced against this file by test/data.test.mjs; the prose section is authoritative for the reasoning, this file is authoritative for status.",
|
|
3
|
+
"requirements": [
|
|
4
|
+
"REQ-GATE-1",
|
|
5
|
+
"REQ-GATE-2",
|
|
6
|
+
"REQ-GATE-3",
|
|
7
|
+
"REQ-GATE-4"
|
|
8
|
+
],
|
|
9
|
+
"closing_events": {
|
|
10
|
+
"1.0-tag": "the 1.0 version tag \u2014 REQ-GATE-3 blocks it until every gate carrying this closing event has been re-taken",
|
|
11
|
+
"first-non-english-corpus": "the second corpus of any one jurisdiction, which in practice is the first non-English text",
|
|
12
|
+
"first-community-translation-of-national-corpus": "the first `community`-tier translation of a `national`-tier corpus",
|
|
13
|
+
"first-external-contribution": "the first merged contribution from someone other than the copyright holder",
|
|
14
|
+
"none": "the decline does not get cheaper or dearer with time; recorded so it is not re-read as merely deferred"
|
|
15
|
+
},
|
|
16
|
+
"statuses": {
|
|
17
|
+
"open": "declined for now, not re-taken; adoption still possible at the stated cost",
|
|
18
|
+
"re-taken": "reconsidered deliberately and confirmed as declined, in the cited ADR",
|
|
19
|
+
"adopted": "the declined design was subsequently adopted, in the cited ADR",
|
|
20
|
+
"declined-permanently": "declined on grounds that do not decay; no closing event exists"
|
|
21
|
+
},
|
|
22
|
+
"gates": [
|
|
23
|
+
{
|
|
24
|
+
"id": "GATE-1",
|
|
25
|
+
"title": "`paragraph_id` split from `citation_path`",
|
|
26
|
+
"declined_in": "docs/adr/0003-language-as-a-dimension.md",
|
|
27
|
+
"closing_event": "1.0-tag",
|
|
28
|
+
"trigger": "a paragraph path that keeps its spelling while changing what text it denotes, WITHIN ONE JURISDICTION ACROSS RELEASES. Two routes: an IMO amendment renumbering an `intl` path (verified real \u2014 A.910(22) displaced 23(c) to 23(d); A.464(XII) relettered 24(g) to 24(h)), or a national body renumbering its own amalgamation, so that e.g. `us/inland 24(c)` denotes different text in vN+1 than in vN. Cross-jurisdiction divergence at one point in time is NOT this trigger: the effective identifier is (jurisdiction, path), so the 15 same-path-different-text rows in the 33 CFR 83 diff are REQ-MODEL-1 working as designed.",
|
|
29
|
+
"status": "open",
|
|
30
|
+
"settled_by": null,
|
|
31
|
+
"note": "Open on timing, not outcome: if the trigger fires the split is forced and lands as a major version. Ruling 2026-08-30 (requirements.md \u00a710): does not flip on today's data \u2014 no published path has changed denotation \u2014 but leans adopt, decided in the second-jurisdiction bundle with GATE-2 and Q-10. That bundle is also where the re-check happens; it is justified by Q-11 and GATE-2, not by cross-jurisdiction divergence."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "GATE-2",
|
|
35
|
+
"title": "instrument \u2192 edition \u2192 corpus as first-class layers",
|
|
36
|
+
"declined_in": "docs/adr/0003-language-as-a-dimension.md",
|
|
37
|
+
"closing_event": "first-non-english-corpus",
|
|
38
|
+
"trigger": "a jurisdiction publishing two editions in force concurrently",
|
|
39
|
+
"status": "open",
|
|
40
|
+
"settled_by": null,
|
|
41
|
+
"note": "Due at translation #1, not at 1.0."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "GATE-3",
|
|
45
|
+
"title": "legal-status \u00d7 translation-status as two enums",
|
|
46
|
+
"declined_in": "docs/adr/0003-language-as-a-dimension.md",
|
|
47
|
+
"closing_event": "first-community-translation-of-national-corpus",
|
|
48
|
+
"trigger": "a real corpus whose legal tier and translation tier disagree in a way a consumer must filter on and cannot from the metadata as structured",
|
|
49
|
+
"status": "open",
|
|
50
|
+
"settled_by": null,
|
|
51
|
+
"note": "Half-adopted: one tier for legal authority (REQ-LANG-3), translation provenance as structured metadata (REQ-LANG-8, REQ-PROV-6)."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "GATE-4",
|
|
55
|
+
"title": "a package-encoded language fallback chain",
|
|
56
|
+
"declined_in": "docs/adr/0003-language-as-a-dimension.md",
|
|
57
|
+
"closing_event": "none",
|
|
58
|
+
"trigger": null,
|
|
59
|
+
"status": "declined-permanently",
|
|
60
|
+
"settled_by": "docs/adr/0003-language-as-a-dimension.md",
|
|
61
|
+
"note": "The door opens outward: loosening REQ-LANG-7 later is additive, tightening it later would break consumers. Recorded so the asymmetry is not re-discovered as an argument for adopting early."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "GATE-5",
|
|
65
|
+
"title": "a CI-enforced terminology glossary",
|
|
66
|
+
"declined_in": "docs/adr/0003-language-as-a-dimension.md",
|
|
67
|
+
"closing_event": "none",
|
|
68
|
+
"trigger": null,
|
|
69
|
+
"status": "declined-permanently",
|
|
70
|
+
"settled_by": "docs/adr/0003-language-as-a-dimension.md",
|
|
71
|
+
"note": "Declined for legal corpora \u2014 it follows from verbatimness (REQ-MODEL-1) and does not decay. For display catalogs it is contributor guidance, gated on contribution docs existing at all."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "GATE-6",
|
|
75
|
+
"title": "the compilation's outbound licence",
|
|
76
|
+
"declined_in": "docs/adr/0004-licence-layering.md",
|
|
77
|
+
"closing_event": "first-external-contribution",
|
|
78
|
+
"trigger": "deciding the data side wants CC0 or CC BY 4.0 separately from the code (REQ-PROV-4, Q-9)",
|
|
79
|
+
"status": "open",
|
|
80
|
+
"settled_by": null,
|
|
81
|
+
"note": "ADR 0004 settles the code licence (MIT \u2192 Apache-2.0) and leaves the data licence open. Already-published npm versions stay under the licence they shipped with; the gate governs future releases only, and is held open deliberately by REQ-PROV-7's CONTRIBUTING.md terms (DCO-style certification plus a relicensing grant); a CLA-assistant bot is the upgrade path if contributors arrive."
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|