@unbrained/pm-cli 2026.5.1-2 → 2026.5.2

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 (200) hide show
  1. package/CHANGELOG.md +15 -4
  2. package/CONTRIBUTING.md +11 -5
  3. package/PRD.md +17 -1
  4. package/README.md +49 -1101
  5. package/SECURITY.md +6 -11
  6. package/dist/cli/commands/activity.d.ts +10 -0
  7. package/dist/cli/commands/activity.js +13 -1
  8. package/dist/cli/commands/activity.js.map +1 -1
  9. package/dist/cli/commands/aggregate.js.map +1 -1
  10. package/dist/cli/commands/append.js.map +1 -1
  11. package/dist/cli/commands/calendar.js +16 -5
  12. package/dist/cli/commands/calendar.js.map +1 -1
  13. package/dist/cli/commands/claim.js.map +1 -1
  14. package/dist/cli/commands/close.js.map +1 -1
  15. package/dist/cli/commands/comments-audit.js.map +1 -1
  16. package/dist/cli/commands/comments.js.map +1 -1
  17. package/dist/cli/commands/completion.js.map +1 -1
  18. package/dist/cli/commands/config.js.map +1 -1
  19. package/dist/cli/commands/context.js +22 -0
  20. package/dist/cli/commands/context.js.map +1 -1
  21. package/dist/cli/commands/contracts.js.map +1 -1
  22. package/dist/cli/commands/create.js +2 -2
  23. package/dist/cli/commands/create.js.map +1 -1
  24. package/dist/cli/commands/dedupe-audit.js.map +1 -1
  25. package/dist/cli/commands/delete.js.map +1 -1
  26. package/dist/cli/commands/deps.js.map +1 -1
  27. package/dist/cli/commands/docs.js.map +1 -1
  28. package/dist/cli/commands/extension.js.map +1 -1
  29. package/dist/cli/commands/files.js.map +1 -1
  30. package/dist/cli/commands/gc.js.map +1 -1
  31. package/dist/cli/commands/get.js.map +1 -1
  32. package/dist/cli/commands/health.js +16 -12
  33. package/dist/cli/commands/health.js.map +1 -1
  34. package/dist/cli/commands/history.js.map +1 -1
  35. package/dist/cli/commands/index.js.map +1 -1
  36. package/dist/cli/commands/init.js.map +1 -1
  37. package/dist/cli/commands/learnings.js.map +1 -1
  38. package/dist/cli/commands/list.d.ts +1 -0
  39. package/dist/cli/commands/list.js +10 -2
  40. package/dist/cli/commands/list.js.map +1 -1
  41. package/dist/cli/commands/normalize.js +5 -17
  42. package/dist/cli/commands/normalize.js.map +1 -1
  43. package/dist/cli/commands/notes.js.map +1 -1
  44. package/dist/cli/commands/reindex.js.map +1 -1
  45. package/dist/cli/commands/restore.js.map +1 -1
  46. package/dist/cli/commands/search.js.map +1 -1
  47. package/dist/cli/commands/stats.js.map +1 -1
  48. package/dist/cli/commands/templates.js.map +1 -1
  49. package/dist/cli/commands/test-all.js.map +1 -1
  50. package/dist/cli/commands/test-runs.js.map +1 -1
  51. package/dist/cli/commands/test.js.map +1 -1
  52. package/dist/cli/commands/update-many.js +1 -6
  53. package/dist/cli/commands/update-many.js.map +1 -1
  54. package/dist/cli/commands/update.js +2 -2
  55. package/dist/cli/commands/update.js.map +1 -1
  56. package/dist/cli/commands/validate.js +11 -17
  57. package/dist/cli/commands/validate.js.map +1 -1
  58. package/dist/cli/error-guidance.js +13 -2
  59. package/dist/cli/error-guidance.js.map +1 -1
  60. package/dist/cli/extension-command-options.js.map +1 -1
  61. package/dist/cli/help-content.js.map +1 -1
  62. package/dist/cli/main.js +29 -13
  63. package/dist/cli/main.js.map +1 -1
  64. package/dist/cli.d.ts +1 -1
  65. package/dist/cli.js +3 -1
  66. package/dist/cli.js.map +1 -1
  67. package/dist/core/extensions/extension-types.d.ts +605 -0
  68. package/dist/core/extensions/extension-types.js +22 -0
  69. package/dist/core/extensions/extension-types.js.map +1 -0
  70. package/dist/core/extensions/index.js.map +1 -1
  71. package/dist/core/extensions/item-fields.js.map +1 -1
  72. package/dist/core/extensions/loader.d.ts +2 -586
  73. package/dist/core/extensions/loader.js +3 -21
  74. package/dist/core/extensions/loader.js.map +1 -1
  75. package/dist/core/extensions/runtime-registrations.js.map +1 -1
  76. package/dist/core/fs/fs-utils.js.map +1 -1
  77. package/dist/core/fs/index.js.map +1 -1
  78. package/dist/core/history/history-stream-policy.js.map +1 -1
  79. package/dist/core/history/history.js.map +1 -1
  80. package/dist/core/history/index.js.map +1 -1
  81. package/dist/core/item/id.js.map +1 -1
  82. package/dist/core/item/index.js.map +1 -1
  83. package/dist/core/item/item-format.js.map +1 -1
  84. package/dist/core/item/parent-reference-policy.js.map +1 -1
  85. package/dist/core/item/parse.js +6 -0
  86. package/dist/core/item/parse.js.map +1 -1
  87. package/dist/core/item/sprint-release-format.js.map +1 -1
  88. package/dist/core/item/status.js.map +1 -1
  89. package/dist/core/item/type-registry.js.map +1 -1
  90. package/dist/core/lock/index.js.map +1 -1
  91. package/dist/core/lock/lock.js +1 -6
  92. package/dist/core/lock/lock.js.map +1 -1
  93. package/dist/core/output/command-aware.js.map +1 -1
  94. package/dist/core/output/output.js.map +1 -1
  95. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  96. package/dist/core/schema/runtime-field-values.js.map +1 -1
  97. package/dist/core/schema/runtime-schema.js.map +1 -1
  98. package/dist/core/search/cache.js +1 -7
  99. package/dist/core/search/cache.js.map +1 -1
  100. package/dist/core/search/embedding-batches.js +4 -0
  101. package/dist/core/search/embedding-batches.js.map +1 -1
  102. package/dist/core/search/providers.js +1 -20
  103. package/dist/core/search/providers.js.map +1 -1
  104. package/dist/core/search/semantic-defaults.js.map +1 -1
  105. package/dist/core/search/vector-stores.d.ts +1 -0
  106. package/dist/core/search/vector-stores.js +23 -27
  107. package/dist/core/search/vector-stores.js.map +1 -1
  108. package/dist/core/sentry/helpers.d.ts +6 -0
  109. package/dist/core/sentry/helpers.js +73 -0
  110. package/dist/core/sentry/helpers.js.map +1 -0
  111. package/dist/core/sentry/instrument.d.ts +4 -0
  112. package/dist/core/sentry/instrument.js +173 -0
  113. package/dist/core/sentry/instrument.js.map +1 -0
  114. package/dist/core/shared/command-types.js.map +1 -1
  115. package/dist/core/shared/conflict-markers.js.map +1 -1
  116. package/dist/core/shared/constants.js.map +1 -1
  117. package/dist/core/shared/errors.js.map +1 -1
  118. package/dist/core/shared/index.d.ts +1 -0
  119. package/dist/core/shared/index.js +1 -0
  120. package/dist/core/shared/index.js.map +1 -1
  121. package/dist/core/shared/primitives.d.ts +13 -0
  122. package/dist/core/shared/primitives.js +33 -0
  123. package/dist/core/shared/primitives.js.map +1 -0
  124. package/dist/core/shared/serialization.js.map +1 -1
  125. package/dist/core/shared/text-normalization.js.map +1 -1
  126. package/dist/core/shared/time.js.map +1 -1
  127. package/dist/core/store/index.js.map +1 -1
  128. package/dist/core/store/item-format-migration.js.map +1 -1
  129. package/dist/core/store/item-store.js +44 -35
  130. package/dist/core/store/item-store.js.map +1 -1
  131. package/dist/core/store/paths.js.map +1 -1
  132. package/dist/core/store/settings.js.map +1 -1
  133. package/dist/core/telemetry/consent.js.map +1 -1
  134. package/dist/core/telemetry/runtime.d.ts +2 -0
  135. package/dist/core/telemetry/runtime.js +40 -13
  136. package/dist/core/telemetry/runtime.js.map +1 -1
  137. package/dist/core/test/background-runs.js.map +1 -1
  138. package/dist/core/test/item-test-run-tracking.js.map +1 -1
  139. package/dist/sdk/cli-contracts.js.map +1 -1
  140. package/dist/sdk/index.d.ts +1 -1
  141. package/dist/sdk/index.js.map +1 -1
  142. package/dist/types/index.js.map +1 -1
  143. package/dist/types.js.map +1 -1
  144. package/docs/AGENT_GUIDE.md +125 -0
  145. package/docs/ARCHITECTURE.md +195 -478
  146. package/docs/COMMANDS.md +199 -0
  147. package/docs/CONFIGURATION.md +146 -0
  148. package/docs/EXTENSIONS.md +146 -645
  149. package/docs/QUICKSTART.md +108 -0
  150. package/docs/README.md +70 -0
  151. package/docs/RELEASING.md +50 -37
  152. package/docs/SDK.md +127 -68
  153. package/docs/TESTING.md +125 -0
  154. package/docs/examples/starter-extension/README.md +39 -25
  155. package/package.json +9 -1
  156. package/dist/command-types.d.ts +0 -1
  157. package/dist/command-types.js +0 -2
  158. package/dist/command-types.js.map +0 -1
  159. package/dist/constants.d.ts +0 -1
  160. package/dist/constants.js +0 -2
  161. package/dist/constants.js.map +0 -1
  162. package/dist/errors.d.ts +0 -1
  163. package/dist/errors.js +0 -2
  164. package/dist/errors.js.map +0 -1
  165. package/dist/fs-utils.d.ts +0 -1
  166. package/dist/fs-utils.js +0 -2
  167. package/dist/fs-utils.js.map +0 -1
  168. package/dist/history.d.ts +0 -1
  169. package/dist/history.js +0 -2
  170. package/dist/history.js.map +0 -1
  171. package/dist/id.d.ts +0 -1
  172. package/dist/id.js +0 -2
  173. package/dist/id.js.map +0 -1
  174. package/dist/item-format.d.ts +0 -1
  175. package/dist/item-format.js +0 -2
  176. package/dist/item-format.js.map +0 -1
  177. package/dist/item-store.d.ts +0 -1
  178. package/dist/item-store.js +0 -2
  179. package/dist/item-store.js.map +0 -1
  180. package/dist/lock.d.ts +0 -1
  181. package/dist/lock.js +0 -2
  182. package/dist/lock.js.map +0 -1
  183. package/dist/output.d.ts +0 -1
  184. package/dist/output.js +0 -2
  185. package/dist/output.js.map +0 -1
  186. package/dist/parse.d.ts +0 -1
  187. package/dist/parse.js +0 -2
  188. package/dist/parse.js.map +0 -1
  189. package/dist/paths.d.ts +0 -1
  190. package/dist/paths.js +0 -2
  191. package/dist/paths.js.map +0 -1
  192. package/dist/serialization.d.ts +0 -1
  193. package/dist/serialization.js +0 -2
  194. package/dist/serialization.js.map +0 -1
  195. package/dist/settings.d.ts +0 -1
  196. package/dist/settings.js +0 -2
  197. package/dist/settings.js.map +0 -1
  198. package/dist/time.d.ts +0 -1
  199. package/dist/time.js +0 -2
  200. package/dist/time.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2026.5.2] - 2026-05-02
