@unbrained/pm-cli 2026.5.1 → 2026.5.3-5

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 (265) hide show
  1. package/AGENTS.md +8 -1
  2. package/CHANGELOG.md +73 -4
  3. package/CONTRIBUTING.md +11 -5
  4. package/PRD.md +17 -1
  5. package/README.md +55 -1099
  6. package/SECURITY.md +6 -11
  7. package/dist/cli/bootstrap-args.d.ts +18 -0
  8. package/dist/cli/bootstrap-args.js +242 -0
  9. package/dist/cli/bootstrap-args.js.map +1 -0
  10. package/dist/cli/commander-usage.d.ts +17 -0
  11. package/dist/cli/commander-usage.js +178 -0
  12. package/dist/cli/commander-usage.js.map +1 -0
  13. package/dist/cli/commands/activity.d.ts +10 -0
  14. package/dist/cli/commands/activity.js +14 -10
  15. package/dist/cli/commands/activity.js.map +1 -1
  16. package/dist/cli/commands/aggregate.js.map +1 -1
  17. package/dist/cli/commands/append.js.map +1 -1
  18. package/dist/cli/commands/calendar.js +19 -34
  19. package/dist/cli/commands/calendar.js.map +1 -1
  20. package/dist/cli/commands/claim.js.map +1 -1
  21. package/dist/cli/commands/close.js.map +1 -1
  22. package/dist/cli/commands/comments-audit.js.map +1 -1
  23. package/dist/cli/commands/comments.js +1 -9
  24. package/dist/cli/commands/comments.js.map +1 -1
  25. package/dist/cli/commands/completion.js.map +1 -1
  26. package/dist/cli/commands/config.d.ts +21 -3
  27. package/dist/cli/commands/config.js +118 -2
  28. package/dist/cli/commands/config.js.map +1 -1
  29. package/dist/cli/commands/context.d.ts +90 -1
  30. package/dist/cli/commands/context.js +496 -12
  31. package/dist/cli/commands/context.js.map +1 -1
  32. package/dist/cli/commands/contracts.js.map +1 -1
  33. package/dist/cli/commands/create.js +2 -2
  34. package/dist/cli/commands/create.js.map +1 -1
  35. package/dist/cli/commands/dedupe-audit.js +2 -11
  36. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  37. package/dist/cli/commands/delete.js.map +1 -1
  38. package/dist/cli/commands/deps.js.map +1 -1
  39. package/dist/cli/commands/docs.js.map +1 -1
  40. package/dist/cli/commands/extension.js.map +1 -1
  41. package/dist/cli/commands/files.js +14 -2
  42. package/dist/cli/commands/files.js.map +1 -1
  43. package/dist/cli/commands/gc.js.map +1 -1
  44. package/dist/cli/commands/get.js.map +1 -1
  45. package/dist/cli/commands/health.js +16 -12
  46. package/dist/cli/commands/health.js.map +1 -1
  47. package/dist/cli/commands/history.js +1 -9
  48. package/dist/cli/commands/history.js.map +1 -1
  49. package/dist/cli/commands/index.js.map +1 -1
  50. package/dist/cli/commands/init.js.map +1 -1
  51. package/dist/cli/commands/learnings.js +1 -9
  52. package/dist/cli/commands/learnings.js.map +1 -1
  53. package/dist/cli/commands/list.d.ts +1 -0
  54. package/dist/cli/commands/list.js +13 -31
  55. package/dist/cli/commands/list.js.map +1 -1
  56. package/dist/cli/commands/normalize.js +14 -23
  57. package/dist/cli/commands/normalize.js.map +1 -1
  58. package/dist/cli/commands/notes.js +1 -9
  59. package/dist/cli/commands/notes.js.map +1 -1
  60. package/dist/cli/commands/reindex.js +2 -7
  61. package/dist/cli/commands/reindex.js.map +1 -1
  62. package/dist/cli/commands/restore.js.map +1 -1
  63. package/dist/cli/commands/search.js +4 -35
  64. package/dist/cli/commands/search.js.map +1 -1
  65. package/dist/cli/commands/stats.js.map +1 -1
  66. package/dist/cli/commands/templates.js.map +1 -1
  67. package/dist/cli/commands/test-all.js.map +1 -1
  68. package/dist/cli/commands/test-runs.js +1 -11
  69. package/dist/cli/commands/test-runs.js.map +1 -1
  70. package/dist/cli/commands/test.js.map +1 -1
  71. package/dist/cli/commands/update-many.js +1 -6
  72. package/dist/cli/commands/update-many.js.map +1 -1
  73. package/dist/cli/commands/update.js +2 -2
  74. package/dist/cli/commands/update.js.map +1 -1
  75. package/dist/cli/commands/validate.js +23 -18
  76. package/dist/cli/commands/validate.js.map +1 -1
  77. package/dist/cli/error-guidance.d.ts +13 -0
  78. package/dist/cli/error-guidance.js +56 -6
  79. package/dist/cli/error-guidance.js.map +1 -1
  80. package/dist/cli/extension-command-help.d.ts +48 -0
  81. package/dist/cli/extension-command-help.js +389 -0
  82. package/dist/cli/extension-command-help.js.map +1 -0
  83. package/dist/cli/extension-command-options.js.map +1 -1
  84. package/dist/cli/help-content.js +9 -3
  85. package/dist/cli/help-content.js.map +1 -1
  86. package/dist/cli/help-json-payload.d.ts +25 -0
  87. package/dist/cli/help-json-payload.js +265 -0
  88. package/dist/cli/help-json-payload.js.map +1 -0
  89. package/dist/cli/main.js +1000 -4456
  90. package/dist/cli/main.js.map +1 -1
  91. package/dist/cli/migration-gates.d.ts +22 -0
  92. package/dist/cli/migration-gates.js +146 -0
  93. package/dist/cli/migration-gates.js.map +1 -0
  94. package/dist/cli/register-list-query.d.ts +2 -0
  95. package/dist/cli/register-list-query.js +317 -0
  96. package/dist/cli/register-list-query.js.map +1 -0
  97. package/dist/cli/register-mutation.d.ts +2 -0
  98. package/dist/cli/register-mutation.js +795 -0
  99. package/dist/cli/register-mutation.js.map +1 -0
  100. package/dist/cli/register-operations.d.ts +2 -0
  101. package/dist/cli/register-operations.js +610 -0
  102. package/dist/cli/register-operations.js.map +1 -0
  103. package/dist/cli/register-setup.d.ts +2 -0
  104. package/dist/cli/register-setup.js +334 -0
  105. package/dist/cli/register-setup.js.map +1 -0
  106. package/dist/cli/registration-helpers.d.ts +53 -0
  107. package/dist/cli/registration-helpers.js +669 -0
  108. package/dist/cli/registration-helpers.js.map +1 -0
  109. package/dist/cli/shared-parsers.d.ts +6 -0
  110. package/dist/cli/shared-parsers.js +40 -0
  111. package/dist/cli/shared-parsers.js.map +1 -0
  112. package/dist/cli.d.ts +1 -1
  113. package/dist/cli.js +3 -1
  114. package/dist/cli.js.map +1 -1
  115. package/dist/core/extensions/extension-types.d.ts +605 -0
  116. package/dist/core/extensions/extension-types.js +22 -0
  117. package/dist/core/extensions/extension-types.js.map +1 -0
  118. package/dist/core/extensions/index.js.map +1 -1
  119. package/dist/core/extensions/item-fields.js.map +1 -1
  120. package/dist/core/extensions/loader.d.ts +2 -586
  121. package/dist/core/extensions/loader.js +3 -21
  122. package/dist/core/extensions/loader.js.map +1 -1
  123. package/dist/core/extensions/runtime-registrations.js.map +1 -1
  124. package/dist/core/fs/fs-utils.js.map +1 -1
  125. package/dist/core/fs/index.js.map +1 -1
  126. package/dist/core/history/history-stream-policy.js.map +1 -1
  127. package/dist/core/history/history.js.map +1 -1
  128. package/dist/core/history/index.js.map +1 -1
  129. package/dist/core/item/id.js.map +1 -1
  130. package/dist/core/item/index.js.map +1 -1
  131. package/dist/core/item/item-format.js.map +1 -1
  132. package/dist/core/item/parent-reference-policy.js.map +1 -1
  133. package/dist/core/item/parse.js +6 -0
  134. package/dist/core/item/parse.js.map +1 -1
  135. package/dist/core/item/sprint-release-format.js.map +1 -1
  136. package/dist/core/item/status.js.map +1 -1
  137. package/dist/core/item/type-registry.js.map +1 -1
  138. package/dist/core/lock/index.js.map +1 -1
  139. package/dist/core/lock/lock.js +1 -6
  140. package/dist/core/lock/lock.js.map +1 -1
  141. package/dist/core/output/command-aware.js.map +1 -1
  142. package/dist/core/output/output.js.map +1 -1
  143. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  144. package/dist/core/schema/runtime-field-values.js.map +1 -1
  145. package/dist/core/schema/runtime-schema.js.map +1 -1
  146. package/dist/core/search/cache.js +1 -7
  147. package/dist/core/search/cache.js.map +1 -1
  148. package/dist/core/search/embedding-batches.js +4 -0
  149. package/dist/core/search/embedding-batches.js.map +1 -1
  150. package/dist/core/search/http-client.d.ts +29 -0
  151. package/dist/core/search/http-client.js +64 -0
  152. package/dist/core/search/http-client.js.map +1 -0
  153. package/dist/core/search/providers.d.ts +3 -13
  154. package/dist/core/search/providers.js +19 -88
  155. package/dist/core/search/providers.js.map +1 -1
  156. package/dist/core/search/semantic-defaults.js +2 -7
  157. package/dist/core/search/semantic-defaults.js.map +1 -1
  158. package/dist/core/search/vector-stores.d.ts +4 -13
  159. package/dist/core/search/vector-stores.js +40 -93
  160. package/dist/core/search/vector-stores.js.map +1 -1
  161. package/dist/core/sentry/helpers.d.ts +27 -0
  162. package/dist/core/sentry/helpers.js +171 -0
  163. package/dist/core/sentry/helpers.js.map +1 -0
  164. package/dist/core/sentry/instrument.d.ts +25 -0
  165. package/dist/core/sentry/instrument.js +204 -0
  166. package/dist/core/sentry/instrument.js.map +1 -0
  167. package/dist/core/shared/command-types.js.map +1 -1
  168. package/dist/core/shared/conflict-markers.js.map +1 -1
  169. package/dist/core/shared/constants.d.ts +3 -0
  170. package/dist/core/shared/constants.js +58 -1
  171. package/dist/core/shared/constants.js.map +1 -1
  172. package/dist/core/shared/errors.js.map +1 -1
  173. package/dist/core/shared/index.d.ts +1 -0
  174. package/dist/core/shared/index.js +1 -0
  175. package/dist/core/shared/index.js.map +1 -1
  176. package/dist/core/shared/primitives.d.ts +13 -0
  177. package/dist/core/shared/primitives.js +33 -0
  178. package/dist/core/shared/primitives.js.map +1 -0
  179. package/dist/core/shared/serialization.js.map +1 -1
  180. package/dist/core/shared/text-normalization.js.map +1 -1
  181. package/dist/core/shared/time.js.map +1 -1
  182. package/dist/core/store/front-matter-cache.d.ts +6 -0
  183. package/dist/core/store/front-matter-cache.js +150 -0
  184. package/dist/core/store/front-matter-cache.js.map +1 -0
  185. package/dist/core/store/index.js.map +1 -1
  186. package/dist/core/store/item-format-migration.js.map +1 -1
  187. package/dist/core/store/item-store.js +46 -36
  188. package/dist/core/store/item-store.js.map +1 -1
  189. package/dist/core/store/paths.js.map +1 -1
  190. package/dist/core/store/settings.js +36 -0
  191. package/dist/core/store/settings.js.map +1 -1
  192. package/dist/core/telemetry/consent.js.map +1 -1
  193. package/dist/core/telemetry/observability.d.ts +24 -0
  194. package/dist/core/telemetry/observability.js +185 -0
  195. package/dist/core/telemetry/observability.js.map +1 -0
  196. package/dist/core/telemetry/runtime.d.ts +29 -3
  197. package/dist/core/telemetry/runtime.js +337 -25
  198. package/dist/core/telemetry/runtime.js.map +1 -1
  199. package/dist/core/test/background-runs.js.map +1 -1
  200. package/dist/core/test/item-test-run-tracking.js.map +1 -1
  201. package/dist/sdk/cli-contracts.js +28 -0
  202. package/dist/sdk/cli-contracts.js.map +1 -1
  203. package/dist/sdk/index.d.ts +1 -1
  204. package/dist/sdk/index.js.map +1 -1
  205. package/dist/types/index.js.map +1 -1
  206. package/dist/types.d.ts +21 -0
  207. package/dist/types.js +11 -0
  208. package/dist/types.js.map +1 -1
  209. package/docs/AGENT_GUIDE.md +125 -0
  210. package/docs/ARCHITECTURE.md +201 -478
  211. package/docs/COMMANDS.md +209 -0
  212. package/docs/CONFIGURATION.md +146 -0
  213. package/docs/EXTENSIONS.md +146 -645
  214. package/docs/QUICKSTART.md +108 -0
  215. package/docs/README.md +70 -0
  216. package/docs/RELEASING.md +92 -50
  217. package/docs/SDK.md +127 -68
  218. package/docs/TESTING.md +125 -0
  219. package/docs/examples/starter-extension/README.md +39 -25
  220. package/package.json +24 -11
  221. package/dist/command-types.d.ts +0 -1
  222. package/dist/command-types.js +0 -2
  223. package/dist/command-types.js.map +0 -1
  224. package/dist/constants.d.ts +0 -1
  225. package/dist/constants.js +0 -2
  226. package/dist/constants.js.map +0 -1
  227. package/dist/errors.d.ts +0 -1
  228. package/dist/errors.js +0 -2
  229. package/dist/errors.js.map +0 -1
  230. package/dist/fs-utils.d.ts +0 -1
  231. package/dist/fs-utils.js +0 -2
  232. package/dist/fs-utils.js.map +0 -1
  233. package/dist/history.d.ts +0 -1
  234. package/dist/history.js +0 -2
  235. package/dist/history.js.map +0 -1
  236. package/dist/id.d.ts +0 -1
  237. package/dist/id.js +0 -2
  238. package/dist/id.js.map +0 -1
  239. package/dist/item-format.d.ts +0 -1
  240. package/dist/item-format.js +0 -2
  241. package/dist/item-format.js.map +0 -1
  242. package/dist/item-store.d.ts +0 -1
  243. package/dist/item-store.js +0 -2
  244. package/dist/item-store.js.map +0 -1
  245. package/dist/lock.d.ts +0 -1
  246. package/dist/lock.js +0 -2
  247. package/dist/lock.js.map +0 -1
  248. package/dist/output.d.ts +0 -1
  249. package/dist/output.js +0 -2
  250. package/dist/output.js.map +0 -1
  251. package/dist/parse.d.ts +0 -1
  252. package/dist/parse.js +0 -2
  253. package/dist/parse.js.map +0 -1
  254. package/dist/paths.d.ts +0 -1
  255. package/dist/paths.js +0 -2
  256. package/dist/paths.js.map +0 -1
  257. package/dist/serialization.d.ts +0 -1
  258. package/dist/serialization.js +0 -2
  259. package/dist/serialization.js.map +0 -1
  260. package/dist/settings.d.ts +0 -1
  261. package/dist/settings.js +0 -2
  262. package/dist/settings.js.map +0 -1
  263. package/dist/time.d.ts +0 -1
  264. package/dist/time.js +0 -2
  265. package/dist/time.js.map +0 -1
