@unbrained/pm-cli 2026.8.26 → 2026.8.27

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 (161) hide show
  1. package/.agents/skills/HARNESS_COMPATIBILITY.md +32 -0
  2. package/.agents/skills/README.md +47 -0
  3. package/.agents/skills/pm-developer/SKILL.md +117 -0
  4. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +49 -0
  5. package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +91 -0
  6. package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +72 -0
  7. package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
  8. package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +82 -0
  9. package/.agents/skills/pm-developer/references/TOKEN_BUDGETS.md +85 -0
  10. package/.agents/skills/pm-extensions/SKILL.md +106 -0
  11. package/.agents/skills/pm-extensions/references/AUTHORING.md +95 -0
  12. package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
  13. package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
  14. package/.agents/skills/pm-sdk/SKILL.md +107 -0
  15. package/.agents/skills/pm-sdk/references/DOMAIN_MODELING.md +78 -0
  16. package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
  17. package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
  18. package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +82 -0
  19. package/.agents/skills/pm-user/SKILL.md +111 -0
  20. package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +105 -0
  21. package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
  22. package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
  23. package/.claude-plugin/marketplace.json +2 -2
  24. package/CHANGELOG.md +25 -3
  25. package/README.md +8 -5
  26. package/dist/cli/commander-usage.js +11 -7
  27. package/dist/cli/error-guidance.js +3 -3
  28. package/dist/cli/help-content.d.ts +2 -0
  29. package/dist/cli/help-content.js +53 -17
  30. package/dist/cli/help-json-payload.d.ts +8 -2
  31. package/dist/cli/help-json-payload.js +46 -12
  32. package/dist/cli/main.js +52 -74
  33. package/dist/cli/register-annotations.js +27 -21
  34. package/dist/cli/register-setup.js +98 -57
  35. package/dist/cli-bundle/bundle-manifest.json +152 -152
  36. package/dist/cli-bundle/chunks/chunk-3OO3W6FW.js +202 -0
  37. package/dist/cli-bundle/chunks/chunk-52EKTW6V.js +3 -0
  38. package/dist/cli-bundle/chunks/{chunk-KBFP3E4E.js → chunk-CVBBGWW5.js} +62 -44
  39. package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
  40. package/dist/cli-bundle/chunks/{chunk-E2GCFJSU.js → chunk-OS27HHBN.js} +31 -31
  41. package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
  42. package/dist/cli-bundle/chunks/{chunk-S4U76VZF.js → chunk-R4ETAOJC.js} +2 -2
  43. package/dist/cli-bundle/chunks/{chunk-UKBCRPA2.js → chunk-SH6P7FXI.js} +2 -2
  44. package/dist/cli-bundle/chunks/{chunk-WRHJ3MB6.js → chunk-SHMDY36D.js} +2 -2
  45. package/dist/cli-bundle/chunks/{chunk-ZNRLJ54C.js → chunk-SKXLJIEK.js} +2 -2
  46. package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
  47. package/dist/cli-bundle/chunks/{register-list-query-EMCPMICY.js → register-list-query-EUWM6VII.js} +2 -2
  48. package/dist/cli-bundle/chunks/{register-mutation-OJ67ABCB.js → register-mutation-FD4HSAVU.js} +4 -4
  49. package/dist/cli-bundle/chunks/{register-operations-H2GLP7LT.js → register-operations-HRMNFEC3.js} +2 -2
  50. package/dist/cli-bundle/chunks/register-setup-33GNICLX.js +2 -0
  51. package/dist/cli-bundle/focused-chunks/{chunk-4XNH2HM7.js → chunk-2AGZ5BRT.js} +2 -2
  52. package/dist/cli-bundle/focused-chunks/{chunk-72T6JGAE.js → chunk-4BR5UU52.js} +45 -45
  53. package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
  54. package/dist/cli-bundle/focused-chunks/{chunk-UYBA57GY.js → chunk-AD6ULRAF.js} +2 -2
  55. package/dist/cli-bundle/focused-chunks/{chunk-7YCDTCBC.js → chunk-AQ5IYEZZ.js} +2 -2
  56. package/dist/cli-bundle/focused-chunks/{chunk-YO3ZF3FI.js → chunk-EKX37ZHA.js} +2 -2
  57. package/dist/cli-bundle/focused-chunks/{chunk-LV5N3LK5.js → chunk-FC2AXLB5.js} +2 -2
  58. package/dist/cli-bundle/focused-chunks/{chunk-IBHXMFE7.js → chunk-HC7ODMH3.js} +2 -2
  59. package/dist/cli-bundle/focused-chunks/{chunk-4K2II4TV.js → chunk-HVQ22RC4.js} +2 -2
  60. package/dist/cli-bundle/focused-chunks/{chunk-A644DUFQ.js → chunk-MEASX544.js} +2 -2
  61. package/dist/cli-bundle/focused-chunks/{chunk-FXDLT6FL.js → chunk-MXTYGECH.js} +2 -2
  62. package/dist/cli-bundle/focused-chunks/{chunk-MMXUPDDJ.js → chunk-SUBSWYW3.js} +2 -2
  63. package/dist/cli-bundle/focused-chunks/{chunk-57XY346D.js → chunk-XDPYBQCF.js} +9 -9
  64. package/dist/cli-bundle/focused-chunks/{chunk-TMJDFHVD.js → chunk-Y3JJXRVK.js} +2 -2
  65. package/dist/cli-bundle/focused-chunks/{chunk-66VGB23P.js → chunk-Y5A7SJJ7.js} +2 -2
  66. package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
  67. package/dist/cli-bundle/focused-chunks/{chunk-P2E6LDAE.js → chunk-YVVZ3LQ6.js} +3 -3
  68. package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +5 -0
  69. package/dist/cli-bundle/main.js +15 -14
  70. package/dist/cli-bundle/sdk-authoring.js +1 -1
  71. package/dist/cli-bundle/sdk-contracts.js +2 -2
  72. package/dist/cli-bundle/sdk-core.js +31 -31
  73. package/dist/cli-bundle/sdk-governance.js +1 -1
  74. package/dist/cli-bundle/sdk-graph.js +1 -1
  75. package/dist/cli-bundle/sdk-merge.js +31 -31
  76. package/dist/cli-bundle/sdk-query.js +1 -1
  77. package/dist/cli-bundle/sdk-runtime.js +1 -1
  78. package/dist/cli-bundle/sdk-testing.js +1 -1
  79. package/dist/cli-bundle/sdk.js +32 -7
  80. package/dist/core/governance/issue-codes.d.ts +11 -2
  81. package/dist/core/governance/issue-codes.js +29 -10
  82. package/dist/core/item/item-format.js +3 -3
  83. package/dist/core/store/item-store.js +12 -5
  84. package/dist/mcp/server.js +123 -9
  85. package/dist/mcp/tool-definitions.d.ts +2 -0
  86. package/dist/mcp/tool-definitions.js +2 -2
  87. package/dist/sdk/agent/closed-domain-contracts.d.ts +1 -1
  88. package/dist/sdk/agent/closed-domain-contracts.js +24 -2
  89. package/dist/sdk/agent-capability-contracts.js +6 -2
  90. package/dist/sdk/cli-bootstrap.js +3 -2
  91. package/dist/sdk/cli-contracts/command-aliases.js +15 -2
  92. package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -1
  93. package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
  94. package/dist/sdk/cli-contracts/flag-contracts.js +9 -5
  95. package/dist/sdk/cli-contracts/grammar-contracts.d.ts +3 -3
  96. package/dist/sdk/cli-contracts/grammar-contracts.js +24 -17
  97. package/dist/sdk/cli-contracts/runtime-contracts.js +13 -11
  98. package/dist/sdk/cli-contracts/tool-schema.js +18 -15
  99. package/dist/sdk/cli-contracts.d.ts +1 -1
  100. package/dist/sdk/cli-contracts.js +3 -3
  101. package/dist/sdk/cli-program.js +3 -2
  102. package/dist/sdk/completion.js +40 -13
  103. package/dist/sdk/generated/generated-error-code-catalog-part-2.js +14 -2
  104. package/dist/sdk/governance/upgrade.d.ts +2 -0
  105. package/dist/sdk/governance/upgrade.js +30 -8
  106. package/dist/sdk/governance/validate.js +8 -6
  107. package/dist/sdk/guide-topics.js +6 -6
  108. package/dist/sdk/index.d.ts +4 -2
  109. package/dist/sdk/index.js +5 -3
  110. package/dist/sdk/mcp/apps.d.ts +70 -0
  111. package/dist/sdk/mcp/apps.js +154 -0
  112. package/dist/sdk/mcp/skills.d.ts +127 -0
  113. package/dist/sdk/mcp/skills.js +390 -0
  114. package/dist/sdk/read-output-contracts.js +16 -3
  115. package/dist/sdk/runtime-action-aliases.js +7 -3
  116. package/dist/sdk/runtime-input.js +12 -4
  117. package/dist/sdk/runtime-primitives.d.ts +1 -1
  118. package/dist/sdk/runtime-primitives.js +3 -3
  119. package/docs/CLI_GRAMMAR.md +7 -1
  120. package/docs/COMMANDS.md +2 -2
  121. package/docs/EXTENSIONS.md +33 -32
  122. package/docs/MCP_2026_07_28.md +24 -2
  123. package/docs/MCP_2026_07_28_CONFORMANCE.md +4 -4
  124. package/docs/MCP_SKILLS_AND_APPS.md +107 -0
  125. package/docs/QUICKSTART.md +15 -15
  126. package/docs/README.md +1 -0
  127. package/docs/RELEASING.md +11 -3
  128. package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
  129. package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
  130. package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
  131. package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +7 -6
  132. package/marketplace.json +2 -2
  133. package/package.json +9 -7
  134. package/packages/pm-beads/README.md +12 -6
  135. package/packages/pm-beads/docs/MIGRATION.md +53 -0
  136. package/packages/pm-beads/extensions/beads/index.ts +8 -0
  137. package/packages/pm-beads/extensions/beads/runtime.ts +671 -112
  138. package/packages/pm-beads/package.json +1 -1
  139. package/packages/pm-calendar/package.json +1 -1
  140. package/packages/pm-command-kit/package.json +1 -1
  141. package/packages/pm-digital-twin/package.json +1 -1
  142. package/packages/pm-governance-audit/package.json +1 -1
  143. package/packages/pm-guide-shell/package.json +1 -1
  144. package/packages/pm-kanban/package.json +1 -1
  145. package/packages/pm-lifecycle-hooks/package.json +1 -1
  146. package/packages/pm-linked-test-adapters/package.json +1 -1
  147. package/packages/pm-search-advanced/package.json +1 -1
  148. package/packages/pm-templates/package.json +1 -1
  149. package/packages/pm-todos/package.json +1 -1
  150. package/packages/pm-vcs/package.json +1 -1
  151. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  152. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  153. package/sdk/public-surface.json +235 -13
  154. package/dist/cli-bundle/chunks/chunk-ES25LX3D.js +0 -202
  155. package/dist/cli-bundle/chunks/chunk-FRDWWB6R.js +0 -3
  156. package/dist/cli-bundle/chunks/chunk-ICQ3RVIY.js +0 -2
  157. package/dist/cli-bundle/chunks/chunk-IV64RJVE.js +0 -13
  158. package/dist/cli-bundle/chunks/chunk-MVYLQ67M.js +0 -3
  159. package/dist/cli-bundle/chunks/register-setup-GLZAHLVI.js +0 -2
  160. package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
  161. package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
