vehicles 0.4.1 → 0.8.0

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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +164 -0
  3. data/CHANGELOG.md +321 -0
  4. data/README.md +88 -15
  5. data/data/PROVENANCE-vehicles.md +12 -0
  6. data/data/plates/PROVENANCE.md +10 -0
  7. data/data/plates/_decode/at-districts.yml +287 -0
  8. data/data/plates/_decode/ch-cantons.yml +110 -0
  9. data/data/plates/_decode/cn-issuing-offices.yml +463 -0
  10. data/data/plates/_decode/cn-provinces.yml +614 -0
  11. data/data/plates/_decode/cz-kraj.yml +159 -0
  12. data/data/plates/_decode/dk-serial-blocks.yml +327 -0
  13. data/data/plates/_decode/es-provinces.yml +116 -0
  14. data/data/plates/_decode/fr-departements.yml +191 -0
  15. data/data/plates/_decode/gb-age-identifiers.yml +170 -0
  16. data/data/plates/_decode/gb-memory-tags.yml +202 -0
  17. data/data/plates/_decode/gr-prefectures.yml +1408 -0
  18. data/data/plates/_decode/hr-cities.yml +315 -0
  19. data/data/plates/_decode/ie-counties.yml +227 -0
  20. data/data/plates/_decode/in-state-codes.yml +169 -0
  21. data/data/plates/_decode/is-districts-1938.yml +116 -0
  22. data/data/plates/_decode/it-provinces.yml +348 -0
  23. data/data/plates/_decode/jp-office-marks.yml +960 -0
  24. data/data/plates/_decode/jp-use-marks.yml +205 -0
  25. data/data/plates/_decode/kr-authority-marks.yml +146 -0
  26. data/data/plates/_decode/kr-use-syllables.yml +194 -0
  27. data/data/plates/_decode/lu-series-order.yml +638 -0
  28. data/data/plates/_decode/mx-entity-series.yml +380 -0
  29. data/data/plates/_decode/my-index-marks.yml +271 -0
  30. data/data/plates/_decode/no-counties-1913.yml +148 -0
  31. data/data/plates/_decode/no-districts.yml +901 -0
  32. data/data/plates/_decode/pl-powiats.yml +567 -0
  33. data/data/plates/_decode/pt-trailer-services.yml +96 -0
  34. data/data/plates/_decode/ro-counties.yml +213 -0
  35. data/data/plates/_decode/se-diplomatic.yml +220 -0
  36. data/data/plates/_decode/si-regions.yml +123 -0
  37. data/data/plates/_decode/sk-districts.yml +314 -0
  38. data/data/plates/_decode/th-registration-elements.yml +208 -0
  39. data/data/plates/_decode/ua-regions.yml +393 -0
  40. data/data/plates/_decode/za-licence-marks.yml +215 -0
  41. data/data/plates/_meta/classes.yml +26 -0
  42. data/data/plates/_meta/separators.yml +102 -0
  43. data/data/plates/ad.yml +961 -0
  44. data/data/plates/ar.yml +762 -0
  45. data/data/plates/at.yml +1424 -0
  46. data/data/plates/au-act.yml +472 -0
  47. data/data/plates/au-nsw.yml +282 -0
  48. data/data/plates/au-nt.yml +431 -0
  49. data/data/plates/au-qld.yml +272 -0
  50. data/data/plates/au-sa.yml +248 -0
  51. data/data/plates/au-tas.yml +302 -0
  52. data/data/plates/au-vic.yml +215 -0
  53. data/data/plates/au-wa.yml +309 -0
  54. data/data/plates/be.yml +1840 -0
  55. data/data/plates/br.yml +1152 -0
  56. data/data/plates/ca-ab.yml +430 -0
  57. data/data/plates/ca-bc.yml +697 -0
  58. data/data/plates/ca-mb.yml +499 -0
  59. data/data/plates/ca-nb.yml +537 -0
  60. data/data/plates/ca-nl.yml +743 -0
  61. data/data/plates/ca-ns.yml +808 -0
  62. data/data/plates/ca-nt.yml +610 -0
  63. data/data/plates/ca-nu.yml +280 -0
  64. data/data/plates/ca-on.yml +881 -0
  65. data/data/plates/ca-pe.yml +592 -0
  66. data/data/plates/ca-qc.yml +1036 -0
  67. data/data/plates/ca-sk.yml +256 -0
  68. data/data/plates/ca-yt.yml +656 -0
  69. data/data/plates/ch.yml +1273 -0
  70. data/data/plates/cn.yml +1431 -0
  71. data/data/plates/cy.yml +688 -0
  72. data/data/plates/cz.yml +1179 -0
  73. data/data/plates/de.yml +1107 -0
  74. data/data/plates/dk.yml +1647 -0
  75. data/data/plates/ee.yml +1275 -0
  76. data/data/plates/es.yml +888 -0
  77. data/data/plates/fi.yml +1271 -0
  78. data/data/plates/fr.yml +1265 -0
  79. data/data/plates/gb.yml +1188 -0
  80. data/data/plates/gr.yml +721 -0
  81. data/data/plates/hr.yml +860 -0
  82. data/data/plates/hu.yml +959 -0
  83. data/data/plates/ie.yml +775 -0
  84. data/data/plates/in.yml +1172 -0
  85. data/data/plates/is.yml +667 -0
  86. data/data/plates/it.yml +1317 -0
  87. data/data/plates/jp.yml +3650 -0
  88. data/data/plates/kr.yml +1375 -0
  89. data/data/plates/li.yml +1010 -0
  90. data/data/plates/lt.yml +879 -0
  91. data/data/plates/lu.yml +842 -0
  92. data/data/plates/lv.yml +924 -0
  93. data/data/plates/mc.yml +1024 -0
  94. data/data/plates/mt.yml +854 -0
  95. data/data/plates/mx.yml +1372 -0
  96. data/data/plates/my.yml +685 -0
  97. data/data/plates/nl.yml +1016 -0
  98. data/data/plates/no.yml +1018 -0
  99. data/data/plates/nz.yml +1699 -0
  100. data/data/plates/pl.yml +1296 -0
  101. data/data/plates/pt.yml +847 -0
  102. data/data/plates/ro.yml +785 -0
  103. data/data/plates/se.yml +1091 -0
  104. data/data/plates/si.yml +1105 -0
  105. data/data/plates/sk.yml +1439 -0
  106. data/data/plates/sm.yml +1119 -0
  107. data/data/plates/th.yml +1150 -0
  108. data/data/plates/ua.yml +1672 -0
  109. data/data/plates/us-ak.yml +763 -0
  110. data/data/plates/us-al.yml +457 -0
  111. data/data/plates/us-ar.yml +427 -0
  112. data/data/plates/us-as.yml +454 -0
  113. data/data/plates/us-az.yml +430 -0
  114. data/data/plates/us-ca.yml +892 -0
  115. data/data/plates/us-co.yml +452 -0
  116. data/data/plates/us-ct.yml +427 -0
  117. data/data/plates/us-dc.yml +614 -0
  118. data/data/plates/us-de.yml +551 -0
  119. data/data/plates/us-fl.yml +741 -0
  120. data/data/plates/us-ga.yml +644 -0
  121. data/data/plates/us-gu.yml +658 -0
  122. data/data/plates/us-hi.yml +585 -0
  123. data/data/plates/us-ia.yml +438 -0
  124. data/data/plates/us-id.yml +531 -0
  125. data/data/plates/us-il.yml +516 -0
  126. data/data/plates/us-in.yml +324 -0
  127. data/data/plates/us-ks.yml +351 -0
  128. data/data/plates/us-ky.yml +770 -0
  129. data/data/plates/us-la.yml +568 -0
  130. data/data/plates/us-ma.yml +379 -0
  131. data/data/plates/us-md.yml +536 -0
  132. data/data/plates/us-me.yml +445 -0
  133. data/data/plates/us-mi.yml +408 -0
  134. data/data/plates/us-mn.yml +411 -0
  135. data/data/plates/us-mo.yml +356 -0
  136. data/data/plates/us-mp.yml +402 -0
  137. data/data/plates/us-ms.yml +432 -0
  138. data/data/plates/us-mt.yml +619 -0
  139. data/data/plates/us-nc.yml +602 -0
  140. data/data/plates/us-nd.yml +419 -0
  141. data/data/plates/us-ne.yml +483 -0
  142. data/data/plates/us-nh.yml +394 -0
  143. data/data/plates/us-nj.yml +547 -0
  144. data/data/plates/us-nm.yml +574 -0
  145. data/data/plates/us-nv.yml +655 -0
  146. data/data/plates/us-ny.yml +592 -0
  147. data/data/plates/us-oh.yml +404 -0
  148. data/data/plates/us-ok.yml +513 -0
  149. data/data/plates/us-or.yml +392 -0
  150. data/data/plates/us-pa.yml +506 -0
  151. data/data/plates/us-pr.yml +507 -0
  152. data/data/plates/us-ri.yml +445 -0
  153. data/data/plates/us-sc.yml +605 -0
  154. data/data/plates/us-sd.yml +428 -0
  155. data/data/plates/us-tn.yml +471 -0
  156. data/data/plates/us-tx.yml +535 -0
  157. data/data/plates/us-ut.yml +384 -0
  158. data/data/plates/us-va.yml +567 -0
  159. data/data/plates/us-vi.yml +489 -0
  160. data/data/plates/us-vt.yml +458 -0
  161. data/data/plates/us-wa.yml +484 -0
  162. data/data/plates/us-wi.yml +509 -0
  163. data/data/plates/us-wv.yml +446 -0
  164. data/data/plates/us-wy.yml +523 -0
  165. data/data/plates/va.yml +604 -0
  166. data/data/plates/za.yml +1141 -0
  167. data/data/vehicles.json +160653 -105090
  168. data/lib/vehicles/configuration.rb +18 -2
  169. data/lib/vehicles/dataset.rb +73 -18
  170. data/lib/vehicles/fuzzy.rb +115 -0
  171. data/lib/vehicles/http.rb +48 -0
  172. data/lib/vehicles/make.rb +36 -6
  173. data/lib/vehicles/mcp_server.rb +5 -5
  174. data/lib/vehicles/model.rb +42 -6
  175. data/lib/vehicles/plates/jurisdiction.rb +32 -0
  176. data/lib/vehicles/plates/series.rb +291 -0
  177. data/lib/vehicles/plates/template_fill.rb +188 -0
  178. data/lib/vehicles/plates/templates.rb +162 -0
  179. data/lib/vehicles/plates.rb +122 -0
  180. data/lib/vehicles/providers/hosted_provider.rb +49 -58
  181. data/lib/vehicles/providers/local_provider.rb +4 -3
  182. data/lib/vehicles/validators/vehicle_make_validator.rb +3 -1
  183. data/lib/vehicles/validators/vehicle_model_validator.rb +1 -1
  184. data/lib/vehicles/version.rb +1 -1
  185. data/lib/vehicles.rb +53 -16
  186. data/rakelib/data_refresh.rake +109 -0
  187. data/rakelib/plates_refresh.rake +29 -0
  188. data/sig/vehicles.rbs +18 -0
  189. metadata +174 -2
