@driftsys/markspec 0.4.0 → 0.6.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 (632) hide show
  1. package/README.md +74 -20
  2. package/esm/ast/build.d.ts +60 -0
  3. package/esm/ast/build.d.ts.map +1 -0
  4. package/esm/ast/build.js +516 -0
  5. package/esm/ast/equivalence.d.ts +18 -0
  6. package/esm/ast/equivalence.d.ts.map +1 -0
  7. package/esm/ast/equivalence.js +56 -0
  8. package/esm/ast/nodes.d.ts +189 -0
  9. package/esm/ast/nodes.d.ts.map +1 -0
  10. package/esm/ast/nodes.js +17 -0
  11. package/esm/ast/normalize.d.ts +58 -0
  12. package/esm/ast/normalize.d.ts.map +1 -0
  13. package/esm/ast/normalize.js +197 -0
  14. package/esm/ast/render.d.ts +34 -0
  15. package/esm/ast/render.d.ts.map +1 -0
  16. package/esm/ast/render.js +215 -0
  17. package/esm/compiler/constants.d.ts +16 -0
  18. package/esm/compiler/constants.d.ts.map +1 -0
  19. package/esm/compiler/constants.js +26 -0
  20. package/esm/compiler/discipline_classifier.d.ts +55 -0
  21. package/esm/compiler/discipline_classifier.d.ts.map +1 -0
  22. package/esm/compiler/discipline_classifier.js +191 -0
  23. package/esm/compiler/inverses.d.ts +2 -1
  24. package/esm/compiler/inverses.d.ts.map +1 -1
  25. package/esm/compiler/inverses.js +33 -14
  26. package/esm/compiler/manifest.d.ts +59 -0
  27. package/esm/compiler/manifest.d.ts.map +1 -0
  28. package/esm/compiler/manifest.js +48 -0
  29. package/esm/compiler/mod.d.ts +38 -1
  30. package/esm/compiler/mod.d.ts.map +1 -1
  31. package/esm/compiler/mod.js +202 -50
  32. package/esm/compiler/ndjson_writer.d.ts +50 -0
  33. package/esm/compiler/ndjson_writer.d.ts.map +1 -0
  34. package/esm/compiler/ndjson_writer.js +73 -0
  35. package/esm/compiler/schema.d.ts +33 -1
  36. package/esm/compiler/schema.d.ts.map +1 -1
  37. package/esm/compiler/schema.js +30 -9
  38. package/esm/config/markspec.d.ts +5 -0
  39. package/esm/config/markspec.d.ts.map +1 -1
  40. package/esm/config/markspec.js +17 -2
  41. package/esm/config/mod.d.ts.map +1 -1
  42. package/esm/config/mod.js +54 -0
  43. package/esm/formatter/mod.d.ts +55 -4
  44. package/esm/formatter/mod.d.ts.map +1 -1
  45. package/esm/formatter/mod.js +423 -46
  46. package/esm/formatter/synth_ulid.d.ts +21 -0
  47. package/esm/formatter/synth_ulid.d.ts.map +1 -0
  48. package/esm/formatter/synth_ulid.js +64 -0
  49. package/esm/lexicons/loader.d.ts +35 -0
  50. package/esm/lexicons/loader.d.ts.map +1 -0
  51. package/esm/lexicons/loader.js +51 -0
  52. package/esm/lexicons/mod.d.ts +13 -0
  53. package/esm/lexicons/mod.d.ts.map +1 -0
  54. package/esm/lexicons/mod.js +12 -0
  55. package/esm/lint/glossary.d.ts +45 -0
  56. package/esm/lint/glossary.d.ts.map +1 -0
  57. package/esm/lint/glossary.js +85 -0
  58. package/esm/lint/mod.d.ts +14 -0
  59. package/esm/lint/mod.d.ts.map +1 -0
  60. package/esm/lint/mod.js +9 -0
  61. package/esm/lint/range_util.d.ts +25 -0
  62. package/esm/lint/range_util.d.ts.map +1 -0
  63. package/esm/lint/range_util.js +50 -0
  64. package/esm/lint/rules/ears.d.ts +39 -0
  65. package/esm/lint/rules/ears.d.ts.map +1 -0
  66. package/esm/lint/rules/ears.js +316 -0
  67. package/esm/lint/rules/incose_sentence.d.ts +46 -0
  68. package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
  69. package/esm/lint/rules/incose_sentence.js +417 -0
  70. package/esm/lint/rules/lexicon.d.ts +24 -0
  71. package/esm/lint/rules/lexicon.d.ts.map +1 -0
  72. package/esm/lint/rules/lexicon.js +236 -0
  73. package/esm/lint/rules/modal_sentence.d.ts +46 -0
  74. package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
  75. package/esm/lint/rules/modal_sentence.js +146 -0
  76. package/esm/lint/rules/passive.d.ts +64 -0
  77. package/esm/lint/rules/passive.d.ts.map +1 -0
  78. package/esm/lint/rules/passive.js +282 -0
  79. package/esm/lint/rules/struct.d.ts +17 -0
  80. package/esm/lint/rules/struct.d.ts.map +1 -0
  81. package/esm/lint/rules/struct.js +55 -0
  82. package/esm/lint/rules/suppression.d.ts +54 -0
  83. package/esm/lint/rules/suppression.d.ts.map +1 -0
  84. package/esm/lint/rules/suppression.js +129 -0
  85. package/esm/lint/rules/xref.d.ts +19 -0
  86. package/esm/lint/rules/xref.d.ts.map +1 -0
  87. package/esm/lint/rules/xref.js +248 -0
  88. package/esm/lint/runner.d.ts +59 -0
  89. package/esm/lint/runner.d.ts.map +1 -0
  90. package/esm/lint/runner.js +153 -0
  91. package/esm/lint/score.d.ts +64 -0
  92. package/esm/lint/score.d.ts.map +1 -0
  93. package/esm/lint/score.js +163 -0
  94. package/esm/lint/segmenter.d.ts +32 -0
  95. package/esm/lint/segmenter.d.ts.map +1 -0
  96. package/esm/lint/segmenter.js +79 -0
  97. package/esm/lint/types.d.ts +31 -0
  98. package/esm/lint/types.d.ts.map +1 -0
  99. package/esm/lint/types.js +9 -0
  100. package/esm/lock/canonical_edges.d.ts +31 -0
  101. package/esm/lock/canonical_edges.d.ts.map +1 -0
  102. package/esm/lock/canonical_edges.js +57 -0
  103. package/esm/lock/check.d.ts +24 -0
  104. package/esm/lock/check.d.ts.map +1 -0
  105. package/esm/lock/check.js +127 -0
  106. package/esm/lock/hash.d.ts +12 -0
  107. package/esm/lock/hash.d.ts.map +1 -0
  108. package/esm/lock/hash.js +32 -0
  109. package/esm/lock/mod.d.ts +19 -0
  110. package/esm/lock/mod.d.ts.map +1 -0
  111. package/esm/lock/mod.js +14 -0
  112. package/esm/lock/model.d.ts +81 -0
  113. package/esm/lock/model.d.ts.map +1 -0
  114. package/esm/lock/model.js +7 -0
  115. package/esm/lock/parser.d.ts +26 -0
  116. package/esm/lock/parser.d.ts.map +1 -0
  117. package/esm/lock/parser.js +195 -0
  118. package/esm/lock/resolve.d.ts +142 -0
  119. package/esm/lock/resolve.d.ts.map +1 -0
  120. package/esm/lock/resolve.js +389 -0
  121. package/esm/lock/serializer.d.ts +14 -0
  122. package/esm/lock/serializer.d.ts.map +1 -0
  123. package/esm/lock/serializer.js +104 -0
  124. package/esm/mod.d.ts +28 -8
  125. package/esm/mod.d.ts.map +1 -1
  126. package/esm/mod.js +23 -4
  127. package/esm/model/attributes.d.ts +6 -0
  128. package/esm/model/attributes.d.ts.map +1 -1
  129. package/esm/model/attributes.js +200 -2
  130. package/esm/model/discipline.d.ts +53 -0
  131. package/esm/model/discipline.d.ts.map +1 -0
  132. package/esm/model/discipline.js +50 -0
  133. package/esm/model/discriminating_attr.d.ts +33 -0
  134. package/esm/model/discriminating_attr.d.ts.map +1 -0
  135. package/esm/model/discriminating_attr.js +74 -0
  136. package/esm/model/mod.d.ts +267 -14
  137. package/esm/model/mod.d.ts.map +1 -1
  138. package/esm/model/mod.js +99 -3
  139. package/esm/model/profile.d.ts +102 -27
  140. package/esm/model/profile.d.ts.map +1 -1
  141. package/esm/model/source_introspection.d.ts +26 -0
  142. package/esm/model/source_introspection.d.ts.map +1 -0
  143. package/esm/model/source_introspection.js +77 -0
  144. package/esm/model/type_hierarchy.d.ts +51 -0
  145. package/esm/model/type_hierarchy.d.ts.map +1 -0
  146. package/esm/model/type_hierarchy.js +126 -0
  147. package/esm/model/uri_scheme_map.d.ts +21 -0
  148. package/esm/model/uri_scheme_map.d.ts.map +1 -0
  149. package/esm/model/uri_scheme_map.js +66 -0
  150. package/esm/parser/attributes.d.ts.map +1 -1
  151. package/esm/parser/attributes.js +10 -16
  152. package/esm/parser/body_tokens.d.ts +35 -0
  153. package/esm/parser/body_tokens.d.ts.map +1 -0
  154. package/esm/parser/body_tokens.js +232 -0
  155. package/esm/parser/glossary.d.ts +51 -0
  156. package/esm/parser/glossary.d.ts.map +1 -0
  157. package/esm/parser/glossary.js +219 -0
  158. package/esm/parser/grammars.d.ts +5 -3
  159. package/esm/parser/grammars.d.ts.map +1 -1
  160. package/esm/parser/grammars.js +12 -4
  161. package/esm/parser/language_spec.d.ts +55 -0
  162. package/esm/parser/language_spec.d.ts.map +1 -0
  163. package/esm/parser/language_spec.js +419 -0
  164. package/esm/parser/line_map.d.ts +60 -0
  165. package/esm/parser/line_map.d.ts.map +1 -0
  166. package/esm/parser/line_map.js +41 -0
  167. package/esm/parser/markdown.d.ts +9 -0
  168. package/esm/parser/markdown.d.ts.map +1 -1
  169. package/esm/parser/markdown.js +317 -25
  170. package/esm/parser/mod.d.ts +5 -0
  171. package/esm/parser/mod.d.ts.map +1 -1
  172. package/esm/parser/mod.js +31 -8
  173. package/esm/parser/source.d.ts +53 -2
  174. package/esm/parser/source.d.ts.map +1 -1
  175. package/esm/parser/source.js +158 -68
  176. package/esm/parser/translate.d.ts +24 -0
  177. package/esm/parser/translate.d.ts.map +1 -0
  178. package/esm/parser/translate.js +99 -0
  179. package/esm/profile/chain.d.ts +8 -0
  180. package/esm/profile/chain.d.ts.map +1 -1
  181. package/esm/profile/chain.js +32 -14
  182. package/esm/profile/colors.js +1 -1
  183. package/esm/profile/default_profile.d.ts +25 -0
  184. package/esm/profile/default_profile.d.ts.map +1 -0
  185. package/esm/profile/default_profile.js +43 -0
  186. package/esm/profile/discipline_mode.d.ts +64 -0
  187. package/esm/profile/discipline_mode.d.ts.map +1 -0
  188. package/esm/profile/discipline_mode.js +133 -0
  189. package/esm/profile/discipline_registry.d.ts +41 -0
  190. package/esm/profile/discipline_registry.d.ts.map +1 -0
  191. package/esm/profile/discipline_registry.js +67 -0
  192. package/esm/profile/introspect.d.ts +135 -0
  193. package/esm/profile/introspect.d.ts.map +1 -0
  194. package/esm/profile/introspect.js +378 -0
  195. package/esm/profile/load.d.ts +3 -1
  196. package/esm/profile/load.d.ts.map +1 -1
  197. package/esm/profile/load.js +91 -5
  198. package/esm/profile/manifest.d.ts.map +1 -1
  199. package/esm/profile/manifest.js +512 -90
  200. package/esm/profile/merge.d.ts.map +1 -1
  201. package/esm/profile/merge.js +251 -39
  202. package/esm/profile/mod.d.ts +4 -4
  203. package/esm/profile/mod.d.ts.map +1 -1
  204. package/esm/profile/mod.js +7 -2
  205. package/esm/reporter/mod.js +4 -4
  206. package/esm/sync/locked_attributes.d.ts +19 -0
  207. package/esm/sync/locked_attributes.d.ts.map +1 -0
  208. package/esm/sync/locked_attributes.js +27 -0
  209. package/esm/sync/log.d.ts +34 -0
  210. package/esm/sync/log.d.ts.map +1 -0
  211. package/esm/sync/log.js +48 -0
  212. package/esm/sync/mapping.d.ts +66 -0
  213. package/esm/sync/mapping.d.ts.map +1 -0
  214. package/esm/sync/mapping.js +165 -0
  215. package/esm/sync/mod.d.ts +16 -0
  216. package/esm/sync/mod.d.ts.map +1 -0
  217. package/esm/sync/mod.js +12 -0
  218. package/esm/sync/status.d.ts +23 -0
  219. package/esm/sync/status.d.ts.map +1 -0
  220. package/esm/sync/status.js +21 -0
  221. package/esm/typl/ast.d.ts +87 -0
  222. package/esm/typl/ast.d.ts.map +1 -0
  223. package/esm/typl/ast.js +21 -0
  224. package/esm/typl/bridge.d.ts +32 -0
  225. package/esm/typl/bridge.d.ts.map +1 -0
  226. package/esm/typl/bridge.js +27 -0
  227. package/esm/typl/bullet.d.ts +34 -0
  228. package/esm/typl/bullet.d.ts.map +1 -0
  229. package/esm/typl/bullet.js +44 -0
  230. package/esm/typl/diagnostics.d.ts +43 -0
  231. package/esm/typl/diagnostics.d.ts.map +1 -0
  232. package/esm/typl/diagnostics.js +61 -0
  233. package/esm/typl/fence.d.ts +31 -0
  234. package/esm/typl/fence.d.ts.map +1 -0
  235. package/esm/typl/fence.js +24 -0
  236. package/esm/typl/grammar.d.ts +20 -0
  237. package/esm/typl/grammar.d.ts.map +1 -0
  238. package/esm/typl/grammar.js +471 -0
  239. package/esm/typl/inline.d.ts +34 -0
  240. package/esm/typl/inline.d.ts.map +1 -0
  241. package/esm/typl/inline.js +48 -0
  242. package/esm/typl/lexer.d.ts +37 -0
  243. package/esm/typl/lexer.d.ts.map +1 -0
  244. package/esm/typl/lexer.js +234 -0
  245. package/esm/typl/mod.d.ts +23 -0
  246. package/esm/typl/mod.d.ts.map +1 -0
  247. package/esm/typl/mod.js +16 -0
  248. package/esm/typl/registry.d.ts +42 -0
  249. package/esm/typl/registry.d.ts.map +1 -0
  250. package/esm/typl/registry.js +26 -0
  251. package/esm/typl/validator.d.ts +29 -0
  252. package/esm/typl/validator.d.ts.map +1 -0
  253. package/esm/typl/validator.js +141 -0
  254. package/esm/util/fence.d.ts +30 -0
  255. package/esm/util/fence.d.ts.map +1 -0
  256. package/esm/util/fence.js +40 -0
  257. package/esm/util/line_endings.d.ts +33 -0
  258. package/esm/util/line_endings.d.ts.map +1 -0
  259. package/esm/util/line_endings.js +53 -0
  260. package/esm/util/modals.d.ts +29 -0
  261. package/esm/util/modals.d.ts.map +1 -0
  262. package/esm/util/modals.js +38 -0
  263. package/esm/validator/attributes.d.ts +3 -3
  264. package/esm/validator/attributes.d.ts.map +1 -1
  265. package/esm/validator/attributes.js +1 -18
  266. package/esm/validator/body_blocks.d.ts +38 -0
  267. package/esm/validator/body_blocks.d.ts.map +1 -0
  268. package/esm/validator/body_blocks.js +218 -0
  269. package/esm/validator/caption_convention.d.ts +29 -0
  270. package/esm/validator/caption_convention.d.ts.map +1 -0
  271. package/esm/validator/caption_convention.js +58 -0
  272. package/esm/validator/captions.d.ts +22 -0
  273. package/esm/validator/captions.d.ts.map +1 -0
  274. package/esm/validator/captions.js +137 -0
  275. package/esm/validator/component_schemes.d.ts +73 -0
  276. package/esm/validator/component_schemes.d.ts.map +1 -0
  277. package/esm/validator/component_schemes.js +375 -0
  278. package/esm/validator/discipline.d.ts +35 -0
  279. package/esm/validator/discipline.d.ts.map +1 -0
  280. package/esm/validator/discipline.js +204 -0
  281. package/esm/validator/feature_ac.d.ts +28 -0
  282. package/esm/validator/feature_ac.d.ts.map +1 -0
  283. package/esm/validator/feature_ac.js +102 -0
  284. package/esm/validator/listing.d.ts +42 -0
  285. package/esm/validator/listing.d.ts.map +1 -0
  286. package/esm/validator/listing.js +295 -0
  287. package/esm/validator/mod.d.ts +3 -1
  288. package/esm/validator/mod.d.ts.map +1 -1
  289. package/esm/validator/mod.js +275 -13
  290. package/esm/validator/modal_keywords.d.ts +25 -0
  291. package/esm/validator/modal_keywords.d.ts.map +1 -0
  292. package/esm/validator/modal_keywords.js +54 -0
  293. package/esm/validator/pattern.d.ts +15 -8
  294. package/esm/validator/pattern.d.ts.map +1 -1
  295. package/esm/validator/pattern.js +42 -19
  296. package/esm/validator/per_type_attrs.d.ts +29 -0
  297. package/esm/validator/per_type_attrs.d.ts.map +1 -0
  298. package/esm/validator/per_type_attrs.js +75 -0
  299. package/esm/validator/pipeline.d.ts +18 -2
  300. package/esm/validator/pipeline.d.ts.map +1 -1
  301. package/esm/validator/pipeline.js +76 -21
  302. package/esm/validator/trace_types.d.ts +26 -0
  303. package/esm/validator/trace_types.d.ts.map +1 -0
  304. package/esm/validator/trace_types.js +232 -0
  305. package/esm/validator/traceability.d.ts +3 -4
  306. package/esm/validator/traceability.d.ts.map +1 -1
  307. package/esm/validator/traceability.js +5 -10
  308. package/esm/validator/type_resolution.d.ts +67 -0
  309. package/esm/validator/type_resolution.d.ts.map +1 -0
  310. package/esm/validator/type_resolution.js +162 -0
  311. package/esm/validator/types.d.ts +45 -0
  312. package/esm/validator/types.d.ts.map +1 -1
  313. package/esm/validator/types.js +128 -16
  314. package/esm/validator/value_types.d.ts +8 -0
  315. package/esm/validator/value_types.d.ts.map +1 -1
  316. package/esm/validator/value_types.js +8 -1
  317. package/package.json +2 -2
  318. package/script/ast/build.d.ts +60 -0
  319. package/script/ast/build.d.ts.map +1 -0
  320. package/script/ast/build.js +521 -0
  321. package/script/ast/equivalence.d.ts +18 -0
  322. package/script/ast/equivalence.d.ts.map +1 -0
  323. package/script/ast/equivalence.js +59 -0
  324. package/script/ast/nodes.d.ts +189 -0
  325. package/script/ast/nodes.d.ts.map +1 -0
  326. package/script/ast/nodes.js +18 -0
  327. package/script/ast/normalize.d.ts +58 -0
  328. package/script/ast/normalize.d.ts.map +1 -0
  329. package/script/ast/normalize.js +200 -0
  330. package/script/ast/render.d.ts +34 -0
  331. package/script/ast/render.d.ts.map +1 -0
  332. package/script/ast/render.js +218 -0
  333. package/script/compiler/constants.d.ts +16 -0
  334. package/script/compiler/constants.d.ts.map +1 -0
  335. package/script/compiler/constants.js +29 -0
  336. package/script/compiler/discipline_classifier.d.ts +55 -0
  337. package/script/compiler/discipline_classifier.d.ts.map +1 -0
  338. package/script/compiler/discipline_classifier.js +196 -0
  339. package/script/compiler/inverses.d.ts +2 -1
  340. package/script/compiler/inverses.d.ts.map +1 -1
  341. package/script/compiler/inverses.js +33 -14
  342. package/script/compiler/manifest.d.ts +59 -0
  343. package/script/compiler/manifest.d.ts.map +1 -0
  344. package/script/compiler/manifest.js +51 -0
  345. package/script/compiler/mod.d.ts +38 -1
  346. package/script/compiler/mod.d.ts.map +1 -1
  347. package/script/compiler/mod.js +206 -54
  348. package/script/compiler/ndjson_writer.d.ts +50 -0
  349. package/script/compiler/ndjson_writer.d.ts.map +1 -0
  350. package/script/compiler/ndjson_writer.js +78 -0
  351. package/script/compiler/schema.d.ts +33 -1
  352. package/script/compiler/schema.d.ts.map +1 -1
  353. package/script/compiler/schema.js +30 -8
  354. package/script/config/markspec.d.ts +5 -0
  355. package/script/config/markspec.d.ts.map +1 -1
  356. package/script/config/markspec.js +17 -2
  357. package/script/config/mod.d.ts.map +1 -1
  358. package/script/config/mod.js +54 -0
  359. package/script/formatter/mod.d.ts +55 -4
  360. package/script/formatter/mod.d.ts.map +1 -1
  361. package/script/formatter/mod.js +426 -46
  362. package/script/formatter/synth_ulid.d.ts +21 -0
  363. package/script/formatter/synth_ulid.d.ts.map +1 -0
  364. package/script/formatter/synth_ulid.js +67 -0
  365. package/script/lexicons/loader.d.ts +35 -0
  366. package/script/lexicons/loader.d.ts.map +1 -0
  367. package/script/lexicons/loader.js +55 -0
  368. package/script/lexicons/mod.d.ts +13 -0
  369. package/script/lexicons/mod.d.ts.map +1 -0
  370. package/script/lexicons/mod.js +17 -0
  371. package/script/lint/glossary.d.ts +45 -0
  372. package/script/lint/glossary.d.ts.map +1 -0
  373. package/script/lint/glossary.js +88 -0
  374. package/script/lint/mod.d.ts +14 -0
  375. package/script/lint/mod.d.ts.map +1 -0
  376. package/script/lint/mod.js +17 -0
  377. package/script/lint/range_util.d.ts +25 -0
  378. package/script/lint/range_util.d.ts.map +1 -0
  379. package/script/lint/range_util.js +53 -0
  380. package/script/lint/rules/ears.d.ts +39 -0
  381. package/script/lint/rules/ears.d.ts.map +1 -0
  382. package/script/lint/rules/ears.js +320 -0
  383. package/script/lint/rules/incose_sentence.d.ts +46 -0
  384. package/script/lint/rules/incose_sentence.d.ts.map +1 -0
  385. package/script/lint/rules/incose_sentence.js +421 -0
  386. package/script/lint/rules/lexicon.d.ts +24 -0
  387. package/script/lint/rules/lexicon.d.ts.map +1 -0
  388. package/script/lint/rules/lexicon.js +240 -0
  389. package/script/lint/rules/modal_sentence.d.ts +46 -0
  390. package/script/lint/rules/modal_sentence.d.ts.map +1 -0
  391. package/script/lint/rules/modal_sentence.js +150 -0
  392. package/script/lint/rules/passive.d.ts +64 -0
  393. package/script/lint/rules/passive.d.ts.map +1 -0
  394. package/script/lint/rules/passive.js +286 -0
  395. package/script/lint/rules/struct.d.ts +17 -0
  396. package/script/lint/rules/struct.d.ts.map +1 -0
  397. package/script/lint/rules/struct.js +59 -0
  398. package/script/lint/rules/suppression.d.ts +54 -0
  399. package/script/lint/rules/suppression.d.ts.map +1 -0
  400. package/script/lint/rules/suppression.js +136 -0
  401. package/script/lint/rules/xref.d.ts +19 -0
  402. package/script/lint/rules/xref.d.ts.map +1 -0
  403. package/script/lint/rules/xref.js +251 -0
  404. package/script/lint/runner.d.ts +59 -0
  405. package/script/lint/runner.d.ts.map +1 -0
  406. package/script/lint/runner.js +157 -0
  407. package/script/lint/score.d.ts +64 -0
  408. package/script/lint/score.d.ts.map +1 -0
  409. package/script/lint/score.js +167 -0
  410. package/script/lint/segmenter.d.ts +32 -0
  411. package/script/lint/segmenter.d.ts.map +1 -0
  412. package/script/lint/segmenter.js +82 -0
  413. package/script/lint/types.d.ts +31 -0
  414. package/script/lint/types.d.ts.map +1 -0
  415. package/script/lint/types.js +10 -0
  416. package/script/lock/canonical_edges.d.ts +31 -0
  417. package/script/lock/canonical_edges.d.ts.map +1 -0
  418. package/script/lock/canonical_edges.js +61 -0
  419. package/script/lock/check.d.ts +24 -0
  420. package/script/lock/check.d.ts.map +1 -0
  421. package/script/lock/check.js +130 -0
  422. package/script/lock/hash.d.ts +12 -0
  423. package/script/lock/hash.d.ts.map +1 -0
  424. package/script/lock/hash.js +36 -0
  425. package/script/lock/mod.d.ts +19 -0
  426. package/script/lock/mod.d.ts.map +1 -0
  427. package/script/lock/mod.js +31 -0
  428. package/script/lock/model.d.ts +81 -0
  429. package/script/lock/model.d.ts.map +1 -0
  430. package/script/lock/model.js +10 -0
  431. package/script/lock/parser.d.ts +26 -0
  432. package/script/lock/parser.d.ts.map +1 -0
  433. package/script/lock/parser.js +198 -0
  434. package/script/lock/resolve.d.ts +142 -0
  435. package/script/lock/resolve.d.ts.map +1 -0
  436. package/script/lock/resolve.js +397 -0
  437. package/script/lock/serializer.d.ts +14 -0
  438. package/script/lock/serializer.d.ts.map +1 -0
  439. package/script/lock/serializer.js +107 -0
  440. package/script/mod.d.ts +28 -8
  441. package/script/mod.d.ts.map +1 -1
  442. package/script/mod.js +129 -32
  443. package/script/model/attributes.d.ts +6 -0
  444. package/script/model/attributes.d.ts.map +1 -1
  445. package/script/model/attributes.js +201 -3
  446. package/script/model/discipline.d.ts +53 -0
  447. package/script/model/discipline.d.ts.map +1 -0
  448. package/script/model/discipline.js +53 -0
  449. package/script/model/discriminating_attr.d.ts +33 -0
  450. package/script/model/discriminating_attr.d.ts.map +1 -0
  451. package/script/model/discriminating_attr.js +77 -0
  452. package/script/model/mod.d.ts +267 -14
  453. package/script/model/mod.d.ts.map +1 -1
  454. package/script/model/mod.js +111 -3
  455. package/script/model/profile.d.ts +102 -27
  456. package/script/model/profile.d.ts.map +1 -1
  457. package/script/model/source_introspection.d.ts +26 -0
  458. package/script/model/source_introspection.d.ts.map +1 -0
  459. package/script/model/source_introspection.js +80 -0
  460. package/script/model/type_hierarchy.d.ts +51 -0
  461. package/script/model/type_hierarchy.d.ts.map +1 -0
  462. package/script/model/type_hierarchy.js +130 -0
  463. package/script/model/uri_scheme_map.d.ts +21 -0
  464. package/script/model/uri_scheme_map.d.ts.map +1 -0
  465. package/script/model/uri_scheme_map.js +69 -0
  466. package/script/parser/attributes.d.ts.map +1 -1
  467. package/script/parser/attributes.js +10 -16
  468. package/script/parser/body_tokens.d.ts +35 -0
  469. package/script/parser/body_tokens.d.ts.map +1 -0
  470. package/script/parser/body_tokens.js +235 -0
  471. package/script/parser/glossary.d.ts +51 -0
  472. package/script/parser/glossary.d.ts.map +1 -0
  473. package/script/parser/glossary.js +224 -0
  474. package/script/parser/grammars.d.ts +5 -3
  475. package/script/parser/grammars.d.ts.map +1 -1
  476. package/script/parser/grammars.js +15 -8
  477. package/script/parser/language_spec.d.ts +55 -0
  478. package/script/parser/language_spec.d.ts.map +1 -0
  479. package/script/parser/language_spec.js +423 -0
  480. package/script/parser/line_map.d.ts +60 -0
  481. package/script/parser/line_map.d.ts.map +1 -0
  482. package/script/parser/line_map.js +44 -0
  483. package/script/parser/markdown.d.ts +9 -0
  484. package/script/parser/markdown.d.ts.map +1 -1
  485. package/script/parser/markdown.js +315 -23
  486. package/script/parser/mod.d.ts +5 -0
  487. package/script/parser/mod.d.ts.map +1 -1
  488. package/script/parser/mod.js +36 -7
  489. package/script/parser/source.d.ts +53 -2
  490. package/script/parser/source.d.ts.map +1 -1
  491. package/script/parser/source.js +159 -69
  492. package/script/parser/translate.d.ts +24 -0
  493. package/script/parser/translate.d.ts.map +1 -0
  494. package/script/parser/translate.js +102 -0
  495. package/script/profile/chain.d.ts +8 -0
  496. package/script/profile/chain.d.ts.map +1 -1
  497. package/script/profile/chain.js +32 -14
  498. package/script/profile/colors.js +1 -1
  499. package/script/profile/default_profile.d.ts +25 -0
  500. package/script/profile/default_profile.d.ts.map +1 -0
  501. package/script/profile/default_profile.js +46 -0
  502. package/script/profile/discipline_mode.d.ts +64 -0
  503. package/script/profile/discipline_mode.d.ts.map +1 -0
  504. package/script/profile/discipline_mode.js +138 -0
  505. package/script/profile/discipline_registry.d.ts +41 -0
  506. package/script/profile/discipline_registry.d.ts.map +1 -0
  507. package/script/profile/discipline_registry.js +70 -0
  508. package/script/profile/introspect.d.ts +135 -0
  509. package/script/profile/introspect.d.ts.map +1 -0
  510. package/script/profile/introspect.js +381 -0
  511. package/script/profile/load.d.ts +3 -1
  512. package/script/profile/load.d.ts.map +1 -1
  513. package/script/profile/load.js +91 -5
  514. package/script/profile/manifest.d.ts.map +1 -1
  515. package/script/profile/manifest.js +511 -89
  516. package/script/profile/merge.d.ts.map +1 -1
  517. package/script/profile/merge.js +251 -39
  518. package/script/profile/mod.d.ts +4 -4
  519. package/script/profile/mod.d.ts.map +1 -1
  520. package/script/profile/mod.js +12 -6
  521. package/script/reporter/mod.js +4 -4
  522. package/script/sync/locked_attributes.d.ts +19 -0
  523. package/script/sync/locked_attributes.d.ts.map +1 -0
  524. package/script/sync/locked_attributes.js +30 -0
  525. package/script/sync/log.d.ts +34 -0
  526. package/script/sync/log.d.ts.map +1 -0
  527. package/script/sync/log.js +52 -0
  528. package/script/sync/mapping.d.ts +66 -0
  529. package/script/sync/mapping.d.ts.map +1 -0
  530. package/script/sync/mapping.js +169 -0
  531. package/script/sync/mod.d.ts +16 -0
  532. package/script/sync/mod.d.ts.map +1 -0
  533. package/script/sync/mod.js +21 -0
  534. package/script/sync/status.d.ts +23 -0
  535. package/script/sync/status.d.ts.map +1 -0
  536. package/script/sync/status.js +24 -0
  537. package/script/typl/ast.d.ts +87 -0
  538. package/script/typl/ast.d.ts.map +1 -0
  539. package/script/typl/ast.js +24 -0
  540. package/script/typl/bridge.d.ts +32 -0
  541. package/script/typl/bridge.d.ts.map +1 -0
  542. package/script/typl/bridge.js +30 -0
  543. package/script/typl/bullet.d.ts +34 -0
  544. package/script/typl/bullet.d.ts.map +1 -0
  545. package/script/typl/bullet.js +47 -0
  546. package/script/typl/diagnostics.d.ts +43 -0
  547. package/script/typl/diagnostics.d.ts.map +1 -0
  548. package/script/typl/diagnostics.js +65 -0
  549. package/script/typl/fence.d.ts +31 -0
  550. package/script/typl/fence.d.ts.map +1 -0
  551. package/script/typl/fence.js +27 -0
  552. package/script/typl/grammar.d.ts +20 -0
  553. package/script/typl/grammar.d.ts.map +1 -0
  554. package/script/typl/grammar.js +474 -0
  555. package/script/typl/inline.d.ts +34 -0
  556. package/script/typl/inline.d.ts.map +1 -0
  557. package/script/typl/inline.js +51 -0
  558. package/script/typl/lexer.d.ts +37 -0
  559. package/script/typl/lexer.d.ts.map +1 -0
  560. package/script/typl/lexer.js +237 -0
  561. package/script/typl/mod.d.ts +23 -0
  562. package/script/typl/mod.d.ts.map +1 -0
  563. package/script/typl/mod.js +29 -0
  564. package/script/typl/registry.d.ts +42 -0
  565. package/script/typl/registry.d.ts.map +1 -0
  566. package/script/typl/registry.js +29 -0
  567. package/script/typl/validator.d.ts +29 -0
  568. package/script/typl/validator.d.ts.map +1 -0
  569. package/script/typl/validator.js +144 -0
  570. package/script/util/fence.d.ts +30 -0
  571. package/script/util/fence.d.ts.map +1 -0
  572. package/script/util/fence.js +44 -0
  573. package/script/util/line_endings.d.ts +33 -0
  574. package/script/util/line_endings.d.ts.map +1 -0
  575. package/script/util/line_endings.js +58 -0
  576. package/script/util/modals.d.ts +29 -0
  577. package/script/util/modals.d.ts.map +1 -0
  578. package/script/util/modals.js +42 -0
  579. package/script/validator/attributes.d.ts +3 -3
  580. package/script/validator/attributes.d.ts.map +1 -1
  581. package/script/validator/attributes.js +1 -18
  582. package/script/validator/body_blocks.d.ts +38 -0
  583. package/script/validator/body_blocks.d.ts.map +1 -0
  584. package/script/validator/body_blocks.js +221 -0
  585. package/script/validator/caption_convention.d.ts +29 -0
  586. package/script/validator/caption_convention.d.ts.map +1 -0
  587. package/script/validator/caption_convention.js +61 -0
  588. package/script/validator/captions.d.ts +22 -0
  589. package/script/validator/captions.d.ts.map +1 -0
  590. package/script/validator/captions.js +140 -0
  591. package/script/validator/component_schemes.d.ts +73 -0
  592. package/script/validator/component_schemes.d.ts.map +1 -0
  593. package/script/validator/component_schemes.js +384 -0
  594. package/script/validator/discipline.d.ts +35 -0
  595. package/script/validator/discipline.d.ts.map +1 -0
  596. package/script/validator/discipline.js +207 -0
  597. package/script/validator/feature_ac.d.ts +28 -0
  598. package/script/validator/feature_ac.d.ts.map +1 -0
  599. package/script/validator/feature_ac.js +105 -0
  600. package/script/validator/listing.d.ts +42 -0
  601. package/script/validator/listing.d.ts.map +1 -0
  602. package/script/validator/listing.js +298 -0
  603. package/script/validator/mod.d.ts +3 -1
  604. package/script/validator/mod.d.ts.map +1 -1
  605. package/script/validator/mod.js +278 -14
  606. package/script/validator/modal_keywords.d.ts +25 -0
  607. package/script/validator/modal_keywords.d.ts.map +1 -0
  608. package/script/validator/modal_keywords.js +57 -0
  609. package/script/validator/pattern.d.ts +15 -8
  610. package/script/validator/pattern.d.ts.map +1 -1
  611. package/script/validator/pattern.js +42 -19
  612. package/script/validator/per_type_attrs.d.ts +29 -0
  613. package/script/validator/per_type_attrs.d.ts.map +1 -0
  614. package/script/validator/per_type_attrs.js +78 -0
  615. package/script/validator/pipeline.d.ts +18 -2
  616. package/script/validator/pipeline.d.ts.map +1 -1
  617. package/script/validator/pipeline.js +78 -22
  618. package/script/validator/trace_types.d.ts +26 -0
  619. package/script/validator/trace_types.d.ts.map +1 -0
  620. package/script/validator/trace_types.js +235 -0
  621. package/script/validator/traceability.d.ts +3 -4
  622. package/script/validator/traceability.d.ts.map +1 -1
  623. package/script/validator/traceability.js +5 -10
  624. package/script/validator/type_resolution.d.ts +67 -0
  625. package/script/validator/type_resolution.d.ts.map +1 -0
  626. package/script/validator/type_resolution.js +168 -0
  627. package/script/validator/types.d.ts +45 -0
  628. package/script/validator/types.d.ts.map +1 -1
  629. package/script/validator/types.js +131 -16
  630. package/script/validator/value_types.d.ts +8 -0
  631. package/script/validator/value_types.d.ts.map +1 -1
  632. package/script/validator/value_types.js +10 -2