@@ -1,11 +1,17 @@
1
1
  # Noun–Verb CLI Grammar and Compatibility Policy
2
2
 
3
- Tracked by [pm-pbyu](../.agents/pm/decisions/pm-pbyu.toon), implemented through [pm-0z7n](../.agents/pm/features/pm-0z7n.toon), [pm-pfqi](../.agents/pm/tasks/pm-pfqi.toon), [pm-yy8rmx](../.agents/pm/tasks/pm-yy8rmx.toon), and [pm-wt43zj](../.agents/pm/tasks/pm-wt43zj.toon).
3
+ Tracked by [pm-pbyu](../.agents/pm/decisions/pm-pbyu.toon), implemented through [pm-0z7n](../.agents/pm/features/pm-0z7n.toon), [pm-pfqi](../.agents/pm/tasks/pm-pfqi.toon), [pm-yy8rmx](../.agents/pm/tasks/pm-yy8rmx.toon), [pm-wt43zj](../.agents/pm/tasks/pm-wt43zj.toon), [pm-e2bq](../.agents/pm/features/pm-e2bq.toon), and [pm-yql1](../.agents/pm/tasks/pm-yql1.toon).
4
4
 
5
5
  ## Agent Quick Context
6
6
 
7
7
  Use the canonical noun-first form when generating commands. Existing spellings remain executable, but deprecated compatibility aliases are absent from default help and completion discovery and emit one migration hint on stderr. Machine clients can read alias lifecycle and replacement tokens from `pm contracts --full --json`.
8
8
 
9
+ Default `pm --help` stays within the core one-screen budget. Use
10
+ `pm help --all` for every public command or `pm help --all --json` for the same
11
+ surface with per-command visibility/family metadata and the complete alias
12
+ lifecycle table. `--explain` also expands command discovery while adding the
13
+ detailed narrative.
14
+
9
15
  The first completed consolidation is the list family:
10
16
 
11
17
  ```bash
package/docs/COMMANDS.md CHANGED
@@ -178,7 +178,7 @@ As a read-only structured surface, `duplicates` accepts the universal output
178
178
  controls, including `--output-format json`, `--lean`, projection/amount
179
179
  controls, and token accounting, while its default TOON output remains bounded.
180
180
  Tracked by [pm-gh1076](../.agents/pm/issues/pm-gh1076.toon).
181
- Use `pm get <id>` to read a single item by ID — the single-item read primitive used throughout the agent loop. It accepts `--fields <list>` and `--depth brief|standard|deep|full` for token-minimal projections, and `--tree`/`--tree-depth <n>` to include descendants. Standard/deep reads expose a normalized `schedule` facet (`deadline`, `start_at`, `end_at`, `location`, reminders, and events) when scheduling metadata exists. Container-oriented built-ins (Epic, Feature, Milestone, and Plan) plus custom types automatically expose type-agnostic child counts and continuation metadata. Standard depth keeps that rollup counts-only; `--depth deep|full` or an explicit `--fields id,children` request adds the deterministic bounded child sample. Built-in leaf reads avoid a workspace scan unless children are explicitly requested. `pm get <id> --json` returns the `body` inside the `item` object (`.item.body`); see [Full results, totals, and bodies](#full-results-totals-and-bodies). To duplicate an existing item as a starting point, `pm copy <id> --title "New title"` clones it into a fresh id with lifecycle fields reset.
181
+ Use `pm get <id>` to read a single item by ID — the single-item read primitive used throughout the agent loop. It accepts `--fields <list>` and `--depth brief|standard|deep|full` for token-minimal projections, and `--tree`/`--tree-depth <n>` to include descendants. The universal `--output-include` selector can request stored collections directly, for example `pm get <id> --output-include comments,learnings,tests`; the same bare and `item.<field>` grammar works through CLI, SDK, and MCP transports. Standard/deep reads expose a normalized `schedule` facet (`deadline`, `start_at`, `end_at`, `location`, reminders, and events) when scheduling metadata exists. Container-oriented built-ins (Epic, Feature, Milestone, and Plan) plus custom types automatically expose type-agnostic child counts and continuation metadata. Standard depth keeps that rollup counts-only; `--depth deep|full` or an explicit `--fields id,children` request adds the deterministic bounded child sample. Built-in leaf reads avoid a workspace scan unless children are explicitly requested. `pm get <id> --json` returns the `body` inside the `item` object (`.item.body`); see [Full results, totals, and bodies](#full-results-totals-and-bodies). To duplicate an existing item as a starting point, `pm copy <id> --title "New title"` clones it into a fresh id with lifecycle fields reset.
182
182
 
183
183
  When the strongest duplicate match is terminal because the same work recurred,
184
184
  reuse its lineage instead of creating or copying another item:
@@ -743,7 +743,7 @@ pm notes <id> --add "Keep renderer changes isolated to TOON output."
743
743
  pm learnings <id> --add "Use runtime contracts instead of duplicating flag lists."
744
744
  ```