11
+
12
+ ### Changed
13
+ - Reworked the README and public docs into progressive, agent-oriented pages with GitHub-compatible links and `pm` tracker cross-references.
14
+ - Hardened Sentry signal quality by suppressing expected handled `PmCliError` usage/validation failures while retaining unexpected exception capture.
15
+ - Added optional token-gated Sentry release and sourcemap upload to the free GitHub release workflow so published CLI stack traces can resolve source context when Sentry credentials are configured.
16
+ - Updated generated GitHub release notes so closed release-tagged `pm` evidence remains visible after the release item is completed.
17
+
18
+ ### Security
19
+ - Kept private operations material out of public docs and package output; local production operations artifacts remain ignored by git.
20
+
10
21
  ## [2026.5.1-2] - 2026-05-01
11
22
 
12
23
  ### Fixed
@@ -42,14 +53,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
53
  - Improved calendar UX ergonomics by accepting `today` for `--date`/`--from`/`--to` boundaries and by adding explicit recurrence delimiter guidance for malformed `--event` CSV payloads.
43
54
  - Improved implicit Ollama hybrid search latency by bounding semantic timeout windows and emitting deterministic warning codes when auto-defaulted semantic execution falls back to keyword mode.
44
55
  - Improved extension doctor load diagnostics with targeted warning codes and remediation hints for missing `@unbrained/pm-cli` SDK dependency resolution and ESM module-mode mismatches.