@@ -5,15 +5,102 @@
5
5
  * MarkSpec document model — AST types, ID types, and project configuration.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.VALUE_TYPES = exports.LIST_VALUE_TYPES = exports.ConfigError = exports.DEFAULT_PROJECT_CONFIG = exports.REFHUB_URL = exports.URI_SCHEME_RE = exports.ULID_RE = exports.IDENTITY_KEY = exports.PALETTE_HUES = exports.COLOR_NAME_RE = exports.UNIVERSAL_ATTRIBUTE_KEYS = exports.attributeSpec = exports.ATTRIBUTE_CATALOG = void 0;
8
+ exports.VALUE_TYPES = exports.LIST_VALUE_TYPES = exports.KNOWN_LINK_KINDS = exports.ConfigError = exports.DEFAULT_PROJECT_CONFIG = exports.REFHUB_URL = exports.URI_SCHEME_RE = exports.ULID_RE = exports.IDENTITY_KEY = exports.CORE_TYPES = exports.CORE_CONCRETE_TYPES = exports.CORE_ABSTRACT_TYPES = exports.MIXED_DISCIPLINE = exports.CORE_KINDS = exports.CORE_DISCIPLINE_REGISTRY = exports.inferTypeFromDiscriminatingAttr = exports.inferTypeFromSource = exports.inferTypeFromUriScheme = exports.CORE_TYPE_SCOPED_ATTRS = exports.CORE_TYPE_HIERARCHY = exports.attributesForType = exports.PALETTE_HUES = exports.COLOR_NAME_RE = exports.UNIVERSAL_ATTRIBUTE_KEYS = exports.CSV_SPLITTABLE_TYPES = exports.attributeSpec = exports.ATTRIBUTE_CATALOG = void 0;
9
+ exports.makeDisplayId = makeDisplayId;
10
+ exports.makeUlid = makeUlid;
9
11
  exports.shapeFromIdValue = shapeFromIdValue;