@@ -0,0 +1,379 @@
1
+ # plates/us-ma.yml — Massachusetts (PRD-PLATES gate L2, northeast group).
2
+ #
3
+ # THE ONE FACT THAT MAKES MASSACHUSETTS DIFFERENT FROM EVERY OTHER STATE IN THIS
4
+ # GROUP: the LAST DIGIT OF THE SERIAL ENCODES THE MONTH THE REGISTRATION EXPIRES
5
+ # — 1 through 9 for January through September, 0 for October. That is a TIME
6
+ # DECODE inside a US plate serial, the temporal cousin of Germany's district
7
+ # prefix and the Netherlands' sidecode, and it is exactly the kind of thing
8
+ # PRD-PLATES §2.4 exists to model. It is also why Massachusetts runs several
9
+ # serial arrangements CONCURRENTLY rather than sequentially: each month's
10
+ # allocation exhausts at its own rate, so October (digit 0) has needed its own
11
+ # formats since 2018 while January-September were still inside 1ABC 2n. A
12
+ # jurisdiction-keyed schema that assumes one current format per state gets
13
+ # Massachusetts wrong. This file records the current arrangement and states the
14
+ # concurrency rather than flattening it.
15
+ #
16
+ # SOURCING SHAPE HERE: Massachusetts's statute is thin on plates and rich on
17
+ # process. M.G.L. c.90 §6 gives display; c.90 §2 gives reflectorization, the
18
+ # SIX-CHARACTER CAP on "distinctive initial plates" (vanity), and one statutory
19
+ # specialty design (Cape and Islands). Nothing in c.90 states a standard serial
20
+ # grammar, a colour or a dimension. The RMV's own Passenger Plates Booklet is
21
+ # the official catalogue and is cited for the program index. Serial grammars are
22
+ # secondary and labelled as such throughout.
23
+ #
24
+ # FETCH NOTE, recorded because it affects citation honesty: malegislature.gov
25
+ # refused every direct fetch this pass (connection timeouts on HTTPS, and the
26
+ # live page is a JavaScript shell even in a 2025 Wayback capture). The statutory
27
+ # text quoted below was read from a 2014 Wayback capture of the same URLs, which
28
+ # were server-rendered then. The canonical URL is cited; the archive is named.
29
+ # Both §6 and §2 quotations should be re-verified against the live 2026 edition
30
+ # before merge — recorded as a verification task, not papered over.
31
+ jurisdiction: us-ma
32
+ authority:
33
+ name: Massachusetts Registry of Motor Vehicles (RMV), a division of the Massachusetts Department of Transportation
34
+ url: "https://www.mass.gov/orgs/massachusetts-registry-of-motor-vehicles"
35
+ binding: vehicle
36
+ statute_edition: >-
37
+ Massachusetts General Laws, Part I Title XIV Chapter 90 (Motor Vehicles and
38
+ Aircraft), §§ 2 and 6 — read this pass from a 2014-08-01 Wayback capture of
39
+ malegislature.gov because the live site was unreachable (see file header).
40
+ Edition currency is a recorded gap.
41
+
42
+ # ---------------------------------------------------------------------------
43
+ # artwork_risk — required per jurisdiction by PRD-PLATES §4.
44
+ # ---------------------------------------------------------------------------
45
+ artwork_risk:
46
+ posture: favourable-with-a-stated-limit
47
+ basis: >-
48
+ Massachusetts is the second-best posture in this group after nothing (nobody
49
+ here matches Florida). Commons carries {{PD-MAGov}} — confirmed present by
50
+ API this pass — on the footing that a "Commonwealth of Massachusetts public
51
+ record disseminated by a Commonwealth agency or the Massachusetts Archives"
52
+ is public domain, because the Secretary of the Commonwealth has stated such
53
+ works can be copied and used FOR ANY PURPOSE. The underlying instrument is
54
+ the Secretary's own Guide to the Massachusetts Public Records Law, which at
55
+ page 7 records that all requests "even if made for a commercial purpose"
56
+ must be honoured, and which defines a public record at M.G.L. c.4 §7(26) as
57
+ documentary material "regardless of physical form or characteristics" —
58
+ wording broad enough on its face to reach a plate design held by an agency.
59
+ limits: >-
60
+ THE TEMPLATE ITSELF CARRIES TWO WARNINGS AND THEY ARE LOAD-BEARING. First,
61
+ it is "based on official statements by the Secretary of the Commonwealth,
62
+ which are NOT DEFINITIVE in the way a statute or a court ruling is" — unlike
63
+ Florida, where Microdecisions v. Skinner is a judicial holding. Second, the
64
+ Secretary's statement "only speaks to public records HELD BY THE
65
+ MASSACHUSETTS ARCHIVES", so extending it to a live RMV plate design is an
66
+ extrapolation, not a finding. The template also excludes municipal records
67
+ (M.G.L. c.66 §7). Recorded as favourable-but-not-adjudicated.
68
+ emblem_rule: >-
69
+ PRD-PLATES §3 placeholder default applies. The current standard base carries
70
+ no state seal, but several specialty designs do, and Massachusetts
71
+ state-seal misuse protection independent of copyright is unresearched
72
+ (recorded gap — the same gap the FL pilot recorded, and the largest
73
+ remaining hole in the whole US IP analysis per the source dossier).
74
+ photograph_caution: >-
75
+ Commons photographs of Massachusetts plates carry the PHOTOGRAPHER's licence
76
+ on the photograph, not a licence on the design; the uploader had no standing
77
+ over the design. Our renders are generated from spec and never derived from a
78
+ photograph, so those obligations never attach.
79
+ sources:
80
+ - "https://commons.wikimedia.org/wiki/Template:PD-MAGov # fetched this pass: the Massachusetts PD tag exists; its text, its reliance on the Secretary of the Commonwealth's statement, and BOTH of its self-declared limitations (not definitive; Archives-held records only)"
81
+ - "https://www.mass.gov/files/2017-06/Public%20Records%20Law.pdf # A Guide to the Massachusetts Public Records Law (Secretary Galvin, updated January 2017): p.7 commercial-purpose requests must be honoured; p.40 the c.4 §7(26) definition of a public record. Cited via the Commons template, which quotes it verbatim; the PDF itself was not independently fetched this pass (recorded gap)"
82
+ - "https://en.wikipedia.org/wiki/Copyright_status_of_works_by_subnational_governments_of_the_United_States # LOCATOR: the Massachusetts entry, quoting the Secretary of the Commonwealth's Archives research-services statement"
83
+
84
+ display_rules:
85
+ default: "TWO plates, front and rear, unless the registrar issues one. M.G.L. c.90 §6, verbatim: every registered motor vehicle or trailer 'shall have its register number displayed conspicuously thereon by the number plates furnished by the registrar ... one number plate to be attached at the front and one at the rear of said motor vehicle, and one number plate to be attached at the rear of said trailer, but if the registrar issues but one number plate it shall be attached to the rear of the vehicle so that it shall always be plainly visible.'"
86
+ legibility: "§6: plates 'shall be kept clean with the numbers legible and shall not be obscured in any manner by the installation of any device obscuring said numbers', and when lights are required 'the rear register number shall be illuminated so as to be plainly visible at a distance of SIXTY FEET' — note sixty, where Connecticut legislates fifty and Rhode Island legislates a hundred-foot daylight legibility test instead."
87
+ foreign_plates: "§6: a vehicle registered here and elsewhere by reason of interstate operation 'may display the register number plates of this and any other state or country in which it is registered' provided the Massachusetts plates are also displayed as required — an explicit multi-jurisdiction display permission, unusual in this group."
88
+ no_other_plates: "§6: 'No number plates other than such as are procured from the registrar or such as may be authorized by him for temporary use ... shall be displayed on any motor vehicle or trailer so operated.'"
89
+ expiry_grace: "§6: a duly registered vehicle may be operated between noon on the expiration date and noon the following day if that day begins the new registration period and the register number for either period is displayed — a 24-hour statutory grace window written into the display section itself."
90
+ historic_note: "Both the 1977 green-on-white base and the 1987 'Spirit of America' base remain valid on the road (RMV practice, secondary). On the 1977 base only REAR plates were issued for most types, so a legally compliant Massachusetts car today may display one plate or two depending on which base it carries. A front-plate-requirement field for this state must therefore be conditional on the SERIES, not on the state."
91
+ sources:
92
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section6 # M.G.L. c.90 §6: display front and rear, the one-plate fallback, cleanliness and non-obstruction, sixty-foot rear illumination, the interstate dual-display permission, the no-other-plates rule, temporary plates, the noon-to-noon grace window. Read via https://web.archive.org/web/20140801000000/http://www.malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section6 — the live site was unreachable this pass"
93
+
94
+ us_standards:
95
+ no_federal_mandate: true
96
+ chain: "SAE J686 -> AAMVA License Plate Standard Edition 3 (September 2025) -> voluntary state adoption; recommendations, not requirements."
97
+ aamva_geometry: "AAMVA §2.1 jurisdiction name top-centre between the bolt holes, >=0.25 in above the plate number, >=0.125 in from the top edge, characters 0.75-1.0 in; §2.2 serial characters >=2.5 in high, >=0.25 in apart, stroke 0.2-0.4 in, >=1.25 in clear of top and bottom; §3.3 legible day and night from >=75 feet, ASTM D4956-19 and ISO 7591:1982 cl.3, entrance angle 0.2 deg, observation angle -4 deg, minimum 45 cd/lx/m^2."
98
+ dimensions_delegated: "AAMVA §3.1 delegates dimensions and bolt holes to SAE J686, which is PAYWALLED and UNPINNED; no J686 dimension is quoted here. M.G.L. c.90 states no plate dimension, so 12x6 in below is `observed`."
99
+ reflectorization_is_statutory_here: "M.G.L. c.90 §2, verbatim: 'All number plates issued by the registrar of motor vehicles under this chapter shall be reflectorized in accordance with specifications prescribed by him.' The DUTY is statutory; the SPECIFICATION is delegated to the registrar and was not obtained (recorded gap)."
100
+ replacement_cycle: "Massachusetts legislates none in c.90 (recorded gap). The 1977 base is still lawfully displayed 49 years on — the single strongest counter-example in this group to AAMVA §1.1's 7-to-10-year recommendation."
101
+ source: "https://www.aamva.org/getmedia/646bcc8a-219b-47d8-b5cd-726240473163/License-Plate-Standard-Edition-3_September-2025-Update.pdf"
102
+
103
+ series:
104
+
105
+ # =========================================================================
106
+ # CURRENT STANDARD ISSUE — the "Spirit of America" base.
107
+ # =========================================================================
108
+ - id: us-ma-standard-spirit
109
+ class: standard
110
+ categories: [car, van]
111
+ period: { start: 1993 }
112
+ period_evidence: secondary-dated
113
+ matching: strict
114
+ format:
115
+ pattern: "9LLL 99"
116
+ regex: '\A\d[A-Z]{3} ?\d{2}\z'
117
+ charset:
118
+ notes: >-
119
+ Reported alphabet: letters Q and U are never used; I and O were used in
120
+ the older 123·ABC and 1234 AB arrangements but IA-IZ and OA-OZ blocks
121
+ were skipped. THE STATUTE STATES NO ALPHABET for standard plates — c.90
122
+ §2's only character rule is the SIX-character cap on "distinctive
123
+ initial plates", which is the vanity series, not this one. The Q/U
124
+ exclusion is therefore secondary and is deliberately NOT promoted to a
125
+ `regex_strict`.
126
+ statutory_adjacent: >-
127
+ M.G.L. c.90 §2, verbatim, on vanity plates: the registrar may issue
128
+ "number plates of distinctive types, to be known as distinctive initial
129
+ plates, which may contain a register number consisting of a group of
130
+ letters or a combination of numbers and letters; provided, however, that
131
+ such group or combination shall not consist of MORE THAN SIX LETTERS OR
132
+ NUMBERS or combination thereof; and provided further, that there shall
133
+ be no duplication of identification." Six is a real statutory bound —
134
+ but it binds the vanity series only, so it is recorded here rather than
135
+ encoded as this series' `regex_statutory`.
136
+ progression: >-
137
+ The final digit is the MONTH CODE, not a counter, so the sequence advances
138
+ within a month-block. Reported blocks as of 25 May 2026 run from 1AAA 11
139
+ to at least 6ZZL 51 (January), 1AAA 12 to at least 6NZT 22 (February), and
140
+ so on per expiry month.
141
+ design:
142
+ plate: { w: 12, h: 6, unit: in, w_mm: 304.8, h_mm: 152.4, dimension_note: "OBSERVED — c.90 states no plate dimension" }
143
+ background: { color: "#FFFFFF", finish: retroreflective, hex_basis: observed }
144
+ foreground: "#C8102E"
145
+ colour_note: >-
146
+ BOTH HEXES ARE `observed` AND SHOULD BE TREATED AS UNVERIFIED. c.90 §2
147
+ mandates reflectorization "in accordance with specifications prescribed by
148
+ [the registrar]" and names no colour; the registrar's specification was not
149
+ obtained. The recorded values encode the described design — embossed red
150
+ serial on reflective white, with the state name and slogan screened in
151
+ blue — and the red is a plausible-but-unsourced approximation.
152
+ legend_top: "Massachusetts"
153
+ legend_bottom: "The Spirit of America"
154
+ legend_rule: >-
155
+ NEITHER LEGEND IS STATUTORY. c.90 contains no slogan mandate at all, in
156
+ pointed contrast to New Hampshire (RSA 261:75(II) mandates "Live Free or
157
+ Die" by name) and Connecticut (§ 14-21b mandates "Constitution State").
158
+ Massachusetts's slogan is departmental and could change without
159
+ legislation.
160
+ emblem: { present: false }
161
+ rear_differs: false
162
+ serial_encoding:
163
+ kind: expiry-month
164
+ rule: "The FINAL DIGIT of the serial is the month the registration expires: 1-9 for January through September, 0 for October. November and December expirations were discontinued for passenger plates."
165
+ consequence: >-
166
+ A Massachusetts serial carries a renewal date in plain sight, which is a
167
+ parse-API capability no other state in this group offers — and a
168
+ modelling hazard, because it means the STATE RUNS TEN PARALLEL SERIAL
169
+ SPACES, one per month code, exhausting at different rates. October (code
170
+ 0) left the 1ABC 2n arrangement in November 2018 and now runs 12A 340 and
171
+ 123 A40; January through September remain in 1ABC 2n. So "the current
172
+ Massachusetts format" is genuinely a set, not a value.
173
+ evidence: "secondary (locator) — the month rule is not in c.90 and no RMV instrument stating it was obtained. Recorded as a strong, consistently reported claim awaiting a primary."
174
+ region_encoding: none
175
+ sources:
176
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section2 # M.G.L. c.90 §2: the statutory reflectorization duty delegated to the registrar; the SIX-character cap and no-duplication rule on distinctive initial (vanity) plates; the Cape and Islands statutory design. Read via the 2014-08-01 Wayback capture (live site unreachable this pass)"
177
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section6 # §6: display, the sixty-foot rear illumination rule"
178
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY (PRD-PLATES §4): the 1ABC 2n current arrangement, the month-of-expiration final digit, the Q/U exclusion and I/O skipped blocks, the 1987 first issue for vanity/non-passenger and 1993 adoption as the standard passenger base, the concurrent October formats"
179
+ - "https://web.archive.org/web/20140704083521/http://www.massrmv.com/Portals/30/docs/manuals/passenger_plates_manual_public.pdf # RMV Passenger Plates Booklet, July 2014 — the RMV's OWN catalogue; used here for the plate-type inventory, not for serial grammar"
180
+ notes: >-
181
+ MASSACHUSETTS STANDARD ISSUE, "Spirit of America" base. PERIOD: 1993 is the
182
+ reported year this base became the standard PASSENGER base; the base itself
183
+ was first issued in 1987 for vanity and some non-passenger types, so 1987
184
+ and 1993 are both true of different things and the file says which. Both
185
+ dates are secondary. FORMAT CAVEAT, and it is the important one: `regex`
186
+ encodes the January-September arrangement (1ABC 2n) because that is what is
187
+ being issued to most registrants now, but October registrations are issued
188
+ on 123 A40 and 12A 340 concurrently, on the same base, in the same series.
189
+ Those are not given series of their own because they are the SAME design and
190
+ the SAME period differing only by month-block — the month rule makes them
191
+ one system, not several — and because no primary bounds them. Recorded as a
192
+ known incompleteness of `regex`, which is why `matching: strict` is still
193
+ correct: a hit on this regex IS a well-formedness claim for the
194
+ January-September space.
195
+
196
+ # =========================================================================
197
+ # ONE SERIES BACK — the green-on-white base, still lawfully on the road.
198
+ # =========================================================================
199
+ - id: us-ma-standard-green-1977
200
+ class: standard
201
+ categories: [car, van]
202
+ period: { start: 1977, end: 1993 }
203
+ period_evidence: secondary-dated
204
+ matching: strict
205
+ format:
206
+ pattern: "999 LLL"
207
+ regex: '\A\d{3} ?[A-Z]{3}\z'
208
+ charset: { notes: "reported 100·AAA to 999·VZZ; the same final-digit month code applies, and November and December expirations were discontinued during this base's life except on non-passenger and older red-on-white plates. An all-numeric 123·456 arrangement ran concurrently on this base from 1983, generally reissuing the serials of holders of the same numbers on the red-on-white base" }
209
+ separator_note: "printed with a raised dot (123·ABC); spelled U+0020 here per PRD-PLATES §2.6, as for every dot-separated series in this dataset"
210
+ design:
211
+ plate: { w: 12, h: 6, unit: in }
212
+ background: { color: "#FFFFFF", finish: retroreflective, hex_basis: observed }
213
+ foreground: "#00693E"
214
+ colour_note: "embossed GREEN serial on reflective white with a border line, 'MASSACHUSETTS' centred at top; both hexes `observed`, same caveat as the current base"
215
+ legend_top: "MASSACHUSETTS"
216
+ emblem: { present: false }
217
+ rear_differs: true
218
+ rear_differs_note: "on this base only REAR plates were issued for most types — Reserved, Commercial and Taxi excepted, which received front plates too and must still display them. This is the schema's `rear_differs` doing real work: the same jurisdiction, in the same year, has both one-plate and two-plate cars on the road depending on series."
219
+ serial_encoding:
220
+ kind: expiry-month
221
+ rule: "same final-digit month code as the current base"
222
+ evidence: secondary
223
+ region_encoding: none
224
+ sources:
225
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY: the 1977-1993 green-on-white base, the 123·ABC and later all-numeric arrangements, the rear-only issuance with the Reserved/Commercial/Taxi exceptions, and the statement that all plates since 1978 remain valid"
226
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section6 # §6's display duty is what makes an unreplaced 1977 plate still lawful: the statute requires display of the plates furnished by the registrar, and sets no expiry on a base"
227
+ notes: >-
228
+ THE PREVIOUS BASE — AND IT IS STILL BEING DRIVEN. Massachusetts sets no
229
+ replacement cycle, so green-on-white plates issued as early as 1977 remain
230
+ lawfully displayed, and registrants reportedly decline free replacement as a
231
+ point of pride. This is the `period.end` semantics earning their keep: the
232
+ series STOPPED BEING ISSUED in 1993 but did not stop being VALID, and a
233
+ consumer that reads `end: 1993` as "reject this plate" is wrong. The practical
234
+ limit is legibility, not age: an illegible plate fails the annual safety
235
+ inspection regardless of colour or vintage, which is the real reason old
236
+ Massachusetts plates leave the road.
237
+
238
+ # =========================================================================
239
+ # CORE DISTINCT CLASSES.
240
+ # =========================================================================
241
+ - id: us-ma-trailer
242
+ class: trailer
243
+ categories: [trailer]
244
+ period: { start: 2024 }
245
+ period_evidence: secondary-dated
246
+ matching: strict
247
+ format:
248
+ pattern: "TZ 9999L"
249
+ regex: '\ATZ ?\d{4}[A-Z]\z'
250
+ charset: { notes: "a literal 'TZ' class prefix, four digits, one letter. The preceding arrangement on the same design was TZ 12345 (2021-2024); before that A12·345 (2008-2021), A 1234 (2004-2008) and 123·456 (1987-2004). Reported serials run TZ 1000A to at least TZ 5952M as of 30 April 2026" }
251
+ design:
252
+ plate: { w: 12, h: 6, unit: in }
253
+ background: { finish: retroreflective }
254
+ legend_bottom: "TRAILER"
255
+ legend_note: "embossed 'TRAILER' in place of the slogan on the Spirit base — a design difference, hence its own series under PRD-PLATES §2.3"
256
+ registration_period: "all Massachusetts trailer plates expire on 30 NOVEMBER, a fixed statewide date rather than a per-registrant month — which is why the trailer series carries no month code in its serial and the passenger series does"
257
+ region_encoding: none
258
+ sources:
259
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY: the TZ 1234A arrangement from 2024, its four predecessors on the same design, the reported high serial, and the 30 November fixed expiry"
260
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section6 # §6 requires ONE plate on a trailer, attached at the rear — the statutory reason this series is single-issue"
261
+ notes: >-
262
+ TRAILER. Statutorily single-plate (c.90 §6 names the trailer case
263
+ explicitly), and administratively single-expiry (30 November for all), which
264
+ together explain why the trailer serial does the opposite of the passenger
265
+ serial: no month code, and a class prefix instead. The 'TZ' prefix is the
266
+ most recent of five arrangements on one unchanged design, a reminder that in
267
+ Massachusetts a serial-format change is routine and a DESIGN change is rare.
268
+
269
+ - id: us-ma-commercial
270
+ class: standard
271
+ categories: [truck, van]
272
+ period: { start: 2019 }
273
+ period_evidence: secondary-dated
274
+ matching: strict
275
+ format:
276
+ pattern: "L99 999"
277
+ regex: '\A[A-Z]\d{2} ?\d{3}\z'
278
+ charset: { notes: "reported ranges: A 1000 to C99·999 (1991-1993), D 1000 to approximately M63·800 (1993-2007), M63·801 to approximately V43·499 (2007-2019), V43·500 to at least Z27·646 as of 3 May 2026 on the present screened-legend variant. The leading letter is a sequence position, not a class code" }
279
+ design:
280
+ plate: { w: 12, h: 6, unit: in }
281
+ background: { finish: retroreflective }
282
+ legend_bottom: "COMMERCIAL"
283
+ legend_note: "screened rather than embossed since 2019 — the change that dates this sub-series; before 2019 the same word was embossed, and before 1993 'DEC' also appeared at top left"
284
+ registration_period: "all Massachusetts commercial plates expire on 31 DECEMBER — again a fixed statewide date, again no month code in the serial"
285
+ region_encoding: none
286
+ sources:
287
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY: the A12·345 commercial arrangement, the four dated design variants, the reported serial ranges, and the 31 December fixed expiry"
288
+ notes: >-
289
+ COMMERCIAL. Recorded as class `standard` because _meta/classes.yml has no
290
+ `commercial` value and the PRD's `dealer` definition (bound to a business,
291
+ not a vehicle) does not fit — a Massachusetts commercial plate is bound to
292
+ the vehicle in the ordinary way. The legend carries the meaning, exactly as
293
+ the FL pilot recorded for its Wrecker and Restricted series. CLASS-VOCABULARY
294
+ NOTE for the maintainer: three states in this group (MA, ME, RI) separately
295
+ serialize a commercial/heavy class, and all three are being recorded as
296
+ `standard` with a legend; if a fourth appears, `commercial` is worth a
297
+ _meta/classes.yml PR.
298
+
299
+ - id: us-ma-apportioned
300
+ class: standard
301
+ categories: [truck, bus]
302
+ period: { start: 2021 }
303
+ period_evidence: secondary-dated
304
+ matching: strict
305
+ format:
306
+ pattern: "9LL99L"
307
+ regex: '\A\d[A-Z]{2}\d{2}[A-Z]\z'
308
+ charset: { notes: "reported 1AA10A to at least 1AL17T as of 30 April 2026. Predecessors on the same design: 12345 (1987-2018) and 1234 A (2018-2021)" }
309
+ design:
310
+ plate: { w: 12, h: 6, unit: in }
311
+ background: { finish: retroreflective }
312
+ legend_bottom: "APPORTIONED"
313
+ legend_note: "screened 'APPORTIONED' in place of the slogan"
314
+ registration_period: "all Massachusetts apportioned plates expire on 30 JUNE — the third distinct fixed expiry date in this file, after trailer (30 Nov) and commercial (31 Dec)"
315
+ region_encoding: none
316
+ sources:
317
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY: the 1AB23C apportioned arrangement from 2021, its two predecessors, the reported serial range and the 30 June fixed expiry"
318
+ notes: >-
319
+ APPORTIONED (International Registration Plan). Included because it is
320
+ separately serialized with its own grammar and its own fixed expiry, and
321
+ because the three fixed-expiry non-passenger classes together are the
322
+ clearest evidence for the file's central claim: Massachusetts encodes
323
+ expiry in the SERIAL only where expiry VARIES per registrant. Where the
324
+ whole class expires on one day, the month code disappears and the character
325
+ budget goes to sequence instead. That is a design rule, not an accident,
326
+ and no competing dataset records it.
327
+
328
+ # =========================================================================
329
+ # SPECIALTY — PROGRAM INDEX ONLY (PRD-PLATES §2.5).
330
+ # =========================================================================
331
+ - id: us-ma-specialty-index
332
+ class: specialty
333
+ categories: [car, van, truck, motorcycle]
334
+ period: { start: 2025 }
335
+ period_evidence: instrument-in-force-upper-bound
336
+ matching: strict
337
+ format:
338
+ pattern: "9LLL 99"
339
+ regex: '\A\d[A-Z]{3} ?\d{2}\z'
340
+ charset: { notes: "specialty plates carry ORDINARY serials on an alternative design; the RMV's own booklet records that vanity plates are NOT available for passenger special plates (PAS) and that 'customers cannot request a specific number' on them — so a specialty serial is always department-assigned, which is a real constraint a parse API can use" }
341
+ design:
342
+ plate: { w: 12, h: 6, unit: in }
343
+ background: { finish: retroreflective }
344
+ note: "one design per authorised program; individual designs are L4 scope (PRD-PLATES §2.5) and none is described here"
345
+ emblem: { present: true, rendered: placeholder }
346
+ program_index:
347
+ count_official_dated: 50
348
+ count_basis: >-
349
+ FIFTY plate-type sections appear in the RMV's own Passenger Plates Booklet
350
+ (counted mechanically as occurrences of the "Eligibility:" heading, which
351
+ the booklet uses once per type). THE FIGURE IS DATED: the booklet edition
352
+ obtained is JULY 2014, retrieved from a Wayback capture. It is the best
353
+ OFFICIAL count available this pass and it is certainly stale.
354
+ count_currency_caveat: >-
355
+ The live mass.gov special-plates page returned HTTP 403 to every fetch
356
+ attempt this pass, and the Wayback CDX index for mass.gov surfaces only
357
+ the annual low-number plate lottery pages. So the CURRENT official count
358
+ is UNPINNED (recorded gap). Do not present 50 as today's number; present
359
+ it as the RMV's own 2014 number.
360
+ statutory_designs: "At least one specialty design is created by STATUTE rather than by program: M.G.L. c.90 §2 authorises number plates 'which shall display on the face of said plate a design representing the Cape and Islands'. That makes the Cape and Islands plate an edict-of-government design description and the cleanest specialty fact in the file."
361
+ transferable_on_death: "The booklet lists 33 plate types a surviving spouse may transfer into their own name, and separately lists types that may not be transferred — an administrative taxonomy of specialty plates that has no analogue in the other five states in this group."
362
+ official_list_url: "https://www.mass.gov/info-details/massachusetts-rmv-special-license-plates"
363
+ official_catalogue_url: "https://web.archive.org/web/20140704083521/http://www.massrmv.com/Portals/30/docs/manuals/passenger_plates_manual_public.pdf"
364
+ low_number_lottery: "Massachusetts runs an annual LOW NUMBER PLATE LOTTERY for reserved low serials released by cancellation — mass.gov publishes a page per year (2024, 2025, 2026 confirmed present in the Wayback index). Reserved serials are a separate space from the standard formats: all-numeric 1 to 99999, or a single letter with a number, plus A#A, A##A, #A#, #AA# shapes. Recorded as an index fact; the reserved space is not given a series here because no primary bounds it."
365
+ region_encoding: none
366
+ sources:
367
+ - "https://web.archive.org/web/20140704083521/http://www.massrmv.com/Portals/30/docs/manuals/passenger_plates_manual_public.pdf # Massachusetts RMV, Passenger Plates Booklet, July 2014 — the official catalogue: the 50 typed sections counted above, the vanity-unavailable-on-PAS rule, the 33-type surviving-spouse transfer list"
368
+ - "https://malegislature.gov/Laws/GeneralLaws/PartI/TitleXIV/Chapter90/Section2 # c.90 §2: the Cape and Islands statutory design; the six-character cap on distinctive initial plates that bounds the vanity end of the program"
369
+ - "https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Massachusetts # LOCATOR ONLY: the reserved-plate serial shapes and the low-number lottery mechanism"
370
+ notes: >-
371
+ THE MASSACHUSETTS SPECIALTY INDEX — a count, its date, and its staleness,
372
+ which is the honest shape when the live catalogue will not serve. Worth
373
+ carrying forward: unlike Connecticut, where the legislature authorises each
374
+ program and the count is therefore statute-derivable, Massachusetts creates
375
+ most programs administratively and only occasionally by statute (Cape and
376
+ Islands), so the count can only ever come from an RMV artefact. That makes
377
+ the RMV booklet worth capturing on a schedule, for the same reason Florida's
378
+ monthly active-plate report is: it is the only structured record, and its
379
+ publisher does not archive it.