745
745
 
746
- Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance. `--body` is a hidden compatibility alias for comments `--add`; choose exactly one input source (`[text]`, `--add`/`--body`, `--stdin`, or `--file`) per invocation. To clean up obsolete orchestration notes, `--edit <index>` rewrites the comment at a 1-based index and `--delete <index>` removes it; both record history and honor ownership rules.
746
+ Use comments for progress and evidence, notes for implementation context, and learnings for durable future guidance. All three accept `--text` as a hidden compatibility alias for canonical `--add`; comments also retain `--body`/`--comment`, and notes retain `--note`. Choose exactly one input source (`[text]`, an add alias, `--stdin`, or `--file`) per invocation. Conflicting alias values fail before mutation. To clean up obsolete orchestration notes, `--edit <index>` rewrites the comment at a 1-based index and `--delete <index>` removes it; both record history and honor ownership rules.
747
747
 
748
748
  ## Linked Artifacts
749
749
 
@@ -7,42 +7,42 @@ Packages add optional `pm` workflows without changing the core CLI. A package ca
7
7
  ```bash
8
8
  pm package init ./my-package
9
9
  pm package init ./my-hook-package --capability hooks
10
- pm install ./my-package --project
10
+ pm package install ./my-package --project
11
11
  pm package doctor --project --detail summary
12
12
  pm package reload --project
13
- pm upgrade --dry-run
13
+ pm package upgrade --dry-run
14
14
  ```
15
15
 
16
- `pm extension ...` remains supported for compatibility and low-level runtime debugging. Related docs: [SDK](SDK.md), [Configuration](CONFIGURATION.md), [Testing](TESTING.md), [Command Reference](COMMANDS.md), [Extension Author Contracts](EXTENSION_AUTHOR_CONTRACTS.md).
16
+ Hidden `pm extension ...`, `pm install ...`, and `pm upgrade ...` aliases remain supported for compatibility. They execute the canonical package handlers, keep stdout machine-compatible, and emit one migration hint on stderr unless the public config key `ux_deprecation_hints` (stored at `ux.deprecation_hints`) is disabled. Related docs: [SDK](SDK.md), [Configuration](CONFIGURATION.md), [Testing](TESTING.md), [Command Reference](COMMANDS.md), [Extension Author Contracts](EXTENSION_AUTHOR_CONTRACTS.md).
17
17
 
18
18
  ## Package Sources
19
19
 
20
- `pm install` accepts local, registry, and GitHub sources:
20
+ `pm package install` accepts local, registry, and GitHub sources:
21
21
 
22
22
  ```bash
23
- pm install ./local-package --project
24
- pm install /absolute/path/to/package --project
25
- pm install ./my-package-1.2.3.tgz --project
26
- pm install npm:./my-package-1.2.3.tar.gz --project
27
- pm install npm:@scope/package --project
28
- pm install npm:package@1.2.3 --project
29
- pm install https://github.com/org/repo --project
30
- pm install --github org/repo/path --ref main --project
23
+ pm package install ./local-package --project
24
+ pm package install /absolute/path/to/package --project
25
+ pm package install ./my-package-1.2.3.tgz --project
26
+ pm package install npm:./my-package-1.2.3.tar.gz --project
27
+ pm package install npm:@scope/package --project
28
+ pm package install npm:package@1.2.3 --project
29
+ pm package install https://github.com/org/repo --project
30
+ pm package install --github org/repo/path --ref main --project
31
31
  ```
32
32
 
33
33
  Bundled first-party packages live under `packages/pm-*`:
34
34
 
35
35
  ```bash
36
36
  pm package catalog --project
37
- pm install all --project
38
- pm install calendar --project
39
- pm install search-advanced --project
40
- pm install kanban --project
37
+ pm package install all --project
38
+ pm package install calendar --project
39
+ pm package install search-advanced --project
40
+ pm package install kanban --project
41
41
  ```
42
42
 
43
- `pm install '*'`, `pm install all`, and shell-expanded `pm install *` are normalized to the same bundled install-all request. First-party package aliases come from each package manifest, with a fallback derived from the `packages/pm-*` directory name. A bare bundled alias that also names an installed npm package reports both explicit choices in `source_resolution`; see [Extension Lifecycle Contracts](EXTENSION_LIFECYCLE.md).
43
+ `pm package install '*'` and `pm package install all` are normalized to the same bundled install-all request. First-party package aliases come from each package manifest, with a fallback derived from the `packages/pm-*` directory name. A bare bundled alias that also names an installed npm package reports both explicit choices in `source_resolution`; see [Extension Lifecycle Contracts](EXTENSION_LIFECYCLE.md).
44
44
 
45
- External registry packages are installed by exact package name. If `npm:<name>` returns a registry 404, JSON error output includes `fallback_candidates` and `next_best_command`; unpublished first-party packages fall back to `pm install --project github.com/unbraind/<name>`. Install results include package-owned `command_paths`, `action_paths`, `contributions`, `command_discovery`, and a light `verification` block covering the target tracker, activation status, registered commands/actions/item types, and health verdict. Agents should consume those fields instead of guessing from the package name or immediately spending another invocation on doctor. A successful activation persists the versioned contribution inventory in `.managed-extensions.json`; subsequent discovery can enumerate command handlers, hooks, parser/renderer targets, schema names, and the other registered surfaces without importing the package module. A failed runtime activation returns `ok: false`, `activated: false`, a non-zero CLI exit, and actionable diagnostics; missing SDK resolution adds an explicit dependency recovery step. Local installs are containment-safe when the extension destination is nested inside the source checkout: pm stages the package outside the source and prunes the destination, `.agents`, `node_modules`, and install-backup directories before copying, so reinstalling cannot recursively copy tracker history, host dependencies, or prior backups.
45
+ External registry packages are installed by exact package name. If `npm:<name>` returns a registry 404, JSON error output includes `fallback_candidates` and `next_best_command`; unpublished first-party packages fall back to `pm package install --project github.com/unbraind/<name>`. Install results include package-owned `command_paths`, `action_paths`, `contributions`, `command_discovery`, and a light `verification` block covering the target tracker, activation status, registered commands/actions/item types, and health verdict. Agents should consume those fields instead of guessing from the package name or immediately spending another invocation on doctor. A successful activation persists the versioned contribution inventory in `.managed-extensions.json`; subsequent discovery can enumerate command handlers, hooks, parser/renderer targets, schema names, and the other registered surfaces without importing the package module. A failed runtime activation returns `ok: false`, `activated: false`, a non-zero CLI exit, and actionable diagnostics; missing SDK resolution adds an explicit dependency recovery step. Local installs are containment-safe when the extension destination is nested inside the source checkout: pm stages the package outside the source and prunes the destination, `.agents`, `node_modules`, and install-backup directories before copying, so reinstalling cannot recursively copy tracker history, host dependencies, or prior backups.
46
46
  Local `.tgz` and `.tar.gz` npm archives are inspected and extracted in an isolated temporary directory without invoking a shell. Archives must contain one `package/package.json` root, regular files/directories only, and bounded entry and expanded-byte totals. Absolute paths, traversal, alternate roots, links, device entries, oversized entries, and decompression-ratio abuse fail before installation. The managed source remains the original archive path, so reload and upgrade provenance do not point at a temporary extraction directory.
47
47
  Registry dependency names and versions are parsed as npm package specs before the install subprocess starts. Leading-option names and shell control syntax are rejected. npm reads those validated dependencies from an isolated runtime-only manifest; no caller-controlled spec is forwarded through the Windows command shell, and the fixed invocation still ends option parsing with `--`. Runtime verification then activates a temporary snapshot of the complete installed extension directory, so an upgrade cannot silently reuse stale transitive ESM dependencies from the current process. Successful install details expose `module_graph_verification: "fresh_snapshot"` for this check.
