@unbrained/pm-cli 2026.5.18 → 2026.5.27

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 (369) hide show
  1. package/CHANGELOG.md +953 -472
  2. package/README.md +4 -11
  3. package/dist/cli/bootstrap-args.d.ts +18 -1
  4. package/dist/cli/bootstrap-args.js +143 -3
  5. package/dist/cli/bootstrap-args.js.map +1 -1
  6. package/dist/cli/commander-usage.js +147 -10
  7. package/dist/cli/commander-usage.js.map +1 -1
  8. package/dist/cli/commands/annotation-command.d.ts +49 -0
  9. package/dist/cli/commands/annotation-command.js +135 -0
  10. package/dist/cli/commands/annotation-command.js.map +1 -0
  11. package/dist/cli/commands/append.js +5 -8
  12. package/dist/cli/commands/append.js.map +1 -1
  13. package/dist/cli/commands/calendar.js +3 -6
  14. package/dist/cli/commands/calendar.js.map +1 -1
  15. package/dist/cli/commands/claim.js +15 -24
  16. package/dist/cli/commands/claim.js.map +1 -1
  17. package/dist/cli/commands/close.js +63 -10
  18. package/dist/cli/commands/close.js.map +1 -1
  19. package/dist/cli/commands/comments.d.ts +5 -0
  20. package/dist/cli/commands/comments.js +27 -117
  21. package/dist/cli/commands/comments.js.map +1 -1
  22. package/dist/cli/commands/completion.d.ts +2 -2
  23. package/dist/cli/commands/completion.js +203 -63
  24. package/dist/cli/commands/completion.js.map +1 -1
  25. package/dist/cli/commands/config.d.ts +1 -1
  26. package/dist/cli/commands/config.js +82 -4
  27. package/dist/cli/commands/config.js.map +1 -1
  28. package/dist/cli/commands/context.js +4 -10
  29. package/dist/cli/commands/context.js.map +1 -1
  30. package/dist/cli/commands/contracts.js +168 -36
  31. package/dist/cli/commands/contracts.js.map +1 -1
  32. package/dist/cli/commands/create.js +53 -313
  33. package/dist/cli/commands/create.js.map +1 -1
  34. package/dist/cli/commands/dedupe-audit.js +7 -4
  35. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  36. package/dist/cli/commands/delete.d.ts +3 -0
  37. package/dist/cli/commands/delete.js +11 -9
  38. package/dist/cli/commands/delete.js.map +1 -1
  39. package/dist/cli/commands/docs.d.ts +2 -12
  40. package/dist/cli/commands/docs.js +8 -316
  41. package/dist/cli/commands/docs.js.map +1 -1
  42. package/dist/cli/commands/event-validation-messages.d.ts +3 -0
  43. package/dist/cli/commands/event-validation-messages.js +44 -0
  44. package/dist/cli/commands/event-validation-messages.js.map +1 -0
  45. package/dist/cli/commands/extension/bundled-catalog.d.ts +14 -0
  46. package/dist/cli/commands/extension/bundled-catalog.js +268 -0
  47. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -0
  48. package/dist/cli/commands/extension/doctor.d.ts +31 -0
  49. package/dist/cli/commands/extension/doctor.js +345 -0
  50. package/dist/cli/commands/extension/doctor.js.map +1 -0
  51. package/dist/cli/commands/extension/install-sources.d.ts +37 -0
  52. package/dist/cli/commands/extension/install-sources.js +384 -0
  53. package/dist/cli/commands/extension/install-sources.js.map +1 -0
  54. package/dist/cli/commands/extension/managed-state.d.ts +48 -0
  55. package/dist/cli/commands/extension/managed-state.js +172 -0
  56. package/dist/cli/commands/extension/managed-state.js.map +1 -0
  57. package/dist/cli/commands/extension/scaffold.d.ts +14 -0
  58. package/dist/cli/commands/extension/scaffold.js +169 -0
  59. package/dist/cli/commands/extension/scaffold.js.map +1 -0
  60. package/dist/cli/commands/extension/shared.d.ts +14 -0
  61. package/dist/cli/commands/extension/shared.js +106 -0
  62. package/dist/cli/commands/extension/shared.js.map +1 -0
  63. package/dist/cli/commands/extension.d.ts +37 -68
  64. package/dist/cli/commands/extension.js +157 -1319
  65. package/dist/cli/commands/extension.js.map +1 -1
  66. package/dist/cli/commands/files.d.ts +1 -12
  67. package/dist/cli/commands/files.js +14 -318
  68. package/dist/cli/commands/files.js.map +1 -1
  69. package/dist/cli/commands/gc.js +17 -4
  70. package/dist/cli/commands/gc.js.map +1 -1
  71. package/dist/cli/commands/get.d.ts +3 -2
  72. package/dist/cli/commands/get.js +52 -9
  73. package/dist/cli/commands/get.js.map +1 -1
  74. package/dist/cli/commands/health.d.ts +10 -0
  75. package/dist/cli/commands/health.js +269 -76
  76. package/dist/cli/commands/health.js.map +1 -1
  77. package/dist/cli/commands/history-redact.d.ts +8 -0
  78. package/dist/cli/commands/history-redact.js +35 -113
  79. package/dist/cli/commands/history-redact.js.map +1 -1
  80. package/dist/cli/commands/history-repair.d.ts +33 -0
  81. package/dist/cli/commands/history-repair.js +172 -0
  82. package/dist/cli/commands/history-repair.js.map +1 -0
  83. package/dist/cli/commands/history.d.ts +4 -4
  84. package/dist/cli/commands/history.js +10 -88
  85. package/dist/cli/commands/history.js.map +1 -1
  86. package/dist/cli/commands/index.d.ts +3 -1
  87. package/dist/cli/commands/index.js +5 -3
  88. package/dist/cli/commands/index.js.map +1 -1
  89. package/dist/cli/commands/init.d.ts +28 -0
  90. package/dist/cli/commands/init.js +23 -2
  91. package/dist/cli/commands/init.js.map +1 -1
  92. package/dist/cli/commands/learnings.js +20 -119
  93. package/dist/cli/commands/learnings.js.map +1 -1
  94. package/dist/cli/commands/legacy-none-tokens.d.ts +3 -0
  95. package/dist/cli/commands/legacy-none-tokens.js +39 -0
  96. package/dist/cli/commands/legacy-none-tokens.js.map +1 -0
  97. package/dist/cli/commands/linked-artifacts.d.ts +96 -0
  98. package/dist/cli/commands/linked-artifacts.js +335 -0
  99. package/dist/cli/commands/linked-artifacts.js.map +1 -0
  100. package/dist/cli/commands/linked-test-entry.d.ts +3 -0
  101. package/dist/cli/commands/linked-test-entry.js +62 -0
  102. package/dist/cli/commands/linked-test-entry.js.map +1 -0
  103. package/dist/cli/commands/linked-test-parsers.d.ts +28 -0
  104. package/dist/cli/commands/linked-test-parsers.js +192 -0
  105. package/dist/cli/commands/linked-test-parsers.js.map +1 -0
  106. package/dist/cli/commands/list.js +49 -24
  107. package/dist/cli/commands/list.js.map +1 -1
  108. package/dist/cli/commands/normalize.js +4 -3
  109. package/dist/cli/commands/normalize.js.map +1 -1
  110. package/dist/cli/commands/notes.js +20 -119
  111. package/dist/cli/commands/notes.js.map +1 -1
  112. package/dist/cli/commands/plan.d.ts +3 -0
  113. package/dist/cli/commands/plan.js +184 -22
  114. package/dist/cli/commands/plan.js.map +1 -1
  115. package/dist/cli/commands/recurrence-parsers.d.ts +26 -0
  116. package/dist/cli/commands/recurrence-parsers.js +98 -0
  117. package/dist/cli/commands/recurrence-parsers.js.map +1 -0
  118. package/dist/cli/commands/restore.js +24 -56
  119. package/dist/cli/commands/restore.js.map +1 -1
  120. package/dist/cli/commands/schema.d.ts +31 -0
  121. package/dist/cli/commands/schema.js +98 -0
  122. package/dist/cli/commands/schema.js.map +1 -0
  123. package/dist/cli/commands/search.js +154 -42
  124. package/dist/cli/commands/search.js.map +1 -1
  125. package/dist/cli/commands/templates.d.ts +4 -0
  126. package/dist/cli/commands/templates.js +89 -17
  127. package/dist/cli/commands/templates.js.map +1 -1
  128. package/dist/cli/commands/test/linked-command-detection.d.ts +37 -0
  129. package/dist/cli/commands/test/linked-command-detection.js +200 -0
  130. package/dist/cli/commands/test/linked-command-detection.js.map +1 -0
  131. package/dist/cli/commands/test-all.js +4 -8
  132. package/dist/cli/commands/test-all.js.map +1 -1
  133. package/dist/cli/commands/test.d.ts +2 -2
  134. package/dist/cli/commands/test.js +12 -357
  135. package/dist/cli/commands/test.js.map +1 -1
  136. package/dist/cli/commands/update-many.js +6 -9
  137. package/dist/cli/commands/update-many.js.map +1 -1
  138. package/dist/cli/commands/update.js +167 -401
  139. package/dist/cli/commands/update.js.map +1 -1
  140. package/dist/cli/commands/validate.d.ts +3 -1
  141. package/dist/cli/commands/validate.js +23 -71
  142. package/dist/cli/commands/validate.js.map +1 -1
  143. package/dist/cli/error-guidance.d.ts +1 -0
  144. package/dist/cli/error-guidance.js +100 -6
  145. package/dist/cli/error-guidance.js.map +1 -1
  146. package/dist/cli/extension-command-help.d.ts +0 -1
  147. package/dist/cli/extension-command-help.js +2 -13
  148. package/dist/cli/extension-command-help.js.map +1 -1
  149. package/dist/cli/extension-command-options.d.ts +1 -0
  150. package/dist/cli/extension-command-options.js +106 -7
  151. package/dist/cli/extension-command-options.js.map +1 -1
  152. package/dist/cli/help-content.d.ts +0 -1
  153. package/dist/cli/help-content.js +13 -9
  154. package/dist/cli/help-content.js.map +1 -1
  155. package/dist/cli/help-json-payload.d.ts +1 -0
  156. package/dist/cli/help-json-payload.js +33 -3
  157. package/dist/cli/help-json-payload.js.map +1 -1
  158. package/dist/cli/main.d.ts +11 -0
  159. package/dist/cli/main.js +109 -55
  160. package/dist/cli/main.js.map +1 -1
  161. package/dist/cli/register-list-query.d.ts +5 -2
  162. package/dist/cli/register-list-query.js +254 -192
  163. package/dist/cli/register-list-query.js.map +1 -1
  164. package/dist/cli/register-mutation.d.ts +1 -1
  165. package/dist/cli/register-mutation.js +247 -64
  166. package/dist/cli/register-mutation.js.map +1 -1
  167. package/dist/cli/register-operations.js +17 -12
  168. package/dist/cli/register-operations.js.map +1 -1
  169. package/dist/cli/register-setup.js +33 -16
  170. package/dist/cli/register-setup.js.map +1 -1
  171. package/dist/cli/registration-helpers.d.ts +0 -2
  172. package/dist/cli/registration-helpers.js +14 -40
  173. package/dist/cli/registration-helpers.js.map +1 -1
  174. package/dist/cli.js +25 -4
  175. package/dist/cli.js.map +1 -1
  176. package/dist/core/config/positional-value.d.ts +44 -0
  177. package/dist/core/config/positional-value.js +109 -0
  178. package/dist/core/config/positional-value.js.map +1 -0
  179. package/dist/core/extensions/extension-capability-aliases.d.ts +14 -0
  180. package/dist/core/extensions/extension-capability-aliases.js +159 -0
  181. package/dist/core/extensions/extension-capability-aliases.js.map +1 -0
  182. package/dist/core/extensions/extension-hook-runtime.d.ts +13 -0
  183. package/dist/core/extensions/extension-hook-runtime.js +414 -0
  184. package/dist/core/extensions/extension-hook-runtime.js.map +1 -0
  185. package/dist/core/extensions/extension-policy.d.ts +69 -0
  186. package/dist/core/extensions/extension-policy.js +481 -0
  187. package/dist/core/extensions/extension-policy.js.map +1 -0
  188. package/dist/core/extensions/extension-registries.d.ts +8 -0
  189. package/dist/core/extensions/extension-registries.js +52 -0
  190. package/dist/core/extensions/extension-registries.js.map +1 -0
  191. package/dist/core/extensions/extension-runtime-helpers.d.ts +6 -0
  192. package/dist/core/extensions/extension-runtime-helpers.js +29 -0
  193. package/dist/core/extensions/extension-runtime-helpers.js.map +1 -0
  194. package/dist/core/extensions/extension-types.d.ts +13 -39
  195. package/dist/core/extensions/extension-types.js +34 -2
  196. package/dist/core/extensions/extension-types.js.map +1 -1
  197. package/dist/core/extensions/index.d.ts +7 -1
  198. package/dist/core/extensions/index.js +11 -14
  199. package/dist/core/extensions/index.js.map +1 -1
  200. package/dist/core/extensions/loader.d.ts +4 -22
  201. package/dist/core/extensions/loader.js +23 -1146
  202. package/dist/core/extensions/loader.js.map +1 -1
  203. package/dist/core/fs/path-utils.d.ts +1 -0
  204. package/dist/core/fs/path-utils.js +12 -0
  205. package/dist/core/fs/path-utils.js.map +1 -0
  206. package/dist/core/history/drift-scan.d.ts +22 -0
  207. package/dist/core/history/drift-scan.js +149 -0
  208. package/dist/core/history/drift-scan.js.map +1 -0
  209. package/dist/core/history/history-rewrite.d.ts +43 -0
  210. package/dist/core/history/history-rewrite.js +48 -0
  211. package/dist/core/history/history-rewrite.js.map +1 -0
  212. package/dist/core/history/history.js +5 -4
  213. package/dist/core/history/history.js.map +1 -1
  214. package/dist/core/history/replay.d.ts +82 -0
  215. package/dist/core/history/replay.js +250 -0
  216. package/dist/core/history/replay.js.map +1 -0
  217. package/dist/core/item/item-format.js +11 -8
  218. package/dist/core/item/item-format.js.map +1 -1
  219. package/dist/core/item/item-record.d.ts +19 -0
  220. package/dist/core/item/item-record.js +24 -0
  221. package/dist/core/item/item-record.js.map +1 -0
  222. package/dist/core/item/item-type-definition.d.ts +52 -0
  223. package/dist/core/item/item-type-definition.js +123 -0
  224. package/dist/core/item/item-type-definition.js.map +1 -0
  225. package/dist/core/item/parse.js +3 -2
  226. package/dist/core/item/parse.js.map +1 -1
  227. package/dist/core/item/priority.d.ts +23 -0
  228. package/dist/core/item/priority.js +55 -0
  229. package/dist/core/item/priority.js.map +1 -0
  230. package/dist/core/item/status.d.ts +14 -1
  231. package/dist/core/item/status.js +22 -2
  232. package/dist/core/item/status.js.map +1 -1
  233. package/dist/core/item/toon-decode.d.ts +19 -0
  234. package/dist/core/item/toon-decode.js +69 -0
  235. package/dist/core/item/toon-decode.js.map +1 -0
  236. package/dist/core/item/type-registry.js +13 -84
  237. package/dist/core/item/type-registry.js.map +1 -1
  238. package/dist/core/output/mutation-projection.d.ts +31 -0
  239. package/dist/core/output/mutation-projection.js +103 -0
  240. package/dist/core/output/mutation-projection.js.map +1 -0
  241. package/dist/core/output/output.d.ts +2 -0
  242. package/dist/core/output/output.js +5 -3
  243. package/dist/core/output/output.js.map +1 -1
  244. package/dist/core/packages/manifest.js +3 -9
  245. package/dist/core/packages/manifest.js.map +1 -1
  246. package/dist/core/schema/item-types-file.d.ts +85 -0
  247. package/dist/core/schema/item-types-file.js +243 -0
  248. package/dist/core/schema/item-types-file.js.map +1 -0
  249. package/dist/core/schema/runtime-schema.d.ts +2 -1
  250. package/dist/core/schema/runtime-schema.js +17 -45
  251. package/dist/core/schema/runtime-schema.js.map +1 -1
  252. package/dist/core/search/semantic-defaults.js +3 -3
  253. package/dist/core/search/semantic-defaults.js.map +1 -1
  254. package/dist/core/search/vector-stores.js +46 -9
  255. package/dist/core/search/vector-stores.js.map +1 -1
  256. package/dist/core/sentry/helpers.d.ts +1 -1
  257. package/dist/core/sentry/helpers.js +20 -3
  258. package/dist/core/sentry/helpers.js.map +1 -1
  259. package/dist/core/shared/author.d.ts +1 -0
  260. package/dist/core/shared/author.js +9 -0
  261. package/dist/core/shared/author.js.map +1 -0
  262. package/dist/core/shared/command-types.d.ts +1 -0
  263. package/dist/core/shared/command-types.js +2 -2
  264. package/dist/core/shared/command-types.js.map +1 -1
  265. package/dist/core/shared/constants.d.ts +10 -1
  266. package/dist/core/shared/constants.js +56 -58
  267. package/dist/core/shared/constants.js.map +1 -1
  268. package/dist/core/shared/lazy-module.d.ts +1 -0
  269. package/dist/core/shared/lazy-module.js +11 -0
  270. package/dist/core/shared/lazy-module.js.map +1 -0
  271. package/dist/core/shared/option-alias-visibility.d.ts +44 -0
  272. package/dist/core/shared/option-alias-visibility.js +76 -0
  273. package/dist/core/shared/option-alias-visibility.js.map +1 -0
  274. package/dist/core/shared/primitives.d.ts +23 -0
  275. package/dist/core/shared/primitives.js +39 -2
  276. package/dist/core/shared/primitives.js.map +1 -1
  277. package/dist/core/shared/text-normalization.d.ts +0 -1
  278. package/dist/core/shared/text-normalization.js +2 -5
  279. package/dist/core/shared/text-normalization.js.map +1 -1
  280. package/dist/core/store/front-matter-cache.d.ts +16 -2
  281. package/dist/core/store/front-matter-cache.js +99 -33
  282. package/dist/core/store/front-matter-cache.js.map +1 -1
  283. package/dist/core/store/item-store.d.ts +2 -0
  284. package/dist/core/store/item-store.js +76 -110
  285. package/dist/core/store/item-store.js.map +1 -1
  286. package/dist/core/store/settings-validator.d.ts +106 -0
  287. package/dist/core/store/settings-validator.js +279 -0
  288. package/dist/core/store/settings-validator.js.map +1 -0
  289. package/dist/core/store/settings.js +6 -343
  290. package/dist/core/store/settings.js.map +1 -1
  291. package/dist/core/telemetry/runtime.js +5 -3
  292. package/dist/core/telemetry/runtime.js.map +1 -1
  293. package/dist/mcp/server.js +138 -39
  294. package/dist/mcp/server.js.map +1 -1
  295. package/dist/sdk/cli-contracts/enum-contracts.d.ts +20 -0
  296. package/dist/sdk/cli-contracts/enum-contracts.js +156 -0
  297. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -0
  298. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +14 -0
  299. package/dist/sdk/cli-contracts/tool-option-contracts.js +243 -0
  300. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -0
  301. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +11 -0
  302. package/dist/sdk/cli-contracts/tool-parameter-tables.js +901 -0
  303. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -0
  304. package/dist/sdk/cli-contracts.d.ts +18 -33
  305. package/dist/sdk/cli-contracts.js +96 -1238
  306. package/dist/sdk/cli-contracts.js.map +1 -1
  307. package/dist/sdk/package-import-adapters.d.ts +74 -0
  308. package/dist/sdk/package-import-adapters.js +186 -0
  309. package/dist/sdk/package-import-adapters.js.map +1 -0
  310. package/dist/sdk/package-runtime-options.d.ts +26 -0
  311. package/dist/sdk/package-runtime-options.js +71 -0
  312. package/dist/sdk/package-runtime-options.js.map +1 -0
  313. package/dist/sdk/runtime.d.ts +27 -1
  314. package/dist/sdk/runtime.js +48 -3
  315. package/dist/sdk/runtime.js.map +1 -1
  316. package/dist/types.d.ts +6 -0
  317. package/dist/types.js +10 -2
  318. package/dist/types.js.map +1 -1
  319. package/docs/AGENT_GUIDE.md +13 -11
  320. package/docs/ARCHITECTURE.md +1 -1
  321. package/docs/CLAUDE_CODE_PLUGIN.md +5 -28
  322. package/docs/CODEX_PLUGIN.md +5 -5
  323. package/docs/COMMANDS.md +58 -9
  324. package/docs/CONFIGURATION.md +16 -1
  325. package/docs/EXTENSIONS.md +4 -63
  326. package/docs/RELEASING.md +12 -8
  327. package/docs/SDK.md +11 -2
  328. package/marketplace.json +7 -3
  329. package/package.json +18 -14
  330. package/packages/pm-beads/extensions/beads/index.js +2 -49
  331. package/packages/pm-beads/extensions/beads/index.ts +2 -54
  332. package/packages/pm-beads/extensions/beads/runtime-loader.js +86 -0
  333. package/packages/pm-beads/extensions/beads/runtime-loader.ts +88 -0
  334. package/packages/pm-beads/extensions/beads/runtime.js +26 -115
  335. package/packages/pm-beads/extensions/beads/runtime.ts +33 -132
  336. package/packages/pm-calendar/README.md +3 -1
  337. package/packages/pm-calendar/extensions/calendar/index.js +66 -2
  338. package/packages/pm-calendar/extensions/calendar/index.ts +71 -2
  339. package/packages/pm-calendar/extensions/calendar/runtime.js +1 -0
  340. package/packages/pm-calendar/extensions/calendar/runtime.ts +1 -0
  341. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +14 -41
  342. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +25 -41
  343. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +10 -50
  344. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +17 -50
  345. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +8 -40
  346. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +10 -40
  347. package/packages/pm-search-advanced/README.md +8 -0
  348. package/packages/pm-search-advanced/extensions/search-advanced/index.js +75 -1
  349. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +74 -0
  350. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +58 -33
  351. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +60 -33
  352. package/packages/pm-templates/extensions/templates/runtime.js +11 -202
  353. package/packages/pm-templates/extensions/templates/runtime.ts +38 -230
  354. package/packages/pm-todos/extensions/todos/index.js +3 -50
  355. package/packages/pm-todos/extensions/todos/index.ts +3 -55
  356. package/packages/pm-todos/extensions/todos/runtime-loader.js +86 -0
  357. package/packages/pm-todos/extensions/todos/runtime-loader.ts +88 -0
  358. package/packages/pm-todos/extensions/todos/runtime.js +24 -117
  359. package/packages/pm-todos/extensions/todos/runtime.ts +32 -129
  360. package/plugins/pm-claude/README.md +2 -2
  361. package/plugins/pm-claude/commands/pm-planner.md +1 -15
  362. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +5 -2
  363. package/plugins/pm-claude/skills/pm-planner/SKILL.md +3 -21
  364. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +15 -6
  365. package/plugins/pm-codex/skills/pm-native/SKILL.md +1 -13
  366. package/PRD.md +0 -1734
  367. package/dist/core/output/command-aware.d.ts +0 -1
  368. package/dist/core/output/command-aware.js +0 -397
  369. package/dist/core/output/command-aware.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- !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]="f31aa5f9-6785-5b5e-9c34-167ef6e9f543")}catch(e){}}();
