@driftsys/markspec 0.5.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 (484) hide show
  1. package/README.md +74 -20
  2. package/esm/ast/build.d.ts +11 -21
  3. package/esm/ast/build.d.ts.map +1 -1
  4. package/esm/ast/build.js +50 -139
  5. package/esm/ast/nodes.d.ts +11 -43
  6. package/esm/ast/nodes.d.ts.map +1 -1
  7. package/esm/ast/nodes.js +6 -1
  8. package/esm/ast/normalize.d.ts +8 -17
  9. package/esm/ast/normalize.d.ts.map +1 -1
  10. package/esm/ast/normalize.js +14 -72
  11. package/esm/compiler/constants.d.ts +16 -0
  12. package/esm/compiler/constants.d.ts.map +1 -0
  13. package/esm/compiler/constants.js +26 -0
  14. package/esm/compiler/discipline_classifier.d.ts +55 -0
  15. package/esm/compiler/discipline_classifier.d.ts.map +1 -0
  16. package/esm/compiler/discipline_classifier.js +191 -0
  17. package/esm/compiler/inverses.d.ts +7 -0
  18. package/esm/compiler/inverses.d.ts.map +1 -1
  19. package/esm/compiler/inverses.js +1 -18
  20. package/esm/compiler/mod.d.ts +30 -1
  21. package/esm/compiler/mod.d.ts.map +1 -1
  22. package/esm/compiler/mod.js +198 -65
  23. package/esm/compiler/schema.d.ts +15 -0
  24. package/esm/compiler/schema.d.ts.map +1 -1
  25. package/esm/compiler/schema.js +12 -0
  26. package/esm/config/markspec.d.ts +5 -0
  27. package/esm/config/markspec.d.ts.map +1 -1
  28. package/esm/config/markspec.js +17 -2
  29. package/esm/formatter/mod.d.ts +9 -3
  30. package/esm/formatter/mod.d.ts.map +1 -1
  31. package/esm/formatter/mod.js +97 -49
  32. package/esm/lexicons/loader.d.ts +35 -0
  33. package/esm/lexicons/loader.d.ts.map +1 -0
  34. package/esm/lexicons/loader.js +51 -0
  35. package/esm/lexicons/mod.d.ts +13 -0
  36. package/esm/lexicons/mod.d.ts.map +1 -0
  37. package/esm/lexicons/mod.js +12 -0
  38. package/esm/lint/glossary.d.ts +45 -0
  39. package/esm/lint/glossary.d.ts.map +1 -0
  40. package/esm/lint/glossary.js +85 -0
  41. package/esm/lint/mod.d.ts +4 -0
  42. package/esm/lint/mod.d.ts.map +1 -1
  43. package/esm/lint/mod.js +2 -0
  44. package/esm/lint/range_util.d.ts +25 -0
  45. package/esm/lint/range_util.d.ts.map +1 -0
  46. package/esm/lint/range_util.js +50 -0
  47. package/esm/lint/rules/ears.d.ts +39 -0
  48. package/esm/lint/rules/ears.d.ts.map +1 -0
  49. package/esm/lint/rules/ears.js +316 -0
  50. package/esm/lint/rules/incose_sentence.d.ts +46 -0
  51. package/esm/lint/rules/incose_sentence.d.ts.map +1 -0
  52. package/esm/lint/rules/incose_sentence.js +417 -0
  53. package/esm/lint/rules/modal_sentence.d.ts +46 -0
  54. package/esm/lint/rules/modal_sentence.d.ts.map +1 -0
  55. package/esm/lint/rules/modal_sentence.js +146 -0
  56. package/esm/lint/rules/passive.d.ts +64 -0
  57. package/esm/lint/rules/passive.d.ts.map +1 -0
  58. package/esm/lint/rules/passive.js +282 -0
  59. package/esm/lint/rules/suppression.d.ts +38 -3
  60. package/esm/lint/rules/suppression.d.ts.map +1 -1
  61. package/esm/lint/rules/suppression.js +58 -4
  62. package/esm/lint/rules/xref.d.ts +19 -0
  63. package/esm/lint/rules/xref.d.ts.map +1 -0
  64. package/esm/lint/rules/xref.js +248 -0
  65. package/esm/lint/runner.d.ts +31 -11
  66. package/esm/lint/runner.d.ts.map +1 -1
  67. package/esm/lint/runner.js +67 -26
  68. package/esm/lint/score.d.ts +64 -0
  69. package/esm/lint/score.d.ts.map +1 -0
  70. package/esm/lint/score.js +163 -0
  71. package/esm/lint/segmenter.d.ts +32 -0
  72. package/esm/lint/segmenter.d.ts.map +1 -0
  73. package/esm/lint/segmenter.js +79 -0
  74. package/esm/lint/types.d.ts +12 -0
  75. package/esm/lint/types.d.ts.map +1 -1
  76. package/esm/lock/canonical_edges.d.ts +31 -0
  77. package/esm/lock/canonical_edges.d.ts.map +1 -0
  78. package/esm/lock/canonical_edges.js +57 -0
  79. package/esm/lock/check.d.ts +24 -0
  80. package/esm/lock/check.d.ts.map +1 -0
  81. package/esm/lock/check.js +127 -0
  82. package/esm/lock/hash.d.ts +12 -0
  83. package/esm/lock/hash.d.ts.map +1 -0
  84. package/esm/lock/hash.js +32 -0
  85. package/esm/lock/mod.d.ts +19 -0
  86. package/esm/lock/mod.d.ts.map +1 -0
  87. package/esm/lock/mod.js +14 -0
  88. package/esm/lock/model.d.ts +81 -0
  89. package/esm/lock/model.d.ts.map +1 -0
  90. package/esm/lock/model.js +7 -0
  91. package/esm/lock/parser.d.ts +26 -0
  92. package/esm/lock/parser.d.ts.map +1 -0
  93. package/esm/lock/parser.js +195 -0
  94. package/esm/lock/resolve.d.ts +142 -0
  95. package/esm/lock/resolve.d.ts.map +1 -0
  96. package/esm/lock/resolve.js +389 -0
  97. package/esm/lock/serializer.d.ts +14 -0
  98. package/esm/lock/serializer.d.ts.map +1 -0
  99. package/esm/lock/serializer.js +104 -0
  100. package/esm/mod.d.ts +16 -9
  101. package/esm/mod.d.ts.map +1 -1
  102. package/esm/mod.js +12 -4
  103. package/esm/model/attributes.d.ts +6 -0
  104. package/esm/model/attributes.d.ts.map +1 -1
  105. package/esm/model/attributes.js +37 -0
  106. package/esm/model/discipline.d.ts +53 -0
  107. package/esm/model/discipline.d.ts.map +1 -0
  108. package/esm/model/discipline.js +50 -0
  109. package/esm/model/mod.d.ts +188 -30
  110. package/esm/model/mod.d.ts.map +1 -1
  111. package/esm/model/mod.js +42 -1
  112. package/esm/model/profile.d.ts +69 -0
  113. package/esm/model/profile.d.ts.map +1 -1
  114. package/esm/parser/attributes.d.ts.map +1 -1
  115. package/esm/parser/attributes.js +1 -10
  116. package/esm/parser/body_tokens.d.ts +35 -0
  117. package/esm/parser/body_tokens.d.ts.map +1 -0
  118. package/esm/parser/body_tokens.js +232 -0
  119. package/esm/parser/glossary.d.ts +8 -0
  120. package/esm/parser/glossary.d.ts.map +1 -1
  121. package/esm/parser/glossary.js +6 -4
  122. package/esm/parser/grammars.d.ts +5 -3
  123. package/esm/parser/grammars.d.ts.map +1 -1
  124. package/esm/parser/grammars.js +12 -4
  125. package/esm/parser/language_spec.d.ts +55 -0
  126. package/esm/parser/language_spec.d.ts.map +1 -0
  127. package/esm/parser/language_spec.js +419 -0
  128. package/esm/parser/line_map.d.ts +60 -0
  129. package/esm/parser/line_map.d.ts.map +1 -0
  130. package/esm/parser/line_map.js +41 -0
  131. package/esm/parser/markdown.d.ts +9 -0
  132. package/esm/parser/markdown.d.ts.map +1 -1
  133. package/esm/parser/markdown.js +107 -31
  134. package/esm/parser/mod.d.ts +4 -0
  135. package/esm/parser/mod.d.ts.map +1 -1
  136. package/esm/parser/mod.js +30 -8
  137. package/esm/parser/source.d.ts +39 -8
  138. package/esm/parser/source.d.ts.map +1 -1
  139. package/esm/parser/source.js +155 -65
  140. package/esm/parser/translate.d.ts +24 -0
  141. package/esm/parser/translate.d.ts.map +1 -0
  142. package/esm/parser/translate.js +99 -0
  143. package/esm/profile/chain.d.ts +8 -0
  144. package/esm/profile/chain.d.ts.map +1 -1
  145. package/esm/profile/chain.js +29 -1
  146. package/esm/profile/default_profile.d.ts +25 -0
  147. package/esm/profile/default_profile.d.ts.map +1 -0
  148. package/esm/profile/default_profile.js +43 -0
  149. package/esm/profile/discipline_mode.d.ts +64 -0
  150. package/esm/profile/discipline_mode.d.ts.map +1 -0
  151. package/esm/profile/discipline_mode.js +133 -0
  152. package/esm/profile/discipline_registry.d.ts +41 -0
  153. package/esm/profile/discipline_registry.d.ts.map +1 -0
  154. package/esm/profile/discipline_registry.js +67 -0
  155. package/esm/profile/load.d.ts +3 -1
  156. package/esm/profile/load.d.ts.map +1 -1
  157. package/esm/profile/load.js +24 -5
  158. package/esm/profile/manifest.d.ts.map +1 -1
  159. package/esm/profile/manifest.js +253 -20
  160. package/esm/profile/merge.d.ts.map +1 -1
  161. package/esm/profile/merge.js +112 -0
  162. package/esm/profile/mod.d.ts +2 -0
  163. package/esm/profile/mod.d.ts.map +1 -1
  164. package/esm/profile/mod.js +2 -0
  165. package/esm/sync/locked_attributes.d.ts +19 -0
  166. package/esm/sync/locked_attributes.d.ts.map +1 -0
  167. package/esm/sync/locked_attributes.js +27 -0
  168. package/esm/sync/log.d.ts +34 -0
  169. package/esm/sync/log.d.ts.map +1 -0
  170. package/esm/sync/log.js +48 -0
  171. package/esm/sync/mapping.d.ts +66 -0
  172. package/esm/sync/mapping.d.ts.map +1 -0
  173. package/esm/sync/mapping.js +165 -0
  174. package/esm/sync/mod.d.ts +16 -0
  175. package/esm/sync/mod.d.ts.map +1 -0
  176. package/esm/sync/mod.js +12 -0
  177. package/esm/sync/status.d.ts +23 -0
  178. package/esm/sync/status.d.ts.map +1 -0
  179. package/esm/sync/status.js +21 -0
  180. package/esm/typl/ast.d.ts +87 -0
  181. package/esm/typl/ast.d.ts.map +1 -0
  182. package/esm/typl/ast.js +21 -0
  183. package/esm/typl/bridge.d.ts +32 -0
  184. package/esm/typl/bridge.d.ts.map +1 -0
  185. package/esm/typl/bridge.js +27 -0
  186. package/esm/typl/bullet.d.ts +34 -0
  187. package/esm/typl/bullet.d.ts.map +1 -0
  188. package/esm/typl/bullet.js +44 -0
  189. package/esm/typl/diagnostics.d.ts +43 -0
  190. package/esm/typl/diagnostics.d.ts.map +1 -0
  191. package/esm/typl/diagnostics.js +61 -0
  192. package/esm/typl/fence.d.ts +31 -0
  193. package/esm/typl/fence.d.ts.map +1 -0
  194. package/esm/typl/fence.js +24 -0
  195. package/esm/typl/grammar.d.ts +20 -0
  196. package/esm/typl/grammar.d.ts.map +1 -0
  197. package/esm/typl/grammar.js +471 -0
  198. package/esm/typl/inline.d.ts +34 -0
  199. package/esm/typl/inline.d.ts.map +1 -0
  200. package/esm/typl/inline.js +48 -0
  201. package/esm/typl/lexer.d.ts +37 -0
  202. package/esm/typl/lexer.d.ts.map +1 -0
  203. package/esm/typl/lexer.js +234 -0
  204. package/esm/typl/mod.d.ts +23 -0
  205. package/esm/typl/mod.d.ts.map +1 -0
  206. package/esm/typl/mod.js +16 -0
  207. package/esm/typl/registry.d.ts +42 -0
  208. package/esm/typl/registry.d.ts.map +1 -0
  209. package/esm/typl/registry.js +26 -0
  210. package/esm/typl/validator.d.ts +29 -0
  211. package/esm/typl/validator.d.ts.map +1 -0
  212. package/esm/typl/validator.js +141 -0
  213. package/esm/util/line_endings.d.ts +33 -0
  214. package/esm/util/line_endings.d.ts.map +1 -0
  215. package/esm/util/line_endings.js +53 -0
  216. package/esm/util/modals.d.ts +29 -0
  217. package/esm/util/modals.d.ts.map +1 -0
  218. package/esm/util/modals.js +38 -0
  219. package/esm/validator/discipline.d.ts +35 -0
  220. package/esm/validator/discipline.d.ts.map +1 -0
  221. package/esm/validator/discipline.js +204 -0
  222. package/esm/validator/mod.d.ts +1 -1
  223. package/esm/validator/mod.d.ts.map +1 -1
  224. package/esm/validator/mod.js +23 -2
  225. package/esm/validator/modal_keywords.d.ts +15 -13
  226. package/esm/validator/modal_keywords.d.ts.map +1 -1
  227. package/esm/validator/modal_keywords.js +26 -109
  228. package/esm/validator/pattern.d.ts +15 -8
  229. package/esm/validator/pattern.d.ts.map +1 -1
  230. package/esm/validator/pattern.js +42 -19
  231. package/esm/validator/per_type_attrs.d.ts +2 -2
  232. package/esm/validator/per_type_attrs.d.ts.map +1 -1
  233. package/esm/validator/per_type_attrs.js +2 -2
  234. package/esm/validator/pipeline.d.ts +11 -0
  235. package/esm/validator/pipeline.d.ts.map +1 -1
  236. package/esm/validator/pipeline.js +37 -15
  237. package/esm/validator/type_resolution.d.ts +3 -3
  238. package/esm/validator/type_resolution.d.ts.map +1 -1
  239. package/esm/validator/type_resolution.js +31 -9
  240. package/package.json +2 -2
  241. package/script/ast/build.d.ts +11 -21
  242. package/script/ast/build.d.ts.map +1 -1
  243. package/script/ast/build.js +51 -140
  244. package/script/ast/nodes.d.ts +11 -43
  245. package/script/ast/nodes.d.ts.map +1 -1
  246. package/script/ast/nodes.js +6 -1
  247. package/script/ast/normalize.d.ts +8 -17
  248. package/script/ast/normalize.d.ts.map +1 -1
  249. package/script/ast/normalize.js +16 -74
  250. package/script/compiler/constants.d.ts +16 -0
  251. package/script/compiler/constants.d.ts.map +1 -0
  252. package/script/compiler/constants.js +29 -0
  253. package/script/compiler/discipline_classifier.d.ts +55 -0
  254. package/script/compiler/discipline_classifier.d.ts.map +1 -0
  255. package/script/compiler/discipline_classifier.js +196 -0
  256. package/script/compiler/inverses.d.ts +7 -0
  257. package/script/compiler/inverses.d.ts.map +1 -1
  258. package/script/compiler/inverses.js +2 -19
  259. package/script/compiler/mod.d.ts +30 -1
  260. package/script/compiler/mod.d.ts.map +1 -1
  261. package/script/compiler/mod.js +202 -69
  262. package/script/compiler/schema.d.ts +15 -0
  263. package/script/compiler/schema.d.ts.map +1 -1
  264. package/script/compiler/schema.js +12 -0
  265. package/script/config/markspec.d.ts +5 -0
  266. package/script/config/markspec.d.ts.map +1 -1
  267. package/script/config/markspec.js +17 -2
  268. package/script/formatter/mod.d.ts +9 -3
  269. package/script/formatter/mod.d.ts.map +1 -1
  270. package/script/formatter/mod.js +99 -51
  271. package/script/lexicons/loader.d.ts +35 -0
  272. package/script/lexicons/loader.d.ts.map +1 -0
  273. package/script/lexicons/loader.js +55 -0
  274. package/script/lexicons/mod.d.ts +13 -0
  275. package/script/lexicons/mod.d.ts.map +1 -0
  276. package/script/lexicons/mod.js +17 -0
  277. package/script/lint/glossary.d.ts +45 -0
  278. package/script/lint/glossary.d.ts.map +1 -0
  279. package/script/lint/glossary.js +88 -0
  280. package/script/lint/mod.d.ts +4 -0
  281. package/script/lint/mod.d.ts.map +1 -1
  282. package/script/lint/mod.js +6 -1
  283. package/script/lint/range_util.d.ts +25 -0
  284. package/script/lint/range_util.d.ts.map +1 -0
  285. package/script/lint/range_util.js +53 -0
  286. package/script/lint/rules/ears.d.ts +39 -0
  287. package/script/lint/rules/ears.d.ts.map +1 -0
  288. package/script/lint/rules/ears.js +320 -0
  289. package/script/lint/rules/incose_sentence.d.ts +46 -0
  290. package/script/lint/rules/incose_sentence.d.ts.map +1 -0
  291. package/script/lint/rules/incose_sentence.js +421 -0
  292. package/script/lint/rules/modal_sentence.d.ts +46 -0
  293. package/script/lint/rules/modal_sentence.d.ts.map +1 -0
  294. package/script/lint/rules/modal_sentence.js +150 -0
  295. package/script/lint/rules/passive.d.ts +64 -0
  296. package/script/lint/rules/passive.d.ts.map +1 -0
  297. package/script/lint/rules/passive.js +286 -0
  298. package/script/lint/rules/suppression.d.ts +38 -3
  299. package/script/lint/rules/suppression.d.ts.map +1 -1
  300. package/script/lint/rules/suppression.js +59 -3
  301. package/script/lint/rules/xref.d.ts +19 -0
  302. package/script/lint/rules/xref.d.ts.map +1 -0
  303. package/script/lint/rules/xref.js +251 -0
  304. package/script/lint/runner.d.ts +31 -11
  305. package/script/lint/runner.d.ts.map +1 -1
  306. package/script/lint/runner.js +67 -26
  307. package/script/lint/score.d.ts +64 -0
  308. package/script/lint/score.d.ts.map +1 -0
  309. package/script/lint/score.js +167 -0
  310. package/script/lint/segmenter.d.ts +32 -0
  311. package/script/lint/segmenter.d.ts.map +1 -0
  312. package/script/lint/segmenter.js +82 -0
  313. package/script/lint/types.d.ts +12 -0
  314. package/script/lint/types.d.ts.map +1 -1
  315. package/script/lock/canonical_edges.d.ts +31 -0
  316. package/script/lock/canonical_edges.d.ts.map +1 -0
  317. package/script/lock/canonical_edges.js +61 -0
  318. package/script/lock/check.d.ts +24 -0
  319. package/script/lock/check.d.ts.map +1 -0
  320. package/script/lock/check.js +130 -0
  321. package/script/lock/hash.d.ts +12 -0
  322. package/script/lock/hash.d.ts.map +1 -0
  323. package/script/lock/hash.js +36 -0
  324. package/script/lock/mod.d.ts +19 -0
  325. package/script/lock/mod.d.ts.map +1 -0
  326. package/script/lock/mod.js +31 -0
  327. package/script/lock/model.d.ts +81 -0
  328. package/script/lock/model.d.ts.map +1 -0
  329. package/script/lock/model.js +10 -0
  330. package/script/lock/parser.d.ts +26 -0
  331. package/script/lock/parser.d.ts.map +1 -0
  332. package/script/lock/parser.js +198 -0
  333. package/script/lock/resolve.d.ts +142 -0
  334. package/script/lock/resolve.d.ts.map +1 -0
  335. package/script/lock/resolve.js +397 -0
  336. package/script/lock/serializer.d.ts +14 -0
  337. package/script/lock/serializer.d.ts.map +1 -0
  338. package/script/lock/serializer.js +107 -0
  339. package/script/mod.d.ts +16 -9
  340. package/script/mod.d.ts.map +1 -1
  341. package/script/mod.js +111 -38
  342. package/script/model/attributes.d.ts +6 -0
  343. package/script/model/attributes.d.ts.map +1 -1
  344. package/script/model/attributes.js +38 -1
  345. package/script/model/discipline.d.ts +53 -0
  346. package/script/model/discipline.d.ts.map +1 -0
  347. package/script/model/discipline.js +53 -0
  348. package/script/model/mod.d.ts +188 -30
  349. package/script/model/mod.d.ts.map +1 -1
  350. package/script/model/mod.js +48 -1
  351. package/script/model/profile.d.ts +69 -0
  352. package/script/model/profile.d.ts.map +1 -1
  353. package/script/parser/attributes.d.ts.map +1 -1
  354. package/script/parser/attributes.js +1 -10
  355. package/script/parser/body_tokens.d.ts +35 -0
  356. package/script/parser/body_tokens.d.ts.map +1 -0
  357. package/script/parser/body_tokens.js +235 -0
  358. package/script/parser/glossary.d.ts +8 -0
  359. package/script/parser/glossary.d.ts.map +1 -1
  360. package/script/parser/glossary.js +7 -4
  361. package/script/parser/grammars.d.ts +5 -3
  362. package/script/parser/grammars.d.ts.map +1 -1
  363. package/script/parser/grammars.js +15 -8
  364. package/script/parser/language_spec.d.ts +55 -0
  365. package/script/parser/language_spec.d.ts.map +1 -0
  366. package/script/parser/language_spec.js +423 -0
  367. package/script/parser/line_map.d.ts +60 -0
  368. package/script/parser/line_map.d.ts.map +1 -0
  369. package/script/parser/line_map.js +44 -0
  370. package/script/parser/markdown.d.ts +9 -0
  371. package/script/parser/markdown.d.ts.map +1 -1
  372. package/script/parser/markdown.js +105 -29
  373. package/script/parser/mod.d.ts +4 -0
  374. package/script/parser/mod.d.ts.map +1 -1
  375. package/script/parser/mod.js +32 -7
  376. package/script/parser/source.d.ts +39 -8
  377. package/script/parser/source.d.ts.map +1 -1
  378. package/script/parser/source.js +156 -69
  379. package/script/parser/translate.d.ts +24 -0
  380. package/script/parser/translate.d.ts.map +1 -0
  381. package/script/parser/translate.js +102 -0
  382. package/script/profile/chain.d.ts +8 -0
  383. package/script/profile/chain.d.ts.map +1 -1
  384. package/script/profile/chain.js +29 -1
  385. package/script/profile/default_profile.d.ts +25 -0
  386. package/script/profile/default_profile.d.ts.map +1 -0
  387. package/script/profile/default_profile.js +46 -0
  388. package/script/profile/discipline_mode.d.ts +64 -0
  389. package/script/profile/discipline_mode.d.ts.map +1 -0
  390. package/script/profile/discipline_mode.js +138 -0
  391. package/script/profile/discipline_registry.d.ts +41 -0
  392. package/script/profile/discipline_registry.d.ts.map +1 -0
  393. package/script/profile/discipline_registry.js +70 -0
  394. package/script/profile/load.d.ts +3 -1
  395. package/script/profile/load.d.ts.map +1 -1
  396. package/script/profile/load.js +24 -5
  397. package/script/profile/manifest.d.ts.map +1 -1
  398. package/script/profile/manifest.js +252 -19
  399. package/script/profile/merge.d.ts.map +1 -1
  400. package/script/profile/merge.js +112 -0
  401. package/script/profile/mod.d.ts +2 -0
  402. package/script/profile/mod.d.ts.map +1 -1
  403. package/script/profile/mod.js +6 -1
  404. package/script/sync/locked_attributes.d.ts +19 -0
  405. package/script/sync/locked_attributes.d.ts.map +1 -0
  406. package/script/sync/locked_attributes.js +30 -0
  407. package/script/sync/log.d.ts +34 -0
  408. package/script/sync/log.d.ts.map +1 -0
  409. package/script/sync/log.js +52 -0
  410. package/script/sync/mapping.d.ts +66 -0
  411. package/script/sync/mapping.d.ts.map +1 -0
  412. package/script/sync/mapping.js +169 -0
  413. package/script/sync/mod.d.ts +16 -0
  414. package/script/sync/mod.d.ts.map +1 -0
  415. package/script/sync/mod.js +21 -0
  416. package/script/sync/status.d.ts +23 -0
  417. package/script/sync/status.d.ts.map +1 -0
  418. package/script/sync/status.js +24 -0
  419. package/script/typl/ast.d.ts +87 -0
  420. package/script/typl/ast.d.ts.map +1 -0
  421. package/script/typl/ast.js +24 -0
  422. package/script/typl/bridge.d.ts +32 -0
  423. package/script/typl/bridge.d.ts.map +1 -0
  424. package/script/typl/bridge.js +30 -0
  425. package/script/typl/bullet.d.ts +34 -0
  426. package/script/typl/bullet.d.ts.map +1 -0
  427. package/script/typl/bullet.js +47 -0
  428. package/script/typl/diagnostics.d.ts +43 -0
  429. package/script/typl/diagnostics.d.ts.map +1 -0
  430. package/script/typl/diagnostics.js +65 -0
  431. package/script/typl/fence.d.ts +31 -0
  432. package/script/typl/fence.d.ts.map +1 -0
  433. package/script/typl/fence.js +27 -0
  434. package/script/typl/grammar.d.ts +20 -0
  435. package/script/typl/grammar.d.ts.map +1 -0
  436. package/script/typl/grammar.js +474 -0
  437. package/script/typl/inline.d.ts +34 -0
  438. package/script/typl/inline.d.ts.map +1 -0
  439. package/script/typl/inline.js +51 -0
  440. package/script/typl/lexer.d.ts +37 -0
  441. package/script/typl/lexer.d.ts.map +1 -0
  442. package/script/typl/lexer.js +237 -0
  443. package/script/typl/mod.d.ts +23 -0
  444. package/script/typl/mod.d.ts.map +1 -0
  445. package/script/typl/mod.js +29 -0
  446. package/script/typl/registry.d.ts +42 -0
  447. package/script/typl/registry.d.ts.map +1 -0
  448. package/script/typl/registry.js +29 -0
  449. package/script/typl/validator.d.ts +29 -0
  450. package/script/typl/validator.d.ts.map +1 -0
  451. package/script/typl/validator.js +144 -0
  452. package/script/util/line_endings.d.ts +33 -0
  453. package/script/util/line_endings.d.ts.map +1 -0
  454. package/script/util/line_endings.js +58 -0
  455. package/script/util/modals.d.ts +29 -0
  456. package/script/util/modals.d.ts.map +1 -0
  457. package/script/util/modals.js +42 -0
  458. package/script/validator/discipline.d.ts +35 -0
  459. package/script/validator/discipline.d.ts.map +1 -0
  460. package/script/validator/discipline.js +207 -0
  461. package/script/validator/mod.d.ts +1 -1
  462. package/script/validator/mod.d.ts.map +1 -1
  463. package/script/validator/mod.js +23 -1
  464. package/script/validator/modal_keywords.d.ts +15 -13
  465. package/script/validator/modal_keywords.d.ts.map +1 -1
  466. package/script/validator/modal_keywords.js +26 -109
  467. package/script/validator/pattern.d.ts +15 -8
  468. package/script/validator/pattern.d.ts.map +1 -1
  469. package/script/validator/pattern.js +42 -19
  470. package/script/validator/per_type_attrs.d.ts +2 -2
  471. package/script/validator/per_type_attrs.d.ts.map +1 -1
  472. package/script/validator/per_type_attrs.js +2 -2
  473. package/script/validator/pipeline.d.ts +11 -0
  474. package/script/validator/pipeline.d.ts.map +1 -1
  475. package/script/validator/pipeline.js +40 -17
  476. package/script/validator/type_resolution.d.ts +3 -3
  477. package/script/validator/type_resolution.d.ts.map +1 -1
  478. package/script/validator/type_resolution.js +31 -9
  479. package/esm/parser/entity_refs.d.ts +0 -53
  480. package/esm/parser/entity_refs.d.ts.map +0 -1
  481. package/esm/parser/entity_refs.js +0 -151
  482. package/script/parser/entity_refs.d.ts +0 -53
  483. package/script/parser/entity_refs.d.ts.map +0 -1
  484. package/script/parser/entity_refs.js +0 -155
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @module core/profile/discipline_mode
3
+ *
4
+ * Discipline-mode resolution per ADR-017 Slice 5.
5
+ *
6
+ * Three exported helpers:
7
+ * - `extendsTransitively(name, target, effective)` — walk profile-side
8
+ * extends chain then core-side type hierarchy looking for an ancestor.
9
+ * Reused by Tasks 7 (LSP) and 8 (CLI create) for the "is this type
10
+ * requirement-shaped?" check.
11
+ * - `inferDisciplineMode(effective)` — derive the mode from the merged
12
+ * profile's type graph when no tier declared one.
13
+ * - `resolveDisciplineMode(effective, declared)` — return the declared
14
+ * value when supplied (with `origin: "declared"`), otherwise call
15
+ * `inferDisciplineMode()` and wrap with `origin: "inferred"`.
16
+ *
17
+ * Sits next to `discipline_registry.ts` (Slice 2). Both are profile-layer
18
+ * post-merge resolvers that consume a fully-folded `EffectiveProfile`.
19
+ *
20
+ * @see docs/architecture/adr-017-discipline-classification.md (item 8)
21
+ * @see docs/superpowers/specs/2026-05-25-discipline-mode-flag-and-ux-design.md
22
+ */
23
+ import type { DisciplineMode, EffectiveProfile, ProfileId, ProvenancedValue } from "../model/mod.js";
24
+ /**
25
+ * Walk a type's extends chain (profile-side first, then core hierarchy)
26
+ * and return `true` if `targetCoreType` is transitively an ancestor.
27
+ *
28
+ * Profile-declared types extend other profile types or core types; the
29
+ * walk goes through `effective.types.get(name).extends` until it hits a
30
+ * name that's not in the profile's types map. From there, walk the
31
+ * `CORE_TYPE_HIERARCHY` parent chain.
32
+ *
33
+ * Exported because Tasks 7 (LSP) and 8 (CLI create) reuse the same walk
34
+ * to decide whether a type is "requirement-shaped" for mode-recommended
35
+ * marking.
36
+ */
37
+ export declare function extendsTransitively(startTypeName: string, targetCoreType: string, effective: EffectiveProfile): boolean;
38
+ /**
39
+ * Per spec §Inference algorithm:
40
+ * 1. tiered if any profile-declared requirement-shaped type has discipline: set
41
+ * 2. flat if no tiered requirement types AND the profile contributes any
42
+ * discipline-bearing types (profile-extended kinds OR profile-declared
43
+ * types that map to a core discipline-bearing type OR any requirement-
44
+ * shaped profile-declared type)
45
+ * 3. none otherwise (truly empty profile)
46
+ *
47
+ * Per spec edge case: the core CORE_DISCIPLINE_REGISTRY is ALWAYS present,
48
+ * but this helper treats core-only as "no profile signal" — the profile
49
+ * must contribute something for the result to be "flat" rather than "none".
50
+ * This matches the spec example table's outcomes.
51
+ */
52
+ export declare function inferDisciplineMode(effective: EffectiveProfile): DisciplineMode;
53
+ /**
54
+ * Resolve the effective discipline mode for a merged profile.
55
+ *
56
+ * If `declared` is supplied (any tier set `discipline-mode:`), wrap it
57
+ * with `origin: "declared"`. Otherwise run inference and wrap with
58
+ * `origin: "inferred"`.
59
+ */
60
+ export declare function resolveDisciplineMode(effective: EffectiveProfile, declared: {
61
+ value: DisciplineMode;
62
+ origin: ProfileId;
63
+ } | undefined): ProvenancedValue<DisciplineMode>;
64
+ //# sourceMappingURL=discipline_mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discipline_mode.d.ts","sourceRoot":"","sources":["../../src/profile/discipline_mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAEV,cAAc,EACd,gBAAgB,EAEhB,SAAS,EACT,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAGzB;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,gBAAgB,GAC1B,OAAO,CAyBT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,gBAAgB,GAC1B,cAAc,CA0ChB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,EAAE;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,GACjE,gBAAgB,CAAC,cAAc,CAAC,CAKlC"}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ /**
3
+ * @module core/profile/discipline_mode
4
+ *
5
+ * Discipline-mode resolution per ADR-017 Slice 5.
6
+ *
7
+ * Three exported helpers:
8
+ * - `extendsTransitively(name, target, effective)` — walk profile-side
9
+ * extends chain then core-side type hierarchy looking for an ancestor.
10
+ * Reused by Tasks 7 (LSP) and 8 (CLI create) for the "is this type
11
+ * requirement-shaped?" check.
12
+ * - `inferDisciplineMode(effective)` — derive the mode from the merged
13
+ * profile's type graph when no tier declared one.
14
+ * - `resolveDisciplineMode(effective, declared)` — return the declared
15
+ * value when supplied (with `origin: "declared"`), otherwise call
16
+ * `inferDisciplineMode()` and wrap with `origin: "inferred"`.
17
+ *
18
+ * Sits next to `discipline_registry.ts` (Slice 2). Both are profile-layer
19
+ * post-merge resolvers that consume a fully-folded `EffectiveProfile`.
20
+ *
21
+ * @see docs/architecture/adr-017-discipline-classification.md (item 8)
22
+ * @see docs/superpowers/specs/2026-05-25-discipline-mode-flag-and-ux-design.md
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.extendsTransitively = extendsTransitively;
26
+ exports.inferDisciplineMode = inferDisciplineMode;
27
+ exports.resolveDisciplineMode = resolveDisciplineMode;
28
+ const type_hierarchy_js_1 = require("../model/type_hierarchy.js");
29
+ /**
30
+ * Walk a type's extends chain (profile-side first, then core hierarchy)
31
+ * and return `true` if `targetCoreType` is transitively an ancestor.
32
+ *
33
+ * Profile-declared types extend other profile types or core types; the
34
+ * walk goes through `effective.types.get(name).extends` until it hits a
35
+ * name that's not in the profile's types map. From there, walk the
36
+ * `CORE_TYPE_HIERARCHY` parent chain.
37
+ *
38
+ * Exported because Tasks 7 (LSP) and 8 (CLI create) reuse the same walk
39
+ * to decide whether a type is "requirement-shaped" for mode-recommended
40
+ * marking.
41
+ */
42
+ function extendsTransitively(startTypeName, targetCoreType, effective) {
43
+ let cursor = startTypeName;
44
+ const seen = new Set();
45
+ // Profile-side walk.
46
+ while (cursor !== null && !seen.has(cursor)) {
47
+ seen.add(cursor);
48
+ if (cursor === targetCoreType)
49
+ return true;
50
+ const profileType = effective.types.get(cursor);
51
+ if (profileType) {
52
+ cursor = profileType.value.extends;
53
+ continue;
54
+ }
55
+ // Cursor isn't a profile type — must be a core type. Switch to
56
+ // CORE_TYPE_HIERARCHY walk.
57
+ break;
58
+ }
59
+ // Core-side walk.
60
+ while (cursor !== null && !seen.has(cursor)) {
61
+ seen.add(cursor);
62
+ if (cursor === targetCoreType)
63
+ return true;
64
+ const coreDef = type_hierarchy_js_1.CORE_TYPE_HIERARCHY[cursor];
65
+ if (!coreDef)
66
+ return false;
67
+ cursor = coreDef.parent;
68
+ }
69
+ return false;
70
+ }
71
+ /**
72
+ * Per spec §Inference algorithm:
73
+ * 1. tiered if any profile-declared requirement-shaped type has discipline: set
74
+ * 2. flat if no tiered requirement types AND the profile contributes any
75
+ * discipline-bearing types (profile-extended kinds OR profile-declared
76
+ * types that map to a core discipline-bearing type OR any requirement-
77
+ * shaped profile-declared type)
78
+ * 3. none otherwise (truly empty profile)
79
+ *
80
+ * Per spec edge case: the core CORE_DISCIPLINE_REGISTRY is ALWAYS present,
81
+ * but this helper treats core-only as "no profile signal" — the profile
82
+ * must contribute something for the result to be "flat" rather than "none".
83
+ * This matches the spec example table's outcomes.
84
+ */
85
+ function inferDisciplineMode(effective) {
86
+ // Step 1: scan profile-declared types for requirement-shaped types with discipline:.
87
+ for (const [typeName, entry] of effective.types) {
88
+ const td = entry.value;
89
+ if (td.discipline.value === undefined)
90
+ continue;
91
+ if (extendsTransitively(typeName, "Requirement", effective)) {
92
+ return "tiered";
93
+ }
94
+ }
95
+ // Step 2a: flat if the profile contributes any extended kinds.
96
+ if (effective.kinds.size > 0)
97
+ return "flat";
98
+ // Step 2b: flat if any profile-declared type extends a core discipline-
99
+ // bearing type (SoftwareComponent etc.).
100
+ const CORE_DISCIPLINE_BEARING_TYPES = [
101
+ "SoftwareComponent",
102
+ "HardwareComponent",
103
+ "SoftwareInterface",
104
+ "HardwareInterface",
105
+ "SoftwareUnit",
106
+ "HardwareUnit",
107
+ ];
108
+ for (const [typeName, _entry] of effective.types) {
109
+ for (const coreType of CORE_DISCIPLINE_BEARING_TYPES) {
110
+ if (extendsTransitively(typeName, coreType, effective)) {
111
+ return "flat";
112
+ }
113
+ }
114
+ }
115
+ // Step 2c: flat if the profile declares any requirement-shaped type
116
+ // (even without discipline:). This means the profile is doing
117
+ // requirements work, but tiered signal is absent.
118
+ for (const [typeName, _entry] of effective.types) {
119
+ if (extendsTransitively(typeName, "Requirement", effective)) {
120
+ return "flat";
121
+ }
122
+ }
123
+ // Step 3: none — no profile contribution.
124
+ return "none";
125
+ }
126
+ /**
127
+ * Resolve the effective discipline mode for a merged profile.
128
+ *
129
+ * If `declared` is supplied (any tier set `discipline-mode:`), wrap it
130
+ * with `origin: "declared"`. Otherwise run inference and wrap with
131
+ * `origin: "inferred"`.
132
+ */
133
+ function resolveDisciplineMode(effective, declared) {
134
+ if (declared !== undefined) {
135
+ return { value: declared.value, origin: "declared" };
136
+ }
137
+ return { value: inferDisciplineMode(effective), origin: "inferred" };
138
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @module core/profile/discipline_registry
3
+ *
4
+ * Build an effective discipline registry from a merged
5
+ * {@linkcode EffectiveProfile}. Per ADR-017 Slice 2: the registry is
6
+ * the core seed plus every profile-declared type whose discipline
7
+ * resolves — either directly (an explicit `discipline:` field) or
8
+ * via auto-inheritance walking the `extends:` chain to a registered
9
+ * ancestor.
10
+ *
11
+ * The current manifest parser only allows profile-declared types to
12
+ * extend **core** types (see `parseTypeDef` in `manifest.ts`), so the
13
+ * inheritance walk is one step in practice. The implementation below
14
+ * loops defensively so future relaxation of that constraint doesn't
15
+ * silently break inheritance through profile-declared intermediates.
16
+ * Cycles are currently impossible because the parser rejects any
17
+ * `extends` value that is not a recognised core type (PROFILE-TYPE-002),
18
+ * guaranteeing the fixed-point loop terminates in exactly one pass
19
+ * today.
20
+ *
21
+ * @see docs/architecture/adr-017-discipline-classification.md (Invariant 2)
22
+ */
23
+ import { type DisciplineRegistry, type EffectiveProfile } from "../model/mod.js";
24
+ /**
25
+ * Build the effective discipline registry for a given (merged) profile.
26
+ * When `effective` is `null` (CLI run without a profile), the core seed
27
+ * is returned verbatim.
28
+ *
29
+ * Algorithm:
30
+ * 1. Start with a mutable copy of {@linkcode CORE_DISCIPLINE_REGISTRY}.
31
+ * 2. For each profile-declared type, resolve its discipline:
32
+ * - Use the explicit `discipline.value` when present.
33
+ * - Otherwise walk `extends:` one hop at a time, stopping at the
34
+ * first ancestor that resolves (core registry or already-resolved
35
+ * profile type).
36
+ * 3. Iterate until no new entries are added (handles arbitrary
37
+ * declaration order). Bounded by the number of profile types, so
38
+ * worst-case O(n²); n is small for realistic profiles.
39
+ */
40
+ export declare function buildEffectiveDisciplineRegistry(effective: EffectiveProfile | null): DisciplineRegistry;
41
+ //# sourceMappingURL=discipline_registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discipline_registry.d.ts","sourceRoot":"","sources":["../../src/profile/discipline_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,gBAAgB,GAAG,IAAI,GACjC,kBAAkB,CA0BpB"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * @module core/profile/discipline_registry
4
+ *
5
+ * Build an effective discipline registry from a merged
6
+ * {@linkcode EffectiveProfile}. Per ADR-017 Slice 2: the registry is
7
+ * the core seed plus every profile-declared type whose discipline
8
+ * resolves — either directly (an explicit `discipline:` field) or
9
+ * via auto-inheritance walking the `extends:` chain to a registered
10
+ * ancestor.
11
+ *
12
+ * The current manifest parser only allows profile-declared types to
13
+ * extend **core** types (see `parseTypeDef` in `manifest.ts`), so the
14
+ * inheritance walk is one step in practice. The implementation below
15
+ * loops defensively so future relaxation of that constraint doesn't
16
+ * silently break inheritance through profile-declared intermediates.
17
+ * Cycles are currently impossible because the parser rejects any
18
+ * `extends` value that is not a recognised core type (PROFILE-TYPE-002),
19
+ * guaranteeing the fixed-point loop terminates in exactly one pass
20
+ * today.
21
+ *
22
+ * @see docs/architecture/adr-017-discipline-classification.md (Invariant 2)
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.buildEffectiveDisciplineRegistry = buildEffectiveDisciplineRegistry;
26
+ const mod_js_1 = require("../model/mod.js");
27
+ /**
28
+ * Build the effective discipline registry for a given (merged) profile.
29
+ * When `effective` is `null` (CLI run without a profile), the core seed
30
+ * is returned verbatim.
31
+ *
32
+ * Algorithm:
33
+ * 1. Start with a mutable copy of {@linkcode CORE_DISCIPLINE_REGISTRY}.
34
+ * 2. For each profile-declared type, resolve its discipline:
35
+ * - Use the explicit `discipline.value` when present.
36
+ * - Otherwise walk `extends:` one hop at a time, stopping at the
37
+ * first ancestor that resolves (core registry or already-resolved
38
+ * profile type).
39
+ * 3. Iterate until no new entries are added (handles arbitrary
40
+ * declaration order). Bounded by the number of profile types, so
41
+ * worst-case O(n²); n is small for realistic profiles.
42
+ */
43
+ function buildEffectiveDisciplineRegistry(effective) {
44
+ const out = new Map(mod_js_1.CORE_DISCIPLINE_REGISTRY);
45
+ if (!effective)
46
+ return out;
47
+ // Resolve in fixed-point fashion so order-of-declaration doesn't matter.
48
+ // Each pass attempts every unresolved type; if any type resolves, do
49
+ // another pass.
50
+ let changed = true;
51
+ while (changed) {
52
+ changed = false;
53
+ for (const [typeName, entry] of effective.types) {
54
+ if (out.has(typeName))
55
+ continue;
56
+ const explicit = entry.value.discipline.value;
57
+ if (explicit !== undefined) {
58
+ out.set(typeName, explicit);
59
+ changed = true;
60
+ continue;
61
+ }
62
+ const inherited = out.get(entry.value.extends);
63
+ if (inherited !== undefined) {
64
+ out.set(typeName, inherited);
65
+ changed = true;
66
+ }
67
+ }
68
+ }
69
+ return out;
70
+ }
@@ -19,7 +19,9 @@ export interface LoadProfileForCommandResult {
19
19
  * Load the active profile chain for the project at `projectRoot`.
20
20
  *
21
21
  * Discovery: looks for `.markspec.yaml` at the project root (sibling of
22
- * `project.yaml`). Absent or empty → `chain: null` (core-only mode).
22
+ * `project.yaml`). Absent or empty → the bundled default profile is the
23
+ * sole chain tier, unless `.markspec.yaml` sets `default-profile: false`
24
+ * (then `chain: null`, core-only mode).
23
25
  *
24
26
  * v1 constraint: at most **one** content-bearing profile per project. Two or
25
27
  * more entries in `profiles:` produces `PROFILE-LOAD-006` and no chain.
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/profile/load.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIhE,yCAAyC;AACzC,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,2BAA2B,CAAC,CA4CtC"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/profile/load.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKhE,yCAAyC;AACzC,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,2BAA2B,CAAC,CAiDtC"}
@@ -13,11 +13,14 @@ const path_1 = require("@std/path");
13
13
  const markspec_js_1 = require("../config/markspec.js");