10
12
  var attributes_js_1 = require("./attributes.js");
11
13
  Object.defineProperty(exports, "ATTRIBUTE_CATALOG", { enumerable: true, get: function () { return attributes_js_1.ATTRIBUTE_CATALOG; } });
12
14
  Object.defineProperty(exports, "attributeSpec", { enumerable: true, get: function () { return attributes_js_1.attributeSpec; } });
15
+ Object.defineProperty(exports, "CSV_SPLITTABLE_TYPES", { enumerable: true, get: function () { return attributes_js_1.CSV_SPLITTABLE_TYPES; } });
13
16
  Object.defineProperty(exports, "UNIVERSAL_ATTRIBUTE_KEYS", { enumerable: true, get: function () { return attributes_js_1.UNIVERSAL_ATTRIBUTE_KEYS; } });
14
17
  var palette_js_1 = require("./palette.js");
15
18
  Object.defineProperty(exports, "COLOR_NAME_RE", { enumerable: true, get: function () { return palette_js_1.COLOR_NAME_RE; } });
16
19
  Object.defineProperty(exports, "PALETTE_HUES", { enumerable: true, get: function () { return palette_js_1.PALETTE_HUES; } });
20
+ var type_hierarchy_js_1 = require("./type_hierarchy.js");
21
+ Object.defineProperty(exports, "attributesForType", { enumerable: true, get: function () { return type_hierarchy_js_1.attributesForType; } });
22
+ Object.defineProperty(exports, "CORE_TYPE_HIERARCHY", { enumerable: true, get: function () { return type_hierarchy_js_1.CORE_TYPE_HIERARCHY; } });
23
+ Object.defineProperty(exports, "CORE_TYPE_SCOPED_ATTRS", { enumerable: true, get: function () { return type_hierarchy_js_1.CORE_TYPE_SCOPED_ATTRS; } });
24
+ var uri_scheme_map_js_1 = require("./uri_scheme_map.js");
25
+ Object.defineProperty(exports, "inferTypeFromUriScheme", { enumerable: true, get: function () { return uri_scheme_map_js_1.inferTypeFromUriScheme; } });
26
+ var source_introspection_js_1 = require("./source_introspection.js");
27
+ Object.defineProperty(exports, "inferTypeFromSource", { enumerable: true, get: function () { return source_introspection_js_1.inferTypeFromSource; } });
28
+ var discriminating_attr_js_1 = require("./discriminating_attr.js");
29
+ Object.defineProperty(exports, "inferTypeFromDiscriminatingAttr", { enumerable: true, get: function () { return discriminating_attr_js_1.inferTypeFromDiscriminatingAttr; } });
30
+ // Re-export discipline primitives (ADR-017 / ADR-018).
31
+ var discipline_js_1 = require("./discipline.js");
32
+ Object.defineProperty(exports, "CORE_DISCIPLINE_REGISTRY", { enumerable: true, get: function () { return discipline_js_1.CORE_DISCIPLINE_REGISTRY; } });
33
+ Object.defineProperty(exports, "CORE_KINDS", { enumerable: true, get: function () { return discipline_js_1.CORE_KINDS; } });
34
+ Object.defineProperty(exports, "MIXED_DISCIPLINE", { enumerable: true, get: function () { return discipline_js_1.MIXED_DISCIPLINE; } });
35
+ /**
36
+ * Cast a plain string to a branded `DisplayId`.
37
+ *
38
+ * This is a zero-cost assertion — no validation is performed. The caller
39
+ * asserts that `s` is a syntactically valid display ID.
40
+ */
41
+ function makeDisplayId(s) {
42
+ return s;
43
+ }
44
+ /**
45
+ * Cast a plain string to a branded `Ulid`.
46
+ *
47
+ * This is a zero-cost assertion — no validation is performed. The caller
48
+ * asserts that `s` is a syntactically valid 26-character Crockford base32
49
+ * ULID.
50
+ */
51
+ function makeUlid(s) {
52
+ return s;
53
+ }
54
+ // ---------------------------------------------------------------------------
55
+ // Core type taxonomy (ADR-003 §Part 1, spec §1.3)
56
+ // ---------------------------------------------------------------------------
57
+ /**
58
+ * Core abstract item types. Always valid as `Type:` values regardless of
59
+ * which profile is loaded (core-only mode included). Convention: TitleCase.
60
+ *
61
+ * - `Item` is the abstract root and serves as the bottom fallback in the
62
+ * type-resolution chain (§1.3.1 step 8).
63
+ * - `Specification`, `Component`, `Unit` are abstract+concrete parents:
64
+ * instantiable as direct fallbacks when no concrete subtype fits, and
65
+ * roots for both core concrete subtypes and profile-declared extensions.
66
+ */
67
+ exports.CORE_ABSTRACT_TYPES = [
68
+ "Item",
69
+ "Specification",
70
+ "Component",
71
+ "Unit",
72
+ ];
73
+ /**
74
+ * Core concrete item types (ADR-003 §Part 1). Twelve subtypes plus three
75
+ * abstract+concrete parents from {@linkcode CORE_ABSTRACT_TYPES} make up
76
+ * the "15 concrete instantiable types" the spec describes.
77
+ */
78
+ exports.CORE_CONCRETE_TYPES = [
79
+ // Specification subtypes
80
+ "Requirement",
81
+ "Test",
82
+ "Contract",
83
+ "Record",
84
+ "Risk",
85
+ // Component subtypes
86
+ "SoftwareComponent",
87
+ "HardwareComponent",
88
+ "SoftwareInterface",
89
+ "HardwareInterface",
90
+ // Unit subtypes
91
+ "SoftwareUnit",
92
+ "HardwareUnit",
93
+ // Definition (standalone under Item)
94
+ "Definition",
95
+ ];
96
+ /**
97
+ * All core type names. Accepted as `Type:` values in core-only mode and
98
+ * when any profile is loaded. Profile-declared types extend this set.
99
+ */
100
+ exports.CORE_TYPES = new Set([
101
+ ...exports.CORE_ABSTRACT_TYPES,
102
+ ...exports.CORE_CONCRETE_TYPES,
103
+ ]);
17
104
  /** Core-reserved identity attribute name. */
