@unbrained/pm-cli 2026.7.8 → 2026.7.9

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 (170) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -0
  3. package/dist/cli/commands/close.js +5 -2
  4. package/dist/cli/commands/close.js.map +1 -1
  5. package/dist/cli/commands/completion.js +8 -2
  6. package/dist/cli/commands/completion.js.map +1 -1
  7. package/dist/cli/commands/contracts.d.ts +11 -0
  8. package/dist/cli/commands/contracts.js +112 -15
  9. package/dist/cli/commands/contracts.js.map +1 -1
  10. package/dist/cli/commands/create.js +4 -2
  11. package/dist/cli/commands/create.js.map +1 -1
  12. package/dist/cli/commands/list.d.ts +4 -0
  13. package/dist/cli/commands/list.js +32 -3
  14. package/dist/cli/commands/list.js.map +1 -1
  15. package/dist/cli/commands/update.d.ts +32 -1
  16. package/dist/cli/commands/update.js +19 -2
  17. package/dist/cli/commands/update.js.map +1 -1
  18. package/dist/cli/register-list-query.js +4 -2
  19. package/dist/cli/register-list-query.js.map +1 -1
  20. package/dist/cli/register-operations.js +4 -2
  21. package/dist/cli/register-operations.js.map +1 -1
  22. package/dist/cli/registration-helpers.js +4 -2
  23. package/dist/cli/registration-helpers.js.map +1 -1
  24. package/dist/cli-bundle/chunks/{chunk-D63PEJTB.js → chunk-26MFLA7K.js} +2 -2
  25. package/dist/cli-bundle/chunks/{chunk-HI27UADG.js → chunk-2FKIIQMJ.js} +3 -3
  26. package/dist/cli-bundle/chunks/{chunk-RLHQ3G4M.js → chunk-5RJ4LFD3.js} +30 -3
  27. package/dist/cli-bundle/chunks/chunk-5RJ4LFD3.js.map +7 -0
  28. package/dist/cli-bundle/chunks/{chunk-IYRG5AEC.js → chunk-5ZMZF53A.js} +3 -3
  29. package/dist/cli-bundle/chunks/{chunk-UVFJSKTF.js → chunk-63PZJCKO.js} +7 -4
  30. package/dist/cli-bundle/chunks/chunk-63PZJCKO.js.map +1 -0
  31. package/dist/cli-bundle/chunks/{chunk-TUDAYIO7.js → chunk-ASSVI7FP.js} +5 -3
  32. package/dist/cli-bundle/chunks/{chunk-TUDAYIO7.js.map → chunk-ASSVI7FP.js.map} +1 -1
  33. package/dist/cli-bundle/chunks/{chunk-KMXVZ2P7.js → chunk-BPYVKTZE.js} +112 -17
  34. package/dist/cli-bundle/chunks/chunk-BPYVKTZE.js.map +1 -0
  35. package/dist/cli-bundle/chunks/{chunk-3FRNNVWY.js → chunk-CEX2DQXZ.js} +405 -75
  36. package/dist/cli-bundle/chunks/chunk-CEX2DQXZ.js.map +7 -0
  37. package/dist/cli-bundle/chunks/{chunk-DUBC6TI3.js → chunk-CHSXGTWF.js} +18 -4
  38. package/dist/cli-bundle/chunks/{chunk-DUBC6TI3.js.map → chunk-CHSXGTWF.js.map} +2 -2
  39. package/dist/cli-bundle/chunks/{chunk-G4FKP4ID.js → chunk-DBV5A7FT.js} +6 -4
  40. package/dist/cli-bundle/chunks/chunk-DBV5A7FT.js.map +1 -0
  41. package/dist/cli-bundle/chunks/{chunk-YQEKE4FO.js → chunk-DQLP22K2.js} +3 -3
  42. package/dist/cli-bundle/chunks/{chunk-ZMOPZFVT.js → chunk-GZ365M6E.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-XPSGJ4IV.js → chunk-K2OKKYSO.js} +4 -2
  44. package/dist/cli-bundle/chunks/{chunk-XPSGJ4IV.js.map → chunk-K2OKKYSO.js.map} +2 -2
  45. package/dist/cli-bundle/chunks/{chunk-TR2C6V5T.js → chunk-K4NMHZR3.js} +90 -19
  46. package/dist/cli-bundle/chunks/chunk-K4NMHZR3.js.map +7 -0
  47. package/dist/cli-bundle/chunks/{chunk-MYHFZNBO.js → chunk-KAJNWMBE.js} +2 -2
  48. package/dist/cli-bundle/chunks/{chunk-TU5P744I.js → chunk-MBLHA6LR.js} +2 -2
  49. package/dist/cli-bundle/chunks/{chunk-UCRYCT5M.js → chunk-MCZK7LY6.js} +19 -5
  50. package/dist/cli-bundle/chunks/{chunk-UCRYCT5M.js.map → chunk-MCZK7LY6.js.map} +1 -1
  51. package/dist/cli-bundle/chunks/{chunk-TTCJCKUJ.js → chunk-N4S7BV43.js} +3 -3
  52. package/dist/cli-bundle/chunks/{chunk-ML27MHNM.js → chunk-NBJCIAVV.js} +88 -17
  53. package/dist/cli-bundle/chunks/chunk-NBJCIAVV.js.map +1 -0
  54. package/dist/cli-bundle/chunks/{chunk-ASMRSIDX.js → chunk-NRYZ4QLH.js} +111 -16
  55. package/dist/cli-bundle/chunks/chunk-NRYZ4QLH.js.map +7 -0
  56. package/dist/cli-bundle/chunks/{chunk-RDJXIAJB.js → chunk-NSPSJWGL.js} +6 -3
  57. package/dist/cli-bundle/chunks/chunk-NSPSJWGL.js.map +7 -0
  58. package/dist/cli-bundle/chunks/{chunk-PJPZTE7P.js → chunk-ONADVBMD.js} +5 -3
  59. package/dist/cli-bundle/chunks/chunk-ONADVBMD.js.map +7 -0
  60. package/dist/cli-bundle/chunks/{chunk-GE44TQMC.js → chunk-P5SUMCU5.js} +3 -3
  61. package/dist/cli-bundle/chunks/{chunk-2RADY7IB.js → chunk-PPY3GXFK.js} +405 -75
  62. package/dist/cli-bundle/chunks/chunk-PPY3GXFK.js.map +1 -0
  63. package/dist/cli-bundle/chunks/{chunk-YR5R4FMQ.js → chunk-S7J3GEHL.js} +4 -4
  64. package/dist/cli-bundle/chunks/{chunk-XN5BEN2B.js → chunk-TI7QSUFK.js} +31 -4
  65. package/dist/cli-bundle/chunks/chunk-TI7QSUFK.js.map +1 -0
  66. package/dist/cli-bundle/chunks/{chunk-EYPIUFWJ.js → chunk-VCGHRLJU.js} +4 -4
  67. package/dist/cli-bundle/chunks/{chunk-P2WE5KCU.js → chunk-WDNPNW22.js} +2 -2
  68. package/dist/cli-bundle/chunks/{chunk-SN5X5GTU.js → chunk-XXN2B2MJ.js} +2 -2
  69. package/dist/cli-bundle/chunks/{chunk-GQOKFX2G.js → chunk-Y2736PT5.js} +2 -2
  70. package/dist/cli-bundle/chunks/{chunk-FL625JJM.js → chunk-YHKXNGLA.js} +3 -3
  71. package/dist/cli-bundle/chunks/{chunk-YUCKM3MD.js → chunk-YPE5MFPJ.js} +2 -2
  72. package/dist/cli-bundle/chunks/{close-E3RLZSP2.js → close-5WY6QO5F.js} +2 -2
  73. package/dist/cli-bundle/chunks/{close-K6BFI3OX.js → close-TKTFRL7N.js} +2 -2
  74. package/dist/cli-bundle/chunks/{close-many-6NBL3PM4.js → close-many-HEPL66EG.js} +4 -4
  75. package/dist/cli-bundle/chunks/{close-many-X4YKS3RO.js → close-many-U2KLQ3NL.js} +4 -4
  76. package/dist/cli-bundle/chunks/{create-AMBMYP6F.js → create-KCQM6UYM.js} +2 -2
  77. package/dist/cli-bundle/chunks/{create-TRIBYORN.js → create-LD4SEUD6.js} +2 -2
  78. package/dist/cli-bundle/chunks/{plan-MK2QY3GA.js → plan-B42KBMX7.js} +3 -3
  79. package/dist/cli-bundle/chunks/{plan-CJPKFRBK.js → plan-LUR7C24X.js} +3 -3
  80. package/dist/cli-bundle/chunks/{profile-HTBFINKQ.js → profile-5F75MO5O.js} +3 -3
  81. package/dist/cli-bundle/chunks/{profile-AQNHXOYA.js → profile-JRDMDGT5.js} +3 -3
  82. package/dist/cli-bundle/chunks/{register-list-query-EEF33SUJ.js → register-list-query-GZYRZLQZ.js} +8 -8
  83. package/dist/cli-bundle/chunks/register-list-query-GZYRZLQZ.js.map +1 -0
  84. package/dist/cli-bundle/chunks/{register-list-query-S4FBWIWN.js → register-list-query-W2W7RQJJ.js} +7 -7
  85. package/dist/cli-bundle/chunks/register-list-query-W2W7RQJJ.js.map +7 -0
  86. package/dist/cli-bundle/chunks/{register-mutation-L5Q7AUDN.js → register-mutation-5UDT3WL3.js} +10 -10
  87. package/dist/cli-bundle/chunks/{register-mutation-QFLRBCI7.js → register-mutation-7DMOYDPC.js} +10 -10
  88. package/dist/cli-bundle/chunks/{register-operations-QDU43FCG.js → register-operations-NW43IUPE.js} +12 -11
  89. package/dist/cli-bundle/chunks/register-operations-NW43IUPE.js.map +7 -0
  90. package/dist/cli-bundle/chunks/{register-operations-HDE4FVW4.js → register-operations-Y4E32W4D.js} +13 -12
  91. package/dist/cli-bundle/chunks/register-operations-Y4E32W4D.js.map +1 -0
  92. package/dist/cli-bundle/chunks/{register-setup-EGMTAXDC.js → register-setup-3GVJ7XPE.js} +6 -6
  93. package/dist/cli-bundle/chunks/{register-setup-PNIO3L2P.js → register-setup-MPTTS52V.js} +6 -6
  94. package/dist/cli-bundle/chunks/{update-SDIRJGSY.js → update-76CRUMC7.js} +4 -4
  95. package/dist/cli-bundle/chunks/{update-MP4XLU56.js → update-ZMYVXM77.js} +4 -4
  96. package/dist/cli-bundle/chunks/{update-many-34AIU6W7.js → update-many-QYQRGNPU.js} +6 -6
  97. package/dist/cli-bundle/chunks/{update-many-JUPCNOKV.js → update-many-U4CEQWI4.js} +6 -6
  98. package/dist/cli-bundle/main.js +7 -7
  99. package/dist/cli-bundle/sdk-runtime.js +81 -17
  100. package/dist/cli-bundle/sdk.js +84 -20
  101. package/dist/cli-bundle/sdk.js.map +3 -3
  102. package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
  103. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
  104. package/dist/sdk/cli-contracts/tool-option-contracts.js +10 -5
  105. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  106. package/dist/sdk/cli-contracts/tool-parameter-tables.js +12 -4
  107. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  108. package/dist/sdk/cli-contracts/tool-schema.d.ts +4 -0
  109. package/dist/sdk/cli-contracts/tool-schema.js +66 -11
  110. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
  111. package/dist/sdk/index.d.ts +1 -1
  112. package/dist/sdk/index.js +3 -3
  113. package/dist/sdk/index.js.map +1 -1
  114. package/dist/sdk/runtime.d.ts +340 -25
  115. package/dist/sdk/runtime.js +413 -25
  116. package/dist/sdk/runtime.js.map +1 -1
  117. package/docs/AGENT_GUIDE.md +3 -0
  118. package/docs/COMMANDS.md +10 -1
  119. package/docs/SDK.md +37 -0
  120. package/package.json +1 -1
  121. package/dist/cli-bundle/chunks/chunk-2RADY7IB.js.map +0 -1
  122. package/dist/cli-bundle/chunks/chunk-3FRNNVWY.js.map +0 -7
  123. package/dist/cli-bundle/chunks/chunk-ASMRSIDX.js.map +0 -7
  124. package/dist/cli-bundle/chunks/chunk-G4FKP4ID.js.map +0 -1
  125. package/dist/cli-bundle/chunks/chunk-KMXVZ2P7.js.map +0 -1
  126. package/dist/cli-bundle/chunks/chunk-ML27MHNM.js.map +0 -1
  127. package/dist/cli-bundle/chunks/chunk-PJPZTE7P.js.map +0 -7
  128. package/dist/cli-bundle/chunks/chunk-RDJXIAJB.js.map +0 -7
  129. package/dist/cli-bundle/chunks/chunk-RLHQ3G4M.js.map +0 -7
  130. package/dist/cli-bundle/chunks/chunk-TR2C6V5T.js.map +0 -7
  131. package/dist/cli-bundle/chunks/chunk-UVFJSKTF.js.map +0 -1
  132. package/dist/cli-bundle/chunks/chunk-XN5BEN2B.js.map +0 -1
  133. package/dist/cli-bundle/chunks/register-list-query-EEF33SUJ.js.map +0 -1
  134. package/dist/cli-bundle/chunks/register-list-query-S4FBWIWN.js.map +0 -7
  135. package/dist/cli-bundle/chunks/register-operations-HDE4FVW4.js.map +0 -1
  136. package/dist/cli-bundle/chunks/register-operations-QDU43FCG.js.map +0 -7
  137. /package/dist/cli-bundle/chunks/{chunk-D63PEJTB.js.map → chunk-26MFLA7K.js.map} +0 -0
  138. /package/dist/cli-bundle/chunks/{chunk-HI27UADG.js.map → chunk-2FKIIQMJ.js.map} +0 -0
  139. /package/dist/cli-bundle/chunks/{chunk-IYRG5AEC.js.map → chunk-5ZMZF53A.js.map} +0 -0
  140. /package/dist/cli-bundle/chunks/{chunk-YQEKE4FO.js.map → chunk-DQLP22K2.js.map} +0 -0
  141. /package/dist/cli-bundle/chunks/{chunk-ZMOPZFVT.js.map → chunk-GZ365M6E.js.map} +0 -0
  142. /package/dist/cli-bundle/chunks/{chunk-MYHFZNBO.js.map → chunk-KAJNWMBE.js.map} +0 -0
  143. /package/dist/cli-bundle/chunks/{chunk-TU5P744I.js.map → chunk-MBLHA6LR.js.map} +0 -0
  144. /package/dist/cli-bundle/chunks/{chunk-TTCJCKUJ.js.map → chunk-N4S7BV43.js.map} +0 -0
  145. /package/dist/cli-bundle/chunks/{chunk-GE44TQMC.js.map → chunk-P5SUMCU5.js.map} +0 -0
  146. /package/dist/cli-bundle/chunks/{chunk-YR5R4FMQ.js.map → chunk-S7J3GEHL.js.map} +0 -0
  147. /package/dist/cli-bundle/chunks/{chunk-EYPIUFWJ.js.map → chunk-VCGHRLJU.js.map} +0 -0
  148. /package/dist/cli-bundle/chunks/{chunk-P2WE5KCU.js.map → chunk-WDNPNW22.js.map} +0 -0
  149. /package/dist/cli-bundle/chunks/{chunk-SN5X5GTU.js.map → chunk-XXN2B2MJ.js.map} +0 -0
  150. /package/dist/cli-bundle/chunks/{chunk-GQOKFX2G.js.map → chunk-Y2736PT5.js.map} +0 -0
  151. /package/dist/cli-bundle/chunks/{chunk-FL625JJM.js.map → chunk-YHKXNGLA.js.map} +0 -0
  152. /package/dist/cli-bundle/chunks/{chunk-YUCKM3MD.js.map → chunk-YPE5MFPJ.js.map} +0 -0
  153. /package/dist/cli-bundle/chunks/{close-E3RLZSP2.js.map → close-5WY6QO5F.js.map} +0 -0
  154. /package/dist/cli-bundle/chunks/{close-K6BFI3OX.js.map → close-TKTFRL7N.js.map} +0 -0
  155. /package/dist/cli-bundle/chunks/{close-many-6NBL3PM4.js.map → close-many-HEPL66EG.js.map} +0 -0
  156. /package/dist/cli-bundle/chunks/{close-many-X4YKS3RO.js.map → close-many-U2KLQ3NL.js.map} +0 -0
  157. /package/dist/cli-bundle/chunks/{create-AMBMYP6F.js.map → create-KCQM6UYM.js.map} +0 -0
  158. /package/dist/cli-bundle/chunks/{create-TRIBYORN.js.map → create-LD4SEUD6.js.map} +0 -0
  159. /package/dist/cli-bundle/chunks/{plan-MK2QY3GA.js.map → plan-B42KBMX7.js.map} +0 -0
  160. /package/dist/cli-bundle/chunks/{plan-CJPKFRBK.js.map → plan-LUR7C24X.js.map} +0 -0
  161. /package/dist/cli-bundle/chunks/{profile-HTBFINKQ.js.map → profile-5F75MO5O.js.map} +0 -0
  162. /package/dist/cli-bundle/chunks/{profile-AQNHXOYA.js.map → profile-JRDMDGT5.js.map} +0 -0
  163. /package/dist/cli-bundle/chunks/{register-mutation-L5Q7AUDN.js.map → register-mutation-5UDT3WL3.js.map} +0 -0
  164. /package/dist/cli-bundle/chunks/{register-mutation-QFLRBCI7.js.map → register-mutation-7DMOYDPC.js.map} +0 -0
  165. /package/dist/cli-bundle/chunks/{register-setup-EGMTAXDC.js.map → register-setup-3GVJ7XPE.js.map} +0 -0
  166. /package/dist/cli-bundle/chunks/{register-setup-PNIO3L2P.js.map → register-setup-MPTTS52V.js.map} +0 -0
  167. /package/dist/cli-bundle/chunks/{update-SDIRJGSY.js.map → update-76CRUMC7.js.map} +0 -0
  168. /package/dist/cli-bundle/chunks/{update-MP4XLU56.js.map → update-ZMYVXM77.js.map} +0 -0
  169. /package/dist/cli-bundle/chunks/{update-many-34AIU6W7.js.map → update-many-QYQRGNPU.js.map} +0 -0
  170. /package/dist/cli-bundle/chunks/{update-many-JUPCNOKV.js.map → update-many-U4CEQWI4.js.map} +0 -0
