@unbrained/pm-cli 2026.8.10 → 2026.8.11

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 (175) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +102 -80
  3. package/dist/cli/commander-usage.js +79 -7
  4. package/dist/cli/error-guidance.d.ts +10 -0
  5. package/dist/cli/error-guidance.js +76 -25
  6. package/dist/cli/main.js +6 -2
  7. package/dist/cli/register-assurance.d.ts +8 -0
  8. package/dist/cli/register-assurance.js +52 -0
  9. package/dist/cli/register-files-lookup.js +14 -3
  10. package/dist/cli/register-mutation.js +30 -9
  11. package/dist/cli/register-operations.js +16 -11
  12. package/dist/cli-bundle/bundle-manifest.json +159 -159
  13. package/dist/cli-bundle/chunks/{chunk-TRWXF476.js → chunk-2OOU2AFH.js} +2 -2
  14. package/dist/cli-bundle/chunks/chunk-2RA2YTHJ.js +33 -0
  15. package/dist/cli-bundle/chunks/chunk-A2SJGHSI.js +3 -0
  16. package/dist/cli-bundle/chunks/chunk-DSKYD4LG.js +13 -0
  17. package/dist/cli-bundle/chunks/chunk-HC3GM6YY.js +194 -0
  18. package/dist/cli-bundle/chunks/chunk-IUNRVDAI.js +2 -0
  19. package/dist/cli-bundle/chunks/chunk-W7CPZGSB.js +2 -0
  20. package/dist/cli-bundle/chunks/{chunk-EBO7OUUE.js → chunk-WMEZHCFI.js} +59 -53
  21. package/dist/cli-bundle/chunks/{chunk-ETML5C6H.js → chunk-ZU34C3LH.js} +47 -47
  22. package/dist/cli-bundle/chunks/chunk-ZXOC6HG5.js +5 -0
  23. package/dist/cli-bundle/chunks/{register-list-query-OJ6ZXKV4.js → register-list-query-HAUXVUPY.js} +8 -8
  24. package/dist/cli-bundle/chunks/register-mutation-7Y5U7ABT.js +20 -0
  25. package/dist/cli-bundle/chunks/register-operations-EQX3DLAZ.js +2 -0
  26. package/dist/cli-bundle/chunks/{register-setup-S3KT2LTH.js → register-setup-NOCOOWQY.js} +2 -2
  27. package/dist/cli-bundle/focused-chunks/{chunk-34SX654S.js → chunk-23FTGO3W.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/{chunk-2COZ67XT.js → chunk-2DL3MRTD.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-3AYKXMYX.js +2 -0
  30. package/dist/cli-bundle/focused-chunks/chunk-4AHEC74N.js +2 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-7UN6BHHO.js → chunk-4H5IA6AV.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-4SV3ZKG3.js +16 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-55BIB6DV.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-6JW6Z2P5.js +8 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-IW43E4XL.js → chunk-BKPIY34S.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/chunk-D4PIWE6D.js +2 -0
  37. package/dist/cli-bundle/focused-chunks/{chunk-KR5RVXLQ.js → chunk-DPO7TEFX.js} +29 -29
  38. package/dist/cli-bundle/focused-chunks/{chunk-JMVA4HKR.js → chunk-E3KCL7AY.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-ERAAFLPS.js +153 -0
  40. package/dist/cli-bundle/focused-chunks/{chunk-RIIN5V4N.js → chunk-F6E4JZKG.js} +2 -2
  41. package/dist/cli-bundle/focused-chunks/chunk-FPSYO5ZG.js +18 -0
  42. package/dist/cli-bundle/focused-chunks/{chunk-M6RPIXKC.js → chunk-J5EKAIVD.js} +2 -2
  43. package/dist/cli-bundle/focused-chunks/{chunk-2EXI2DKR.js → chunk-KDH5OX3D.js} +2 -2
  44. package/dist/cli-bundle/focused-chunks/chunk-OJ3LVVIS.js +2 -0
  45. package/dist/cli-bundle/focused-chunks/{chunk-DZGAHZZV.js → chunk-TL5M2PAY.js} +2 -2
  46. package/dist/cli-bundle/focused-chunks/{chunk-75774JWP.js → chunk-UDAZWT25.js} +2 -2
  47. package/dist/cli-bundle/focused-chunks/chunk-VABB4L5Y.js +17 -0
  48. package/dist/cli-bundle/main.js +13 -13
  49. package/dist/cli-bundle/sdk-authoring.js +1 -1
  50. package/dist/cli-bundle/sdk-contracts.js +1 -1
  51. package/dist/cli-bundle/sdk-core.js +41 -39
  52. package/dist/cli-bundle/sdk-governance.js +1 -1
  53. package/dist/cli-bundle/sdk-graph.js +1 -1
  54. package/dist/cli-bundle/sdk-merge.js +1 -1
  55. package/dist/cli-bundle/sdk-query.js +1 -1
  56. package/dist/cli-bundle/sdk-runtime.js +1 -1
  57. package/dist/cli-bundle/sdk-testing.js +1 -1
  58. package/dist/cli-bundle/sdk.js +2 -2
  59. package/dist/core/session/session-state.d.ts +47 -0
  60. package/dist/core/session/session-state.js +207 -6
  61. package/dist/core/shared/author.d.ts +7 -1
  62. package/dist/core/shared/author.js +66 -46
  63. package/dist/core/shared/errors.d.ts +8 -0
  64. package/dist/core/shared/errors.js +2 -2
  65. package/dist/sdk/agent/refusal-reachability.d.ts +40 -0
  66. package/dist/sdk/agent/refusal-reachability.js +72 -0
  67. package/dist/sdk/agent/subcommand-recovery.d.ts +40 -0
  68. package/dist/sdk/agent/subcommand-recovery.js +84 -0
  69. package/dist/sdk/cli-bootstrap.d.ts +8 -0
  70. package/dist/sdk/cli-bootstrap.js +7 -7
  71. package/dist/sdk/cli-contracts/completeness.js +13 -3
  72. package/dist/sdk/cli-contracts/enum-contracts.d.ts +1 -1
  73. package/dist/sdk/cli-contracts/enum-contracts.js +3 -2
  74. package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
  75. package/dist/sdk/cli-contracts/flag-contracts.js +17 -2
  76. package/dist/sdk/cli-contracts/runtime-contracts.js +4 -3
  77. package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +513 -0
  78. package/dist/sdk/cli-contracts/schemas/assurance-definition.js +251 -0
  79. package/dist/sdk/cli-contracts/tool-parameter-tables.js +79 -2
  80. package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
  81. package/dist/sdk/cli-contracts/tool-schema.js +34 -4
  82. package/dist/sdk/cli-contracts.d.ts +1 -1
  83. package/dist/sdk/cli-contracts.js +3 -3
  84. package/dist/sdk/completion.js +9 -3
  85. package/dist/sdk/config.js +9 -3
  86. package/dist/sdk/context/semantic-session-attribution.d.ts +32 -0
  87. package/dist/sdk/context/semantic-session-attribution.js +83 -0
  88. package/dist/sdk/core-governance.d.ts +3 -1
  89. package/dist/sdk/core-governance.js +5 -3
  90. package/dist/sdk/core.d.ts +1 -1
  91. package/dist/sdk/core.js +2 -2
  92. package/dist/sdk/error-code-catalog.d.ts +13 -0
  93. package/dist/sdk/error-code-catalog.js +35 -2
  94. package/dist/sdk/extension.js +18 -17
  95. package/dist/sdk/files.d.ts +11 -0
  96. package/dist/sdk/files.js +82 -24
  97. package/dist/sdk/generated-error-code-catalog.js +32 -13
  98. package/dist/sdk/governance/assurance-action-contracts.d.ts +7 -0
  99. package/dist/sdk/governance/assurance-action-contracts.js +5 -0
  100. package/dist/sdk/governance/assurance-action.d.ts +70 -0
  101. package/dist/sdk/governance/assurance-action.js +198 -0
  102. package/dist/sdk/governance/assurance-limits.d.ts +7 -0
  103. package/dist/sdk/governance/assurance-limits.js +11 -0
  104. package/dist/sdk/governance/assurance-runtime.d.ts +20 -0
  105. package/dist/sdk/governance/assurance-runtime.js +131 -0
  106. package/dist/sdk/governance/assurance.d.ts +432 -0
  107. package/dist/sdk/governance/assurance.js +689 -0
  108. package/dist/sdk/graph/run.js +8 -3
  109. package/dist/sdk/index.d.ts +6 -1
  110. package/dist/sdk/index.js +8 -3
  111. package/dist/sdk/lifecycle/claim.js +18 -3
  112. package/dist/sdk/lifecycle/focus.js +13 -3
  113. package/dist/sdk/lifecycle/plan.js +8 -3
  114. package/dist/sdk/provenance.d.ts +38 -0
  115. package/dist/sdk/provenance.js +64 -2
  116. package/dist/sdk/query/context.js +19 -8
  117. package/dist/sdk/runtime-extended-actions.js +22 -5
  118. package/dist/sdk/runtime-primitives.d.ts +2 -0
  119. package/dist/sdk/runtime-primitives.js +4 -2
  120. package/dist/sdk/runtime.d.ts +4 -0
  121. package/dist/sdk/runtime.js +31 -27
  122. package/dist/sdk/telemetry.js +7 -4
  123. package/dist/sdk/traceability/runtime-files-lookup.d.ts +8 -0
  124. package/dist/sdk/traceability/runtime-files-lookup.js +33 -0
  125. package/dist/sdk/traceability/source-traceability.d.ts +102 -0
  126. package/dist/sdk/traceability/source-traceability.js +293 -0
  127. package/dist/types.d.ts +8 -2
  128. package/dist/types.js +2 -2
  129. package/docs/ASSURANCE.md +132 -0
  130. package/docs/README.md +1 -0
  131. package/docs/RELEASING.md +9 -5
  132. package/docs/SDK.md +12 -1
  133. package/docs/SDK_AGENT_SESSION_CONTEXT.md +40 -4
  134. package/docs/SDK_EVIDENCE_TRACEABILITY.md +39 -1
  135. package/docs/SDK_RUNTIME_BOUNDARIES.md +36 -1
  136. package/docs/TESTING.md +12 -9
  137. package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -0
  138. package/marketplace.json +2 -2
  139. package/package.json +3 -3
  140. package/packages/pm-beads/package.json +1 -1
  141. package/packages/pm-calendar/package.json +1 -1
  142. package/packages/pm-command-kit/package.json +1 -1
  143. package/packages/pm-digital-twin/package.json +1 -1
  144. package/packages/pm-governance-audit/package.json +1 -1
  145. package/packages/pm-guide-shell/package.json +1 -1
  146. package/packages/pm-kanban/package.json +1 -1
  147. package/packages/pm-lifecycle-hooks/package.json +1 -1
  148. package/packages/pm-linked-test-adapters/package.json +1 -1
  149. package/packages/pm-search-advanced/package.json +1 -1
  150. package/packages/pm-templates/extensions/templates/index.ts +9 -3
  151. package/packages/pm-templates/package.json +1 -1
  152. package/packages/pm-todos/package.json +1 -1
  153. package/packages/pm-vcs/package.json +1 -1
  154. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  155. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  156. package/sdk/public-surface.json +840 -28
  157. package/dist/cli-bundle/chunks/chunk-2QYH4QMI.js +0 -30
  158. package/dist/cli-bundle/chunks/chunk-JUDU4RO4.js +0 -194
  159. package/dist/cli-bundle/chunks/chunk-JZSNADRR.js +0 -5
  160. package/dist/cli-bundle/chunks/chunk-MENWVGJW.js +0 -2
  161. package/dist/cli-bundle/chunks/chunk-S4EITGLA.js +0 -3
  162. package/dist/cli-bundle/chunks/chunk-TIGKWVLA.js +0 -13
  163. package/dist/cli-bundle/chunks/chunk-TSLDTJLQ.js +0 -2
  164. package/dist/cli-bundle/chunks/register-mutation-DKI7QC7O.js +0 -20
  165. package/dist/cli-bundle/chunks/register-operations-P5OGMT6I.js +0 -2
  166. package/dist/cli-bundle/focused-chunks/chunk-36FTZ2NT.js +0 -2
  167. package/dist/cli-bundle/focused-chunks/chunk-3CQECMKR.js +0 -16
  168. package/dist/cli-bundle/focused-chunks/chunk-CHIBMEZR.js +0 -8
  169. package/dist/cli-bundle/focused-chunks/chunk-FF4MNAYB.js +0 -153
  170. package/dist/cli-bundle/focused-chunks/chunk-GHTN2ILR.js +0 -2
  171. package/dist/cli-bundle/focused-chunks/chunk-I4YM2I7S.js +0 -2
  172. package/dist/cli-bundle/focused-chunks/chunk-IMDTEN7K.js +0 -2
  173. package/dist/cli-bundle/focused-chunks/chunk-KSNJG4KI.js +0 -16
  174. package/dist/cli-bundle/focused-chunks/chunk-MXYSIQ56.js +0 -18
  175. package/dist/cli-bundle/focused-chunks/chunk-RKWSCYYN.js +0 -2
package/dist/types.js CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  /** Supported values accepted by the builtin item type contract. */
7
7
 
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2a2072c1-f4a7-579e-ac11-4c75758d76d3")}catch(e){}}();
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="605cf12e-6106-563a-abc0-38d648d4aa43")}catch(e){}}();
9
9
  export const BUILTIN_ITEM_TYPE_VALUES = [
10
10
  "Epic",
11
11
  "Feature",
@@ -241,4 +241,4 @@ export const CONTEXT_SECTION_VALUES = [
241
241
  "tests",
242
242
  ];
243
243
  //# sourceMappingURL=types.js.map
244
- //# debugId=2a2072c1-f4a7-579e-ac11-4c75758d76d3
244
+ //# debugId=605cf12e-6106-563a-abc0-38d648d4aa43
@@ -0,0 +1,132 @@
1
+ # Project Assurance Primitives
2
+
3
+ Tracker: [pm-2lex4r](../.agents/pm/features/pm-2lex4r.toon), [pm-lyfu7b](../.agents/pm/features/pm-lyfu7b.toon), [pm-wn6wot](../.agents/pm/features/pm-wn6wot.toon), [pm-91xeam](../.agents/pm/features/pm-91xeam.toon)
4
+
5
+ ## Agent Quick Context
6
+
7
+ Assurance turns project policy into three reusable SDK-owned declarations:
8
+
9
+ 1. A **measurement** selects authoritative project data and produces a number or labelled set plus population, contributor, and compute-cost receipts.
10
+ 2. An **assertion** applies exactly one explicit bound, scope, lifetime, and enforcement level to a measurement. Required negative controls prove that the bound can both pass and fail.
11
+ 3. A **gate** evaluates named assertions at declared lifecycle triggers and returns one structured verdict shared by CLI, SDK, MCP, and CI callers.
12
+
13
+ Declarations live in `.agents/pm/assurance.json`. Every registry mutation and non-dry gate verdict is appended through the verified workspace history stream; never edit either file directly.
14
+
15
+ ## Why Assurance Exists
16
+
17
+ Project management is context management. A useful quality gate therefore needs more than a shell exit code: it must preserve what was measured, which population was judged, why a bound exists, who owns it, what changed the result, how expensive the evaluation was, and which immutable tree received the verdict.
18
+
19
+ The assurance SDK keeps those semantics independent from presentation. Commander and MCP only normalize inputs. Package authors and CI hosts can use the same public functions without reconstructing policy in scripts.
20
+
21
+ ## Declaration Vocabulary
22
+
23
+ Measurements support these built-in sources:
24
+
25
+ | Source | Purpose |
26
+ | --- | --- |
27
+ | `items` | Count items matching status, type, tags, or an exact metadata field. |
28
+ | `dependency_kind` | Count typed relationship edges such as `blocked_by` or `verifies`. |
29
+ | `graph` | Select a numeric or labelled-set field from a public graph SDK result. |
30
+ | `validate` | Select a validator check status or numeric detail. |
31
+ | `health` | Select a health check status, numeric detail, or labelled set. |
32
+ | `history` | Count immutable events by operation, author, harness, or model. |
33
+ | `links` | Count items with present or missing file, test, or documentation evidence. |
34
+ | `derived` | Combine numeric measurements with deterministic arithmetic and cycle detection. |
35
+ | `provider` | Delegate a measurement to an explicitly supplied host/package resolver. |
36
+
37
+ Each measurement may declare `max_cost`. Evaluation fails closed when the total abstract compute units exceed that ceiling. Every result reports units, scanned items, scanned history rows, provider calls, duration, population size, and contributors.
38
+
39
+ Assertions require exactly one polarity:
40
+
41
+ - `ceiling`, `floor`, `equals`, or `zero`
42
+ - `monotone_nondecreasing` or `monotone_nonincreasing`
43
+ - `subset_of` for labelled sets
44
+
45
+ Scopes are `all`, `active`, or `filter`. A filter names another measurement whose contributors define the item population. `lifetime: hold` keeps the guarantee after its owner item becomes terminal. `lifetime: retire` retires it only after owner termination and requires `retire_reason`.
46
+
47
+ Enforcement is `block`, `warn`, or `observe`. Weakening a bound, scope, lifetime, owner, source measurement, or enforcement requires `authorization_decision` naming a terminal Decision item verified by the host. The transport verifies only that explicitly named item; it never treats unrelated workspace Decisions as authorization. Tightening does not require authorization.
48
+
49
+ ## CLI Workflow
50
+
51
+ Create a measurement:
52
+
53
+ ```bash
54
+ pm assurance put measurement active-issues \
55
+ --definition '{"id":"active-issues","source":{"kind":"items","statuses":["open","in_progress"],"types":["Issue"]},"max_cost":5000}' \
56
+ --message "Track the active issue population"
57
+ ```
58
+
59
+ Create an assertion with executable negative controls:
60
+
61
+ ```bash
62
+ pm assurance put assertion active-issues-ceiling \
63
+ --definition '{"id":"active-issues-ceiling","measurement_id":"active-issues","owner_item_id":"pm-example","scope":{"kind":"active"},"ceiling":25,"lifetime":"hold","enforcement":"block","negative_control":{"cases":[{"observed":25,"expected":"pass"},{"observed":26,"expected":"fail"}]}}'
64
+ ```
65
+
66
+ Create and evaluate a gate:
67
+
68
+ ```bash
69
+ pm assurance put gate release-readiness \
70
+ --definition '{"id":"release-readiness","assertion_ids":["active-issues-ceiling"],"triggers":["ci","pre-release"]}'
71
+
72
+ pm assurance run release-readiness --trigger ci --dry-run --json
73
+ pm assurance run release-readiness --trigger pre-release --tree "$(git rev-parse HEAD)" --json
74
+ pm assurance verdicts release-readiness --limit 20 --json
75
+ ```
76
+
77
+ Registry reads and removals use the same nouns:
78
+
79
+ ```bash
80
+ pm assurance list measurement --json
81
+ pm assurance show assertion active-issues-ceiling --json
82
+ pm assurance remove gate release-readiness
83
+ ```
84
+
85
+ Referenced measurements and assertions cannot be removed. Remove the consuming gate or assertion first.
86
+
87
+ ## SDK and MCP
88
+
89
+ The reusable client exposes the same action grammar:
90
+
91
+ ```ts
92
+ import { PmClient } from "@unbrained/pm-cli/sdk";
93
+
94
+ const pm = new PmClient({ pmRoot: ".agents/pm" });
95
+
96
+ await pm.assurance({
97
+ action: "run",
98
+ id: "release-readiness",
99
+ trigger: "ci",
100
+ dry_run: true,
101
+ });
102
+ ```
103
+
104
+ For direct host composition, use `evaluateMeasurement`, `evaluateAssuranceGate`, `createAssuranceWorkspaceContext`, and the audited declaration/verdict helpers exported from `@unbrained/pm-cli/sdk`. A host contributes provider measurements by passing stable resolver ids to `createAssuranceWorkspaceContext`; an absent resolver fails loudly. External adapters must enforce an appropriate timeout. The core evaluator bounds concurrent assertions and expression operands, and workspace history loading uses bounded concurrency; item-only callers can explicitly skip history and Git identity resolution.
105
+
106
+ Generic SDK and MCP dispatch use `action: "assurance"` with `subcommand` set to `list`, `show`, `put`, `remove`, `run`, or `verdicts`. Discover the current machine contract instead of copying parameter lists:
107
+
108
+ ```bash
109
+ pm contracts --action assurance --schema-only --json
110
+ pm contracts --command assurance --flags-only --json
111
+ ```
112
+
113
+ ## Verdict Contract
114
+
115
+ A gate emits one object containing:
116
+
117
+ - gate id, evaluated tree, trigger, timestamp, and dry-run status;
118
+ - overall `pass`, `warn`, or `block` plus stable exit code;
119
+ - every assertion's measurement, scope, population, observed value, structured bound, signed distance, enforcement, negative-control proof, cost, and contributors;
120
+ - an aggregate compute receipt.
121
+
122
+ Dry runs never write history. Non-dry verdicts are immutable workspace audit events and remain queryable after ordinary registry changes. Verdict reads return newest entries first and default to a bounded result; use `--limit` to select up to 1,000 matching records. A blocking verdict exits non-zero; warnings and observations remain successful while preserving their failed assertion rows.
123
+
124
+ ## Safety and Evolution
125
+
126
+ - Use stable lowercase ids; prose belongs in descriptions and mutation messages.
127
+ - Prefer saved measurements and derived arithmetic over duplicating queries in scripts.
128
+ - Give expensive graph, health, validate, or provider measurements explicit cost ceilings.
129
+ - Keep owner items and authorization Decisions linked into the project graph.
130
+ - Treat negative controls as part of the policy, not test decoration.
131
+ - Use `hold` unless a time-bounded guarantee has an explicit retirement rationale.
132
+ - Use `--dry-run` while authoring or tightening a gate, then persist a verdict against an immutable tree.
package/docs/README.md CHANGED
@@ -53,6 +53,7 @@ pm guide release --json
53
53
  - [Agent Provenance ADR Amendment](AGENT_PROVENANCE_ADR.md) - extensible model, effort, role, and host provenance with privacy and compatibility boundaries.
54
54
  - [SDK Agent Session and Episode Context](SDK_AGENT_SESSION_CONTEXT.md) - inherited role/topic context, cross-process episode identity, and deterministic history grouping.
55
55
  - [Improvement Ledger and History Analytics](IMPROVEMENT_ANALYTICS.md) - audited quantitative observations, live provenance coverage, and bounded observational fleet outcomes.
56
+ - [Project Assurance Primitives](ASSURANCE.md) - SDK-owned measurements, assertions, lifecycle gates, cost receipts, and durable verdict history shared by CLI and MCP.
56
57
  - [SDK Evidence Traceability and Integrity](SDK_EVIDENCE_TRACEABILITY.md) - reverse source-to-item lookup, atomic evidence replacement, no-op history, linked-test collision classification, and telemetry drain receipts.
57
58
  - [Reproducible Workspaces and Snapshots](REPRODUCIBLE_WORKSPACES.md) - deterministic SDK recipes and content-addressed authoritative tracker restore points.
58
59
  - [Portable Corpus Shapes](CORPUS_SHAPES.md) - versioned SDK populations for realistic benchmarks, evaluations, and package tests.
package/docs/RELEASING.md CHANGED
@@ -106,7 +106,7 @@ The pipeline performs:
106
106
  1. change detection + one-release-per-day guard
107
107
  2. a single `YYYY.M.D` version bump; ordinal targets and the removed
108
108
  `--allow-same-day-release` override fail closed
109
- 3. latest `pm-changelog` install and main changelog refresh through package-owned full-history generation; the release pipeline passes `--release-version` with `--all-release-tags` so the pending release section matches post-tag CI checks
109
+ 3. latest `pm-changelog` install and main changelog refresh through package-owned full-history generation; the release pipeline passes `--release-version`, `--all-release-tags`, and the canonical `--exclude-tag changelog-exclude` policy so the pending release section matches post-tag CI checks
110
110
  4. build, clone-local merge-driver installation, then the remaining strict gates (typecheck, docs/skills freshness, coverage, static quality, compatibility, security, smoke checks, reliability gate); this ordering makes the checkout-owned CLI available before bootstrap, matches CI, and prevents fresh-clone tracker measurements from observing undeclared merge-driver repairs
111
111
  5. release note generation from changelog + pm evidence
112
112
  6. commit and tag creation (plus optional push)
@@ -265,7 +265,10 @@ git push origin v<version>
265
265
  - build, clone-local merge-driver installation, typecheck, test, and coverage
266
266
  - generated changelog verification and `pm-changelog` installation before the
267
267
  tracker-bearing static gate, so a clean checkout does not misclassify the
268
- managed extension's linked files as missing
268
+ managed extension's linked files as missing. Recovery of an unpublished
269
+ immutable tag regenerates only `CHANGELOG.md` with the tagged checkout's
270
+ canonical package script and fails if that operation changes any other
271
+ tracked source path (apart from managed-extension install metadata).
269
272
  - static quality gate (shared complexity, duplication, dead/orphan module, file/folder hygiene, source/exported docstring coverage profile)
270
273
  - temporary-project compatibility gate against latest published tracker data
271
274
  - reliability threshold gate (Sentry severity threshold, bounded to a recent-activity window via `--sentry-window-days` (default `14`, `0` = unbounded) so a stale benign unresolved issue cannot block every scheduled release; `--telemetry-mode` gate policy: `off` | `best-effort` | `required`). Scheduled `auto-release.yml` failures open/update an `Auto Release blocked` GitHub issue so blocked daily releases are never silently skipped.
@@ -350,9 +353,10 @@ Use the npm registry package for maintainer global updates. Do not use `npm inst
350
353
  existing version keeps the reviewed dispatch-time `main` source and cannot
351
354
  be republished. A definitive missing-version response pins the checkout to
352
355
  the existing immutable tag, reapplies the version guard, installs the managed
353
- changelog extension before tracker measurement, and permits first publication
354
- only from that exact tagged source. Other registry failures stop before
355
- source selection or publication.
356
+ changelog extension, regenerates the package changelog with the tagged
357
+ checkout's canonical policy under a tracked-path mutation guard, and permits
358
+ first publication only from that tagged source. Other registry failures stop
359
+ before source selection or publication.
356
360
  - If an immutable published package contains a defect that cannot be repaired
357
361
  by rerunning the same tag workflow, document the incident and ship the code
358
362
  fix in the next UTC day's release.
package/docs/SDK.md CHANGED
@@ -317,7 +317,8 @@ 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; `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` 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.
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.
321
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`
322
323
  - Plan contracts: `PlanSubcommand`, `PlanCommandOptions`, `PlanCommandResult`, `PlanResultPlan`, `PlanStepSummary`, `PlanShowDepth`, and `PlanTemplateName`
323
324
  - Typed package and extension lifecycle primitives on `PmClient`: `extension`, `extensionList`, `extensionActivate`, `extensionDeactivate`, `package`, `packageList`, `packageInstall`, `packageUninstall`, `packageDoctor`, `packageManage`, `packageDescribe`, `packageReload`, `packageCatalog`, `packageActivate`, `packageDeactivate`, `packageMigrate`, and `upgrade`; one-shot `extensionMigrate` and `packageMigrate` helpers mirror those lifecycle actions.
@@ -3274,6 +3275,10 @@ For SDK and automation consumers, the key runtime change is the optional `recove
3274
3275
  - `normalized_args`
3275
3276
  - `provided_fields`
3276
3277
  - `missing`
3278
+ - `allowed_values`
3279
+ - `candidate_commands`
3280
+ - `candidate_commands_total`
3281
+ - `candidate_commands_truncated`
3277
3282
  - `suggested_retry`
3278
3283
 
3279
3284
  Treat `recovery.suggested_retry` as the first-choice deterministic replay
@@ -3287,6 +3292,12 @@ interpreted as a missing input. Strict close validation reports missing
3287
3292
  resolution fields first and suggests a targeted `pm update` before retrying the
3288
3293
  original close invocation.
3289
3294
 
3295
+ Unknown-option envelopes rank command paths that accept the rejected flag by
3296
+ shared vocabulary and include explicit total/truncation metadata. They are
3297
+ contract-discovery hints, not permission to change the requested operation.
3298
+ Unknown positional subcommands expose the complete `allowed_values` vocabulary
3299
+ and use `suggested_retry` only when a deterministic nearby value exists.
3300
+
3290
3301
  ## Authoring Pattern
3291
3302
 
3292
3303
  - Keep handlers deterministic and JSON-like.
@@ -85,10 +85,38 @@ values are ignored instead of polluting analytics. Presence-only harness flags,
85
85
  including `CLAUDE_CODE_CHILD_SESSION=1`, are detection evidence and are never
86
86
  persisted as semantic roles.
87
87
 
88
- For ordinary CLI mutations, the detector can infer an `implementer` or
89
- `reviewer` role from the bounded command verb and a topic from an explicit
90
- `pm-...` item argument. Explicit overrides, session declarations, and trusted
91
- host declarations retain precedence over this inference.
88
+ ## Infer semantic context from lifecycle state
89
+
90
+ Successful `claim`, `release`, and `focus` operations maintain a bounded,
91
+ checkout-local semantic workset. Later CLI and SDK mutations can therefore
92
+ record useful role and topic provenance without repeating identity flags or
93
+ retaining prompt text:
94
+
95
+ - a claim records the item and at most 16 canonical parent ancestors, infers
96
+ `role=implementer`, and uses the item or stable multi-item workset as topic;
97
+ - an explicit focus becomes the high-confidence topic and infers
98
+ `role=planner`;
99
+ - a release removes only that claim and records `role=release-operator` while
100
+ other active claims remain; and
101
+ - clearing the final claim and focus removes the inferred session record.
102
+
103
+ At most 64 active item ids and 32 evidence rows are retained. Multi-item topics
104
+ are deterministically bounded and hashed when their full identity would exceed
105
+ the provenance limit. The state is partitioned by the privacy-safe agent
106
+ instance when available, otherwise by a truncated hash of the resolved author.
107
+ It lives in the gitignored runtime session file and malformed records fail open.
108
+
109
+ The same workset feeds `pm context` as `claim_focus` relevance: claimed and
110
+ focused items receive affinity `1`, while bounded canonical ancestors receive
111
+ `0.75`. Active work is preserved by the context packer under its existing token
112
+ ceiling; the inference never raises the requested budget.
113
+
114
+ Explicit overrides, declared session context, command flags, environment,
115
+ MCP-client declarations, host declarations, and configured probes all retain
116
+ precedence. Automatic observations use `source=inferred`, `rule_version=v2`,
117
+ and carry the bounded claim/focus/lineage evidence that supports them. The pure
118
+ `semanticAttributionAffinity()` helper and lifecycle recording primitives are
119
+ public SDK exports for custom hosts.
92
120
 
93
121
  ## Diagnose missing provenance
94
122
 
@@ -145,6 +173,11 @@ declared a dimension but supplied no value. The compatibility helper
145
173
  `summarizeAgentModelProvenance(entries)` remains available for model-only
146
174
  consumers.
147
175
 
176
+ `evaluateSemanticAttributionCoverage(entries, options)` groups role/topic
177
+ availability by harness and precedence source. Its explicit minimum-entry and
178
+ minimum-coverage ratchet fails empty corpora, making a negative control part of
179
+ the contract instead of allowing an unobserved harness to pass vacuously.
180
+
148
181
  `groupHistoryByEpisode(entries)` returns deterministic nested groups:
149
182
 
150
183
  - recorded episode keys produce `source: "declared"`;
@@ -166,3 +199,6 @@ channel. Do not put tokens, private hostnames, signed URLs, or raw external
166
199
  payloads in ids, labels, roles, or topics. Session ids used to derive
167
200
  `agent_instance` remain transient and are not persisted. Every new history
168
201
  field is optional, so existing streams and packages remain readable.
202
+ Automatic semantic attribution is likewise restricted to item ids, controlled
203
+ roles, rule metadata, and canonical lineage ids. It never persists argv,
204
+ environment values, prompts, filesystem contents, or raw harness session ids.
@@ -12,6 +12,8 @@ Use `pm files lookup` with one or more project-relative or absolute paths:
12
12
  pm files lookup src/sdk/files.ts
13
13
  pm files lookup src/sdk/files.ts docs/SDK_EVIDENCE_TRACEABILITY.md --limit 20
14
14
  pm files lookup /absolute/project/src/sdk/files.ts --scope project --strict-read --json
15
+ pm files lookup src/sdk/files.ts --explain
16
+ pm files lookup src/sdk/files.ts --lines 650:720 --decision-depth 12 --json
15
17
  ```
16
18
 
17
19
  The command normalizes in-project absolute paths to project-relative paths, deduplicates targets, and returns referencing items in deterministic priority, update-time, and ID order. The default result limit is 50. Use `--offset` for bounded pagination or `--no-truncate` for an authoritative unbounded source scan.
@@ -26,6 +28,34 @@ Every response includes:
26
28
 
27
29
  `--strict-read` fails instead of returning partial source-scan results. Indexed reads are intentionally reported as `unchecked`: they are cursor-bound projections optimized for bounded context retrieval, while strict reads force authoritative item loading.
28
30
 
31
+ ## Explain why source exists
32
+
33
+ `--explain` upgrades reverse lookup from an ownership list to a bounded context
34
+ projection. Every match adds:
35
+
36
+ - its linked-file evidence and compact `value`, `why_now`, `outcome`, and
37
+ `objective` rationale;
38
+ - the shortest typed relationship path to a governing Decision, including
39
+ inverse edge names when traversal crosses an edge backwards;
40
+ - a deterministic relevance score used before normal priority, update-time,
41
+ and id tie-breakers; and
42
+ - explicit ambiguity codes when Git attribution is unavailable, selected lines
43
+ have no mapped commit, no governing Decision is reachable, or several
44
+ equally short Decisions exist.
45
+
46
+ `--lines start:end` is an inclusive, one-based selector that implies
47
+ `--explain` and accepts exactly one path. It runs bounded `git blame` and a
48
+ 256-commit path log. A blamed commit contributes only when its commit message
49
+ contains the exact pm item id, so Git history supplements linked tracker
50
+ evidence without inventing lineage. Git failures are non-fatal and appear as
51
+ ambiguity rather than silently claiming attribution. `--decision-depth` is
52
+ bounded from 1 through 32 and defaults to 8.
53
+
54
+ The top-level `traceability_receipt` reports the requested range, blamed,
55
+ mapped, and unmapped commit counts, and effective decision depth. Explained
56
+ lookups use an authoritative source scan because a compact metadata index does
57
+ not contain the rationale and graph fields required to support the answer.
58
+
29
59
  ## SDK and MCP
30
60
 
31
61
  The public SDK exposes both reusable-client and one-shot forms:
@@ -37,6 +67,9 @@ const client = new PmClient({ cwd: process.cwd() });
37
67
  const fromClient = await client.filesLookup({
38
68
  paths: ["src/sdk/files.ts"],
39
69
  limit: 20,
70
+ explain: true,
71
+ lineRange: { start: 650, end: 720 },
72
+ decisionDepth: 12,
40
73
  });
41
74
 
42
75
  const oneShot = await filesLookup(
@@ -45,7 +78,12 @@ const oneShot = await filesLookup(
45
78
  );
46
79
  ```
47
80
 
48
- The MCP `files` action uses the same primitive when `lookupPath` is present. `id` remains required for item-local add, remove, discover, and list operations; reverse lookup instead requires one or more `lookupPath` values. Use `pm contracts --command files --flags-only --json` for the active machine contract.
81
+ The MCP `files` action uses the same primitive when `lookupPath` is present and
82
+ accepts `explain`, `lines`, and `decisionDepth`. The dedicated `files_lookup`
83
+ tool exposes the same fields. `id` remains required for item-local add, remove,
84
+ discover, and list operations; reverse lookup instead requires one or more
85
+ `lookupPath` values. Use `pm contracts --command files --flags-only --json` for
86
+ the active machine contract.
49
87
 
50
88
  SDK hosts that manage authoritative item writes directly can use `queryLinkedFileMetadataIndex` from the public item-metadata-index surface. The reverse projection is rebuilt from linked-file collections and updated in the same derived-index writer section as normal metadata deltas. A missing, stale, corrupt, or extension-incompatible index must fall back to authoritative reads.
51
89
 
@@ -2,7 +2,11 @@
2
2
 
3
3
  Tracker: [pm-1eted6](../.agents/pm/issues/pm-1eted6.toon),
4
4
  [pm-3lhth4](../.agents/pm/issues/pm-3lhth4.toon), and
5
- [pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon).
5
+ [pm-0xmajx](../.agents/pm/issues/pm-0xmajx.toon). Refusal reachability and
6
+ recovery completeness are tracked by
7
+ [pm-elmpav](../.agents/pm/features/pm-elmpav.toon),
8
+ [pm-185870](../.agents/pm/issues/pm-185870.toon), and
9
+ [pm-yqe0mo](../.agents/pm/issues/pm-yqe0mo.toon).
6
10
 
7
11
  These SDK primitives keep host and project-runtime policy consistent across the
8
12
  bundled CLI, packages, and automation without requiring consumers to reproduce
@@ -56,3 +60,34 @@ guidance when presenting refusals as human-readable or structured output.
56
60
  Host-only validation remains at the transport boundary, while rules shared by
57
61
  packages and commands live in public SDK primitives so callers receive the
58
62
  same refusal contract regardless of entrypoint.
63
+
64
+ `createUnknownSubcommandError` is the shared constructor for positional command
65
+ families. It emits `unknown_subcommand` with the stable
66
+ `unknown_positional_token` reason, a complete sorted `allowed_values` set, the
67
+ attempted command, and a nearest copy-pasteable retry when edit distance gives
68
+ an unambiguous candidate. CLI, direct SDK dispatch, MCP, and package hosts use
69
+ the same primitive. The CLI also recognizes split schema actions such as
70
+ `schema add type Name` and recommends the declared `schema add-type Name`
71
+ form instead of collapsing the failure into a generic arity error.
72
+ Core graph, config, plan, schema, profile, merge, telemetry, workspace, and
73
+ package/extension lifecycle dispatchers use this contract. The bundled
74
+ templates package demonstrates the same primitive for package-registered
75
+ families; custom packages can import it from the public SDK instead of
76
+ inventing a private refusal envelope. The former `unknown_lifecycle_action`
77
+ catalog name remains a compatibility alias of `unknown_subcommand`.
78
+
79
+ `PmErrorCodeContract.owned_states` declares concrete refusal states, their
80
+ probe ids, reachable entrypoints, and expected exit classes. The generated
81
+ catalog joins those declarations to the discovered error-code inventory.
82
+ Package and test harnesses can pass real-entrypoint observations to
83
+ `verifyPmRefusalReachability`; missing probes, wrong codes, wrong exit classes,
84
+ and undeclared observations fail closed. This makes an error code's existence
85
+ and its runtime reachability independently testable.
86
+
87
+ Unknown-option recovery separates human and machine budgets. Human guidance
88
+ shows the first three ranked command paths plus an explicit remainder count.
89
+ The structured envelope returns up to twelve ranked paths alongside
90
+ `candidate_commands_total` and `candidate_commands_truncated`, ordered by
91
+ shared option vocabulary and then command path. Consumers must inspect another
92
+ command contract before changing operations; candidate discovery is not an
93
+ instruction to run a different command.
package/docs/TESTING.md CHANGED
@@ -242,12 +242,12 @@ baseline, scorer tests, and SDK documentation together.
242
242
  Tracked by [pm-k6t4yb](../.agents/pm/tasks/pm-k6t4yb.toon) and
243
243
  [pm-b2hc4x](../.agents/pm/tasks/pm-b2hc4x.toon).
244
244
 
245
- Every named workflow step that makes a build, test, quality, security, package,
246
- or release claim is discovered and matched exactly against
247
- `scripts/release/gate-registry.json`. Each registry entry declares:
245
+ Every workflow job is discovered by its stable `workflow-file#job-id` identity
246
+ and matched exactly against `scripts/release/gate-registry.json`; human-facing
247
+ step names never define the inventory. Each registry entry declares:
248
248
 
249
249
  - a canonical pm owner;
250
- - the enforced workflow steps it owns;
250
+ - the enforced workflow jobs it participates in;
251
251
  - actionable failure taxonomy;
252
252
  - explicit bypass policy and audit rationale;
253
253
  - an executable negative-control test and assertion.
@@ -259,11 +259,14 @@ pnpm quality:gate-registry
259
259
  node scripts/release/gate-registry.mjs --inventory
260
260
  ```
261
261
 
262
- `pnpm quality:static` includes the registry. A newly named workflow gate fails
263
- until it has an owner and negative-control proof; a removed or renamed workflow
264
- step also fails until stale policy is reconciled. Public source claims are
265
- mapped to exact evidence strings and an enforced registry entry so
266
- documentation cannot silently advertise advisory behavior.
262
+ `pnpm quality:static` includes the registry. A new workflow job fails until it
263
+ is declared under at least one canonical gate, and a removed or renamed job id
264
+ fails until stale policy is reconciled. Display-name edits do not mutate gate
265
+ identity. Public source claims are mapped to exact evidence strings and an
266
+ enforced registry entry so documentation cannot silently advertise advisory
267
+ behavior.
268
+ The inventory output lists registry-derived `registered` job IDs beside the
269
+ parsed `workflow_jobs`; validation requires the two sets to match exactly.
267
270
 
268
271
  ## Tracker Context-Quality Ratchets
269
272
 
@@ -62,6 +62,7 @@ This file is generated from `PM_COMMAND_VISIBILITY_CONTRACTS`. Do not edit it ma
62
62
  | `stats` | full |
63
63
  | `health` | standard |
64
64
  | `validate` | core |
65
+ | `assurance` | full |
65
66
  | `gc` | full |
66
67
  | `workspace` | full |
67
68
  | `contracts` | standard |
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.10"
9
+ "version": "2026.8.11"
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.10",
16
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.10.0",
@@ -211,11 +211,11 @@
211
211
  "@codspeed/vitest-plugin": "^5.7.1",
212
212
  "@eslint/js": "^10.0.1",
213
213
  "@sentry/cli": "^3.6.2",
214
- "@types/node": "^26.1.2",
214
+ "@types/node": "^26.2.0",
215
215
  "@types/npm-package-arg": "^6.1.4",
216
216
  "@vitest/coverage-v8": "^4.1.10",
217
217
  "esbuild": "0.28.1",
218
- "eslint": "^10.8.0",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-beads",
3
- "version": "2026.8.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
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.10",
3
+ "version": "2026.8.11",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for semantic, hybrid, and reindex search workflows.",
@@ -8,6 +8,7 @@ import type {
8
8
  ExtensionApi,
9
9
  GlobalOptions,
10
10
  } from "@unbrained/pm-cli/sdk";
11
+ import { createUnknownSubcommandError } from "@unbrained/pm-cli/sdk";
11
12
  import {
12
13
  runTemplatesList as runTemplatesListPackage,
13
14
  runTemplatesSave as runTemplatesSavePackage,
@@ -53,9 +54,14 @@ function assertListInvocation(
53
54
  ): void {
54
55
  const unexpectedSubcommand = args.find((arg) => arg.trim().length > 0);
55
56
  if (unexpectedSubcommand) {
56
- throw new Error(
57
- `Unknown pm templates subcommand "${unexpectedSubcommand}". Allowed: list, save, show. Apply a saved template with pm create <type> <title> --template <name>.`,
58
- );
57
+ throw createUnknownSubcommandError({
58
+ command_path: "templates",
59
+ token: unexpectedSubcommand,
60
+ allowed: ["list", "save", "show"],
61
+ message_suffix:
62
+ ". Apply a saved template with pm create <type> <title> --template <name>.",
63
+ examples: ["pm create <type> <title> --template <name>"],
64
+ });
59
65
  }
60
66
  const unexpectedOptions = optionKeys(options);
61
67
  if (unexpectedOptions.length > 0) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-templates",
3
- "version": "2026.8.10",
3
+ "version": "2026.8.11",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "First-party pm package for reusable create templates.",