18
105
  exports.IDENTITY_KEY = "Id";
19
106
  /** Regex matching a bare ULID (identified-entry `Id:` value). */
@@ -34,9 +121,9 @@ exports.URI_SCHEME_RE = /^[A-Za-z][A-Za-z0-9+\-.]*:/;
34
121
  */
35
122
  function shapeFromIdValue(value) {
36
123
  if (exports.ULID_RE.test(value))
37
- return "identified";
124
+ return "Authored";
38
125
  if (exports.URI_SCHEME_RE.test(value))
39
- return "referenced";
126
+ return "Reference";
40
127
  return undefined;
41
128
  }
42
129
  // ---------------------------------------------------------------------------
@@ -51,6 +138,7 @@ exports.DEFAULT_PROJECT_CONFIG = {
51
138
  labels: [],
52
139
  parents: [],
53
140
  parentFallback: exports.REFHUB_URL,
141
+ captionConventions: {},
54
142
  };
55
143
  /** Error thrown when `project.yaml` is invalid. */
56
144
  class ConfigError extends Error {
@@ -81,6 +169,26 @@ class ConfigError extends Error {
81
169
  }
82
170
  }
83
171
  exports.ConfigError = ConfigError;
172
+ /**
173
+ * Built-in link kinds recognized by the core compiler and shipped profiles.
174
+ *
175
+ * Consumers that need to validate or enumerate the core-defined relation
176
+ * vocabulary should use this constant rather than hard-coding string literals.
177
+ * Profile-declared kinds extend this set at runtime.
178
+ */
179
+ exports.KNOWN_LINK_KINDS = [
180
+ "satisfies",
181
+ "derived-from",
182
+ "references",
183
+ "allocated-to",
184
+ "realizes",
185
+ "verifies",
186
+ "tests",
187
+ "depends-on",
188
+ "part-of",
189
+ "generated-from",
190
+ "supersedes",
191
+ ];
84
192
  var profile_js_1 = require("./profile.js");