2
+ !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]="b3284398-1103-5eb4-9c3d-028c20dfa304")}catch(e){}}();
3
3
  import { EXIT_CODE } from "../../core/shared/constants.js";
4
4
  import { PmCliError } from "../../core/shared/errors.js";
5
5
  import { ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, SEARCH_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "../../sdk/cli-contracts.js";
@@ -29,9 +29,10 @@ const PLAN_SUBCOMMANDS_LIST = "create show add-step update-step complete-step bl
29
29
  const COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);
30
30
  const COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;
31
31
  const GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());
32
- const MUTATION_FLAGS = "--author --message --force --json --quiet --path --no-extensions --no-pager --profile --help";
33
- const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --force --json --quiet --path --no-extensions --no-pager --profile --help";
34
- const RELEASE_MUTATION_FLAGS = "--allow-audit-release --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help";
32
+ const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help";
33
+ const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help";
34
+ const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help";
35
+ const RELEASE_MUTATION_FLAGS = "--allow-audit-release --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help";
35
36
  const GLOBAL_FLAGS = GLOBAL_FLAG_CONTRACTS.flatMap((entry) => [entry.short, entry.flag])
36
37
  .filter((value) => Boolean(value))
37
38
  .join(" ");
@@ -44,6 +45,33 @@ function mergeFlagStrings(baseFlags, runtimeFlags) {
44
45
  const merged = [...baseFlags.split(/\s+/u).filter((value) => value.length > 0), ...(runtimeFlags ?? [])];
45
46
  return joinCompletionValues(merged);
46
47
  }