45
- - Improved telemetry event segmentation by adding additive `pm_version`, `source_context`, and `source_context_source` payload fields for `command_start`/`command_finish`, plus explicit override support via `PM_TELEMETRY_SOURCE_CONTEXT`.
56
+ - Improved private diagnostics event segmentation by adding additive package/version and source-context metadata fields.
46
57
  - Improved `pm update-many` no-op validation guidance by listing actionable mutation flag examples when users provide filters/`--dry-run` without any mutation flags.
47
58
 
48
59
  - Added `pm files discover <ID>` to scan item text for existing project/global file paths, report addable vs already linked candidates, and optionally add missing linked files with `--apply`.
49
60
  - Added `pm create --comment` plain-text shorthand support so comment seeds can be passed as raw text without mandatory `text=<value>` wrappers.
50
61
  - Added ownership-safe dependency-only audit updates via `pm update --allow-audit-dep-update` / `--allow_audit_dep_update` for append-only non-owner `--dep` additions.
51
62
  - Added cache cleanup safety controls on `pm gc`: `--dry-run`, repeatable/comma-delimited `--scope index|embeddings|runtime`, and deterministic `guidance` output (including reindex hints after search-artifact cleanup).
52
- - Added linked-test PM-context ergonomics flags `--check-context` and `--auto-pm-context` for `pm test --run` and `pm test-all`, including preflight summary warnings and run-level execution-context telemetry (`requested_pm_context_mode`, `auto_pm_context_applied`).
63
+ - Added linked-test PM-context ergonomics flags `--check-context` and `--auto-pm-context` for `pm test --run` and `pm test-all`, including preflight summary warnings and run-level execution-context metadata (`requested_pm_context_mode`, `auto_pm_context_applied`).
53
64
  - Added hardened background-run attribution fallback for `requested_by` in `pm test-runs` metadata: explicit author -> `PM_AUTHOR` -> settings author default -> `USER`/`LOGNAME`/`USERNAME` -> OS username -> `unknown`.
