@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.
- package/.agents/pm/extensions/.managed-extensions.json +2 -2
- package/.agents/pm/extensions/beads/runtime.js +4 -4
- package/.agents/pm/extensions/beads/runtime.ts +5 -5
- package/.agents/pm/extensions/todos/runtime.js +7 -7
- package/.agents/pm/extensions/todos/runtime.ts +10 -10
- package/.agents/skills/HARNESS_COMPATIBILITY.md +45 -0
- package/.agents/skills/README.md +21 -0
- package/.agents/skills/pm-developer/SKILL.md +73 -0
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +48 -0
- package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-extensions/SKILL.md +57 -0
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
- package/.agents/skills/pm-sdk/SKILL.md +50 -0
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
- package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
- package/.agents/skills/pm-user/SKILL.md +59 -0
- package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.pi/README.md +26 -0
- package/.pi/extensions/pm-cli/index.js +147 -0
- package/.pi/prompts/pm-workflow.md +5 -0
- package/.pi/skills/pm-native/SKILL.md +40 -0
- package/.pi/skills/pm-release/SKILL.md +35 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +6 -0
- package/PRD.md +16 -16
- package/README.md +22 -4
- package/dist/cli/commands/claim.js +6 -6
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +9 -9
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +2 -0
- package/dist/cli/commands/comments.js +57 -8
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +33 -4
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.js +6 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -1
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +2 -2
- package/dist/cli/commands/create.js +4 -4
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.js +4 -4
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/files.js +10 -10
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/get.js +5 -5
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.d.ts +55 -0
- package/dist/cli/commands/guide.js +260 -0
- package/dist/cli/commands/guide.js.map +1 -0
- package/dist/cli/commands/health.js +1 -1
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.js +30 -10
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/learnings.js +3 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +3 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +18 -32
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +2 -2
- package/dist/cli/commands/restore.js +44 -24
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -0
- package/dist/cli/commands/search.js +30 -21
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +2 -0
- package/dist/cli/commands/test-all.js +2 -0
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +1 -0
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +118 -118
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +1 -1
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/guide-topics.d.ts +25 -0
- package/dist/cli/guide-topics.js +283 -0
- package/dist/cli/guide-topics.js.map +1 -0
- package/dist/cli/help-content.js +25 -1
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-list-query.js +38 -1
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +17 -4
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/core/history/history.js +32 -11
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/item/item-format.d.ts +2 -2
- package/dist/core/item/item-format.js +16 -16
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.js +2 -2
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +1 -1
- package/dist/core/schema/runtime-schema.js +3 -3
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.js +7 -21
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +13 -0
- package/dist/core/search/corpus.js +74 -0
- package/dist/core/search/corpus.js.map +1 -0
- package/dist/core/search/embedding-batches.js +90 -30
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +3 -1
- package/dist/core/sentry/instrument.js +93 -9
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.d.ts +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +1 -1
- package/dist/core/store/front-matter-cache.js +13 -13
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-format-migration.js +5 -2
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.js +16 -15
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +6 -1
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/test/item-test-run-tracking.js +2 -2
- package/dist/core/test/item-test-run-tracking.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +405 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/pi/native.d.ts +5 -0
- package/dist/pi/native.js +183 -0
- package/dist/pi/native.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +3 -1
- package/dist/sdk/cli-contracts.js +67 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +10 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +15 -0
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/CLAUDE_CODE_PLUGIN.md +186 -0
- package/docs/CODEX_PLUGIN.md +33 -0
- package/docs/COMMANDS.md +6 -2
- package/docs/CONFIGURATION.md +2 -8
- package/docs/EXTENSIONS.md +1 -0
- package/docs/PI_PACKAGE.md +56 -0
- package/docs/QUICKSTART.md +1 -0
- package/docs/README.md +30 -1
- package/docs/RELEASING.md +4 -2
- package/docs/SDK.md +3 -2
- package/marketplace.json +34 -0
- package/package.json +38 -4
- package/plugins/pm-cli-claude/.claude-plugin/plugin.json +23 -0
- package/plugins/pm-cli-claude/.mcp.json +12 -0
- package/plugins/pm-cli-claude/README.md +184 -0
- package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
- package/plugins/pm-cli-claude/commands/pm-audit.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-calendar.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-close-task.md +20 -0
- package/plugins/pm-cli-claude/commands/pm-developer.md +38 -0
- package/plugins/pm-cli-claude/commands/pm-init.md +44 -0
- package/plugins/pm-cli-claude/commands/pm-list.md +39 -0
- package/plugins/pm-cli-claude/commands/pm-new.md +36 -0
- package/plugins/pm-cli-claude/commands/pm-planner.md +51 -0
- package/plugins/pm-cli-claude/commands/pm-release.md +41 -0
- package/plugins/pm-cli-claude/commands/pm-search.md +21 -0
- package/plugins/pm-cli-claude/commands/pm-start-task.md +27 -0
- package/plugins/pm-cli-claude/commands/pm-status.md +15 -0
- package/plugins/pm-cli-claude/commands/pm-triage.md +35 -0
- package/plugins/pm-cli-claude/commands/pm-workflow.md +49 -0
- package/plugins/pm-cli-claude/hooks/hooks.json +17 -0
- package/plugins/pm-cli-claude/hooks/session-start.mjs +55 -0
- package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +60 -0
- package/plugins/pm-cli-claude/skills/pm-audit/SKILL.md +88 -0
- package/plugins/pm-cli-claude/skills/pm-developer/SKILL.md +116 -0
- package/plugins/pm-cli-claude/skills/pm-planner/SKILL.md +118 -0
- package/plugins/pm-cli-claude/skills/pm-release/SKILL.md +83 -0
- package/plugins/pm-cli-claude/skills/pm-workflow/SKILL.md +148 -0
- package/plugins/pm-cli-codex/.codex-plugin/plugin.json +45 -0
- package/plugins/pm-cli-codex/.mcp.json +14 -0
- package/plugins/pm-cli-codex/README.md +30 -0
- package/plugins/pm-cli-codex/assets/pm-cli-small.svg +4 -0
- package/plugins/pm-cli-codex/commands/pm-audit.md +8 -0
- package/plugins/pm-cli-codex/commands/pm-close-task.md +9 -0
- package/plugins/pm-cli-codex/commands/pm-start-task.md +9 -0
- package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +54 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/SKILL.md +21 -0
- package/plugins/pm-cli-codex/skills/pm-auditor/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +57 -0
- package/plugins/pm-cli-codex/skills/pm-native/agents/openai.yaml +6 -0
- package/plugins/pm-cli-codex/skills/pm-release/SKILL.md +19 -0
- package/plugins/pm-cli-codex/skills/pm-release/agents/openai.yaml +6 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan and organize pm work — triage requests, break epics into tasks, prioritize the backlog, and keep the tracker clean. Accepts an optional scope description as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the pm planning loop using native MCP tools. Argument: `$ARGUMENTS` (optional: feature/epic description to decompose, or empty to survey and prioritize the backlog).
|
|
6
|
+
|
|
7
|
+
1. **Survey the backlog**:
|
|
8
|
+
```json
|
|
9
|
+
{ "tool": "pm_context", "args": { "options": { "depth": "standard", "limit": "20" } } }
|
|
10
|
+
{ "tool": "pm_list", "args": { "options": { "limit": "50" } } }
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **If `$ARGUMENTS` describes new scope** — triage it:
|
|
14
|
+
- `pm_search` with the most distinctive keywords to check for duplicates.
|
|
15
|
+
- If no match, proceed to create. If match found, show it and ask: duplicate or related?
|
|
16
|
+
|
|
17
|
+
3. **Decompose** (if creating new scope):
|
|
18
|
+
- Create Epic (if the scope spans multiple features)
|
|
19
|
+
- Create child Features/Tasks with `parent` links
|
|
20
|
+
- Use `pm_create` with `createMode: "progressive"` for each
|
|
21
|
+
|
|
22
|
+
4. **Sync to Claude Code task panel** for any item you claim this session:
|
|
23
|
+
```
|
|
24
|
+
TaskCreate:
|
|
25
|
+
subject: "[pm-xxxx] Plan: <title>"
|
|
26
|
+
description: "Planning scope for pm-xxxx"
|
|
27
|
+
activeForm: "Planning pm-xxxx"
|
|
28
|
+
```
|
|
29
|
+
Call `TaskUpdate(in_progress)`. Save taskId.
|
|
30
|
+
|
|
31
|
+
5. **Prioritize** — review open items and update priorities with `pm_update`:
|
|
32
|
+
- `0` = critical, `1` = high, `2` = normal, `3` = low, `4` = minimal
|
|
33
|
+
|
|
34
|
+
6. **Link parents** for all child items:
|
|
35
|
+
```json
|
|
36
|
+
{ "tool": "pm_update", "args": { "id": "pm-child", "author": "claude-code-agent", "options": { "parent": "pm-epic" } } }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
7. **Validate** after batch creates:
|
|
40
|
+
```json
|
|
41
|
+
{ "tool": "pm_validate", "args": { "options": { "checkResolution": true } } }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
8. **Dedupe check**:
|
|
45
|
+
```json
|
|
46
|
+
{ "tool": "pm_run", "args": { "action": "dedupe-audit", "options": { "mode": "parent_scope", "limit": "20" } } }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
9. If you claimed a planning item: `pm_close` it, `pm_release`, then `TaskUpdate(completed)`.
|
|
50
|
+
|
|
51
|
+
10. **Report** — list all created/updated items with their IDs, types, priorities, and parent links.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run pm release-readiness — validation, coverage gate, changelog check, GitHub CI verification — with live TUI tracking. Accepts an optional version or release item ID as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the full pm release workflow using native MCP tools. Argument: `$ARGUMENTS` (optional: version like `v1.2.3`, or pm item ID for an existing release item).
|
|
6
|
+
|
|
7
|
+
1. **Find or create the release item**:
|
|
8
|
+
- `pm_search` with query "release" to find existing release items.
|
|
9
|
+
- If `$ARGUMENTS` is a pm ID: `pm_get` it directly.
|
|
10
|
+
- If no match: `pm_create` with `type: "Chore"`, `title: "Release <version>"`, `priority: "0"`.
|
|
11
|
+
2. **Claim** with `pm_claim` and `author: "claude-code-agent"`.
|
|
12
|
+
3. **Sync to Claude Code task panel**:
|
|
13
|
+
```
|
|
14
|
+
TaskCreate:
|
|
15
|
+
subject: "[pm-xxxx] Release: <version>"
|
|
16
|
+
description: "Release gate tracking — pm-xxxx"
|
|
17
|
+
activeForm: "Running release gates"
|
|
18
|
+
```
|
|
19
|
+
Call `TaskUpdate(in_progress)`. Save the taskId.
|
|
20
|
+
4. **Link release artifacts**:
|
|
21
|
+
- `pm_docs` — link `CHANGELOG.md`
|
|
22
|
+
- `pm_files` — link `package.json`
|
|
23
|
+
5. **Run gates** (all must pass before tagging):
|
|
24
|
+
- `pnpm build`
|
|
25
|
+
- `node scripts/run-tests.mjs coverage`
|
|
26
|
+
- `pm_validate` with `checkResolution: true, checkHistoryDrift: true, checkFiles: true`
|
|
27
|
+
- `pm_health`
|
|
28
|
+
- `node scripts/release/run-gates.mjs` (if present)
|
|
29
|
+
6. **Record gate results** with `pm_comments`:
|
|
30
|
+
```
|
|
31
|
+
"Release evidence: build ok. N tests pass. 100% coverage. pm validate ok. pm health ok."
|
|
32
|
+
```
|
|
33
|
+
7. **Tag and push** (if all gates pass):
|
|
34
|
+
```bash
|
|
35
|
+
git tag v<version> && git push origin v<version>
|
|
36
|
+
```
|
|
37
|
+
8. **Verify CI** — `gh run list --limit 5` and confirm all checks are green.
|
|
38
|
+
9. **Post-CI evidence** — add a final `pm_comments` with CI run URL.
|
|
39
|
+
10. **Close** — `pm_close` with reason, `pm_release`, then `TaskUpdate(completed)`.
|
|
40
|
+
|
|
41
|
+
Do not tag if any gate fails. Report the failing gate and what's needed to fix it.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Search pm items by keywords, tags, status, or type — returns ranked results with context. Pass the search query as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Search pm items using native MCP tools. Query: `$ARGUMENTS`
|
|
6
|
+
|
|
7
|
+
1. **Parse the query** — extract key terms from `$ARGUMENTS`. If empty, ask the user what to search for.
|
|
8
|
+
2. **Run primary search** — call `pm_search` with the query:
|
|
9
|
+
```json
|
|
10
|
+
{ "tool": "pm_search", "args": { "query": "$ARGUMENTS", "options": { "limit": "15" } } }
|
|
11
|
+
```
|
|
12
|
+
3. **If query includes a status filter** (e.g. "open bugs", "blocked", "in progress") — also call `pm_list` with the matching status filter:
|
|
13
|
+
```json
|
|
14
|
+
{ "tool": "pm_list", "args": { "options": { "status": "blocked", "limit": "20" } } }
|
|
15
|
+
```
|
|
16
|
+
4. **Present results** — show each matching item as:
|
|
17
|
+
- `[pm-xxxx]` **Title** (status, type, priority)
|
|
18
|
+
- One line of description if relevant
|
|
19
|
+
5. **Offer to start, update, or triage** — after showing results, ask if the user wants to claim an item or create a new one if nothing matches.
|
|
20
|
+
|
|
21
|
+
Keep results concise — title + status + type per line. Group by status if there are many results.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start a pm-tracked task — orient, find or create the right item, claim it, sync to TUI, and link initial scope. Accepts an optional item ID or keywords as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use native pm MCP tools to start a tracked task. Argument: `$ARGUMENTS` (item ID like `pm-xxxx`, or keywords to search, or empty to use context).
|
|
6
|
+
|
|
7
|
+
1. **Orient** — call `pm_context` with `options: { limit: "10" }`.
|
|
8
|
+
2. **Find the item**:
|
|
9
|
+
- If `$ARGUMENTS` looks like an ID (starts with `pm-`): call `pm_get` with that ID.
|
|
10
|
+
- If `$ARGUMENTS` has keywords: call `pm_search` with those keywords.
|
|
11
|
+
- If empty: call `pm_list` to show open items and ask the user which to start.
|
|
12
|
+
3. **Claim** the selected item with `pm_claim` and `author: "claude-code-agent"`.
|
|
13
|
+
4. **Update status** with `pm_update` to `status: "in_progress"`.
|
|
14
|
+
5. **Sync to Claude Code task panel** — call `TaskCreate`:
|
|
15
|
+
```
|
|
16
|
+
TaskCreate:
|
|
17
|
+
subject: "[pm-xxxx] <item title>"
|
|
18
|
+
description: "Tracking pm item pm-xxxx. AC: <acceptance_criteria if set>"
|
|
19
|
+
activeForm: "Implementing pm-xxxx"
|
|
20
|
+
```
|
|
21
|
+
Then call `TaskUpdate` with `status: "in_progress"` using the returned taskId.
|
|
22
|
+
6. **Add a start comment** with `pm_comments`: `"Starting work. Scope: <brief description of planned approach>."`
|
|
23
|
+
7. **Report** the claimed item's title, ID, and acceptance criteria.
|
|
24
|
+
|
|
25
|
+
If no matching item exists and the user wants to create one, collect title + description + type then call `pm_create` — then proceed from step 3.
|
|
26
|
+
|
|
27
|
+
The Claude Code task panel will now show the item with a spinner. Use `/pm-close-task pm-xxxx` when done to close both pm and the panel entry.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show a compact pm project status snapshot — active items, blocked work, and upcoming deadlines.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use native pm MCP tools to show project status:
|
|
6
|
+
|
|
7
|
+
1. Call `pm_context` with `options: { limit: "10", depth: "standard" }` to get the active work snapshot.
|
|
8
|
+
2. Call `pm_run` with `action: "calendar"` and `options: { view: "week", format: "markdown", include: "deadlines,reminders" }` to show upcoming events.
|
|
9
|
+
3. Present a compact summary:
|
|
10
|
+
- Count items by status (in_progress / open / blocked)
|
|
11
|
+
- List the top 3 active items with title, assignee, and deadline
|
|
12
|
+
- Note any overdue or blocked items
|
|
13
|
+
- Show the next 3 calendar events if any
|
|
14
|
+
|
|
15
|
+
Keep the response concise — under 300 words unless there are many items. Do not show closed or canceled items.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Triage a new request through pm — check for duplicates, create canonical parent lineage if needed, and produce a scoped child item with acceptance criteria. Pass the request description as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use native pm MCP tools to triage a request into pm tracking. Request: `$ARGUMENTS`
|
|
6
|
+
|
|
7
|
+
1. **Duplicate check** — `pm_search` with the most distinctive keywords from the request. Check first 10 results.
|
|
8
|
+
2. **Context** — `pm_context` to understand current workload and priorities.
|
|
9
|
+
3. **Decision**:
|
|
10
|
+
- If a matching item exists: show it and ask if this is a duplicate or a related new item.
|
|
11
|
+
- If no match: proceed to create.
|
|
12
|
+
4. **Parent lineage** — for net-new scope, check if there's an Epic or Feature parent. Create parent items if needed before the child.
|
|
13
|
+
5. **Create the item**:
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"tool": "pm_create",
|
|
17
|
+
"args": {
|
|
18
|
+
"author": "claude-code-agent",
|
|
19
|
+
"options": {
|
|
20
|
+
"title": "Concise, action-oriented title",
|
|
21
|
+
"description": "What and why, one paragraph.",
|
|
22
|
+
"type": "Task",
|
|
23
|
+
"status": "open",
|
|
24
|
+
"priority": "1",
|
|
25
|
+
"tags": "relevant,tags",
|
|
26
|
+
"acceptanceCriteria": "Specific, testable criteria.",
|
|
27
|
+
"createMode": "progressive"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
6. **Link parent** if one exists: `pm_update` with `options: { parent: "pm-xxxx" }`.
|
|
33
|
+
7. **Report** the created item ID, title, and acceptance criteria.
|
|
34
|
+
|
|
35
|
+
Keep the item scoped — one work unit per item. Break large requests into Epic → Feature → Task hierarchy.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the pm workflow loop — orient, claim, track, and close a pm item — with full hybrid TUI display. Accepts an optional item ID or description as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run the pm workflow loop using native MCP tools. Argument: `$ARGUMENTS` (item ID, keywords, or description of new work).
|
|
6
|
+
|
|
7
|
+
This is the general-purpose pm workflow command. For specialized loops use:
|
|
8
|
+
- `/pm-developer` — implementation/coding work
|
|
9
|
+
- `/pm-release` — release gates and publishing
|
|
10
|
+
- `/pm-planner` — backlog planning and decomposition
|
|
11
|
+
- `/pm-audit` — tracker health audit
|
|
12
|
+
|
|
13
|
+
**Steps:**
|
|
14
|
+
|
|
15
|
+
1. **Orient**:
|
|
16
|
+
```json
|
|
17
|
+
{ "tool": "pm_context", "args": { "options": { "limit": "10" } } }
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. **Find or create the item** from `$ARGUMENTS`:
|
|
21
|
+
- pm ID → `pm_get`
|
|
22
|
+
- Keywords → `pm_search` then pick the best match
|
|
23
|
+
- Description of new work → `pm_search` first, then `pm_create` if no duplicate
|
|
24
|
+
|
|
25
|
+
3. **Claim** with `pm_claim` + `author: "claude-code-agent"`, then `pm_update` to `in_progress`.
|
|
26
|
+
|
|
27
|
+
4. **Sync to Claude Code task panel**:
|
|
28
|
+
```
|
|
29
|
+
TaskCreate:
|
|
30
|
+
subject: "[pm-xxxx] <item title>"
|
|
31
|
+
description: "Tracking pm-xxxx"
|
|
32
|
+
activeForm: "Working on pm-xxxx"
|
|
33
|
+
```
|
|
34
|
+
Call `TaskUpdate(in_progress)`. Save taskId for this session.
|
|
35
|
+
|
|
36
|
+
5. **Do the work** — link evidence as you go:
|
|
37
|
+
- Changed files: `pm_files`
|
|
38
|
+
- Updated docs: `pm_docs`
|
|
39
|
+
- Test commands: `pm_test`
|
|
40
|
+
- Progress notes: `pm_comments`
|
|
41
|
+
|
|
42
|
+
6. **Verify** — `pm_validate` before closing.
|
|
43
|
+
|
|
44
|
+
7. **Close**:
|
|
45
|
+
- `pm_close` with reason addressing acceptance criteria
|
|
46
|
+
- `pm_release`
|
|
47
|
+
- `TaskUpdate(completed)` using saved taskId
|
|
48
|
+
|
|
49
|
+
Report the item ID, title, and final status at the end.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* pm-cli Claude Code session-start hook.
|
|
4
|
+
*
|
|
5
|
+
* Injects a brief pm context summary into the session when pm is initialized
|
|
6
|
+
* in the current workspace. Exits silently if pm is not set up.
|
|
7
|
+
*/
|
|
8
|
+
import { execSync } from "node:child_process";
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
|
|
12
|
+
const workspace = process.cwd();
|
|
13
|
+
const pmSettingsPath = join(workspace, ".agents", "pm", "settings.json");
|
|
14
|
+
|
|
15
|
+
if (!existsSync(pmSettingsPath)) {
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const raw = execSync("pm context --limit 5 --json", {
|
|
21
|
+
cwd: workspace,
|
|
22
|
+
encoding: "utf-8",
|
|
23
|
+
timeout: 5000,
|
|
24
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const ctx = JSON.parse(raw);
|
|
28
|
+
const { summary } = ctx;
|
|
29
|
+
if (!summary) {
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const parts = [];
|
|
34
|
+
if (summary.in_progress > 0) parts.push(`${summary.in_progress} in_progress`);
|
|
35
|
+
if (summary.open > 0) parts.push(`${summary.open} open`);
|
|
36
|
+
if (summary.blocked > 0) parts.push(`${summary.blocked} BLOCKED`);
|
|
37
|
+
|
|
38
|
+
if (parts.length === 0) {
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const topItems = [...(ctx.high_level ?? []), ...(ctx.low_level ?? [])].slice(0, 3);
|
|
43
|
+
const itemLines = topItems
|
|
44
|
+
.map((item) => ` • [${item.id}] ${item.title} (${item.status})`)
|
|
45
|
+
.join("\n");
|
|
46
|
+
|
|
47
|
+
process.stdout.write(
|
|
48
|
+
`pm tracker: ${parts.join(", ")}\n` +
|
|
49
|
+
(itemLines ? `${itemLines}\n` : "") +
|
|
50
|
+
`Use pm_context tool or /pm-status for full details.\n`,
|
|
51
|
+
);
|
|
52
|
+
} catch {
|
|
53
|
+
// pm unavailable, not initialized, or timed out — exit silently
|
|
54
|
+
process.exit(0);
|
|
55
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* pm-cli native MCP server launcher for Claude Code.
|
|
4
|
+
*
|
|
5
|
+
* Resolution order:
|
|
6
|
+
* 1. PM_CLI_MCP_SERVER env var (explicit path)
|
|
7
|
+
* 2. dist/mcp/server.js walking up from this file (repo checkout)
|
|
8
|
+
* 3. npx -y @unbrained/pm-cli@latest pm-mcp (installed via npm)
|
|
9
|
+
*/
|
|
10
|
+
import { spawn } from "node:child_process";
|
|
11
|
+
import { access } from "node:fs/promises";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
14
|
+
|
|
15
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
|
|
17
|
+
async function exists(target) {
|
|
18
|
+
try {
|
|
19
|
+
await access(target);
|
|
20
|
+
return true;
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function findRepoServer() {
|
|
27
|
+
let cursor = here;
|
|
28
|
+
for (let depth = 0; depth < 10; depth += 1) {
|
|
29
|
+
const candidate = path.join(cursor, "dist", "mcp", "server.js");
|
|
30
|
+
if (await exists(candidate)) {
|
|
31
|
+
return candidate;
|
|
32
|
+
}
|
|
33
|
+
const parent = path.dirname(cursor);
|
|
34
|
+
if (parent === cursor) break;
|
|
35
|
+
cursor = parent;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const explicitServer = process.env.PM_CLI_MCP_SERVER;
|
|
41
|
+
if (explicitServer && (await exists(explicitServer))) {
|
|
42
|
+
await import(pathToFileURL(explicitServer).href);
|
|
43
|
+
} else {
|
|
44
|
+
const repoServer = await findRepoServer();
|
|
45
|
+
if (repoServer) {
|
|
46
|
+
await import(pathToFileURL(repoServer).href);
|
|
47
|
+
} else {
|
|
48
|
+
const child = spawn("npx", ["-y", "--package=@unbrained/pm-cli@latest", "pm-mcp"], {
|
|
49
|
+
stdio: "inherit",
|
|
50
|
+
env: process.env,
|
|
51
|
+
});
|
|
52
|
+
child.on("exit", (code, signal) => {
|
|
53
|
+
if (signal) {
|
|
54
|
+
process.kill(process.pid, signal);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
process.exit(code ?? 1);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm-audit
|
|
3
|
+
description: Audit pm-cli repositories with native pm MCP tools — health checks, validation, duplicate detection, aggregation, privacy review, and workflow health. Use when performing broad repository audits, release readiness checks, or agent-workflow health reviews.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pm Audit
|
|
7
|
+
|
|
8
|
+
Use for comprehensive repository audits, consistency reviews, and health diagnostics.
|
|
9
|
+
|
|
10
|
+
## Audit Flow
|
|
11
|
+
|
|
12
|
+
1. **Context snapshot** — `pm_context` with `depth: "standard"`.
|
|
13
|
+
2. **Search for existing audits** — `pm_search` to avoid duplicate tracking.
|
|
14
|
+
3. **Create or claim audit item** — then call `TaskCreate` to show in Claude Code's task panel.
|
|
15
|
+
4. **Health check** — `pm_health` for tracker diagnostics.
|
|
16
|
+
5. **Validation suite** — `pm_validate` with all checks enabled.
|
|
17
|
+
6. **Aggregate** — `pm_run` with `action: "aggregate"` for governance view.
|
|
18
|
+
7. **Dedupe review** — `pm_run` with `action: "dedupe-audit"`.
|
|
19
|
+
8. **Calendar** — `pm_run` with `action: "calendar"` for deadline view.
|
|
20
|
+
9. **Convert findings** — create pm items for each actionable finding.
|
|
21
|
+
10. **Evidence** — `pm_comments` with verification summaries.
|
|
22
|
+
11. **Close audit item** then `TaskUpdate(completed)`.
|
|
23
|
+
|
|
24
|
+
## Hybrid TUI Sync
|
|
25
|
+
|
|
26
|
+
After creating/claiming the audit tracking item:
|
|
27
|
+
```
|
|
28
|
+
TaskCreate:
|
|
29
|
+
subject: "[pm-xxxx] Audit: pm tracker health"
|
|
30
|
+
description: "Tracking full audit run — pm-xxxx"
|
|
31
|
+
activeForm: "Running pm audit"
|
|
32
|
+
```
|
|
33
|
+
Save the `taskId`. Call `TaskUpdate(in_progress)`.
|
|
34
|
+
When closing: `TaskUpdate(completed)`.
|
|
35
|
+
|
|
36
|
+
For each **finding item** created during the audit, also create a matching `TaskCreate` if you plan to work on it this session.
|
|
37
|
+
|
|
38
|
+
## MCP Calls
|
|
39
|
+
|
|
40
|
+
### Full Audit Suite
|
|
41
|
+
```json
|
|
42
|
+
{ "tool": "pm_context", "args": { "options": { "depth": "standard", "limit": "20" } } }
|
|
43
|
+
{ "tool": "pm_health", "args": {} }
|
|
44
|
+
{ "tool": "pm_validate", "args": { "options": { "checkResolution": true, "checkHistoryDrift": true, "checkFiles": true, "scanMode": "tracked-all" } } }
|
|
45
|
+
{ "tool": "pm_run", "args": { "action": "aggregate", "options": { "groupBy": "status,type" } } }
|
|
46
|
+
{ "tool": "pm_run", "args": { "action": "dedupe-audit", "options": { "mode": "parent_scope", "limit": "20" } } }
|
|
47
|
+
{ "tool": "pm_run", "args": { "action": "calendar", "options": { "view": "week", "format": "markdown", "include": "deadlines,reminders" } } }
|
|
48
|
+
{ "tool": "pm_run", "args": { "action": "stats" } }
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Activity Review
|
|
52
|
+
```json
|
|
53
|
+
{ "tool": "pm_run", "args": { "action": "activity", "options": { "limit": "50" } } }
|
|
54
|
+
{ "tool": "pm_run", "args": { "action": "comments-audit", "options": { "limit": "20" } } }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Contracts and Schema Check
|
|
58
|
+
```json
|
|
59
|
+
{ "tool": "pm_contracts", "args": {} }
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Finding Classification
|
|
63
|
+
|
|
64
|
+
| Severity | Action |
|
|
65
|
+
|----------|--------|
|
|
66
|
+
| Blocker | Create pm item with priority 0, status open |
|
|
67
|
+
| Warning | Create pm item with priority 1 |
|
|
68
|
+
| Info | Append to existing audit item comments |
|
|
69
|
+
| No issue | Log as evidence in audit comments |
|
|
70
|
+
|
|
71
|
+
## Evidence Format
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"tool": "pm_comments",
|
|
76
|
+
"args": {
|
|
77
|
+
"id": "pm-xxxx",
|
|
78
|
+
"author": "claude-code-agent",
|
|
79
|
+
"options": {
|
|
80
|
+
"add": "Audit evidence: health=ok, validate=ok (2 warnings), dedupe=5 candidates, items=681, tests=1087 passing."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Privacy
|
|
87
|
+
|
|
88
|
+
Keep sensitive operational data (telemetry credentials, user PII, internal endpoints) out of public docs and tracked comments. Use `pm notes` for sensitive context instead of `pm comments`.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm-developer
|
|
3
|
+
description: Run the pm-cli developer execution loop — orient, claim, implement, link evidence, verify, and close — with native MCP tools. Use when coding, debugging, refactoring, or shipping changes tracked in pm items.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pm Developer
|
|
7
|
+
|
|
8
|
+
Use this skill for implementation work that changes code, docs, tests, or release artifacts.
|
|
9
|
+
|
|
10
|
+
## Canonical Execution Loop
|
|
11
|
+
|
|
12
|
+
1. **Orient** — `pm_context` then `pm_search` for relevant existing items.
|
|
13
|
+
2. **Decide** — reuse an existing item when one matches; create only when needed.
|
|
14
|
+
3. **Claim** — `pm_claim` before any substantial edits.
|
|
15
|
+
4. **Sync TUI** — call `TaskCreate` to mirror the pm item in Claude Code's task panel (see Hybrid TUI Sync).
|
|
16
|
+
5. **Implement** — make the changes, link files/docs/tests as you go.
|
|
17
|
+
6. **Verify** — run linked tests plus local quality gates.
|
|
18
|
+
7. **Evidence** — `pm_comments` with what changed and what passed.
|
|
19
|
+
8. **Close** — `pm_close` then `pm_release` then `TaskUpdate(completed)`.
|
|
20
|
+
|
|
21
|
+
## Hybrid TUI Sync
|
|
22
|
+
|
|
23
|
+
pm is the **persistent store**. Claude Code's task panel is the **live session view**.
|
|
24
|
+
|
|
25
|
+
### After pm_claim (or pm_create when starting fresh)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
TaskCreate:
|
|
29
|
+
subject: "[pm-xxxx] <item title>"
|
|
30
|
+
description: "Tracking pm item pm-xxxx. AC: <acceptance_criteria>"
|
|
31
|
+
activeForm: "Implementing pm-xxxx"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Save the returned `taskId`. Then:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
TaskUpdate: { taskId: <saved>, status: "in_progress" }
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### After pm_close + pm_release
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
TaskUpdate: { taskId: <saved>, status: "completed" }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step-by-Step MCP Calls
|
|
47
|
+
|
|
48
|
+
### 1. Orient
|
|
49
|
+
```json
|
|
50
|
+
{ "tool": "pm_context", "args": { "options": { "limit": "10" } } }
|
|
51
|
+
{ "tool": "pm_search", "args": { "query": "task keywords", "options": { "limit": "10" } } }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Claim
|
|
55
|
+
```json
|
|
56
|
+
{ "tool": "pm_claim", "args": { "id": "pm-xxxx", "author": "claude-code-agent" } }
|
|
57
|
+
{ "tool": "pm_update", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "status": "in_progress" } } }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then immediately: `TaskCreate` → `TaskUpdate(in_progress)` as shown above.
|
|
61
|
+
|
|
62
|
+
### 3. Link Evidence (during implementation)
|
|
63
|
+
```json
|
|
64
|
+
{ "tool": "pm_files", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": ["path=src/file.ts,scope=project,note=implementation"] } } }
|
|
65
|
+
{ "tool": "pm_docs", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": ["path=docs/GUIDE.md,scope=project,note=updated"] } } }
|
|
66
|
+
{ "tool": "pm_test", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": ["command=node scripts/run-tests.mjs test -- tests/unit/foo.spec.ts,scope=project,timeout_seconds=240"] } } }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 4. Validate
|
|
70
|
+
```json
|
|
71
|
+
{ "tool": "pm_validate", "args": { "options": { "checkResolution": true, "checkHistoryDrift": true } } }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 5. Add Evidence Comment
|
|
75
|
+
```json
|
|
76
|
+
{ "tool": "pm_comments", "args": { "id": "pm-xxxx", "author": "claude-code-agent", "options": { "add": "Evidence: changed src/foo.ts. All tests pass. pm validate ok." } } }
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 6. Close
|
|
80
|
+
```json
|
|
81
|
+
{ "tool": "pm_close", "args": { "id": "pm-xxxx", "reason": "Implementation complete. Acceptance criteria met.", "author": "claude-code-agent" } }
|
|
82
|
+
{ "tool": "pm_release", "args": { "id": "pm-xxxx", "author": "claude-code-agent" } }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Then: `TaskUpdate: { taskId: <saved>, status: "completed" }`
|
|
86
|
+
|
|
87
|
+
## Verification Defaults
|
|
88
|
+
|
|
89
|
+
Run these before closing any implementation item:
|
|
90
|
+
- `pnpm build` (or project build command)
|
|
91
|
+
- `node scripts/run-tests.mjs test -- <target>` (targeted test)
|
|
92
|
+
- `node scripts/run-tests.mjs coverage` (coverage gate)
|
|
93
|
+
- `pm_validate` with `checkResolution: true`
|
|
94
|
+
|
|
95
|
+
## Create When Needed
|
|
96
|
+
|
|
97
|
+
When no existing item matches:
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"tool": "pm_create",
|
|
101
|
+
"args": {
|
|
102
|
+
"author": "claude-code-agent",
|
|
103
|
+
"options": {
|
|
104
|
+
"title": "Fix: concise description of the problem",
|
|
105
|
+
"description": "Root cause and approach.",
|
|
106
|
+
"type": "Task",
|
|
107
|
+
"status": "open",
|
|
108
|
+
"priority": "1",
|
|
109
|
+
"tags": "relevant,tags",
|
|
110
|
+
"createMode": "progressive"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then call `TaskCreate` + `TaskUpdate(in_progress)` after claiming.
|