48
48
  pm-owned npm subprocesses clear any inherited, case-insensitive `npm_config_allow_scripts` value while retaining registry, auth, proxy, and executable-path environment; `--ignore-scripts` remains authoritative. Tracked by [pm-gh1072](../.agents/pm/issues/pm-gh1072.toon).
@@ -50,8 +50,8 @@ An explicit `--pm-path` scopes project installs to that tracker root, including
50
50
 
51
51
  ```bash
52
52
  npm search "pm-cli pm-package"
53
- pm install npm:pm-changelog --project
54
- pm install npm:pm-github --project
53
+ pm package install npm:pm-changelog --project
54
+ pm package install npm:pm-github --project
55
55
  pm package doctor --project --detail deep --trace
56
56
  pm github validate --repo owner/repo
57
57
  ```
@@ -91,7 +91,7 @@ Package roots declare resources in `package.json` under `pm`:
91
91
  ```
92
92
 
93
93
  Installation activates `pm.extensions`. `pm.docs`, `pm.examples`, `pm.assets`, and `pm.prompts` are catalog metadata (metadata-only — they are discovered and surfaced in the catalog but not executed). Declare agent-facing prompt/slash-command markdown under `pm.prompts` and non-code assets (images, skills, fixtures) under `pm.assets`; their conventional roots are `prompts/` (also `.agents/pm/prompts/`) and `assets/` (also `.agents/pm/assets/`).
94
- `pm package init` and its compatibility spelling `pm extension init` emit the same publishable root-extension artifact (`"extensions": ["."]`): package metadata, a typed `index.ts`, a colocated `node:test` suite, a strict type-check-only `tsconfig.json`, and `typecheck`/`test` scripts. Both results report the canonical `package_name` and exact `invocation_command`; an already prefixed target such as `pm-my-workflow` stays `pm-my-workflow` instead of becoming `pm-pm-my-workflow`. The manifest `entry` points at `./index.ts` itself (ADR [pm-2c28](../.agents/pm/decisions/pm-2c28.toon) / [pm-m1uz](../.agents/pm/decisions/pm-m1uz.toon)). pm loads that `.ts` entry directly via Node's native type stripping (Node >=22.18), so there is no build step — run `npm install` (for the peer SDK and type-checking) before `pm install`. The generated README shows how to author exported command/hook definitions with the SDK [define\* builders](../.agents/pm/decisions/pm-3mph.toon). `--capability` selects one of ten starters — one per SDK registration surface (`commands`, `hooks`, `search`, `importers`, `schema`, `profile`, `renderers`, `parser`, `preflight`, `services`) each keeping a runnable starter command and adding the surface's registration plus a colocated `node:test` suite built on the matching SDK `assertRegistered*`/`runRegistered*ForTest` helpers. The option is repeatable for shell and config composition: repeating the same capability is idempotent, while combining distinct starter shapes fails with a usage error that asks the author to select one explicit scaffold capability. The full per-capability matrix (what each starter registers, which starters also declare `schema` because flag metadata is schema-governed, and why `schema`/`profile` omit `activation.commands` so their global contributions activate conservatively for every command) lives in [SDK.md — Minimal Command Extension](./SDK.md#minimal-command-extension). Starter manifests use the same least-privilege policy metadata as pure first-party command packages: `trusted: true`, `sandbox_profile: "strict"`, and explicit `false` permissions for `fs_read`, `fs_write`, `network`, `env_read`, `env_write`, and `process_spawn`. Declarative starters import `manifest.json` in their generated test and call `assertExtensionManifestMatchesBlueprint`, so capability drift fails locally before publication. Larger packages may point at nested extension directories after declaring runtime dependencies, relaxing only the permissions they actually need, and validating with `pm package doctor`, which additionally emits the advisory `extension_schema_narrow_activation` warning when a package registers custom item types/fields yet declares narrow `activation.commands` (the schema footgun above), recommending the field be dropped so the type stays globally available.
94
+ `pm package init` and its compatibility spelling `pm extension init` emit the same publishable root-extension artifact (`"extensions": ["."]`): package metadata, a typed `index.ts`, a colocated `node:test` suite, a strict type-check-only `tsconfig.json`, and `typecheck`/`test` scripts. Both results report the canonical `package_name` and exact `invocation_command`; an already prefixed target such as `pm-my-workflow` stays `pm-my-workflow` instead of becoming `pm-pm-my-workflow`. The manifest `entry` points at `./index.ts` itself (ADR [pm-2c28](../.agents/pm/decisions/pm-2c28.toon) / [pm-m1uz](../.agents/pm/decisions/pm-m1uz.toon)). pm loads that `.ts` entry directly via Node's native type stripping (Node >=22.18), so there is no build step — run `npm install` (for the peer SDK and type-checking) before `pm package install`. The generated README shows how to author exported command/hook definitions with the SDK [define\* builders](../.agents/pm/decisions/pm-3mph.toon). `--capability` selects one of ten scaffold starters (`commands`, `hooks`, `search`, `importers`, `schema`, `profile`, `renderers`, `parser`, `preflight`, `services`), each keeping a runnable starter command and adding the selected registration pattern plus a colocated `node:test` suite built on the matching SDK `assertRegistered*`/`runRegistered*ForTest` helpers. These are authoring selectors, not a one-to-one manifest-capability vocabulary: the `profile` starter registers a profile but declares the supported `schema` manifest capability because `api.registerProfile` is schema-governed. The option is repeatable for shell and config composition: repeating the same capability is idempotent, while combining distinct starter shapes fails with a usage error that asks the author to select one explicit scaffold capability. The full per-capability matrix (what each starter registers, which starters also declare `schema` because flag metadata is schema-governed, and why `schema`/`profile` omit `activation.commands` so their global contributions activate conservatively for every command) lives in [SDK.md — Minimal Command Extension](./SDK.md#minimal-command-extension). Starter manifests use the same least-privilege policy metadata as pure first-party command packages: `trusted: true`, `sandbox_profile: "strict"`, and explicit `false` permissions for `fs_read`, `fs_write`, `network`, `env_read`, `env_write`, and `process_spawn`. Declarative starters import `manifest.json` in their generated test and call `assertExtensionManifestMatchesBlueprint`, so capability drift fails locally before publication. Larger packages may point at nested extension directories after declaring runtime dependencies, relaxing only the permissions they actually need, and validating with `pm package doctor`, which additionally emits the advisory `extension_schema_narrow_activation` warning when a package registers custom item types/fields yet declares narrow `activation.commands` (the schema footgun above), recommending the field be dropped so the type stays globally available.
95
95
  Package tests can pair `readPmPackageManifest(packageRoot)` with
96
96
  `assertPackageManifest(manifest, { resources: ... })` from
97
97
  `@unbrained/pm-cli/sdk` to prove aliases and resource paths without duplicating
@@ -202,11 +202,11 @@ Use [extension-manifest.schema.json](schemas/extension-manifest.schema.json) as
202
202
  - An empty-string or non-string `pm_min_version`/`pm_max_version` makes the whole manifest malformed (`extension_manifest_invalid:<layer>:<name>`). Omit the field instead of leaving it blank.
203
203
  - Optional `engines.pm` and `engines.node` metadata is accepted for tooling, but `pm_min_version`/`pm_max_version` are the loader-enforced compatibility fields.
204
204
  - Declare only capabilities the extension actually uses. Declaring a capability it never registers against is over-broad: `pm package doctor` emits an advisory `extension_capability_unused:<layer>:<name>:<capability>` warning (never blocking) so you can trim the manifest, while the inverse — registering a surface whose capability is undeclared — is the blocking `extension_capability_missing` activation failure. Catch over-declaration earlier with the `assertExtensionCapabilityUsage` SDK testing helper.
205
- - `contributions` is the versioned, serializable surface inventory. `schema_version: 1` supports command definitions/handlers/overrides, hook phases, flag/parser targets, item types and fields, relationship kinds, migrations, profiles, importers/exporters, search/vector providers, service/renderer targets, renderer command ownership, and the preflight count. `pm install` derives and persists this block mechanically from the real activation result; authors may also declare it in `manifest.json` for build-time/static discovery.
205
+ - `contributions` is the versioned, serializable surface inventory. `schema_version: 1` supports command definitions/handlers/overrides, hook phases, flag/parser targets, item types and fields, relationship kinds, migrations, profiles, importers/exporters, search/vector providers, service/renderer targets, renderer command ownership, and the preflight count. `pm package install` derives and persists this block mechanically from the real activation result; authors may also declare it in `manifest.json` for build-time/static discovery.
206
206
  - `activation.commands` is an optional array of the command paths on which the extension may activate (e.g. `["hello", "tickets import"]`). An explicit list is authoritative for every capability, including hooks and parser/preflight/renderer packages: when no declared path matches, pm does not import the module. Omit it and pm first uses the static contribution inventory, then falls back to conservative capability heuristics for legacy packages whose contributions are unknown.
207
207
  - Unknown capabilities emit deterministic warnings; legacy aliases such as `migration` and `validation` are normalized to `schema` with warnings.
208
208
 
209
- Supported capabilities:
209
+ Supported manifest capabilities (the `profile` scaffold selector emits a profile registration under `schema`; it is not a manifest capability):
210
210
 
211
211
  - `commands`
212
212
  - `parser`
@@ -293,9 +293,11 @@ Doctor JSON also includes `triage.collision_plan` with grouped surfaces, ranked
293
293
  ## Runtime APIs
294
294
 
295
295
  Use the public SDK barrel. Do not deep-import from `src/core` or `dist/core`.
296
+
296
297
  ```ts
