@unbrained/pm-cli 2026.5.6 → 2026.5.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 (268) hide show
  1. package/.agents/pm/extensions/.managed-extensions.json +2 -2
  2. package/.agents/pm/extensions/beads/runtime.js +4 -4
  3. package/.agents/pm/extensions/beads/runtime.ts +5 -5
  4. package/.agents/pm/extensions/todos/runtime.js +7 -7
  5. package/.agents/pm/extensions/todos/runtime.ts +10 -10
  6. package/.agents/skills/HARNESS_COMPATIBILITY.md +45 -0
  7. package/.agents/skills/README.md +21 -0
  8. package/.agents/skills/pm-developer/SKILL.md +73 -0
  9. package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +48 -0
  10. package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
  11. package/.agents/skills/pm-extensions/SKILL.md +57 -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 +50 -0
  15. package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
  16. package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
  17. package/.agents/skills/pm-user/SKILL.md +59 -0
  18. package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
  19. package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
  20. package/.claude-plugin/marketplace.json +38 -0
  21. package/.pi/README.md +35 -0
  22. package/.pi/agents/pm-triage-agent.md +19 -0
  23. package/.pi/agents/pm-verification-agent.md +21 -0
  24. package/.pi/chains/pm-native-delivery.chain.md +11 -0
  25. package/.pi/extensions/pm-cli/index.js +387 -0
  26. package/.pi/prompts/pm-workflow.md +5 -0
  27. package/.pi/skills/pm-native/SKILL.md +44 -0
  28. package/.pi/skills/pm-release/SKILL.md +35 -0
  29. package/AGENTS.md +1 -1
  30. package/CHANGELOG.md +13 -0
  31. package/PRD.md +16 -16
  32. package/README.md +30 -4
  33. package/dist/cli/argv-utils.d.ts +5 -0
  34. package/dist/cli/argv-utils.js +34 -0
  35. package/dist/cli/argv-utils.js.map +1 -0
  36. package/dist/cli/bootstrap-args.d.ts +15 -0
  37. package/dist/cli/bootstrap-args.js +211 -0
  38. package/dist/cli/bootstrap-args.js.map +1 -1
  39. package/dist/cli/commander-usage.js +109 -3
  40. package/dist/cli/commander-usage.js.map +1 -1
  41. package/dist/cli/commands/claim.js +6 -6
  42. package/dist/cli/commands/claim.js.map +1 -1
  43. package/dist/cli/commands/close.js +9 -9
  44. package/dist/cli/commands/close.js.map +1 -1
  45. package/dist/cli/commands/comments.d.ts +2 -0
  46. package/dist/cli/commands/comments.js +57 -8
  47. package/dist/cli/commands/comments.js.map +1 -1
  48. package/dist/cli/commands/completion.js +40 -7
  49. package/dist/cli/commands/completion.js.map +1 -1
  50. package/dist/cli/commands/config.js +6 -3
  51. package/dist/cli/commands/config.js.map +1 -1
  52. package/dist/cli/commands/contracts.d.ts +19 -0
  53. package/dist/cli/commands/contracts.js +36 -1
  54. package/dist/cli/commands/contracts.js.map +1 -1
  55. package/dist/cli/commands/create.d.ts +2 -2
  56. package/dist/cli/commands/create.js +116 -55
  57. package/dist/cli/commands/create.js.map +1 -1
  58. package/dist/cli/commands/docs.js +13 -6
  59. package/dist/cli/commands/docs.js.map +1 -1
  60. package/dist/cli/commands/extension.d.ts +3 -1
  61. package/dist/cli/commands/extension.js +174 -2
  62. package/dist/cli/commands/extension.js.map +1 -1
  63. package/dist/cli/commands/files.js +19 -12
  64. package/dist/cli/commands/files.js.map +1 -1
  65. package/dist/cli/commands/get.js +5 -5
  66. package/dist/cli/commands/get.js.map +1 -1
  67. package/dist/cli/commands/guide.d.ts +55 -0
  68. package/dist/cli/commands/guide.js +260 -0
  69. package/dist/cli/commands/guide.js.map +1 -0
  70. package/dist/cli/commands/health.js +1 -1
  71. package/dist/cli/commands/health.js.map +1 -1
  72. package/dist/cli/commands/history.js +30 -10
  73. package/dist/cli/commands/history.js.map +1 -1
  74. package/dist/cli/commands/index.d.ts +1 -0
  75. package/dist/cli/commands/index.js +1 -0
  76. package/dist/cli/commands/index.js.map +1 -1
  77. package/dist/cli/commands/init.d.ts +2 -0
  78. package/dist/cli/commands/init.js +21 -1
  79. package/dist/cli/commands/init.js.map +1 -1
  80. package/dist/cli/commands/learnings.js +3 -3
  81. package/dist/cli/commands/learnings.js.map +1 -1
  82. package/dist/cli/commands/metadata-normalizers.d.ts +4 -0
  83. package/dist/cli/commands/metadata-normalizers.js +37 -0
  84. package/dist/cli/commands/metadata-normalizers.js.map +1 -0
  85. package/dist/cli/commands/notes.js +3 -3
  86. package/dist/cli/commands/notes.js.map +1 -1
  87. package/dist/cli/commands/reindex.js +180 -156
  88. package/dist/cli/commands/reindex.js.map +1 -1
  89. package/dist/cli/commands/restore.d.ts +2 -2
  90. package/dist/cli/commands/restore.js +44 -24
  91. package/dist/cli/commands/restore.js.map +1 -1
  92. package/dist/cli/commands/search.d.ts +2 -0
  93. package/dist/cli/commands/search.js +45 -26
  94. package/dist/cli/commands/search.js.map +1 -1
  95. package/dist/cli/commands/test-all.d.ts +2 -0
  96. package/dist/cli/commands/test-all.js +2 -0
  97. package/dist/cli/commands/test-all.js.map +1 -1
  98. package/dist/cli/commands/test.d.ts +1 -0
  99. package/dist/cli/commands/test.js +13 -5
  100. package/dist/cli/commands/test.js.map +1 -1
  101. package/dist/cli/commands/update.js +188 -157
  102. package/dist/cli/commands/update.js.map +1 -1
  103. package/dist/cli/commands/validate.js +1 -1
  104. package/dist/cli/commands/validate.js.map +1 -1
  105. package/dist/cli/error-guidance.d.ts +9 -1
  106. package/dist/cli/error-guidance.js +147 -6
  107. package/dist/cli/error-guidance.js.map +1 -1
  108. package/dist/cli/guide-topics.d.ts +25 -0
  109. package/dist/cli/guide-topics.js +283 -0
  110. package/dist/cli/guide-topics.js.map +1 -0
  111. package/dist/cli/help-content.js +25 -1
  112. package/dist/cli/help-content.js.map +1 -1
  113. package/dist/cli/help-json-payload.js +11 -1
  114. package/dist/cli/help-json-payload.js.map +1 -1
  115. package/dist/cli/main.js +69 -6
  116. package/dist/cli/main.js.map +1 -1
  117. package/dist/cli/register-list-query.js +38 -1
  118. package/dist/cli/register-list-query.js.map +1 -1
  119. package/dist/cli/register-mutation.js +17 -4
  120. package/dist/cli/register-mutation.js.map +1 -1
  121. package/dist/cli/register-setup.js +15 -1
  122. package/dist/cli/register-setup.js.map +1 -1
  123. package/dist/cli/telemetry-flush.d.ts +2 -0
  124. package/dist/cli/telemetry-flush.js +4 -0
  125. package/dist/cli/telemetry-flush.js.map +1 -0
  126. package/dist/cli.js +1 -2
  127. package/dist/cli.js.map +1 -1
  128. package/dist/core/extensions/extension-types.d.ts +72 -0
  129. package/dist/core/extensions/extension-types.js +24 -0
  130. package/dist/core/extensions/extension-types.js.map +1 -1
  131. package/dist/core/extensions/loader.d.ts +1 -0
  132. package/dist/core/extensions/loader.js +766 -7
  133. package/dist/core/extensions/loader.js.map +1 -1
  134. package/dist/core/history/history.js +32 -11
  135. package/dist/core/history/history.js.map +1 -1
  136. package/dist/core/item/item-format.d.ts +2 -2
  137. package/dist/core/item/item-format.js +16 -16
  138. package/dist/core/item/item-format.js.map +1 -1
  139. package/dist/core/lock/lock.js +2 -0
  140. package/dist/core/lock/lock.js.map +1 -1
  141. package/dist/core/schema/runtime-field-filters.js +1 -1
  142. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  143. package/dist/core/schema/runtime-field-values.js +2 -2
  144. package/dist/core/schema/runtime-field-values.js.map +1 -1
  145. package/dist/core/schema/runtime-schema.d.ts +1 -1
  146. package/dist/core/schema/runtime-schema.js +3 -3
  147. package/dist/core/schema/runtime-schema.js.map +1 -1
  148. package/dist/core/search/cache.js +7 -21
  149. package/dist/core/search/cache.js.map +1 -1
  150. package/dist/core/search/corpus.d.ts +13 -0
  151. package/dist/core/search/corpus.js +74 -0
  152. package/dist/core/search/corpus.js.map +1 -0
  153. package/dist/core/search/embedding-batches.js +90 -30
  154. package/dist/core/search/embedding-batches.js.map +1 -1
  155. package/dist/core/sentry/instrument.d.ts +18 -1
  156. package/dist/core/sentry/instrument.js +128 -12
  157. package/dist/core/sentry/instrument.js.map +1 -1
  158. package/dist/core/shared/constants.d.ts +1 -1
  159. package/dist/core/shared/constants.js +21 -1
  160. package/dist/core/shared/constants.js.map +1 -1
  161. package/dist/core/shared/errors.d.ts +8 -0
  162. package/dist/core/shared/errors.js.map +1 -1
  163. package/dist/core/shared/levenshtein.d.ts +1 -0
  164. package/dist/core/shared/levenshtein.js +37 -0
  165. package/dist/core/shared/levenshtein.js.map +1 -0
  166. package/dist/core/store/front-matter-cache.d.ts +1 -1
  167. package/dist/core/store/front-matter-cache.js +13 -13
  168. package/dist/core/store/front-matter-cache.js.map +1 -1
  169. package/dist/core/store/item-format-migration.js +5 -2
  170. package/dist/core/store/item-format-migration.js.map +1 -1
  171. package/dist/core/store/item-store.js +16 -15
  172. package/dist/core/store/item-store.js.map +1 -1
  173. package/dist/core/store/paths.js +35 -2
  174. package/dist/core/store/paths.js.map +1 -1
  175. package/dist/core/store/settings.js +216 -2
  176. package/dist/core/store/settings.js.map +1 -1
  177. package/dist/core/telemetry/runtime.d.ts +1 -0
  178. package/dist/core/telemetry/runtime.js +102 -3
  179. package/dist/core/telemetry/runtime.js.map +1 -1
  180. package/dist/core/test/item-test-run-tracking.js +2 -2
  181. package/dist/core/test/item-test-run-tracking.js.map +1 -1
  182. package/dist/mcp/server.d.ts +2 -0
  183. package/dist/mcp/server.js +407 -0
  184. package/dist/mcp/server.js.map +1 -0
  185. package/dist/pi/native.d.ts +5 -0
  186. package/dist/pi/native.js +236 -0
  187. package/dist/pi/native.js.map +1 -0
  188. package/dist/sdk/cli-contracts.d.ts +24 -2
  189. package/dist/sdk/cli-contracts.js +317 -2
  190. package/dist/sdk/cli-contracts.js.map +1 -1
  191. package/dist/sdk/index.d.ts +12 -1
  192. package/dist/sdk/index.js +8 -1
  193. package/dist/sdk/index.js.map +1 -1
  194. package/dist/types.d.ts +51 -2
  195. package/dist/types.js.map +1 -1
  196. package/docs/AGENT_GUIDE.md +15 -0
  197. package/docs/ARCHITECTURE.md +2 -2
  198. package/docs/CLAUDE_CODE_PLUGIN.md +225 -0
  199. package/docs/CODEX_PLUGIN.md +33 -0
  200. package/docs/COMMANDS.md +6 -2
  201. package/docs/CONFIGURATION.md +2 -8
  202. package/docs/EXTENSIONS.md +688 -0
  203. package/docs/MIGRATION_CLI_SIMPLIFICATION.md +64 -0
  204. package/docs/PI_PACKAGE.md +141 -0
  205. package/docs/QUICKSTART.md +1 -0
  206. package/docs/README.md +30 -1
  207. package/docs/RELEASING.md +4 -2
  208. package/docs/SDK.md +444 -2
  209. package/docs/examples/ci/github-actions-pm-extension-gate.yml +53 -0
  210. package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +41 -0
  211. package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +45 -0
  212. package/docs/examples/policy-restricted-extension/README.md +74 -0
  213. package/docs/examples/policy-restricted-extension/index.js +21 -0
  214. package/docs/examples/policy-restricted-extension/manifest.json +21 -0
  215. package/docs/examples/policy-restricted-extension/package.json +8 -0
  216. package/docs/examples/sdk-app-embedding/README.md +39 -0
  217. package/docs/examples/sdk-app-embedding/package.json +9 -0
  218. package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +61 -0
  219. package/docs/examples/sdk-contract-consumer/README.md +57 -0
  220. package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +47 -0
  221. package/docs/examples/sdk-contract-consumer/package.json +10 -0
  222. package/docs/examples/starter-extension/README.md +57 -42
  223. package/docs/examples/starter-extension/manifest.json +15 -0
  224. package/marketplace.json +34 -0
  225. package/package.json +38 -4
  226. package/plugins/pm-cli-claude/.claude-plugin/plugin.json +23 -0
  227. package/plugins/pm-cli-claude/.mcp.json +12 -0
  228. package/plugins/pm-cli-claude/README.md +225 -0
  229. package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
  230. package/plugins/pm-cli-claude/agents/pm-delivery-chain.md +88 -0
  231. package/plugins/pm-cli-claude/agents/pm-triage-agent.md +83 -0
  232. package/plugins/pm-cli-claude/agents/pm-verification-agent.md +88 -0
  233. package/plugins/pm-cli-claude/commands/pm-audit.md +39 -0
  234. package/plugins/pm-cli-claude/commands/pm-calendar.md +41 -0
  235. package/plugins/pm-cli-claude/commands/pm-close-task.md +20 -0
  236. package/plugins/pm-cli-claude/commands/pm-developer.md +38 -0
  237. package/plugins/pm-cli-claude/commands/pm-init.md +44 -0
  238. package/plugins/pm-cli-claude/commands/pm-list.md +39 -0
  239. package/plugins/pm-cli-claude/commands/pm-new.md +36 -0
  240. package/plugins/pm-cli-claude/commands/pm-planner.md +51 -0
  241. package/plugins/pm-cli-claude/commands/pm-release.md +41 -0
  242. package/plugins/pm-cli-claude/commands/pm-search.md +21 -0
  243. package/plugins/pm-cli-claude/commands/pm-start-task.md +27 -0
  244. package/plugins/pm-cli-claude/commands/pm-status.md +15 -0
  245. package/plugins/pm-cli-claude/commands/pm-triage.md +35 -0
  246. package/plugins/pm-cli-claude/commands/pm-workflow.md +49 -0
  247. package/plugins/pm-cli-claude/hooks/hooks.json +17 -0
  248. package/plugins/pm-cli-claude/hooks/session-start.mjs +120 -0
  249. package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +60 -0
  250. package/plugins/pm-cli-claude/skills/pm-audit/SKILL.md +88 -0
  251. package/plugins/pm-cli-claude/skills/pm-developer/SKILL.md +116 -0
  252. package/plugins/pm-cli-claude/skills/pm-planner/SKILL.md +118 -0
  253. package/plugins/pm-cli-claude/skills/pm-release/SKILL.md +83 -0
  254. package/plugins/pm-cli-claude/skills/pm-workflow/SKILL.md +148 -0
  255. package/plugins/pm-cli-codex/.codex-plugin/plugin.json +45 -0
  256. package/plugins/pm-cli-codex/.mcp.json +14 -0
  257. package/plugins/pm-cli-codex/README.md +30 -0
  258. package/plugins/pm-cli-codex/assets/pm-cli-small.svg +4 -0
  259. package/plugins/pm-cli-codex/commands/pm-audit.md +8 -0
  260. package/plugins/pm-cli-codex/commands/pm-close-task.md +9 -0
  261. package/plugins/pm-cli-codex/commands/pm-start-task.md +9 -0
  262. package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +54 -0
  263. package/plugins/pm-cli-codex/skills/pm-auditor/SKILL.md +21 -0
  264. package/plugins/pm-cli-codex/skills/pm-auditor/agents/openai.yaml +6 -0
  265. package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +57 -0
  266. package/plugins/pm-cli-codex/skills/pm-native/agents/openai.yaml +6 -0
  267. package/plugins/pm-cli-codex/skills/pm-release/SKILL.md +19 -0
  268. package/plugins/pm-cli-codex/skills/pm-release/agents/openai.yaml +6 -0