54
65
  - Added contract/completion alias parity improvements: `pm contracts` now publishes canonical flag + alias metadata for command surfaces, and generated completion scripts include accepted alias candidates from the shared contract registry.
55
66
  - Added extension lifecycle flag-forwarding parity so subcommand forms (`pm extension manage ...`, `pm extension doctor ...`) honor the same action flags as top-level action forms.
@@ -169,7 +180,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
169
180
  - Added per-linked-test runtime directives in linked test metadata (`env_set`, `env_clear`, `shared_host_safe`) for deterministic command-level execution control.
170
181
  - Added linked-test PM-context and strict-governance controls: `--pm-context schema|tracker|auto`, `--fail-on-context-mismatch`, `--fail-on-skipped`, `--fail-on-empty-test-run`, and `--require-assertions-for-pm` on `pm test --run` and `pm test-all`.
171
182
  - Added linked-test PM-context auto-routing (`--pm-context auto`) and per-linked-test context override metadata (`pm_context_mode=schema|tracker|auto`) for mixed-mode linked test execution.
172
- - Added linked-test assertion metadata support (`assert_stdout_contains`, `assert_stdout_regex`, `assert_stderr_contains`, `assert_stderr_regex`, `assert_stdout_min_lines`, `assert_json_field_equals`, `assert_json_field_gte`) with deterministic assertion-failure classification and per-run `execution_context` telemetry in `run_results`.
183
+ - Added linked-test assertion metadata support (`assert_stdout_contains`, `assert_stdout_regex`, `assert_stderr_contains`, `assert_stderr_regex`, `assert_stdout_min_lines`, `assert_json_field_equals`, `assert_json_field_gte`) with deterministic assertion-failure classification and per-run `execution_context` metadata in `run_results`.
173
184
  - Added structured linked-test failure classification in `run_results` (`failure_category`) and aggregated `failure_categories` totals in `pm test`/`pm test-all` results for triage (`infra_collision` vs `assertion_failure` and related categories).
174
185
  - Added standalone `pm validate` linked command-reference diagnostics (`command_references`) with default-on stale PM-id detection and dedicated warning token (`validate_command_references_stale_pm_ids:<count>`).
175
186
  - Added default-on resolution remediation command hints in `pm validate` details for missing resolution metadata (`resolution`, `expected_result`, `actual_result`).
@@ -207,7 +218,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
207
218
  - `pm contracts --command <name>` now scopes action/command/availability output to the selected command for lower-noise machine payloads; use no `--command` filter for full corpus output.
208
219
  - Mutation-triggered search cache invalidation now covers linked-test run-tracking paths (`pm test --run`, `pm test-all`) and lifecycle alias mutation flows.
209
220
  - Calendar JSON/markdown summaries now expose deterministic aggregate breakdowns (`by_kind`, `by_type`, `by_status`, `recurring_events`) and markdown event lines now include richer metadata tokens (item type, recurrence rule, end-time projection, timezone/location, and description context).