297
298
  import { defineExtension } from "@unbrained/pm-cli/sdk";
298
299
  ```
300
+
299
301
  Common APIs:
300
302
 
301
303
  - `api.extension` is a read-only identity (`name`, `layer`, `version`, `capabilities`, `pm_min_version?`, `pm_max_version?`, `source_package?`) for self-identifying logs and version gating without re-reading the manifest.
@@ -383,14 +385,14 @@ Compatibility equivalents remain available through `pm extension ...` for existi
383
385
 
384
386
  ## Upgrade Workflow
385
387
 
386
- `pm upgrade` is the package-first update entrypoint:
388
+ `pm package upgrade` is the package-first update entrypoint:
387
389
 
388
390
  ```bash
389
- pm upgrade --dry-run
390
- pm upgrade
391
- pm upgrade --packages-only
392
- pm upgrade todos --dry-run
393
- pm upgrade --cli-only --repair
391
+ pm package upgrade --dry-run
392
+ pm package upgrade
393
+ pm package upgrade --packages-only
394
+ pm package upgrade todos --dry-run
395
+ pm package upgrade --cli-only --repair
394
396
  ```
395
397
 
396
398
  CLI/SDK upgrades use `npm install -g @unbrained/pm-cli@<tag>`. Managed package upgrades reuse the source recorded at install time, including registry, GitHub, local, and first-party package sources.
@@ -401,7 +403,7 @@ Use non-interactive commands with explicit project scope:
401
403
 
402
404
  ```bash
403
405
  pm init --defaults --author codex-agent
404
- pm install '*' --project
406
+ pm package install '*' --project
405
407
  pm package doctor --project --detail summary --json
406
408
  pm contracts --flags-only --json
407
409
  pm health --check-only --json
@@ -421,8 +423,7 @@ import { createExtensionTestHarness } from "@unbrained/pm-cli/sdk/testing";
421
423
  import { activateExtensionForTest } from "@unbrained/pm-cli/sdk/testing";
422
424
  ```
423
425
 
424
- Runtime modules use static SDK imports; installed copies receive a host SDK link. Use `createPmCliExpectedError(message, { exitCode, context })` for expected user/action failures from package commands. It creates an `Error` named `PmCliError` with a structural `exitCode`, so separately installed package code still gets expected-error handling and Sentry filtering.
425
- Commands that need to render a structured gate report and still fail CI may instead return an object with `exit_code` from `1` through `255`; optional string `code` and `remediation` fields are preserved by the host. The result is rendered normally, and the CLI exits with the declared status. Thrown plain objects also preserve bounded `code` and `remediation` fields in the host error contract.
426
+ Runtime modules use static SDK imports; installed copies receive a host SDK link. Use `createPmCliExpectedError(message, { exitCode, context })` for expected user/action failures from package commands. It creates an `Error` named `PmCliError` with a structural `exitCode`, so separately installed package code still gets expected-error handling and Sentry filtering. Commands that need to render a structured gate report and still fail CI may instead return an object with `exit_code` from `1` through `255`; optional string `code` and `remediation` fields are preserved by the host. The result is rendered normally, and the CLI exits with the declared status. Thrown plain objects also preserve bounded `code` and `remediation` fields in the host error contract.
426
427
  Prefer the `define*` builders for exported registration definitions (`defineCommand`, `defineFlag`, `defineSearchProvider`, `defineAfterCommandHook`, and the matching override/import/export/hook helpers; see ADR [pm-3mph](../.agents/pm/decisions/pm-3mph.toon)). They are zero-cost identity functions that preserve object literal types and contextually type function parameters before the definitions reach `api.register*`; runtime validation remains in the loader, and behavior validation remains in `sdk/testing`.
427
428
  Packages that extend core list or search behavior should import `LIST_FILTER_EXTENSION_FLAG_DEFINITIONS`, `SEARCH_EXTENSION_FLAG_DEFINITIONS`, or `toExtensionFlagDefinitions` from `@unbrained/pm-cli/sdk/authoring` instead of copying CLI option tables. For example: `api.registerFlags("my search", SEARCH_EXTENSION_FLAG_DEFINITIONS)`.
428
429
  The adapter expands aliases into registration-ready definitions and preserves string/boolean behavior, list accumulation, repeatability, requiredness, descriptions, and value names from the canonical CLI contracts. Use `toExtensionFlagDefinitions` with another exported CLI flag contract for a narrower baseline.
@@ -10,7 +10,9 @@ and the cache/schema surface are tracked by
10
10
  Streamable HTTP, remote authorization, and the deprecation ratchet are tracked
11
11
  by [pm-v7e337](../.agents/pm/features/pm-v7e337.toon),
12
12
  [pm-3zh9s4](../.agents/pm/features/pm-3zh9s4.toon), and
13
- [pm-vzcisw](../.agents/pm/chores/pm-vzcisw.toon).
13
+ [pm-vzcisw](../.agents/pm/chores/pm-vzcisw.toon). Skills and Apps are tracked
14
+ by [pm-8nzivt](../.agents/pm/features/pm-8nzivt.toon) and
15
+ [pm-pznhee](../.agents/pm/features/pm-pznhee.toon).
14
16
 
15
17
  Status: accepted. MCP `2026-07-28` is pm's canonical protocol revision.
16
18
 
@@ -127,6 +129,25 @@ explicit `ttlMs` and `cacheScope`. Tool schemas are validated as bounded JSON
127
129
  Schema 2020-12 documents before advertisement. Tool and resource data stay
128
130
  private; public metadata lists may be cached for their advertised lifetime.
129
131
 
132
+ ## Skills and Apps extensions
133
+
134
+ Discovery advertises the stable `io.modelcontextprotocol/ui` MCP Apps
135
+ extension and the revision-pinned draft `io.modelcontextprotocol/skills`
136
+ extension. They remain optional and request-local. Apps require the stable
137
+ `2026-01-26` MIME capability; Skills require the exact SEP-2640 commit and
138
+ explicit directory-read support for bulk reads. An incompatible Apps
139
+ declaration is treated as absent by `tools/list` and `resources/list`, so those
140
+ discovery methods degrade to the non-UI surface; direct `ui://` reads remain
141
+ strict and return the allocated missing-capability error. Skills methods fail
142
+ closed on an incompatible draft declaration because their entire method family
143
+ depends on that exact negotiated revision.
144
+
145
+ The public SDK owns skill parsing, digesting, pagination, origin provenance,
146
+ resource bounds, App contracts, tool metadata, sandbox policy, and accessible
147
+ self-contained HTML. The server only applies negotiation and dispatch. See
148
+ [MCP Skills and Apps](MCP_SKILLS_AND_APPS.md) for the wire examples and trust
149
+ model.
150
+
130
151
  ## Public SDK