85
193
  Object.defineProperty(exports, "LIST_VALUE_TYPES", { enumerable: true, get: function () { return profile_js_1.LIST_VALUE_TYPES; } });
86
194
  Object.defineProperty(exports, "VALUE_TYPES", { enumerable: true, get: function () { return profile_js_1.VALUE_TYPES; } });
@@ -4,7 +4,6 @@
4
4
  * Profile data model — TypeScript types that mirror ADR-008 §4 manifest
5
5
  * schema. Used by the profile loader, merger, and validator.
6
6
  */
7
- import type { EntryShape } from "./mod.js";
8
7
  /** All 14 attribute value-type keywords recognized by the core. */
9
8
  export declare const VALUE_TYPES: readonly ["id", "id-list", "uri", "url", "path", "path-or-id", "enum", "tag-list", "text", "citation", "external-id", "integer", "date", "boolean"];
10
9
  export type ValueType = typeof VALUE_TYPES[number];
@@ -28,21 +27,50 @@ export interface AttrDecl {
28
27
  readonly cardinality: Cardinality;
29
28
  readonly values?: readonly string[];
30
29
  readonly inverse?: InverseDecl;
30
+ readonly description?: string;
31
31
  }
32
32
  /** Target matcher: either a type name or a shape matcher object. */
