@unbrained/pm-cli 2026.8.11 → 2026.8.13

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 (250) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +74 -21
  3. package/dist/cli/commander-usage.js +37 -11
  4. package/dist/cli/error-guidance.d.ts +2 -0
  5. package/dist/cli/error-guidance.js +82 -19
  6. package/dist/cli/main.js +35 -19
  7. package/dist/cli/register-annotations.js +56 -3
  8. package/dist/cli/register-assurance.js +28 -17
  9. package/dist/cli/register-list-query.js +10 -7
  10. package/dist/cli/register-operations.js +16 -6
  11. package/dist/cli-bundle/bundle-manifest.json +163 -163
  12. package/dist/cli-bundle/chunks/chunk-3ZMOWAFM.js +2 -0
  13. package/dist/cli-bundle/chunks/chunk-DEDU3DG7.js +196 -0
  14. package/dist/cli-bundle/chunks/chunk-DL5M5J3V.js +13 -0
  15. package/dist/cli-bundle/chunks/chunk-F7FJYGK3.js +8 -0
  16. package/dist/cli-bundle/chunks/chunk-HIUZVCMN.js +5 -0
  17. package/dist/cli-bundle/chunks/chunk-IMGIN7R6.js +2 -0
  18. package/dist/cli-bundle/chunks/{chunk-A2SJGHSI.js → chunk-Q47C67TQ.js} +2 -2
  19. package/dist/cli-bundle/chunks/{chunk-WMEZHCFI.js → chunk-QGTUPEU5.js} +62 -54
  20. package/dist/cli-bundle/chunks/chunk-TF3TPKPR.js +34 -0
  21. package/dist/cli-bundle/chunks/{chunk-ZU34C3LH.js → chunk-YLBAPY22.js} +50 -50
  22. package/dist/cli-bundle/chunks/register-list-query-4HIZ7EA3.js +10 -0
  23. package/dist/cli-bundle/chunks/register-mutation-W64FZ5HN.js +20 -0
  24. package/dist/cli-bundle/chunks/register-operations-C44ET7R5.js +2 -0
  25. package/dist/cli-bundle/chunks/{register-setup-NOCOOWQY.js → register-setup-634MFRXU.js} +2 -2
  26. package/dist/cli-bundle/focused-chunks/chunk-27N23W6M.js +31 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-4H5IA6AV.js → chunk-2JP7W7GO.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/chunk-2RI2FESN.js +4 -0
  29. package/dist/cli-bundle/focused-chunks/chunk-3BNVU6LC.js +8 -0
  30. package/dist/cli-bundle/focused-chunks/{chunk-2DL3MRTD.js → chunk-3DJSGWVB.js} +2 -2
  31. package/dist/cli-bundle/focused-chunks/chunk-6MLIRBLV.js +5 -0
  32. package/dist/cli-bundle/focused-chunks/chunk-6XYLENDV.js +155 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-CP4K4WFS.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/{chunk-TL5M2PAY.js → chunk-E3AVJ655.js} +2 -2
  35. package/dist/cli-bundle/focused-chunks/chunk-EBTNSFYE.js +2 -0
  36. package/dist/cli-bundle/focused-chunks/{chunk-J5EKAIVD.js → chunk-HC2OL2H2.js} +2 -2
  37. package/dist/cli-bundle/focused-chunks/{chunk-BKPIY34S.js → chunk-I75MANL7.js} +2 -2
  38. package/dist/cli-bundle/focused-chunks/chunk-IIS2FRKL.js +2 -0
  39. package/dist/cli-bundle/focused-chunks/chunk-NFHFZH2Z.js +2 -0
  40. package/dist/cli-bundle/focused-chunks/chunk-OGC4XSBC.js +17 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-UDAZWT25.js → chunk-OOYYKQWX.js} +4 -4
  42. package/dist/cli-bundle/focused-chunks/{chunk-23FTGO3W.js → chunk-PKPOZXLL.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/chunk-QDZUABWL.js +2 -0
  44. package/dist/cli-bundle/focused-chunks/chunk-QQX5TDFT.js +16 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-55BIB6DV.js → chunk-TEZIXMTH.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/chunk-WEH6NSL6.js +18 -0
  47. package/dist/cli-bundle/main.js +13 -13
  48. package/dist/cli-bundle/sdk-authoring.js +1 -1
  49. package/dist/cli-bundle/sdk-contracts.js +1 -1
  50. package/dist/cli-bundle/sdk-core.js +42 -41
  51. package/dist/cli-bundle/sdk-governance.js +1 -1
  52. package/dist/cli-bundle/sdk-graph.js +1 -1
  53. package/dist/cli-bundle/sdk-merge.js +1 -1
  54. package/dist/cli-bundle/sdk-query.js +1 -1
  55. package/dist/cli-bundle/sdk-runtime.js +1 -1
  56. package/dist/cli-bundle/sdk-testing.js +1 -1
  57. package/dist/cli-bundle/sdk.js +2 -2
  58. package/dist/core/checkpoint/checkpoint-gc.js +7 -12
  59. package/dist/core/extensions/activation-summary-markdown.js +5 -4
  60. package/dist/core/extensions/activation-summary.d.ts +2 -0
  61. package/dist/core/extensions/activation-summary.js +6 -2
  62. package/dist/core/extensions/capability-usage.d.ts +1 -1
  63. package/dist/core/extensions/capability-usage.js +4 -3
  64. package/dist/core/extensions/contribution-inventory.d.ts +1 -0
  65. package/dist/core/extensions/contribution-inventory.js +6 -2
  66. package/dist/core/extensions/extension-registries.js +3 -2
  67. package/dist/core/extensions/extension-types.d.ts +83 -1
  68. package/dist/core/extensions/extension-types.js +3 -2
  69. package/dist/core/extensions/loader.d.ts +2 -8
  70. package/dist/core/extensions/loader.js +53 -144
  71. package/dist/core/extensions/registration-values.d.ts +43 -0
  72. package/dist/core/extensions/registration-values.js +210 -0
  73. package/dist/core/extensions/reserved-host-flags.js +3 -2
  74. package/dist/core/extensions/runtime-registrations.d.ts +3 -1
  75. package/dist/core/extensions/runtime-registrations.js +12 -2
  76. package/dist/core/fs/fs-utils.d.ts +2 -0
  77. package/dist/core/fs/fs-utils.js +7 -3
  78. package/dist/core/history/drift-cache.js +4 -3
  79. package/dist/core/history/drift-scan.js +16 -17
  80. package/dist/core/history/history.d.ts +8 -0
  81. package/dist/core/history/history.js +57 -7
  82. package/dist/core/history/replay.d.ts +9 -1
  83. package/dist/core/history/replay.js +48 -13
  84. package/dist/core/lock/lock-gc.js +8 -13
  85. package/dist/core/lock/lock.js +5 -4
  86. package/dist/core/output/output.d.ts +2 -0
  87. package/dist/core/output/output.js +46 -14
  88. package/dist/core/search/vector-stores.js +6 -11
  89. package/dist/core/shared/command-types.d.ts +2 -0
  90. package/dist/core/shared/command-types.js +2 -2
  91. package/dist/core/shared/errors.d.ts +5 -0
  92. package/dist/core/shared/errors.js +2 -2
  93. package/dist/core/store/item-metadata-cache.d.ts +1 -1
  94. package/dist/core/store/item-metadata-cache.js +16 -9
  95. package/dist/core/telemetry/runtime.d.ts +6 -0
  96. package/dist/core/telemetry/runtime.js +101 -30
  97. package/dist/sdk/agent/command-recovery.d.ts +2 -0
  98. package/dist/sdk/agent/command-recovery.js +10 -2
  99. package/dist/sdk/annotations.js +4 -4
  100. package/dist/sdk/cli-bootstrap.d.ts +2 -0
  101. package/dist/sdk/cli-bootstrap.js +6 -2
  102. package/dist/sdk/cli-contracts/completeness.js +10 -3
  103. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  104. package/dist/sdk/cli-contracts/flag-contracts.js +9 -3
  105. package/dist/sdk/cli-contracts/registration-helpers.d.ts +20 -3
  106. package/dist/sdk/cli-contracts/registration-helpers.js +18 -12
  107. package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +40 -6
  108. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +27 -3
  109. package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
  110. package/dist/sdk/cli-contracts/tool-parameter-tables.js +55 -5
  111. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  112. package/dist/sdk/cli-contracts/tool-schema.js +22 -4
  113. package/dist/sdk/cli-program.js +3 -2
  114. package/dist/sdk/comments.js +4 -3
  115. package/dist/sdk/compile-cache.js +4 -3
  116. package/dist/sdk/completion.js +16 -7
  117. package/dist/sdk/compose.d.ts +3 -1
  118. package/dist/sdk/compose.js +16 -2
  119. package/dist/sdk/context-intent-contracts.js +45 -4
  120. package/dist/sdk/context-signal-store.js +4 -3
  121. package/dist/sdk/core.d.ts +1 -0
  122. package/dist/sdk/core.js +3 -2
  123. package/dist/sdk/extension/install-runtime.js +4 -4
  124. package/dist/sdk/extension/managed-state.js +4 -3
  125. package/dist/sdk/extension-contracts.d.ts +1 -1
  126. package/dist/sdk/flag-invocation-contracts.js +5 -6
  127. package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +8 -0
  128. package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1597 -0
  129. package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +8 -0
  130. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1608 -0
  131. package/dist/sdk/generated-error-code-catalog.js +6 -3140
  132. package/dist/sdk/governance/assurance-action.d.ts +27 -3
  133. package/dist/sdk/governance/assurance-action.js +117 -31
  134. package/dist/sdk/governance/assurance-mutation-error.d.ts +14 -0
  135. package/dist/sdk/governance/assurance-mutation-error.js +58 -0
  136. package/dist/sdk/governance/assurance-presets.d.ts +54 -0
  137. package/dist/sdk/governance/assurance-presets.js +136 -0
  138. package/dist/sdk/governance/assurance-runtime.d.ts +4 -0
  139. package/dist/sdk/governance/assurance-runtime.js +118 -14
  140. package/dist/sdk/governance/assurance.d.ts +51 -6
  141. package/dist/sdk/governance/assurance.js +321 -67
  142. package/dist/sdk/governance/gc.js +5 -11
  143. package/dist/sdk/governance/health.d.ts +3 -1
  144. package/dist/sdk/governance/health.js +24 -7
  145. package/dist/sdk/governance/validate-item-reader.js +3 -3
  146. package/dist/sdk/governance/validate.d.ts +2 -0
  147. package/dist/sdk/governance/validate.js +15 -5
  148. package/dist/sdk/graph/durable-cache.d.ts +1 -1
  149. package/dist/sdk/graph/durable-cache.js +156 -29
  150. package/dist/sdk/graph/governance-contracts.d.ts +12 -0
  151. package/dist/sdk/graph/governance-contracts.js +27 -0
  152. package/dist/sdk/graph/governance.d.ts +44 -2
  153. package/dist/sdk/graph/governance.js +156 -12
  154. package/dist/sdk/guide.js +4 -4
  155. package/dist/sdk/index.d.ts +3 -2
  156. package/dist/sdk/index.js +5 -4
  157. package/dist/sdk/lifecycle/claim.js +10 -3
  158. package/dist/sdk/linked-artifacts.d.ts +2 -0
  159. package/dist/sdk/linked-artifacts.js +29 -4
  160. package/dist/sdk/merge/driver.d.ts +2 -2
  161. package/dist/sdk/merge/driver.js +3 -3
  162. package/dist/sdk/merge/install.js +5 -4
  163. package/dist/sdk/merge/receipts.d.ts +6 -4
  164. package/dist/sdk/merge/receipts.js +7 -5
  165. package/dist/sdk/merge/three-way.d.ts +2 -2
  166. package/dist/sdk/merge/three-way.js +3 -3
  167. package/dist/sdk/output-projection.d.ts +9 -1
  168. package/dist/sdk/output-projection.js +45 -9
  169. package/dist/sdk/query/activity.d.ts +49 -2
  170. package/dist/sdk/query/activity.js +185 -38
  171. package/dist/sdk/query/get.js +19 -2
  172. package/dist/sdk/read-output-contracts.d.ts +5 -1
  173. package/dist/sdk/read-output-contracts.js +17 -2
  174. package/dist/sdk/read-output-session.d.ts +2 -0
  175. package/dist/sdk/read-output-session.js +12 -5
  176. package/dist/sdk/relationship-history.js +5 -5
  177. package/dist/sdk/runtime-primitives.d.ts +3 -3
  178. package/dist/sdk/runtime-primitives.js +5 -5
  179. package/dist/sdk/runtime-stats-options.js +3 -2
  180. package/dist/sdk/runtime.js +5 -9
  181. package/dist/sdk/schema-migration.js +4 -4
  182. package/dist/sdk/stats.d.ts +36 -3
  183. package/dist/sdk/stats.js +55 -15
  184. package/dist/sdk/test/execution.d.ts +4 -0
  185. package/dist/sdk/test/execution.js +88 -23
  186. package/dist/sdk/workspace-memory.js +4 -4
  187. package/dist/sdk/workspace-snapshot.js +8 -14
  188. package/dist/sdk/workspace-transaction-gc.js +4 -9
  189. package/dist/sdk/workspace-transaction.js +4 -4
  190. package/dist/sdk/workspace.js +4 -3
  191. package/dist/types.d.ts +2 -0
  192. package/dist/types.js +2 -2
  193. package/docs/ASSURANCE.md +170 -14
  194. package/docs/COMMANDS.md +29 -8
  195. package/docs/CONFIGURATION.md +9 -0
  196. package/docs/DEPENDENCY_KIND_CONTRACT.md +10 -8
  197. package/docs/EXTENSIONS.md +11 -12
  198. package/docs/MERGE_SAFETY.md +3 -1
  199. package/docs/OUTPUT_PROJECTION_CONTRACTS.md +26 -13
  200. package/docs/README.md +2 -0
  201. package/docs/READ_OUTPUT_CONTRACTS.md +17 -2
  202. package/docs/RELATIONSHIP_GRAPH.md +15 -0
  203. package/docs/SDK.md +17 -3
  204. package/docs/SDK_AGENT_SESSION_CONTEXT.md +12 -1
  205. package/docs/SDK_CONTEXT_EVIDENCE_CONTRACTS.md +53 -0
  206. package/docs/SDK_CONTEXT_INTEGRITY.md +28 -1
  207. package/docs/TESTING.md +24 -15
  208. package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +106 -0
  209. package/docs/performance/sdk-entrypoint-import-costs.md +6 -2
  210. package/marketplace.json +2 -2
  211. package/package.json +6 -6
  212. package/packages/pm-beads/package.json +1 -1
  213. package/packages/pm-calendar/package.json +1 -1
  214. package/packages/pm-command-kit/package.json +1 -1
  215. package/packages/pm-digital-twin/package.json +1 -1
  216. package/packages/pm-governance-audit/package.json +1 -1
  217. package/packages/pm-guide-shell/package.json +1 -1
  218. package/packages/pm-kanban/package.json +1 -1
  219. package/packages/pm-lifecycle-hooks/package.json +1 -1
  220. package/packages/pm-linked-test-adapters/package.json +1 -1
  221. package/packages/pm-search-advanced/package.json +1 -1
  222. package/packages/pm-templates/package.json +1 -1
  223. package/packages/pm-todos/package.json +1 -1
  224. package/packages/pm-vcs/package.json +1 -1
  225. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  226. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  227. package/sdk/public-surface.json +384 -83
  228. package/dist/cli-bundle/chunks/chunk-2OOU2AFH.js +0 -8
  229. package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +0 -33
  230. package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +0 -13
  231. package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +0 -194
  232. package/dist/cli-bundle/chunks/chunk-IUNRVDAI.js +0 -2
  233. package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +0 -2
  234. package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +0 -5
  235. package/dist/cli-bundle/chunks/register-list-query-HAUXVUPY.js +0 -10
  236. package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +0 -20
  237. package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +0 -2
  238. package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +0 -2
  239. package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +0 -2
  240. package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +0 -16
  241. package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +0 -8
  242. package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +0 -2
  243. package/dist/cli-bundle/focused-chunks/chunk-DPO7TEFX.js +0 -31
  244. package/dist/cli-bundle/focused-chunks/chunk-E3KCL7AY.js +0 -5
  245. package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +0 -153
  246. package/dist/cli-bundle/focused-chunks/chunk-F6E4JZKG.js +0 -2
  247. package/dist/cli-bundle/focused-chunks/chunk-FPSYO5ZG.js +0 -18
  248. package/dist/cli-bundle/focused-chunks/chunk-KDH5OX3D.js +0 -4
  249. package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +0 -2
  250. package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +0 -17
@@ -257,6 +257,21 @@ bounded deterministic samples, truncation, policy text, and safe remediation;
257
257
  the audit never invents an edge. Explicit isolate exemptions suppress policy
258
258
  findings without changing structural coverage metrics.
259
259
 
260
+ The audit profile also exposes graph-wide resilience and delivery-lineage
261
+ metrics. `articulation_points` and `bridge_edges` reuse the exact cut-structure
262
+ algorithm; outcome metrics count explicit `Milestone` titles beginning with
263
+ `Outcome milestone:` and follow only hierarchy or `implements` edges toward
264
+ them. Active and terminal populations are reported separately, with integer
265
+ basis-point rates and all-status reachable/unreachable totals; the explicit
266
+ outcome milestones are roots, not work subjects, and are excluded from those
267
+ populations. Rate or
268
+ all-status floors are lifecycle-stable; an absolute active-population floor is
269
+ invalid because completing reachable work legitimately moves it into the
270
+ terminal population. `finding_subjects_by_code` includes every known finding
271
+ code even when its population is zero, so assurance selectors never confuse a
272
+ clean class with a missing contract field. Generic `related` edges cannot
273
+ satisfy outcome reachability.
274
+
260
275
  ```ts
261
276
  import {
262
277
  assembleWorkspaceRelationshipGraph,
package/docs/SDK.md CHANGED
@@ -297,7 +297,7 @@ Command/action contract exports:
297
297
  - Remediation planning: `planRelationshipRemediation` (with `RelationshipRemediationPlan`, `RelationshipRemediationStep`, and operation/confidence/code contracts) derives exact dry-run `remove`/`retype`/`supersede`/`waive`/`investigate` proposals from governance-audit findings and witnessed redundancy rows — evidence-backed, confidence-rated, and never auto-applied.
298
298
  - Annotation and relationship option/result contracts: `CommentsCommandOptions` / `CommentsResult`, `NotesCommandOptions` / `NotesResult`, `LearningsCommandOptions` / `LearningsResult`, `FilesCommandOptions` / `FilesResult`, `FilesDiscoverOptions` / `FilesDiscoverResult`, `DocsCommandOptions` / `DocsResult`, `DepsCommandOptions` / `DepsResult`, `AppendCommandOptions` / `AppendResult`
299
299
  - Annotation kernel primitives: `resolveAnnotationInput`, `runAnnotationCommand`, `resolveAnnotationIndex`, `parseAnnotationTextInput`, `limitAnnotationEntries`, `readAnnotationEntries`, `wrapOwnershipConflict`, `isErrnoError`, and their typed input/config/result contracts
300
- - Linked-resource kernel primitives: `runFiles`, `runFilesDiscover`, `runDocs`, `runDeps`, `runLinkedArtifacts`, parsing/normalization/path-validation helpers, and their typed contracts. The CLI files/docs/deps modules are presentation-only re-exports of these SDK implementations.
300
+ - Linked-resource kernel primitives: `runFiles`, `runFilesDiscover`, `runDocs`, `runDeps`, `runLinkedArtifacts`, `assertLinkedArtifactMutationIsUnambiguous`, parsing/normalization/path-validation helpers, and their typed contracts. The CLI files/docs/deps modules are presentation-only re-exports of these SDK implementations. A transaction that resolves one path into both its add and remove sets fails before item or history mutation; split an intentional replacement into two commands so its context remains explicit.
301
301
  - Actionability primitives: `collectBlockedByIds`, `resolveItemBlockers`, `collectDependencyBlockedIds`, and `computeActionabilityReport` expose the same edge-aware blocked/ready definition used by `pm next`, `pm context`, and `pm list-blocked`. Embedded schedulers can therefore classify custom lifecycle schemas without importing CLI or core modules.
302
302
  - Dependency-governance primitives: `collectDanglingDependencyReferences`, `collectMissingDependencyTargetIds`, and `assembleWorkspaceRelationshipGraph` normalize hierarchy, scalar blockers, and structured dependencies into one graph while partitioning missing targets into actionable active holders, informational terminal-history holders, and the legacy `no-active-blocker` sentinel without mutating stored history.
303
303
  - Relationship graph primitives: `RelationshipKindRegistry`, `createRelationshipKindRegistry`, `assertRelationshipEdgeAllowed`, `RelationshipGraph`, `RelationshipEventLog`, `RelationshipEventStore`, `planRelationshipEventBackfill`, `buildRelationshipContext`, `buildDepsRelationshipContext`, `hierarchyAncestors`, `hierarchyDescendants`, `orderingPredecessors`, `orderingSuccessors`, `enumerateRelationshipPaths`, `auditWorkspaceRelationshipGraph`, `isOrderingRelationshipKind`, and `dependencyToRelationship` provide application-defined edge semantics, durable replay, deterministic legacy migration, bounded semantic traversal, policy-aware governance, and explainable context queries. Mutation adapters should call `assertRelationshipEdgeAllowed` with the active registry before persistence; it resolves aliases and honors custom `allowSelf` definitions while built-in self edges fail before item or history writes. `RelationshipEventLog.stream/project` and their durable-store equivalents page immutable prefixes and fold them into deterministic application state with exact version, processed-count, and as-of metadata. `RelationshipEventStore.appendBatch` validates a complete import under one cross-process lock and atomically publishes it; `skip_identical` resume mode rejects same-id semantic collisions. `RelationshipGraphAdapter`, `createRelationshipGraphSnapshot`, `syncRelationshipGraphAdapter`, `loadRelationshipGraphAdapter`, and `federateRelationshipGraphSnapshots` form the backend-neutral content-addressed projection boundary for database or remote graph packages. `MemoryRelationshipGraphAdapter`, `assertRelationshipGraphAdapterConformance`, and `createRelationshipGraphScaleFixture` give package authors a reference implementation, reusable compatibility contract, and lazy deterministic fixtures through one million nodes. See [Relationship graph semantics](RELATIONSHIP_GRAPH.md).
@@ -317,7 +317,7 @@ Command/action contract exports:
317
317
  - Execution and diagnostics engines: `runTest`, `runLinkedTests`, `runTestAll`, `runStartBackgroundRun`, `runTestRunsList`, `runTestRunsStatus`, `runTestRunsLogs`, `runTestRunsStop`, `runTestRunsResume`, `runTestRunsWorker`, `runEval`, `runTelemetry`, and `runStats`. Their CLI modules are compatibility re-exports of SDK-owned implementations.
318
318
  - Execution and diagnostics contracts: `TestCommandOptions` / `TestResult` / `TestRunResult`, `TestAllCommandOptions` / `TestAllResult`, `StartBackgroundRunCommandOptions` / `StartBackgroundRunResult`, `TestRuns*CommandOptions`, `EvalOptions` / `EvalResult`, `TelemetryCommandOptions` / `TelemetrySubcommand`, and `StatsCommandOptions` / `StatsResult`.
319
319
  - Linked-test authoring primitives: `parseLinkedTestJsonEntries`, the `parseLinkedTest*` field parsers, `LINKED_TEST_PM_CONTEXT_MODE_VALUES`, `LINKED_TEST_PROTECTED_ENV_KEYS`, `classifyLinkedTestFailure`, `countFailureCategories`, and `summarizeContextPreflight` let custom hosts validate, execute, classify, and report linked tests without duplicating CLI policy.
320
- - Agent command primitives: `normalizeItemAddressInvocation` and `supportsItemIdAlias` project one item-id grammar across CLI adapters; `renderMissingOptionRetry` and `resolveMissingOptionPlaceholder` preserve attempted argv while deriving enum, boolean, and scalar recovery arity from flag contracts; `createUnknownSubcommandError` provides one typed positional refusal with complete allowed values and deterministic nearest retry; `rankCommandPaths` and `scoreCommandPathMatch` provide deterministic synonym/edit-distance/substring ranking; `resolveCreateExplicitEmptyFlag` and `supportsCreateExplicitEmpty` model a considered-but-empty strict repeatable input without inventing metadata or graph edges.
320
+ - Agent command primitives: `normalizeItemAddressInvocation` and `supportsItemIdAlias` project one item-id grammar across CLI adapters; `renderMissingOptionRetry`, `resolveMissingOptionPlaceholder`, and `resolveRecoveryCommandName` preserve attempted argv, derive enum/boolean/scalar recovery arity from flag contracts, and identify the actual command without mistaking a global option value for one; `createUnknownSubcommandError` provides one typed positional refusal with complete allowed values and deterministic nearest retry; `rankCommandPaths` and `scoreCommandPathMatch` provide deterministic synonym/edit-distance/substring ranking; `resolveCreateExplicitEmptyFlag` and `supportsCreateExplicitEmpty` model a considered-but-empty strict repeatable input without inventing metadata or graph edges.
321
321
  - Refusal reachability primitives: generated `PmErrorCodeContract.owned_states` declarations bind stable codes to concrete states, probe ids, entrypoints, and exit classes; `verifyPmRefusalReachability` compares those declarations with real CLI, SDK, MCP, or package observations and fails closed for missing, duplicate, wrong-entrypoint, mismatched, or undeclared probes.
322
322
  - Typed plan workflow primitives on `PmClient`: `plan`, `planCreate`, `planShow`, `planAddStep`, `planUpdateStep`, `planCompleteStep`, `planBlockStep`, `planReorderStep`, `planRemoveStep`, `planLink`, `planUnlink`, `planDecision`, `planDiscovery`, `planValidation`, `planResume`, `planApprove`, and `planMaterialize`
323
323
  - Plan contracts: `PlanSubcommand`, `PlanCommandOptions`, `PlanCommandResult`, `PlanResultPlan`, `PlanStepSummary`, `PlanShowDepth`, and `PlanTemplateName`
@@ -512,7 +512,8 @@ loud with attributed events and authors.
512
512
  Tracked: [pm-jcvg](../.agents/pm/tasks/pm-jcvg.toon),
513
513
  [pm-2ler](../.agents/pm/issues/pm-2ler.toon),
514
514
  [pm-chyh](../.agents/pm/issues/pm-chyh.toon), and
515
- [pm-p9sc](../.agents/pm/issues/pm-p9sc.toon).
515
+ [pm-p9sc](../.agents/pm/issues/pm-p9sc.toon). Conflicting batch refusal is
516
+ tracked by [pm-c6urop](../.agents/pm/issues/pm-c6urop.toon).
516
517
 
517
518
  Custom tools can use the same domain primitives as the CLI without dispatching a
518
519
  command action. The direct functions accept the typed command options plus a
@@ -556,6 +557,13 @@ tool invoked from a nested package never records a path that changes meaning
556
557
  when another agent runs from the repository root. Root-layout trackers use the
557
558
  tracker directory itself as their workspace.
558
559
 
560
+ Add and remove sets are compared after invocation-root anchoring, slash
561
+ normalization, glob expansion, and requested migrations. If the same path is in
562
+ both sets, `runFiles`, `runDocs`, and `runLinkedArtifacts` throw
563
+ `PmCliError` code `linked_artifact_mutation_conflict` before calling the item
564
+ store. This contract deliberately refuses to guess whether replacement or
565
+ removal should win and guarantees that no item or history write is published.
566
+
559
567
  `runDeps` also projects missing `parent` and legacy `blocked_by` references as
560
568
  typed missing edges, alongside structured dependencies. Tree and graph payloads
561
569
  apply shared depth/node/edge/token bounds and expose deterministic truncation
@@ -3292,6 +3300,12 @@ interpreted as a missing input. Strict close validation reports missing
3292
3300
  resolution fields first and suggests a targeted `pm update` before retrying the
3293
3301
  original close invocation.
3294
3302
 
3303
+ Recovery help examples resolve their command through
3304
+ `resolveRecoveryCommandName`, which uses the same bootstrap grammar as the CLI.
3305
+ Global value flags such as `--pm-path <path>` may appear before or after the
3306
+ subcommand; their values are never exposed as inferred command names or help
3307
+ targets.
3308
+
3295
3309
  Unknown-option envelopes rank command paths that accept the rejected flag by
3296
3310
  shared vocabulary and include explicit total/truncation metadata. They are
3297
3311
  contract-discovery hints, not permission to change the requested operation.
@@ -5,7 +5,8 @@ Tracker references: [pm-9wbiye](../.agents/pm/issues/pm-9wbiye.toon),
5
5
  [pm-oqo9l2](../.agents/pm/features/pm-oqo9l2.toon),
6
6
  [pm-3zgh2c](../.agents/pm/features/pm-3zgh2c.toon),
7
7
  [pm-eq9dlw](../.agents/pm/issues/pm-eq9dlw.toon), and
8
- [pm-lu6sca](../.agents/pm/features/pm-lu6sca.toon).
8
+ [pm-lu6sca](../.agents/pm/features/pm-lu6sca.toon), plus
9
+ [pm-5q8wa0](../.agents/pm/issues/pm-5q8wa0.toon).
9
10
 
10
11
  Project management is context management. The public SDK therefore carries a
11
12
  session's purpose and episode boundary through the same immutable history that
@@ -137,6 +138,16 @@ without confusing an unavailable harness signal with a failed resolver. The
137
138
  warning is advisory and the storage check includes the bounded attempt and
138
139
  success counters for diagnosis.
139
140
 
141
+ Older immutable history can also contain roles outside the controlled domain,
142
+ including values recorded from presence-only harness flags before semantic role
143
+ validation existed. `pm health` retains the privacy-safe
144
+ `provenance_value_domain_invalid:<harness>:<dimension>:<value-shape>:<count>`
145
+ warning and its bounded storage aggregate, but treats the finding as advisory:
146
+ truthful append-only history is not rewritten merely to make health green. New
147
+ session, environment, MCP, and inferred provenance still pass through the
148
+ controlled write-time validator, so this disposition does not permit new
149
+ invalid values.
150
+
140
151
  ## Cross an MCP boundary
141
152
 
142
153
  An embedding MCP client can add bounded `provenance` and `episode` fields to
@@ -0,0 +1,53 @@
1
+ # SDK Context and Evidence Contracts
2
+
3
+ Tracked by [pm-gok2km](../.agents/pm/issues/pm-gok2km.toon), [pm-zryb9d](../.agents/pm/issues/pm-zryb9d.toon), [pm-qckpnq](../.agents/pm/issues/pm-qckpnq.toon), [pm-hfqju5](../.agents/pm/issues/pm-hfqju5.toon), [pm-2htk4p](../.agents/pm/issues/pm-2htk4p.toon), and [pm-v0a0un](../.agents/pm/issues/pm-v0a0un.toon).
4
+
5
+ These contracts keep SDK context truthful, bounded, and reusable across the CLI, MCP, packages, and automation. They are designed around the project principle that project management is context management: a compact response must reveal material omissions, merge evidence must describe what actually survived, and compatibility failures must not masquerade as corruption.
6
+
7
+ ## Material omission receipts
8
+
9
+ `pm get` derives omission receipts from non-serialized materiality evidence. Empty bodies and zero-cardinality collections do not consume receipt tokens merely because a richer projection could render them. Material body, linked-artifact, collection, schedule, child, and claim-state groups retain exact `--fields` restoration guidance.
10
+
11
+ Package authors can use `registerOutputMaterialFieldGroups(result, groups)` before the shared output boundary attaches a receipt. The registration is held in process memory through a `WeakMap`; it never appears in JSON, TOON, item storage, history, or package output.
12
+
13
+ ## Scoped preflight ownership
14
+
15
+ An extension contribution inventory can declare `preflight_ownership` command sets. Static activation uses those same sets as runtime dispatch:
16
+
17
+ - a scoped preflight activates only for an owned command;
18
+ - disjoint scoped preflights do not collide or activate for `pm health` merely because both advertise the `preflight` capability;
19
+ - `preflight_overrides` entries without corresponding ownership remain global.
20
+
21
+ This keeps health diagnostics and lazy runtime behavior on one ownership contract.
22
+
23
+ ## Merge provenance
24
+
25
+ Stable-value item merges distinguish a caller request from the outcome. Low-level item results, driver results, clone-local receipts, and privacy-safe summaries expose `requested_preference`. The actual outcome remains in each decision's `retained` and `discarded` values or hashes. New receipts do not emit the ambiguous `preferred` key; readers still ingest legacy schema-v1 receipts and normalize that key to `requested_preference`.
26
+
27
+ ## Claim race classification
28
+
29
+ Extensions can import `isAlreadyClaimedError` from either supported lifecycle entrypoint:
30
+
31
+ ```ts
32
+ import { isAlreadyClaimedError } from "@unbrained/pm-cli/sdk";
33
+ // or the compact lifecycle surface
34
+ import { isAlreadyClaimedError as isCoreAlreadyClaimedError } from "@unbrained/pm-cli/sdk/core";
35
+ ```
36
+
37
+ The predicate recognizes only the canonical `PmCliError` code `already_claimed_by`; consumers do not need to duplicate an internal string check.
38
+
39
+ ## Versioned history item hashes
40
+
41
+ New history events carry `item_hash_version: 2`, whose canonicalization preserves linked-test insertion order. The verifier auto-detects unversioned legacy streams against both the legacy sorted-test epoch and the order-preserving epoch. `hashDocumentForVersion` and `verifyHistoryChainWithVersion` expose the same compatibility logic to SDK consumers.
42
+
43
+ Unknown explicit epochs return `verify_failed:unsupported_item_hash_version:<version>:entry_<n>`. Repair refuses those streams instead of rewriting evidence with a guessed algorithm. Re-anchored supported streams are normalized to the current epoch, and the drift cache records the detected epoch so item-versus-history comparison uses the same canonicalization.
44
+
45
+ ## Assurance mutation refusals
46
+
47
+ Assurance `put` and `remove` operations validate untrusted declaration shapes at the shared action boundary used by the CLI, SDK, and MCP. Malformed definitions, referenced-declaration removals, and unauthorized assertion weakening return `PmCliError` with the canonical `invalid_argument_value` code and usage exit semantics. Evaluation and storage failures that are not input `TypeError`s remain unexpected and fail closed.
48
+
49
+ This boundary keeps deterministic operator refusals out of unexpected-error reporting while preserving Sentry and release-gate signal for genuine runtime faults.
50
+
51
+ ## Verification expectations
52
+
53
+ Changes to these contracts require focused unit coverage, exact repository coverage, packed ESM and TypeScript consumption, and temporary-workspace CLI acceptance. Merge changes additionally require the temporary-Git workflow in [Multi-Branch Merge Safety](MERGE_SAFETY.md).
@@ -1,6 +1,6 @@
1
1
  # SDK Context Integrity
2
2
 
3
- Tracker: [pm-0k19l7](../.agents/pm/issues/pm-0k19l7.toon), [pm-9stazf](../.agents/pm/issues/pm-9stazf.toon), [pm-tu71](../.agents/pm/issues/pm-tu71.toon), [pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon), [pm-7rrqsk](../.agents/pm/issues/pm-7rrqsk.toon), [pm-ety1qc](../.agents/pm/issues/pm-ety1qc.toon), and [pm-lu6sca](../.agents/pm/features/pm-lu6sca.toon).
3
+ Tracker: [pm-0k19l7](../.agents/pm/issues/pm-0k19l7.toon), [pm-9stazf](../.agents/pm/issues/pm-9stazf.toon), [pm-tu71](../.agents/pm/issues/pm-tu71.toon), [pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon), [pm-7rrqsk](../.agents/pm/issues/pm-7rrqsk.toon), [pm-ety1qc](../.agents/pm/issues/pm-ety1qc.toon), [pm-lu6sca](../.agents/pm/features/pm-lu6sca.toon), [pm-5y05kq](../.agents/pm/issues/pm-5y05kq.toon), [pm-gjjurs](../.agents/pm/issues/pm-gjjurs.toon), and [pm-h97qxd](../.agents/pm/issues/pm-h97qxd.toon).
4
4
 
5
5
  ## Agent Quick Context
6
6
 
@@ -31,6 +31,28 @@ selector grammar and omission receipts as any other SDK-owned item field.
31
31
 
32
32
  The same SDK-owned read-output registry now declares `package manage` as a first-class read surface. Package authors can resolve either `package manage` or `package-manage` to its canonical contract and discover the universal include, amount, cost, and encoding dimensions without copying CLI knowledge.
33
33
 
34
+ ## Row discovery and exact output receipts
35
+
36
+ Row locations and encoding capabilities remain part of the SDK-owned read
37
+ contract, but the `row_contract` discovery block is opt-in on rendered command
38
+ results. Use `--output-row-contract` in the CLI or `outputRowContract: true` in
39
+ SDK and MCP options when a generic consumer must discover row selectors. Normal
40
+ agent reads omit the repeated metadata and retain the same internal projections.
41
+
42
+ Uniform flat object arrays use canonical tabular TOON when TOON output is
43
+ selected. Mixed, nested, or scalar collections retain the general recursive
44
+ encoding, so package authors can add richer shapes without pretending they are
45
+ tabular. The optional row contract declares
46
+ `toon_encoding: tabular_when_uniform` for consumers that negotiate this
47
+ optimization.
48
+
49
+ When discovery metadata is omitted, every `context_intent`, `read_output`, and
50
+ `read_session` estimate is stabilized against the final serialized envelope.
51
+ Consequently `estimated_tokens` and `spent_this_call_tokens` never charge an
52
+ agent for hidden row metadata, and a caller-carried output session remains an
53
+ exact cross-command budget rather than an approximation of an intermediate
54
+ shape.
55
+
34
56
  ## Bounded annotation mutations
35
57
 
36
58
  Adding, editing, or deleting a comment, note, or learning returns the changed entry plus mutation and omission receipts. The reply size therefore stays independent of the item’s existing annotation history. Pass `--full-history` when a human or integration genuinely needs the complete post-mutation collection:
@@ -68,6 +90,11 @@ reader. Validation uses collection-bearing metadata for evidence and
68
90
  relationship checks and materializes bodies only when strict history-drift
69
91
  verification is requested.
70
92
 
93
+ Every health check row exposes both its tri-state `status` and a required
94
+ boolean `ok`. The boolean is exactly `status === "ok"` in full, brief, and
95
+ summary projections, so generic SDK and package consumers can use a stable
96
+ success predicate without discarding warning-versus-error detail.
97
+
71
98
  The storage check also reads at most 10,000 local immutable events for bounded
72
99
  agent-provenance resolver outcomes. This scan performs no network or provider
73
100
  I/O, tolerates malformed streams already owned by integrity diagnostics, and
package/docs/TESTING.md CHANGED
@@ -270,28 +270,37 @@ parsed `workflow_jobs`; validation requires the two sets to match exactly.
270
270
 
271
271
  ## Tracker Context-Quality Ratchets
272
272
 
273
- Tracked by [pm-ips23h](../.agents/pm/issues/pm-ips23h.toon) and
274
- [pm-kpftft](../.agents/pm/tasks/pm-kpftft.toon).
275
-
276
- `scripts/release/tracker-measurements.json` turns measured tracker populations
277
- into reviewed, shrinking-only ceilings. Each declaration names its canonical
278
- pm owner and a selector over stored dependency kinds, validator warnings,
279
- graph-profile fields, or health-check severity. Open owners enforce their
280
- ceiling; terminal owners retire it. Validator warnings and health checks are
281
- exhaustive, so a newly observed class fails until it has a canonical owner and
282
- reviewed declaration.
273
+ Tracked by [pm-ips23h](../.agents/pm/issues/pm-ips23h.toon),
274
+ [pm-kpftft](../.agents/pm/tasks/pm-kpftft.toon), and
275
+ [pm-4ok4ex](../.agents/pm/tasks/pm-4ok4ex.toon), with lifecycle-stable outcome
276
+ reachability owned by [pm-g4k74y](../.agents/pm/issues/pm-g4k74y.toon) and
277
+ [pm-bzmeaa](../.agents/pm/tasks/pm-bzmeaa.toon).
278
+
279
+ The SDK-owned assurance registry stores tracker context-quality measurements,
280
+ floors, ceilings, lifetimes, enforcement, and executable negative controls in
281
+ `.agents/pm/assurance.json`. The `tracker-context-quality` gate covers stored
282
+ relationship kinds, validator debt, health checks, graph findings, structural
283
+ cut points, and typed reachability to outcome milestones. One workspace
284
+ assurance context reuses identical graph, validate, and health evaluations, so
285
+ a broad gate has one authoritative snapshot without repeatedly rescanning it.
286
+ Outcome enforcement uses an all-status reachable population, unreachable
287
+ ceiling, and basis-point floor. Active and terminal populations remain
288
+ diagnostics: absolute per-lifecycle floors would mistake normal close or reopen
289
+ transitions for relationship loss.
283
290
 
284
291
  Run the same gate used by hosted CI:
285
292
 
286
293
  ```bash
287
294
  pnpm quality:tracker-measurements
288
- node scripts/release/tracker-measurement-gate.mjs --negative-control
295
+ pm assurance run tracker-context-quality --trigger ci --dry-run --json
289
296
  ```
290
297
 
291
- `--update` can only lower a ceiling. It refuses to write while any population
292
- has regressed or remains undeclared, so updating the baseline cannot absorb a
293
- failure. Dependency-kind regressions include the post-measurement item, target,
294
- author, timestamp, and mutation-source rows in the JSON receipt.
298
+ Every native assertion contains both a passing boundary case and an impossible
299
+ case that must fail. Changes flow through `pm assurance put`, which refuses a
300
+ weaker bound, scope, lifetime, or enforcement unless a verified Decision item
301
+ authorizes it. `scripts/release/gate-registry.json` separately inventories the
302
+ retired bespoke gate and gives every graph subcommand either a named automated
303
+ consumer or an explicit interactive-only classification.
295
304
 
296
305
  ## Agent Output Token Budgets
297
306
 
@@ -0,0 +1,106 @@
1
+ # Trustworthy Context and Evidence Contracts
2
+
3
+ Tracker: [pm-py7qv2](../.agents/pm/issues/pm-py7qv2.toon), [pm-33mjrw](../.agents/pm/issues/pm-33mjrw.toon), [pm-q6n8sj](../.agents/pm/issues/pm-q6n8sj.toon), [pm-h97qxd](../.agents/pm/issues/pm-h97qxd.toon), [pm-rncuf7](../.agents/pm/issues/pm-rncuf7.toon), [pm-m0b7h8](../.agents/pm/issues/pm-m0b7h8.toon), [pm-wqhzhg](../.agents/pm/issues/pm-wqhzhg.toon)
4
+
5
+ ## Agent Quick Context
6
+
7
+ Project management is context management. These contracts make absence, identity, composition, and mutation outcomes explicit across CLI, SDK, MCP, packages, and persisted history:
8
+
9
+ - Assurance evaluates authoritative full item records, supports first-class field presence predicates, canonicalizes relationship aliases, fingerprints measurement definitions, and attributes writes through the normal detected-author chain.
10
+ - Graph audit reports both counts and ratios: `edge_share_by_kind`, `semantic_edges`, and `semantic_edge_share` alongside the existing structural profile.
11
+ - Every health check row carries `ok: boolean` beside its compatible `status: ok|warn` value, including brief, summary, skipped, and full projections.
12
+ - Linked-test removal preserves commands containing commas or equals signs, offers a lossless 1-based index selector, reports `removed`, and refuses a zero-match removal.
13
+ - Collection grammar recovery labels positional roles when noun-verb-object input is transposed, then provides the accepted object-first command.
14
+
15
+ Use runtime contracts for the exact active surface:
16
+
17
+ ```bash
18
+ pm contracts --command test --flags-only --json
19
+ pm contracts --action test --schema-only --json
20
+ pm health --summary --json
21
+ pm graph audit --summary --json
22
+ ```
23
+
24
+ ## Assurance Predicates and Verdict Identity
25
+
26
+ An item-field measurement must choose exactly one predicate:
27
+
28
+ ```json
29
+ {
30
+ "id": "missing-tests",
31
+ "source": { "kind": "items", "field": "tests", "state": "missing" }
32
+ }
33
+ ```
34
+
35
+ ```json
36
+ {
37
+ "id": "priority-one",
38
+ "source": { "kind": "items", "field": "priority", "equals": 1 }
39
+ }
40
+ ```
41
+
42
+ `state: missing` covers absent properties, `null`, empty strings, and empty arrays. `state: present` is its complement. Explicit `equals: null` remains an exact-value predicate and is not conflated with missing configuration.
43
+
44
+ Each measurement result carries `definition_fingerprint`; assertion verdicts copy it as `measurement_definition_fingerprint`. A stored verdict can therefore be joined to the exact declaration semantics that produced it. Older verdicts remain readable and are visibly legacy because the fingerprint field is absent.
45
+
46
+ ## Graph Composition
47
+
48
+ `pm graph audit` uses deduplicated directed edges as the denominator:
49
+
50
+ ```json
51
+ {
52
+ "edges": 12,
53
+ "edges_by_kind": { "parent": 4, "related": 6, "verifies": 2 },
54
+ "edge_share_by_kind": {
55
+ "parent": 0.3333333333333333,
56
+ "related": 0.5,
57
+ "verifies": 0.16666666666666666
58
+ },
59
+ "semantic_edges": 2,
60
+ "semantic_edge_share": 0.16666666666666666
61
+ }
62
+ ```
63
+
64
+ The semantic numerator is the sum of `discovered_from`, `incident_from`, `supersedes`, and `verifies`. Audit baselines preserve the new fields, accept older snapshots with explicit zero defaults, and report signed count/share deltas.
65
+
66
+ ## Health Row Predicate
67
+
68
+ Every entry in `health.checks` has this stable shape:
69
+
70
+ ```json
71
+ { "name": "storage", "status": "ok", "ok": true, "details": {} }
72
+ ```
73
+
74
+ `status` remains for compatibility and human rendering. `ok` is the direct machine predicate; it survives brief and summary projections. Assurance health sources accept either `field: status` or `field: ok` and normalize success to `0`, warning to `1`.
75
+
76
+ ## Lossless Linked-Test Removal
77
+
78
+ List first when selecting an index:
79
+
80
+ ```bash
81
+ pm test pm-example --list --json
82
+ pm test pm-example --remove-index 2 --json
83
+ ```
84
+
85
+ `--remove-index` is repeatable and uses the current 1-based list order. Exact identity selectors remain available:
86
+
87
+ ```bash
88
+ pm test pm-example --remove "command=node -e 'console.log(\"left=right,still-command\")'" --json
89
+ pm test pm-example --remove 'path=tests/example.spec.ts' --json
90
+ ```
91
+
92
+ For `command=` and `path=`, everything after the first identity prefix is the value; commas and equals signs are not re-parsed as fields. A successful mutation reports `removed`; a selector matching nothing raises `linked_test_remove_no_match` with unmatched selectors and a list-first recovery instead of returning a false-success no-op.
93
+
94
+ ## Collection Grammar Recovery
95
+
96
+ Collection mutations use object-first grammar:
97
+
98
+ ```bash
99
+ pm notes pm-example --add "context"
100
+ pm comments pm-example --add "reviewed"
101
+ pm files pm-example --add path=src/example.ts
102
+ pm docs pm-example --add path=docs/example.md
103
+ pm test pm-example --add 'command=pnpm test'
104
+ ```
105
+
106
+ Inputs such as `pm notes add pm-example --note context` are refused as a transposed `add` subcommand. Structured recovery reports `transposed_subcommand=add` and `item_id=pm-example`, then supplies `pm notes pm-example --add context`. The visible notes `--note` alias remains accepted for compatibility, but new automation should use canonical `--add`.
@@ -1,13 +1,17 @@
1
1
  # SDK entrypoint import costs
2
2
 
3
- Tracked by [pm-38bskj](../../.agents/pm/tasks/pm-38bskj.toon).
3
+ Tracked by [pm-38bskj](../../.agents/pm/tasks/pm-38bskj.toon) and
4
+ [pm-cg1sjb](../../.agents/pm/issues/pm-cg1sjb.toon).
4
5
 
5
6
  This table measures fresh-process ESM import and module evaluation. The bare
6
7
  Node v26.5.0 process floor on linux/x64
7
8
  was 41 ms p50 (48 ms p95) across
8
9
  5 measured runs after one warm-up. Focused entrypoints are
9
10
  compared with the compatibility aggregate; negative reduction means the focused
10
- entrypoint was slower in this sample.
11
+ entrypoint was slower in this sample. The gate admits the median measured run
12
+ against the unchanged upper-bound budget and 30 ms scheduler margin. A single
13
+ cold or descheduled process therefore cannot fail the gate, while a majority of
14
+ over-budget samples still does; p95 remains visible as diagnostic evidence.
11
15
 
12
16
  | Package export | p50 | p95 | p50 above Node | Reduction vs aggregate |
13
17
  |---|---:|---:|---:|---:|
package/marketplace.json CHANGED
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
9
- "version": "2026.8.11"
9
+ "version": "2026.8.13"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "pm-claude",
14
14
  "source": "./plugins/pm-claude",
15
15
  "description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
16
- "version": "2026.8.11",
16
+ "version": "2026.8.13",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-cli",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.10.0",
@@ -120,7 +120,7 @@
120
120
  "lint:complexity:baseline": "eslint . --suppress-rule complexity --suppress-rule sonarjs/cognitive-complexity",
121
121
  "lint:duplicates": "jscpd --config .jscpd.json",
122
122
  "lint:codefactor": "pnpm quality:static",
123
- "quality:static": "pnpm build && pnpm exec tsx scripts/release/static-quality-gate.mts --max-eslint-suppressions 114 --max-coverage-ignore-pragmas 477 --min-docstring-coverage 100 --min-exported-docstring-coverage 100 --min-member-docstring-coverage 100 && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/absence-tolerance-gate.mjs && node scripts/release/token-budget-gate.mjs && node scripts/release/context-intent-calibration-gate.mjs && node scripts/release/tracker-measurement-gate.mjs && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check",
123
+ "quality:static": "pnpm build && pnpm exec tsx scripts/release/static-quality-gate.mts --max-eslint-suppressions 114 --max-coverage-ignore-pragmas 477 --min-docstring-coverage 100 --min-exported-docstring-coverage 100 --min-member-docstring-coverage 100 && node scripts/release/audit-package-boundary.mjs && node scripts/release/package-sdk-contract-parity.mjs && node scripts/release/surface-replication-gate.mjs && node scripts/release/absence-tolerance-gate.mjs && node scripts/release/token-budget-gate.mjs && node scripts/release/context-intent-calibration-gate.mjs && node dist/cli.js assurance run tracker-context-quality --trigger ci --dry-run --json && node scripts/release/gate-registry.mjs && node scripts/sdk-surface-snapshot.mjs --check && node scripts/bench/sdk-entrypoint-costs.mjs --check && node scripts/bench/cli-transport-floor.mjs --check && node dist/cli.js assurance run graph-composition --trigger ci --dry-run --json && node dist/cli.js assurance run record-integrity --trigger ci --dry-run --json",
124
124
  "quality:token-budget": "node scripts/release/token-budget-gate.mjs",
125
125
  "quality:token-surface": "node scripts/measure-agent-token-surface.mjs --check",
126
126
  "quality:token-surface:update": "pnpm build && node scripts/measure-agent-token-surface.mjs --update",
@@ -130,7 +130,7 @@
130
130
  "quality:retrieval-eval": "pnpm build && node scripts/release/retrieval-eval-gate.mjs",
131
131
  "quality:retrieval-eval:update": "pnpm build && node scripts/release/retrieval-eval-gate.mjs --update",
132
132
  "quality:gate-registry": "pnpm build && node scripts/release/gate-registry.mjs",
133
- "quality:tracker-measurements": "pnpm build && node scripts/release/tracker-measurement-gate.mjs",
133
+ "quality:tracker-measurements": "pnpm build && node dist/cli.js assurance run tracker-context-quality --trigger ci --dry-run --json",
134
134
  "quality:package-artifact": "pnpm build && node scripts/release/package-artifact-gate.mjs",
135
135
  "quality:surface-replication": "node scripts/release/surface-replication-gate.mjs",
136
136
  "quality:absence-tolerance": "node scripts/release/absence-tolerance-gate.mjs",
@@ -198,7 +198,7 @@
198
198
  "node": ">=22.18.0"
199
199
  },
200
200
  "dependencies": {
201
- "@sentry/node": "10.69.0",
201
+ "@sentry/node": "10.70.0",
202
202
  "@toon-format/toon": "^4.1.1",
203
203
  "@types/node": ">=22",
204
204
  "commander": "^15.0.0",
@@ -214,14 +214,14 @@
214
214
  "@types/node": "^26.2.0",
215
215
  "@types/npm-package-arg": "^6.1.4",
216
216
  "@vitest/coverage-v8": "^4.1.10",
217
- "esbuild": "0.28.1",
217
+ "esbuild": "0.28.2",
218
218
  "eslint": "^10.8.1",
219
219
  "eslint-plugin-sonarjs": "^4.2.0",
220
220
  "eslint-plugin-unicorn": "^73.0.0",
221
221
  "fast-check": "^4.9.0",
222
222
  "greptile": "^3.3.1",
223
223
  "jscpd": "^5.0.14",
224
- "tsx": "^4.23.11",
224
+ "tsx": "^4.23.12",
225
225
  "typescript": "^6.0.3",
226
226
  "typescript-eslint": "^8.66.0",
227
227
  "vitest": "^4.1.10",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-beads",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for importing Beads JSONL records.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-calendar",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for calendar and agenda views.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-command-kit",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm exemplar package for the commands capability: registerCommand, registerFlags, and registerParser.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-digital-twin",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-governance-audit",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for governance audit and normalization workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-guide-shell",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for guide and shell completion workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-kanban",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm archetype package: a complete Kanban continuous-flow profile built on public SDK primitives.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-lifecycle-hooks",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package demonstrating safe lifecycle hook registration.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-linked-test-adapters",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for optional linked-test run management adapters and reporters.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-search-advanced",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for semantic, hybrid, and reindex search workflows.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-templates",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for reusable create templates.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-todos",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for Todo markdown import and export.",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-vcs-sdk-exemplar",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Beyond-PM exemplar: a VCS-style changeset workflow built entirely on public pm SDK and extension primitives.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pm-claude",
3
3
  "description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
4
- "version": "2026.8.11",
4
+ "version": "2026.8.13",
5
5
  "author": {
6
6
  "name": "unbrained",
7
7
  "url": "https://github.com/unbraind/pm-cli"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pm-codex",
3
- "version": "2026.8.11",
3
+ "version": "2026.8.13",
4
4
  "description": "Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.",
5
5
  "author": {
6
6
  "name": "unbrained",