@unbrained/pm-cli 2026.5.14 → 2026.5.24
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/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +78 -457
- package/CHANGELOG.md +71 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +8 -6
- package/dist/cli/argv-utils.js +4 -1
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.js +4 -1
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +19 -1
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +4 -1
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.js +5 -2
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/annotation-command.d.ts +49 -0
- package/dist/cli/commands/annotation-command.js +135 -0
- package/dist/cli/commands/annotation-command.js.map +1 -0
- package/dist/cli/commands/append.js +5 -6
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/calendar.js +5 -5
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.d.ts +3 -0
- package/dist/cli/commands/claim.js +29 -23
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +63 -8
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +4 -1
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +5 -0
- package/dist/cli/commands/comments.js +29 -116
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +198 -15
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.js +4 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.js +21 -13
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +9 -0
- package/dist/cli/commands/contracts.js +314 -64
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +77 -48
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +9 -3
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/delete.d.ts +3 -0
- package/dist/cli/commands/delete.js +11 -7
- package/dist/cli/commands/delete.js.map +1 -1
- package/dist/cli/commands/deps.js +4 -1
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/docs.d.ts +1 -0
- package/dist/cli/commands/docs.js +6 -7
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/event-validation-messages.d.ts +3 -0
- package/dist/cli/commands/event-validation-messages.js +44 -0
- package/dist/cli/commands/event-validation-messages.js.map +1 -0
- package/dist/cli/commands/extension.d.ts +3 -1
- package/dist/cli/commands/extension.js +259 -52
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +8 -12
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/gc.js +19 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +10 -5
- package/dist/cli/commands/get.js +135 -20
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.js +6 -8
- package/dist/cli/commands/guide.js.map +1 -1
- package/dist/cli/commands/health.d.ts +14 -0
- package/dist/cli/commands/health.js +269 -67
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +50 -0
- package/dist/cli/commands/history-redact.js +476 -0
- package/dist/cli/commands/history-redact.js.map +1 -0
- package/dist/cli/commands/history-repair.d.ts +33 -0
- package/dist/cli/commands/history-repair.js +166 -0
- package/dist/cli/commands/history-repair.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -0
- package/dist/cli/commands/history.js +12 -79
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +5 -1
- package/dist/cli/commands/index.js +9 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +31 -0
- package/dist/cli/commands/init-agent-guidance.js +336 -0
- package/dist/cli/commands/init-agent-guidance.js.map +1 -0
- package/dist/cli/commands/init.d.ts +42 -0
- package/dist/cli/commands/init.js +96 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +22 -118
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/linked-test-entry.d.ts +3 -0
- package/dist/cli/commands/linked-test-entry.js +62 -0
- package/dist/cli/commands/linked-test-entry.js.map +1 -0
- package/dist/cli/commands/list.d.ts +1 -0
- package/dist/cli/commands/list.js +72 -38
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/metadata-normalizers.js +4 -1
- package/dist/cli/commands/metadata-normalizers.js.map +1 -1
- package/dist/cli/commands/normalize.js +4 -1
- package/dist/cli/commands/normalize.js.map +1 -1
- package/dist/cli/commands/notes.js +22 -118
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +121 -0
- package/dist/cli/commands/plan.js +1137 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/reindex.js +4 -1
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +9 -49
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +31 -0
- package/dist/cli/commands/schema.js +98 -0
- package/dist/cli/commands/schema.js.map +1 -0
- package/dist/cli/commands/search.js +156 -40
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.js +4 -1
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/templates.d.ts +4 -0
- package/dist/cli/commands/templates.js +91 -16
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/commands/test-all.js +6 -7
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test-runs.js +4 -1
- package/dist/cli/commands/test-runs.js.map +1 -1
- package/dist/cli/commands/test.d.ts +1 -0
- package/dist/cli/commands/test.js +9 -9
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +6 -7
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.js +204 -103
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.js +6 -3
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +3 -1
- package/dist/cli/commands/validate.js +44 -64
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +99 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +0 -1
- package/dist/cli/extension-command-help.js +4 -12
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.d.ts +1 -0
- package/dist/cli/extension-command-options.js +108 -6
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/guide-topics.js +4 -1
- package/dist/cli/guide-topics.js.map +1 -1
- package/dist/cli/help-content.d.ts +0 -1
- package/dist/cli/help-content.js +46 -22
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.d.ts +1 -0
- package/dist/cli/help-json-payload.js +35 -2
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +214 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migration-gates.js +4 -1
- package/dist/cli/migration-gates.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +75 -29
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.d.ts +1 -1
- package/dist/cli/register-mutation.js +430 -38
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +47 -10
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +47 -25
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +0 -2
- package/dist/cli/registration-helpers.js +21 -40
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/shared-parsers.js +4 -1
- package/dist/cli/shared-parsers.js.map +1 -1
- package/dist/cli/telemetry-flush.js +4 -1
- package/dist/cli/telemetry-flush.js.map +1 -1
- package/dist/cli.js +65 -3
- package/dist/cli.js.map +1 -1
- package/dist/core/extensions/extension-types.js +4 -1
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +0 -1
- package/dist/core/extensions/index.js +4 -13
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.js +4 -1
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +78 -60
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runtime-registrations.js +4 -1
- package/dist/core/extensions/runtime-registrations.js.map +1 -1
- package/dist/core/fs/fs-utils.js +4 -1
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/fs/index.js +4 -1
- package/dist/core/fs/index.js.map +1 -1
- package/dist/core/fs/path-utils.d.ts +1 -0
- package/dist/core/fs/path-utils.js +12 -0
- package/dist/core/fs/path-utils.js.map +1 -0
- package/dist/core/history/drift-scan.d.ts +11 -0
- package/dist/core/history/drift-scan.js +67 -0
- package/dist/core/history/drift-scan.js.map +1 -0
- package/dist/core/history/history-stream-policy.js +4 -1
- package/dist/core/history/history-stream-policy.js.map +1 -1
- package/dist/core/history/history.js +4 -1
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/history/index.js +4 -1
- package/dist/core/history/index.js.map +1 -1
- package/dist/core/history/replay.d.ts +82 -0
- package/dist/core/history/replay.js +249 -0
- package/dist/core/history/replay.js.map +1 -0
- package/dist/core/item/id.js +4 -1
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/index.js +4 -1
- package/dist/core/item/index.js.map +1 -1
- package/dist/core/item/item-format.js +250 -8
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/item-type-definition.d.ts +52 -0
- package/dist/core/item/item-type-definition.js +123 -0
- package/dist/core/item/item-type-definition.js.map +1 -0
- package/dist/core/item/parent-reference-policy.js +4 -1
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/item/parse.js +34 -3
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/item/priority.d.ts +23 -0
- package/dist/core/item/priority.js +55 -0
- package/dist/core/item/priority.js.map +1 -0
- package/dist/core/item/sprint-release-format.js +4 -1
- package/dist/core/item/sprint-release-format.js.map +1 -1
- package/dist/core/item/status.d.ts +14 -1
- package/dist/core/item/status.js +24 -1
- package/dist/core/item/status.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +19 -0
- package/dist/core/item/toon-decode.js +69 -0
- package/dist/core/item/toon-decode.js.map +1 -0
- package/dist/core/item/type-registry.js +15 -83
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/index.js +4 -1
- package/dist/core/lock/index.js.map +1 -1
- package/dist/core/lock/lock.js +4 -1
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/output/output.d.ts +4 -0
- package/dist/core/output/output.js +47 -6
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/packages/manifest.d.ts +1 -0
- package/dist/core/packages/manifest.js +6 -8
- package/dist/core/packages/manifest.js.map +1 -1
- package/dist/core/packages/root.d.ts +3 -0
- package/dist/core/packages/root.js +51 -0
- package/dist/core/packages/root.js.map +1 -0
- package/dist/core/schema/item-types-file.d.ts +85 -0
- package/dist/core/schema/item-types-file.js +243 -0
- package/dist/core/schema/item-types-file.js.map +1 -0
- package/dist/core/schema/runtime-field-filters.js +4 -1
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.js +4 -1
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +2 -1
- package/dist/core/schema/runtime-schema.js +13 -8
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.js +7 -2
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +2 -0
- package/dist/core/search/corpus.js +77 -2
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +21 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/http-client.js +4 -1
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/providers.js +4 -1
- package/dist/core/search/providers.js.map +1 -1
- package/dist/core/search/semantic-defaults.js +12 -3
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.js +4 -1
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/helpers.js +4 -1
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/sentry/instrument.js +10 -13
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/author.d.ts +1 -0
- package/dist/core/shared/author.js +9 -0
- package/dist/core/shared/author.js.map +1 -0
- package/dist/core/shared/command-types.js +4 -1
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/conflict-markers.js +4 -1
- package/dist/core/shared/conflict-markers.js.map +1 -1
- package/dist/core/shared/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +24 -1
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.js +4 -1
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/index.js +4 -1
- package/dist/core/shared/index.js.map +1 -1
- package/dist/core/shared/lazy-module.d.ts +1 -0
- package/dist/core/shared/lazy-module.js +11 -0
- package/dist/core/shared/lazy-module.js.map +1 -0
- package/dist/core/shared/levenshtein.js +4 -1
- package/dist/core/shared/levenshtein.js.map +1 -1
- package/dist/core/shared/option-alias-visibility.d.ts +44 -0
- package/dist/core/shared/option-alias-visibility.js +76 -0
- package/dist/core/shared/option-alias-visibility.js.map +1 -0
- package/dist/core/shared/primitives.js +4 -1
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/serialization.js +4 -1
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/shared/text-normalization.d.ts +0 -1
- package/dist/core/shared/text-normalization.js +4 -4
- package/dist/core/shared/text-normalization.js.map +1 -1
- package/dist/core/shared/time.js +4 -1
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +8 -3
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/index.js +4 -1
- package/dist/core/store/index.js.map +1 -1
- package/dist/core/store/item-format-migration.js +4 -1
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.d.ts +4 -0
- package/dist/core/store/item-store.js +133 -39
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +4 -1
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +106 -0
- package/dist/core/store/settings-validator.js +279 -0
- package/dist/core/store/settings-validator.js.map +1 -0
- package/dist/core/store/settings.js +32 -331
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +4 -1
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.d.ts +1 -1
- package/dist/core/telemetry/observability.js +11 -2
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +34 -6
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.js +4 -1
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/test/item-test-run-tracking.js +4 -1
- package/dist/core/test/item-test-run-tracking.js.map +1 -1
- package/dist/mcp/server.js +182 -22
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +10 -3
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +4 -1
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +13 -2
- package/dist/sdk/cli-contracts.js +410 -26
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.js +4 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +25 -1
- package/dist/sdk/runtime.js +48 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types.d.ts +92 -2
- package/dist/types.js +42 -1
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +23 -7
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +10 -10
- package/docs/CODEX_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +117 -12
- package/docs/CONFIGURATION.md +5 -2
- package/docs/EXTENSIONS.md +158 -814
- package/docs/QUICKSTART.md +11 -5
- package/docs/README.md +7 -6
- package/docs/RELEASING.md +13 -9
- package/docs/SDK.md +11 -2
- package/docs/TESTING.md +2 -2
- package/marketplace.json +3 -3
- package/package.json +15 -12
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/README.md +4 -2
- package/packages/pm-calendar/extensions/calendar/index.js +22 -3
- package/packages/pm-calendar/extensions/calendar/index.ts +22 -3
- package/packages/pm-calendar/extensions/calendar/runtime.js +26 -7
- package/packages/pm-calendar/extensions/calendar/runtime.ts +26 -7
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/README.md +8 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +74 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +75 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +67 -9
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +67 -9
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/README.md +1 -1
- package/packages/pm-templates/extensions/templates/runtime.js +11 -202
- package/packages/pm-templates/extensions/templates/runtime.ts +38 -230
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/{pm-cli-claude → pm-claude}/.claude-plugin/plugin.json +2 -2
- package/plugins/{pm-cli-claude → pm-claude}/.mcp.json +1 -1
- package/plugins/{pm-cli-claude → pm-claude}/README.md +4 -4
- package/plugins/{pm-cli-claude → pm-claude}/agents/pm-coordinator.md +1 -1
- package/plugins/{pm-cli-claude → pm-claude}/commands/pm-init.md +10 -1
- package/plugins/{pm-cli-claude → pm-claude}/commands/pm-planner.md +18 -0
- package/plugins/{pm-cli-claude → pm-claude}/skills/pm-planner/SKILL.md +46 -1
- package/plugins/{pm-cli-codex → pm-codex}/.codex-plugin/plugin.json +3 -3
- package/plugins/{pm-cli-codex → pm-codex}/.mcp.json +1 -1
- package/plugins/{pm-cli-codex → pm-codex}/README.md +7 -4
- package/plugins/pm-codex/skills/pm-native/SKILL.md +81 -0
- package/scripts/finalize-build.mjs +28 -0
- package/scripts/prepare-build-cache.mjs +37 -0
- package/dist/core/output/command-aware.d.ts +0 -1
- package/dist/core/output/command-aware.js +0 -394
- package/dist/core/output/command-aware.js.map +0 -1
- package/plugins/pm-cli-codex/skills/pm-native/SKILL.md +0 -57
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-delivery-chain.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-triage-agent.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/agents/pm-verification-agent.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-audit.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-calendar.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-close-task.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-developer.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-list.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-new.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-release.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-search.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-start-task.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-status.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-triage.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/commands/pm-workflow.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/hooks/hooks.json +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/hooks/session-start.mjs +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/scripts/pm-mcp-server.mjs +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-audit/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-developer/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-release/SKILL.md +0 -0
- /package/plugins/{pm-cli-claude → pm-claude}/skills/pm-workflow/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/assets/pm-cli-small.svg +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-audit.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-close-task.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/commands/pm-start-task.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/scripts/pm-mcp-server.mjs +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-auditor/agents/openai.yaml +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-native/agents/openai.yaml +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/SKILL.md +0 -0
- /package/plugins/{pm-cli-codex → pm-codex}/skills/pm-release/agents/openai.yaml +0 -0
|
@@ -1,81 +1,12 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import { pathToFileURL } from "node:url";
|
|
4
3
|
import type { GlobalOptions } from "../../../../src/sdk/index.js";
|
|
5
4
|
|
|
6
5
|
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
7
6
|
|
|
8
|
-
interface TemplatesSdkModule {
|
|
9
|
-
CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS: Array<{ target: string }>;
|
|
10
|
-
EXIT_CODE: {
|
|
11
|
-
USAGE: number;
|
|
12
|
-
NOT_FOUND: number;
|
|
13
|
-
GENERIC_FAILURE: number;
|
|
14
|
-
};
|
|
15
|
-
PmCliError: new (message: string, exitCode?: number) => Error;
|
|
16
|
-
getSettingsPath: (pmRoot: string) => string;
|
|
17
|
-
nowIso: () => string;
|
|
18
|
-
pathExists: (targetPath: string) => Promise<boolean>;
|
|
19
|
-
readFileIfExists: (targetPath: string) => Promise<string | null>;
|
|
20
|
-
resolvePmRoot: (cwd: string, overridePath?: string) => string;
|
|
21
|
-
writeFileAtomic: (targetPath: string, contents: string) => Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const sdk = await loadTemplatesSdkModule();
|
|
25
|
-
const {
|
|
26
|
-
CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
27
|
-
EXIT_CODE,
|
|
28
|
-
PmCliError,
|
|
29
|
-
getSettingsPath,
|
|
30
|
-
nowIso,
|
|
31
|
-
pathExists,
|
|
32
|
-
readFileIfExists,
|
|
33
|
-
resolvePmRoot,
|
|
34
|
-
writeFileAtomic,
|
|
35
|
-
} = sdk;
|
|
36
|
-
|
|
37
|
-
async function loadTemplatesSdkModule(): Promise<TemplatesSdkModule> {
|
|
38
|
-
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
39
|
-
if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
|
|
40
|
-
throw new Error(
|
|
41
|
-
`builtin-templates requires ${PM_PACKAGE_ROOT_ENV} to locate core SDK runtime exports.`,
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
const modulePath = path.join(path.resolve(envRoot.trim()), "dist", "sdk", "index.js");
|
|
45
|
-
try {
|
|
46
|
-
const loaded = (await import(pathToFileURL(modulePath).href)) as Partial<TemplatesSdkModule>;
|
|
47
|
-
if (
|
|
48
|
-
typeof loaded.resolvePmRoot === "function" &&
|
|
49
|
-
typeof loaded.pathExists === "function" &&
|
|
50
|
-
typeof loaded.PmCliError === "function" &&
|
|
51
|
-
Array.isArray(loaded.CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS)
|
|
52
|
-
) {
|
|
53
|
-
return loaded as TemplatesSdkModule;
|
|
54
|
-
}
|
|
55
|
-
} catch {
|
|
56
|
-
// Fall through to deterministic failure message below.
|
|
57
|
-
}
|
|
58
|
-
throw new Error(
|
|
59
|
-
`builtin-templates failed to load SDK runtime exports from ${modulePath}.`,
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const TEMPLATE_DIRECTORY_NAME = "templates";
|
|
64
|
-
const TEMPLATE_FILE_EXTENSION = ".json";
|
|
65
|
-
const TEMPLATE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
66
|
-
const TEMPLATE_OPTION_REPEATABLE_KEYS = CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS.map((entry) => entry.target);
|
|
67
|
-
const TEMPLATE_OPTION_REPEATABLE_KEY_SET = new Set<string>(TEMPLATE_OPTION_REPEATABLE_KEYS);
|
|
68
|
-
|
|
69
7
|
type TemplateOptionValue = string | string[];
|
|
70
8
|
export type CreateTemplateOptions = Record<string, TemplateOptionValue>;
|
|
71
9
|
|
|
72
|
-
interface StoredCreateTemplateDocument {
|
|
73
|
-
name: string;
|
|
74
|
-
created_at: string;
|
|
75
|
-
updated_at: string;
|
|
76
|
-
options: CreateTemplateOptions;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
10
|
export interface TemplatesSaveResult {
|
|
80
11
|
name: string;
|
|
81
12
|
created_at: string;
|
|
@@ -87,128 +18,60 @@ export interface TemplatesSaveResult {
|
|
|
87
18
|
export interface TemplatesListResult {
|
|
88
19
|
templates: string[];
|
|
89
20
|
count: number;
|
|
21
|
+
builtin_templates: string[];
|
|
22
|
+
user_templates: string[];
|
|
90
23
|
}
|
|
91
24
|
|
|
92
25
|
export interface TemplatesShowResult {
|
|
93
26
|
name: string;
|
|
27
|
+
source: "builtin" | "user";
|
|
94
28
|
created_at: string;
|
|
95
29
|
updated_at: string;
|
|
96
30
|
path: string;
|
|
97
31
|
options: CreateTemplateOptions;
|
|
98
32
|
}
|
|
99
33
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function templatesDirectory(pmRoot: string): string {
|
|
112
|
-
return path.join(pmRoot, TEMPLATE_DIRECTORY_NAME);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function templatePath(pmRoot: string, normalizedName: string): string {
|
|
116
|
-
return path.join(templatesDirectory(pmRoot), `${normalizedName}${TEMPLATE_FILE_EXTENSION}`);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
async function ensureTrackerInitialized(pmRoot: string): Promise<void> {
|
|
120
|
-
if (!(await pathExists(getSettingsPath(pmRoot)))) {
|
|
121
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function sortTemplateOptions(options: CreateTemplateOptions): CreateTemplateOptions {
|
|
126
|
-
return Object.fromEntries(
|
|
127
|
-
Object.entries(options).sort(([left], [right]) => left.localeCompare(right)),
|
|
128
|
-
) as CreateTemplateOptions;
|
|
34
|
+
interface TemplatesSdkModule {
|
|
35
|
+
loadCreateTemplateOptions: (pmRoot: string, rawTemplateName: string) => Promise<CreateTemplateOptions>;
|
|
36
|
+
runTemplatesList: (global: GlobalOptions) => Promise<TemplatesListResult>;
|
|
37
|
+
runTemplatesSave: (
|
|
38
|
+
rawTemplateName: string,
|
|
39
|
+
options: Record<string, unknown>,
|
|
40
|
+
global: GlobalOptions,
|
|
41
|
+
) => Promise<TemplatesSaveResult>;
|
|
42
|
+
runTemplatesShow: (rawTemplateName: string, global: GlobalOptions) => Promise<TemplatesShowResult>;
|
|
129
43
|
}
|
|
130
44
|
|
|
131
|
-
|
|
132
|
-
const next: CreateTemplateOptions = {};
|
|
133
|
-
for (const [key, value] of Object.entries(rawOptions)) {
|
|
134
|
-
if (value === undefined) {
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (TEMPLATE_OPTION_REPEATABLE_KEY_SET.has(key)) {
|
|
138
|
-
if (typeof value === "string") {
|
|
139
|
-
next[key] = [value];
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
if (!Array.isArray(value)) {
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
const values = value.filter((entry): entry is string => typeof entry === "string");
|
|
146
|
-
if (values.length > 0) {
|
|
147
|
-
next[key] = values;
|
|
148
|
-
}
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if (typeof value === "string") {
|
|
152
|
-
next[key] = value;
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
if (Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
|
|
156
|
-
next[key] = [...value];
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return sortTemplateOptions(next);
|
|
160
|
-
}
|
|
45
|
+
const sdk = await loadTemplatesSdkModule();
|
|
161
46
|
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const normalizedKey = key.trim();
|
|
169
|
-
if (normalizedKey.length === 0) {
|
|
170
|
-
throw new PmCliError(`Template "${templateName}" contains an empty option key.`, EXIT_CODE.GENERIC_FAILURE);
|
|
171
|
-
}
|
|
172
|
-
if (typeof value === "string") {
|
|
173
|
-
normalized[normalizedKey] = value;
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
if (Array.isArray(value) && value.every((entry) => typeof entry === "string")) {
|
|
177
|
-
normalized[normalizedKey] = [...value];
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
throw new PmCliError(`Template "${templateName}" contains invalid value for option "${normalizedKey}".`, EXIT_CODE.GENERIC_FAILURE);
|
|
47
|
+
async function loadTemplatesSdkModule(): Promise<TemplatesSdkModule> {
|
|
48
|
+
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
49
|
+
if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
`builtin-templates requires ${PM_PACKAGE_ROOT_ENV} to locate core SDK runtime exports.`,
|
|
52
|
+
);
|
|
181
53
|
}
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function parseStoredTemplateDocument(raw: string, normalizedName: string): StoredCreateTemplateDocument {
|
|
186
|
-
let parsed: unknown;
|
|
54
|
+
const modulePath = path.join(path.resolve(envRoot.trim()), "dist", "sdk", "index.js");
|
|
187
55
|
try {
|
|
188
|
-
|
|
56
|
+
const loaded = (await import(pathToFileURL(modulePath).href)) as Partial<TemplatesSdkModule>;
|
|
57
|
+
if (
|
|
58
|
+
typeof loaded.loadCreateTemplateOptions === "function" &&
|
|
59
|
+
typeof loaded.runTemplatesList === "function" &&
|
|
60
|
+
typeof loaded.runTemplatesSave === "function" &&
|
|
61
|
+
typeof loaded.runTemplatesShow === "function"
|
|
62
|
+
) {
|
|
63
|
+
return loaded as TemplatesSdkModule;
|
|
64
|
+
}
|
|
189
65
|
} catch {
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
193
|
-
throw new PmCliError(`Template "${normalizedName}" has invalid document shape.`, EXIT_CODE.GENERIC_FAILURE);
|
|
66
|
+
// Fall through to deterministic failure message below.
|
|
194
67
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return {
|
|
199
|
-
name: typeof record.name === "string" && record.name.trim().length > 0 ? record.name.trim() : normalizedName,
|
|
200
|
-
created_at: typeof record.created_at === "string" ? record.created_at : now,
|
|
201
|
-
updated_at: typeof record.updated_at === "string" ? record.updated_at : now,
|
|
202
|
-
options,
|
|
203
|
-
};
|
|
68
|
+
throw new Error(
|
|
69
|
+
`builtin-templates failed to load template runtime exports from ${modulePath}.`,
|
|
70
|
+
);
|
|
204
71
|
}
|
|
205
72
|
|
|
206
|
-
async function
|
|
207
|
-
|
|
208
|
-
if (raw === null) {
|
|
209
|
-
throw new PmCliError(`Template "${normalizedName}" not found`, EXIT_CODE.NOT_FOUND);
|
|
210
|
-
}
|
|
211
|
-
return parseStoredTemplateDocument(raw, normalizedName);
|
|
73
|
+
export async function loadCreateTemplateOptions(pmRoot: string, rawTemplateName: string): Promise<CreateTemplateOptions> {
|
|
74
|
+
return sdk.loadCreateTemplateOptions(pmRoot, rawTemplateName);
|
|
212
75
|
}
|
|
213
76
|
|
|
214
77
|
export async function runTemplatesSave(
|
|
@@ -216,68 +79,13 @@ export async function runTemplatesSave(
|
|
|
216
79
|
options: Record<string, unknown>,
|
|
217
80
|
global: GlobalOptions,
|
|
218
81
|
): Promise<TemplatesSaveResult> {
|
|
219
|
-
|
|
220
|
-
await ensureTrackerInitialized(pmRoot);
|
|
221
|
-
const normalizedName = normalizeTemplateName(rawTemplateName);
|
|
222
|
-
const nextOptions = extractTemplateOptions(options);
|
|
223
|
-
if (Object.keys(nextOptions).length === 0) {
|
|
224
|
-
throw new PmCliError("templates save requires at least one create option flag", EXIT_CODE.USAGE);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
const now = nowIso();
|
|
228
|
-
const storedPath = templatePath(pmRoot, normalizedName);
|
|
229
|
-
let createdAt = now;
|
|
230
|
-
if (await pathExists(storedPath)) {
|
|
231
|
-
const existing = await readStoredTemplateDocument(pmRoot, normalizedName);
|
|
232
|
-
createdAt = existing.created_at;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const document: StoredCreateTemplateDocument = {
|
|
236
|
-
name: normalizedName,
|
|
237
|
-
created_at: createdAt,
|
|
238
|
-
updated_at: now,
|
|
239
|
-
options: nextOptions,
|
|
240
|
-
};
|
|
241
|
-
await fs.mkdir(templatesDirectory(pmRoot), { recursive: true });
|
|
242
|
-
await writeFileAtomic(storedPath, `${JSON.stringify(document, null, 2)}\n`);
|
|
243
|
-
return {
|
|
244
|
-
name: document.name,
|
|
245
|
-
created_at: document.created_at,
|
|
246
|
-
updated_at: document.updated_at,
|
|
247
|
-
path: storedPath,
|
|
248
|
-
options: document.options,
|
|
249
|
-
};
|
|
82
|
+
return sdk.runTemplatesSave(rawTemplateName, options, global);
|
|
250
83
|
}
|
|
251
84
|
|
|
252
85
|
export async function runTemplatesList(global: GlobalOptions): Promise<TemplatesListResult> {
|
|
253
|
-
|
|
254
|
-
await ensureTrackerInitialized(pmRoot);
|
|
255
|
-
const dirPath = templatesDirectory(pmRoot);
|
|
256
|
-
if (!(await pathExists(dirPath))) {
|
|
257
|
-
return { templates: [], count: 0 };
|
|
258
|
-
}
|
|
259
|
-
const entries = await fs.readdir(dirPath);
|
|
260
|
-
const templates = entries
|
|
261
|
-
.filter((entry) => entry.toLowerCase().endsWith(TEMPLATE_FILE_EXTENSION))
|
|
262
|
-
.map((entry) => entry.slice(0, -TEMPLATE_FILE_EXTENSION.length))
|
|
263
|
-
.filter((entry) => TEMPLATE_NAME_PATTERN.test(entry))
|
|
264
|
-
.sort((left, right) => left.localeCompare(right));
|
|
265
|
-
return {
|
|
266
|
-
templates,
|
|
267
|
-
count: templates.length,
|
|
268
|
-
};
|
|
86
|
+
return sdk.runTemplatesList(global);
|
|
269
87
|
}
|
|
270
88
|
|
|
271
89
|
export async function runTemplatesShow(rawTemplateName: string, global: GlobalOptions): Promise<TemplatesShowResult> {
|
|
272
|
-
|
|
273
|
-
await ensureTrackerInitialized(pmRoot);
|
|
274
|
-
const normalizedName = normalizeTemplateName(rawTemplateName);
|
|
275
|
-
const stored = await readStoredTemplateDocument(pmRoot, normalizedName);
|
|
276
|
-
return {
|
|
277
|
-
name: stored.name,
|
|
278
|
-
created_at: stored.created_at,
|
|
279
|
-
updated_at: stored.updated_at,
|
|
280
|
-
path: templatePath(pmRoot, normalizedName),
|
|
281
|
-
options: stored.options,
|
|
282
|
-
};
|
|
90
|
+
return sdk.runTemplatesShow(rawTemplateName, global);
|
|
283
91
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "pm-
|
|
2
|
+
"name": "pm-claude",
|
|
3
3
|
"description": "Native pm CLI integration for Claude Code — 18 MCP tools, 5 workflow skills, 14 slash commands, 3 subagents (coordinator, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "unbrained",
|
|
7
7
|
"url": "https://github.com/unbraind/pm-cli"
|
|
@@ -6,7 +6,7 @@ Native pm CLI integration for Claude Code. Use pm project management tools direc
|
|
|
6
6
|
|
|
7
7
|
| Component | What it provides |
|
|
8
8
|
|-----------|----------------|
|
|
9
|
-
| **18 MCP tools** | Full pm surface: context, search, list, get, create, update, claim, release, close, comments, files, docs, test, validate, health, contracts,
|
|
9
|
+
| **18 MCP tools** | Full pm surface: context, search, list, get, create, update, claim, release, close, comments, files, docs, test, validate, health, contracts, plan + `pm_run` for everything else |
|
|
10
10
|
| **5 skills** | `pm-workflow`, `pm-developer`, `pm-release`, `pm-audit`, `pm-planner` — auto-loaded as Claude Code skills |
|
|
11
11
|
| **14 slash commands** | Full lifecycle coverage — status, start, close, triage, audit, search, new, list, calendar, developer, planner, release, workflow, init |
|
|
12
12
|
| **3 subagents** | `pm-coordinator` (batch/multi-item), `pm-triage-agent` (duplicate-safe item creation), `pm-verification-agent` (evidence + close readiness), and a `pm-delivery-chain` orchestrator |
|
|
@@ -42,7 +42,7 @@ Both `pm` and `pm-cli` marketplace IDs resolve to the same plugin.
|
|
|
42
42
|
### Option C: Global MCP server via Claude Code CLI (MCP tools only)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
claude mcp add --transport stdio pm-
|
|
45
|
+
claude mcp add --transport stdio pm-mcp -- npx -y @unbrained/pm-cli pm-mcp
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
This gives you the 18 MCP tools but not the skills, slash commands, or session hook.
|
|
@@ -54,7 +54,7 @@ Add to your project's `.mcp.json`:
|
|
|
54
54
|
```json
|
|
55
55
|
{
|
|
56
56
|
"mcpServers": {
|
|
57
|
-
"pm-
|
|
57
|
+
"pm-mcp": {
|
|
58
58
|
"command": "npx",
|
|
59
59
|
"args": ["-y", "@unbrained/pm-cli@latest", "pm-mcp"],
|
|
60
60
|
"env": {
|
|
@@ -163,7 +163,7 @@ Spawn pm-triage-agent to set up the pm item for: add OAuth2 login support
|
|
|
163
163
|
| `pm_validate` | Run validation checks |
|
|
164
164
|
| `pm_health` | Run health diagnostics |
|
|
165
165
|
| `pm_contracts` | Inspect command contracts |
|
|
166
|
-
| `
|
|
166
|
+
| `pm_plan` | Manage durable Plan workflows |
|
|
167
167
|
|
|
168
168
|
### General tool
|
|
169
169
|
|
|
@@ -29,7 +29,7 @@ For batch audits spanning many items, create one top-level `TaskCreate` for the
|
|
|
29
29
|
|
|
30
30
|
## Tools Available
|
|
31
31
|
|
|
32
|
-
Use the `pm-
|
|
32
|
+
Use the `pm-mcp` MCP server tools: `pm_context`, `pm_search`, `pm_list`, `pm_get`, `pm_create`, `pm_update`, `pm_claim`, `pm_release`, `pm_close`, `pm_comments`, `pm_files`, `pm_docs`, `pm_test`, `pm_validate`, `pm_health`, `pm_contracts`, `pm_plan`, and `pm_run` for all other operations.
|
|
33
33
|
|
|
34
34
|
Also use Claude Code's built-in `TaskCreate` and `TaskUpdate` tools for TUI panel display.
|
|
35
35
|
|
|
@@ -14,6 +14,14 @@ Initialize pm project tracking using native MCP tools. Argument: `$ARGUMENTS` (o
|
|
|
14
14
|
```json
|
|
15
15
|
{ "tool": "pm_run", "args": { "action": "init", "options": {} } }
|
|
16
16
|
```
|
|
17
|
+
If guidance state inspection is needed before writing AGENTS/CLAUDE sections, run:
|
|
18
|
+
```json
|
|
19
|
+
{ "tool": "pm_run", "args": { "action": "init", "options": { "agentGuidance": "status" } } }
|
|
20
|
+
```
|
|
21
|
+
To explicitly add compact workflow guidance without waiting for interactive prompts, run:
|
|
22
|
+
```json
|
|
23
|
+
{ "tool": "pm_run", "args": { "action": "init", "options": { "agentGuidance": "add" } } }
|
|
24
|
+
```
|
|
17
25
|
|
|
18
26
|
3. **Verify initialization** — call `pm_health` again to confirm `ok: true`.
|
|
19
27
|
|
|
@@ -37,8 +45,9 @@ Initialize pm project tracking using native MCP tools. Argument: `$ARGUMENTS` (o
|
|
|
37
45
|
|
|
38
46
|
5. **Show quick-start summary**:
|
|
39
47
|
- pm initialized at `.agents/pm/`
|
|
48
|
+
- guidance mode defaults to `ask` (TTY prompt only); use `agentGuidance=add|skip|status` in `pm_run` options for deterministic behavior
|
|
40
49
|
- 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`, `
|
|
50
|
+
- 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_plan`, `pm_run`
|
|
42
51
|
- Next: use `/pm-new <title>` to create your first item, or `/pm-status` to see the tracker state
|
|
43
52
|
|
|
44
53
|
If initialization fails, report the error and suggest running `pm init` manually in the terminal.
|
|
@@ -49,3 +49,21 @@ Run the pm planning loop using native MCP tools. Argument: `$ARGUMENTS` (optiona
|
|
|
49
49
|
9. If you claimed a planning item: `pm_close` it, `pm_release`, then `TaskUpdate(completed)`.
|
|
50
50
|
|
|
51
51
|
10. **Report** — list all created/updated items with their IDs, types, priorities, and parent links.
|
|
52
|
+
|
|
53
|
+
## Living plan mode (`pm_plan`)
|
|
54
|
+
|
|
55
|
+
If the user wants a Codex-style ExecPlan / Claude Plan Mode / Cursor plan-and-edit flow rather than a flat backlog, use the built-in `Plan` item type via the `pm_plan` MCP tool. It records ordered steps, evidence, decisions, discoveries, validation, and supports materializing steps into real Tasks/Features.
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{ "tool": "pm_plan", "args": { "options": { "subcommand": "create", "title": "Plan title", "scope": "What this plan changes", "harness": "claude-code", "parent": "pm-epic1", "claim": true } } }
|
|
59
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "add-step", "stepTitle": "Read affected files", "dependsOn": "pm-task1" } } }
|
|
60
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "stepRef": "plan-step-001", "options": { "subcommand": "complete-step", "stepEvidence": "files reviewed" } } }
|
|
61
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "approve" } } }
|
|
62
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "materialize", "steps": "plan-step-002,plan-step-003", "materializeType": "Task" } } }
|
|
63
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "show", "depth": "deep" } } }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Resume a plan after compaction:
|
|
67
|
+
```json
|
|
68
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "resume", "resumeContext": "step 2 in progress; tests still failing on retry path" } } }
|
|
69
|
+
```
|
|
@@ -111,8 +111,53 @@ Write AC as numbered, testable assertions:
|
|
|
111
111
|
|
|
112
112
|
Set via `pm_create` with `acceptanceCriteria` field or `pm_update` with `options.acceptanceCriteria`.
|
|
113
113
|
|
|
114
|
+
## Built-in Plan workflow (`pm_plan` / `pm plan`)
|
|
115
|
+
|
|
116
|
+
For durable Codex-style ExecPlans, Claude-style Plan Mode, and Cursor-style editable checklists, pm exposes a first-class `Plan` item type plus a `pm plan` command family. Plans are stored as normal pm items under `.agents/pm/plans/`, get the full history hash chain, dependencies, search corpus, and lifecycle tooling.
|
|
117
|
+
|
|
118
|
+
### When to use `pm plan` vs. `pm_create` + tasks
|
|
119
|
+
|
|
120
|
+
- `pm plan` — when you need a **living, resumable plan** with ordered steps, evidence, decisions, discoveries, validation, and the option to later materialize selected steps as real Tasks. Best for plan-then-execute workflows.
|
|
121
|
+
- `pm_create` (Epic/Feature/Task) — when the work is already decomposed and you just need persistent backlog items.
|
|
122
|
+
|
|
123
|
+
### Lifecycle (call via `pm_plan` MCP tool)
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{ "tool": "pm_plan", "args": { "options": { "subcommand": "create", "title": "Refactor lock retry", "scope": "Improve retry semantics", "harness": "claude-code", "parent": "pm-epic1", "related": "pm-rel1,pm-rel2", "claim": true } } }
|
|
127
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "add-step", "stepTitle": "Read lock.ts", "stepBody": "Understand retry path", "dependsOn": "pm-task1" } } }
|
|
128
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "stepRef": "plan-step-001", "options": { "subcommand": "update-step", "stepStatus": "in_progress", "stepEvidence": "started reading lock.ts" } } }
|
|
129
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "stepRef": "plan-step-001", "options": { "subcommand": "complete-step", "stepEvidence": "lock.ts read; retry path captured" } } }
|
|
130
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "decision", "decisionText": "Use exponential backoff", "decisionRationale": "Avoid thundering herd" } } }
|
|
131
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "discovery", "discoveryText": "Found existing util in src/util/retry.ts" } } }
|
|
132
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "validation", "validationText": "Coverage gate stays at 100%", "validationCommand": "node scripts/run-tests.mjs coverage" } } }
|
|
133
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "approve" } } }
|
|
134
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "materialize", "steps": "plan-step-002", "materializeType": "Task", "materializeParent": "pm-epic1" } } }
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Progressive-disclosure reads
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "show", "depth": "brief" } } }
|
|
141
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "show", "depth": "standard" } } }
|
|
142
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "show", "depth": "deep" } } }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Harness mapping cheatsheet
|
|
146
|
+
|
|
147
|
+
| Harness signal | pm_plan equivalent |
|
|
148
|
+
|----------------|--------------------|
|
|
149
|
+
| Codex `update_plan` step status | `subcommand=update-step` with `stepStatus` |
|
|
150
|
+
| Claude `TaskCreate` | `subcommand=add-step` |
|
|
151
|
+
| Claude `TaskUpdate(in_progress)` | `subcommand=update-step` with `stepStatus=in_progress` |
|
|
152
|
+
| Cursor edit a plan step | `subcommand=update-step` |
|
|
153
|
+
| Resume after compaction | `subcommand=resume` with `resumeContext` then `subcommand=show --depth deep` |
|
|
154
|
+
| Approve before edits | `subcommand=approve` |
|
|
155
|
+
| Convert checklist into real items | `subcommand=materialize` |
|
|
156
|
+
|
|
114
157
|
## Safety
|
|
115
158
|
|
|
116
159
|
- Never pass `path` during real repository tracking.
|
|
117
|
-
- Always `pm_search` before `pm_create` — avoid duplicates.
|
|
160
|
+
- Always `pm_search` before `pm_create`/`pm plan create` — avoid duplicates.
|
|
118
161
|
- Run `pm_validate` after batch changes.
|
|
162
|
+
- Set exactly one step `in_progress` per plan; pass `allowMultipleActive: true` only for explicit parallel branches.
|
|
163
|
+
- Use `pm_plan` `subcommand=resume` after long-running sessions so the next agent can pick up with a deterministic context.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "pm-
|
|
3
|
-
"version": "1.
|
|
2
|
+
"name": "pm-codex",
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Native Codex integration for pm-cli with bundled MCP tools, skills, commands, and agent workflows.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "unbrained",
|
|
7
7
|
"url": "https://github.com/unbraind/pm-cli"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/unbraind/pm-cli/tree/main/plugins/pm-
|
|
9
|
+
"homepage": "https://github.com/unbraind/pm-cli/tree/main/plugins/pm-codex",
|
|
10
10
|
"repository": "https://github.com/unbraind/pm-cli",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"keywords": [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This plugin packages pm-cli for Codex with:
|
|
4
4
|
|
|
5
|
-
- a native stdio MCP server (`pm-
|
|
5
|
+
- a native stdio MCP server (`pm-mcp`) backed by pm command modules, not shell `pm` invocations
|
|
6
6
|
- skills for developer, user, extension, SDK, release, and audit workflows
|
|
7
7
|
- command prompts for common planning and verification loops
|
|
8
8
|
- repo marketplace metadata for one-step local installation in Codex
|
|
@@ -15,15 +15,18 @@ From this repository:
|
|
|
15
15
|
codex plugin marketplace add .
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Restart Codex, then install **pm CLI** from the repo marketplace. The bundled MCP server starts through `plugins/pm-
|
|
18
|
+
Restart Codex, then install **pm CLI** from the repo marketplace. The bundled MCP server starts through `plugins/pm-codex/scripts/pm-mcp-server.mjs`.
|
|
19
19
|
|
|
20
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
21
|
|
|
22
22
|
## Native Tools
|
|
23
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 `
|
|
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_plan`.
|
|
25
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.
|
|
26
|
+
Use `pm_run` for the remaining pm surface. Supported actions include `init`, `calendar`, `activity`, `aggregate`, `dedupe-audit`, `normalize`, `reindex`, `extension`, `history`, `history-redact`, `plan`, `stats`, `append`, `notes`, `learnings`, `test-all`, `comments-audit`, `gc`, templates, and test-runs controls.
|
|
27
|
+
|
|
28
|
+
`pm_plan` exposes Codex-style ExecPlans as a first-class `Plan` item type with ordered steps, evidence, decisions, discoveries, validation, and materialization. See the `pm-native` skill for the full Plan workflow recipe.
|
|
29
|
+
For `init` automation, pass `options.agentGuidance` (`ask|add|skip|status`) when you need deterministic AGENTS/CLAUDE guidance behavior in non-interactive runs.
|
|
27
30
|
|
|
28
31
|
## Safety
|
|
29
32
|
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
```
|
|
58
|
+
|
|
59
|
+
## Plan workflow (`pm_plan`)
|
|
60
|
+
|
|
61
|
+
Codex-style living ExecPlans are first-class via the `Plan` item type and the `pm_plan` MCP tool. Plans persist ordered steps, evidence, decisions, discoveries, validation, and resume context so a future stateless agent can pick up the work.
|
|
62
|
+
|
|
63
|
+
Use `pm_plan` for plan-then-execute workflows; use `pm_create` with type Task/Feature/Epic for already-decomposed backlog work.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "tool": "pm_plan", "args": { "options": { "subcommand": "create", "title": "Refactor lock retry", "scope": "Improve retry semantics under load", "harness": "codex", "parent": "pm-epic1", "claim": true } } }
|
|
67
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "add-step", "stepTitle": "Read lock.ts", "dependsOn": "pm-task1" } } }
|
|
68
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "stepRef": "plan-step-001", "options": { "subcommand": "update-step", "stepStatus": "in_progress", "stepEvidence": "started reading lock.ts" } } }
|
|
69
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "stepRef": "plan-step-001", "options": { "subcommand": "complete-step", "stepEvidence": "lock.ts read; retry path captured" } } }
|
|
70
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "decision", "decisionText": "Use exponential backoff", "decisionRationale": "Avoid thundering herd" } } }
|
|
71
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "approve" } } }
|
|
72
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "materialize", "steps": "plan-step-002", "materializeType": "Task", "materializeParent": "pm-epic1" } } }
|
|
73
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "resume", "resumeContext": "step 2 pending, deps verified" } } }
|
|
74
|
+
{ "tool": "pm_plan", "args": { "id": "pm-plan1", "options": { "subcommand": "show", "depth": "deep" } } }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Invariants:
|
|
78
|
+
|
|
79
|
+
- One step `in_progress` at a time by default; pass `allowMultipleActive: true` for explicit parallel branches.
|
|
80
|
+
- Use `subcommand: block-step` with `stepBlockedReason` when discovery flips a step.
|
|
81
|
+
- Use `subcommand: materialize` once steps are concrete enough to become Tasks.
|