131
152
 
132
153
  Use `PM_MCP_PROTOCOL_VERSION`, `resolveMcpRequestContext()`,
@@ -135,4 +156,5 @@ Use `PM_MCP_PROTOCOL_VERSION`, `resolveMcpRequestContext()`,
135
156
  `validateMcpHttpRequestHeaders()`, `buildMcpProtectedResourceMetadata()`, and
136
157
  the issuer/trace authorization helpers from `@unbrained/pm-cli/sdk`. See
137
158
  [MCP interaction and task SDK](SDK_MCP_INTERACTIONS.md) and
138
- [remote transport, authorization, and migration](MCP_REMOTE_TRANSPORT_SECURITY.md).
159
+ [remote transport, authorization, and migration](MCP_REMOTE_TRANSPORT_SECURITY.md),
160
+ plus [MCP Skills and Apps](MCP_SKILLS_AND_APPS.md).
@@ -18,13 +18,13 @@ evidence or an explicit open obligation.
18
18
  | Official `io.modelcontextprotocol/tasks` extension | [pm-rzs24j](../.agents/pm/features/pm-rzs24j.toon) | Implemented for eligible tool calls, durable lifecycle, and stdio methods; notifications remain with subscriptions owner | `tests/unit/sdk/mcp/tasks.spec.ts`, `tests/integration/mcp-stateless-protocol.spec.ts` |
19
19
  | Cacheable list/read results, deterministic tools, JSON Schema 2020-12, any JSON structured content | [pm-hv1x1x](../.agents/pm/features/pm-hv1x1x.toon) | Implemented for current pm tool/resource/prompt surfaces | SDK schema/cache tests and direct modern server surface suite |
20
20
  | Issuer-bound authorization, client metadata documents, consent, headers, OpenTelemetry | [pm-3zh9s4](../.agents/pm/features/pm-3zh9s4.toon) | Implemented locally; deployment verifier integration remains host-owned | authorization SDK adversarial tests, real HTTP bearer suite, and threat model |
21
- | Core extension negotiation and official extension fallback | [pm-pznhee](../.agents/pm/features/pm-pznhee.toon) | Open | owner acceptance criteria and release matrix |
22
- | Skills over MCP | [pm-8nzivt](../.agents/pm/features/pm-8nzivt.toon) | Open | owner acceptance criteria define capability and token-budget proof |
21
+ | Stable MCP Apps negotiation, tool/resource metadata, fallback, sandboxing, and accessible views | [pm-pznhee](../.agents/pm/features/pm-pznhee.toon) | Implemented in the public SDK and stateless server; packed/published proof follows merge | `tests/unit/sdk/mcp/apps.spec.ts`, `tests/integration/mcp-stateless-protocol.spec.ts` |
22
+ | Draft Skills over MCP list/get/read, compatibility, provenance, digests, bounds, and pagination | [pm-8nzivt](../.agents/pm/features/pm-8nzivt.toon) | Implemented against exact SEP-2640 draft revision; packed/published proof follows merge | `tests/unit/sdk/mcp/skills.spec.ts`, `tests/integration/mcp-stateless-protocol.spec.ts` |
23
23
  | Deprecated Roots, Sampling, Logging, HTTP+SSE, `includeContext`, dynamic registration | [pm-vzcisw](../.agents/pm/chores/pm-vzcisw.toon) | Canonical source ratcheted; bounded stdio adapter and dated migration policy remain | generated inventory, negative controls, adapter tests, and migration guide |
24
24
  | Official schema, real stdio/HTTP, packed/published, npx/bunx, negative controls | [pm-55yf1t](../.agents/pm/tasks/pm-55yf1t.toon) | Foundation implemented; remains open until every owner above closes | SDK/server suites, plugin smokes, published-release verifier |
25
25
 
26
- The programme gate remains intentionally incomplete while any row says `Open`
27
- or while local-only rows lack their packed and published evidence. Provider
26
+ The programme gate remains intentionally incomplete while local-only rows
27
+ lack their packed and published evidence. Provider
28
28
  silence, a successful legacy initialize, or source-only unit coverage cannot
29
29
  promote such a row. Completion requires the owner's positive and negative
30
30
  tests plus exact packed and published consumer proof.