@@ -0,0 +1,209 @@
1
+ # Command Reference
2
+
3
+ This is a task-oriented command guide. For exact flags, use runtime help because extensions and settings can change the active surface:
4
+
5
+ ```bash
6
+ pm <command> --help
7
+ pm <command> --help --json
8
+ pm contracts --command <command> --flags-only --json
9
+ ```
10
+
11
+ ## Agent Quick Context
12
+
13
+ - Prefer `pm context`, `pm search`, and narrow list commands before mutation.
14
+ - Prefer TOON for reading and `--json` for strict parsing.
15
+ - Use `pm contracts` for machine clients.
16
+ - Every mutation writes history.
17
+
18
+ Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
19
+
20
+ ## Command Families
21
+
22
+ | Family | Commands | Purpose |
23
+ |--------|----------|---------|
24
+ | Bootstrap | `init`, `config`, `health` | create and inspect tracker setup |
25
+ | Triage | `context`, `search`, `list*`, `aggregate`, `dedupe-audit` | find work and audit decomposition |
26
+ | Lifecycle | `create`, `claim`, `update`, `append`, `close`, `release`, `delete`, `start-task`, `pause-task`, `close-task` | mutate item state |
27
+ | Logs | `comments`, `notes`, `learnings`, `comments-audit` | record progress and durable context |
28
+ | Links | `files`, `docs`, `test`, `deps` | connect items to artifacts, tests, and relationships |
29
+ | Verification | `test`, `test-all`, `test-runs`, `validate`, `gc` | run linked tests and repository checks |
30
+ | History | `history`, `activity`, `restore`, `stats` | inspect and recover item state |
31
+ | Calendar | `calendar`, `cal` | project deadlines, reminders, and events |
32
+ | Extensions | `extension`, extension command groups | install, manage, and run extension commands |
33
+ | Machines | `contracts`, `completion`, `help` | expose stable command contracts and shell helpers |
34
+
35
+ ## Bootstrap
36
+
37
+ ```bash
38
+ pm init
39
+ pm config project list
40
+ pm health --check-only
41
+ ```
42
+
43
+ `pm init` creates `.agents/pm`. `pm health --check-only` inspects without refreshing optional search artifacts.
44
+
45
+ ## Triage
46
+
47
+ ```bash
48
+ pm context --limit 10
49
+ pm search "calendar reminder validation" --limit 10
50
+ pm list-open --type Task --priority 1 --limit 20
51
+ pm list-in-progress --limit 20
52
+ pm aggregate --group-by parent,type --status open
53
+ pm dedupe-audit --mode parent_scope --limit 20
54
+ ```
55
+
56
+ Use `context` first for a compact active-work snapshot. Use `search` when the request names a concept, component, or prior issue.
57
+
58
+ ## Create and Update
59
+
60
+ Minimal progressive create:
61
+
62
+ ```bash
63
+ pm create \
64
+ --title "Document command contracts" \
65
+ --description "Add command contract examples for agents." \
66
+ --type Task \
67
+ --status open \
68
+ --priority 1 \
69
+ --create-mode progressive
70
+ ```
71
+
72
+ Strict create is best when metadata is ready:
73
+
74
+ ```bash
75
+ pm create \
76
+ --title "Fix restore replay" \
77
+ --description "Restore should replay patches through the target version." \
78
+ --type Issue \
79
+ --status open \
80
+ --priority 1 \
81
+ --tags "restore,history" \
82
+ --ac "Restore reproduces the target state and has regression coverage." \
83
+ --message "Create restore replay issue"
84
+ ```
85
+
86
+ Update existing work:
87
+
88
+ ```bash
89
+ pm update <id> --status in_progress --message "Start implementation"
90
+ pm update <id> --deadline +1d --estimate 120
91
+ pm update <id> --parent <parent-id>
92
+ pm append <id> --body "Detailed implementation notes."
93
+ ```
94
+
95
+ Use `pm close <id> "<reason>"` instead of `pm update --status closed`.
96
+
97
+ ## Lifecycle Aliases
98
+
99
+ Lifecycle aliases combine claim, status, and close operations into a single command:
100
+
101
+ ```bash
102
+ pm start-task <id> # claim + move to in_progress
103
+ pm pause-task <id> # move to open + release claim
104
+ pm close-task <id> "<reason>" # close + release assignment
105
+ ```
106
+
107
+ ## Ownership
108
+
109
+ ```bash
110
+ pm claim <id>
111
+ pm release <id>
112
+ pm release <id> --allow-audit-release --author <you>
113
+ ```
114
+
115
+ `claim` is the normal start signal. Use `--force` only when explicitly overriding terminal-state or lock conflicts.
116
+
117
+ ## Logs
118
+
119
+ ```bash
120
+ pm comments <id> "Implemented command parsing fix."
121
+ pm notes <id> --add "Keep renderer changes isolated to TOON output."
122
+ pm learnings <id> --add "Use runtime contracts instead of duplicating flag lists."
123
+ ```
124
+
125
+ Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance.
126
+
127
+ ## Linked Artifacts
128
+
129
+ ```bash
130
+ pm files <id> --add path=src/cli/main.ts,scope=project,note="command wiring"
131
+ pm files <id> --add-glob "src/cli/**/*.ts"
132
+ pm docs <id> --add path=docs/COMMANDS.md,scope=project,note="public command docs"
133
+ pm deps <id> --format tree
134
+ ```
135
+
136
+ Linked files and docs keep reviews reproducible. `deps` is read-only and projects item relationships.
137
+
138
+ ## Linked Tests
139
+
140
+ ```bash
141
+ pm test <id> --add command="node scripts/run-tests.mjs test -- tests/unit/output.spec.ts",scope=project,timeout_seconds=240
142
+ pm test <id> --run --progress
143
+ pm test-all --status in_progress --progress
144
+ ```
145
+
146
+ Linked test commands should be sandbox-safe. Prefer `node scripts/run-tests.mjs ...` because it sets temporary `PM_PATH` and `PM_GLOBAL_PATH`.
147
+
148
+ Strict linked-test guards:
149
+
150
+ ```bash
151
+ pm test <id> --run \
152
+ --check-context \
153
+ --fail-on-context-mismatch \
154
+ --fail-on-skipped \
155
+ --require-assertions-for-pm
156
+ ```
157
+
158
+ ## Calendar and Context
159
+
160
+ ```bash
161
+ pm calendar --view week --date today --full-period
162
+ pm calendar --from today --to +7d --include deadlines,reminders,events
163
+ pm context --from today --to +7d --limit 10
164
+ ```
165
+
166
+ `calendar` defaults to markdown for human and agent readability. Other commands default to TOON unless configured otherwise.
167
+
168
+ ## Validation and Maintenance
169
+
170
+ ```bash
171
+ pm validate --check-resolution --check-history-drift
172
+ pm validate --check-files --scan-mode tracked-all
173
+ pm normalize --dry-run --json
174
+ pm gc --dry-run
175
+ ```
176
+
177
+ Use dry-run modes before broad lifecycle or cleanup changes.
178
+
179
+ ## History and Recovery
180
+
181
+ ```bash
182
+ pm history <id> --limit 20
183
+ pm history <id> --diff --verify
184
+ pm activity --id <id> --limit 50
185
+ pm restore <id> <timestamp-or-version>
186
+ ```
187
+
188
+ History is append-only. Restore appends a new restore event instead of rewriting old history.
189
+
190
+ ## Machine Contracts
191
+
192
+ ```bash
193
+ pm contracts --json
194
+ pm contracts --command create --flags-only --json
195
+ pm contracts --action create --schema-only --json
196
+ pm help create --json
197
+ ```
198
+
199
+ Agents should use runtime contracts instead of hard-coding flag lists. Contract output includes extension-provided command surfaces when active.
200
+
201
+ ## Completion
202
+
203
+ ```bash
204
+ pm completion bash
205
+ pm completion zsh
206
+ pm completion fish
207
+ ```
208
+
209
+ Generated completions resolve tags lazily by default. Use `--eager-tags` only when embedding static tags is required.
@@ -0,0 +1,146 @@
1
+ # Configuration
2
+
3
+ `pm` reads settings from the project tracker root and optional global profile. Use this page for public, user-facing configuration. Use `pm config ... list` and `pm config ... export` for the active runtime shape.
4
+
5
+ ## Agent Quick Context
6
+
7
+ - Do not override `PM_PATH` for real repository tracking.
8
+ - Do set `PM_AUTHOR` for maintainer and agent mutations.
9
+ - Use `--json` only when strict parsing is needed.
10
+ - Use `pm contracts` for current command/schema metadata.
11
+
12
+ Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
13
+
14
+ ## Configuration Commands
15
+
16
+ ```bash
17
+ pm config project list
18
+ pm config project export --json
19
+ pm config project get item-format --json
20
+ pm config project set item-format --format toon
21
+ pm config project set test-result-tracking --policy enabled
22
+ ```
23
+
24
+ Scopes:
25
+
26
+ - `project` updates `.agents/pm/settings.json`.
27
+ - `global` updates the global profile under `PM_GLOBAL_PATH` or the default global root.
28
+
29
+ Precedence:
30
+
31
+ 1. CLI flags
32
+ 2. environment variables
33
+ 3. project settings
34
+ 4. global settings
35
+ 5. built-in defaults
36
+
37
+ ## Common Settings
38
+
39
+ | Setting | Purpose |
40
+ |---------|---------|
41
+ | `id_prefix` | generated item ID prefix, default `pm-` |
42
+ | `author_default` | fallback mutation author |
43
+ | `item_format` | `toon` or `json_markdown` item files |
44
+ | `output.default_format` | default renderer, usually `toon` |
45
+ | `locks.ttl_seconds` | stale lock threshold |
46
+ | `history.missing_stream` | `auto_create` or `strict_error` |
47
+ | `testing.record_results_to_items` | persist bounded linked-test summaries |
48
+ | `validation.sprint_release_format` | `warn` or `strict_error` |
49
+ | `validation.parent_reference` | `warn` or `strict_error` |
50
+ | `item_types.definitions[]` | custom item types and type options |
51
+ | `search.*` | search mode, scoring, providers, and vector settings |
52
+
53
+ ## Environment Variables
54
+
55
+ | Variable | Use |
56
+ |----------|-----|
57
+ | `PM_AUTHOR` | explicit mutation author |
58
+ | `PM_PATH` | override project tracker root for tests or sandboxes |
59
+ | `PM_GLOBAL_PATH` | override global profile root for tests or sandboxes |
60
+ | `PM_OLLAMA_MODEL` | choose default Ollama embedding model |
61
+ | `PM_DISABLE_OLLAMA_AUTO_DEFAULTS` | disable implicit Ollama search defaults |
62
+
63
+ Tests should set both `PM_PATH` and `PM_GLOBAL_PATH` to temporary directories. The wrapper `node scripts/run-tests.mjs ...` does that automatically.
64
+
65
+ ## Item Storage Format
66
+
67
+ TOON is the default:
68
+
69
+ ```bash
70
+ pm config project set item-format --format toon
71
+ ```
72
+
73
+ JSON-front-matter markdown is also supported:
74
+
75
+ ```bash
76
+ pm config project set item-format --format json_markdown
77
+ ```
78
+
79
+ Changing item format runs migration on item files. History stays JSONL.
80
+
81
+ ## Output Format
82
+
83
+ Most commands default to sparse TOON:
84
+
85
+ ```bash
86
+ pm list-open --limit 10
87
+ ```
88
+
89
+ Use JSON for strict machine parsing:
90
+
91
+ ```bash
92
+ pm get <id> --json
93
+ pm contracts --json
94
+ ```
95
+
96
+ `pm calendar` defaults to markdown because date-centric summaries are easier to scan in that format.
97
+
98
+ ## Validation Policies
99
+
100
+ ```bash
101
+ pm config project set sprint-release-format-policy --policy warn
102
+ pm config project set parent-reference-policy --policy strict_error
103
+ pm config project set history-missing-stream-policy --policy auto_create
104
+ pm config project set test-result-tracking --policy enabled
105
+ ```
106
+
107
+ Use standalone checks when validating a repository:
108
+
109
+ ```bash
110
+ pm validate --check-resolution --check-history-drift
111
+ pm validate --check-files --scan-mode tracked-all
112
+ pm health --check-only
113
+ ```
114
+
115
+ ## Search Configuration
116
+
117
+ Keyword search is always available:
118
+
119
+ ```bash
120
+ pm search "release docs" --mode keyword --limit 10
121
+ ```
122
+
123
+ Semantic and hybrid search can use built-in OpenAI-compatible or Ollama providers plus vector stores such as Qdrant or LanceDB. If local Ollama is available and semantic settings are unset, `pm` can resolve local defaults automatically.
124
+
125
+ Useful commands:
126
+
127
+ ```bash
128
+ pm search "calendar reminders" --mode hybrid --limit 10
129
+ pm reindex --mode hybrid --progress
130
+ pm health --check-only
131
+ ```
132
+
133
+ ## Custom Item Types
134
+
135
+ Custom item types can be defined in settings and by extensions. Runtime type resolution affects create/update validation, list/search/calendar filters, completions, and storage folders.
136
+
137
+ Use runtime contracts for exact active types:
138
+
139
+ ```bash
140
+ pm contracts --json
141
+ pm create --help --type Task
142
+ ```
143
+
144
+ ## Public Documentation Boundary
145
+
146
+ Public docs should describe supported user configuration only. Ignored local operations material, unpublished evidence logs, credentials, hostnames, and private service details must stay outside tracked docs and package output.