48
+ function normalizeRuntimeCompletionFlags(runtimeFlags) {
49
+ const normalized = (runtimeFlags ?? [])
50
+ .map((value) => value.trim())
51
+ .filter((value) => value.startsWith("--") && value.length > 2)
52
+ .map((value) => `--${value.slice(2).replaceAll("_", "-")}`);
53
+ return [...new Set(normalized)].sort((left, right) => left.localeCompare(right));
54
+ }
55
+ function renderZshRuntimeFieldFlagSpecs(runtimeFlags) {
56
+ const normalized = normalizeRuntimeCompletionFlags(runtimeFlags);
57
+ if (normalized.length === 0) {
58
+ return "";
59
+ }
60
+ return `${normalized.map((flag) => ` '${flag}[Runtime schema field flag]:value' \\`).join("\n")}\n`;
61
+ }
62
+ function renderFishRuntimeFieldFlagSpecs(commands, runtimeFlags) {
63
+ const normalizedFlags = normalizeRuntimeCompletionFlags(runtimeFlags).map((flag) => flag.slice(2));
64
+ if (commands.length === 0 || normalizedFlags.length === 0) {
65
+ return "";
66
+ }
67
+ const lines = [];
68
+ for (const command of commands) {
69
+ for (const flag of normalizedFlags) {
70
+ lines.push(`complete -c pm -n '__fish_seen_subcommand_from ${command}' -l ${flag} -d 'Runtime schema field flag' -r`);
71
+ }
72
+ }
73
+ return `${lines.join("\n")}\n`;
74
+ }
47
75
  export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], eagerTagExpansion = false, runtime = {}) {
48
76
  const cmds = ALL_COMMANDS.join(" ");
49
77
  const typeValues = itemTypes.join(" ");
@@ -119,10 +147,10 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
119
147
  ` COMPREPLY=(${compgen(listFlags)})`,
120
148
  " ;;",
121
149
  " aggregate)",
122
- ` COMPREPLY=(${compgen("--group-by --count --include-unparented --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help")})`,
150
+ ` COMPREPLY=(${compgen("--group-by --count --include-unparented --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
123
151
  " ;;",
124
152
  " dedupe-audit)",
125
- ` COMPREPLY=(${compgen("--mode --limit --threshold --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --path --no-extensions --no-pager --profile --help")})`,
153
+ ` COMPREPLY=(${compgen("--mode --limit --threshold --status --type --tag --priority --deadline-before --deadline-after --assignee --assignee-filter --parent --sprint --release --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
126
154
  " ;;",
127
155
  " create)",
128
156
  ` COMPREPLY=(${compgen(createFlags)})`,
@@ -149,34 +177,34 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
149
177
  ` COMPREPLY=(${compgen(searchFlags)})`,
150
178
  " ;;",
151
179
  " reindex)",
152
- ` COMPREPLY=(${compgen("--mode --progress --json --quiet --path --no-extensions --no-pager --profile --help")})`,
180
+ ` COMPREPLY=(${compgen("--mode --progress --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
153
181
  " ;;",
154
182
  " init)",
155
- ` COMPREPLY=(${compgen(`${INIT_FLAGS} --json --quiet --path --no-extensions --no-pager --profile --help`)})`,
183
+ ` COMPREPLY=(${compgen(`${INIT_FLAGS} --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help`)})`,
156
184
  " ;;",
157
185
  " config)",
158
- ` COMPREPLY=(${compgen("--criterion --clear-criteria --format --policy --json --quiet --path --no-extensions --no-pager --profile --help")})`,
186
+ ` COMPREPLY=(${compgen("--criterion --clear-criteria --format --policy --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
159
187
  " ;;",
160
188
  " extension)",
161
- ` COMPREPLY=(${compgen("init scaffold install uninstall explore manage reload doctor adopt adopt-all activate deactivate --init --scaffold --install --uninstall --explore --manage --reload --watch --doctor --adopt --adopt-all --activate --deactivate --project --local --global --gh --github --ref --detail --trace --runtime-probe --fix-managed-state --strict-exit --fail-on-warn --json --quiet --path --no-extensions --no-pager --profile --help")})`,
189
+ ` COMPREPLY=(${compgen("init scaffold install uninstall explore manage reload doctor adopt adopt-all activate deactivate --init --scaffold --install --uninstall --explore --manage --reload --watch --doctor --adopt --adopt-all --activate --deactivate --project --local --global --gh --github --ref --detail --trace --runtime-probe --fix-managed-state --strict-exit --fail-on-warn --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
162
190
  " ;;",
163
191
  " comments)",
164
- ` COMPREPLY=(${compgen("--add --stdin --file --limit --author --message --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
192
+ ` COMPREPLY=(${compgen("--add --stdin --file --limit --author --message --allow-audit-comment --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
165
193
  " ;;",
166
194
  " comments-audit)",
167
- ` COMPREPLY=(${compgen("--status --type --tag --priority --parent --sprint --release --assignee --assignee-filter --limit-items --limit --full-history --latest --json --quiet --path --no-extensions --no-pager --profile --help")})`,
195
+ ` COMPREPLY=(${compgen("--status --type --tag --priority --parent --sprint --release --assignee --assignee-filter --limit-items --limit --full-history --latest --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
168
196
  " ;;",
169
197
  " notes)",
170
- ` COMPREPLY=(${compgen("--add --limit --author --message --allow-audit-note --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
198
+ ` COMPREPLY=(${compgen("--add --limit --author --message --allow-audit-note --allow-audit-comment --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
171
199
  " ;;",
172
200
  " learnings)",
173
- ` COMPREPLY=(${compgen("--add --limit --author --message --allow-audit-learning --allow-audit-comment --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
201
+ ` COMPREPLY=(${compgen("--add --limit --author --message --allow-audit-learning --allow-audit-comment --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
174
202
  " ;;",
175
203
  " files)",
176
- ` COMPREPLY=(${compgen("discover --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
204
+ ` COMPREPLY=(${compgen("discover --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --audit --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
177
205
  " ;;",
178
206
  " docs)",
179
- ` COMPREPLY=(${compgen("--add --add-glob --remove --migrate --validate-paths --audit --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
207
+ ` COMPREPLY=(${compgen("--add --add-glob --remove --migrate --validate-paths --audit --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
180
208
  " ;;",
181
209
  " append)",
182
210
  ` COMPREPLY=(${compgen(APPEND_FLAGS)})`,
@@ -185,25 +213,34 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
185
213
  ` COMPREPLY=(${compgen(DEPS_FLAGS)})`,
186
214
  " ;;",
187
215
  " test)",
188
- ` COMPREPLY=(${compgen("--add --remove --run --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
216
+ ` COMPREPLY=(${compgen("--add --remove --run --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
189
217
  " ;;",
190
218
  " test-all)",
191
- ` COMPREPLY=(${compgen("--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --path --no-extensions --no-pager --profile --help")})`,
219
+ ` COMPREPLY=(${compgen("--status --limit --offset --background --timeout --progress --env-set --env-clear --shared-host-safe --pm-context --override-linked-pm-context --fail-on-context-mismatch --fail-on-skipped --fail-on-empty-test-run --require-assertions-for-pm --check-context --auto-pm-context --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
192
220
  " ;;",
193
221
  " test-runs)",
194
- ` COMPREPLY=(${compgen("list status logs stop resume --status --limit --stream --tail --force --author --json --quiet --path --no-extensions --no-pager --profile --help")})`,
222
+ ` COMPREPLY=(${compgen("list status logs stop resume --status --limit --stream --tail --force --author --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
195
223
  " ;;",
196
224
  " validate)",
197
- ` COMPREPLY=(${compgen("--check-metadata --metadata-profile --check-resolution --check-lifecycle --check-stale-blockers --dependency-cycle-severity --check-files --scan-mode --include-pm-internals --verbose-file-lists --strict-exit --fail-on-warn --check-history-drift --check-command-references --json --quiet --path --no-extensions --no-pager --profile --help")})`,
225
+ ` COMPREPLY=(${compgen("--check-metadata --metadata-profile --check-resolution --check-lifecycle --check-stale-blockers --dependency-cycle-severity --check-files --scan-mode --include-pm-internals --verbose-file-lists --strict-exit --fail-on-warn --check-history-drift --check-command-references --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
198
226
  " ;;",
199
227
  " health)",
200
228
  ` COMPREPLY=(${compgen(HEALTH_FLAGS)})`,
201
229
  " ;;",
202
230
  " history)",
203
- ` COMPREPLY=(${compgen("--limit --diff --verify --json --quiet --path --no-extensions --no-pager --profile --help")})`,
231
+ ` COMPREPLY=(${compgen("--limit --compact --full --diff --verify --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
232
+ " ;;",
233
+ " get)",
234
+ ` COMPREPLY=(${compgen("--depth --full --fields --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
204
235
  " ;;",
205
236
  " history-redact)",
206
- ` COMPREPLY=(${compgen("--literal --regex --replacement --dry-run --author --message --force --json --quiet --path --no-extensions --no-pager --profile --help")})`,
237
+ ` COMPREPLY=(${compgen("--literal --regex --replacement --dry-run --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
238
+ " ;;",
239
+ " history-repair)",
240
+ ` COMPREPLY=(${compgen("--dry-run --author --message --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
241
+ " ;;",
242
+ " schema)",
243
+ ` COMPREPLY=(${compgen("add-type --description --default-status --folder --alias --author --force --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
207
244
  " ;;",
208
245
  " plan)",
209
246
  ` COMPREPLY=(${compgen(`${PLAN_SUBCOMMANDS_LIST} ${PLAN_FLAGS}`)})`,
@@ -215,7 +252,7 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
215
252
  ` COMPREPLY=(${compgen(CONTRACTS_FLAGS)})`,
216
253
  " ;;",
217
254
  " gc)",
218
- ` COMPREPLY=(${compgen("--dry-run --scope --json --quiet --path --no-extensions --no-pager --profile --help")})`,
255
+ ` COMPREPLY=(${compgen("--dry-run --scope --json --quiet --no-changed-fields --path --no-extensions --no-pager --profile --help")})`,
219
256
  " ;;",
220
257
  " close|close-task)",
221
258
  ` COMPREPLY=(${compgen(CLOSE_MUTATION_FLAGS)})`,
@@ -223,7 +260,10 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
223
260
  " release)",
224
261
  ` COMPREPLY=(${compgen(RELEASE_MUTATION_FLAGS)})`,
225
262
  " ;;",
226
- " claim|delete|restore|start-task|pause-task)",
263
+ " delete)",
264
+ ` COMPREPLY=(${compgen(DELETE_MUTATION_FLAGS)})`,
265
+ " ;;",
266
+ " claim|restore|start-task|pause-task)",
227
267
  ` COMPREPLY=(${compgen(MUTATION_FLAGS)})`,
228
268
  " ;;",
229
269
  " completion)",
@@ -242,13 +282,21 @@ export function generateBashScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], ea
242
282
  "complete -F _pm_completion pm",
243
283
  ].join("\n");
244
284
  }
245
- export function generateZshScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], eagerTagExpansion = false) {
285
+ export function generateZshScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], eagerTagExpansion = false, runtime = {}) {
246
286
  const cmds = ALL_COMMANDS.map((c) => `'${c}'`).join(" ");
247
287
  const typeChoices = itemTypes.join(" ");
288
+ const statusChoices = joinCompletionValues(runtime.statuses ?? DEFAULT_STATUS_VALUES);
248
289
  const guideTopicChoices = GUIDE_TOPIC_CHOICES;
249
290
  const tagChoices = joinCompletionValues(tags);
250
291
  const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;
251
292
  const zshTagChoices = useEagerTagExpansion ? tagChoices : '${(f)"$(_pm_tag_choices)"}';
293
+ const zshListRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.list);
294
+ const zshCreateRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.create);
295
+ const zshUpdateRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.update);
296
+ const zshUpdateManyRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.["update-many"]);
297
+ const zshSearchRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.search);
298
+ const zshCalendarRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.calendar);
299
+ const zshContextRuntimeFieldFlags = renderZshRuntimeFieldFlagSpecs(runtime.command_flags?.context);
252
300
  const dynamicTagResolver = useEagerTagExpansion
253
301
  ? ""
254
302
  : `
@@ -297,6 +345,8 @@ _pm_commands() {
297
345
  'reindex:Rebuild search artifacts'
298
346
  'history:Show item history entries'
299
347
  'history-redact:Redact sensitive literals/patterns and recompute history hashes'
348
+ 'history-repair:Re-anchor a drifted history chain so pm health/validate report ok'
349
+ 'schema:Register custom item types into .agents/pm/schema/types.json'
300
350
  'plan:Agent-optimized Plan item workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)'
301
351
  'activity:Show recent activity across items'
302
352
  'restore:Restore an item to an earlier state'
@@ -339,6 +389,7 @@ _pm() {
339
389
  _arguments -C \\
340
390
  '--json[Output JSON instead of TOON]' \\
341
391
  '--quiet[Suppress stdout output]' \\
392
+ '--no-changed-fields[Omit changed_fields array from mutation output]' \\
342
393
  '--path[Override PM path for this command]:path:_files -/' \\
343
394
  '--no-extensions[Disable extension loading]' \\
344
395
  '--no-pager[Disable pager integration for help and long output]' \\
@@ -370,7 +421,7 @@ _pm() {
370
421
  '--sort[Sort field]:(priority deadline updated_at created_at title parent)' \\
371
422
  '--order[Sort order (requires --sort)]:(asc desc)' \\
372
423
  '--stream[Emit line-delimited JSON rows (requires --json)]' \\
373
- '--json[Output JSON]' \\
424
+ ${zshListRuntimeFieldFlags} '--json[Output JSON]' \\
374
425
  '--quiet[Suppress stdout]' \\
375
426
  '--path[Override PM path]:path:_files -/'
376
427
  ;;
@@ -379,7 +430,7 @@ _pm() {
379
430
  '--group-by[Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)]:fields' \\
380
431
  '--count[Return grouped counts]' \\
381
432
  '--include-unparented[Include unparented rows when grouping by parent]' \\
382
- '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\
433
+ '--status[Filter by status]:(${statusChoices})' \\
383
434
  '--type[Filter by item type]:(${typeChoices})' \\
384
435
  '--tag[Filter by tag]:(${zshTagChoices})' \\
385
436
  '--priority[Filter by priority]:(0 1 2 3 4)' \\
@@ -398,7 +449,7 @@ _pm() {
398
449
  '--mode[Dedupe mode]:(title_exact title_fuzzy parent_scope)' \\
399
450
  '--limit[Limit returned duplicate clusters]:number' \\
400
451
  '--threshold[Fuzzy mode token similarity threshold between 0 and 1]:number' \\
401
- '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\
452
+ '--status[Filter by status]:(${statusChoices})' \\
402
453
  '--type[Filter by item type]:(${typeChoices})' \\
403
454
  '--tag[Filter by tag]:(${zshTagChoices})' \\
404
455
  '--priority[Filter by priority]:(0 1 2 3 4)' \\
@@ -419,14 +470,14 @@ _pm() {
419
470
  '--type[Item type]:(${typeChoices})' \\
420
471
  '--create-mode[Create required-option policy mode]:(strict progressive)' \\
421
472
  '--schedule-preset[Scheduling preset for Reminder/Meeting/Event]:(lightweight)' \\
422
- '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked)' \\
473
+ '(-s --status)'{-s,--status}'[Item status]:(${statusChoices})' \\
423
474
  '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
424
475
  '--tags[Comma-separated tags]:tags' \\
425
476
  '(-b --body)'{-b,--body}'[Item body]:body' \\
426
477
  '--deadline[Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)]:deadline' \\
427
478
  '--estimate[Estimated minutes]:minutes' \\
428
479
  '--acceptance-criteria[Acceptance criteria]:criteria' \\
429
- '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\
480
+ '--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder' \\
430
481
  '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\
431
482
  '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\
432
483
  '--unset[Clear scalar metadata field by name]:field' \\
@@ -445,7 +496,7 @@ _pm() {
445
496
  '--author[Mutation author]:author' \\
446
497
  '--message[History message]:message' \\
447
498
  '--assignee[Assignee]:assignee' \\
448
- '--json[Output JSON]' \\
499
+ ${zshCreateRuntimeFieldFlags} '--json[Output JSON]' \\
449
500
  '--quiet[Suppress stdout]'
450
501
  ;;
451
502
  update)
@@ -453,7 +504,7 @@ _pm() {
453
504
  '(-t --title)'{-t,--title}'[Item title]:title' \\
454
505
  '(-d --description)'{-d,--description}'[Item description]:description' \\
455
506
  '(-b --body)'{-b,--body}'[Item body]:body' \\
456
- '(-s --status)'{-s,--status}'[Item status]:(draft open in_progress blocked canceled)' \\
507
+ '(-s --status)'{-s,--status}'[Item status]:(${statusChoices})' \\
457
508
  '--close-reason[Set close reason]:close_reason' \\
458
509
  '(-p --priority)'{-p,--priority}'[Priority (0-4)]:(0 1 2 3 4)' \\
459
510
  '--type[Item type]:(${typeChoices})' \\
@@ -464,7 +515,7 @@ _pm() {
464
515
  '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\
465
516
  '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\
466
517
  '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\
467
- '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\
518
+ '--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder' \\
468
519
  '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\
469
520
  '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\
470
521
  '--unset[Clear scalar metadata field by name]:field' \\
@@ -478,7 +529,7 @@ _pm() {
478
529
  '--clear-reminders[Clear reminders]' \\
479
530
  '--clear-events[Clear events]' \\
480
531
  '--clear-type-options[Clear type options]' \\
481
- '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\
532
+ ${zshUpdateRuntimeFieldFlags} '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\
482
533
  '--author[Mutation author]:author' \\
483
534
  '--message[History message]:message' \\
484
535
  '--force[Force override]' \\
@@ -487,7 +538,7 @@ _pm() {
487
538
  ;;
488
539
  update-many)
489
540
  _arguments \\
490
- '--filter-status[Filter by status before applying updates]:(draft open in_progress blocked closed canceled)' \\
541
+ '--filter-status[Filter by status before applying updates]:(${statusChoices})' \\
491
542
  '--filter-type[Filter by type before applying updates]:(${typeChoices})' \\
492
543
  '--filter-tag[Filter by tag before applying updates]:(${zshTagChoices})' \\
493
544
  '--filter-priority[Filter by priority before applying updates]:(0 1 2 3 4)' \\
@@ -547,7 +598,7 @@ _pm() {
547
598
  '--file[Linked file path=<value>,scope=<project|global>,note=<text>]:file' \\
548
599
  '--test[Linked test command=<value>,path=<value>,scope=<project|global>]:test' \\
549
600
  '--doc[Linked doc path=<value>,scope=<project|global>,note=<text>]:doc' \\
550
- '--reminder[Reminder entry at=<iso|relative>,text=<text>]:reminder' \\
601
+ '--reminder[Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>]:reminder' \\
551
602
  '--event[Event entry start=<iso|relative>,end=<iso|relative>,recur_*]:event' \\
552
603
  '--type-option[Type option key=value or key=<name>,value=<value>]:type_option' \\
553
604
  '--unset[Clear scalar metadata field by name]:field' \\
@@ -561,7 +612,7 @@ _pm() {
561
612
  '--clear-reminders[Clear reminders]' \\
562
613
  '--clear-events[Clear events]' \\
563
614
  '--clear-type-options[Clear type options]' \\
564
- '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\
615
+ ${zshUpdateManyRuntimeFieldFlags} '--allow-audit-update[Allow non-owner metadata-only audit updates without requiring --force]' \\
565
616
  '--author[Mutation author]:author' \\
566
617
  '--message[History message]:message' \\
567
618
  '--force[Force override]' \\
@@ -570,7 +621,7 @@ _pm() {
570
621
  ;;
571
622
  normalize)
572
623
  _arguments \\
573
- '--filter-status[Filter by status before planning or apply]:(draft open in_progress blocked closed canceled)' \\
624
+ '--filter-status[Filter by status before planning or apply]:(${statusChoices})' \\
574
625
  '--filter-type[Filter by type before planning or apply]:(${typeChoices})' \\
575
626
  '--filter-tag[Filter by tag before planning or apply]:(${zshTagChoices})' \\
576
627
  '--filter-priority[Filter by priority before planning or apply]:(0 1 2 3 4)' \\
@@ -603,12 +654,12 @@ _pm() {
603
654
  '--type[Filter by type]:(${typeChoices})' \\
604
655
  '--tag[Filter by tag]:(${zshTagChoices})' \\
605
656
  '--priority[Filter by priority]:(0 1 2 3 4)' \\
606
- '--status[Filter by status]:(draft open in_progress blocked closed canceled)' \\
657
+ '--status[Filter by status]:(${statusChoices})' \\
607
658
  '--assignee[Filter by assignee]:assignee' \\
608
659
  '--assignee-filter[Filter assignee presence]:(assigned unassigned)' \\
609
660
  '--sprint[Filter by sprint]:sprint' \\
610
661
  '--release[Filter by release]:release' \\
611
- '--include[Include event sources]:(all deadlines reminders events)' \\
662
+ ${zshCalendarRuntimeFieldFlags} '--include[Include event sources]:(all deadlines reminders events scheduled)' \\
612
663
  '--recurrence-lookahead-days[Bound open-ended recurrence lookahead]:days' \\
613
664
  '--recurrence-lookback-days[Bound open-ended recurrence lookback]:days' \\
614
665
  '--occurrence-limit[Cap occurrences per recurring event]:number' \\
@@ -632,7 +683,7 @@ _pm() {
632
683
  '--release[Filter by release]:release' \\
633
684
  '--limit[Limit focus and agenda rows per section]:number' \\
634
685
  '--format[Output override]:(markdown toon json)' \\
635
- '--json[Output JSON]' \\
686
+ ${zshContextRuntimeFieldFlags} '--json[Output JSON]' \\
636
687
  '--quiet[Suppress stdout]'
637
688
  ;;
638
689
  guide)
@@ -652,7 +703,7 @@ _pm() {
652
703
  '--type[Filter by type]:(${typeChoices})' \\
653
704
  '--tag[Filter by tag]:(${zshTagChoices})' \\
654
705
  '--priority[Filter by priority]:(0 1 2 3 4)' \\
655
- '--json[Output JSON]' \\
706
+ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
656
707
  '--quiet[Suppress stdout]'
657
708
  ;;
658
709
  reindex)
@@ -665,11 +716,21 @@ _pm() {
665
716
  history)
666
717
  _arguments \\
667
718
  '--limit[Max entries]:number' \\
719
+ '--compact[Condensed history projection]' \\
720
+ '--full[Show full history entries]' \\
668
721
  '--diff[Include changed-field patch summary]' \\
669
722
  '--verify[Verify history hash chain and replay integrity]' \\
670
723
  '--json[Output JSON]' \\
671
724
  '--quiet[Suppress stdout]'
672
725
  ;;
726
+ get)
727
+ _arguments \\
728
+ '--depth[Detail depth]:(brief standard deep)' \\
729
+ '--full[Explicit full item read]' \\
730
+ '--fields[Render custom comma-separated item fields]:fields' \\
731
+ '--json[Output JSON]' \\
732
+ '--quiet[Suppress stdout]'
733
+ ;;
673
734
  history-redact)
674
735
  _arguments \\
675
736
  '--literal[Literal string matcher to redact from history/item payloads]:literal' \\
@@ -682,6 +743,27 @@ _pm() {
682
743
  '--json[Output JSON]' \\
683
744
  '--quiet[Suppress stdout]'
684
745
  ;;
746
+ history-repair)
747
+ _arguments \\
748
+ '--dry-run[Preview the re-anchor impact without writing the history file]' \\
749
+ '--author[Mutation author]:author' \\
750
+ '--message[Audit history message]:message' \\
751
+ '--force[Force ownership/lock override]' \\
752
+ '--json[Output JSON]' \\
753
+ '--quiet[Suppress stdout]'
754
+ ;;
755
+ schema)
756
+ _arguments \\
757
+ '1:subcommand:(add-type)' \\
758
+ '--description[Human description for the custom item type]:text' \\
759
+ '--default-status[Default status hint for the custom item type]:status' \\
760
+ '--folder[Storage folder for items of this custom type]:dir' \\
761
+ '--alias[Alias for the custom type (repeatable)]:name' \\
762
+ '--author[Mutation author]:author' \\
763
+ '--force[Force ownership/lock override]' \\
764
+ '--json[Output JSON]' \\
765
+ '--quiet[Suppress stdout]'
766
+ ;;
685
767
  plan)
686
768
  _arguments \\
687
769
  '1:subcommand:(create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize)' \\
@@ -715,6 +797,8 @@ _pm() {
715
797
  '--from[Lower timestamp bound (ISO/date string or relative)]:date' \\
716
798
  '--to[Upper timestamp bound (ISO/date string or relative)]:date' \\
717
799
  '--limit[Max entries]:number' \\
800
+ '--compact[Condensed activity projection]' \\
801
+ '--full[Show full activity entries]' \\
718
802
  '--stream[Emit line-delimited JSON rows]:mode' \\
719
803
  '--json[Output JSON]' \\
720
804
  '--quiet[Suppress stdout]'
@@ -852,6 +936,7 @@ _pm() {
852
936
  '--author[Set the default mutation author for this project]:author' \\
853
937
  '--agent-guidance[Agent guidance mode]:mode:(ask add skip status)' \\
854
938
  '--with-packages[Install bundled first-party packages during initialization]' \\
939
+ '--verbose[Include the full resolved settings tree in init output]' \\
855
940
  '--json[Output JSON]' \\
856
941
  '--quiet[Suppress stdout]'
857
942
  ;;
@@ -864,6 +949,7 @@ _pm() {
864
949
  '--author[Set the default mutation author for this project]:author' \\
865
950
  '--agent-guidance[Agent guidance mode]:mode:(ask add skip status)' \\
866
951
  '--with-packages[Install bundled first-party packages during initialization]' \\
952
+ '--verbose[Include the full resolved settings tree in init output]' \\
867
953
  '--json[Output JSON]' \\
868
954
  '--quiet[Suppress stdout]'
869
955
  ;;
@@ -902,6 +988,15 @@ _pm() {
902
988
  '--json[Output JSON]' \\
903
989
  '--quiet[Suppress stdout]'
904
990
  ;;
991
+ delete)
992
+ _arguments \\
993
+ '--dry-run[Preview the item file that would be deleted without mutating]' \\
994
+ '--author[Mutation author]:author' \\
995
+ '--message[History message]:message' \\
996
+ '--force[Force override]' \\
997
+ '--json[Output JSON]' \\
998
+ '--quiet[Suppress stdout]'
999
+ ;;
905
1000
  start-task|pause-task)
906
1001
  _arguments \\
907
1002
  '--author[Mutation author]:author' \\
@@ -945,6 +1040,8 @@ _pm() {
945
1040
  '--no-refresh[Disable automatic vector refresh attempts during health checks]' \\
946
1041
  '--refresh-vectors[Explicitly enable vector refresh attempts during health checks]' \\
947
1042
  '--verbose-stale-items[Include full stale vectorization ID lists in health output]' \\
1043
+ '--brief[Emit compact health details for low-token agent checks]' \\
1044
+ '--summary[Emit one-line-style health status with check names and warning count]' \\
948
1045
  '--strict-exit[Return non-zero exit when health warnings are present]' \\
949
1046
  '--fail-on-warn[Alias for --strict-exit]' \\
950
1047
  '--json[Output JSON]' \\
@@ -952,7 +1049,7 @@ _pm() {
952
1049
  ;;
953
1050
  comments-audit)
954
1051
  _arguments \\
955
- '--status[Filter by item status]:status:(draft open in_progress blocked closed canceled)' \\
1052
+ '--status[Filter by item status]:status:(${statusChoices})' \\
956
1053
  '--type[Filter by item type]:(${typeChoices})' \\
957
1054
  '--tag[Filter by tag]:(${zshTagChoices})' \\
958
1055
  '--priority[Filter by priority]:(0 1 2 3 4)' \\
@@ -1017,14 +1114,23 @@ _pm() {
1017
1114
 
1018
1115
  compdef _pm pm`;
1019
1116
  }
1020
- export function generateFishScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], eagerTagExpansion = false) {
1021
- const listCmds = ALL_COMMANDS.filter((command) => command === "list" || command.startsWith("list-")).join(" ");
1117
+ export function generateFishScript(itemTypes = DEFAULT_ITEM_TYPES, tags = [], eagerTagExpansion = false, runtime = {}) {
1118
+ const listCommandNames = ALL_COMMANDS.filter((command) => command === "list" || command.startsWith("list-"));
1119
+ const listCmds = listCommandNames.join(" ");
1022
1120
  const noSubcommandList = ALL_COMMANDS.join(" ");
1023
1121
  const typeChoices = itemTypes.join(" ");
1122
+ const statusChoices = joinCompletionValues(runtime.statuses ?? DEFAULT_STATUS_VALUES);
1024
1123
  const guideTopicChoices = GUIDE_TOPIC_CHOICES;
1025
1124
  const tagChoices = joinCompletionValues(tags);
1026
1125
  const useEagerTagExpansion = eagerTagExpansion || tags.length > 0;
1027
1126
  const fishTagChoices = useEagerTagExpansion ? `'${tagChoices}'` : "'(__pm_tag_choices)'";
1127
+ const fishListRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(listCommandNames, runtime.command_flags?.list);
1128
+ const fishCreateRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["create"], runtime.command_flags?.create);
1129
+ const fishUpdateRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["update"], runtime.command_flags?.update);
1130
+ const fishUpdateManyRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["update-many"], runtime.command_flags?.["update-many"]);
1131
+ const fishSearchRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["search"], runtime.command_flags?.search);
1132
+ const fishCalendarRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["calendar", "cal"], runtime.command_flags?.calendar);
1133
+ const fishContextRuntimeFieldFlags = renderFishRuntimeFieldFlagSpecs(["context", "ctx"], runtime.command_flags?.context);
1028
1134
  const dynamicTagResolver = useEagerTagExpansion
1029
1135
  ? ""
1030
1136
  : `
@@ -1060,6 +1166,7 @@ complete -c pm -f
1060
1166
  # Global flags (available for all subcommands)
1061
1167
  complete -c pm -l json -d 'Output JSON instead of TOON'
1062
1168
  complete -c pm -l quiet -d 'Suppress stdout output'
1169
+ complete -c pm -l no-changed-fields -d 'Omit changed_fields array from mutation output'
1063
1170
  complete -c pm -l path -d 'Override PM path for this command' -r
1064
1171
  complete -c pm -l no-extensions -d 'Disable extension loading'
1065
1172
  complete -c pm -l profile -d 'Print deterministic timing diagnostics'
@@ -1097,6 +1204,8 @@ complete -c pm -n __pm_no_subcommand -a search -d 'Search items with keyw
1097
1204
  complete -c pm -n __pm_no_subcommand -a reindex -d 'Rebuild search artifacts'
1098
1205
  complete -c pm -n __pm_no_subcommand -a history -d 'Show item history entries'
1099
1206
  complete -c pm -n __pm_no_subcommand -a history-redact -d 'Redact sensitive literals/patterns and recompute history hashes'
1207
+ complete -c pm -n __pm_no_subcommand -a history-repair -d 'Re-anchor a drifted history chain so pm health/validate report ok'
1208
+ complete -c pm -n __pm_no_subcommand -a schema -d 'Register custom item types into .agents/pm/schema/types.json'
1100
1209
  complete -c pm -n __pm_no_subcommand -a plan -d 'Agent-optimized Plan workflow (create/show/add-step/update-step/complete-step/link/approve/materialize)'
1101
1210
  complete -c pm -n __pm_no_subcommand -a activity -d 'Show recent activity across items'
1102
1211
  complete -c pm -n __pm_no_subcommand -a restore -d 'Restore an item to an earlier state'
@@ -1149,12 +1258,13 @@ for list_cmd in ${listCmds}
1149
1258
  complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l deadline-before -d 'Filter by deadline upper bound (ISO/date string or relative)' -r
1150
1259
  complete -c pm -n "__fish_seen_subcommand_from $list_cmd" -l deadline-after -d 'Filter by deadline lower bound (ISO/date string or relative)' -r
1151
1260
  end
1261
+ ${fishListRuntimeFieldFlags}
1152
1262
 
1153
1263
  # aggregate flags
1154
1264
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l group-by -d 'Comma-separated group-by fields (supported: parent,type,priority,status,assignee,tags,sprint,release)' -r
1155
1265
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l count -d 'Return grouped counts'
1156
1266
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l include-unparented -d 'Include unparented rows when grouping by parent'
1157
- complete -c pm -n '__fish_seen_subcommand_from aggregate' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'
1267
+ complete -c pm -n '__fish_seen_subcommand_from aggregate' -l status -d 'Filter by status' -r -a '${statusChoices}'
1158
1268
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l type -d 'Filter by item type' -r -a '${typeChoices}'
1159
1269
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
1160
1270
  complete -c pm -n '__fish_seen_subcommand_from aggregate' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
@@ -1170,7 +1280,7 @@ complete -c pm -n '__fish_seen_subcommand_from aggregate' -l release -d 'Filter
1170
1280
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l mode -d 'Dedupe mode' -r -a 'title_exact title_fuzzy parent_scope'
1171
1281
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l limit -d 'Limit returned duplicate clusters' -r
1172
1282
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l threshold -d 'Fuzzy mode token similarity threshold between 0 and 1' -r
1173
- complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'
1283
+ complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l status -d 'Filter by status' -r -a '${statusChoices}'
1174
1284
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'
1175
1285
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
1176
1286
  complete -c pm -n '__fish_seen_subcommand_from dedupe-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
@@ -1188,14 +1298,14 @@ complete -c pm -n '__fish_seen_subcommand_from create' -s d -l description
1188
1298
  complete -c pm -n '__fish_seen_subcommand_from create' -l type -d 'Item type' -r -a '${typeChoices}'
1189
1299
  complete -c pm -n '__fish_seen_subcommand_from create' -l create-mode -d 'Create required-option policy mode' -r -a 'strict progressive'
1190
1300
  complete -c pm -n '__fish_seen_subcommand_from create' -l schedule-preset -d 'Scheduling preset for Reminder/Meeting/Event' -r -a 'lightweight'
1191
- complete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked'
1301
+ complete -c pm -n '__fish_seen_subcommand_from create' -s s -l status -d 'Item status' -r -a '${statusChoices}'
1192
1302
  complete -c pm -n '__fish_seen_subcommand_from create' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1193
1303
  complete -c pm -n '__fish_seen_subcommand_from create' -l tags -d 'Comma-separated tags' -r
1194
1304
  complete -c pm -n '__fish_seen_subcommand_from create' -s b -l body -d 'Item body' -r
1195
1305
  complete -c pm -n '__fish_seen_subcommand_from create' -l deadline -d 'Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)' -r
1196
1306
  complete -c pm -n '__fish_seen_subcommand_from create' -l estimate -d 'Estimated minutes' -r
1197
1307
  complete -c pm -n '__fish_seen_subcommand_from create' -l acceptance-criteria -d 'Acceptance criteria' -r
1198
- complete -c pm -n '__fish_seen_subcommand_from create' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r
1308
+ complete -c pm -n '__fish_seen_subcommand_from create' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1199
1309
  complete -c pm -n '__fish_seen_subcommand_from create' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1200
1310
  complete -c pm -n '__fish_seen_subcommand_from create' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1201
1311
  complete -c pm -n '__fish_seen_subcommand_from create' -l author -d 'Mutation author' -r
@@ -1212,12 +1322,13 @@ complete -c pm -n '__fish_seen_subcommand_from create' -l clear-docs
1212
1322
  complete -c pm -n '__fish_seen_subcommand_from create' -l clear-reminders -d 'Clear reminders'
1213
1323
  complete -c pm -n '__fish_seen_subcommand_from create' -l clear-events -d 'Clear events'
1214
1324
  complete -c pm -n '__fish_seen_subcommand_from create' -l clear-type-options -d 'Clear type options'
1325
+ ${fishCreateRuntimeFieldFlags}
1215
1326
 
1216
1327
  # update flags
1217
1328
  complete -c pm -n '__fish_seen_subcommand_from update' -s t -l title -d 'Item title' -r
1218
1329
  complete -c pm -n '__fish_seen_subcommand_from update' -s d -l description -d 'Item description' -r
1219
1330
  complete -c pm -n '__fish_seen_subcommand_from update' -s b -l body -d 'Item body' -r
1220
- complete -c pm -n '__fish_seen_subcommand_from update' -s s -l status -d 'Item status' -r -a 'draft open in_progress blocked canceled'
1331
+ complete -c pm -n '__fish_seen_subcommand_from update' -s s -l status -d 'Item status' -r -a '${statusChoices}'
1221
1332
  complete -c pm -n '__fish_seen_subcommand_from update' -l close-reason -d 'Set close reason' -r
1222
1333
  complete -c pm -n '__fish_seen_subcommand_from update' -s p -l priority -d 'Priority (0-4)' -r -a '0 1 2 3 4'
1223
1334
  complete -c pm -n '__fish_seen_subcommand_from update' -l type -d 'Item type' -r -a '${typeChoices}'
@@ -1227,7 +1338,7 @@ complete -c pm -n '__fish_seen_subcommand_from update' -l learning
1227
1338
  complete -c pm -n '__fish_seen_subcommand_from update' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r
1228
1339
  complete -c pm -n '__fish_seen_subcommand_from update' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r
1229
1340
  complete -c pm -n '__fish_seen_subcommand_from update' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r
1230
- complete -c pm -n '__fish_seen_subcommand_from update' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r
1341
+ complete -c pm -n '__fish_seen_subcommand_from update' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1231
1342
  complete -c pm -n '__fish_seen_subcommand_from update' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1232
1343
  complete -c pm -n '__fish_seen_subcommand_from update' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1233
1344
  complete -c pm -n '__fish_seen_subcommand_from update' -l unset -d 'Clear scalar metadata field by name' -r
@@ -1247,9 +1358,10 @@ complete -c pm -n '__fish_seen_subcommand_from update' -l allow-audit-update
1247
1358
  complete -c pm -n '__fish_seen_subcommand_from update' -l author -d 'Mutation author' -r
1248
1359
  complete -c pm -n '__fish_seen_subcommand_from update' -l message -d 'History message' -r
1249
1360
  complete -c pm -n '__fish_seen_subcommand_from update' -l force -d 'Force override'
1361
+ ${fishUpdateRuntimeFieldFlags}
1250
1362
 
1251
1363
  # update-many flags
1252
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-status -d 'Filter by status before applying updates' -r -a 'draft open in_progress blocked closed canceled'
1364
+ complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-status -d 'Filter by status before applying updates' -r -a '${statusChoices}'
1253
1365
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-type -d 'Filter by type before applying updates' -r -a '${typeChoices}'
1254
1366
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-tag -d 'Filter by tag before applying updates' -r -a ${fishTagChoices}
1255
1367
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l filter-priority -d 'Filter by priority before applying updates' -r -a '0 1 2 3 4'
@@ -1309,7 +1421,7 @@ complete -c pm -n '__fish_seen_subcommand_from update-many' -l learning
1309
1421
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l file -d 'Linked file path=<value>,scope=<project|global>,note=<text>' -r
1310
1422
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l test -d 'Linked test command=<value>,path=<value>,scope=<project|global>' -r
1311
1423
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l doc -d 'Linked doc path=<value>,scope=<project|global>,note=<text>' -r
1312
- complete -c pm -n '__fish_seen_subcommand_from update-many' -l reminder -d 'Reminder entry at=<iso|relative>,text=<text>' -r
1424
+ complete -c pm -n '__fish_seen_subcommand_from update-many' -l reminder -d 'Reminder entry at=<iso|relative>|date=<iso|relative>,text=<text>|title=<text>' -r
1313
1425
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l event -d 'Event entry start=<iso|relative>,end=<iso|relative>,recur_*' -r
1314
1426
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l type-option -d 'Type option key=value or key=<name>,value=<value>' -r
1315
1427
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l unset -d 'Clear scalar metadata field by name' -r
@@ -1327,9 +1439,10 @@ complete -c pm -n '__fish_seen_subcommand_from update-many' -l allow-audit-updat
1327
1439
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l author -d 'Mutation author' -r
1328
1440
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l message -d 'History message' -r
1329
1441
  complete -c pm -n '__fish_seen_subcommand_from update-many' -l force -d 'Force override'
1442
+ ${fishUpdateManyRuntimeFieldFlags}
1330
1443
 
1331
1444
  # normalize flags
1332
- complete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-status -d 'Filter by status before planning or apply' -r -a 'draft open in_progress blocked closed canceled'
1445
+ complete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-status -d 'Filter by status before planning or apply' -r -a '${statusChoices}'
1333
1446
  complete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-type -d 'Filter by type before planning or apply' -r -a '${typeChoices}'
1334
1447
  complete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-tag -d 'Filter by tag before planning or apply' -r -a ${fishTagChoices}
1335
1448
  complete -c pm -n '__fish_seen_subcommand_from normalize' -l filter-priority -d 'Filter by priority before planning or apply' -r -a '0 1 2 3 4'
@@ -1356,6 +1469,7 @@ complete -c pm -n '__fish_seen_subcommand_from search' -l limit -d 'Max
1356
1469
  complete -c pm -n '__fish_seen_subcommand_from search' -l type -d 'Filter by type' -r -a '${typeChoices}'
1357
1470
  complete -c pm -n '__fish_seen_subcommand_from search' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
1358
1471
  complete -c pm -n '__fish_seen_subcommand_from search' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1472
+ ${fishSearchRuntimeFieldFlags}
1359
1473
 
1360
1474
  # calendar flags
1361
1475
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l view -d 'Calendar view' -r -a 'agenda day week month'
@@ -1367,17 +1481,18 @@ complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l full-period -d '
1367
1481
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l type -d 'Filter by type' -r -a '${typeChoices}'
1368
1482
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
1369
1483
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
1370
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l status -d 'Filter by status' -r -a 'draft open in_progress blocked closed canceled'
1484
+ complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l status -d 'Filter by status' -r -a '${statusChoices}'
1371
1485
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee -d 'Filter by assignee' -r
1372
1486
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l assignee-filter -d 'Filter assignee presence' -r -a 'assigned unassigned'
1373
1487
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l sprint -d 'Filter by sprint' -r
1374
1488
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l release -d 'Filter by release' -r
1375
- complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l include -d 'Include event sources' -r -a 'all deadlines reminders events'
1489
+ complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l include -d 'Include event sources' -r -a 'all deadlines reminders events scheduled'
1376
1490
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookahead-days -d 'Bound open-ended recurrence lookahead' -r
1377
1491
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l recurrence-lookback-days -d 'Bound open-ended recurrence lookback' -r
1378
1492
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l occurrence-limit -d 'Cap occurrences per recurring event' -r
1379
1493
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l limit -d 'Limit returned events' -r
1380
1494
  complete -c pm -n '__fish_seen_subcommand_from calendar cal' -l format -d 'Output override' -r -a 'markdown toon json'
1495
+ ${fishCalendarRuntimeFieldFlags}
1381
1496
 
1382
1497
  # context flags
1383
1498
  complete -c pm -n '__fish_seen_subcommand_from context ctx' -l date -d 'Anchor date/time (ISO/date string or relative)' -r
@@ -1393,6 +1508,7 @@ complete -c pm -n '__fish_seen_subcommand_from context ctx' -l sprint -d 'Fil
1393
1508
  complete -c pm -n '__fish_seen_subcommand_from context ctx' -l release -d 'Filter by release' -r
1394
1509
  complete -c pm -n '__fish_seen_subcommand_from context ctx' -l limit -d 'Limit focus and agenda rows per section' -r
1395
1510
  complete -c pm -n '__fish_seen_subcommand_from context ctx' -l format -d 'Output override' -r -a 'markdown toon json'
1511
+ ${fishContextRuntimeFieldFlags}
1396
1512
 
1397
1513
  # guide flags
1398
1514
  complete -c pm -n '__fish_seen_subcommand_from guide' -l list -d 'Show guide topic index'
@@ -1404,8 +1520,15 @@ complete -c pm -n '__fish_seen_subcommand_from guide' -a '${guideTopicChoices}'
1404
1520
  complete -c pm -n '__fish_seen_subcommand_from reindex' -l mode -d 'Reindex mode' -r -a 'keyword semantic hybrid'
1405
1521
  complete -c pm -n '__fish_seen_subcommand_from reindex' -l progress -d 'Emit progress updates to stderr'
1406
1522
 
1523
+ # get flags
1524
+ complete -c pm -n '__fish_seen_subcommand_from get' -l depth -d 'Detail depth' -r -a 'brief standard deep'
1525
+ complete -c pm -n '__fish_seen_subcommand_from get' -l full -d 'Explicit full item read'
1526
+ complete -c pm -n '__fish_seen_subcommand_from get' -l fields -d 'Render custom comma-separated item fields' -r
1527
+
1407
1528
  # history / activity flags
1408
1529
  complete -c pm -n '__fish_seen_subcommand_from history' -l limit -d 'Max history entries' -r
1530
+ complete -c pm -n '__fish_seen_subcommand_from history' -l compact -d 'Condensed history projection'
1531
+ complete -c pm -n '__fish_seen_subcommand_from history' -l full -d 'Show full history entries'
1409
1532
  complete -c pm -n '__fish_seen_subcommand_from history' -l diff -d 'Include changed-field patch summary'
1410
1533
  complete -c pm -n '__fish_seen_subcommand_from history' -l verify -d 'Verify history hash chain and replay integrity'
1411
1534
  complete -c pm -n '__fish_seen_subcommand_from history-redact' -l literal -d 'Literal string matcher to redact from history/item payloads' -r
@@ -1415,6 +1538,17 @@ complete -c pm -n '__fish_seen_subcommand_from history-redact' -l dry-run -d 'Pr
1415
1538
  complete -c pm -n '__fish_seen_subcommand_from history-redact' -l author -d 'Mutation author' -r
1416
1539
  complete -c pm -n '__fish_seen_subcommand_from history-redact' -l message -d 'Audit history message' -r
1417
1540
  complete -c pm -n '__fish_seen_subcommand_from history-redact' -l force -d 'Force ownership/lock override'
1541
+ complete -c pm -n '__fish_seen_subcommand_from history-repair' -l dry-run -d 'Preview the re-anchor impact without writing the history file'
1542
+ complete -c pm -n '__fish_seen_subcommand_from history-repair' -l author -d 'Mutation author' -r
1543
+ complete -c pm -n '__fish_seen_subcommand_from history-repair' -l message -d 'Audit history message' -r
1544
+ complete -c pm -n '__fish_seen_subcommand_from history-repair' -l force -d 'Force ownership/lock override'
1545
+ complete -c pm -n '__fish_seen_subcommand_from schema' -a 'add-type' -d 'Schema subcommand'
1546
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l description -d 'Human description for the custom item type' -r
1547
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l default-status -d 'Default status hint for the custom item type' -r
1548
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l folder -d 'Storage folder for items of this custom type' -r
1549
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l alias -d 'Alias for the custom type (repeatable)' -r
1550
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l author -d 'Mutation author' -r
1551
+ complete -c pm -n '__fish_seen_subcommand_from schema' -l force -d 'Force ownership/lock override'
1418
1552
  complete -c pm -n '__fish_seen_subcommand_from plan' -a 'create show add-step update-step complete-step block-step reorder-step remove-step link unlink decision discovery validation resume approve materialize' -d 'Plan subcommand'
1419
1553
  complete -c pm -n '__fish_seen_subcommand_from plan' -l title -d 'Plan title' -r
1420
1554
  complete -c pm -n '__fish_seen_subcommand_from plan' -l scope -d 'Plan scope statement' -r
@@ -1441,6 +1575,8 @@ complete -c pm -n '__fish_seen_subcommand_from activity' -l author -d 'Filter by
1441
1575
  complete -c pm -n '__fish_seen_subcommand_from activity' -l from -d 'Lower timestamp bound (ISO/date string or relative)' -r
1442
1576
  complete -c pm -n '__fish_seen_subcommand_from activity' -l to -d 'Upper timestamp bound (ISO/date string or relative)' -r
1443
1577
  complete -c pm -n '__fish_seen_subcommand_from activity' -l limit -d 'Max activity entries' -r
1578
+ complete -c pm -n '__fish_seen_subcommand_from activity' -l compact -d 'Condensed activity projection'
1579
+ complete -c pm -n '__fish_seen_subcommand_from activity' -l full -d 'Show full activity entries'
1444
1580
  complete -c pm -n '__fish_seen_subcommand_from activity' -l stream -d 'Emit line-delimited JSON rows'
1445
1581
  complete -c pm -n '__fish_seen_subcommand_from contracts' -l action -d 'Filter schema by tool action' -r
1446
1582
  complete -c pm -n '__fish_seen_subcommand_from contracts' -l command -d 'Scope output to one command (narrow-by-default)' -r
@@ -1527,11 +1663,12 @@ complete -c pm -n '__fish_seen_subcommand_from append' -l message -d 'History me
1527
1663
  complete -c pm -n '__fish_seen_subcommand_from append' -l force -d 'Force override'
1528
1664
 
1529
1665
  # close flags
1530
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l author -d 'Mutation author' -r
1531
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l message -d 'History message' -r
1532
- complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task' -l force -d 'Force override'
1666
+ complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l author -d 'Mutation author' -r
1667
+ complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l message -d 'History message' -r
1668
+ complete -c pm -n '__fish_seen_subcommand_from claim release start-task pause-task close close-task delete' -l force -d 'Force override'
1533
1669
  complete -c pm -n '__fish_seen_subcommand_from close close-task' -l validate-close -d 'Validate closure metadata mode' -r -a 'off warn strict'
1534
1670
  complete -c pm -n '__fish_seen_subcommand_from release' -l allow-audit-release -d 'Allow non-owner release handoffs without requiring --force'
1671
+ complete -c pm -n '__fish_seen_subcommand_from delete' -l dry-run -d 'Preview the item file that would be deleted without mutating'
1535
1672
 
1536
1673
  # validate flags
1537
1674
  complete -c pm -n '__fish_seen_subcommand_from validate' -l check-metadata -d 'Run metadata completeness checks'
@@ -1554,6 +1691,7 @@ complete -c pm -n '__fish_seen_subcommand_from init' -s y -l yes -d 'Alias for -
1554
1691
  complete -c pm -n '__fish_seen_subcommand_from init' -l author -d 'Set the default mutation author for this project' -r
1555
1692
  complete -c pm -n '__fish_seen_subcommand_from init' -l agent-guidance -d 'Agent guidance mode' -r -a 'ask add skip status'
1556
1693
  complete -c pm -n '__fish_seen_subcommand_from init' -l with-packages -d 'Install bundled first-party packages during initialization'
1694
+ complete -c pm -n '__fish_seen_subcommand_from init' -l verbose -d 'Include the full resolved settings tree in init output'
1557
1695
  complete -c pm -n '__fish_seen_subcommand_from config' -l criterion -d 'Criteria value for definition-of-done metadata-required-fields or lifecycle pattern keys (repeatable for set)' -r
1558
1696
  complete -c pm -n '__fish_seen_subcommand_from config' -l clear-criteria -d 'Clear config criteria-list key values'
1559
1697
  complete -c pm -n '__fish_seen_subcommand_from config' -l format -d 'Item format for item-format key' -r -a 'toon'
@@ -1563,9 +1701,11 @@ complete -c pm -n '__fish_seen_subcommand_from health' -l check-only -d 'Run rea
1563
1701
  complete -c pm -n '__fish_seen_subcommand_from health' -l no-refresh -d 'Disable automatic vector refresh attempts during health checks'
1564
1702
  complete -c pm -n '__fish_seen_subcommand_from health' -l refresh-vectors -d 'Explicitly enable vector refresh attempts during health checks'
1565
1703
  complete -c pm -n '__fish_seen_subcommand_from health' -l verbose-stale-items -d 'Include full stale vectorization ID lists in health output'
1704
+ complete -c pm -n '__fish_seen_subcommand_from health' -l brief -d 'Emit compact health details for low-token agent checks'
1705
+ complete -c pm -n '__fish_seen_subcommand_from health' -l summary -d 'Emit one-line-style health status with check names and warning count'
1566
1706
  complete -c pm -n '__fish_seen_subcommand_from health' -l strict-exit -d 'Return non-zero exit when health warnings are present'
1567
1707
  complete -c pm -n '__fish_seen_subcommand_from health' -l fail-on-warn -d 'Alias for --strict-exit'
1568
- complete -c pm -n '__fish_seen_subcommand_from comments-audit' -l status -d 'Filter by item status' -r -a 'draft open in_progress blocked closed canceled'
1708
+ complete -c pm -n '__fish_seen_subcommand_from comments-audit' -l status -d 'Filter by item status' -r -a '${statusChoices}'
1569
1709
  complete -c pm -n '__fish_seen_subcommand_from comments-audit' -l type -d 'Filter by item type' -r -a '${typeChoices}'
1570
1710
  complete -c pm -n '__fish_seen_subcommand_from comments-audit' -l tag -d 'Filter by tag' -r -a ${fishTagChoices}
1571
1711
  complete -c pm -n '__fish_seen_subcommand_from comments-audit' -l priority -d 'Filter by priority' -r -a '0 1 2 3 4'
@@ -1630,10 +1770,10 @@ export function runCompletion(shell, itemTypes = DEFAULT_ITEM_TYPES, tags = [],
1630
1770
  script = generateBashScript(itemTypes, tags, eagerTagExpansion, runtime);
1631
1771
  }
1632
1772
  else if (validShell === "zsh") {
1633
- script = generateZshScript(itemTypes, tags, eagerTagExpansion);
1773
+ script = generateZshScript(itemTypes, tags, eagerTagExpansion, runtime);
1634
1774
  }
1635
1775
  else {
1636
- script = generateFishScript(itemTypes, tags, eagerTagExpansion);
1776
+ script = generateFishScript(itemTypes, tags, eagerTagExpansion, runtime);
1637
1777
  }
1638
1778
  return {
1639
1779
  shell: validShell,
@@ -1642,4 +1782,4 @@ export function runCompletion(shell, itemTypes = DEFAULT_ITEM_TYPES, tags = [],
1642
1782
  };
1643
1783
  }
1644
1784
  //# sourceMappingURL=completion.js.map
1645
- //# debugId=f31aa5f9-6785-5b5e-9c34-167ef6e9f543
1785
+ //# debugId=b3284398-1103-5eb4-9c3d-028c20dfa304