@unbrained/pm-cli 2026.5.6 → 2026.5.10

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 (197) 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 +26 -0
  22. package/.pi/extensions/pm-cli/index.js +147 -0
  23. package/.pi/prompts/pm-workflow.md +5 -0
  24. package/.pi/skills/pm-native/SKILL.md +40 -0
  25. package/.pi/skills/pm-release/SKILL.md +35 -0
  26. package/AGENTS.md +1 -1
  27. package/CHANGELOG.md +6 -0
  28. package/PRD.md +16 -16
  29. package/README.md +22 -4
  30. package/dist/cli/commands/claim.js +6 -6
  31. package/dist/cli/commands/claim.js.map +1 -1
  32. package/dist/cli/commands/close.js +9 -9
  33. package/dist/cli/commands/close.js.map +1 -1
  34. package/dist/cli/commands/comments.d.ts +2 -0
  35. package/dist/cli/commands/comments.js +57 -8
  36. package/dist/cli/commands/comments.js.map +1 -1
  37. package/dist/cli/commands/completion.js +33 -4
  38. package/dist/cli/commands/completion.js.map +1 -1
  39. package/dist/cli/commands/config.js +6 -3
  40. package/dist/cli/commands/config.js.map +1 -1
  41. package/dist/cli/commands/contracts.js +4 -1
  42. package/dist/cli/commands/contracts.js.map +1 -1
  43. package/dist/cli/commands/create.d.ts +2 -2
  44. package/dist/cli/commands/create.js +4 -4
  45. package/dist/cli/commands/create.js.map +1 -1
  46. package/dist/cli/commands/docs.js +4 -4
  47. package/dist/cli/commands/docs.js.map +1 -1
  48. package/dist/cli/commands/files.js +10 -10
  49. package/dist/cli/commands/files.js.map +1 -1
  50. package/dist/cli/commands/get.js +5 -5
  51. package/dist/cli/commands/get.js.map +1 -1
  52. package/dist/cli/commands/guide.d.ts +55 -0
  53. package/dist/cli/commands/guide.js +260 -0
  54. package/dist/cli/commands/guide.js.map +1 -0
  55. package/dist/cli/commands/health.js +1 -1
  56. package/dist/cli/commands/health.js.map +1 -1
  57. package/dist/cli/commands/history.js +30 -10
  58. package/dist/cli/commands/history.js.map +1 -1
  59. package/dist/cli/commands/index.d.ts +1 -0
  60. package/dist/cli/commands/index.js +1 -0
  61. package/dist/cli/commands/index.js.map +1 -1
  62. package/dist/cli/commands/learnings.js +3 -3
  63. package/dist/cli/commands/learnings.js.map +1 -1
  64. package/dist/cli/commands/notes.js +3 -3
  65. package/dist/cli/commands/notes.js.map +1 -1
  66. package/dist/cli/commands/reindex.js +18 -32
  67. package/dist/cli/commands/reindex.js.map +1 -1
  68. package/dist/cli/commands/restore.d.ts +2 -2
  69. package/dist/cli/commands/restore.js +44 -24
  70. package/dist/cli/commands/restore.js.map +1 -1
  71. package/dist/cli/commands/search.d.ts +2 -0
  72. package/dist/cli/commands/search.js +30 -21
  73. package/dist/cli/commands/search.js.map +1 -1
  74. package/dist/cli/commands/test-all.d.ts +2 -0
  75. package/dist/cli/commands/test-all.js +2 -0
  76. package/dist/cli/commands/test-all.js.map +1 -1
  77. package/dist/cli/commands/test.d.ts +1 -0
  78. package/dist/cli/commands/test.js +4 -3
  79. package/dist/cli/commands/test.js.map +1 -1
  80. package/dist/cli/commands/update.js +118 -118
  81. package/dist/cli/commands/update.js.map +1 -1
  82. package/dist/cli/commands/validate.js +1 -1
  83. package/dist/cli/commands/validate.js.map +1 -1
  84. package/dist/cli/guide-topics.d.ts +25 -0
  85. package/dist/cli/guide-topics.js +283 -0
  86. package/dist/cli/guide-topics.js.map +1 -0
  87. package/dist/cli/help-content.js +25 -1
  88. package/dist/cli/help-content.js.map +1 -1
  89. package/dist/cli/register-list-query.js +38 -1
  90. package/dist/cli/register-list-query.js.map +1 -1
  91. package/dist/cli/register-mutation.js +17 -4
  92. package/dist/cli/register-mutation.js.map +1 -1
  93. package/dist/cli/register-setup.js +1 -1
  94. package/dist/cli/register-setup.js.map +1 -1
  95. package/dist/core/history/history.js +32 -11
  96. package/dist/core/history/history.js.map +1 -1
  97. package/dist/core/item/item-format.d.ts +2 -2
  98. package/dist/core/item/item-format.js +16 -16
  99. package/dist/core/item/item-format.js.map +1 -1
  100. package/dist/core/schema/runtime-field-filters.js +1 -1
  101. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  102. package/dist/core/schema/runtime-field-values.js +2 -2
  103. package/dist/core/schema/runtime-field-values.js.map +1 -1
  104. package/dist/core/schema/runtime-schema.d.ts +1 -1
  105. package/dist/core/schema/runtime-schema.js +3 -3
  106. package/dist/core/schema/runtime-schema.js.map +1 -1
  107. package/dist/core/search/cache.js +7 -21
  108. package/dist/core/search/cache.js.map +1 -1
  109. package/dist/core/search/corpus.d.ts +13 -0
  110. package/dist/core/search/corpus.js +74 -0
  111. package/dist/core/search/corpus.js.map +1 -0
  112. package/dist/core/search/embedding-batches.js +90 -30
  113. package/dist/core/search/embedding-batches.js.map +1 -1
  114. package/dist/core/sentry/instrument.d.ts +3 -1
  115. package/dist/core/sentry/instrument.js +93 -9
  116. package/dist/core/sentry/instrument.js.map +1 -1
  117. package/dist/core/shared/constants.d.ts +1 -1
  118. package/dist/core/shared/constants.js +1 -1
  119. package/dist/core/shared/constants.js.map +1 -1
  120. package/dist/core/store/front-matter-cache.d.ts +1 -1
  121. package/dist/core/store/front-matter-cache.js +13 -13
  122. package/dist/core/store/front-matter-cache.js.map +1 -1
  123. package/dist/core/store/item-format-migration.js +5 -2
  124. package/dist/core/store/item-format-migration.js.map +1 -1
  125. package/dist/core/store/item-store.js +16 -15
  126. package/dist/core/store/item-store.js.map +1 -1
  127. package/dist/core/store/paths.js +1 -1
  128. package/dist/core/store/paths.js.map +1 -1
  129. package/dist/core/store/settings.js +6 -1
  130. package/dist/core/store/settings.js.map +1 -1
  131. package/dist/core/test/item-test-run-tracking.js +2 -2
  132. package/dist/core/test/item-test-run-tracking.js.map +1 -1
  133. package/dist/mcp/server.d.ts +2 -0
  134. package/dist/mcp/server.js +405 -0
  135. package/dist/mcp/server.js.map +1 -0
  136. package/dist/pi/native.d.ts +5 -0
  137. package/dist/pi/native.js +183 -0
  138. package/dist/pi/native.js.map +1 -0
  139. package/dist/sdk/cli-contracts.d.ts +3 -1
  140. package/dist/sdk/cli-contracts.js +67 -2
  141. package/dist/sdk/cli-contracts.js.map +1 -1
  142. package/dist/types.d.ts +10 -2
  143. package/dist/types.js.map +1 -1
  144. package/docs/AGENT_GUIDE.md +15 -0
  145. package/docs/ARCHITECTURE.md +2 -2
  146. package/docs/CLAUDE_CODE_PLUGIN.md +186 -0
  147. package/docs/CODEX_PLUGIN.md +33 -0
  148. package/docs/COMMANDS.md +6 -2
  149. package/docs/CONFIGURATION.md +2 -8
  150. package/docs/EXTENSIONS.md +1 -0
  151. package/docs/PI_PACKAGE.md +56 -0
  152. package/docs/QUICKSTART.md +1 -0
  153. package/docs/README.md +30 -1
  154. package/docs/RELEASING.md +4 -2
  155. package/docs/SDK.md +3 -2
  156. package/marketplace.json +34 -0
  157. package/package.json +38 -4
  158. package/plugins/pm-cli-claude/.claude-plugin/plugin.json +23 -0
  159. package/plugins/pm-cli-claude/.mcp.json +12 -0
  160. package/plugins/pm-cli-claude/README.md +184 -0
  161. package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
  162. package/plugins/pm-cli-claude/commands/pm-audit.md +39 -0
  163. package/plugins/pm-cli-claude/commands/pm-calendar.md +41 -0
  164. package/plugins/pm-cli-claude/commands/pm-close-task.md +20 -0
  165. package/plugins/pm-cli-claude/commands/pm-developer.md +38 -0
  166. package/plugins/pm-cli-claude/commands/pm-init.md +44 -0
  167. package/plugins/pm-cli-claude/commands/pm-list.md +39 -0
  168. package/plugins/pm-cli-claude/commands/pm-new.md +36 -0
  169. package/plugins/pm-cli-claude/commands/pm-planner.md +51 -0
  170. package/plugins/pm-cli-claude/commands/pm-release.md +41 -0
  171. package/plugins/pm-cli-claude/commands/pm-search.md +21 -0
  172. package/plugins/pm-cli-claude/commands/pm-start-task.md +27 -0
  173. package/plugins/pm-cli-claude/commands/pm-status.md +15 -0
  174. package/plugins/pm-cli-claude/commands/pm-triage.md +35 -0
  175. package/plugins/pm-cli-claude/commands/pm-workflow.md +49 -0
  176. package/plugins/pm-cli-claude/hooks/hooks.json +17 -0
  177. package/plugins/pm-cli-claude/hooks/session-start.mjs +55 -0
  178. package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +60 -0
  179. package/plugins/pm-cli-claude/skills/pm-audit/SKILL.md +88 -0
  180. package/plugins/pm-cli-claude/skills/pm-developer/SKILL.md +116 -0
  181. package/plugins/pm-cli-claude/skills/pm-planner/SKILL.md +118 -0
  182. package/plugins/pm-cli-claude/skills/pm-release/SKILL.md +83 -0
  183. package/plugins/pm-cli-claude/skills/pm-workflow/SKILL.md +148 -0
  184. package/plugins/pm-cli-codex/.codex-plugin/plugin.json +45 -0
  185. package/plugins/pm-cli-codex/.mcp.json +14 -0
  186. package/plugins/pm-cli-codex/README.md +30 -0
  187. package/plugins/pm-cli-codex/assets/pm-cli-small.svg +4 -0
  188. package/plugins/pm-cli-codex/commands/pm-audit.md +8 -0
  189. package/plugins/pm-cli-codex/commands/pm-close-task.md +9 -0
  190. package/plugins/pm-cli-codex/commands/pm-start-task.md +9 -0
  191. package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +54 -0
  192. package/plugins/pm-cli-codex/skills/pm-auditor/SKILL.md +21 -0
  193. package/plugins/pm-cli-codex/skills/pm-auditor/agents/openai.yaml +6 -0
  194. package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +57 -0
  195. package/plugins/pm-cli-codex/skills/pm-native/agents/openai.yaml +6 -0
  196. package/plugins/pm-cli-codex/skills/pm-release/SKILL.md +19 -0
  197. package/plugins/pm-cli-codex/skills/pm-release/agents/openai.yaml +6 -0
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: pm-planner
3
+ description: Plan and organize pm CLI work — triage requests, break epics into tasks, prioritize the backlog, and keep the tracker clean. Use when decomposing features, planning sprints, or organizing incoming requests.
4
+ ---
5
+
6
+ # pm Planner
7
+
8
+ Use this skill when decomposing features, organizing backlogs, triaging incoming work, or planning multi-item projects.
9
+
10
+ ## Planning Loop
11
+
12
+ 1. **Survey** — `pm_context` then `pm_list` with no filter to see the full active backlog.
13
+ 2. **Deduplicate** — `pm_search` before every create to avoid duplicate items.
14
+ 3. **Decompose** — break large items into Epic → Feature → Task hierarchy.
15
+ 4. **Prioritize** — use `pm_update` to set priority (`0`=critical … `4`=minimal).
16
+ 5. **Link parents** — always set `parent` on child items via `pm_update`.
17
+ 6. **Sync TUI** — call `TaskCreate` for any item you claim during this session (see Hybrid TUI Sync).
18
+ 7. **Validate** — `pm_validate` after batch creates to check consistency.
19
+
20
+ ## Hybrid TUI Sync
21
+
22
+ pm is the **persistent store**. Claude Code's task panel is the **live session view**.
23
+
24
+ When you claim a planning item or start active decomposition work:
25
+ ```
26
+ TaskCreate:
27
+ subject: "[pm-xxxx] Plan: <epic/feature title>"
28
+ description: "Planning pm-xxxx — decomposing into child items"
29
+ activeForm: "Planning pm-xxxx"
30
+ ```
31
+ Save the `taskId`. Call `TaskUpdate(in_progress)` when active.
32
+ Call `TaskUpdate(completed)` when the planning item is closed.
33
+
34
+ ## MCP Call Patterns
35
+
36
+ ### Survey the Backlog
37
+ ```json
38
+ { "tool": "pm_context", "args": { "options": { "depth": "standard", "limit": "20" } } }
39
+ { "tool": "pm_list", "args": { "options": { "limit": "50" } } }
40
+ ```
41
+
42
+ ### Deduplicate Before Creating
43
+ ```json
44
+ { "tool": "pm_search", "args": { "query": "feature keywords", "options": { "limit": "10" } } }
45
+ ```
46
+
47
+ ### Create Epic → Feature → Task Hierarchy
48
+ ```json
49
+ {
50
+ "tool": "pm_create",
51
+ "args": {
52
+ "author": "claude-code-agent",
53
+ "options": {
54
+ "title": "Epic: Authentication system overhaul",
55
+ "type": "Epic",
56
+ "status": "open",
57
+ "priority": "1",
58
+ "description": "High-level initiative description.",
59
+ "createMode": "progressive"
60
+ }
61
+ }
62
+ }
63
+ ```
64
+ Then for each child feature/task, set `parent: "pm-xxxx"` via `pm_update`.
65
+
66
+ ### Prioritize the Backlog
67
+ ```json
68
+ { "tool": "pm_list", "args": { "options": { "status": "open", "limit": "30" } } }
69
+ { "tool": "pm_update", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "priority": "0" } } }
70
+ ```
71
+
72
+ ### Link Parent
73
+ ```json
74
+ { "tool": "pm_update", "args": { "id": "pm-child", "author": "claude-code-agent", "options": { "parent": "pm-epic" } } }
75
+ ```
76
+
77
+ ### Run Dedupe Audit After Batch Work
78
+ ```json
79
+ { "tool": "pm_run", "args": { "action": "dedupe-audit", "options": { "mode": "parent_scope", "limit": "20" } } }
80
+ ```
81
+
82
+ ### Validate After Batch Creates
83
+ ```json
84
+ { "tool": "pm_validate", "args": { "options": { "checkResolution": true } } }
85
+ ```
86
+
87
+ ## Item Type Guide
88
+
89
+ | Type | When to use |
90
+ |------|------------|
91
+ | `Epic` | Large initiative spanning multiple features (weeks/months) |
92
+ | `Feature` | Distinct capability under an epic (days) |
93
+ | `Task` | Atomic unit of implementation work (hours) |
94
+ | `Bug` | Defect with reproduce steps |
95
+ | `Story` | User-facing narrative unit |
96
+
97
+ ## Priority Reference
98
+
99
+ - `0` = critical — blocking release or other work
100
+ - `1` = high — important, should be done soon
101
+ - `2` = normal — standard priority (default)
102
+ - `3` = low — nice to have
103
+ - `4` = minimal — defer unless time allows
104
+
105
+ ## Acceptance Criteria Best Practice
106
+
107
+ Write AC as numbered, testable assertions:
108
+ 1. Given [precondition], when [action], then [result].
109
+ 2. All existing tests pass.
110
+ 3. Coverage gate maintained.
111
+
112
+ Set via `pm_create` with `acceptanceCriteria` field or `pm_update` with `options.acceptanceCriteria`.
113
+
114
+ ## Safety
115
+
116
+ - Never pass `path` during real repository tracking.
117
+ - Always `pm_search` before `pm_create` — avoid duplicates.
118
+ - Run `pm_validate` after batch changes.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: pm-release
3
+ description: Run pm-cli release-readiness workflows — validation, coverage gates, changelog, GitHub checks — using native MCP tools with linked evidence. Use when preparing releases, publishing, or verifying post-release state.
4
+ ---
5
+
6
+ # pm Release
7
+
8
+ Use for release preparation, publication, and post-release verification.
9
+
10
+ ## Release Loop
11
+
12
+ 1. **Find or create** the release pm item (after duplicate check with `pm_search`).
13
+ 2. **Claim** it — then call `TaskCreate` to show the release in Claude Code's task panel.
14
+ 3. **Run local gates** before tagging:
15
+ - `pnpm build` — clean build
16
+ - `node scripts/run-tests.mjs coverage` — full coverage gate
17
+ - `pm_validate` with all checks
18
+ - `pm_health` for tracker status
19
+ 4. **Tag and push** — let CI run.
20
+ 5. **Verify GitHub checks** — `gh run list --limit 5` after push.
21
+ 6. **Record evidence** with `pm_comments`.
22
+ 7. **Close and release** the pm item, then `TaskUpdate(completed)`.
23
+
24
+ ## Hybrid TUI Sync
25
+
26
+ ### After claiming the release item
27
+ ```
28
+ TaskCreate:
29
+ subject: "[pm-xxxx] Release: <version>"
30
+ description: "Release gate tracking for pm-xxxx"
31
+ activeForm: "Running release gates"
32
+ ```
33
+ Save the `taskId`. Then `TaskUpdate(in_progress)`.
34
+
35
+ ### After pm_close + pm_release
36
+ ```
37
+ TaskUpdate: { taskId: <saved>, status: "completed" }
38
+ ```
39
+
40
+ ## MCP Calls
41
+
42
+ ### Pre-Release Validation
43
+ ```json
44
+ { "tool": "pm_validate", "args": { "options": { "checkResolution": true, "checkHistoryDrift": true, "checkFiles": true } } }
45
+ { "tool": "pm_health", "args": {} }
46
+ { "tool": "pm_context", "args": { "options": { "depth": "standard" } } }
47
+ ```
48
+
49
+ ### Link Release Artifacts
50
+ ```json
51
+ { "tool": "pm_docs", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": ["path=CHANGELOG.md,scope=project,note=release-notes"] } } }
52
+ { "tool": "pm_files", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": ["path=package.json,scope=project,note=version"] } } }
53
+ ```
54
+
55
+ ### Record Evidence
56
+ ```json
57
+ {
58
+ "tool": "pm_comments",
59
+ "args": {
60
+ "id": "pm-xxxx",
61
+ "author": "claude-code-agent",
62
+ "options": {
63
+ "add": "Release evidence: build ok. Tests pass. 100% coverage. pm validate ok. GitHub CI green. npm publish ok."
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ ## Gate Script Reference
70
+
71
+ ```bash
72
+ pnpm build # TypeScript build
73
+ node scripts/run-tests.mjs coverage # Full test + coverage
74
+ node scripts/release/run-gates.mjs # All release gates
75
+ gh run list --limit 5 # GitHub CI status
76
+ gh run view <run-id> # Detailed run status
77
+ ```
78
+
79
+ ## Safety
80
+
81
+ - Never set `path` for real repository tracking — only for sandbox tests.
82
+ - Run coverage gate before any `npm publish` or version tag.
83
+ - Confirm GitHub CI green before closing the release item.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: pm-workflow
3
+ description: Use pm CLI natively in Claude Code through MCP tools for planning, tracking, mutation, validation, and reporting. Use this skill whenever work should be tracked through pm — before implementing, during implementation, and at close.
4
+ ---
5
+
6
+ # pm Workflow
7
+
8
+ Use this skill for all pm-tracked work. Prefer native MCP tools over shell `pm` commands.
9
+
10
+ ## Tool Preference
11
+
12
+ **Always use native MCP tools before falling back to Bash `pm` commands:**
13
+
14
+ | Purpose | Tool |
15
+ |---------|------|
16
+ | Orient / read state | `pm_context`, `pm_search`, `pm_list`, `pm_get` |
17
+ | Create / update | `pm_create`, `pm_update`, `pm_claim`, `pm_release`, `pm_close` |
18
+ | Evidence | `pm_comments`, `pm_files`, `pm_docs`, `pm_test` |
19
+ | Verify | `pm_validate`, `pm_health`, `pm_contracts` |
20
+ | Everything else | `pm_run` with an explicit `action` |
21
+
22
+ ## Required Workflow Loop
23
+
24
+ 1. **Orient** — run `pm_context`, `pm_search`, and `pm_list` before creating new work.
25
+ 2. **Reuse** — claim an existing item when one matches instead of creating a duplicate.
26
+ 3. **Claim** — call `pm_claim` with `author: "claude-code-agent"` before substantial edits.
27
+ 4. **Sync TUI** — after claiming, call `TaskCreate` to mirror the item in Claude Code's task panel (see Hybrid TUI Sync below).
28
+ 5. **Link evidence** — call `pm_files`, `pm_docs`, `pm_test` as work progresses.
29
+ 6. **Add comments** — `pm_comments` for progress notes and verification results.
30
+ 7. **Verify** — run `pm_validate` and project tests before closing.
31
+ 8. **Close** — `pm_close` with reason, then `pm_release`, then `TaskUpdate(completed)`.
32
+
33
+ ## Hybrid TUI Sync
34
+
35
+ pm is the **persistent store** (cross-session). Claude Code's task panel is the **live session view**.
36
+
37
+ ### When claiming or creating an item
38
+
39
+ Call `TaskCreate` immediately after `pm_claim` (or after `pm_create` if starting fresh):
40
+
41
+ ```
42
+ TaskCreate:
43
+ subject: "[pm-xxxx] <item title>"
44
+ description: "Tracking pm item pm-xxxx. AC: <acceptance_criteria if set>"
45
+ activeForm: "Implementing pm-xxxx"
46
+ ```
47
+
48
+ Save the returned `taskId` — you'll need it for `TaskUpdate` calls later in this session.
49
+
50
+ ### When setting in_progress
51
+
52
+ Call `TaskUpdate` with `status: "in_progress"` using the `taskId` from above.
53
+
54
+ ### When closing
55
+
56
+ Call `pm_close` then `pm_release`, then immediately call:
57
+ ```
58
+ TaskUpdate:
59
+ taskId: <saved taskId>
60
+ status: "completed"
61
+ ```
62
+
63
+ ### Blocked items
64
+
65
+ If a pm item becomes blocked, call `TaskUpdate` with `status: "in_progress"` and add "(BLOCKED)" to the subject so it's visible in the panel.
66
+
67
+ ## Tool Call Shape
68
+
69
+ Most tools accept `cwd`, `author`, and `options`:
70
+
71
+ ```json
72
+ {
73
+ "cwd": "/path/to/repo",
74
+ "author": "claude-code-agent",
75
+ "options": { "limit": "10" }
76
+ }
77
+ ```
78
+
79
+ `pm_run` requires an `action` field:
80
+
81
+ ```json
82
+ {
83
+ "action": "calendar",
84
+ "options": { "view": "week", "format": "markdown" }
85
+ }
86
+ ```
87
+
88
+ ## Common Patterns
89
+
90
+ **Get active work snapshot:**
91
+ ```json
92
+ { "tool": "pm_context", "args": { "options": { "limit": "10" } } }
93
+ ```
94
+
95
+ **Search for existing work:**
96
+ ```json
97
+ { "tool": "pm_search", "args": { "query": "your keywords", "options": { "limit": "10" } } }
98
+ ```
99
+
100
+ **Create a new item:**
101
+ ```json
102
+ {
103
+ "tool": "pm_create",
104
+ "args": {
105
+ "author": "claude-code-agent",
106
+ "options": {
107
+ "title": "Item title",
108
+ "description": "What this item tracks.",
109
+ "type": "Task",
110
+ "status": "open",
111
+ "priority": "1",
112
+ "createMode": "progressive"
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ **Link changed files:**
119
+ ```json
120
+ {
121
+ "tool": "pm_files",
122
+ "args": {
123
+ "id": "pm-xxxx",
124
+ "author": "claude-code-agent",
125
+ "options": { "add": ["path=src/file.ts,scope=project,note=implementation"] }
126
+ }
127
+ }
128
+ ```
129
+
130
+ **Close with evidence:**
131
+ ```json
132
+ {
133
+ "tool": "pm_close",
134
+ "args": {
135
+ "id": "pm-xxxx",
136
+ "reason": "All acceptance criteria met. Tests pass.",
137
+ "author": "claude-code-agent"
138
+ }
139
+ }
140
+ ```
141
+
142
+ ## Priority Reference
143
+
144
+ - `0` = critical, `1` = high, `2` = normal, `3` = low, `4` = minimal
145
+
146
+ ## Safety
147
+
148
+ Do not pass `path` during real repository tracking. Only pass `path` for sandbox/test runs.
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "pm-cli-codex",
3
+ "version": "1.0.0",
4
+ "description": "Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.",
5
+ "author": {
6
+ "name": "unbrained",
7
+ "url": "https://github.com/unbraind/pm-cli"
8
+ },
9
+ "homepage": "https://github.com/unbraind/pm-cli/tree/main/plugins/pm-cli-codex",
10
+ "repository": "https://github.com/unbraind/pm-cli",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "pm-cli",
14
+ "codex",
15
+ "mcp",
16
+ "project-management",
17
+ "agents",
18
+ "tasks",
19
+ "workflows"
20
+ ],
21
+ "skills": "./skills/",
22
+ "mcpServers": "./.mcp.json",
23
+ "interface": {
24
+ "displayName": "pm CLI",
25
+ "shortDescription": "Native pm tracker tools and agent workflows",
26
+ "longDescription": "Use pm CLI from Codex through native MCP tools instead of shelling out to the pm command. The plugin bundles tracker operations, skills, command prompts, and subagent workflow guidance for planning, execution, validation, release, and audit work.",
27
+ "developerName": "unbrained",
28
+ "category": "Coding",
29
+ "capabilities": [
30
+ "Interactive",
31
+ "Read",
32
+ "Write"
33
+ ],
34
+ "websiteURL": "https://github.com/unbraind/pm-cli",
35
+ "privacyPolicyURL": "https://github.com/unbraind/pm-cli/blob/main/SECURITY.md",
36
+ "termsOfServiceURL": "https://github.com/unbraind/pm-cli/blob/main/LICENSE",
37
+ "defaultPrompt": [
38
+ "Use pm CLI to orient, claim, track, verify, and close this repository task"
39
+ ],
40
+ "composerIcon": "./assets/pm-cli-small.svg",
41
+ "logo": "./assets/pm-cli-small.svg",
42
+ "screenshots": [],
43
+ "brandColor": "#2563EB"
44
+ }
45
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "mcpServers": {
3
+ "pm-cli-native": {
4
+ "command": "node",
5
+ "args": [
6
+ "./scripts/pm-mcp-server.mjs"
7
+ ],
8
+ "env": {
9
+ "PM_AUTHOR": "codex-agent"
10
+ },
11
+ "note": "Native pm-cli MCP server. It imports pm command modules directly and does not spawn the pm CLI for tool calls."
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,30 @@
1
+ # pm CLI Codex Plugin
2
+
3
+ This plugin packages pm-cli for Codex with:
4
+
5
+ - a native stdio MCP server (`pm-cli-native`) backed by pm command modules, not shell `pm` invocations
6
+ - skills for developer, user, extension, SDK, release, and audit workflows
7
+ - command prompts for common planning and verification loops
8
+ - repo marketplace metadata for one-step local installation in Codex
9
+
10
+ ## Install
11
+
12
+ From this repository:
13
+
14
+ ```bash
15
+ codex plugin marketplace add .
16
+ ```
17
+
18
+ Restart Codex, then install **pm CLI** from the repo marketplace. The bundled MCP server starts through `plugins/pm-cli-codex/scripts/pm-mcp-server.mjs`.
19
+
20
+ For a published package install, keep `@unbrained/pm-cli` available through npm. The launcher uses the local repo build when present and falls back to `npx -y @unbrained/pm-cli@latest pm-mcp` when the plugin is cached outside the repository.
21
+
22
+ ## Native Tools
23
+
24
+ Prefer the narrow tools when they match the task: `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`, and `pm_guide`.
25
+
26
+ Use `pm_run` for the remaining pm surface. Supported actions include `init`, `calendar`, `activity`, `aggregate`, `dedupe-audit`, `normalize`, `reindex`, `extension`, `history`, `stats`, `append`, `notes`, `learnings`, `test-all`, `comments-audit`, `gc`, templates, and test-runs controls.
27
+
28
+ ## Safety
29
+
30
+ Do not pass `path` for real repository tracking. For tests, pass a sandbox `cwd` or `path`, and keep `PM_GLOBAL_PATH` isolated when running commands that execute linked tests.
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="pm CLI">
2
+ <rect width="64" height="64" rx="14" fill="#2563EB"/>
3
+ <path d="M15 41V18h15c5 0 9 4 9 9s-4 9-9 9h-7v5h-8Zm8-12h6c1.7 0 3-1.3 3-3s-1.3-3-3-3h-6v6Zm20 12V18h6v23h-6Z" fill="#FFFFFF"/>
4
+ </svg>
@@ -0,0 +1,8 @@
1
+ # Audit a pm repository
2
+
3
+ Use native pm tools to inspect project state:
4
+
5
+ 1. `pm_context` with deeper options for hierarchy, blockers, files, and tests.
6
+ 2. `pm_run` with `action=contracts`, `health`, `validate`, `aggregate`, and `dedupe-audit`.
7
+ 3. Convert findings into tracked pm items.
8
+ 4. Link evidence through `pm_files`, `pm_docs`, `pm_test`, and `pm_comments`.
@@ -0,0 +1,9 @@
1
+ # Close a pm-tracked task
2
+
3
+ Use native pm tools to:
4
+
5
+ 1. Run linked or relevant tests.
6
+ 2. Link any changed files/docs/tests that are missing from the item.
7
+ 3. Add evidence with `pm_comments`.
8
+ 4. Run `pm_validate` or `pm_health` when relevant.
9
+ 5. Close with `pm_close` and release with `pm_release`.
@@ -0,0 +1,9 @@
1
+ # Start a pm-tracked task
2
+
3
+ Use the pm CLI plugin native tools to:
4
+
5
+ 1. Run `pm_context`, `pm_search`, and `pm_list`.
6
+ 2. Reuse or create the right pm item.
7
+ 3. Claim it with `pm_claim`.
8
+ 4. Link the intended files/docs/tests before substantial edits.
9
+ 5. Add a `pm_comments` note describing the selected scope.
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from "node:child_process";
3
+ import { access } from "node:fs/promises";
4
+ import path from "node:path";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
+
7
+ const here = path.dirname(fileURLToPath(import.meta.url));
8
+
9
+ async function exists(target) {
10
+ try {
11
+ await access(target);
12
+ return true;
13
+ } catch {
14
+ return false;
15
+ }
16
+ }
17
+
18
+ async function findRepoServer() {
19
+ let cursor = here;
20
+ for (let depth = 0; depth < 8; depth += 1) {
21
+ const candidate = path.join(cursor, "dist", "mcp", "server.js");
22
+ if (await exists(candidate)) {
23
+ return candidate;
24
+ }
25
+ const parent = path.dirname(cursor);
26
+ if (parent === cursor) {
27
+ break;
28
+ }
29
+ cursor = parent;
30
+ }
31
+ return null;
32
+ }
33
+
34
+ const explicitServer = process.env.PM_CLI_MCP_SERVER;
35
+ if (explicitServer && await exists(explicitServer)) {
36
+ await import(pathToFileURL(explicitServer).href);
37
+ } else {
38
+ const repoServer = await findRepoServer();
39
+ if (repoServer) {
40
+ await import(pathToFileURL(repoServer).href);
41
+ } else {
42
+ const child = spawn("npx", ["-y", "@unbrained/pm-cli@latest", "pm-mcp"], {
43
+ stdio: "inherit",
44
+ env: process.env,
45
+ });
46
+ child.on("exit", (code, signal) => {
47
+ if (signal) {
48
+ process.kill(process.pid, signal);
49
+ return;
50
+ }
51
+ process.exit(code ?? 1);
52
+ });
53
+ }
54
+ }
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: pm-auditor
3
+ description: Audit pm-cli repositories with native pm MCP tools, preserving duplicate checks, privacy boundaries, linked evidence, and verification records.
4
+ license: MIT
5
+ ---
6
+
7
+ # pm Auditor
8
+
9
+ Use for broad repository audits, release readiness checks, privacy reviews, and agent-workflow health checks.
10
+
11
+ ## Audit Flow
12
+
13
+ 1. Use `pm_context` with standard or deep options.
14
+ 2. Use `pm_search` for likely existing audit or release items.
15
+ 3. Use `pm_run` actions `health`, `validate`, `contracts`, `dedupe-audit`, `aggregate`, and `calendar` as needed.
16
+ 4. Convert each actionable finding into a pm item or append evidence to an existing item.
17
+ 5. Keep sensitive operational data out of public docs and tracked comments.
18
+
19
+ ## Evidence
20
+
21
+ Record exact verification commands and summarized results through `pm_comments`, and link touched files through `pm_files`.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "pm Auditor"
3
+ short_description: "Audit pm health, contracts, privacy, and readiness"
4
+ icon_small: "./assets/pm-cli-small.svg"
5
+ icon_large: "./assets/pm-cli-small.svg"
6
+ default_prompt: "Audit this pm repository with native pm tools, dedupe findings, link evidence, and avoid leaking private data."
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: pm-native
3
+ description: Use pm-cli natively in Codex through bundled MCP tools for planning, tracking, mutation, validation, and reporting without invoking the pm shell command.
4
+ license: MIT
5
+ ---
6
+
7
+ # pm Native Workflow
8
+
9
+ Use this skill whenever a Codex task should be tracked through pm.
10
+
11
+ ## Tool Preference
12
+
13
+ Use MCP tools before shell commands:
14
+
15
+ - Orient: `pm_context`, `pm_search`, `pm_list`, `pm_get`
16
+ - Mutate: `pm_create`, `pm_update`, `pm_claim`, `pm_release`, `pm_close`
17
+ - Evidence: `pm_comments`, `pm_files`, `pm_docs`, `pm_test`
18
+ - Verify: `pm_validate`, `pm_health`, `pm_contracts`
19
+ - Everything else: `pm_run` with an explicit `action`
20
+
21
+ Do not pass `path` during real repository work. For tests, pass a sandbox `cwd` or `path`.
22
+
23
+ ## Required Loop
24
+
25
+ 1. Run `pm_context`, `pm_search`, and `pm_list` before creating work.
26
+ 2. Reuse an existing item when one matches.
27
+ 3. Claim the item with `pm_claim`.
28
+ 4. Link changed files/docs/tests as work proceeds.
29
+ 5. Add concise evidence with `pm_comments`.
30
+ 6. Run linked and project verification.
31
+ 7. Close with `pm_close` and release with `pm_release`.
32
+
33
+ ## Native Argument Shape
34
+
35
+ Most tools accept:
36
+
37
+ ```json
38
+ {
39
+ "cwd": "/repo/root",
40
+ "author": "codex-agent",
41
+ "options": {
42
+ "limit": "10"
43
+ }
44
+ }
45
+ ```
46
+
47
+ `pm_run` accepts an `action` plus `options`:
48
+
49
+ ```json
50
+ {
51
+ "action": "calendar",
52
+ "options": {
53
+ "view": "week",
54
+ "format": "markdown"
55
+ }
56
+ }
57
+ ```
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "pm Native"
3
+ short_description: "Track Codex work through native pm MCP tools"
4
+ icon_small: "./assets/pm-cli-small.svg"
5
+ icon_large: "./assets/pm-cli-small.svg"
6
+ default_prompt: "Use native pm tools to orient, claim, implement, verify, and close this task without shelling out to pm."
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: pm-release
3
+ description: Run compatibility-gated pm-cli release workflows with native pm tools, linked evidence, and public-surface verification.
4
+ license: MIT
5
+ ---
6
+
7
+ # pm Release
8
+
9
+ Use for release prep, compatibility gates, publication checks, and post-release verification.
10
+
11
+ ## Release Loop
12
+
13
+ 1. Find or create the release item after duplicate checks.
14
+ 2. Claim it and link release docs, changelog, compatibility scripts, and tests.
15
+ 3. Run sandboxed compatibility checks before changing release assets.
16
+ 4. Run full local gates before tagging or publishing.
17
+ 5. Verify public surfaces after publish and record results through `pm_comments`.
18
+
19
+ Use `pm_run` for release-adjacent pm actions not exposed as narrow tools.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "pm Release"
3
+ short_description: "Run pm release workflows with linked evidence"
4
+ icon_small: "./assets/pm-cli-small.svg"
5
+ icon_large: "./assets/pm-cli-small.svg"
6
+ default_prompt: "Use native pm tools to prepare, gate, publish-check, and document this pm-cli release."