@unbrained/pm-cli 2026.6.12 → 2026.6.16

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 (777) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +2 -2
  3. package/dist/cli/bootstrap-args.d.ts +29 -0
  4. package/dist/cli/bootstrap-args.js +11 -4
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.d.ts +12 -0
  7. package/dist/cli/commander-usage.js +18 -7
  8. package/dist/cli/commander-usage.js.map +1 -1
  9. package/dist/cli/commands/activity.d.ts +19 -0
  10. package/dist/cli/commands/activity.js +12 -2
  11. package/dist/cli/commands/activity.js.map +1 -1
  12. package/dist/cli/commands/aggregate.d.ts +58 -0
  13. package/dist/cli/commands/aggregate.js +48 -15
  14. package/dist/cli/commands/aggregate.js.map +1 -1
  15. package/dist/cli/commands/annotation-command.d.ts +6 -1
  16. package/dist/cli/commands/annotation-command.js +72 -2
  17. package/dist/cli/commands/annotation-command.js.map +1 -1
  18. package/dist/cli/commands/append.js +4 -3
  19. package/dist/cli/commands/append.js.map +1 -1
  20. package/dist/cli/commands/close-many.d.ts +20 -0
  21. package/dist/cli/commands/close-many.js +14 -23
  22. package/dist/cli/commands/close-many.js.map +1 -1
  23. package/dist/cli/commands/close.js +37 -4
  24. package/dist/cli/commands/close.js.map +1 -1
  25. package/dist/cli/commands/comments-audit.js +3 -2
  26. package/dist/cli/commands/comments-audit.js.map +1 -1
  27. package/dist/cli/commands/comments.d.ts +2 -0
  28. package/dist/cli/commands/comments.js +49 -23
  29. package/dist/cli/commands/comments.js.map +1 -1
  30. package/dist/cli/commands/completion.js +269 -8
  31. package/dist/cli/commands/completion.js.map +1 -1
  32. package/dist/cli/commands/config.d.ts +51 -1
  33. package/dist/cli/commands/config.js +50 -12
  34. package/dist/cli/commands/config.js.map +1 -1
  35. package/dist/cli/commands/context.d.ts +79 -1
  36. package/dist/cli/commands/context.js +151 -25
  37. package/dist/cli/commands/context.js.map +1 -1
  38. package/dist/cli/commands/contracts.d.ts +80 -1
  39. package/dist/cli/commands/contracts.js +54 -4
  40. package/dist/cli/commands/contracts.js.map +1 -1
  41. package/dist/cli/commands/create.d.ts +49 -0
  42. package/dist/cli/commands/create.js +112 -7
  43. package/dist/cli/commands/create.js.map +1 -1
  44. package/dist/cli/commands/dedupe-audit.d.ts +33 -0
  45. package/dist/cli/commands/dedupe-audit.js +18 -14
  46. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  47. package/dist/cli/commands/deps.js +7 -4
  48. package/dist/cli/commands/deps.js.map +1 -1
  49. package/dist/cli/commands/event-validation-messages.js +3 -3
  50. package/dist/cli/commands/event-validation-messages.js.map +1 -1
  51. package/dist/cli/commands/extension/bundled-catalog.d.ts +7 -0
  52. package/dist/cli/commands/extension/bundled-catalog.js +19 -15
  53. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  54. package/dist/cli/commands/extension/install-sources.d.ts +41 -1
  55. package/dist/cli/commands/extension/install-sources.js +26 -8
  56. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  57. package/dist/cli/commands/extension/shared.d.ts +5 -0
  58. package/dist/cli/commands/extension/shared.js +9 -3
  59. package/dist/cli/commands/extension/shared.js.map +1 -1
  60. package/dist/cli/commands/extension.d.ts +133 -1
  61. package/dist/cli/commands/extension.js +127 -9
  62. package/dist/cli/commands/extension.js.map +1 -1
  63. package/dist/cli/commands/files.d.ts +30 -1
  64. package/dist/cli/commands/files.js +21 -2
  65. package/dist/cli/commands/files.js.map +1 -1
  66. package/dist/cli/commands/focus.d.ts +11 -0
  67. package/dist/cli/commands/focus.js +86 -0
  68. package/dist/cli/commands/focus.js.map +1 -0
  69. package/dist/cli/commands/get.d.ts +9 -2
  70. package/dist/cli/commands/get.js +34 -6
  71. package/dist/cli/commands/get.js.map +1 -1
  72. package/dist/cli/commands/guide.d.ts +5 -0
  73. package/dist/cli/commands/guide.js +6 -3
  74. package/dist/cli/commands/guide.js.map +1 -1
  75. package/dist/cli/commands/health.d.ts +109 -0
  76. package/dist/cli/commands/health.js +87 -35
  77. package/dist/cli/commands/health.js.map +1 -1
  78. package/dist/cli/commands/history-compact.js +27 -36
  79. package/dist/cli/commands/history-compact.js.map +1 -1
  80. package/dist/cli/commands/history-redact.d.ts +46 -0
  81. package/dist/cli/commands/history-redact.js +99 -67
  82. package/dist/cli/commands/history-redact.js.map +1 -1
  83. package/dist/cli/commands/history-repair.js +34 -37
  84. package/dist/cli/commands/history-repair.js.map +1 -1
  85. package/dist/cli/commands/history.js +6 -2
  86. package/dist/cli/commands/history.js.map +1 -1
  87. package/dist/cli/commands/index.d.ts +1 -0
  88. package/dist/cli/commands/index.js +3 -2
  89. package/dist/cli/commands/index.js.map +1 -1
  90. package/dist/cli/commands/init-agent-guidance.d.ts +54 -0
  91. package/dist/cli/commands/init-agent-guidance.js +31 -4
  92. package/dist/cli/commands/init-agent-guidance.js.map +1 -1
  93. package/dist/cli/commands/init.d.ts +36 -1
  94. package/dist/cli/commands/init.js +38 -5
  95. package/dist/cli/commands/init.js.map +1 -1
  96. package/dist/cli/commands/learnings.js +4 -3
  97. package/dist/cli/commands/learnings.js.map +1 -1
  98. package/dist/cli/commands/linked-test-parsers.d.ts +5 -0
  99. package/dist/cli/commands/linked-test-parsers.js +5 -2
  100. package/dist/cli/commands/linked-test-parsers.js.map +1 -1
  101. package/dist/cli/commands/list-filter-shared.d.ts +8 -0
  102. package/dist/cli/commands/list-filter-shared.js +70 -0
  103. package/dist/cli/commands/list-filter-shared.js.map +1 -0
  104. package/dist/cli/commands/list.d.ts +116 -0
  105. package/dist/cli/commands/list.js +194 -6
  106. package/dist/cli/commands/list.js.map +1 -1
  107. package/dist/cli/commands/normalize.js +16 -2
  108. package/dist/cli/commands/normalize.js.map +1 -1
  109. package/dist/cli/commands/notes.js +4 -3
  110. package/dist/cli/commands/notes.js.map +1 -1
  111. package/dist/cli/commands/plan.js +3 -2
  112. package/dist/cli/commands/plan.js.map +1 -1
  113. package/dist/cli/commands/reindex.d.ts +83 -0
  114. package/dist/cli/commands/reindex.js +45 -10
  115. package/dist/cli/commands/reindex.js.map +1 -1
  116. package/dist/cli/commands/restore.d.ts +40 -1
  117. package/dist/cli/commands/restore.js +27 -2
  118. package/dist/cli/commands/restore.js.map +1 -1
  119. package/dist/cli/commands/schema.d.ts +18 -0
  120. package/dist/cli/commands/schema.js +30 -3
  121. package/dist/cli/commands/schema.js.map +1 -1
  122. package/dist/cli/commands/search.d.ts +289 -1
  123. package/dist/cli/commands/search.js +367 -60
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/stats.d.ts +38 -0
  126. package/dist/cli/commands/stats.js +38 -10
  127. package/dist/cli/commands/stats.js.map +1 -1
  128. package/dist/cli/commands/telemetry.js +5 -3
  129. package/dist/cli/commands/telemetry.js.map +1 -1
  130. package/dist/cli/commands/templates.d.ts +18 -0
  131. package/dist/cli/commands/templates.js +9 -2
  132. package/dist/cli/commands/templates.js.map +1 -1
  133. package/dist/cli/commands/test-all.d.ts +5 -0
  134. package/dist/cli/commands/test-all.js +9 -3
  135. package/dist/cli/commands/test-all.js.map +1 -1
  136. package/dist/cli/commands/test.d.ts +70 -1
  137. package/dist/cli/commands/test.js +84 -3
  138. package/dist/cli/commands/test.js.map +1 -1
  139. package/dist/cli/commands/update-many.d.ts +34 -1
  140. package/dist/cli/commands/update-many.js +60 -31
  141. package/dist/cli/commands/update-many.js.map +1 -1
  142. package/dist/cli/commands/update.d.ts +71 -0
  143. package/dist/cli/commands/update.js +74 -8
  144. package/dist/cli/commands/update.js.map +1 -1
  145. package/dist/cli/commands/upgrade.d.ts +28 -1
  146. package/dist/cli/commands/upgrade.js +17 -4
  147. package/dist/cli/commands/upgrade.js.map +1 -1
  148. package/dist/cli/commands/validate.d.ts +114 -0
  149. package/dist/cli/commands/validate.js +154 -9
  150. package/dist/cli/commands/validate.js.map +1 -1
  151. package/dist/cli/error-guidance.d.ts +30 -0
  152. package/dist/cli/error-guidance.js +68 -6
  153. package/dist/cli/error-guidance.js.map +1 -1
  154. package/dist/cli/extension-command-options.js +9 -7
  155. package/dist/cli/extension-command-options.js.map +1 -1
  156. package/dist/cli/help-content.d.ts +8 -0
  157. package/dist/cli/help-content.js +30 -6
  158. package/dist/cli/help-content.js.map +1 -1
  159. package/dist/cli/help-json-payload.d.ts +19 -1
  160. package/dist/cli/help-json-payload.js +16 -7
  161. package/dist/cli/help-json-payload.js.map +1 -1
  162. package/dist/cli/main.d.ts +223 -0
  163. package/dist/cli/main.js +214 -46
  164. package/dist/cli/main.js.map +1 -1
  165. package/dist/cli/register-list-query.js +62 -5
  166. package/dist/cli/register-list-query.js.map +1 -1
  167. package/dist/cli/register-mutation.d.ts +16 -0
  168. package/dist/cli/register-mutation.js +210 -40
  169. package/dist/cli/register-mutation.js.map +1 -1
  170. package/dist/cli/register-operations.d.ts +8 -0
  171. package/dist/cli/register-operations.js +33 -11
  172. package/dist/cli/register-operations.js.map +1 -1
  173. package/dist/cli/register-setup.js +9 -6
  174. package/dist/cli/register-setup.js.map +1 -1
  175. package/dist/cli/registration-helpers.d.ts +4 -0
  176. package/dist/cli/registration-helpers.js +124 -38
  177. package/dist/cli/registration-helpers.js.map +1 -1
  178. package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +18 -0
  179. package/dist/cli-bundle/chunks/{activity-XADJOG6G.js → activity-MJGTX4LO.js} +13 -11
  180. package/dist/cli-bundle/chunks/{aggregate-OD36DJU5.js → aggregate-MH3GROKB.js} +54 -25
  181. package/dist/cli-bundle/chunks/aggregate-MH3GROKB.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{aggregate-6OTS3AOO.js → aggregate-OUGCDFNC.js} +55 -26
  183. package/dist/cli-bundle/chunks/aggregate-OUGCDFNC.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{append-JYWO4P7W.js → append-2Q4BPUBW.js} +10 -10
  185. package/dist/cli-bundle/chunks/{append-JYWO4P7W.js.map → append-2Q4BPUBW.js.map} +2 -2
  186. package/dist/cli-bundle/chunks/{append-KG55G7S3.js → append-VCRUG2W6.js} +11 -11
  187. package/dist/cli-bundle/chunks/append-VCRUG2W6.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js → chunk-2IUJBMKS.js} +10 -9
  189. package/dist/cli-bundle/chunks/{chunk-IGVJRZ6H.js.map → chunk-2IUJBMKS.js.map} +2 -2
  190. package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js → chunk-2JEGCDYT.js} +2 -2
  191. package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js → chunk-3WAULYOY.js} +3 -3
  192. package/dist/cli-bundle/chunks/{chunk-UIG4TW2H.js → chunk-3XOXWOGA.js} +359 -19
  193. package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{chunk-3KLPFWZ4.js → chunk-4KBK4BA3.js} +16 -34
  195. package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-OLKBSY4N.js → chunk-4VLB4JH2.js} +51 -8
  197. package/dist/cli-bundle/chunks/chunk-4VLB4JH2.js.map +7 -0
  198. package/dist/cli-bundle/chunks/{chunk-ZMW77VWV.js → chunk-656HPQPO.js} +27 -12
  199. package/dist/cli-bundle/chunks/chunk-656HPQPO.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{chunk-CW6E4NAT.js → chunk-667XI4UJ.js} +309 -20
  201. package/dist/cli-bundle/chunks/chunk-667XI4UJ.js.map +1 -0
  202. package/dist/cli-bundle/chunks/{chunk-5SCT2JCT.js → chunk-6BV7ENQL.js} +9 -8
  203. package/dist/cli-bundle/chunks/chunk-6BV7ENQL.js.map +7 -0
  204. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
  205. package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
  206. package/dist/cli-bundle/chunks/{chunk-VFUZV5EB.js → chunk-6NQXMGYU.js} +19 -8
  207. package/dist/cli-bundle/chunks/chunk-6NQXMGYU.js.map +7 -0
  208. package/dist/cli-bundle/chunks/{chunk-GKIZW7SM.js → chunk-764O7EUA.js} +223 -50
  209. package/dist/cli-bundle/chunks/chunk-764O7EUA.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js → chunk-7AGIXLNK.js} +3 -3
  211. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js +404 -0
  212. package/dist/cli-bundle/chunks/chunk-7EILPFMA.js.map +7 -0
  213. package/dist/cli-bundle/chunks/{chunk-HI7STVF2.js → chunk-7K2MXFMX.js} +14 -32
  214. package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-TNAP7EJX.js → chunk-7L5VOUYP.js} +6 -17
  216. package/dist/cli-bundle/chunks/chunk-7L5VOUYP.js.map +7 -0
  217. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js +61 -0
  218. package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-7IYFN5R7.js → chunk-A576QZDL.js} +223 -50
  220. package/dist/cli-bundle/chunks/chunk-A576QZDL.js.map +1 -0
  221. package/dist/cli-bundle/chunks/{chunk-KBPQHXWG.js → chunk-AERT7KT3.js} +5 -5
  222. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js +58 -0
  223. package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-KWAXVAXX.js → chunk-B5Q7XC4K.js} +117 -37
  225. package/dist/cli-bundle/chunks/chunk-B5Q7XC4K.js.map +7 -0
  226. package/dist/cli-bundle/chunks/{chunk-EWFY7SLA.js → chunk-BJWTFOZM.js} +74 -14
  227. package/dist/cli-bundle/chunks/chunk-BJWTFOZM.js.map +1 -0
  228. package/dist/cli-bundle/chunks/{chunk-XJDGS74Y.js → chunk-CBMETQ2U.js} +105 -31
  229. package/dist/cli-bundle/chunks/chunk-CBMETQ2U.js.map +1 -0
  230. package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js → chunk-E6J2PEK6.js} +3 -3
  231. package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js → chunk-F2GC6L3N.js} +3 -3
  232. package/dist/cli-bundle/chunks/{chunk-I7NYDZDV.js → chunk-F7WSO5UX.js} +7 -18
  233. package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js → chunk-FTAZLAR7.js} +8 -5
  235. package/dist/cli-bundle/chunks/{chunk-VAOUX6TK.js.map → chunk-FTAZLAR7.js.map} +1 -1
  236. package/dist/cli-bundle/chunks/{chunk-OASDW5UI.js → chunk-FXNT5LPX.js} +77 -9
  237. package/dist/cli-bundle/chunks/chunk-FXNT5LPX.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{chunk-WUNFKP7M.js → chunk-G2YVUY7I.js} +14 -9
  239. package/dist/cli-bundle/chunks/chunk-G2YVUY7I.js.map +1 -0
  240. package/dist/cli-bundle/chunks/{chunk-L5EPZQIC.js → chunk-G3CEIXTV.js} +68 -19
  241. package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +7 -0
  242. package/dist/cli-bundle/chunks/{chunk-UUWGCWBU.js → chunk-GAVE4MYM.js} +37 -63
  243. package/dist/cli-bundle/chunks/chunk-GAVE4MYM.js.map +1 -0
  244. package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js → chunk-GQ4JKNMV.js} +4 -4
  245. package/dist/cli-bundle/chunks/{chunk-SXKNJPQ7.js.map → chunk-GQ4JKNMV.js.map} +1 -1
  246. package/dist/cli-bundle/chunks/{chunk-73ZPG2I3.js → chunk-GYMG7AG6.js} +36 -62
  247. package/dist/cli-bundle/chunks/chunk-GYMG7AG6.js.map +7 -0
  248. package/dist/cli-bundle/chunks/{chunk-35P4GT6E.js → chunk-H6EH6ENJ.js} +362 -22
  249. package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +7 -0
  250. package/dist/cli-bundle/chunks/{chunk-F75JSIOZ.js → chunk-HDIDUME4.js} +45 -13
  251. package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +1 -0
  252. package/dist/cli-bundle/chunks/{chunk-XWMF3POR.js → chunk-HPELHUTG.js} +122 -45
  253. package/dist/cli-bundle/chunks/chunk-HPELHUTG.js.map +1 -0
  254. package/dist/cli-bundle/chunks/{chunk-QKW5D45B.js → chunk-II7OGE3V.js} +20 -9
  255. package/dist/cli-bundle/chunks/chunk-II7OGE3V.js.map +1 -0
  256. package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js → chunk-ILHLIA47.js} +5 -5
  257. package/dist/cli-bundle/chunks/{chunk-4HFU4UO2.js.map → chunk-ILHLIA47.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{chunk-P5BJOMBB.js → chunk-IMQG4VR3.js} +118 -74
  259. package/dist/cli-bundle/chunks/chunk-IMQG4VR3.js.map +1 -0
  260. package/dist/cli-bundle/chunks/{chunk-AX4GEVQC.js → chunk-IQVB3YDD.js} +88 -22
  261. package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +7 -0
  262. package/dist/cli-bundle/chunks/{chunk-I53JBTJW.js → chunk-KQ3LAMDO.js} +45 -13
  263. package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +7 -0
  264. package/dist/cli-bundle/chunks/{chunk-A6LXQFO7.js → chunk-KTVETP66.js} +334 -253
  265. package/dist/cli-bundle/chunks/chunk-KTVETP66.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{chunk-DY6C42S6.js → chunk-KZYVTOG5.js} +26 -11
  267. package/dist/cli-bundle/chunks/chunk-KZYVTOG5.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js → chunk-L6FJPOT4.js} +11 -10
  269. package/dist/cli-bundle/chunks/{chunk-HGLC63AU.js.map → chunk-L6FJPOT4.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/{chunk-FY4SPXSC.js → chunk-LV5FFQ7M.js} +354 -266
  271. package/dist/cli-bundle/chunks/chunk-LV5FFQ7M.js.map +7 -0
  272. package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
  273. package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
  274. package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js → chunk-M23HXJL3.js} +2 -2
  275. package/dist/cli-bundle/chunks/{chunk-S26FESD4.js → chunk-MJZUZ2QE.js} +3 -3
  276. package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js → chunk-NCIBNERT.js} +4 -4
  277. package/dist/cli-bundle/chunks/{chunk-I2IJY2NL.js.map → chunk-NCIBNERT.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{chunk-TK5VZFHY.js → chunk-NIQHNDBZ.js} +76 -8
  279. package/dist/cli-bundle/chunks/chunk-NIQHNDBZ.js.map +7 -0
  280. package/dist/cli-bundle/chunks/{chunk-C6SAP27O.js → chunk-O46LTCXQ.js} +4 -4
  281. package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js → chunk-OCTQJP42.js} +19 -8
  282. package/dist/cli-bundle/chunks/{chunk-YW6Q3RYZ.js.map → chunk-OCTQJP42.js.map} +2 -2
  283. package/dist/cli-bundle/chunks/{chunk-WPDMBIX6.js → chunk-OLTYNVJR.js} +5 -5
  284. package/dist/cli-bundle/chunks/{chunk-IUKD4W6Z.js → chunk-OY3P2I6B.js} +13 -8
  285. package/dist/cli-bundle/chunks/chunk-OY3P2I6B.js.map +7 -0
  286. package/dist/cli-bundle/chunks/{chunk-SO55HRA5.js → chunk-PZD7WPUC.js} +69 -20
  287. package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +1 -0
  288. package/dist/cli-bundle/chunks/{chunk-HHHJ2GI3.js → chunk-Q5RLUCP3.js} +74 -14
  289. package/dist/cli-bundle/chunks/chunk-Q5RLUCP3.js.map +7 -0
  290. package/dist/cli-bundle/chunks/{chunk-S2ZLDYGS.js → chunk-RKKIH2ZQ.js} +116 -36
  291. package/dist/cli-bundle/chunks/chunk-RKKIH2ZQ.js.map +1 -0
  292. package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js → chunk-SPYPC5CB.js} +3 -3
  293. package/dist/cli-bundle/chunks/{chunk-GWZSYR6X.js.map → chunk-SPYPC5CB.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/{chunk-7AMK6DOW.js → chunk-SY4GKIWT.js} +88 -22
  295. package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +1 -0
  296. package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js → chunk-SY4PZWIZ.js} +7 -4
  297. package/dist/cli-bundle/chunks/{chunk-ZLMIWZUG.js.map → chunk-SY4PZWIZ.js.map} +2 -2
  298. package/dist/cli-bundle/chunks/{chunk-R2OUQVBK.js → chunk-T5VU7ROQ.js} +4 -4
  299. package/dist/cli-bundle/chunks/{chunk-37CYVF73.js → chunk-TIRZIQRP.js} +121 -44
  300. package/dist/cli-bundle/chunks/chunk-TIRZIQRP.js.map +7 -0
  301. package/dist/cli-bundle/chunks/{chunk-7UGSRQCL.js → chunk-TUB3DZAZ.js} +107 -33
  302. package/dist/cli-bundle/chunks/chunk-TUB3DZAZ.js.map +7 -0
  303. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js +394 -0
  304. package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js.map +1 -0
  305. package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js → chunk-UBMCSJXX.js} +3 -3
  306. package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js → chunk-UUKORJSN.js} +4 -4
  307. package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
  308. package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
  309. package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js → chunk-WZCQVABQ.js} +2 -2
  310. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
  311. package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
  312. package/dist/cli-bundle/chunks/{chunk-4YFAGDRH.js → chunk-XLNNCKTN.js} +322 -19
  313. package/dist/cli-bundle/chunks/chunk-XLNNCKTN.js.map +7 -0
  314. package/dist/cli-bundle/chunks/{chunk-RXAP6JL5.js → chunk-XNOY7TCB.js} +118 -74
  315. package/dist/cli-bundle/chunks/chunk-XNOY7TCB.js.map +7 -0
  316. package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js → chunk-YGRPBFMA.js} +2 -2
  317. package/dist/cli-bundle/chunks/{chunk-QNJSITCX.js → chunk-YXTLI4XP.js} +20 -9
  318. package/dist/cli-bundle/chunks/chunk-YXTLI4XP.js.map +1 -0
  319. package/dist/cli-bundle/chunks/{chunk-FDH2X65L.js → chunk-Z3MUNQRV.js} +52 -9
  320. package/dist/cli-bundle/chunks/chunk-Z3MUNQRV.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js → chunk-ZJRDVYZI.js} +4 -4
  322. package/dist/cli-bundle/chunks/{chunk-CCX4RSYZ.js → chunk-ZONXMSVB.js} +10 -9
  323. package/dist/cli-bundle/chunks/chunk-ZONXMSVB.js.map +1 -0
  324. package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js → claim-4APLUXJW.js} +10 -10
  325. package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js → claim-NEO7AGWH.js} +10 -10
  326. package/dist/cli-bundle/chunks/{close-XLEKIQSW.js → close-3QABBNGU.js} +8 -8
  327. package/dist/cli-bundle/chunks/close-ILMZR3D7.js +13 -0
  328. package/dist/cli-bundle/chunks/{close-many-AOD4HSAZ.js → close-many-MIZLTYGL.js} +32 -20
  329. package/dist/cli-bundle/chunks/close-many-MIZLTYGL.js.map +1 -0
  330. package/dist/cli-bundle/chunks/{close-many-XKAQY5CQ.js → close-many-Q7Y5AHQI.js} +31 -19
  331. package/dist/cli-bundle/chunks/close-many-Q7Y5AHQI.js.map +7 -0
  332. package/dist/cli-bundle/chunks/{comments-RN5TG4ZN.js → comments-DAIQPOMU.js} +55 -31
  333. package/dist/cli-bundle/chunks/comments-DAIQPOMU.js.map +1 -0
  334. package/dist/cli-bundle/chunks/{comments-B4RWWDJT.js → comments-IWFSVM4P.js} +54 -30
  335. package/dist/cli-bundle/chunks/comments-IWFSVM4P.js.map +7 -0
  336. package/dist/cli-bundle/chunks/{config-3JXJ3XZ7.js → config-IOJELD6O.js} +45 -19
  337. package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +1 -0
  338. package/dist/cli-bundle/chunks/{config-FZ4UDC4B.js → config-PXTMAYV3.js} +44 -18
  339. package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +7 -0
  340. package/dist/cli-bundle/chunks/{context-QBPO3BFM.js → context-QHJSCJW4.js} +128 -39
  341. package/dist/cli-bundle/chunks/context-QHJSCJW4.js.map +1 -0
  342. package/dist/cli-bundle/chunks/{context-L36PIN35.js → context-XZS2VFKU.js} +127 -38
  343. package/dist/cli-bundle/chunks/context-XZS2VFKU.js.map +7 -0
  344. package/dist/cli-bundle/chunks/{contracts-2G66IGIA.js → contracts-B7U4OJTV.js} +54 -10
  345. package/dist/cli-bundle/chunks/contracts-B7U4OJTV.js.map +1 -0
  346. package/dist/cli-bundle/chunks/{contracts-PJCHYSO5.js → contracts-NSBVLXQ3.js} +54 -10
  347. package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +7 -0
  348. package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js → copy-Q64T5FD4.js} +7 -7
  349. package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js → copy-SG34LCMU.js} +7 -7
  350. package/dist/cli-bundle/chunks/create-F5HZX2S4.js +30 -0
  351. package/dist/cli-bundle/chunks/{create-5433DP3G.js → create-IPAX2SNL.js} +16 -13
  352. package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js → delete-TLXR7LJ2.js} +7 -7
  353. package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js → delete-VH3L7DZ6.js} +7 -7
  354. package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js → deps-J3HBBLDB.js} +9 -10
  355. package/dist/cli-bundle/chunks/{deps-CZ4PTVXU.js.map → deps-J3HBBLDB.js.map} +2 -2
  356. package/dist/cli-bundle/chunks/{deps-6TSPOSGU.js → deps-XV6JJ6IN.js} +10 -11
  357. package/dist/cli-bundle/chunks/deps-XV6JJ6IN.js.map +1 -0
  358. package/dist/cli-bundle/chunks/{docs-MXLGZUIT.js → docs-GWDEB7JH.js} +9 -9
  359. package/dist/cli-bundle/chunks/{docs-I3BAF5WH.js → docs-RCLNSKID.js} +9 -9
  360. package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js → extension-5RN65LHT.js} +7 -5
  361. package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js → extension-7KO2NX2A.js} +7 -5
  362. package/dist/cli-bundle/chunks/{files-GUXUM2MB.js → files-3TCQHUHA.js} +25 -11
  363. package/dist/cli-bundle/chunks/files-3TCQHUHA.js.map +1 -0
  364. package/dist/cli-bundle/chunks/{files-FYP3MDPX.js → files-5FDUPSEA.js} +24 -10
  365. package/dist/cli-bundle/chunks/files-5FDUPSEA.js.map +7 -0
  366. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js +109 -0
  367. package/dist/cli-bundle/chunks/focus-7AQMNRSU.js.map +7 -0
  368. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js +106 -0
  369. package/dist/cli-bundle/chunks/focus-HQXBYPKM.js.map +1 -0
  370. package/dist/cli-bundle/chunks/{gc-KGQG66SA.js → gc-2FGKYRJ4.js} +3 -3
  371. package/dist/cli-bundle/chunks/{gc-FENB2ESG.js → gc-5B6ABL3Z.js} +3 -3
  372. package/dist/cli-bundle/chunks/{get-PCHS7RA6.js → get-FUMVOJQD.js} +43 -16
  373. package/dist/cli-bundle/chunks/get-FUMVOJQD.js.map +1 -0
  374. package/dist/cli-bundle/chunks/{get-QARTE6BL.js → get-H5BZTW4A.js} +42 -15
  375. package/dist/cli-bundle/chunks/get-H5BZTW4A.js.map +7 -0
  376. package/dist/cli-bundle/chunks/{health-E4D7KGHD.js → health-JSVOR6B4.js} +75 -49
  377. package/dist/cli-bundle/chunks/health-JSVOR6B4.js.map +1 -0
  378. package/dist/cli-bundle/chunks/{health-7MTXAVR2.js → health-LE2ZQGSM.js} +74 -48
  379. package/dist/cli-bundle/chunks/health-LE2ZQGSM.js.map +7 -0
  380. package/dist/cli-bundle/chunks/{history-7WUAEWHW.js → history-QO4JVJJP.js} +10 -10
  381. package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +20 -0
  382. package/dist/cli-bundle/chunks/{history-compact-LW27IPFK.js → history-compact-ID74DOUI.js} +37 -46
  383. package/dist/cli-bundle/chunks/history-compact-ID74DOUI.js.map +7 -0
  384. package/dist/cli-bundle/chunks/{history-compact-3EJ3L2O7.js → history-compact-SDFRPZ4V.js} +38 -47
  385. package/dist/cli-bundle/chunks/history-compact-SDFRPZ4V.js.map +1 -0
  386. package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +21 -0
  387. package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js → history-redact-Z4P5MM3G.js} +13 -11
  388. package/dist/cli-bundle/chunks/{history-repair-OSQOKJ3E.js → history-repair-ANHEYWKF.js} +43 -48
  389. package/dist/cli-bundle/chunks/history-repair-ANHEYWKF.js.map +7 -0
  390. package/dist/cli-bundle/chunks/{history-repair-SBK7P34V.js → history-repair-CKE7GLZR.js} +44 -49
  391. package/dist/cli-bundle/chunks/history-repair-CKE7GLZR.js.map +1 -0
  392. package/dist/cli-bundle/chunks/init-7FBQO77A.js +19 -0
  393. package/dist/cli-bundle/chunks/{init-S5WEGUJY.js → init-K6MSMB37.js} +11 -9
  394. package/dist/cli-bundle/chunks/{learnings-XK3P4ZDR.js → learnings-VIS3NOQV.js} +13 -12
  395. package/dist/cli-bundle/chunks/learnings-VIS3NOQV.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{learnings-HQXSSKZ5.js → learnings-YYNB64GN.js} +14 -13
  397. package/dist/cli-bundle/chunks/learnings-YYNB64GN.js.map +1 -0
  398. package/dist/cli-bundle/chunks/list-7UE44A2R.js +29 -0
  399. package/dist/cli-bundle/chunks/list-UHMA3N2K.js +33 -0
  400. package/dist/cli-bundle/chunks/{notes-5T6P7C5V.js → notes-2HRMV67I.js} +14 -13
  401. package/dist/cli-bundle/chunks/notes-2HRMV67I.js.map +1 -0
  402. package/dist/cli-bundle/chunks/{notes-U5FZCSBT.js → notes-IN3UMA7W.js} +13 -12
  403. package/dist/cli-bundle/chunks/notes-IN3UMA7W.js.map +7 -0
  404. package/dist/cli-bundle/chunks/{plan-2YTQYWGM.js → plan-I3SVH7FV.js} +16 -15
  405. package/dist/cli-bundle/chunks/plan-I3SVH7FV.js.map +1 -0
  406. package/dist/cli-bundle/chunks/{plan-7IVSICR6.js → plan-PAWCCAPW.js} +15 -14
  407. package/dist/cli-bundle/chunks/plan-PAWCCAPW.js.map +7 -0
  408. package/dist/cli-bundle/chunks/{register-list-query-4UPMHONX.js → register-list-query-N7Z7RTDM.js} +31 -22
  409. package/dist/cli-bundle/chunks/register-list-query-N7Z7RTDM.js.map +7 -0
  410. package/dist/cli-bundle/chunks/{register-list-query-7VOW2C3W.js → register-list-query-OTIK4DVA.js} +32 -23
  411. package/dist/cli-bundle/chunks/register-list-query-OTIK4DVA.js.map +1 -0
  412. package/dist/cli-bundle/chunks/{register-mutation-FARSGYRD.js → register-mutation-UFZK6Q57.js} +216 -66
  413. package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +7 -0
  414. package/dist/cli-bundle/chunks/{register-mutation-LJDNVREU.js → register-mutation-XFORLS6D.js} +210 -67
  415. package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +1 -0
  416. package/dist/cli-bundle/chunks/{register-operations-HCJKDUA6.js → register-operations-6ZCLKRBG.js} +53 -39
  417. package/dist/cli-bundle/chunks/register-operations-6ZCLKRBG.js.map +7 -0
  418. package/dist/cli-bundle/chunks/{register-operations-FFTYAL42.js → register-operations-ITE7JTH3.js} +54 -40
  419. package/dist/cli-bundle/chunks/register-operations-ITE7JTH3.js.map +1 -0
  420. package/dist/cli-bundle/chunks/{register-setup-6AVIUOCC.js → register-setup-7RKGE4BQ.js} +18 -21
  421. package/dist/cli-bundle/chunks/register-setup-7RKGE4BQ.js.map +1 -0
  422. package/dist/cli-bundle/chunks/{register-setup-KVNLO5OJ.js → register-setup-7UKEFKT6.js} +17 -20
  423. package/dist/cli-bundle/chunks/register-setup-7UKEFKT6.js.map +7 -0
  424. package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js → restore-NNVPBBVJ.js} +13 -11
  425. package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +19 -0
  426. package/dist/cli-bundle/chunks/{schema-AINZ2IMM.js → schema-3HCLXCFX.js} +27 -9
  427. package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +7 -0
  428. package/dist/cli-bundle/chunks/{schema-76HDZJCC.js → schema-3YKCQ3VO.js} +28 -10
  429. package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +1 -0
  430. package/dist/cli-bundle/chunks/{search-JMLFQEPJ.js → search-NQ42NC6A.js} +328 -71
  431. package/dist/cli-bundle/chunks/search-NQ42NC6A.js.map +7 -0
  432. package/dist/cli-bundle/chunks/{search-NL3TSCYB.js → search-V7PZ2ICH.js} +328 -71
  433. package/dist/cli-bundle/chunks/search-V7PZ2ICH.js.map +1 -0
  434. package/dist/cli-bundle/chunks/{stats-BKXCBIGT.js → stats-7KD4PJC5.js} +41 -16
  435. package/dist/cli-bundle/chunks/stats-7KD4PJC5.js.map +7 -0
  436. package/dist/cli-bundle/chunks/{stats-UBD56TGK.js → stats-GRHO6RFB.js} +42 -17
  437. package/dist/cli-bundle/chunks/stats-GRHO6RFB.js.map +1 -0
  438. package/dist/cli-bundle/chunks/{telemetry-ZJXK3H7X.js → telemetry-H5GLXNG5.js} +6 -6
  439. package/dist/cli-bundle/chunks/telemetry-H5GLXNG5.js.map +7 -0
  440. package/dist/cli-bundle/chunks/{telemetry-N454RHG5.js → telemetry-TRRYZXWT.js} +7 -7
  441. package/dist/cli-bundle/chunks/telemetry-TRRYZXWT.js.map +1 -0
  442. package/dist/cli-bundle/chunks/test-6CZNIIGA.js +34 -0
  443. package/dist/cli-bundle/chunks/{test-BQAKIXAT.js → test-7GVQ3VMN.js} +16 -14
  444. package/dist/cli-bundle/chunks/{test-all-7LV3I6S5.js → test-all-3LF2OZD2.js} +23 -16
  445. package/dist/cli-bundle/chunks/test-all-3LF2OZD2.js.map +7 -0
  446. package/dist/cli-bundle/chunks/{test-all-TDYCCBA4.js → test-all-ODVADHV6.js} +24 -17
  447. package/dist/cli-bundle/chunks/test-all-ODVADHV6.js.map +1 -0
  448. package/dist/cli-bundle/chunks/{test-runs-E64M6XS3.js → test-runs-LYT6ZTNQ.js} +62 -65
  449. package/dist/cli-bundle/chunks/test-runs-LYT6ZTNQ.js.map +1 -0
  450. package/dist/cli-bundle/chunks/{test-runs-LXZLULCI.js → test-runs-RVP6VWN7.js} +61 -64
  451. package/dist/cli-bundle/chunks/test-runs-RVP6VWN7.js.map +7 -0
  452. package/dist/cli-bundle/chunks/update-MPGM6SBE.js +28 -0
  453. package/dist/cli-bundle/chunks/update-UN75XW3C.js +24 -0
  454. package/dist/cli-bundle/chunks/{update-many-F4IKDWZB.js → update-many-FCU6RKTO.js} +80 -34
  455. package/dist/cli-bundle/chunks/update-many-FCU6RKTO.js.map +1 -0
  456. package/dist/cli-bundle/chunks/{update-many-NTWZ5YT3.js → update-many-XSEQJ24X.js} +79 -33
  457. package/dist/cli-bundle/chunks/update-many-XSEQJ24X.js.map +7 -0
  458. package/dist/cli-bundle/chunks/{upgrade-37F7JKES.js → upgrade-A6TL3INC.js} +22 -8
  459. package/dist/cli-bundle/chunks/upgrade-A6TL3INC.js.map +7 -0
  460. package/dist/cli-bundle/chunks/{upgrade-L32JA4TZ.js → upgrade-FOB5LHO5.js} +23 -9
  461. package/dist/cli-bundle/chunks/upgrade-FOB5LHO5.js.map +1 -0
  462. package/dist/cli-bundle/chunks/{validate-46KCRHL7.js → validate-7BLDG3AT.js} +222 -31
  463. package/dist/cli-bundle/chunks/validate-7BLDG3AT.js.map +1 -0
  464. package/dist/cli-bundle/chunks/{validate-CRFMPTYD.js → validate-EHL3MI2V.js} +236 -31
  465. package/dist/cli-bundle/chunks/validate-EHL3MI2V.js.map +7 -0
  466. package/dist/cli-bundle/main.js +305 -140
  467. package/dist/cli-bundle/main.js.map +3 -3
  468. package/dist/cli.d.ts +10 -0
  469. package/dist/cli.js +21 -8
  470. package/dist/cli.js.map +1 -1
  471. package/dist/core/diagnostics/remediation.js +7 -2
  472. package/dist/core/diagnostics/remediation.js.map +1 -1
  473. package/dist/core/extensions/extension-capability-aliases.js +7 -33
  474. package/dist/core/extensions/extension-capability-aliases.js.map +1 -1
  475. package/dist/core/extensions/extension-policy.js +14 -15
  476. package/dist/core/extensions/extension-policy.js.map +1 -1
  477. package/dist/core/extensions/item-fields.js +4 -5
  478. package/dist/core/extensions/item-fields.js.map +1 -1
  479. package/dist/core/extensions/loader.d.ts +75 -1
  480. package/dist/core/extensions/loader.js +56 -32
  481. package/dist/core/extensions/loader.js.map +1 -1
  482. package/dist/core/governance/content-fields.d.ts +84 -0
  483. package/dist/core/governance/content-fields.js +182 -0
  484. package/dist/core/governance/content-fields.js.map +1 -0
  485. package/dist/core/governance/issue-codes.d.ts +51 -0
  486. package/dist/core/governance/issue-codes.js +95 -0
  487. package/dist/core/governance/issue-codes.js.map +1 -0
  488. package/dist/core/governance/metadata-coverage.d.ts +168 -0
  489. package/dist/core/governance/metadata-coverage.js +362 -0
  490. package/dist/core/governance/metadata-coverage.js.map +1 -0
  491. package/dist/core/history/history-rewrite.d.ts +22 -0
  492. package/dist/core/history/history-rewrite.js +38 -2
  493. package/dist/core/history/history-rewrite.js.map +1 -1
  494. package/dist/core/history/history.d.ts +7 -0
  495. package/dist/core/history/history.js +6 -2
  496. package/dist/core/history/history.js.map +1 -1
  497. package/dist/core/io/body-file.d.ts +14 -0
  498. package/dist/core/io/body-file.js +47 -0
  499. package/dist/core/io/body-file.js.map +1 -0
  500. package/dist/core/item/item-format.d.ts +46 -1
  501. package/dist/core/item/item-format.js +51 -60
  502. package/dist/core/item/item-format.js.map +1 -1
  503. package/dist/core/item/parse.d.ts +9 -0
  504. package/dist/core/item/parse.js +10 -16
  505. package/dist/core/item/parse.js.map +1 -1
  506. package/dist/core/item/type-registry.d.ts +1 -0
  507. package/dist/core/item/type-registry.js +8 -10
  508. package/dist/core/item/type-registry.js.map +1 -1
  509. package/dist/core/lock/lock.d.ts +26 -0
  510. package/dist/core/lock/lock.js +10 -2
  511. package/dist/core/lock/lock.js.map +1 -1
  512. package/dist/core/output/output.d.ts +7 -0
  513. package/dist/core/output/output.js +6 -2
  514. package/dist/core/output/output.js.map +1 -1
  515. package/dist/core/schema/item-types-file.d.ts +25 -2
  516. package/dist/core/schema/item-types-file.js +78 -6
  517. package/dist/core/schema/item-types-file.js.map +1 -1
  518. package/dist/core/schema/runtime-schema.d.ts +7 -0
  519. package/dist/core/schema/runtime-schema.js +23 -16
  520. package/dist/core/schema/runtime-schema.js.map +1 -1
  521. package/dist/core/search/background-refresh.js +3 -3
  522. package/dist/core/search/background-refresh.js.map +1 -1
  523. package/dist/core/search/cache.d.ts +19 -1
  524. package/dist/core/search/cache.js +11 -3
  525. package/dist/core/search/cache.js.map +1 -1
  526. package/dist/core/search/corpus.d.ts +36 -2
  527. package/dist/core/search/corpus.js +120 -24
  528. package/dist/core/search/corpus.js.map +1 -1
  529. package/dist/core/search/providers.d.ts +19 -0
  530. package/dist/core/search/providers.js +19 -2
  531. package/dist/core/search/providers.js.map +1 -1
  532. package/dist/core/sentry/instrument.d.ts +1 -0
  533. package/dist/core/sentry/instrument.js +6 -2
  534. package/dist/core/sentry/instrument.js.map +1 -1
  535. package/dist/core/session/session-state.d.ts +16 -0
  536. package/dist/core/session/session-state.js +48 -0
  537. package/dist/core/session/session-state.js.map +1 -0
  538. package/dist/core/shared/constants.d.ts +8 -0
  539. package/dist/core/shared/constants.js +11 -2
  540. package/dist/core/shared/constants.js.map +1 -1
  541. package/dist/core/shared/errors.d.ts +3 -0
  542. package/dist/core/shared/errors.js +2 -2
  543. package/dist/core/shared/errors.js.map +1 -1
  544. package/dist/core/shared/text-normalization.js +4 -3
  545. package/dist/core/shared/text-normalization.js.map +1 -1
  546. package/dist/core/shared/time.d.ts +13 -0
  547. package/dist/core/shared/time.js +19 -7
  548. package/dist/core/shared/time.js.map +1 -1
  549. package/dist/core/store/item-store.d.ts +11 -0
  550. package/dist/core/store/item-store.js +16 -23
  551. package/dist/core/store/item-store.js.map +1 -1
  552. package/dist/core/store/settings-validator.d.ts +2 -0
  553. package/dist/core/store/settings-validator.js +25 -2
  554. package/dist/core/store/settings-validator.js.map +1 -1
  555. package/dist/core/store/settings.d.ts +60 -1
  556. package/dist/core/store/settings.js +100 -46
  557. package/dist/core/store/settings.js.map +1 -1
  558. package/dist/core/telemetry/observability.js +10 -8
  559. package/dist/core/telemetry/observability.js.map +1 -1
  560. package/dist/core/telemetry/runtime.d.ts +272 -1
  561. package/dist/core/telemetry/runtime.js +358 -37
  562. package/dist/core/telemetry/runtime.js.map +1 -1
  563. package/dist/core/test/background-runs.d.ts +35 -0
  564. package/dist/core/test/background-runs.js +72 -61
  565. package/dist/core/test/background-runs.js.map +1 -1
  566. package/dist/core/test/run-selectors.js +5 -4
  567. package/dist/core/test/run-selectors.js.map +1 -1
  568. package/dist/core/validate/estimate-defaults.d.ts +39 -0
  569. package/dist/core/validate/estimate-defaults.js +117 -0
  570. package/dist/core/validate/estimate-defaults.js.map +1 -0
  571. package/dist/core/validate/fix-planning.d.ts +21 -3
  572. package/dist/core/validate/fix-planning.js +31 -4
  573. package/dist/core/validate/fix-planning.js.map +1 -1
  574. package/dist/core/validate/missing-link-owners.d.ts +64 -0
  575. package/dist/core/validate/missing-link-owners.js +98 -0
  576. package/dist/core/validate/missing-link-owners.js.map +1 -0
  577. package/dist/mcp/server.d.ts +62 -0
  578. package/dist/mcp/server.js +71 -8
  579. package/dist/mcp/server.js.map +1 -1
  580. package/dist/mcp/tool-definitions.js +17 -4
  581. package/dist/mcp/tool-definitions.js.map +1 -1
  582. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  583. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  584. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  585. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  586. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  587. package/dist/sdk/cli-contracts/tool-option-contracts.js +110 -2
  588. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  589. package/dist/sdk/cli-contracts/tool-parameter-tables.js +83 -8
  590. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  591. package/dist/sdk/cli-contracts.d.ts +28 -0
  592. package/dist/sdk/cli-contracts.js +164 -11
  593. package/dist/sdk/cli-contracts.js.map +1 -1
  594. package/dist/types.d.ts +17 -1
  595. package/dist/types.js +3 -3
  596. package/dist/types.js.map +1 -1
  597. package/docs/AGENT_GUIDE.md +15 -3
  598. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  599. package/docs/COMMANDS.md +136 -7
  600. package/docs/CONFIGURATION.md +52 -0
  601. package/docs/TESTING.md +6 -4
  602. package/package.json +6 -4
  603. package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
  604. package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
  605. package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
  606. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  607. package/plugins/pm-claude/README.md +6 -14
  608. package/plugins/pm-claude/commands/pm-init.md +1 -1
  609. package/plugins/pm-codex/README.md +1 -1
  610. package/scripts/bundle-cli.mjs +46 -37
  611. package/scripts/finalize-build.mjs +20 -9
  612. package/scripts/prepare-build-cache.mjs +27 -16
  613. package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +0 -16
  614. package/dist/cli-bundle/chunks/aggregate-6OTS3AOO.js.map +0 -1
  615. package/dist/cli-bundle/chunks/aggregate-OD36DJU5.js.map +0 -7
  616. package/dist/cli-bundle/chunks/append-KG55G7S3.js.map +0 -1
  617. package/dist/cli-bundle/chunks/chunk-35P4GT6E.js.map +0 -7
  618. package/dist/cli-bundle/chunks/chunk-37CYVF73.js.map +0 -7
  619. package/dist/cli-bundle/chunks/chunk-3KLPFWZ4.js.map +0 -7
  620. package/dist/cli-bundle/chunks/chunk-4JCSYR6F.js +0 -138
  621. package/dist/cli-bundle/chunks/chunk-4JCSYR6F.js.map +0 -7
  622. package/dist/cli-bundle/chunks/chunk-4YFAGDRH.js.map +0 -7
  623. package/dist/cli-bundle/chunks/chunk-5SCT2JCT.js.map +0 -7
  624. package/dist/cli-bundle/chunks/chunk-73ZPG2I3.js.map +0 -7
  625. package/dist/cli-bundle/chunks/chunk-7AMK6DOW.js.map +0 -1
  626. package/dist/cli-bundle/chunks/chunk-7IYFN5R7.js.map +0 -1
  627. package/dist/cli-bundle/chunks/chunk-7UGSRQCL.js.map +0 -7
  628. package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +0 -1
  629. package/dist/cli-bundle/chunks/chunk-AVGHVVF7.js +0 -128
  630. package/dist/cli-bundle/chunks/chunk-AVGHVVF7.js.map +0 -1
  631. package/dist/cli-bundle/chunks/chunk-AX4GEVQC.js.map +0 -7
  632. package/dist/cli-bundle/chunks/chunk-CCX4RSYZ.js.map +0 -1
  633. package/dist/cli-bundle/chunks/chunk-CW6E4NAT.js.map +0 -1
  634. package/dist/cli-bundle/chunks/chunk-DY6C42S6.js.map +0 -7
  635. package/dist/cli-bundle/chunks/chunk-EWFY7SLA.js.map +0 -1
  636. package/dist/cli-bundle/chunks/chunk-F75JSIOZ.js.map +0 -1
  637. package/dist/cli-bundle/chunks/chunk-FDH2X65L.js.map +0 -1
  638. package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +0 -7
  639. package/dist/cli-bundle/chunks/chunk-GKIZW7SM.js.map +0 -7
  640. package/dist/cli-bundle/chunks/chunk-HHHJ2GI3.js.map +0 -7
  641. package/dist/cli-bundle/chunks/chunk-HI7STVF2.js.map +0 -1
  642. package/dist/cli-bundle/chunks/chunk-I53JBTJW.js.map +0 -7
  643. package/dist/cli-bundle/chunks/chunk-I7NYDZDV.js.map +0 -1
  644. package/dist/cli-bundle/chunks/chunk-IUKD4W6Z.js.map +0 -7
  645. package/dist/cli-bundle/chunks/chunk-KWAXVAXX.js.map +0 -7
  646. package/dist/cli-bundle/chunks/chunk-L5EPZQIC.js.map +0 -7
  647. package/dist/cli-bundle/chunks/chunk-OASDW5UI.js.map +0 -1
  648. package/dist/cli-bundle/chunks/chunk-OLKBSY4N.js.map +0 -7
  649. package/dist/cli-bundle/chunks/chunk-P5BJOMBB.js.map +0 -1
  650. package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
  651. package/dist/cli-bundle/chunks/chunk-QKW5D45B.js.map +0 -1
  652. package/dist/cli-bundle/chunks/chunk-QNJSITCX.js.map +0 -1
  653. package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
  654. package/dist/cli-bundle/chunks/chunk-RXAP6JL5.js.map +0 -7
  655. package/dist/cli-bundle/chunks/chunk-S2ZLDYGS.js.map +0 -1
  656. package/dist/cli-bundle/chunks/chunk-SO55HRA5.js.map +0 -1
  657. package/dist/cli-bundle/chunks/chunk-TK5VZFHY.js.map +0 -7
  658. package/dist/cli-bundle/chunks/chunk-TNAP7EJX.js.map +0 -7
  659. package/dist/cli-bundle/chunks/chunk-UIG4TW2H.js.map +0 -1
  660. package/dist/cli-bundle/chunks/chunk-UUWGCWBU.js.map +0 -1
  661. package/dist/cli-bundle/chunks/chunk-VFUZV5EB.js.map +0 -7
  662. package/dist/cli-bundle/chunks/chunk-WUNFKP7M.js.map +0 -1
  663. package/dist/cli-bundle/chunks/chunk-XJDGS74Y.js.map +0 -1
  664. package/dist/cli-bundle/chunks/chunk-XWMF3POR.js.map +0 -1
  665. package/dist/cli-bundle/chunks/chunk-ZMW77VWV.js.map +0 -1
  666. package/dist/cli-bundle/chunks/close-4FMAPEMY.js +0 -13
  667. package/dist/cli-bundle/chunks/close-many-AOD4HSAZ.js.map +0 -1
  668. package/dist/cli-bundle/chunks/close-many-XKAQY5CQ.js.map +0 -7
  669. package/dist/cli-bundle/chunks/comments-B4RWWDJT.js.map +0 -7
  670. package/dist/cli-bundle/chunks/comments-RN5TG4ZN.js.map +0 -1
  671. package/dist/cli-bundle/chunks/config-3JXJ3XZ7.js.map +0 -1
  672. package/dist/cli-bundle/chunks/config-FZ4UDC4B.js.map +0 -7
  673. package/dist/cli-bundle/chunks/context-L36PIN35.js.map +0 -7
  674. package/dist/cli-bundle/chunks/context-QBPO3BFM.js.map +0 -1
  675. package/dist/cli-bundle/chunks/contracts-2G66IGIA.js.map +0 -1
  676. package/dist/cli-bundle/chunks/contracts-PJCHYSO5.js.map +0 -7
  677. package/dist/cli-bundle/chunks/create-VWLWS34Z.js +0 -27
  678. package/dist/cli-bundle/chunks/deps-6TSPOSGU.js.map +0 -1
  679. package/dist/cli-bundle/chunks/files-FYP3MDPX.js.map +0 -7
  680. package/dist/cli-bundle/chunks/files-GUXUM2MB.js.map +0 -1
  681. package/dist/cli-bundle/chunks/get-PCHS7RA6.js.map +0 -1
  682. package/dist/cli-bundle/chunks/get-QARTE6BL.js.map +0 -7
  683. package/dist/cli-bundle/chunks/health-7MTXAVR2.js.map +0 -7
  684. package/dist/cli-bundle/chunks/health-E4D7KGHD.js.map +0 -1
  685. package/dist/cli-bundle/chunks/history-L2FQFRTU.js +0 -20
  686. package/dist/cli-bundle/chunks/history-compact-3EJ3L2O7.js.map +0 -1
  687. package/dist/cli-bundle/chunks/history-compact-LW27IPFK.js.map +0 -7
  688. package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +0 -19
  689. package/dist/cli-bundle/chunks/history-repair-OSQOKJ3E.js.map +0 -7
  690. package/dist/cli-bundle/chunks/history-repair-SBK7P34V.js.map +0 -1
  691. package/dist/cli-bundle/chunks/init-4BKRHGWW.js +0 -17
  692. package/dist/cli-bundle/chunks/learnings-HQXSSKZ5.js.map +0 -1
  693. package/dist/cli-bundle/chunks/learnings-XK3P4ZDR.js.map +0 -7
  694. package/dist/cli-bundle/chunks/list-6CL3XFT6.js +0 -23
  695. package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +0 -19
  696. package/dist/cli-bundle/chunks/notes-5T6P7C5V.js.map +0 -1
  697. package/dist/cli-bundle/chunks/notes-U5FZCSBT.js.map +0 -7
  698. package/dist/cli-bundle/chunks/plan-2YTQYWGM.js.map +0 -1
  699. package/dist/cli-bundle/chunks/plan-7IVSICR6.js.map +0 -7
  700. package/dist/cli-bundle/chunks/register-list-query-4UPMHONX.js.map +0 -7
  701. package/dist/cli-bundle/chunks/register-list-query-7VOW2C3W.js.map +0 -1
  702. package/dist/cli-bundle/chunks/register-mutation-FARSGYRD.js.map +0 -7
  703. package/dist/cli-bundle/chunks/register-mutation-LJDNVREU.js.map +0 -1
  704. package/dist/cli-bundle/chunks/register-operations-FFTYAL42.js.map +0 -1
  705. package/dist/cli-bundle/chunks/register-operations-HCJKDUA6.js.map +0 -7
  706. package/dist/cli-bundle/chunks/register-setup-6AVIUOCC.js.map +0 -1
  707. package/dist/cli-bundle/chunks/register-setup-KVNLO5OJ.js.map +0 -7
  708. package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +0 -17
  709. package/dist/cli-bundle/chunks/schema-76HDZJCC.js.map +0 -1
  710. package/dist/cli-bundle/chunks/schema-AINZ2IMM.js.map +0 -7
  711. package/dist/cli-bundle/chunks/search-JMLFQEPJ.js.map +0 -7
  712. package/dist/cli-bundle/chunks/search-NL3TSCYB.js.map +0 -1
  713. package/dist/cli-bundle/chunks/stats-BKXCBIGT.js.map +0 -7
  714. package/dist/cli-bundle/chunks/stats-UBD56TGK.js.map +0 -1
  715. package/dist/cli-bundle/chunks/telemetry-N454RHG5.js.map +0 -1
  716. package/dist/cli-bundle/chunks/telemetry-ZJXK3H7X.js.map +0 -7
  717. package/dist/cli-bundle/chunks/test-O74JFUH5.js +0 -32
  718. package/dist/cli-bundle/chunks/test-all-7LV3I6S5.js.map +0 -7
  719. package/dist/cli-bundle/chunks/test-all-TDYCCBA4.js.map +0 -1
  720. package/dist/cli-bundle/chunks/test-runs-E64M6XS3.js.map +0 -1
  721. package/dist/cli-bundle/chunks/test-runs-LXZLULCI.js.map +0 -7
  722. package/dist/cli-bundle/chunks/update-36JM7YZT.js +0 -21
  723. package/dist/cli-bundle/chunks/update-I246PCLO.js +0 -25
  724. package/dist/cli-bundle/chunks/update-many-F4IKDWZB.js.map +0 -1
  725. package/dist/cli-bundle/chunks/update-many-NTWZ5YT3.js.map +0 -7
  726. package/dist/cli-bundle/chunks/upgrade-37F7JKES.js.map +0 -7
  727. package/dist/cli-bundle/chunks/upgrade-L32JA4TZ.js.map +0 -1
  728. package/dist/cli-bundle/chunks/validate-46KCRHL7.js.map +0 -1
  729. package/dist/cli-bundle/chunks/validate-CRFMPTYD.js.map +0 -7
  730. /package/dist/cli-bundle/chunks/{activity-XZIUPGZH.js.map → activity-5P2KQCTH.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{activity-XADJOG6G.js.map → activity-MJGTX4LO.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{chunk-ATEES5SX.js.map → chunk-2JEGCDYT.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{chunk-XUC4C4PT.js.map → chunk-3WAULYOY.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{chunk-QJMGRZO2.js.map → chunk-7AGIXLNK.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{chunk-KBPQHXWG.js.map → chunk-AERT7KT3.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{chunk-ESANVZF4.js.map → chunk-E6J2PEK6.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{chunk-VSRZRLG3.js.map → chunk-F2GC6L3N.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{chunk-XTKJSVWH.js.map → chunk-M23HXJL3.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{chunk-S26FESD4.js.map → chunk-MJZUZ2QE.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{chunk-C6SAP27O.js.map → chunk-O46LTCXQ.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{chunk-WPDMBIX6.js.map → chunk-OLTYNVJR.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{chunk-R2OUQVBK.js.map → chunk-T5VU7ROQ.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{chunk-P5U5EOMA.js.map → chunk-UBMCSJXX.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{chunk-ZYNJNPYD.js.map → chunk-UUKORJSN.js.map} +0 -0
  745. /package/dist/cli-bundle/chunks/{chunk-VPEAS7PS.js.map → chunk-WZCQVABQ.js.map} +0 -0
  746. /package/dist/cli-bundle/chunks/{chunk-Y3YKK7CY.js.map → chunk-YGRPBFMA.js.map} +0 -0
  747. /package/dist/cli-bundle/chunks/{chunk-XMBI6TNW.js.map → chunk-ZJRDVYZI.js.map} +0 -0
  748. /package/dist/cli-bundle/chunks/{claim-2RDYMCTP.js.map → claim-4APLUXJW.js.map} +0 -0
  749. /package/dist/cli-bundle/chunks/{claim-MJ7DZFC3.js.map → claim-NEO7AGWH.js.map} +0 -0
  750. /package/dist/cli-bundle/chunks/{close-XLEKIQSW.js.map → close-3QABBNGU.js.map} +0 -0
  751. /package/dist/cli-bundle/chunks/{close-4FMAPEMY.js.map → close-ILMZR3D7.js.map} +0 -0
  752. /package/dist/cli-bundle/chunks/{copy-FWIVTLBO.js.map → copy-Q64T5FD4.js.map} +0 -0
  753. /package/dist/cli-bundle/chunks/{copy-ALU5WMHA.js.map → copy-SG34LCMU.js.map} +0 -0
  754. /package/dist/cli-bundle/chunks/{create-VWLWS34Z.js.map → create-F5HZX2S4.js.map} +0 -0
  755. /package/dist/cli-bundle/chunks/{create-5433DP3G.js.map → create-IPAX2SNL.js.map} +0 -0
  756. /package/dist/cli-bundle/chunks/{delete-Y2SGJBGY.js.map → delete-TLXR7LJ2.js.map} +0 -0
  757. /package/dist/cli-bundle/chunks/{delete-IYTIYAJS.js.map → delete-VH3L7DZ6.js.map} +0 -0
  758. /package/dist/cli-bundle/chunks/{docs-MXLGZUIT.js.map → docs-GWDEB7JH.js.map} +0 -0
  759. /package/dist/cli-bundle/chunks/{docs-I3BAF5WH.js.map → docs-RCLNSKID.js.map} +0 -0
  760. /package/dist/cli-bundle/chunks/{extension-Q34OEWO5.js.map → extension-5RN65LHT.js.map} +0 -0
  761. /package/dist/cli-bundle/chunks/{extension-WH2FOIOZ.js.map → extension-7KO2NX2A.js.map} +0 -0
  762. /package/dist/cli-bundle/chunks/{gc-KGQG66SA.js.map → gc-2FGKYRJ4.js.map} +0 -0
  763. /package/dist/cli-bundle/chunks/{gc-FENB2ESG.js.map → gc-5B6ABL3Z.js.map} +0 -0
  764. /package/dist/cli-bundle/chunks/{history-7WUAEWHW.js.map → history-QO4JVJJP.js.map} +0 -0
  765. /package/dist/cli-bundle/chunks/{history-L2FQFRTU.js.map → history-SSXGGTVZ.js.map} +0 -0
  766. /package/dist/cli-bundle/chunks/{history-redact-QWQCX5DZ.js.map → history-redact-VBH44Y7F.js.map} +0 -0
  767. /package/dist/cli-bundle/chunks/{history-redact-G72A4EJ4.js.map → history-redact-Z4P5MM3G.js.map} +0 -0
  768. /package/dist/cli-bundle/chunks/{init-4BKRHGWW.js.map → init-7FBQO77A.js.map} +0 -0
  769. /package/dist/cli-bundle/chunks/{init-S5WEGUJY.js.map → init-K6MSMB37.js.map} +0 -0
  770. /package/dist/cli-bundle/chunks/{list-BYNN4ZEO.js.map → list-7UE44A2R.js.map} +0 -0
  771. /package/dist/cli-bundle/chunks/{list-6CL3XFT6.js.map → list-UHMA3N2K.js.map} +0 -0
  772. /package/dist/cli-bundle/chunks/{restore-M6AFHMV4.js.map → restore-NNVPBBVJ.js.map} +0 -0
  773. /package/dist/cli-bundle/chunks/{restore-CHIOQAQL.js.map → restore-XXXLQ2XC.js.map} +0 -0
  774. /package/dist/cli-bundle/chunks/{test-O74JFUH5.js.map → test-6CZNIIGA.js.map} +0 -0
  775. /package/dist/cli-bundle/chunks/{test-BQAKIXAT.js.map → test-7GVQ3VMN.js.map} +0 -0
  776. /package/dist/cli-bundle/chunks/{update-I246PCLO.js.map → update-MPGM6SBE.js.map} +0 -0
  777. /package/dist/cli-bundle/chunks/{update-36JM7YZT.js.map → update-UN75XW3C.js.map} +0 -0
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Content-field governance & utilization primitives.
3
+ *
4
+ * "Project management = context management": these primitives let agents query
5
+ * which items carry context (notes/learnings/files/docs/tests/comments/deps/
6
+ * body, plus whether a linked test carries a runnable command) and which do
7
+ * not. The surface powers content-field selection (pm list / pm update-many)
8
+ * and field-utilization reporting (pm stats --field-utilization).
9
+ *
10
+ * The module is pure: it performs no IO and imports no heavy runtime
11
+ * dependencies. Callers pass plain structural item shapes so the logic stays
12
+ * trivially testable.
13
+ */
14
+ /** The content fields an item can carry context in. */
15
+ export type ContentField = "notes" | "learnings" | "files" | "docs" | "tests" | "comments" | "deps" | "body" | "linked_command";
16
+ /** Stable rendering / iteration order for content fields. */
17
+ export declare const CONTENT_FIELD_ORDER: readonly ContentField[];
18
+ /** Minimal structural shape needed: the collection arrays + optional body. */
19
+ export interface ContentFieldItem {
20
+ notes?: unknown[];
21
+ learnings?: unknown[];
22
+ files?: unknown[];
23
+ docs?: unknown[];
24
+ tests?: unknown[];
25
+ comments?: unknown[];
26
+ dependencies?: unknown[];
27
+ body?: string;
28
+ [key: string]: unknown;
29
+ }
30
+ /**
31
+ * True when the given content field carries context on this item.
32
+ * - collection fields: `Array.isArray && length > 0`
33
+ * - "deps": maps to the `dependencies` array
34
+ * - "body": `typeof body === "string" && body.trim().length > 0`
35
+ * - "linked_command": `tests` array has at least one entry with a non-empty
36
+ * string `command`
37
+ */
38
+ export declare function isContentFieldPresent(item: ContentFieldItem, field: ContentField): boolean;
39
+ /** Per-field selection: 'present' requires the field populated, 'absent' requires it empty. */
40
+ export type ContentFieldSelection = "present" | "absent";
41
+ /** Map of content fields to a present/absent requirement. */
42
+ export type ContentFieldFilters = Partial<Record<ContentField, ContentFieldSelection>>;
43
+ /** True when at least one content-field selection is requested. */
44
+ export declare function hasContentFieldFilter(filters: ContentFieldFilters): boolean;
45
+ /**
46
+ * Does a single item satisfy the requested content-field filters?
47
+ *
48
+ * AND semantics across all requested fields: each requested field must match
49
+ * its present/absent requirement. When no filter is requested the item passes.
50
+ */
51
+ export declare function itemMatchesContentFilters(item: ContentFieldItem, filters: ContentFieldFilters): boolean;
52
+ /** Filter a list of items by the requested content-field selections. */
53
+ export declare function filterByContentFields<T extends ContentFieldItem>(items: readonly T[], filters: ContentFieldFilters): T[];
54
+ /**
55
+ * Whether a content-field filter set requires the heavy collections to be
56
+ * loaded. True when any non-body field is requested (collections + tests'
57
+ * linked command all live in the heavy front-matter arrays).
58
+ */
59
+ export declare function contentFiltersNeedCollections(filters: ContentFieldFilters): boolean;
60
+ /** Whether a content-field filter set requires the item body to be loaded. */
61
+ export declare function contentFiltersNeedBody(filters: ContentFieldFilters): boolean;
62
+ /** Utilization of a single content field: present vs total, with a rounded percent. */
63
+ export interface ContentFieldUtilization {
64
+ present: number;
65
+ total: number;
66
+ /** present/total * 100, rounded to one decimal; 100 when total is 0. */
67
+ percent: number;
68
+ }
69
+ /** Per-field utilization report for pm stats --field-utilization. */
70
+ export interface ContentFieldUtilizationReport {
71
+ total_items: number;
72
+ /** Utilization keyed by content field (includes body and linked_command). */
73
+ fields: Record<ContentField, ContentFieldUtilization>;
74
+ /** Convenience alias mirroring GH-241: identical to `fields.body`. */
75
+ body_populated: ContentFieldUtilization;
76
+ /** Items with an empty body; `present` counts the empty-bodied items. */
77
+ empty_body: ContentFieldUtilization;
78
+ }
79
+ /**
80
+ * Compute content-field utilization across a list of items. For each field we
81
+ * report how many items populate it out of the total, plus a rounded
82
+ * percentage. Convenience `body_populated`/`empty_body` aliases mirror GH-241.
83
+ */
84
+ export declare function computeContentFieldUtilization(items: readonly ContentFieldItem[]): ContentFieldUtilizationReport;
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Content-field governance & utilization primitives.
3
+ *
4
+ * "Project management = context management": these primitives let agents query
5
+ * which items carry context (notes/learnings/files/docs/tests/comments/deps/
6
+ * body, plus whether a linked test carries a runnable command) and which do
7
+ * not. The surface powers content-field selection (pm list / pm update-many)
8
+ * and field-utilization reporting (pm stats --field-utilization).
9
+ *
10
+ * The module is pure: it performs no IO and imports no heavy runtime
11
+ * dependencies. Callers pass plain structural item shapes so the logic stays
12
+ * trivially testable.
13
+ */
14
+ /** Stable rendering / iteration order for content fields. */
15
+
16
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9104a56e-e446-53c0-83fe-fcf651a45a49")}catch(e){}}();
17
+ export const CONTENT_FIELD_ORDER = [
18
+ "notes",
19
+ "learnings",
20
+ "files",
21
+ "docs",
22
+ "tests",
23
+ "comments",
24
+ "deps",
25
+ "body",
26
+ "linked_command",
27
+ ];
28
+ /** True when `value` is a non-empty array. */
29
+ function hasEntries(value) {
30
+ return Array.isArray(value) && value.length > 0;
31
+ }
32
+ /** True when the body string carries non-whitespace content. */
33
+ function hasBody(body) {
34
+ return typeof body === "string" && body.trim().length > 0;
35
+ }
36
+ /**
37
+ * True when at least one entry in the `tests` array carries a non-empty string
38
+ * `command`. Tolerant of non-object / non-string entries.
39
+ */
40
+ function hasLinkedCommand(tests) {
41
+ if (!Array.isArray(tests)) {
42
+ return false;
43
+ }
44
+ return tests.some((entry) => {
45
+ if (typeof entry !== "object" || entry === null) {
46
+ return false;
47
+ }
48
+ const command = entry.command;
49
+ return typeof command === "string" && command.trim().length > 0;
50
+ });
51
+ }
52
+ /**
53
+ * True when the given content field carries context on this item.
54
+ * - collection fields: `Array.isArray && length > 0`
55
+ * - "deps": maps to the `dependencies` array
56
+ * - "body": `typeof body === "string" && body.trim().length > 0`
57
+ * - "linked_command": `tests` array has at least one entry with a non-empty
58
+ * string `command`
59
+ */
60
+ export function isContentFieldPresent(item, field) {
61
+ switch (field) {
62
+ case "notes":
63
+ return hasEntries(item.notes);
64
+ case "learnings":
65
+ return hasEntries(item.learnings);
66
+ case "files":
67
+ return hasEntries(item.files);
68
+ case "docs":
69
+ return hasEntries(item.docs);
70
+ case "tests":
71
+ return hasEntries(item.tests);
72
+ case "comments":
73
+ return hasEntries(item.comments);
74
+ case "deps":
75
+ return hasEntries(item.dependencies);
76
+ case "body":
77
+ return hasBody(item.body);
78
+ case "linked_command":
79
+ return hasLinkedCommand(item.tests);
80
+ }
81
+ // No default: every ContentField has an explicit case above, so TypeScript
82
+ // enforces exhaustiveness here — adding a new field without a case is a
83
+ // compile error rather than a silent fall-through (and no unreachable branch
84
+ // to dent the literal-100% coverage gate).
85
+ }
86
+ /** True when at least one content-field selection is requested. */
87
+ export function hasContentFieldFilter(filters) {
88
+ return CONTENT_FIELD_ORDER.some((field) => filters[field] !== undefined);
89
+ }
90
+ /**
91
+ * Does a single item satisfy the requested content-field filters?
92
+ *
93
+ * AND semantics across all requested fields: each requested field must match
94
+ * its present/absent requirement. When no filter is requested the item passes.
95
+ */
96
+ export function itemMatchesContentFilters(item, filters) {
97
+ for (const field of CONTENT_FIELD_ORDER) {
98
+ const selection = filters[field];
99
+ if (selection === undefined) {
100
+ continue;
101
+ }
102
+ const present = isContentFieldPresent(item, field);
103
+ if (selection === "present" && !present) {
104
+ return false;
105
+ }
106
+ if (selection === "absent" && present) {
107
+ return false;
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ /** Filter a list of items by the requested content-field selections. */
113
+ export function filterByContentFields(items, filters) {
114
+ if (!hasContentFieldFilter(filters)) {
115
+ return [...items];
116
+ }
117
+ return items.filter((item) => itemMatchesContentFilters(item, filters));
118
+ }
119
+ /**
120
+ * Whether a content-field filter set requires the heavy collections to be
121
+ * loaded. True when any non-body field is requested (collections + tests'
122
+ * linked command all live in the heavy front-matter arrays).
123
+ */
124
+ export function contentFiltersNeedCollections(filters) {
125
+ return CONTENT_FIELD_ORDER.some((field) => field !== "body" && filters[field] !== undefined);
126
+ }
127
+ /** Whether a content-field filter set requires the item body to be loaded. */
128
+ export function contentFiltersNeedBody(filters) {
129
+ return filters.body !== undefined;
130
+ }
131
+ /**
132
+ * Round present/total into a one-decimal percentage. Matches the convention in
133
+ * metadata-coverage.ts: a zero population reports 100 (nothing missing).
134
+ */
135
+ function roundPercent(present, total) {
136
+ if (total === 0) {
137
+ return 100;
138
+ }
139
+ return Math.round((present / total) * 1000) / 10;
140
+ }
141
+ function emptyUtilizationFields() {
142
+ const record = {};
143
+ for (const field of CONTENT_FIELD_ORDER) {
144
+ record[field] = { present: 0, total: 0, percent: 100 };
145
+ }
146
+ return record;
147
+ }
148
+ /**
149
+ * Compute content-field utilization across a list of items. For each field we
150
+ * report how many items populate it out of the total, plus a rounded
151
+ * percentage. Convenience `body_populated`/`empty_body` aliases mirror GH-241.
152
+ */
153
+ export function computeContentFieldUtilization(items) {
154
+ const fields = emptyUtilizationFields();
155
+ const total = items.length;
156
+ for (const item of items) {
157
+ for (const field of CONTENT_FIELD_ORDER) {
158
+ if (isContentFieldPresent(item, field)) {
159
+ fields[field].present += 1;
160
+ }
161
+ }
162
+ }
163
+ for (const field of CONTENT_FIELD_ORDER) {
164
+ fields[field].total = total;
165
+ fields[field].percent = roundPercent(fields[field].present, total);
166
+ }
167
+ const bodyPopulated = fields.body;
168
+ const emptyBodyCount = total - bodyPopulated.present;
169
+ const emptyBody = {
170
+ present: emptyBodyCount,
171
+ total,
172
+ percent: roundPercent(emptyBodyCount, total),
173
+ };
174
+ return {
175
+ total_items: total,
176
+ fields,
177
+ body_populated: bodyPopulated,
178
+ empty_body: emptyBody,
179
+ };
180
+ }
181
+ //# sourceMappingURL=content-fields.js.map
182
+ //# debugId=9104a56e-e446-53c0-83fe-fcf651a45a49
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-fields.js","sources":["core/governance/content-fields.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Content-field governance & utilization primitives.\n *\n * \"Project management = context management\": these primitives let agents query\n * which items carry context (notes/learnings/files/docs/tests/comments/deps/\n * body, plus whether a linked test carries a runnable command) and which do\n * not. The surface powers content-field selection (pm list / pm update-many)\n * and field-utilization reporting (pm stats --field-utilization).\n *\n * The module is pure: it performs no IO and imports no heavy runtime\n * dependencies. Callers pass plain structural item shapes so the logic stays\n * trivially testable.\n */\n\n/** The content fields an item can carry context in. */\nexport type ContentField =\n | \"notes\"\n | \"learnings\"\n | \"files\"\n | \"docs\"\n | \"tests\"\n | \"comments\"\n | \"deps\"\n | \"body\"\n | \"linked_command\";\n\n/** Stable rendering / iteration order for content fields. */\nexport const CONTENT_FIELD_ORDER: readonly ContentField[] = [\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"tests\",\n \"comments\",\n \"deps\",\n \"body\",\n \"linked_command\",\n] as const;\n\n/** Minimal structural shape needed: the collection arrays + optional body. */\nexport interface ContentFieldItem {\n notes?: unknown[];\n learnings?: unknown[];\n files?: unknown[];\n docs?: unknown[];\n tests?: unknown[];\n comments?: unknown[];\n dependencies?: unknown[];\n body?: string;\n [key: string]: unknown;\n}\n\n/** True when `value` is a non-empty array. */\nfunction hasEntries(value: unknown): boolean {\n return Array.isArray(value) && value.length > 0;\n}\n\n/** True when the body string carries non-whitespace content. */\nfunction hasBody(body: unknown): boolean {\n return typeof body === \"string\" && body.trim().length > 0;\n}\n\n/**\n * True when at least one entry in the `tests` array carries a non-empty string\n * `command`. Tolerant of non-object / non-string entries.\n */\nfunction hasLinkedCommand(tests: unknown): boolean {\n if (!Array.isArray(tests)) {\n return false;\n }\n return tests.some((entry) => {\n if (typeof entry !== \"object\" || entry === null) {\n return false;\n }\n const command = (entry as { command?: unknown }).command;\n return typeof command === \"string\" && command.trim().length > 0;\n });\n}\n\n/**\n * True when the given content field carries context on this item.\n * - collection fields: `Array.isArray && length > 0`\n * - \"deps\": maps to the `dependencies` array\n * - \"body\": `typeof body === \"string\" && body.trim().length > 0`\n * - \"linked_command\": `tests` array has at least one entry with a non-empty\n * string `command`\n */\nexport function isContentFieldPresent(item: ContentFieldItem, field: ContentField): boolean {\n switch (field) {\n case \"notes\":\n return hasEntries(item.notes);\n case \"learnings\":\n return hasEntries(item.learnings);\n case \"files\":\n return hasEntries(item.files);\n case \"docs\":\n return hasEntries(item.docs);\n case \"tests\":\n return hasEntries(item.tests);\n case \"comments\":\n return hasEntries(item.comments);\n case \"deps\":\n return hasEntries(item.dependencies);\n case \"body\":\n return hasBody(item.body);\n case \"linked_command\":\n return hasLinkedCommand(item.tests);\n }\n // No default: every ContentField has an explicit case above, so TypeScript\n // enforces exhaustiveness here — adding a new field without a case is a\n // compile error rather than a silent fall-through (and no unreachable branch\n // to dent the literal-100% coverage gate).\n}\n\n/** Per-field selection: 'present' requires the field populated, 'absent' requires it empty. */\nexport type ContentFieldSelection = \"present\" | \"absent\";\n\n/** Map of content fields to a present/absent requirement. */\nexport type ContentFieldFilters = Partial<Record<ContentField, ContentFieldSelection>>;\n\n/** True when at least one content-field selection is requested. */\nexport function hasContentFieldFilter(filters: ContentFieldFilters): boolean {\n return CONTENT_FIELD_ORDER.some((field) => filters[field] !== undefined);\n}\n\n/**\n * Does a single item satisfy the requested content-field filters?\n *\n * AND semantics across all requested fields: each requested field must match\n * its present/absent requirement. When no filter is requested the item passes.\n */\nexport function itemMatchesContentFilters(item: ContentFieldItem, filters: ContentFieldFilters): boolean {\n for (const field of CONTENT_FIELD_ORDER) {\n const selection = filters[field];\n if (selection === undefined) {\n continue;\n }\n const present = isContentFieldPresent(item, field);\n if (selection === \"present\" && !present) {\n return false;\n }\n if (selection === \"absent\" && present) {\n return false;\n }\n }\n return true;\n}\n\n/** Filter a list of items by the requested content-field selections. */\nexport function filterByContentFields<T extends ContentFieldItem>(\n items: readonly T[],\n filters: ContentFieldFilters,\n): T[] {\n if (!hasContentFieldFilter(filters)) {\n return [...items];\n }\n return items.filter((item) => itemMatchesContentFilters(item, filters));\n}\n\n/**\n * Whether a content-field filter set requires the heavy collections to be\n * loaded. True when any non-body field is requested (collections + tests'\n * linked command all live in the heavy front-matter arrays).\n */\nexport function contentFiltersNeedCollections(filters: ContentFieldFilters): boolean {\n return CONTENT_FIELD_ORDER.some((field) => field !== \"body\" && filters[field] !== undefined);\n}\n\n/** Whether a content-field filter set requires the item body to be loaded. */\nexport function contentFiltersNeedBody(filters: ContentFieldFilters): boolean {\n return filters.body !== undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Field utilization\n// ---------------------------------------------------------------------------\n\n/** Utilization of a single content field: present vs total, with a rounded percent. */\nexport interface ContentFieldUtilization {\n present: number;\n total: number;\n /** present/total * 100, rounded to one decimal; 100 when total is 0. */\n percent: number;\n}\n\n/** Per-field utilization report for pm stats --field-utilization. */\nexport interface ContentFieldUtilizationReport {\n total_items: number;\n /** Utilization keyed by content field (includes body and linked_command). */\n fields: Record<ContentField, ContentFieldUtilization>;\n /** Convenience alias mirroring GH-241: identical to `fields.body`. */\n body_populated: ContentFieldUtilization;\n /** Items with an empty body; `present` counts the empty-bodied items. */\n empty_body: ContentFieldUtilization;\n}\n\n/**\n * Round present/total into a one-decimal percentage. Matches the convention in\n * metadata-coverage.ts: a zero population reports 100 (nothing missing).\n */\nfunction roundPercent(present: number, total: number): number {\n if (total === 0) {\n return 100;\n }\n return Math.round((present / total) * 1000) / 10;\n}\n\nfunction emptyUtilizationFields(): Record<ContentField, ContentFieldUtilization> {\n const record = {} as Record<ContentField, ContentFieldUtilization>;\n for (const field of CONTENT_FIELD_ORDER) {\n record[field] = { present: 0, total: 0, percent: 100 };\n }\n return record;\n}\n\n/**\n * Compute content-field utilization across a list of items. For each field we\n * report how many items populate it out of the total, plus a rounded\n * percentage. Convenience `body_populated`/`empty_body` aliases mirror GH-241.\n */\nexport function computeContentFieldUtilization(\n items: readonly ContentFieldItem[],\n): ContentFieldUtilizationReport {\n const fields = emptyUtilizationFields();\n const total = items.length;\n for (const item of items) {\n for (const field of CONTENT_FIELD_ORDER) {\n if (isContentFieldPresent(item, field)) {\n fields[field].present += 1;\n }\n }\n }\n for (const field of CONTENT_FIELD_ORDER) {\n fields[field].total = total;\n fields[field].percent = roundPercent(fields[field].present, total);\n }\n const bodyPopulated = fields.body;\n const emptyBodyCount = total - bodyPopulated.present;\n const emptyBody: ContentFieldUtilization = {\n present: emptyBodyCount,\n total,\n percent: roundPercent(emptyBodyCount, total),\n };\n return {\n total_items: total,\n fields,\n body_populated: bodyPopulated,\n empty_body: emptyBody,\n };\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAcH,6DAA6D;;;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D,OAAO;IACP,WAAW;IACX,OAAO;IACP,MAAM;IACN,OAAO;IACP,UAAU;IACV,MAAM;IACN,MAAM;IACN,gBAAgB;CACR,CAAC;AAeX,8CAA8C;AAC9C,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,gEAAgE;AAChE,SAAS,OAAO,CAAC,IAAa;IAC5B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAChD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,OAAO,GAAI,KAA+B,CAAC,OAAO,CAAC;QACzD,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAsB,EAAE,KAAmB;IAC/E,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,KAAK,WAAW;YACd,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,KAAK,MAAM;YACT,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,KAAK,OAAO;YACV,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,KAAK,UAAU;YACb,OAAO,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,KAAK,MAAM;YACT,OAAO,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvC,KAAK,MAAM;YACT,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,KAAK,gBAAgB;YACnB,OAAO,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,6EAA6E;IAC7E,2CAA2C;AAC7C,CAAC;AAQD,mEAAmE;AACnE,MAAM,UAAU,qBAAqB,CAAC,OAA4B;IAChE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAAsB,EAAE,OAA4B;IAC5F,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;QACxC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAAG,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACnD,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,SAAS,KAAK,QAAQ,IAAI,OAAO,EAAE,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,qBAAqB,CACnC,KAAmB,EACnB,OAA4B;IAE5B,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,OAA4B;IACxE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC;AAC/F,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,sBAAsB,CAAC,OAA4B;IACjE,OAAO,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAyBD;;;GAGG;AACH,SAAS,YAAY,CAAC,OAAe,EAAE,KAAa;IAClD,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AACnD,CAAC;AAED,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,EAAmD,CAAC;IACnE,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC5C,KAAkC;IAElC,MAAM,MAAM,GAAG,sBAAsB,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;YACxC,IAAI,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;gBACvC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;IACH,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;QAC5B,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC;IAClC,MAAM,cAAc,GAAG,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC;IACrD,MAAM,SAAS,GAA4B;QACzC,OAAO,EAAE,cAAc;QACvB,KAAK;QACL,OAAO,EAAE,YAAY,CAAC,cAAc,EAAE,KAAK,CAAC;KAC7C,CAAC;IACF,OAAO;QACL,WAAW,EAAE,KAAK;QAClB,MAAM;QACN,cAAc,EAAE,aAAa;QAC7B,UAAU,EAAE,SAAS;KACtB,CAAC;AACJ,CAAC","debugId":"9104a56e-e446-53c0-83fe-fcf651a45a49"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Logical issue-code governance primitives (GH-235).
3
+ *
4
+ * Trackers frequently adopt a title convention that embeds a logical issue
5
+ * code at the START of the title, e.g. `ISSUE-004: ...`, `BUG-12 ...`,
6
+ * `TASK-7 — ...`, `ADR-001`, `RFC-9`. When two distinct items share the same
7
+ * logical code, auditability and duplicate detection both suffer: a human or
8
+ * agent searching for "ISSUE-004" can no longer assume a single canonical item.
9
+ *
10
+ * These primitives detect that condition. They are pure: no IO, no heavy
11
+ * runtime dependencies. Callers pass plain structural item shapes so the logic
12
+ * stays trivially unit-testable.
13
+ */
14
+ /** Minimal structural shape needed to detect duplicate issue codes. */
15
+ export interface IssueCodeItem {
16
+ id: string;
17
+ title?: string | null;
18
+ }
19
+ /** A logical issue code shared by two or more items. */
20
+ export interface DuplicateIssueCode {
21
+ /** The canonical (normalized, upper-case) issue code, e.g. `ISSUE-004`. */
22
+ code: string;
23
+ /** How many items carry this code. */
24
+ count: number;
25
+ /** The ids of the items carrying this code, sorted ascending. */
26
+ ids: string[];
27
+ /** The titles of the items carrying this code, in the same order as `ids`. */
28
+ titles: string[];
29
+ }
30
+ /**
31
+ * Extract the leading logical issue code from a title, or `null` when the title
32
+ * does not begin with one. The title is trimmed and upper-cased before matching
33
+ * so case differences (`issue-004` vs `ISSUE-004`) collapse to one logical
34
+ * code; the returned code is therefore always normalized upper-case.
35
+ *
36
+ * Accepts unknown-ish input defensively (exported helper SDK consumers may call
37
+ * from untyped JS): a non-string or empty title resolves to `null`.
38
+ */
39
+ export declare function extractIssueCode(title: string | null | undefined): string | null;
40
+ /**
41
+ * Find logical issue codes used by 2+ items. Any item whose title begins with a
42
+ * conventional issue code contributes; codes used by a single item are not
43
+ * reported. Status is intentionally NOT considered — a closed item and an open
44
+ * item sharing a code still collide for audit purposes, so both are flagged.
45
+ *
46
+ * Results are deterministic: duplicate groups are sorted by code, and the
47
+ * `ids`/`titles` within each group are sorted by id. The first-seen title for a
48
+ * given (id) is used; duplicate ids (should not occur for a valid corpus) are
49
+ * de-duplicated so an item never inflates its own code's count.
50
+ */
51
+ export declare function findDuplicateIssueCodes(items: readonly IssueCodeItem[]): DuplicateIssueCode[];
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Logical issue-code governance primitives (GH-235).
3
+ *
4
+ * Trackers frequently adopt a title convention that embeds a logical issue
5
+ * code at the START of the title, e.g. `ISSUE-004: ...`, `BUG-12 ...`,
6
+ * `TASK-7 — ...`, `ADR-001`, `RFC-9`. When two distinct items share the same
7
+ * logical code, auditability and duplicate detection both suffer: a human or
8
+ * agent searching for "ISSUE-004" can no longer assume a single canonical item.
9
+ *
10
+ * These primitives detect that condition. They are pure: no IO, no heavy
11
+ * runtime dependencies. Callers pass plain structural item shapes so the logic
12
+ * stays trivially unit-testable.
13
+ */
14
+ /**
15
+ * Match a conventional leading logical issue code: an upper-case alphanumeric
16
+ * prefix (starting with a letter) followed by a `-` separator and a number, at
17
+ * the very start of the title (after optional leading whitespace).
18
+ *
19
+ * Examples that match: `ISSUE-004`, `BUG-12`, `TASK-7`, `ADR-001`, `RFC-9`,
20
+ * `GH-235`, `PM2-14`. The trailing `\b` requires the digit run to end at a word
21
+ * boundary, so `ISSUE-004-extra` extracts `ISSUE-004` while `ISSUE-004foo`
22
+ * (digit immediately followed by a letter — no boundary) does not match.
23
+ */
24
+
25
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="54a05400-cb4b-54af-990a-287fd34789f8")}catch(e){}}();
26
+ const ISSUE_CODE_PATTERN = /^([A-Z][A-Z0-9]*-\d+)\b/;
27
+ /**
28
+ * Extract the leading logical issue code from a title, or `null` when the title
29
+ * does not begin with one. The title is trimmed and upper-cased before matching
30
+ * so case differences (`issue-004` vs `ISSUE-004`) collapse to one logical
31
+ * code; the returned code is therefore always normalized upper-case.
32
+ *
33
+ * Accepts unknown-ish input defensively (exported helper SDK consumers may call
34
+ * from untyped JS): a non-string or empty title resolves to `null`.
35
+ */
36
+ export function extractIssueCode(title) {
37
+ if (typeof title !== "string") {
38
+ return null;
39
+ }
40
+ const normalized = title.trim().toUpperCase();
41
+ if (normalized.length === 0) {
42
+ return null;
43
+ }
44
+ const match = ISSUE_CODE_PATTERN.exec(normalized);
45
+ return match ? match[1] : null;
46
+ }
47
+ /**
48
+ * Find logical issue codes used by 2+ items. Any item whose title begins with a
49
+ * conventional issue code contributes; codes used by a single item are not
50
+ * reported. Status is intentionally NOT considered — a closed item and an open
51
+ * item sharing a code still collide for audit purposes, so both are flagged.
52
+ *
53
+ * Results are deterministic: duplicate groups are sorted by code, and the
54
+ * `ids`/`titles` within each group are sorted by id. The first-seen title for a
55
+ * given (id) is used; duplicate ids (should not occur for a valid corpus) are
56
+ * de-duplicated so an item never inflates its own code's count.
57
+ */
58
+ export function findDuplicateIssueCodes(items) {
59
+ const byCode = new Map();
60
+ for (const item of items) {
61
+ // A non-string title can never carry a code, so skip it before extraction;
62
+ // this also guarantees every stored title below is a real string.
63
+ if (typeof item.title !== "string") {
64
+ continue;
65
+ }
66
+ const code = extractIssueCode(item.title);
67
+ if (code === null) {
68
+ continue;
69
+ }
70
+ let entries = byCode.get(code);
71
+ if (!entries) {
72
+ entries = [];
73
+ byCode.set(code, entries);
74
+ }
75
+ if (!entries.some((entry) => entry.id === item.id)) {
76
+ entries.push({ id: item.id, title: item.title });
77
+ }
78
+ }
79
+ const duplicates = [];
80
+ for (const [code, entries] of byCode) {
81
+ if (entries.length < 2) {
82
+ continue;
83
+ }
84
+ const sorted = [...entries].sort((left, right) => left.id.localeCompare(right.id));
85
+ duplicates.push({
86
+ code,
87
+ count: sorted.length,
88
+ ids: sorted.map((entry) => entry.id),
89
+ titles: sorted.map((entry) => entry.title),
90
+ });
91
+ }
92
+ return duplicates.sort((left, right) => left.code.localeCompare(right.code));
93
+ }
94
+ //# sourceMappingURL=issue-codes.js.map
95
+ //# debugId=54a05400-cb4b-54af-990a-287fd34789f8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-codes.js","sources":["core/governance/issue-codes.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Logical issue-code governance primitives (GH-235).\n *\n * Trackers frequently adopt a title convention that embeds a logical issue\n * code at the START of the title, e.g. `ISSUE-004: ...`, `BUG-12 ...`,\n * `TASK-7 — ...`, `ADR-001`, `RFC-9`. When two distinct items share the same\n * logical code, auditability and duplicate detection both suffer: a human or\n * agent searching for \"ISSUE-004\" can no longer assume a single canonical item.\n *\n * These primitives detect that condition. They are pure: no IO, no heavy\n * runtime dependencies. Callers pass plain structural item shapes so the logic\n * stays trivially unit-testable.\n */\n\n/** Minimal structural shape needed to detect duplicate issue codes. */\nexport interface IssueCodeItem {\n id: string;\n title?: string | null;\n}\n\n/** A logical issue code shared by two or more items. */\nexport interface DuplicateIssueCode {\n /** The canonical (normalized, upper-case) issue code, e.g. `ISSUE-004`. */\n code: string;\n /** How many items carry this code. */\n count: number;\n /** The ids of the items carrying this code, sorted ascending. */\n ids: string[];\n /** The titles of the items carrying this code, in the same order as `ids`. */\n titles: string[];\n}\n\n/**\n * Match a conventional leading logical issue code: an upper-case alphanumeric\n * prefix (starting with a letter) followed by a `-` separator and a number, at\n * the very start of the title (after optional leading whitespace).\n *\n * Examples that match: `ISSUE-004`, `BUG-12`, `TASK-7`, `ADR-001`, `RFC-9`,\n * `GH-235`, `PM2-14`. The trailing `\\b` requires the digit run to end at a word\n * boundary, so `ISSUE-004-extra` extracts `ISSUE-004` while `ISSUE-004foo`\n * (digit immediately followed by a letter — no boundary) does not match.\n */\nconst ISSUE_CODE_PATTERN = /^([A-Z][A-Z0-9]*-\\d+)\\b/;\n\n/**\n * Extract the leading logical issue code from a title, or `null` when the title\n * does not begin with one. The title is trimmed and upper-cased before matching\n * so case differences (`issue-004` vs `ISSUE-004`) collapse to one logical\n * code; the returned code is therefore always normalized upper-case.\n *\n * Accepts unknown-ish input defensively (exported helper SDK consumers may call\n * from untyped JS): a non-string or empty title resolves to `null`.\n */\nexport function extractIssueCode(title: string | null | undefined): string | null {\n if (typeof title !== \"string\") {\n return null;\n }\n const normalized = title.trim().toUpperCase();\n if (normalized.length === 0) {\n return null;\n }\n const match = ISSUE_CODE_PATTERN.exec(normalized);\n return match ? match[1] : null;\n}\n\n/**\n * Find logical issue codes used by 2+ items. Any item whose title begins with a\n * conventional issue code contributes; codes used by a single item are not\n * reported. Status is intentionally NOT considered — a closed item and an open\n * item sharing a code still collide for audit purposes, so both are flagged.\n *\n * Results are deterministic: duplicate groups are sorted by code, and the\n * `ids`/`titles` within each group are sorted by id. The first-seen title for a\n * given (id) is used; duplicate ids (should not occur for a valid corpus) are\n * de-duplicated so an item never inflates its own code's count.\n */\nexport function findDuplicateIssueCodes(items: readonly IssueCodeItem[]): DuplicateIssueCode[] {\n const byCode = new Map<string, Array<{ id: string; title: string }>>();\n for (const item of items) {\n // A non-string title can never carry a code, so skip it before extraction;\n // this also guarantees every stored title below is a real string.\n if (typeof item.title !== \"string\") {\n continue;\n }\n const code = extractIssueCode(item.title);\n if (code === null) {\n continue;\n }\n let entries = byCode.get(code);\n if (!entries) {\n entries = [];\n byCode.set(code, entries);\n }\n if (!entries.some((entry) => entry.id === item.id)) {\n entries.push({ id: item.id, title: item.title });\n }\n }\n\n const duplicates: DuplicateIssueCode[] = [];\n for (const [code, entries] of byCode) {\n if (entries.length < 2) {\n continue;\n }\n const sorted = [...entries].sort((left, right) => left.id.localeCompare(right.id));\n duplicates.push({\n code,\n count: sorted.length,\n ids: sorted.map((entry) => entry.id),\n titles: sorted.map((entry) => entry.title),\n });\n }\n return duplicates.sort((left, right) => left.code.localeCompare(right.code));\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoBH;;;;;;;;;GASG;;;AACH,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAgC;IAC/D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA+B;IACrE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAgD,CAAC;IACvE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,2EAA2E;QAC3E,kEAAkE;QAClE,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACnC,SAAS;QACX,CAAC;QACD,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,SAAS;QACX,CAAC;QACD,IAAI,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAyB,EAAE,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACnF,UAAU,CAAC,IAAI,CAAC;YACd,IAAI;YACJ,KAAK,EAAE,MAAM,CAAC,MAAM;YACpB,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;SAC3C,CAAC,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/E,CAAC","debugId":"54a05400-cb4b-54af-990a-287fd34789f8"}
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Metadata governance & coverage observability primitives.
3
+ *
4
+ * One dependency-light module that powers the whole metadata-governance
5
+ * surface: missing-field selection (pm list / pm update-many), coverage
6
+ * percentages (pm stats --metadata-coverage / pm validate), and grouped
7
+ * lifecycle breakdowns (pm stats --by-assignee/--by-tag/--by-priority,
8
+ * pm aggregate explicit labels).
9
+ *
10
+ * The module is pure: it performs no IO and imports no heavy runtime
11
+ * dependencies. Lifecycle semantics are injected via a {@link LifecycleClassifier}
12
+ * so callers map their runtime status registry to lifecycle buckets while the
13
+ * pure logic here stays trivially testable with a fake classifier.
14
+ */
15
+ /** Minimal structural shape this module needs from an item's front matter. */
16
+ export interface CoverageItem {
17
+ type: string;
18
+ status: string;
19
+ assignee?: string;
20
+ tags?: string[];
21
+ parent?: string;
22
+ priority?: number;
23
+ acceptance_criteria?: string;
24
+ estimated_minutes?: number;
25
+ resolution?: string;
26
+ reviewer?: string;
27
+ risk?: string;
28
+ /** Confidence is a string-like enum or a numeric score depending on workspace. */
29
+ confidence?: string | number;
30
+ sprint?: string;
31
+ release?: string;
32
+ [key: string]: unknown;
33
+ }
34
+ /** Lifecycle buckets used by grouped breakdowns and distributions. */
35
+ export type LifecycleBucket = "open" | "in_progress" | "blocked" | "draft" | "closed" | "canceled" | "other";
36
+ /** Stable rendering order for lifecycle buckets. */
37
+ export declare const LIFECYCLE_BUCKET_ORDER: readonly LifecycleBucket[];
38
+ /**
39
+ * Classifies a raw status string into a lifecycle bucket and reports whether a
40
+ * status is terminal (closed/canceled). Callers build this from their resolved
41
+ * runtime status registry via {@link lifecycleClassifierFromStatusRegistry}.
42
+ */
43
+ export interface LifecycleClassifier {
44
+ classify(status: string): LifecycleBucket;
45
+ isTerminal(status: string): boolean;
46
+ }
47
+ /** The subset of a resolved runtime status registry this module consumes. */
48
+ export interface StatusRegistryLike {
49
+ alias_to_id: Map<string, string>;
50
+ terminal_statuses: Set<string>;
51
+ terminal_canceled_statuses: Set<string>;
52
+ blocked_statuses: Set<string>;
53
+ draft_statuses: Set<string>;
54
+ active_statuses: Set<string>;
55
+ open_status: string;
56
+ }
57
+ /**
58
+ * Adapt a resolved runtime status registry into a {@link LifecycleClassifier}.
59
+ *
60
+ * Precedence is deliberate and disjoint: canceled → closed → blocked → draft →
61
+ * open → in_progress (active but not the default open status) → other.
62
+ */
63
+ export declare function lifecycleClassifierFromStatusRegistry(registry: StatusRegistryLike): LifecycleClassifier;
64
+ /** True when an item has no non-empty acceptance_criteria. */
65
+ export declare function isAcMissing(item: CoverageItem): boolean;
66
+ /** True when an item has no finite estimated_minutes. */
67
+ export declare function isEstimateMissing(item: CoverageItem): boolean;
68
+ /**
69
+ * True when a terminal (closed/canceled) item has no non-empty resolution.
70
+ * Resolution is only expected on terminal items, so open items are never
71
+ * considered "resolution-missing".
72
+ */
73
+ export declare function isResolutionMissing(item: CoverageItem, classifier: LifecycleClassifier): boolean;
74
+ /** True when an item has no non-empty reviewer. */
75
+ export declare function isReviewerMissing(item: CoverageItem): boolean;
76
+ /** True when an item has no non-empty risk level. */
77
+ export declare function isRiskMissing(item: CoverageItem): boolean;
78
+ /**
79
+ * True when an item has no confidence value. Confidence is a string-like enum
80
+ * or a numeric score depending on workspace, so a finite number counts as
81
+ * present and only blank/absent values are treated as missing.
82
+ */
83
+ export declare function isConfidenceMissing(item: CoverageItem): boolean;
84
+ /** True when an item has no non-empty sprint. */
85
+ export declare function isSprintMissing(item: CoverageItem): boolean;
86
+ /** True when an item has no non-empty release. */
87
+ export declare function isReleaseMissing(item: CoverageItem): boolean;
88
+ /** Selection flags for {@link filterMissingMetadata}. */
89
+ export interface MissingMetadataFilters {
90
+ acMissing?: boolean;
91
+ estimatesMissing?: boolean;
92
+ resolutionMissing?: boolean;
93
+ reviewerMissing?: boolean;
94
+ riskMissing?: boolean;
95
+ confidenceMissing?: boolean;
96
+ sprintMissing?: boolean;
97
+ releaseMissing?: boolean;
98
+ /** Match items missing ANY of the tracked metadata fields (union). */
99
+ metadataMissing?: boolean;
100
+ }
101
+ /** True when any missing-metadata filter is requested. */
102
+ export declare function hasMissingMetadataFilter(filters: MissingMetadataFilters): boolean;
103
+ /**
104
+ * Does a single item satisfy the requested missing-metadata filters?
105
+ *
106
+ * Specific flags (acMissing/estimatesMissing/resolutionMissing plus the
107
+ * governance flags reviewerMissing/riskMissing/confidenceMissing/sprintMissing/
108
+ * releaseMissing) are ANDed together so callers can narrow precisely.
109
+ * `metadataMissing` is ORed in as a union shortcut for "missing any of the
110
+ * core tracked fields" (acceptance_criteria/estimated_minutes/resolution); it
111
+ * deliberately excludes the governance fields so the long-standing flag keeps
112
+ * its original meaning. When no filter is requested the item passes.
113
+ */
114
+ export declare function itemMatchesMissingMetadata(item: CoverageItem, filters: MissingMetadataFilters, classifier: LifecycleClassifier): boolean;
115
+ /** Filter a list of items by the requested missing-metadata predicates. */
116
+ export declare function filterMissingMetadata<T extends CoverageItem>(items: readonly T[], filters: MissingMetadataFilters, classifier: LifecycleClassifier): T[];
117
+ /** Coverage-tracked metadata fields. */
118
+ export type CoverageField = "acceptance_criteria" | "estimated_minutes" | "resolution" | "tags" | "parent";
119
+ /** Stable ordering of coverage fields for rendering. */
120
+ export declare const COVERAGE_FIELD_ORDER: readonly CoverageField[];
121
+ /** Coverage of a single field: present vs applicable, with a rounded percent. */
122
+ export interface FieldCoverage {
123
+ present: number;
124
+ /** Items for which the field is expected (all items, except resolution = terminal only). */
125
+ applicable: number;
126
+ /** present/applicable * 100, rounded to one decimal; 100 when applicable is 0. */
127
+ percent: number;
128
+ }
129
+ export interface MetadataCoverageReport {
130
+ overall: Record<CoverageField, FieldCoverage>;
131
+ by_type: Record<string, Record<CoverageField, FieldCoverage>>;
132
+ }
133
+ /**
134
+ * Compute metadata coverage overall and per item type. For each tracked field
135
+ * we report present/applicable counts and a rounded percentage. Resolution is
136
+ * scoped to terminal items (its only applicable population).
137
+ */
138
+ export declare function computeMetadataCoverage(items: readonly CoverageItem[], classifier: LifecycleClassifier): MetadataCoverageReport;
139
+ /** Dimensions a breakdown can group by. */
140
+ export type GroupDimension = "assignee" | "priority" | "tag" | "parent" | "type" | "status";
141
+ /** Explicit label for an empty/blank group value for a given dimension. */
142
+ export declare function emptyGroupLabel(dimension: GroupDimension): string;
143
+ export interface GroupRow {
144
+ /** Display label; explicit "(unassigned)"-style label for blank keys. */
145
+ label: string;
146
+ /** Stable structured key (null for the empty/blank group). */
147
+ key: string | null;
148
+ buckets: Record<LifecycleBucket, number>;
149
+ total: number;
150
+ }
151
+ export interface GroupedBreakdown {
152
+ dimension: GroupDimension;
153
+ rows: GroupRow[];
154
+ /** Distinct items observed (an item can contribute to multiple tag rows). */
155
+ total_items: number;
156
+ }
157
+ export interface GroupOptions {
158
+ /** For dimension="tag": only consider tags starting with this prefix. */
159
+ tagPrefix?: string;
160
+ }
161
+ /**
162
+ * Group items by a dimension into lifecycle-bucketed rows. Blank keys render
163
+ * with an explicit "(unassigned)"-style label. Rows are sorted by total
164
+ * descending, then label ascending, with the empty group sorted last on ties.
165
+ */
166
+ export declare function groupItemsByDimension(items: readonly CoverageItem[], dimension: GroupDimension, classifier: LifecycleClassifier, options?: GroupOptions): GroupedBreakdown;
167
+ /** Lifecycle-bucket distribution across all items (for stats lifecycle section). */
168
+ export declare function computeLifecycleDistribution(items: readonly CoverageItem[], classifier: LifecycleClassifier): Record<LifecycleBucket, number>;