14
14
  const mod_js_1 = require("../model/mod.js");
15
15
  const chain_js_1 = require("./chain.js");
16
+ const default_profile_js_1 = require("./default_profile.js");
16
17
  /**
17
18
  * Load the active profile chain for the project at `projectRoot`.
18
19
  *
19
20
  * Discovery: looks for `.markspec.yaml` at the project root (sibling of
20
- * `project.yaml`). Absent or empty → `chain: null` (core-only mode).
21
+ * `project.yaml`). Absent or empty → the bundled default profile is the
22
+ * sole chain tier, unless `.markspec.yaml` sets `default-profile: false`
23
+ * (then `chain: null`, core-only mode).
21
24
  *
22
25
  * v1 constraint: at most **one** content-bearing profile per project. Two or
23
26
  * more entries in `profiles:` produces `PROFILE-LOAD-006` and no chain.
@@ -26,7 +29,8 @@ async function loadProfileForCommand(projectRoot, readFile) {
26
29
  const diagnostics = [];
27
30
  const rawYaml = await (0, markspec_js_1.readMarkspecYaml)(projectRoot, readFile);
28
31
  if (rawYaml === null) {
29
- return { chain: null, diagnostics };
32
+ // No .markspec.yaml — the default is active (no file to opt out in).
33
+ return await loadBuiltinOnlyChain(projectRoot, readFile, diagnostics);
30
34
  }
31
35
  const sourcePath = (0, path_1.join)(projectRoot, markspec_js_1.MARKSPEC_YAML_FILENAME);
32
36
  const parsed = (0, markspec_js_1.parseMarkspecYaml)(rawYaml, sourcePath);
@@ -34,9 +38,12 @@ async function loadProfileForCommand(projectRoot, readFile) {
34
38
  if (!parsed.config) {
35
39
  return { chain: null, diagnostics };
36
40
  }
37
- const { profiles } = parsed.config;
41
+ const { profiles, defaultProfile } = parsed.config;
42
+ const bundledDefault = defaultProfile !== false;
38
43
  if (profiles.length === 0) {
39
- return { chain: null, diagnostics };
44
+ return bundledDefault
45
+ ? await loadBuiltinOnlyChain(projectRoot, readFile, diagnostics)
46
+ : { chain: null, diagnostics };
40
47
  }
41
48
  if (profiles.length > 1) {
42
49
  diagnostics.push({
@@ -48,7 +55,7 @@ async function loadProfileForCommand(projectRoot, readFile) {
48
55
  });
49
56
  return { chain: null, diagnostics };
50
57
  }
51
- const chainResult = await (0, chain_js_1.loadChain)(profiles[0], projectRoot, projectRoot, readFile);
58
+ const chainResult = await (0, chain_js_1.loadChain)(profiles[0], projectRoot, projectRoot, readFile, { bundledDefault });
52
59
  diagnostics.push(...chainResult.diagnostics);
53
60
  // MSL-A040 — profile must not redefine reserved core keys / types.
54
61
  if (chainResult.chain) {
@@ -56,6 +63,18 @@ async function loadProfileForCommand(projectRoot, readFile) {
56
63
  }
57
64
  return { chain: chainResult.chain, diagnostics };
58
65
  }
66
+ /**
67
+ * Build a chain containing only the bundled default profile. Used when no
68
+ * project profile is declared but the default is not opted out.
69
+ */
70
+ async function loadBuiltinOnlyChain(projectRoot, readFile, diagnostics) {
71
+ const chainResult = await (0, chain_js_1.loadChain)(default_profile_js_1.BUILTIN_DEFAULT_SPECIFIER, projectRoot, projectRoot, readFile, { bundledDefault: true });
72
+ diagnostics.push(...chainResult.diagnostics);
73
+ if (chainResult.chain) {
74
+ diagnostics.push(...checkReservedRedefinitions(chainResult.chain));
75
+ }
76
+ return { chain: chainResult.chain, diagnostics };
77
+ }
59
78
  /**
60
79
  * Reserved attribute names a profile must never declare. Per spec
61
80
  * §4.4 MSL-A040 and ADR-009 §6: the identity slot (`Id`) and the
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA4EnE,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAo9BD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,SAAoB,GAC7B,mBAAmB,CA6KrB"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAoFnE,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAysCD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,SAAoB,GAC7B,mBAAmB,CA+LrB"}