@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.
- 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 +35 -0
- package/.pi/agents/pm-triage-agent.md +19 -0
- package/.pi/agents/pm-verification-agent.md +21 -0
- package/.pi/chains/pm-native-delivery.chain.md +11 -0
- package/.pi/extensions/pm-cli/index.js +387 -0
- package/.pi/prompts/pm-workflow.md +5 -0
- package/.pi/skills/pm-native/SKILL.md +44 -0
- package/.pi/skills/pm-release/SKILL.md +35 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +13 -0
- package/PRD.md +16 -16
- package/README.md +30 -4
- package/dist/cli/argv-utils.d.ts +5 -0
- package/dist/cli/argv-utils.js +34 -0
- package/dist/cli/argv-utils.js.map +1 -0
- package/dist/cli/bootstrap-args.d.ts +15 -0
- package/dist/cli/bootstrap-args.js +211 -0
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +109 -3
- package/dist/cli/commander-usage.js.map +1 -1
- 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 +40 -7
- 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.d.ts +19 -0
- package/dist/cli/commands/contracts.js +36 -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 +116 -55
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/docs.js +13 -6
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -1
- package/dist/cli/commands/extension.js +174 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +19 -12
- 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/init.d.ts +2 -0
- package/dist/cli/commands/init.js +21 -1
- package/dist/cli/commands/init.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/metadata-normalizers.d.ts +4 -0
- package/dist/cli/commands/metadata-normalizers.js +37 -0
- package/dist/cli/commands/metadata-normalizers.js.map +1 -0
- package/dist/cli/commands/notes.js +3 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +180 -156
- 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 +45 -26
- 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 +13 -5
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.js +188 -157
- 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/error-guidance.d.ts +9 -1
- package/dist/cli/error-guidance.js +147 -6
- package/dist/cli/error-guidance.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/help-json-payload.js +11 -1
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +69 -6
- package/dist/cli/main.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 +15 -1
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/telemetry-flush.d.ts +2 -0
- package/dist/cli/telemetry-flush.js +4 -0
- package/dist/cli/telemetry-flush.js.map +1 -0
- package/dist/cli.js +1 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +72 -0
- package/dist/core/extensions/extension-types.js +24 -0
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -0
- package/dist/core/extensions/loader.js +766 -7
- package/dist/core/extensions/loader.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/lock/lock.js +2 -0
- package/dist/core/lock/lock.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 +18 -1
- package/dist/core/sentry/instrument.js +128 -12
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.d.ts +1 -1
- package/dist/core/shared/constants.js +21 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +8 -0
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/levenshtein.d.ts +1 -0
- package/dist/core/shared/levenshtein.js +37 -0
- package/dist/core/shared/levenshtein.js.map +1 -0
- 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 +35 -2
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +216 -2
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +102 -3
- package/dist/core/telemetry/runtime.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 +407 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/pi/native.d.ts +5 -0
- package/dist/pi/native.js +236 -0
- package/dist/pi/native.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +24 -2
- package/dist/sdk/cli-contracts.js +317 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +12 -1
- package/dist/sdk/index.js +8 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/types.d.ts +51 -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 +225 -0
- package/docs/CODEX_PLUGIN.md +33 -0
- package/docs/COMMANDS.md +6 -2
- package/docs/CONFIGURATION.md +2 -8
- package/docs/EXTENSIONS.md +688 -0
- package/docs/MIGRATION_CLI_SIMPLIFICATION.md +64 -0
- package/docs/PI_PACKAGE.md +141 -0
- package/docs/QUICKSTART.md +1 -0
- package/docs/README.md +30 -1
- package/docs/RELEASING.md +4 -2
- package/docs/SDK.md +444 -2
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +53 -0
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +41 -0
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +45 -0
- package/docs/examples/policy-restricted-extension/README.md +74 -0
- package/docs/examples/policy-restricted-extension/index.js +21 -0
- package/docs/examples/policy-restricted-extension/manifest.json +21 -0
- package/docs/examples/policy-restricted-extension/package.json +8 -0
- package/docs/examples/sdk-app-embedding/README.md +39 -0
- package/docs/examples/sdk-app-embedding/package.json +9 -0
- package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +61 -0
- package/docs/examples/sdk-contract-consumer/README.md +57 -0
- package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +47 -0
- package/docs/examples/sdk-contract-consumer/package.json +10 -0
- package/docs/examples/starter-extension/README.md +57 -42
- package/docs/examples/starter-extension/manifest.json +15 -0
- 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 +225 -0
- package/plugins/pm-cli-claude/agents/pm-coordinator.md +48 -0
- package/plugins/pm-cli-claude/agents/pm-delivery-chain.md +88 -0
- package/plugins/pm-cli-claude/agents/pm-triage-agent.md +83 -0
- package/plugins/pm-cli-claude/agents/pm-verification-agent.md +88 -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 +120 -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,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Initialize pm in the current project — creates the .agents/pm/ tracker directory, sets up default settings, and shows a quick-start summary. Accepts an optional project name as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Initialize pm project tracking using native MCP tools. Argument: `$ARGUMENTS` (optional project name).
|
|
6
|
+
|
|
7
|
+
1. **Check if already initialized** — look for `.agents/pm/settings.json` in the current directory:
|
|
8
|
+
```json
|
|
9
|
+
{ "tool": "pm_health", "args": {} }
|
|
10
|
+
```
|
|
11
|
+
If health returns `ok: true`, pm is already initialized — show the current status with `pm_context` and stop.
|
|
12
|
+
|
|
13
|
+
2. **Run init** via `pm_run`:
|
|
14
|
+
```json
|
|
15
|
+
{ "tool": "pm_run", "args": { "action": "init", "options": {} } }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. **Verify initialization** — call `pm_health` again to confirm `ok: true`.
|
|
19
|
+
|
|
20
|
+
4. **Create a first item** (optional) — if `$ARGUMENTS` is a project name or description, offer to create an initial Epic:
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"tool": "pm_create",
|
|
24
|
+
"args": {
|
|
25
|
+
"author": "claude-code-agent",
|
|
26
|
+
"options": {
|
|
27
|
+
"title": "<project name> — initial setup",
|
|
28
|
+
"type": "Epic",
|
|
29
|
+
"status": "open",
|
|
30
|
+
"priority": "1",
|
|
31
|
+
"description": "Top-level epic for tracking <project name> work.",
|
|
32
|
+
"createMode": "progressive"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
5. **Show quick-start summary**:
|
|
39
|
+
- pm initialized at `.agents/pm/`
|
|
40
|
+
- Available slash commands: `/pm-status`, `/pm-new`, `/pm-start-task`, `/pm-close-task`, `/pm-list`, `/pm-search`, `/pm-triage`, `/pm-calendar`, `/pm-developer`, `/pm-planner`, `/pm-release`, `/pm-audit`, `/pm-workflow`
|
|
41
|
+
- All 18 MCP tools available: `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`, `pm_run`
|
|
42
|
+
- Next: use `/pm-new <title>` to create your first item, or `/pm-status` to see the tracker state
|
|
43
|
+
|
|
44
|
+
If initialization fails, report the error and suggest running `pm init` manually in the terminal.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List pm items with optional status or type filter. Pass a filter like "open", "in_progress", "blocked", "bugs", or leave empty for active items.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
List pm items using native MCP tools. Filter: `$ARGUMENTS`
|
|
6
|
+
|
|
7
|
+
1. **Parse filter** from `$ARGUMENTS`:
|
|
8
|
+
- Status keywords: `open`, `in_progress`, `in-progress`, `blocked`, `draft`, `closed`, `canceled`, `all`
|
|
9
|
+
- Type keywords: `task`, `bug`, `feature`, `epic`, `story`
|
|
10
|
+
- Combined: e.g. "open bugs", "blocked features"
|
|
11
|
+
- Empty: show active items (excludes closed/canceled)
|
|
12
|
+
|
|
13
|
+
2. **Call `pm_list`** with the parsed filter:
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"tool": "pm_list",
|
|
17
|
+
"args": {
|
|
18
|
+
"options": {
|
|
19
|
+
"status": "<parsed status or omit>",
|
|
20
|
+
"type": "<parsed type or omit>",
|
|
21
|
+
"limit": "25"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
For `all`, use `pm_list` with no status filter.
|
|
27
|
+
|
|
28
|
+
3. **If filter is empty** (active items) — also call `pm_context` for a richer summary:
|
|
29
|
+
```json
|
|
30
|
+
{ "tool": "pm_context", "args": { "options": { "limit": "10" } } }
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. **Present results** — format as a table or grouped list:
|
|
34
|
+
| ID | Title | Status | Type | Priority |
|
|
35
|
+
|----|-------|--------|------|----------|
|
|
36
|
+
|
|
37
|
+
5. **Show counts** — summarize: "X open, Y in_progress, Z blocked" at the top.
|
|
38
|
+
|
|
39
|
+
Keep the response under 400 words unless there are many items to show.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quickly create a new pm item — duplicate-checks first, then creates with sensible defaults. Pass a title (or title + description) as argument.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Create a new pm item using native MCP tools. Input: `$ARGUMENTS`
|
|
6
|
+
|
|
7
|
+
1. **Parse input** — treat `$ARGUMENTS` as the item title. If it contains a pipe (`|`) or newline, split into title | description.
|
|
8
|
+
2. **Duplicate check** — call `pm_search` with the title keywords:
|
|
9
|
+
```json
|
|
10
|
+
{ "tool": "pm_search", "args": { "query": "$ARGUMENTS", "options": { "limit": "5" } } }
|
|
11
|
+
```
|
|
12
|
+
If a close match exists, show it and ask: "Is this a duplicate, or is this a new separate item?"
|
|
13
|
+
3. **Get context** — call `pm_context` to understand current workload before creating:
|
|
14
|
+
```json
|
|
15
|
+
{ "tool": "pm_context", "args": { "options": { "limit": "5" } } }
|
|
16
|
+
```
|
|
17
|
+
4. **Create** — if no duplicate and user confirms, call `pm_create`:
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"tool": "pm_create",
|
|
21
|
+
"args": {
|
|
22
|
+
"author": "claude-code-agent",
|
|
23
|
+
"options": {
|
|
24
|
+
"title": "<from $ARGUMENTS>",
|
|
25
|
+
"description": "<inferred or from input>",
|
|
26
|
+
"type": "Task",
|
|
27
|
+
"status": "open",
|
|
28
|
+
"priority": "2",
|
|
29
|
+
"createMode": "progressive"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
5. **Report** — show the created item ID, title, and ask if it should be claimed immediately.
|
|
35
|
+
|
|
36
|
+
If `$ARGUMENTS` is empty, ask for the title interactively before creating.
|
|
@@ -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,120 @@
|
|
|
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. Uses native pm modules when available (repo checkout
|
|
7
|
+
* or dist/); falls back to npx @unbrained/pm-cli without requiring the CLI to
|
|
8
|
+
* be installed globally. Exits silently if pm is not set up.
|
|
9
|
+
*/
|
|
10
|
+
import { access } from "node:fs/promises";
|
|
11
|
+
import { existsSync } from "node:fs";
|
|
12
|
+
import { join, resolve, dirname } from "node:path";
|
|
13
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
14
|
+
import { execSync } from "node:child_process";
|
|
15
|
+
|
|
16
|
+
const workspace = process.cwd();
|
|
17
|
+
const pmSettingsPath = join(workspace, ".agents", "pm", "settings.json");
|
|
18
|
+
|
|
19
|
+
if (!existsSync(pmSettingsPath)) {
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
|
|
25
|
+
async function pathExists(target) {
|
|
26
|
+
try {
|
|
27
|
+
await access(target);
|
|
28
|
+
return true;
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function findNativeModule() {
|
|
35
|
+
let cursor = here;
|
|
36
|
+
for (let depth = 0; depth < 10; depth += 1) {
|
|
37
|
+
const candidate = join(cursor, "dist", "pi", "native.js");
|
|
38
|
+
if (await pathExists(candidate)) {
|
|
39
|
+
return candidate;
|
|
40
|
+
}
|
|
41
|
+
const parent = dirname(cursor);
|
|
42
|
+
if (parent === cursor) break;
|
|
43
|
+
cursor = parent;
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function formatSummary(ctx) {
|
|
49
|
+
const { summary } = ctx;
|
|
50
|
+
if (!summary) return null;
|
|
51
|
+
|
|
52
|
+
const parts = [];
|
|
53
|
+
if (summary.in_progress > 0) parts.push(`${summary.in_progress} in_progress`);
|
|
54
|
+
if (summary.open > 0) parts.push(`${summary.open} open`);
|
|
55
|
+
if (summary.blocked > 0) parts.push(`${summary.blocked} BLOCKED`);
|
|
56
|
+
|
|
57
|
+
if (parts.length === 0) return null;
|
|
58
|
+
|
|
59
|
+
const topItems = [...(ctx.high_level ?? []), ...(ctx.low_level ?? [])].slice(0, 3);
|
|
60
|
+
const itemLines = topItems
|
|
61
|
+
.map((item) => ` • [${item.id}] ${item.title} (${item.status})`)
|
|
62
|
+
.join("\n");
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
`pm tracker: ${parts.join(", ")}\n` +
|
|
66
|
+
(itemLines ? `${itemLines}\n` : "") +
|
|
67
|
+
`Use pm_context tool or /pm-status for full details.\n`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function tryNativeContext() {
|
|
72
|
+
const nativePath = await findNativeModule();
|
|
73
|
+
if (!nativePath) return null;
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
const { runNativePmAction } = await import(pathToFileURL(nativePath).href);
|
|
77
|
+
const result = await runNativePmAction({
|
|
78
|
+
action: "context",
|
|
79
|
+
cwd: workspace,
|
|
80
|
+
json: true,
|
|
81
|
+
options: { limit: "5" },
|
|
82
|
+
});
|
|
83
|
+
const text = Array.isArray(result?.content)
|
|
84
|
+
? result.content.find((p) => p?.type === "text")?.text ?? ""
|
|
85
|
+
: typeof result === "string"
|
|
86
|
+
? result
|
|
87
|
+
: JSON.stringify(result);
|
|
88
|
+
return JSON.parse(text);
|
|
89
|
+
} catch {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function tryNpxContext() {
|
|
95
|
+
try {
|
|
96
|
+
const raw = execSync(
|
|
97
|
+
"npx -y --package=@unbrained/pm-cli@latest pm context --limit 5 --json",
|
|
98
|
+
{
|
|
99
|
+
cwd: workspace,
|
|
100
|
+
encoding: "utf-8",
|
|
101
|
+
timeout: 15000,
|
|
102
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
103
|
+
},
|
|
104
|
+
);
|
|
105
|
+
return JSON.parse(raw);
|
|
106
|
+
} catch {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const ctx = (await tryNativeContext()) ?? tryNpxContext();
|
|
113
|
+
if (!ctx) process.exit(0);
|
|
114
|
+
|
|
115
|
+
const message = formatSummary(ctx);
|
|
116
|
+
if (message) process.stdout.write(message);
|
|
117
|
+
} catch {
|
|
118
|
+
// Any failure: exit silently
|
|
119
|
+
process.exit(0);
|
|
120
|
+
}
|
|
@@ -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`.
|