@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbrained/pm-cli",
3
- "version": "2026.8.26",
3
+ "version": "2026.8.27",
4
4
  "description": "Git-native project management CLI for humans and agents.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.10.0",
@@ -104,6 +104,7 @@
104
104
  "scripts/finalize-build.mjs",
105
105
  "scripts/install.sh",
106
106
  "scripts/install.ps1",
107
+ ".agents/skills/**",
107
108
  "scripts/prepare-build-cache.mjs",
108
109
  "marketplace.json"
109
110
  ],
@@ -167,7 +168,7 @@
167
168
  "version:check": "node scripts/release-version.mjs check && node scripts/sync-versions.mjs check",
168
169
  "version:next": "node scripts/release-version.mjs next",
169
170
  "version:sync": "node scripts/sync-versions.mjs apply",
170
- "changelog:pm:install": "node dist/cli.js install npm:pm-changelog --project",
171
+ "changelog:pm:install": "node dist/cli.js package install npm:pm-changelog --project",
171
172
  "changelog:pm": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --exclude-tag changelog-exclude --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm",
172
173
  "changelog:pm:check": "pnpm changelog:pm:install && node dist/cli.js changelog generate --output CHANGELOG.md --title \"Changelog\" --mode replace --all-release-tags --status closed --exclude-tag changelog-exclude --item-url-base https://github.com/unbraind/pm-cli/blob/main/.agents/pm --check",
173
174
  "release:notes": "node scripts/generate-release-notes.mjs",
@@ -212,17 +213,19 @@
212
213
  "fast-glob": "^3.3.3",
213
214
  "fast-json-patch": "^3.1.1",
214
215
  "npm-package-arg": "^13.0.2",
215
- "tar": "7.5.22"
216
+ "tar": "7.5.22",
217
+ "yaml": "^2.9.0"
216
218
  },
217
219
  "devDependencies": {
220
+ "@modelcontextprotocol/ext-apps": "1.7.5",
218
221
  "@codspeed/vitest-plugin": "^5.7.1",
219
222
  "@eslint/js": "^10.0.1",
220
223
  "@sentry/cli": "^3.6.2",
221
- "@types/node": "^26.2.0",
224
+ "@types/node": "^26.3.0",
222
225
  "@types/npm-package-arg": "^6.1.4",
223
226
  "@vitest/coverage-v8": "^4.1.11",
224
227
  "esbuild": "0.28.2",
225
- "eslint": "^10.9.0",
228
+ "eslint": "^10.9.1",
226
229
  "eslint-plugin-sonarjs": "^4.2.0",
227
230
  "eslint-plugin-unicorn": "^73.0.0",
228
231
  "fast-check": "^4.9.0",
@@ -231,7 +234,6 @@
231
234
  "tsx": "^4.23.12",
232
235
  "typescript": "^6.0.3",
233
236
  "typescript-eslint": "^8.68.0",
234
- "vitest": "^4.1.11",
235
- "yaml": "^2.9.0"
237
+ "vitest": "^4.1.11"
236
238
  }
237
239
  }
@@ -1,10 +1,16 @@
1
1
  # pm Beads Package
2
2
 
3
- First-party pm package for importing Beads JSONL records.
3
+ First-party pm package for lossless Beads migration through public pm SDK
4
+ contracts. The importer preserves issue identity, comments, structured events,
5
+ relationships, labels, and terminal closure evidence before reporting a
6
+ complete count-parity receipt.
4
7
 
5
- ```bash
6
- pm install ./packages/pm-beads --project
7
- pm beads import --file .beads/issues.jsonl
8
- ```
8
+ ## Migration
9
9
 
10
- The package exposes the `beads import` extension command through the `pm.extensions` package manifest. Runtime sources are authored in TypeScript and shipped with JavaScript entry artifacts for Node extension loading.
10
+ Use a current portable backup for lossless relational migration. The focused
11
+ [migration guide](docs/MIGRATION.md) covers installation, source validation,
12
+ ID preservation, legacy exports, parity receipts, and post-import checks.
13
+
14
+ The package exposes the `beads import` extension command through the
15
+ `pm.extensions` package manifest. Runtime sources are TypeScript and use only
16
+ the published `@unbrained/pm-cli/sdk` surface.
@@ -0,0 +1,53 @@
1
+ # Beads Migration
2
+
3
+ Tracker: [pm-tpwde6](../../../.agents/pm/issues/pm-tpwde6.toon)
4
+
5
+ ## Lossless portable-backup migration
6
+
7
+ Install the package, create a current Beads portable backup, and import the
8
+ backup directory without modifying the source project:
9
+
10
+ ```bash
11
+ pm package install ./packages/pm-beads --project
12
+ bd backup --force
13
+ pm beads import --backup-dir .beads/backup --preserve-source-ids
14
+ ```
15
+
16
+ Current Beads backups contain relational `issues.jsonl`, `comments.jsonl`,
17
+ `events.jsonl`, `dependencies.jsonl`, and `labels.jsonl` files plus
18
+ `backup_state.json`. The importer validates those files, their foreign keys,
19
+ the backup counts, source-ID collisions, and every issue before the first pm
20
+ write. Structural source failures therefore cannot leave a partially imported
21
+ tracker; each later item commit also retains pm's normal lock and rollback
22
+ guarantees.
23
+
24
+ Successful output includes `complete: true`, source and imported counts for
25
+ each relation, and an exact `id_mapping`. Source IDs are preserved only when
26
+ they are safe path identifiers and do not collide case-insensitively with one
27
+ another or with the target tracker. Comments remain comments, Beads events are
28
+ stored as structured JSON notes, dependencies retain their source identity,
29
+ label text is normalized to canonical lowercase pm tags, and a
30
+ terminal Beads close reason becomes the pm resolution when no explicit source
31
+ resolution exists.
32
+
33
+ Verify representative records and the final tracker after import:
34
+
35
+ ```bash
36
+ pm get Tokenwerk-A1
37
+ pm comments Tokenwerk-A1
38
+ pm validate --check-resolution --check-history-drift
39
+ ```
40
+
41
+ ## Legacy single-file import
42
+
43
+ Older JSON/JSONL exports with embedded `comments`, `events`, `dependencies`,
44
+ and `labels` remain supported:
45
+
46
+ ```bash
47
+ pm beads import --file .beads/issues.jsonl
48
+ ```
49
+
50
+ A current plain `bd export` that advertises `comment_count` but omits comment
51
+ bodies is intentionally rejected before any write. Run `bd backup --force` and
52
+ use `--backup-dir` instead so the migration cannot silently lose discussion or
53
+ event history.
@@ -37,6 +37,7 @@ function toBeadsImportOptions(
37
37
  ): BeadsImportOptions {
38
38
  return {
39
39
  file: asOptionalString(options.file),
40
+ backupDir: asOptionalString(options.backupDir),
40
41
  author: global.author,
41
42
  message: asOptionalString(options.message),
42
43
  preserveSourceIds: asBoolean(options.preserveSourceIds),
@@ -69,6 +70,13 @@ export function activate(api: ExtensionApi): void {
69
70
  value_type: "string",
70
71
  description: "Path to the Beads JSONL source file.",
71
72
  },
73
+ {
74
+ long: "--backup-dir",
75
+ value_name: "path",
76
+ value_type: "string",
77
+ description:
78
+ "Path to a complete bd portable-backup directory with issue, event, comment, dependency, label, and count files.",
79
+ },
72
80
  {
73
81
  long: "--message",
74
82
  value_name: "text",