@@ -116,9 +116,12 @@ pm release <item-id>
116
116
  | Open work only | `pm search "<keywords>" --status open` (drops closed-history noise; did-you-mean on typos) |
117
117
  | Scope search like list | `pm search "<keywords>" --type Task --assignee <name> --parent <id>` (full `pm list` filter parity) |
118
118
  | Items changed since last window | `pm list-all --updated-after <prev-run-ISO> --brief` (relative `-2h`/`-7d` also work) |
119
+ | Open items changed today | `pm list-open --today --brief` (local-midnight shorthand; mutually exclusive with `--updated-after`) |
120
+ | Items changed recently | `pm list-all --recent --brief` (last seven days; mutually exclusive with `--updated-after`) |
119
121
  | Single item | `pm get <id>` |
120
122
  | Full machine payload | `pm get <id> --full --json` |
121
123
  | Command flags | `pm <command> --help --json` |
124
+ | Command intent map | `pm contracts --summary --json` (one command plus terse intent per row; use before command-scoped contracts) |
122
125
  | Low-noise machine contracts | `pm contracts --command <command> --flags-only --json` |
123
126
  | Semantic index refresh | `pm reindex --mode semantic --progress` (stale-first by default; add `--full` to force full rebuild; requires the `search-advanced` package) |