210
- - Command-aware output summaries now consume the canonical calendar `summary.events` structure (instead of stale `summary.total`) and emit richer calendar highlight telemetry (`events`, `deadlines`, `reminders`, `scheduled`, `view`).
221
+ - Command-aware output summaries now consume the canonical calendar `summary.events` structure (instead of stale `summary.total`) and emit richer calendar highlight metadata (`events`, `deadlines`, `reminders`, `scheduled`, `view`).
211
222
  - Mutation parsing errors for entry-style flags now include actionable format guidance and explicit stdin-token usage hints to reduce malformed-input retries.
212
223
  - `pm create` log-seed repeatables (`--comment`, `--note`, `--learning`) now reject parsed unsupported keys to prevent silent narrative truncation when unquoted comma segments resemble key/value tokens; guidance now explicitly routes punctuation-heavy text to quoted `text=...`, markdown key/value input, or stdin token usage.
213
224
  - Type validation/filtering/completion now resolve from the runtime registry across create/update/list/search/calendar/completion/init/health/storage paths while preserving built-in defaults when no custom type config exists.
package/CONTRIBUTING.md CHANGED
@@ -95,11 +95,16 @@ Behavior expectations to preserve:
95
95
 
96
96
  ## Developer Documentation
97
97
 
98
- For deeper context on implementation and extension development:
98
+ Start with the [documentation index](docs/README.md). Focused pages:
99
99
 
100
- - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) source tree, item storage, mutation contract, history/restore, search, and testing internals.
101
- - [docs/EXTENSIONS.md](docs/EXTENSIONS.md) full extension development guide: manifest format, ExtensionApi reference, lifecycle hooks, and a working example.
102
- - [docs/RELEASING.md](docs/RELEASING.md) maintainer release procedure for calendar versioning, CI gates, npm publish, and GitHub Release automation.
100
+ - [Quickstart](docs/QUICKSTART.md) - first repository setup and item lifecycle.
101
+ - [Agent Guide](docs/AGENT_GUIDE.md) - canonical `pm` workflow for coding agents.
102
+ - [Command Reference](docs/COMMANDS.md) - command families and examples.
103
+ - [Configuration](docs/CONFIGURATION.md) - settings, output, storage, search, and validation.
104
+ - [Testing](docs/TESTING.md) - sandbox-safe local and linked-test workflows.
105
+ - [Architecture](docs/ARCHITECTURE.md) - source tree, storage, mutation contract, history, search, and extension host internals.
106
+ - [Extensions](docs/EXTENSIONS.md) and [SDK](docs/SDK.md) - extension lifecycle and public SDK.
107
+ - [Releasing](docs/RELEASING.md) - maintainer release procedure.
103
108
 
104
109
  ## Extension Development
105
110
 
@@ -139,6 +144,7 @@ When unmanaged extension state is expected to be managed, use `pm extension --do
139
144
 
140
145
  - Include focused scope and rationale.
141
146
  - Confirm all checks pass (`pnpm build && pnpm typecheck && pnpm test:coverage`).
142
- - Update relevant user-facing docs when behavior changes, but keep enforcement in pm data and runtime tests.
147
+ - Update relevant user-facing docs when behavior changes, but keep enforcement in `pm` data and runtime tests.
148
+ - Keep private operations artifacts out of tracked public docs and package output.
143
149
  - Add/maintain tests for any new behavior (100% coverage required).
144
150
  - Reference relevant `pm` item IDs in PR description.
package/PRD.md CHANGED
@@ -2,7 +2,23 @@
2
2
 
3
3
  Status: Draft v1 (planning reference; pm data and runtime behavior are authoritative)
4
4
  Project: `pm` / `pm-cli`
5
- Last Updated: 2026-02-19
5
+ Last Updated: 2026-05-01
6
+
7
+ ## Navigation
8
+
9
+ This PRD is an archival planning reference. For current user and agent documentation, use:
10
+
11
+ - [README](README.md)
12
+ - [Documentation index](docs/README.md)
13
+ - [Agent Guide](docs/AGENT_GUIDE.md)
14
+ - [Command Reference](docs/COMMANDS.md)
15
+ - [Architecture](docs/ARCHITECTURE.md)
16
+
17
+ Documentation refresh tracking:
18
+
19
+ - [pm-3042](.agents/pm/epics/pm-3042.toon)
20
+ - [pm-r9gu](.agents/pm/features/pm-r9gu.toon)
21
+ - [pm-1sb2](.agents/pm/tasks/pm-1sb2.toon)
6
22
 
7
23
  ## 1) Problem Statement
8
24