33
33
  export type TargetMatcher = string | {
34
- readonly shape: "identified" | "referenced";
34
+ readonly shape: "Authored" | "Reference";
35
35
  };
36
36
  /** Traceability rule declared on a shape or type scope. */
37
37
  export interface TraceRule {
38
38
  readonly target: readonly TargetMatcher[];
39
39
  readonly cardinality?: Cardinality;
40
40
  readonly required: boolean;
41
+ readonly description?: string;
42
+ }
43
+ export type LabelConcernKind = "enum" | "set" | "flag";
44
+ export interface LabelValue {
45
+ readonly name: string;
46
+ readonly description?: string;
47
+ }
48
+ export interface LabelConcern {
49
+ readonly name: string;
50
+ readonly kind: LabelConcernKind;
51
+ readonly description?: string;
52
+ readonly values: readonly LabelValue[];
53
+ }
54
+ export interface ProfileConvention {
55
+ readonly name: string;
56
+ readonly settings: Readonly<Record<string, string>>;
57
+ readonly description?: string;
58
+ }
59
+ /**
60
+ * Resolved discipline mode per ADR-017 Slice 5. The mode shapes
61
+ * downstream behaviour (Doctor reporting, LSP scaffold ordering,
62
+ * Slice 4 mixed-allocation rule activation).
63
+ */
64
+ export type DisciplineMode = "flat" | "tiered" | "none";
65
+ /** A profile-declared discipline kind. */
66
+ export interface KindDecl {
67
+ readonly description?: string;
41
68
  }
42
69
  export type EnforcementMode = "off" | "warn" | "error";