@@ -0,0 +1,107 @@
1
+ # MCP Skills and Apps
2
+
3
+ Tracker references: [pm-8nzivt](../.agents/pm/features/pm-8nzivt.toon),
4
+ [pm-pznhee](../.agents/pm/features/pm-pznhee.toon), and
5
+ [pm-55yf1t](../.agents/pm/tasks/pm-55yf1t.toon).
6
+
7
+ pm exposes optional workflow guidance and interactive context views without
8
+ moving authority out of the public SDK or the tracker. Both extensions require
9
+ explicit request-local negotiation. Clients that do not negotiate them retain
10
+ the complete CLI, SDK, tool, prompt, and ordinary resource behavior.
11
+
12
+ ## Skills over MCP
13
+
14
+ Skills support follows the current SEP-2640 draft at the exact revision
15
+ `a3e147ca2710f68214247aecc729731ee1ae8d03`. Because the proposal is not a
16
+ stable MCP extension, discovery advertises both `status: draft` and that exact
17
+ revision. Every `skills/list`, `skills/get`, skill `resources/read`, and
18
+ `resources/directory/read` request must independently declare:
19
+
20
+ ```json
21
+ {
22
+ "extensions": {
23
+ "io.modelcontextprotocol/skills": {
24
+ "revision": "SEP-2640@a3e147ca2710f68214247aecc729731ee1ae8d03",
25
+ "directoryRead": true
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ `skills/list` is lexically ordered and cursor-paginated. Descriptors contain
32
+ the parsed SKILL.md frontmatter, every file URI, byte size, SHA-256 digest,
33
+ estimated token cost, package/MCP compatibility, origin, and an explicit
34
+ `untrusted` trust marker. `skills/get` returns one descriptor without loading
35
+ file bodies. Digests use the draft's `sha256:<hex>` representation.
36
+ `resources/read` fetches one digest-bound file; the optional, cursor-paginated
37
+ directory read returns one directory's direct child resource metadata only.
38
+ Clients read selected file bodies through ordinary `resources/read` calls.
39
+
40
+ The published package carries the four canonical pm skills. A repository may
41
+ override a package skill by placing the same validated name below
42
+ `.agents/skills`, and the returned origin changes to `workspace`. Overrides do
43
+ not inherit trust: skill text is guidance, never implicit permission to execute
44
+ commands or mutate the tracker.
45
+
46
+ Security limits reject symbolic links, malformed or aliased YAML, mismatched
47
+ directory/frontmatter names, stale cursors, oversized files, excessive file
48
+ counts, and aggregate skill bodies above the declared bound. In accordance with
49
+ the draft, pm accepts at most 512 resources and 16 MiB of total content per
50
+ skill; the same 16 MiB ceiling applies to an individual resource. An origin is
51
+ limited to 100 candidate skill directories and 32 MiB across all retained
52
+ bodies. File counts and both byte budgets are reserved from filesystem metadata
53
+ before a body is read, so an untrusted workspace cannot exceed the declared
54
+ memory envelope before rejection. Each read is resolved from the immutable
55
+ in-memory registry used to compute its digest.
56
+
57
+ ## MCP Apps
58
+
59
+ pm implements the stable MCP Apps `2026-01-26` extension through the official
60
+ `@modelcontextprotocol/ext-apps` metadata contracts. A client opts in with:
61
+
62
+ ```json
63
+ {
64
+ "extensions": {
65
+ "io.modelcontextprotocol/ui": {
66
+ "specVersion": "2026-01-26",
67
+ "mimeTypes": ["text/html;profile=mcp-app"]
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ Negotiated `tools/list` attaches `_meta.ui.resourceUri` to five existing,
74
+ SDK-backed tools. `resources/list` and `resources/read` expose the corresponding
75
+ `ui://` documents:
76
+
77
+ | View | Authoritative tool | Purpose |
78
+ | --- | --- | --- |
79
+ | Context explorer | `pm_context` | Context, provenance, omissions, and token cost |
80
+ | Relationship graph | `pm_graph` | Typed edges, explaining paths, and governance |
81
+ | Plan and milestone | `pm_plan` | Steps, dependencies, decisions, and validation |
82
+ | Assurance dashboard | `pm_validate` | Verdicts, evidence, and recovery paths |
83
+ | Long-operation view | `pm_test` | Durable test and operation results |
84
+
85
+ Every view is self-contained and requests no network, storage, camera,
86
+ microphone, or location permission. It performs the MCP Apps initialization
87
+ handshake, listens for tool input/result/cancellation and host-context events,
88
+ bounds large renderings with an explicit truncation message, and retains the
89
+ tool result's text fallback. Layout is responsive, keyboard focus is visible,
90
+ and reduced-motion preferences are honored.
91
+
92
+ Apps keep no durable project state and expose no hidden mutation path. The
93
+ tracker, task store, mutation guards, consent, idempotency, and immutable
94
+ receipts remain owned by existing SDK-backed MCP tools. A host that cannot or
95
+ does not render Apps still receives meaningful tool text and structured data.
96
+ Missing or incompatible optional Apps declarations therefore leave core tool
97
+ and resource discovery undecorated; an explicit read of a `ui://` resource
98
+ continues to fail closed unless the stable capability was negotiated.
99
+
100
+ ## Public SDK
101
+
102
+ Use `PmMcpSkillRegistry`, `assertPmMcpSkillsCapability()`,
103
+ `PM_MCP_SKILLS_SERVER_CAPABILITY`, `PM_MCP_APP_CONTRACTS`,
104
+ `hasPmMcpAppsCapability()`, `decoratePmMcpToolsWithApps()`, and
105
+ `renderPmMcpAppHtml()` from `@unbrained/pm-cli/sdk`. The server is a thin
106
+ adapter over these contracts; custom hosts can project the same resources and
107
+ security policy without importing pm server internals.
@@ -9,7 +9,7 @@ Use this page to get from a clean repository to a tracked, verified item.
9
9
  - Claim before implementation.
10
10
  - Link changed files, docs, and tests to the item.
11
11
  - Close only after evidence is recorded.
12
- - Use `pm install guide-shell --project` before `pm guide quickstart` or `pm guide workflows` when you need local docs routing.
12
+ - Use `pm package install guide-shell --project` before `pm guide quickstart` or `pm guide workflows` when you need local docs routing.
13
13
 
14
14
  Tracked documentation work: [pm-u9d0](../.agents/pm/epics/pm-u9d0.toon).
15
15
 
@@ -23,10 +23,10 @@ pm --version
23
23
  For updates, use the registry package again:
24
24
 
25
25
  ```bash
26
- pm upgrade --cli-only
26
+ pm package upgrade --cli-only
27
27
  ```
28
28
 
29
- `pm upgrade` uses `npm install -g @unbrained/pm-cli@latest` for the CLI/SDK and can also refresh installed pm packages. Do not use the GitHub git URL as the normal global update path. If a previous git-sourced install left a stale `pm` shim, run `pm upgrade --cli-only --repair`, run `bash scripts/install.sh --repair` from a checkout, or uninstall the package before reinstalling from npm.
29
+ `pm package upgrade` uses `npm install -g @unbrained/pm-cli@latest` for the CLI/SDK and can also refresh installed pm packages. Do not use the GitHub git URL as the normal global update path. If a previous git-sourced install left a stale `pm` shim, run `pm package upgrade --cli-only --repair`, run `bash scripts/install.sh --repair` from a checkout, or uninstall the package before reinstalling from npm. The hidden `pm upgrade` alias remains compatible with existing automation and emits a migration hint on stderr.
30
30
 
31
31
  For one-off use:
32
32
 
@@ -39,8 +39,8 @@ Optional first-party packages are installable during init or on demand:
39
39
  ```bash
40
40
  pm init --defaults --with-packages
41
41
  pm package catalog --project
42
- pm install '*' --project
43
- pm install all --project
42
+ pm package install '*' --project
43
+ pm package install all --project
44
44
  pm package doctor --project --detail summary
45
45
  ```
46
46
 
@@ -78,16 +78,16 @@ pm create \
78
78
 
79
79
  Useful item types:
80
80
 
81
- | Type | Use |
82
- |------|-----|
83
- | `Epic` | broad outcome or initiative |
84
- | `Feature` | user-facing capability or major slice |
85
- | `Task` | implementation work |
86
- | `Chore` | maintenance, refactoring, or housekeeping work |
87
- | `Issue` | bug or defect |
88
- | `Decision` | recorded choice and rationale |
89
- | `Plan` | agent-optimized living plan with ordered steps and evidence |
90
- | `Event`, `Reminder`, `Milestone`, `Meeting` | calendar-aware planning |
81
+ | Type | Use |
82
+ | ------------------------------------------- | ----------------------------------------------------------- |
83
+ | `Epic` | broad outcome or initiative |
84
+ | `Feature` | user-facing capability or major slice |
85
+ | `Task` | implementation work |
86
+ | `Chore` | maintenance, refactoring, or housekeeping work |
87
+ | `Issue` | bug or defect |
88
+ | `Decision` | recorded choice and rationale |
89
+ | `Plan` | agent-optimized living plan with ordered steps and evidence |
90
+ | `Event`, `Reminder`, `Milestone`, `Meeting` | calendar-aware planning |
91
91
 
92
92
  ## Find and Claim Work
93
93
 
package/docs/README.md CHANGED
@@ -47,6 +47,7 @@ pm guide release --json
47
47
  - [MCP 2026-07-28 Protocol Decision](MCP_2026_07_28.md) - stateless request metadata, discovery, result envelopes, explicit legacy boundary, and migration policy.
48
48
  - [MCP 2026-07-28 Conformance Matrix](MCP_2026_07_28_CONFORMANCE.md) - official revision changes mapped to canonical owners and executable evidence.
49
49
  - [MCP Interaction and Task SDK](SDK_MCP_INTERACTIONS.md) - public MRTR continuation, cache/schema validation, and durable task-store contracts.
50
+ - [MCP Skills and Apps](MCP_SKILLS_AND_APPS.md) - negotiated draft workflow discovery, stable interactive views, digests, provenance, accessibility, and trust boundaries.
50
51
  - [MCP Remote Transport, Authorization, and Migration](MCP_REMOTE_TRANSPORT_SECURITY.md) - Streamable HTTP operation, subscriptions, OAuth and trace boundaries, threat model, and deprecated-feature ratchet.
51
52
  - [SDK Artifact Output Contracts](SDK_ARTIFACT_OUTPUT.md) - clean stdout/file exporter channels, bounded receipts, binary-safe delivery, and shared NDJSON terminal framing.
52
53
  - [Context Relevance and Packing](CONTEXT_RELEVANCE.md) - shared CLI/SDK signals, derived-store provenance, ranking explanations, and token budgets.
package/docs/RELEASING.md CHANGED
@@ -387,9 +387,17 @@ git push origin v<version>
387
387
  metadata cannot mask a public-registry outage. The verifier dispatches a real
388
388
  `pm contracts` command through both explicit-bin and package-default
389
389
  invocations, performs stateless JSON-RPC `server/discover` against the
390
- symlink-resolved `pm-mcp` bin under both npx and bunx, requires canonical
391
- `2026-07-28` metadata/result envelopes, derives bin coverage
392
- from `package.json`, and proves missing-bin and missing-command controls fail.
390
+ symlink-resolved `pm-mcp` bin under both npx and bunx, and launches the exact
391
+ public `pm-mcp-http` bin under both executors on an isolated loopback port for
392
+ a real Streamable HTTP `server/discover` exchange. Both transports require
393
+ canonical `2026-07-28` metadata/result envelopes. HTTP startup is bounded to
394
+ two 20-second attempts per executor so the complete retry budget remains below
395
+ the hosted step timeout. Signal-aware process-group cleanup escalates from
396
+ `SIGTERM` to `SIGKILL` after a bounded grace period, including when the outer
397
+ evaluator times out or an intermediate executor exits before its server
398
+ descendant. Direct executor exit is not treated as process-group cleanup. The
399
+ verifier derives bin coverage from `package.json`, and proves missing-bin and
400
+ missing-command controls fail.
393
401
  - exact-package installed acceptance through
394
402
  `scripts/release/verify-installed-agent-session.mjs`. Separate npm and Bun
395
403
  install roots must contain the resolved executable, then each drives the
@@ -16,10 +16,16 @@ These contracts keep project management equal to context management: reads say w
16
16
  pm get pm-a1b2 --output-include id,title
17
17
  pm get pm-a1b2 --output-include item.id,item.title,linked
18
18
  pm get pm-a1b2 --output-include item,claim_state
19
+ pm get pm-a1b2 --output-include comments,learnings,tests
19
20
  ```
20
21
 
21
22
  An unknown selector is a usage refusal that lists the valid vocabulary. Selecting the complete `item` object together with an item field is also refused because the two selectors express conflicting projection depths. Every successful projection carries an `omission_receipt` with the exact selectors needed to restore withheld item fields or sections.
22
23
 
24
+ Collection selectors participate in the same pre-execution projection on CLI,
25
+ SDK, and MCP transports. Requesting `comments`, `notes`, `learnings`, `files`,
26
+ `tests`, `docs`, `reminders`, or `events` therefore loads only the named item
27
+ collections before the universal output layer removes unrequested fields.
28
+
23
29
  Automatic receipts cover every heavy item collection (`comments`, `notes`,
24
30
  `learnings`, `files`, `tests`, `docs`, `reminders`, and `events`) plus `body`,
25
31
  `children`, `claim_state`, `linked`, and `schedule`. Empty included collections
@@ -1,6 +1,6 @@
1
1
  # SDK Evidence Traceability and Integrity
2
2
 
3
- Tracker references: [pm-f86lth](../.agents/pm/features/pm-f86lth.toon), [pm-cstuys](../.agents/pm/issues/pm-cstuys.toon), [pm-jb1ron](../.agents/pm/issues/pm-jb1ron.toon), [pm-2irc1p](../.agents/pm/issues/pm-2irc1p.toon), and [pm-u5c27w](../.agents/pm/issues/pm-u5c27w.toon).
3
+ Tracker references: [pm-f86lth](../.agents/pm/features/pm-f86lth.toon), [pm-cstuys](../.agents/pm/issues/pm-cstuys.toon), [pm-jb1ron](../.agents/pm/issues/pm-jb1ron.toon), [pm-2irc1p](../.agents/pm/issues/pm-2irc1p.toon), [pm-u5c27w](../.agents/pm/issues/pm-u5c27w.toon), and [pm-blvfye](../.agents/pm/issues/pm-blvfye.toon).
4
4
 
5
5
  This contract turns linked evidence into a bidirectional context primitive. Items can continue to declare the files that explain their implementation, while agents and packages can resolve a source path back to its owning work without scanning tracker files at indexed scale.
6
6
 
@@ -127,3 +127,11 @@ such as `BD-30-A` and `BD-30-B` are distinct sibling work and receive only their
127
127
  ordinary title-token similarity; exact repetitions of the full code retain the
128
128
  strong `issue_code` signal. This keeps duplicate-close guidance from collapsing
129
129
  decomposed work that shares a numeric family prefix.
130
+
131
+ Metadata validation applies a separate, evidence-backed title classifier.
132
+ Upper-case prefixes remain conventional issue codes. Mixed-case prefixes must
133
+ have a code delimiter, an explicit body marker/backtick reference, or match the
134
+ configured item-id prefix. Natural-language compounds such as `Match-3`,
135
+ `Covid-19`, and `Wi-Fi-6` therefore do not produce dishonest rename-or-merge
136
+ warnings, while `GH-1118`, `Bug-12: ...`, and configured formats remain
137
+ detectable without an ever-growing word dictionary.
@@ -14,4 +14,4 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
14
14
  | graph | `graph`, `deps`, `plan` |
15
15
  | quality | `test`, `test-all`, `validate`, `assurance`, `contracts` |
16
16
  | automation | `meet`, `event`, `remind` |
17
- | extensions | `extension`, `package`, `packages`, `install`, `upgrade` |
17
+ | extensions | `package` |
@@ -4,14 +4,14 @@ Tracker: `pm-f05lsg`.
4
4
 
5
5
  Every catalog code is listed. An `uncovered` row is an explicit closure obligation, never an omission or implied approval.
6
6
 
7
- - Catalog error codes: 343
8
- - Executable error codes: 18
7
+ - Catalog error codes: 344
8
+ - Executable error codes: 19
9
9
  - Executable-code ratchet floor: 18
10
10
  - Required executable canonical codes: `bulk_ids_input_empty`, `bulk_ids_input_missing_path`, `bulk_ids_input_unreadable`, `invalid_argument_value`, `manifest_unknown_key`, `missing_lifecycle_target`, `missing_required_argument`, `no_version_bounds_declared`, `projection_options_mutually_exclusive`, `tracker_not_initialized`, `tracker_root_missing`, `tracker_root_not_directory`, `tracker_root_unreadable`, `unknown_context_intent`, `unknown_field_projection`, `unknown_option`, `unknown_subcommand`
11
11
  - Uncovered error codes: 325
12
- - Coverage fraction: 0.052478
13
- - Closed-domain probes: 18
14
- - Grammar probes: 95
12
+ - Coverage fraction: 0.055233
13
+ - Closed-domain probes: 19
14
+ - Grammar probes: 94
15
15
 
16
16
  | Error code | Canonical code | Disposition | Evidence kinds | Probe count |
17
17
  | --- | --- | --- | --- | --- |
@@ -198,7 +198,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
198
198
  | `missing_observed_signature` | `missing_observed_signature` | uncovered | none | 0 |
199
199
  | `missing_parameter_alias` | `missing_parameter_alias` | uncovered | none | 0 |
200
200
  | `missing_probe` | `missing_probe` | uncovered | none | 0 |
201
- | `missing_required_argument` | `missing_required_argument` | executable | grammar | 58 |
201
+ | `missing_required_argument` | `missing_required_argument` | executable | grammar | 57 |
202
202
  | `missing_required_option` | `missing_required_option` | uncovered | none | 0 |
203
203
  | `missing_suggested_retry` | `missing_suggested_retry` | uncovered | none | 0 |
204
204
  | `missing_suggested_retry_args` | `missing_suggested_retry_args` | uncovered | none | 0 |
@@ -218,6 +218,7 @@ Every catalog code is listed. An `uncovered` row is an explicit closure obligati
218
218
  | `ownership_dependency_bypass_restricted_options` | `ownership_dependency_bypass_restricted_options` | uncovered | none | 0 |
219
219
  | `ownership_metadata_bypass_restricted_options` | `ownership_metadata_bypass_restricted_options` | uncovered | none | 0 |
220
220
  | `package_spec_empty` | `package_spec_empty` | uncovered | none | 0 |
221
+ | `package_upgrade_modes_mutually_exclusive` | `package_upgrade_modes_mutually_exclusive` | executable | closed_domain | 1 |
221
222
  | `positional_shape_budget_exceeded` | `positional_shape_budget_exceeded` | uncovered | none | 0 |
222
223
  | `positional_signature_mismatch` | `positional_signature_mismatch` | uncovered | none | 0 |
223
224
  | `profile_name_empty` | `profile_name_empty` | uncovered | none | 0 |
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.26"
9
+ "version": "2026.8.27"
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.26",
16
+ "version": "2026.8.27",
17
17
  "author": {
18
18
  "name": "unbrained",
19
19
  "url": "https://github.com/unbraind/pm-cli"