@@ -0,0 +1,64 @@
1
+ # CLI Simplification Migration (Conservative Full-Surface Pass)
2
+
3
+ This note documents behavioral and output-shape changes introduced in the conservative CLI simplification pass.
4
+
5
+ ## What Changed
6
+
7
+ ### 1) Command invocation normalization before Commander parse
8
+
9
+ `pm` now normalizes invocation tokens before Commander parses them:
10
+
11
+ - long-flag shape normalization (`--foo_bar` / camel variants -> canonical kebab flags)
12
+ - high-confidence typo normalization for long flags
13
+ - `key=value` / `key:value` promotion into canonical `--flag value` tokens when unambiguous
14
+ - legacy `pm extension <action>` shorthand normalization to explicit action flags
15
+
16
+ Normalization runs across command families and preserves a normalization trace for diagnostics and recovery.
17
+
18
+ ### 2) Setup-agnostic PM root discovery
19
+
20
+ `resolvePmRoot()` precedence is now:
21
+
22
+ 1. explicit `--path`
23
+ 2. `PM_PATH`
24
+ 3. upward discovery of initialized `.agents/pm` roots (must contain `settings.json`)
25
+ 4. local default (`<cwd>/.agents/pm`)
26
+
27
+ If you need the old local-only behavior from nested directories, pass an explicit path (`--path .agents/pm`).
28
+
29
+ ### 3) Structured recovery bundles in CLI error output
30
+
31
+ Error payloads now include optional `recovery` metadata in text and JSON guidance surfaces:
32
+
33
+ - `attempted_command`
34
+ - `normalized_args`
35
+ - `provided_fields`
36
+ - `missing`
37
+ - `suggested_retry`
38
+
39
+ Automation should read this bundle for deterministic retries instead of rebuilding retries from free-form error text.
40
+
41
+ ### 4) Legacy `none`/`null` compatibility in create/update
42
+
43
+ For deterministic compatibility:
44
+
45
+ - scalar `none` / `null` values on unset-capable fields are reinterpreted as `--unset <field>`
46
+ - repeatable `none` / `null` values are reinterpreted as their matching `--clear-*` action
47
+ - mixed legacy clear token + concrete repeatable payloads remain rejected (ambiguous input)
48
+
49
+ ## Migration Guidance for Automation
50
+
51
+ - **Prefer contracts first**: keep using `pm contracts --json` and command-scoped flag contracts.
52
+ - **Consume `recovery` directly**: treat `recovery.suggested_retry` as first-choice replay command.
53
+ - **Do not hardcode old error envelopes**: parsers should tolerate additional fields (`recovery`) and richer guidance text.
54
+ - **Avoid relying on local cwd-only root resolution**: pass `--path` explicitly when wrappers need fixed data roots.
55
+ - **Update none/null assumptions**: if your tests expected hard failures for pure `none`/`null` clear intents, update them to expect deterministic clear/unset behavior.
56
+
57
+ ## Verification Checklist
58
+
59
+ - `tests/unit/bootstrap-args.spec.ts`
60
+ - `tests/unit/store-paths.spec.ts`
61
+ - `tests/integration/help-runtime.spec.ts`
62
+ - `tests/unit/create-command.spec.ts`
63
+ - `tests/unit/update-command.spec.ts`
64
+
@@ -0,0 +1,141 @@
1
+ # Pi Native Package & Claude Code Plugin
2
+
3
+ pm-cli ships both an official Pi package and a Claude Code plugin so AI coding agents can use pm through native integrations instead of shelling out to the `pm` CLI.
4
+
5
+ ## Claude Code Plugin
6
+
7
+ The Claude Code plugin (`plugins/pm-cli-claude/`) provides full native pm integration for Claude Code without any CLI dependency.
8
+
9
+ ### Install
10
+
11
+ ```
12
+ /plugin install pm-cli@pm
13
+ ```
14
+
15
+ Both `pm` and `pm-cli` marketplace IDs work:
16
+
17
+ ```
18
+ /plugin install pm-cli@pm # canonical
19
+ /plugin install pm-cli@pm-cli # legacy alias
20
+ ```
21
+
22
+ To add the marketplace first (local checkout):
23
+
24
+ ```bash
25
+ claude plugin marketplace add /path/to/pm-cli
26
+ ```
27
+
28
+ After npm publish, the marketplace will be available via GitHub:
29
+
30
+ ```bash
31
+ claude plugin marketplace add unbraind/pm-cli
32
+ ```
33
+
34
+ ### Plugin Components
35
+
36
+ | Component | Path | What it provides |
37
+ |-----------|------|-----------------|
38
+ | MCP server | `scripts/pm-mcp-server.mjs` | 18 native MCP tools |
39
+ | Skills | `skills/` | 5 workflow skills auto-loaded in Claude Code |
40
+ | Commands | `commands/` | 14 slash commands |
41
+ | Agents | `agents/` | 3 subagents + 1 delivery chain |
42
+ | Hooks | `hooks/` | Session-start context injection |
43
+
44
+ ### MCP Tools (18)
45
+
46
+ Narrow tools: `pm_context`, `pm_search`, `pm_list`, `pm_get`, `pm_create`, `pm_update`, `pm_claim`, `pm_release`, `pm_close`, `pm_comments`, `pm_files`, `pm_docs`, `pm_test`, `pm_validate`, `pm_health`, `pm_contracts`, `pm_guide`
47
+
48
+ General tool: `pm_run` (with explicit `action` for everything else)
49
+
50
+ ### Subagents (4)
51
+
52
+ | Agent | Description |
53
+ |-------|-------------|
54
+ | `pm-coordinator` | Multi-item batch coordination |
55
+ | `pm-triage-agent` | Duplicate-safe item creation with lineage |
56
+ | `pm-verification-agent` | Evidence collection and close readiness |
57
+ | `pm-delivery-chain` | Full triage → implement → verify orchestration |
58
+
59
+ ### Session Hook
60
+
61
+ The session-start hook runs natively:
62
+ 1. Walks up from plugin root to find `dist/pi/native.js` in a repo checkout
63
+ 2. Falls back to `npx @unbrained/pm-cli` if no local dist
64
+ 3. No `pm` CLI global install required in either path
65
+
66
+ ---
67
+
68
+ ## Pi Native Package
69
+
70
+ The Pi package at `.pi/` exposes pm through Pi's native extension API.
71
+
72
+ ### Install
73
+
74
+ After the package is published:
75
+
76
+ ```bash
77
+ pi install npm:@unbrained/pm-cli
78
+ ```
79
+
80
+ From a local checkout:
81
+
82
+ ```bash
83
+ pnpm build
84
+ pi install -l .
85
+ # or try without writing settings
86
+ pi --no-extensions -e .
87
+ ```
88
+
89
+ `pnpm build` is required for local checkouts because the Pi extension imports the compiled native integration from `dist/pi/native.js`.
90
+
91
+ ### Package Resources
92
+
93
+ The root `package.json` declares the Pi manifest:
94
+
95
+ - `pi.extensions`: `.pi/extensions/pm-cli/index.js`
96
+ - `pi.skills`: `.pi/skills`
97
+ - `pi.prompts`: `.pi/prompts`
98
+
99
+ The extension registers:
100
+
101
+ - native `pm` tool using pm command modules directly, not the `pm` shell command
102
+ - custom TUI rendering for pm tool calls/results (context, list/search, item details, history/activity)
103
+ - `/pm-context`, `/pm-board`, `/pm-item`, `/pm-history`, `/pm-start`, `/pm-close`, `/pm-actions`, and `/pm-workflows` helper commands
104
+ - `@pm-...` item autocomplete layered on top of Pi's editor completion
105
+ - footer status and a small below-editor widget (`pm native ready`) in interactive mode
106
+
107
+ ### Native Tool Usage
108
+
109
+ Use the Pi `pm` tool with an `action` field. Examples:
110
+
111
+ ```json
112
+ { "action": "context", "limit": 10 }
113
+ { "action": "search", "query": "pi extension", "limit": 10 }
114
+ { "action": "start-task", "id": "pm-1234", "author": "pi-agent" }
115
+ { "action": "files", "id": "pm-1234", "add": ["path=src/file.ts,scope=project,note=implementation"], "author": "pi-agent" }
116
+ { "action": "close-task", "id": "pm-1234", "text": "Verified and complete", "author": "pi-agent", "validateClose": "warn" }
117
+ ```
118
+
119
+ For real project tracking, leave `path` unset. For tests, set `path` to a sandbox pm root and isolate `PM_GLOBAL_PATH`.
120
+
121
+ ### Pi TUI Commands
122
+
123
+ ```text
124
+ /pm-board [limit] # context dashboard with active items
125
+ /pm-item <pm-id> # item details and recent comments
126
+ /pm-history <pm-id> # item history panel
127
+ /pm-actions # installed native action list
128
+ /pm-workflows # suggested native pm workflows
129
+ ```
130
+
131
+ ### Pi Skills and Subagents
132
+
133
+ - Skills: `pm-native`, `pm-release`
134
+ - Prompt template: `/pm-workflow`
135
+ - Subagent files: `.pi/agents/pm-triage-agent.md`, `.pi/agents/pm-verification-agent.md`, `.pi/chains/pm-native-delivery.chain.md`
136
+
137
+ ---
138
+
139
+ ## Supported Surface
140
+
141
+ Both integrations cover the core pm action set: init/config/extensions, item creation and lifecycle, list/search/context/calendar/activity, files/docs/deps/tests, validation/health/gc/contracts, templates, test-runs, guide workflows, bundled beads/todos import/export, and lifecycle shortcuts (`start-task`, `pause-task`, `close-task`).
@@ -9,6 +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 guide quickstart` or `pm guide workflows` when you need local docs routing.
12
13
 
13
14
  Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
14
15
 
package/docs/README.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  This directory is the public documentation home for `pm-cli`. It is organized for progressive disclosure: read the smallest page that answers the current question, then follow links only when more detail is needed.
4
4
 
5
+ ## CLI Guide Router
6
+
7
+ `pm guide` exposes the same documentation routes from inside the CLI:
8
+
9
+ ```bash
10
+ pm guide
11
+ pm guide quickstart
12
+ pm guide commands --depth standard
13
+ pm guide sdk --depth deep --format markdown
14
+ pm guide release --json
15
+ ```
16
+
5
17
  ## Read Path
6
18
 
7
19
  | Reader | First page | Then read |
@@ -10,7 +22,9 @@ This directory is the public documentation home for `pm-cli`. It is organized fo
10
22
  | Coding agent | [Agent Guide](AGENT_GUIDE.md) | [Configuration](CONFIGURATION.md), then command help |
11
23
  | Maintainer | [Contributing](../CONTRIBUTING.md) | [Testing](TESTING.md), [Releasing](RELEASING.md), [Architecture](ARCHITECTURE.md) |
12
24
  | Extension author | [Extensions](EXTENSIONS.md) | [SDK](SDK.md), [starter extension](examples/starter-extension/README.md) |
13
- | Machine client | [Command Reference](COMMANDS.md#machine-contracts) | `pm contracts --json` |
25
+ | Pi user | [Pi Package](PI_PACKAGE.md) | [Agent Guide](AGENT_GUIDE.md), then [Command Reference](COMMANDS.md) |
26
+ | Codex user | [Codex Plugin](CODEX_PLUGIN.md) | [Agent Guide](AGENT_GUIDE.md), then [Command Reference](COMMANDS.md) |
27
+ | Machine client | `pm guide commands` | [Command Reference](COMMANDS.md#machine-contracts), then `pm contracts --json` |
14
28
 
15
29
  ## Documentation Map
16
30
 
@@ -22,9 +36,24 @@ This directory is the public documentation home for `pm-cli`. It is organized fo
22
36
  - [Architecture](ARCHITECTURE.md) - contributor internals: storage, mutation flow, search, extensions, and command contracts.
23
37
  - [Extensions](EXTENSIONS.md) - runtime extension lifecycle and API reference.
24
38
  - [SDK](SDK.md) - public import surfaces and typed authoring examples.
39
+ - [Pi Package](PI_PACKAGE.md) - official Pi package install, native tool, skills, prompts, and workflows.
40
+ - [Codex Plugin](CODEX_PLUGIN.md) - native MCP plugin install, tools, skills, and safety notes.
25
41
  - [Releasing](RELEASING.md) - maintainer release checklist and failure handling.
26
42
  - [starter extension](examples/starter-extension/README.md) - compact extension scaffold reference.
27
43
 
44
+ ## Guide Topic Map
45
+
46
+ | `pm guide` topic | Primary docs |
47
+ |------------------|--------------|
48
+ | `quickstart` | [Quickstart](QUICKSTART.md), [Command Reference](COMMANDS.md) |
49
+ | `commands` | [Command Reference](COMMANDS.md), [Configuration](CONFIGURATION.md) |
50
+ | `workflows` | [Agent Guide](AGENT_GUIDE.md), [Testing](TESTING.md) |
51
+ | `sdk` | [SDK](SDK.md), [Architecture](ARCHITECTURE.md) |
52
+ | `extensions` | [Extensions](EXTENSIONS.md), [starter extension](examples/starter-extension/README.md) |
53
+ | `skills` | [Agent Guide](AGENT_GUIDE.md) plus `.agents/skills/*` |
54
+ | `harnesses` | [Agent Guide](AGENT_GUIDE.md) plus `.agents/skills/HARNESS_COMPATIBILITY.md` |
55
+ | `release` | [Releasing](RELEASING.md), [CHANGELOG](../CHANGELOG.md) |
56
+
28
57
  Community files:
29
58
 
30
59
  - [Contributing](../CONTRIBUTING.md)
package/docs/RELEASING.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Releasing `@unbrained/pm-cli`
2
2
 
3
3
  This page is for maintainers cutting npm and GitHub releases. It assumes release work is tracked with `pm`.
4
+ For local progressive-disclosure routing, use `pm guide release`.
4
5
 
5
6
  ## Agent Quick Context
6
7
 
@@ -9,6 +10,7 @@ This page is for maintainers cutting npm and GitHub releases. It assumes release
9
10
  - Publishing is owned by the tag-driven GitHub Actions release workflow.
10
11
  - Do not run manual `npm publish`.
11
12
  - Run local parity gates before pushing release tags.
13
+ - Use `pm guide release --json` for machine-readable release docs routing.
12
14
 
13
15
  Tracked documentation work: [pm-1sb2](../.agents/pm/tasks/pm-1sb2.toon).
14
16
 
@@ -64,7 +66,7 @@ The pipeline performs:
64
66
 
65
67
  1. change detection + one-release-per-day guard
66
68
  2. version bump + changelog promotion from `[Unreleased]`
67
- 3. strict gates (build, typecheck, coverage, static quality, compatibility, security, smoke checks, reliability gate)
69
+ 3. strict gates (build, typecheck, docs/skills freshness, coverage, static quality, compatibility, security, smoke checks, reliability gate)
68
70
  4. release note generation from changelog + pm evidence
69
71
  5. commit and tag creation (plus optional push)
70
72
 
@@ -85,7 +87,7 @@ Minimum coverage:
85
87
  - parent and dependency links
86
88
  - comments, notes, learnings, body, reminders, events
87
89
  - linked files, docs, and tests
88
- - json_markdown items with external YAML wrappers before JSON front matter
90
+ - legacy markdown item files (including external YAML wrappers before JSON front matter) migrating cleanly to TOON
89
91
  - closed issue metadata and history drift checks
90
92
  - current-build write mutation and item-count preservation
91
93