43
70
  export interface TypeDef {
44
71
  readonly name: string;
45
- readonly shape: EntryShape;
72
+ /** The core type this profile type extends (e.g., "Requirement", "Test"). */
73
+ readonly extends: string;
46
74
  readonly displayIdPattern?: string;
47
75
  readonly displayIdPatternEnforcement: EnforcementMode;
48
76
  readonly required: readonly string[];
@@ -50,6 +78,13 @@ export interface TypeDef {
50
78
  readonly traceability: ReadonlyMap<string, TraceRule>;
51
79
  /** Optional semantic color-role name (key into `ProfileManifest.colors`). */
52
80
  readonly color?: string;
81
+ readonly description?: string;
82
+ /**
83
+ * Discipline kind explicitly assigned to this type. When absent, the
84
+ * effective discipline registry auto-inherits from the type's `extends:`
85
+ * ancestor (see core/profile/discipline_registry.ts).
86
+ */
87
+ readonly discipline?: string;
53
88
  }
54
89
  export interface DocTypeDef {
55
90
  readonly id: string;
@@ -70,17 +105,21 @@ export type ProfileSpecifier = {
70
105
  readonly scope?: string;
71
106
  readonly name: string;
72
107
  readonly range: string;
108
+ } | {
109
+ readonly kind: "builtin";
73
110
  };
74
111
  /** Parsed `markspec.yaml` content — the manifest authored in a profile. */
75
112
  export interface ProfileManifest {
76
113
  readonly id: string;
77
114
  readonly version: string;
115
+ /** The `markspec-schema:` pin declaring the core schema version targeted. */
116
+ readonly markspecSchema?: string;
78
117
  readonly description?: string;
79
118
  readonly license?: string;
80
119
  readonly extends?: ProfileSpecifier;
81
- readonly universalRequired: readonly string[];
82
120
  readonly universalAttributes: readonly AttrDecl[];
83
- readonly labels: readonly string[];
121
+ readonly labels: readonly LabelConcern[];
122
+ readonly conventions: readonly ProfileConvention[];
84
123
  /**
85
124
  * Semantic color-role bindings authored on this manifest.
86
125
  * Maps a profile-author-chosen name (e.g. "primary") to a palette hue
@@ -88,20 +127,36 @@ export interface ProfileManifest {
88
127
  * Empty when the manifest does not declare `profile.colors:`.
89
128
  */
90
129
  readonly colors: ReadonlyMap<string, string>;
91
- readonly identified: {
92
- readonly required: readonly string[];
93
- readonly attributes: readonly AttrDecl[];
94
- readonly traceability: ReadonlyMap<string, TraceRule>;
95
- };
96
- readonly referenced: {
97
- readonly required: readonly string[];
98
- readonly attributes: readonly AttrDecl[];
99
- };
100
130
  readonly types: ReadonlyMap<string, TypeDef>;
101
131
  readonly documents: {
102
132
  readonly types: readonly DocTypeDef[];
103
133
  readonly frontMatter: readonly AttrDecl[];
104
134
  };
135
+ /**
136
+ * Profile-declared discipline kinds (ADR-017 Invariant 2). Maps kind
137
+ * name → declaration metadata. Empty when the manifest does not declare
138
+ * `profile.kinds:`.
139
+ */
140
+ readonly kinds: ReadonlyMap<string, KindDecl>;
141
+ /**
142
+ * Prose-analysis configuration. All lexicon lists are additive across
143
+ * the profile chain (parent entries first, child entries appended,
144
+ * duplicates dropped).
145
+ */
146
+ readonly prose: {
147
+ readonly lexicons: {
148
+ /** Extra tokens that are never flagged as undefined capitalized terms. */
149
+ readonly "capitalized-allow": readonly string[];
150
+ /** Extra abbreviation tokens that suppress false sentence-end detection. */
151
+ readonly "sentence-abbrev": readonly string[];
152
+ };
153
+ };
154
+ /**
155
+ * Author-declared discipline mode (ADR-017 Slice 5). `undefined` when
156
+ * the manifest does not declare `profile.discipline-mode:`; the merge
157
+ * layer then runs inference to populate `EffectiveProfile.disciplineMode`.
158
+ */
159
+ readonly disciplineMode?: DisciplineMode;
105
160
  }
106
161
  /**
107
162
  * A profile after it has been resolved and parsed. One tier of a
@@ -148,18 +203,11 @@ export interface ProvenancedMapEntry<V> {
148
203
  }
149
204
  /** Map with per-entry provenance. Keys are always strings (attr/type/link names). */
150
205
  export type ProvenancedMap<V> = ReadonlyMap<string, ProvenancedMapEntry<V>>;
151
- /** Shape-scope rules after merging (identified or referenced). */
152
- export interface EffectiveShapeScope {
153
- readonly required: ProvenancedValue<readonly string[]>;
154
- readonly attributes: ProvenancedMap<AttrDecl>;
155
- /** Referenced scope's traceability is always empty (referenced entries don't originate links). */
156
- readonly traceability: ProvenancedMap<TraceRule>;
157
- }
158
206
  /** Type-scope rules after merging. */
159
207
  export interface EffectiveTypeDef {
160
208
  readonly name: string;
161
- /** Shape is frozen at the type's declaration — never changes across the chain. */
162
- readonly shape: EntryShape;
209
+ /** The core type this profile type extends — frozen at declaration, never changes across the chain. */
210
+ readonly extends: string;
163
211
  readonly displayIdPattern: ProvenancedValue<string | undefined>;
164
212
  readonly displayIdPatternEnforcement: ProvenancedValue<EnforcementMode>;
165
213
  /** Resolved semantic color-role name, or `undefined` when unset. */
@@ -167,23 +215,50 @@ export interface EffectiveTypeDef {
167
215
  readonly required: ProvenancedValue<readonly string[]>;
168
216
  readonly attributes: ProvenancedMap<AttrDecl>;
169
217
  readonly traceability: ProvenancedMap<TraceRule>;
218
+ readonly description: ProvenancedValue<string | undefined>;
219
+ readonly attrDescriptions: ProvenancedMap<string>;
220
+ readonly relationDescriptions: ProvenancedMap<string>;
221
+ /**
222
+ * Discipline kind explicitly assigned to this type by some tier of the
223
+ * profile chain. `value` is `undefined` when no tier assigned one — the
224
+ * registry builder then walks the `extends:` chain to resolve.
225
+ */
226
+ readonly discipline: ProvenancedValue<string | undefined>;
170
227
  }
171
228
  /**
172
229
  * The merged, validator-ready view of a profile chain. Every field carries
173
230
  * per-rule provenance so a diagnostic can blame the right tier.
174
231
  */
175
232
  export interface EffectiveProfile {
176
- readonly required: ProvenancedValue<readonly string[]>;
177
233
  readonly attributes: ProvenancedMap<AttrDecl>;
178
- readonly labels: ProvenancedValue<readonly string[]>;
234
+ readonly labels: ProvenancedMap<LabelConcern>;
235
+ readonly conventions: ProvenancedMap<ProfileConvention>;
179
236
  /** Semantic color-role bindings merged across the chain. */
180
237
  readonly colors: ProvenancedMap<string>;
181
- readonly identified: EffectiveShapeScope;
182
- readonly referenced: EffectiveShapeScope;
183
238
  readonly types: ProvenancedMap<EffectiveTypeDef>;
184
239
  readonly documents: {
185
240
  readonly types: ProvenancedMap<DocTypeDef>;
186
241
  readonly frontMatter: ProvenancedMap<AttrDecl>;
187
242
  };
243
+ /** Discipline kinds declared across the profile chain (ADR-017). */
244
+ readonly kinds: ProvenancedMap<KindDecl>;
245
+ /**
246
+ * Prose-analysis configuration merged across the chain. Each lexicon list
247
+ * is list-additive: parent entries first, child entries appended, duplicates
248
+ * dropped (profile-schema §5.1).
249
+ */
250
+ readonly prose: {
251
+ readonly lexicons: {
252
+ readonly "capitalized-allow": ProvenancedValue<readonly string[]>;
253
+ readonly "sentence-abbrev": ProvenancedValue<readonly string[]>;
254
+ };
255
+ };
256
+ /**
257
+ * Resolved discipline mode after the chain folds (ADR-017 Slice 5).
258
+ * Always defined — `origin` is `"declared"` when at least one tier
259
+ * supplied a value, otherwise `"inferred"` (computed from the
260
+ * effective type graph by `inferDisciplineMode()`).
261
+ */
262
+ readonly disciplineMode: ProvenancedValue<DisciplineMode>;
188
263
  }
189
264
  //# sourceMappingURL=profile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/model/profile.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAM3C,mEAAmE;AACnE,eAAO,MAAM,WAAW,qJAed,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAEnD,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,SAAS,CAGlD,CAAC;AAMH,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3.1 step 3 and
5
+ * ADR-003 §Part 5. Returns the inferred core type when the
6
+ * `Source:` value looks like a recognised manifest, source-code
7
+ * file, interface description, or bus description; `undefined`
8
+ * otherwise.
9
+ *
10
+ * Match order is significant — manifests must run before generic
11
+ * extension matches so `path/to/something.json` doesn't shadow
12
+ * `package.json`. The list is conservative: only patterns ADR-003
13
+ * §Part 5 lists normatively are encoded here; profiles extend the
14
+ * map later.
15
+ */
16
+ /**
17
+ * Infer a core type from a `Source:` attribute value. The value
18
+ * may be a filesystem path or a URI — only the filename portion
19
+ * is matched. Whitespace is trimmed before matching.
20
+ *
21
+ * Returns `undefined` when no pattern matches; callers should treat
22
+ * that as "Source: didn't classify" and fall through to step 4 of
23
+ * the resolution chain.
24
+ */
25
+ export declare function inferTypeFromSource(source: string): string | undefined;
26
+ //# sourceMappingURL=source_introspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source_introspection.d.ts","sourceRoot":"","sources":["../../src/model/source_introspection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAwDH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMtE"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * @module model/source_introspection
4
+ *
5
+ * `Source:` → core type inference per spec §1.3.1 step 3 and
6
+ * ADR-003 §Part 5. Returns the inferred core type when the
7
+ * `Source:` value looks like a recognised manifest, source-code
8
+ * file, interface description, or bus description; `undefined`
9
+ * otherwise.
10
+ *
11
+ * Match order is significant — manifests must run before generic
12
+ * extension matches so `path/to/something.json` doesn't shadow
13
+ * `package.json`. The list is conservative: only patterns ADR-003
14
+ * §Part 5 lists normatively are encoded here; profiles extend the
15
+ * map later.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.inferTypeFromSource = inferTypeFromSource;
19
+ const SOURCE_PATTERNS = [
20
+ // Build manifests → SoftwareComponent. Anchored at filename
21
+ // boundary so `weird-Cargo.toml` doesn't match unintentionally.
22
+ { pattern: /(?:^|\/)Cargo\.toml$/, type: "SoftwareComponent" },
23
+ { pattern: /(?:^|\/)package\.json$/, type: "SoftwareComponent" },
24
+ { pattern: /(?:^|\/)pom\.xml$/, type: "SoftwareComponent" },
25
+ { pattern: /(?:^|\/)deno\.json$/, type: "SoftwareComponent" },
26
+ { pattern: /(?:^|\/)go\.mod$/, type: "SoftwareComponent" },
27
+ { pattern: /(?:^|\/)pyproject\.toml$/, type: "SoftwareComponent" },
28
+ { pattern: /(?:^|\/)setup\.py$/, type: "SoftwareComponent" },
29
+ { pattern: /(?:^|\/)pubspec\.yaml$/, type: "SoftwareComponent" },
30
+ { pattern: /(?:^|\/)[^/]+\.csproj$/, type: "SoftwareComponent" },
31
+ // Interface description files → SoftwareInterface. Run BEFORE the
32
+ // generic source-code extensions so `.openapi.yaml` wins over `.yaml`.
33
+ { pattern: /\.openapi\.(?:yaml|yml|json)$/, type: "SoftwareInterface" },
34
+ { pattern: /\.asyncapi\.(?:yaml|yml|json)$/, type: "SoftwareInterface" },
35
+ { pattern: /\.proto$/, type: "SoftwareInterface" },
36
+ { pattern: /\.graphql$/, type: "SoftwareInterface" },
37
+ { pattern: /\.wsdl$/, type: "SoftwareInterface" },
38
+ { pattern: /\.arxml$/, type: "SoftwareInterface" },
39
+ { pattern: /\.idl$/, type: "SoftwareInterface" },
40
+ { pattern: /\.ridl$/, type: "SoftwareInterface" },
41
+ // Bus description files → HardwareInterface.
42
+ { pattern: /\.dbc$/, type: "HardwareInterface" },
43
+ { pattern: /\.ldf$/, type: "HardwareInterface" },
44
+ { pattern: /\.fibex$/, type: "HardwareInterface" },
45
+ // Source-code files → SoftwareUnit.
46
+ { pattern: /\.rs$/, type: "SoftwareUnit" },
47
+ { pattern: /\.kt$/, type: "SoftwareUnit" },
48
+ { pattern: /\.kts$/, type: "SoftwareUnit" },
49
+ { pattern: /\.java$/, type: "SoftwareUnit" },
50
+ { pattern: /\.py$/, type: "SoftwareUnit" },
51
+ { pattern: /\.ts$/, type: "SoftwareUnit" },
52
+ { pattern: /\.tsx$/, type: "SoftwareUnit" },
53
+ { pattern: /\.js$/, type: "SoftwareUnit" },
54
+ { pattern: /\.jsx$/, type: "SoftwareUnit" },
55
+ { pattern: /\.go$/, type: "SoftwareUnit" },
56
+ { pattern: /\.cpp$/, type: "SoftwareUnit" },
57
+ { pattern: /\.cc$/, type: "SoftwareUnit" },
58
+ { pattern: /\.cxx$/, type: "SoftwareUnit" },
59
+ { pattern: /\.c$/, type: "SoftwareUnit" },
60
+ { pattern: /\.h$/, type: "SoftwareUnit" },
61
+ { pattern: /\.hpp$/, type: "SoftwareUnit" },
62
+ { pattern: /\.hxx$/, type: "SoftwareUnit" },
63
+ ];
64
+ /**
65
+ * Infer a core type from a `Source:` attribute value. The value
66
+ * may be a filesystem path or a URI — only the filename portion
67
+ * is matched. Whitespace is trimmed before matching.
68
+ *
69
+ * Returns `undefined` when no pattern matches; callers should treat
70
+ * that as "Source: didn't classify" and fall through to step 4 of
71
+ * the resolution chain.
72
+ */
73
+ function inferTypeFromSource(source) {
74
+ const trimmed = source.trim();
75
+ for (const { pattern, type } of SOURCE_PATTERNS) {
76
+ if (pattern.test(trimmed))
77
+ return type;
78
+ }
79
+ return undefined;
80
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @module model/type_hierarchy
3
+ *
4
+ * Core type hierarchy from ADR-003 §Part 2. Encodes the per-type
5
+ * attribute catalogue for the 15 built-in concrete types and the four
6
+ * abstract parents. Attributes flow downward via inheritance; this
7
+ * module exposes lookup helpers consumed by the validator's MSL-T022
8
+ * check and by future profile-resolution work.
9
+ */
10
+ /** Per-type definition: parent in the hierarchy + locally declared attrs. */
11
+ export interface CoreTypeDef {
12
+ /** Parent type name, or `null` for `Item` (the root). */
13
+ readonly parent: string | null;
14
+ /**
15
+ * Attributes declared by this type. Subtype attribute sets include
16
+ * everything declared on ancestor types, per ADR-003 §Part 2.
17
+ */
18
+ readonly ownAttrs: readonly string[];
19
+ /**
20
+ * Attributes inherited from ancestors that are "not applicable" on
21
+ * this subtype per ADR-003 §Part 2 (e.g., `Allocated-to` on Test).
22
+ * Removed during {@linkcode attributesForType} resolution.
23
+ */
24
+ readonly excludedAttrs?: readonly string[];
25
+ }
26
+ /**
27
+ * Built-in type hierarchy. Keyed by the canonical TitleCase / lower-with-
28
+ * hyphens name as it would appear in a `Type:` attribute value.
29
+ */
30
+ export declare const CORE_TYPE_HIERARCHY: Readonly<Record<string, CoreTypeDef>>;
31
+ /**
32
+ * Collect every attribute valid on `typeName` by walking the parent
33
+ * chain and subtracting any `excludedAttrs` declared along the way.
34
+ * Returns a {@linkcode Set} of attribute keys (TitleCase or
35
+ * lowercase-with-hyphens as declared). Returns an empty set for
36
+ * unknown type names — the caller treats unknown types separately.
37
+ *
38
+ * Exclusion semantics: an attribute marked `excludedAttrs` on a
39
+ * subtype is removed from the final set even if an ancestor declared
40
+ * it. The subtype cannot re-add the attribute later — only its own
41
+ * `ownAttrs` list contributes.
42
+ */
43
+ export declare function attributesForType(typeName: string): Set<string>;
44
+ /**
45
+ * Union of every type-scoped attribute name declared anywhere in the
46
+ * core hierarchy. Used by the validator to suppress `MSL-R010`
47
+ * (unknown attribute) for keys that are core-known but appear on the
48
+ * "wrong" type — those cases get the more specific `MSL-T022`.
49
+ */
50
+ export declare const CORE_TYPE_SCOPED_ATTRS: ReadonlySet<string>;
51
+ //# sourceMappingURL=type_hierarchy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type_hierarchy.d.ts","sourceRoot":"","sources":["../../src/model/type_hierarchy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA0ErE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAa/D;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAMnD,CAAC"}