124
127
  | Timeline | `pm activity --id <id> --limit 20` |
package/docs/COMMANDS.md CHANGED
@@ -7,6 +7,7 @@ Tracked implementation updates: [pm-52eh](../.agents/pm/features/pm-52eh.toon),
7
7
  ```bash
8
8
  pm <command> --help
9
9
  pm <command> --help --json
10
+ pm contracts --summary --json
10
11
  pm contracts --command <command> --flags-only --json
11
12
  ```
12
13
 
@@ -15,7 +16,7 @@ pm contracts --command <command> --flags-only --json
15
16
  - Prefer `pm context`, `pm search`, and narrow list commands before mutation.
16
17
  - Prefer TOON for reading and `--json` for strict parsing.
17
18
  - Use the [guide topic map](README.md#guide-topic-map) when optional `pm guide` local docs routing is needed.
18
- - Use `pm contracts` for machine clients.
19
+ - Use `pm contracts --summary --json` for the cheapest command map, then narrow with command-scoped contracts.
19
20
  - Every mutation writes history.
20
21
 
21
22
  Tracked documentation work: [pm-u9d0](../.agents/pm/epics/pm-u9d0.toon).
@@ -129,6 +130,10 @@ pm list-all --updated-after 2026-06-04T15:18:32Z --brief
129
130
  pm list-open --updated-after=-2h --brief
130
131
  pm list-all --created-after=-7d --status open
131
132
 
133
+ # Common list windows avoid date math (`list-open` keeps the view open-only).
134
+ pm list-open --today --brief
135
+ pm list-all --recent --brief
136
+
132
137
  # Search scoped to open work only (drops closed-history noise); statuses accept
133
138
  # all (no lifecycle restriction), open/closed/canceled aliases, or configured
134
139
  # ids, comma-separated, with a did-you-mean hint on typos.
@@ -141,6 +146,8 @@ pm search "reminder validation" --status all --limit 10
141
146
  pm search "calendar" --type Task --assignee alice --updated-after=-7d --parent pm-abcd
142
147
  ```
143
148
 
149
+ Use only one updated-at window per list call: `--today`, `--recent`, and `--updated-after` are mutually exclusive. `--today` starts at local midnight; `--recent` is the same as `--updated-after=-7d`.
150
+
144
151
  `pm get`, `pm history`, and `pm search` also accept command-local `--format json|toon`. `--format json` is equivalent to the global `--json` flag for that command, while `--format toon` keeps the default agent-readable output. Do not combine global `--json` with `--format toon`.
145
152
 
146
153
  `list`/`search` full and fields projections echo full filter metadata. Compact mode emits only active filters (plus runtime schema filters when present) and omits the default projection/sorting/now trailer keys for lower token cost.
@@ -858,12 +865,14 @@ Invariants:
858
865
 
859
866
  ```bash
860
867
  pm contracts --json
868
+ pm contracts --summary --json
861
869
  pm contracts --command create --flags-only --json
862
870
  pm contracts --action create --schema-only --json
863
871
  pm help create --json
864
872
  ```
865
873
 
866
874
  Agents should use runtime contracts instead of hard-coding flag lists. Contract output includes extension-provided command surfaces when active.
875
+ Use `pm contracts --summary --json` first when bootstrapping in a tight context window; it emits one command and terse intent per row before the agent requests heavier command-specific flags or schemas.
867
876
 
868
877
  ## Completion
869
878
 
package/docs/SDK.md CHANGED
@@ -106,6 +106,12 @@ Command/action contract exports:
106
106
  - `PmClient` / `runAction` (high-level in-process action execution for custom tools, bots, CI, and embedded runtimes)
107
107
  - Typed read primitives on `PmClient`: `get`, `list`, `search`, `context`, `next`, `aggregate`, and `stats`
108
108
  - Read primitive option/result contracts: `GetOptions` / `GetResult`, `ListOptions` / `ListResult`, `SearchOptions` / `SearchResult`, `ContextOptions` / `ContextResult`, `NextOptions` / `NextResult`, `AggregateOptions` / `AggregateResult`, `StatsCommandOptions` / `StatsResult`
109
+ - Typed annotation and relationship primitives on `PmClient`: `comments`, `notes`, `learnings`, `files`, `filesDiscover`, `docs`, `deps`, and `append`
110
+ - Annotation and relationship option/result contracts: `CommentsCommandOptions` / `CommentsResult`, `NotesCommandOptions` / `NotesResult`, `LearningsCommandOptions` / `LearningsResult`, `FilesCommandOptions` / `FilesResult`, `FilesDiscoverOptions` / `FilesDiscoverResult`, `DocsCommandOptions` / `DocsResult`, `DepsCommandOptions` / `DepsResult`, `AppendCommandOptions` / `AppendResult`
111
+ - Typed customization primitives on `PmClient`: `init`, `config`, `schema`, `schemaList`, `schemaShow`, `schemaAddType`, `schemaRemoveType`, `schemaAddStatus`, `schemaRemoveStatus`, `schemaAddField`, `schemaRemoveField`, `schemaListFields`, `schemaShowField`, `schemaApplyPreset`, `schemaInferTypes`, `schemaShowStatus`, `profile`, `profileList`, `profileShow`, `profileApply`, and `profileLint`
112
+ - Customization primitive option/result contracts: `InitCommandOptions` / `InitResult`, `ConfigCommandOptions` / `ConfigResult`, `SchemaSubcommand` / `SchemaResult` / `SchemaInspectResult`, `SchemaListResult`, `SchemaShowResult`, `SchemaAddTypeResult`, `SchemaRemoveTypeResult`, `SchemaAddStatusResult`, `SchemaRemoveStatusResult`, `SchemaAddFieldResult`, `SchemaRemoveFieldResult`, `SchemaListFieldsResult`, `SchemaShowFieldResult`, `SchemaApplyPresetResult`, `SchemaAddTypeInferResult`, `SchemaShowStatusResult`, `ProfileSubcommand` / `ProfileResult`, `ProfileListResult`, `ProfileShowResult`, `ProfileApplyResult`, `ProfileLintResult`
113
+ - Typed governance and maintenance primitives on `PmClient`: `validate`, `health`, and `gc`
114
+ - Governance and maintenance option/result contracts: `ValidateCommandOptions` / `ValidateResult`, `RunHealthOptions` / `HealthResult`, `GcCommandOptions` / `GcResult`
109
115
  - Typed package and extension lifecycle primitives on `PmClient`: `extension`, `extensionList`, `extensionActivate`, `extensionDeactivate`, `package`, `packageList`, `packageInstall`, `packageUninstall`, `packageDoctor`, `packageManage`, `packageDescribe`, `packageReload`, `packageCatalog`, `packageActivate`, `packageDeactivate`, and `upgrade`
110
116
  - Lifecycle primitive option/result contracts: `ExtensionCommandOptions` / `ExtensionCommandResult`, `PackageCommandOptions` / `PackageCommandResult`, `UpgradeCommandOptions` / `UpgradeResult`
111
117
  - `PM_CORE_COMMAND_NAMES`
@@ -450,6 +456,14 @@ const open = await pm.list({ status: "open", limit: "20" });
450
456
  const recommendation = await pm.next({ readyOnly: true });
451
457
  const grouped = await pm.aggregate({ groupBy: "status", count: true });
452
458
  const stats = await pm.stats({ metadataCoverage: true });
459
+ await pm.comments(created.item.id, { add: "Investigation context captured." });
460
+ await pm.files(created.item.id, { add: ["src/index.ts"], note: "entrypoint" });
461
+ await pm.docs(created.item.id, { add: ["docs/SDK.md"], note: "authoring reference" });
462
+ const graph = await pm.deps(created.item.id, { format: "graph" });
463
+ const types = await pm.schemaList();
464
+ const profiles = await pm.profileList();
465
+ const validation = await pm.validate({ checkResolution: true });
466
+ const health = await pm.health({ checkOnly: true, summary: true });
453
467
  const packages = await pm.packageList({ project: true });
454
468
  const doctor = await pm.packageDoctor({ project: true, isolated: true });
455
469
  const plannedUpgrade = await pm.upgrade(undefined, { dryRun: true, cliOnly: true });
@@ -501,6 +515,29 @@ payload shape with vocabulary-appropriate SDK signatures. `UpgradeResult` is the
501
515
  same structured payload rendered by the CLI, so embedded tools can own their
502
516
  presentation layer while sharing pm's package/install/doctor semantics.
503
517
 
518
+ Annotation and relationship convenience methods turn "project management =
519
+ context management" into a typed SDK surface. Use `pm.comments`, `pm.notes`,
520
+ `pm.learnings`, `pm.files`, `pm.docs`, `pm.deps`, and `pm.append` when an
521
+ embedded agent, package, or custom UI needs to add durable rationale, link
522
+ changed files/docs/tests, or inspect the item graph. `pm.filesDiscover` exposes
523
+ the same file-candidate discovery used by the CLI, so a custom tool can present
524
+ reviewable link suggestions instead of scraping git output itself.
525
+
526
+ Customization convenience methods are the SDK baseline for project-specific pm
527
+ tools. `pm.init` stages a tracker, `pm.config` reads/writes settings,
528
+ `pm.schema*` methods manage types/statuses/fields/presets, and `pm.profile*`
529
+ methods list, inspect, apply, and lint project archetypes. These helpers let a
530
+ package or app construct an opinionated project-management experience while
531
+ staying on the same schema/profile primitives the CLI and MCP use.
532
+
533
+ Governance and maintenance convenience methods expose the operational floor a
534
+ custom PM host should run before it trusts or publishes tracker state.
535
+ `pm.validate` checks resolution/history invariants, `pm.health` performs
536
+ read-only diagnostics, and `pm.gc` runs dry-run or explicit cleanup paths through
537
+ the same bounded maintenance engine as the CLI. Prefer these typed calls over
538
+ shelling out when building CI, editor integrations, or long-running agent
539
+ runtimes.
540
+
504
541
  `PmClient` and `runAction` share the same process-wide extension activation
505
542
  queue as MCP. Calls from one process are serialized across extension load,
506
543
  activation, dispatch, cleanup, and deactivate so active extension registries stay
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-cli",
3
- "version": "2026.7.8",
3
+ "version": "2026.7.9",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.10.0",