@unbrained/pm-cli 2026.5.12 → 2026.5.18
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 +22 -0
- package/CONTRIBUTING.md +1 -0
- package/PRD.md +7 -28
- package/README.md +8 -14
- 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 +32 -1
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +23 -5
- 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/append.js +4 -1
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/calendar.js +9 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.d.ts +3 -0
- package/dist/cli/commands/claim.js +19 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +4 -1
- 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.js +4 -1
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +98 -2
- 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 +19 -5
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +9 -0
- package/dist/cli/commands/contracts.js +205 -49
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +88 -9
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.js +4 -1
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/delete.js +4 -1
- 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.js +4 -1
- package/dist/cli/commands/docs.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +7 -2
- package/dist/cli/commands/extension.js +360 -64
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +4 -1
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/gc.js +4 -1
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +7 -3
- package/dist/cli/commands/get.js +91 -18
- 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 +4 -0
- package/dist/cli/commands/health.js +31 -8
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +42 -0
- package/dist/cli/commands/history-redact.js +559 -0
- package/dist/cli/commands/history-redact.js.map +1 -0
- package/dist/cli/commands/history.d.ts +4 -0
- package/dist/cli/commands/history.js +14 -3
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -8
- package/dist/cli/commands/index.js +6 -9
- 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 +14 -0
- package/dist/cli/commands/init.js +75 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +4 -1
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/list.d.ts +1 -0
- package/dist/cli/commands/list.js +42 -18
- 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 +4 -1
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/plan.d.ts +118 -0
- package/dist/cli/commands/plan.js +975 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/reindex.d.ts +8 -0
- package/dist/cli/commands/reindex.js +100 -24
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +4 -1
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/search.js +58 -27
- 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.js +4 -1
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/commands/test-all.js +4 -1
- 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.js +4 -1
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +4 -1
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.js +114 -71
- 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.js +32 -4
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +5 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.js +4 -1
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +4 -1
- 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.js +52 -33
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +4 -1
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +276 -32
- 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.js +55 -150
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +277 -261
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +62 -199
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +55 -146
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +2 -2
- package/dist/cli/registration-helpers.js +11 -21
- 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 +45 -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.js +4 -1
- 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 +84 -54
- 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/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/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 +241 -2
- package/dist/core/item/item-format.js.map +1 -1
- 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 +33 -3
- package/dist/core/item/parse.js.map +1 -1
- 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.js +4 -1
- package/dist/core/item/status.js.map +1 -1
- package/dist/core/item/type-registry.js +4 -1
- 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/command-aware.js +4 -1
- package/dist/core/output/command-aware.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 +27 -1
- package/dist/core/packages/manifest.js +87 -1
- 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/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.js +4 -1
- 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.d.ts +13 -1
- package/dist/core/search/embedding-batches.js +40 -8
- 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 +11 -2
- 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/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/levenshtein.js +4 -1
- package/dist/core/shared/levenshtein.js.map +1 -1
- 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.js +4 -1
- 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.d.ts +8 -1
- package/dist/core/store/front-matter-cache.js +28 -14
- 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 +2 -0
- package/dist/core/store/item-store.js +66 -3
- 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.js +39 -1
- 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 +31 -5
- 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.d.ts +8 -0
- package/dist/mcp/server.js +212 -53
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.d.ts +7 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js +484 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -0
- package/dist/sdk/cli-contracts/commander-types.d.ts +21 -0
- package/dist/sdk/cli-contracts/commander-types.js +95 -0
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +10 -17
- package/dist/sdk/cli-contracts.js +232 -282
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +5 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +29 -0
- package/dist/sdk/runtime.js +31 -0
- package/dist/sdk/runtime.js.map +1 -0
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types.d.ts +86 -2
- package/dist/types.js +34 -1
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +16 -6
- package/docs/CLAUDE_CODE_PLUGIN.md +10 -10
- package/docs/CODEX_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +83 -8
- package/docs/CONFIGURATION.md +4 -1
- package/docs/EXTENSIONS.md +176 -807
- package/docs/QUICKSTART.md +12 -5
- package/docs/README.md +7 -6
- package/docs/RELEASING.md +6 -4
- package/docs/SDK.md +78 -441
- package/docs/TESTING.md +2 -2
- package/marketplace.json +3 -3
- package/package.json +7 -4
- package/packages/pm-beads/extensions/beads/index.js +90 -101
- package/packages/pm-beads/extensions/beads/index.ts +2 -2
- package/packages/pm-beads/extensions/beads/runtime.js +2 -17
- package/packages/pm-beads/extensions/beads/runtime.ts +41 -18
- package/packages/pm-beads/package.json +34 -1
- package/packages/pm-calendar/README.md +13 -0
- package/packages/pm-calendar/extensions/calendar/index.js +56 -0
- package/packages/pm-calendar/extensions/calendar/index.ts +62 -0
- package/packages/pm-calendar/extensions/calendar/manifest.json +7 -0
- package/packages/pm-calendar/extensions/calendar/runtime.js +114 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +123 -0
- package/packages/pm-calendar/package.json +51 -0
- package/packages/pm-governance-audit/README.md +23 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +117 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +118 -0
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +7 -0
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +159 -0
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +176 -0
- package/packages/pm-governance-audit/package.json +52 -0
- package/packages/pm-guide-shell/README.md +23 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +76 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +81 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +7 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +263 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +327 -0
- package/packages/pm-guide-shell/package.json +52 -0
- package/packages/pm-linked-test-adapters/README.md +24 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +101 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +102 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +7 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +142 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +173 -0
- package/packages/pm-linked-test-adapters/package.json +53 -0
- package/packages/pm-search-advanced/README.md +27 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +93 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +94 -0
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +7 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +120 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +144 -0
- package/packages/pm-search-advanced/package.json +54 -0
- package/packages/pm-templates/README.md +20 -0
- package/packages/pm-templates/extensions/templates/index.js +101 -0
- package/packages/pm-templates/extensions/templates/index.ts +109 -0
- package/packages/pm-templates/extensions/templates/manifest.json +7 -0
- package/packages/pm-templates/extensions/templates/runtime.js +226 -0
- package/packages/pm-templates/extensions/templates/runtime.ts +283 -0
- package/packages/pm-templates/package.json +50 -0
- package/packages/pm-todos/extensions/todos/index.js +105 -116
- package/packages/pm-todos/extensions/todos/index.ts +3 -2
- package/packages/pm-todos/extensions/todos/runtime.js +2 -17
- package/packages/pm-todos/extensions/todos/runtime.ts +40 -18
- package/packages/pm-todos/package.json +35 -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}/scripts/pm-mcp-server.mjs +4 -2
- 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-cli-codex → pm-codex}/scripts/pm-mcp-server.mjs +4 -2
- 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/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}/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}/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,77 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="df6717c1-afaf-5933-945b-32b84cacd324")}catch(e){}}();
|
|
2
3
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
3
4
|
import { PmCliError } from "../core/shared/errors.js";
|
|
5
|
+
import { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, } from "../sdk/cli-contracts.js";
|
|
4
6
|
import { collect, extractUpdateManyMutationOptionSource, getGlobalOptions, invalidateSearchCachesForMutation, normalizeCreateOptions, normalizeUpdateOptions, printError, printResult, } from "./registration-helpers.js";
|
|
7
|
+
let mutationCommandsModulePromise = null;
|
|
8
|
+
async function loadMutationCommandsModule() {
|
|
9
|
+
mutationCommandsModulePromise ??= import("./commands/index.js");
|
|
10
|
+
return mutationCommandsModulePromise;
|
|
11
|
+
}
|
|
12
|
+
function registerCommanderOptionContracts(command, contracts) {
|
|
13
|
+
for (const contract of contracts) {
|
|
14
|
+
if (contract.required) {
|
|
15
|
+
command.requiredOption(contract.option, contract.description);
|
|
16
|
+
}
|
|
17
|
+
else if (contract.repeatable) {
|
|
18
|
+
command.option(contract.option, contract.description, collect);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
command.option(contract.option, contract.description);
|
|
22
|
+
}
|
|
23
|
+
for (const aliasContract of contract.aliasOptions ?? []) {
|
|
24
|
+
if (contract.repeatable) {
|
|
25
|
+
command.option(aliasContract.option, aliasContract.description, collect);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
command.option(aliasContract.option, aliasContract.description);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
5
33
|
export function registerMutationCommands(program) {
|
|
6
|
-
program
|
|
34
|
+
const createCommand = program
|
|
7
35
|
.command("create")
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.option("--template <value>", "Apply named create template defaults before explicit flags")
|
|
13
|
-
.option("--create-mode <value>", "Create required-option policy mode: strict|progressive")
|
|
14
|
-
.option("--create_mode <value>", "Alias for --create-mode")
|
|
15
|
-
.option("--schedule-preset <value>", "Scheduling preset for Reminder|Meeting|Event: lightweight")
|
|
16
|
-
.option("--schedule_preset <value>", "Alias for --schedule-preset")
|
|
17
|
-
.option("--status, -s <value>", "Item status")
|
|
18
|
-
.option("--priority, -p <value>", "Priority 0..4")
|
|
19
|
-
.option("--tags <value>", "Comma-separated tags")
|
|
20
|
-
.option("--body, -b <value>", "Item markdown body (allow empty string)")
|
|
21
|
-
.option("--deadline <value>", "Deadline (ISO/date string or relative +6h/+1d/+2w/+6m)")
|
|
22
|
-
.option("--estimate, --estimated-minutes <value>", "Estimated minutes")
|
|
23
|
-
.option("--estimated_minutes <value>", "Alias for --estimated-minutes")
|
|
24
|
-
.option("--acceptance-criteria <value>", "Acceptance criteria (allow empty string)")
|
|
25
|
-
.option("--acceptance_criteria <value>", "Alias for --acceptance-criteria")
|
|
26
|
-
.option("--ac <value>", "Alias for --acceptance-criteria")
|
|
27
|
-
.option("--definition-of-ready <value>", "Definition of ready (allow empty string)")
|
|
28
|
-
.option("--definition_of_ready <value>", "Alias for --definition-of-ready")
|
|
29
|
-
.option("--order <value>", "Planning order/rank integer")
|
|
30
|
-
.option("--rank <value>", "Alias for --order")
|
|
31
|
-
.option("--goal <value>", "Goal identifier")
|
|
32
|
-
.option("--objective <value>", "Objective identifier")
|
|
33
|
-
.option("--value <value>", "Business value summary")
|
|
34
|
-
.option("--impact <value>", "Business impact summary")
|
|
35
|
-
.option("--outcome <value>", "Expected outcome summary")
|
|
36
|
-
.option("--why-now <value>", "Why-now rationale")
|
|
37
|
-
.option("--why_now <value>", "Alias for --why-now")
|
|
38
|
-
.option("--author <value>", "Mutation author")
|
|
39
|
-
.option("--message <value>", "History message (allow empty string)")
|
|
40
|
-
.option("--assignee <value>", "Item assignee")
|
|
41
|
-
.option("--parent <value>", "Parent item ID")
|
|
42
|
-
.option("--reviewer <value>", "Reviewer")
|
|
43
|
-
.option("--risk <value>", "Risk level: low|med|medium|high|critical (med persists as medium)")
|
|
44
|
-
.option("--confidence <value>", "Confidence level: 0..100|low|med|medium|high (med persists as medium)")
|
|
45
|
-
.option("--sprint <value>", "Sprint identifier")
|
|
46
|
-
.option("--release <value>", "Release identifier")
|
|
47
|
-
.option("--blocked-by <value>", "Blocked-by item ID or reason")
|
|
48
|
-
.option("--blocked_by <value>", "Alias for --blocked-by")
|
|
49
|
-
.option("--blocked-reason <value>", "Blocked reason")
|
|
50
|
-
.option("--blocked_reason <value>", "Alias for --blocked-reason")
|
|
51
|
-
.option("--unblock-note <value>", "Unblock rationale note")
|
|
52
|
-
.option("--unblock_note <value>", "Alias for --unblock-note")
|
|
53
|
-
.option("--reporter <value>", "Issue reporter")
|
|
54
|
-
.option("--severity <value>", "Issue severity: low|med|medium|high|critical (med persists as medium)")
|
|
55
|
-
.option("--environment <value>", "Issue environment context")
|
|
56
|
-
.option("--repro-steps <value>", "Issue reproduction steps")
|
|
57
|
-
.option("--repro_steps <value>", "Alias for --repro-steps")
|
|
58
|
-
.option("--resolution <value>", "Issue resolution summary")
|
|
59
|
-
.option("--expected-result <value>", "Issue expected behavior")
|
|
60
|
-
.option("--expected_result <value>", "Alias for --expected-result")
|
|
61
|
-
.option("--actual-result <value>", "Issue observed behavior")
|
|
62
|
-
.option("--actual_result <value>", "Alias for --actual-result")
|
|
63
|
-
.option("--affected-version <value>", "Affected version identifier")
|
|
64
|
-
.option("--affected_version <value>", "Alias for --affected-version")
|
|
65
|
-
.option("--fixed-version <value>", "Fixed version identifier")
|
|
66
|
-
.option("--fixed_version <value>", "Alias for --fixed-version")
|
|
67
|
-
.option("--component <value>", "Issue component ownership")
|
|
68
|
-
.option("--regression <value>", "Regression marker: true|false|1|0")
|
|
69
|
-
.option("--customer-impact <value>", "Customer impact summary")
|
|
70
|
-
.option("--customer_impact <value>", "Alias for --customer-impact")
|
|
71
|
-
.option("--dep <value>", "Seed dependency entry (key=value CSV, markdown key:value lines, or - for stdin; repeatable)", collect)
|
|
72
|
-
.option("--type-option <value>", "Type option key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)", collect)
|
|
73
|
-
.option("--type_option <value>", "Alias for --type-option", collect)
|
|
74
|
-
.option("--unset <field>", "Clear scalar metadata field by name (repeatable)", collect)
|
|
36
|
+
.argument("[title]", "Item title (positional shortcut for --title)")
|
|
37
|
+
.description("Create a new project management item.");
|
|
38
|
+
registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
|
|
39
|
+
createCommand
|
|
75
40
|
.option("--clear-deps", "Clear dependency entries")
|
|
76
41
|
.option("--clear-comments", "Clear comments")
|
|
77
42
|
.option("--clear-notes", "Clear notes")
|
|
@@ -82,18 +47,14 @@ export function registerMutationCommands(program) {
|
|
|
82
47
|
.option("--clear-reminders", "Clear reminders")
|
|
83
48
|
.option("--clear-events", "Clear events")
|
|
84
49
|
.option("--clear-type-options", "Clear type options")
|
|
85
|
-
.
|
|
86
|
-
.option("--event <value>", "Seed event entry start=<iso|relative>,end=<iso|relative>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
87
|
-
.option("--comment <value>", "Seed comment entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
88
|
-
.option("--note <value>", "Seed note entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
89
|
-
.option("--learning <value>", "Seed learning entry (text=<value> CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
90
|
-
.option("--file <value>", "Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
91
|
-
.option("--test <value>", "Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
92
|
-
.option("--doc <value>", "Seed linked doc entry (CSV/markdown pairs or - for stdin; repeatable)", collect)
|
|
93
|
-
.action(async (options, command) => {
|
|
50
|
+
.action(async (positionalTitle, options, command) => {
|
|
94
51
|
const globalOptions = getGlobalOptions(command);
|
|
95
52
|
const startedAt = Date.now();
|
|
53
|
+
if (typeof positionalTitle === "string" && positionalTitle.length > 0 && options.title === undefined) {
|
|
54
|
+
options.title = positionalTitle;
|
|
55
|
+
}
|
|
96
56
|
const normalized = normalizeCreateOptions(options, { requireType: false });
|
|
57
|
+
const { runCreate } = await loadMutationCommandsModule();
|
|
97
58
|
const result = await runCreate(normalized, globalOptions);
|
|
98
59
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
99
60
|
printResult(result, globalOptions);
|
|
@@ -101,85 +62,14 @@ export function registerMutationCommands(program) {
|
|
|
101
62
|
printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
|
|
102
63
|
}
|
|
103
64
|
});
|
|
104
|
-
program
|
|
65
|
+
const updateCommand = program
|
|
105
66
|
.command("update")
|
|
106
67
|
.argument("<id>", "Item id")
|
|
107
|
-
.description("Update item fields and metadata.")
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.option("--body, -b <value>", "Set body (allow empty string)")
|
|
111
|
-
.option("--status, -s <value>", "Set status (use close command for closed)")
|
|
112
|
-
.option("--close-reason <value>", "Set close reason")
|
|
113
|
-
.option("--close_reason <value>", "Alias for --close-reason")
|
|
114
|
-
.option("--priority, -p <value>", "Set priority")
|
|
115
|
-
.option("--type <value>", "Set type")
|
|
116
|
-
.option("--tags <value>", "Set comma-separated tags")
|
|
117
|
-
.option("--deadline <value>", "Set deadline (ISO/date string or relative)")
|
|
118
|
-
.option("--estimate, --estimated-minutes <value>", "Set estimated minutes")
|
|
119
|
-
.option("--estimated_minutes <value>", "Alias for --estimated-minutes")
|
|
120
|
-
.option("--acceptance-criteria <value>", "Set acceptance criteria")
|
|
121
|
-
.option("--acceptance_criteria <value>", "Alias for --acceptance-criteria")
|
|
122
|
-
.option("--ac <value>", "Alias for --acceptance-criteria")
|
|
123
|
-
.option("--definition-of-ready <value>", "Set definition of ready")
|
|
124
|
-
.option("--definition_of_ready <value>", "Alias for --definition-of-ready")
|
|
125
|
-
.option("--order <value>", "Set planning order/rank integer")
|
|
126
|
-
.option("--rank <value>", "Alias for --order")
|
|
127
|
-
.option("--goal <value>", "Set goal identifier")
|
|
128
|
-
.option("--objective <value>", "Set objective identifier")
|
|
129
|
-
.option("--value <value>", "Set business value summary")
|
|
130
|
-
.option("--impact <value>", "Set business impact summary")
|
|
131
|
-
.option("--outcome <value>", "Set expected outcome summary")
|
|
132
|
-
.option("--why-now <value>", "Set why-now rationale")
|
|
133
|
-
.option("--why_now <value>", "Alias for --why-now")
|
|
134
|
-
.option("--author <value>", "Mutation author")
|
|
135
|
-
.option("--message <value>", "Mutation message")
|
|
136
|
-
.option("--assignee <value>", "Set assignee")
|
|
137
|
-
.option("--parent <value>", "Set parent item ID")
|
|
138
|
-
.option("--reviewer <value>", "Set reviewer")
|
|
139
|
-
.option("--risk <value>", "Set risk level: low|med|medium|high|critical (med persists as medium)")
|
|
140
|
-
.option("--confidence <value>", "Set confidence level: 0..100|low|med|medium|high (med persists as medium)")
|
|
141
|
-
.option("--sprint <value>", "Set sprint identifier")
|
|
142
|
-
.option("--release <value>", "Set release identifier")
|
|
143
|
-
.option("--blocked-by <value>", "Set blocked-by item ID or reason")
|
|
144
|
-
.option("--blocked_by <value>", "Alias for --blocked-by")
|
|
145
|
-
.option("--blocked-reason <value>", "Set blocked reason")
|
|
146
|
-
.option("--blocked_reason <value>", "Alias for --blocked-reason")
|
|
147
|
-
.option("--unblock-note <value>", "Set unblock rationale note")
|
|
148
|
-
.option("--unblock_note <value>", "Alias for --unblock-note")
|
|
149
|
-
.option("--reporter <value>", "Set issue reporter")
|
|
150
|
-
.option("--severity <value>", "Set issue severity: low|med|medium|high|critical (med persists as medium)")
|
|
151
|
-
.option("--environment <value>", "Set issue environment context")
|
|
152
|
-
.option("--repro-steps <value>", "Set issue reproduction steps")
|
|
153
|
-
.option("--repro_steps <value>", "Alias for --repro-steps")
|
|
154
|
-
.option("--resolution <value>", "Set issue resolution summary")
|
|
155
|
-
.option("--expected-result <value>", "Set issue expected behavior")
|
|
156
|
-
.option("--expected_result <value>", "Alias for --expected-result")
|
|
157
|
-
.option("--actual-result <value>", "Set issue observed behavior")
|
|
158
|
-
.option("--actual_result <value>", "Alias for --actual-result")
|
|
159
|
-
.option("--affected-version <value>", "Set affected version identifier")
|
|
160
|
-
.option("--affected_version <value>", "Alias for --affected-version")
|
|
161
|
-
.option("--fixed-version <value>", "Set fixed version identifier")
|
|
162
|
-
.option("--fixed_version <value>", "Alias for --fixed-version")
|
|
163
|
-
.option("--component <value>", "Set issue component ownership")
|
|
164
|
-
.option("--regression <value>", "Set regression marker: true|false|1|0")
|
|
165
|
-
.option("--customer-impact <value>", "Set customer impact summary")
|
|
166
|
-
.option("--customer_impact <value>", "Alias for --customer-impact")
|
|
167
|
-
.option("--dep <value>", "Add dependency entries id=<id>,kind=<value>,author=<value>,created_at=<iso|now>,source_kind=<value> (repeatable)", collect)
|
|
168
|
-
.option("--dep-remove <value>", "Remove dependencies by id or id=<id>,kind=<value>,source_kind=<value> selectors (repeatable)", collect)
|
|
169
|
-
.option("--dep_remove <value>", "Alias for --dep-remove", collect)
|
|
68
|
+
.description("Update item fields and metadata.");
|
|
69
|
+
registerCommanderOptionContracts(updateCommand, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
|
|
70
|
+
updateCommand
|
|
170
71
|
.option("--replace-deps", "Atomically replace dependency entries with the provided --dep values")
|
|
171
72
|
.option("--replace-tests", "Atomically replace linked test entries with the provided --test values")
|
|
172
|
-
.option("--comment <value>", "Append comment seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
173
|
-
.option("--note <value>", "Append note seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
174
|
-
.option("--learning <value>", "Append learning seed author=<value>,created_at=<iso|now>,text=<value> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
175
|
-
.option("--file <value>", "Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
176
|
-
.option("--test <value>", "Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
177
|
-
.option("--doc <value>", "Append linked doc path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
178
|
-
.option("--reminder <value>", "Set reminders at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
179
|
-
.option("--event <value>", "Set events start=<iso|relative>,end=<iso|relative>,title=<text>,all_day=<true|false>,recur_* fields (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
180
|
-
.option("--type-option <value>", "Set type options key=value or key=<name>,value=<value> (also accepts key:value and markdown pairs; use - for stdin; repeatable)", collect)
|
|
181
|
-
.option("--type_option <value>", "Alias for --type-option", collect)
|
|
182
|
-
.option("--unset <field>", "Clear scalar metadata field by name (repeatable)", collect)
|
|
183
73
|
.option("--clear-deps", "Clear dependency entries")
|
|
184
74
|
.option("--clear-comments", "Clear comments")
|
|
185
75
|
.option("--clear-notes", "Clear notes")
|
|
@@ -198,6 +88,7 @@ export function registerMutationCommands(program) {
|
|
|
198
88
|
.action(async (id, options, command) => {
|
|
199
89
|
const globalOptions = getGlobalOptions(command);
|
|
200
90
|
const startedAt = Date.now();
|
|
91
|
+
const { runUpdate } = await loadMutationCommandsModule();
|
|
201
92
|
const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
|
|
202
93
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
203
94
|
printResult(result, globalOptions);
|
|
@@ -316,6 +207,7 @@ export function registerMutationCommands(program) {
|
|
|
316
207
|
.action(async (options, command) => {
|
|
317
208
|
const globalOptions = getGlobalOptions(command);
|
|
318
209
|
const startedAt = Date.now();
|
|
210
|
+
const { runUpdateMany } = await loadMutationCommandsModule();
|
|
319
211
|
const result = await runUpdateMany({
|
|
320
212
|
status: typeof options.filterStatus === "string" ? options.filterStatus : undefined,
|
|
321
213
|
list: {
|
|
@@ -348,75 +240,12 @@ export function registerMutationCommands(program) {
|
|
|
348
240
|
printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
|
|
349
241
|
}
|
|
350
242
|
});
|
|
351
|
-
program
|
|
352
|
-
.command("normalize")
|
|
353
|
-
.description("Normalize lifecycle metadata with deterministic dry-run plans and optional apply mode.")
|
|
354
|
-
.option("--filter-status <value>", "Filter by status before planning or apply")
|
|
355
|
-
.option("--filter-type <value>", "Filter by item type before planning or apply")
|
|
356
|
-
.option("--filter-tag <value>", "Filter by tag before planning or apply")
|
|
357
|
-
.option("--filter-priority <value>", "Filter by priority before planning or apply")
|
|
358
|
-
.option("--filter-deadline-before <value>", "Filter by deadline upper bound before planning or apply")
|
|
359
|
-
.option("--filter-deadline-after <value>", "Filter by deadline lower bound before planning or apply")
|
|
360
|
-
.option("--filter-assignee <value>", "Filter by assignee before planning or apply")
|
|
361
|
-
.option("--filter-assignee-filter <value>", "Filter assignee presence: assigned|unassigned before planning or apply")
|
|
362
|
-
.option("--filter-assignee_filter <value>", "Alias for --filter-assignee-filter")
|
|
363
|
-
.option("--filter-parent <value>", "Filter by parent item ID before planning or apply")
|
|
364
|
-
.option("--filter-sprint <value>", "Filter by sprint before planning or apply")
|
|
365
|
-
.option("--filter-release <value>", "Filter by release before planning or apply")
|
|
366
|
-
.option("--limit <n>", "Limit matched item count before planning/apply")
|
|
367
|
-
.option("--offset <n>", "Skip first n matched rows before planning/apply")
|
|
368
|
-
.option("--dry-run", "Preview normalize findings without mutating (default)")
|
|
369
|
-
.option("--apply", "Apply normalize changes using update semantics")
|
|
370
|
-
.option("--author <value>", "Mutation author for apply mode")
|
|
371
|
-
.option("--message <value>", "Mutation message for apply mode")
|
|
372
|
-
.option("--allow-audit-update", "Allow non-owner metadata-only audit updates without requiring --force")
|
|
373
|
-
.option("--allow_audit_update", "Alias for --allow-audit-update")
|
|
374
|
-
.option("--force", "Force ownership override for apply mode")
|
|
375
|
-
.action(async (options, command) => {
|
|
376
|
-
const globalOptions = getGlobalOptions(command);
|
|
377
|
-
const startedAt = Date.now();
|
|
378
|
-
const result = await runNormalize({
|
|
379
|
-
status: typeof options.filterStatus === "string" ? options.filterStatus : undefined,
|
|
380
|
-
list: {
|
|
381
|
-
type: typeof options.filterType === "string" ? options.filterType : undefined,
|
|
382
|
-
tag: typeof options.filterTag === "string" ? options.filterTag : undefined,
|
|
383
|
-
priority: typeof options.filterPriority === "string" ? options.filterPriority : undefined,
|
|
384
|
-
deadlineBefore: typeof options.filterDeadlineBefore === "string" ? options.filterDeadlineBefore : undefined,
|
|
385
|
-
deadlineAfter: typeof options.filterDeadlineAfter === "string" ? options.filterDeadlineAfter : undefined,
|
|
386
|
-
assignee: typeof options.filterAssignee === "string" ? options.filterAssignee : undefined,
|
|
387
|
-
assigneeFilter: typeof options.filterAssigneeFilter === "string"
|
|
388
|
-
? options.filterAssigneeFilter
|
|
389
|
-
: typeof options.filterAssignee_filter === "string"
|
|
390
|
-
? options.filterAssignee_filter
|
|
391
|
-
: undefined,
|
|
392
|
-
parent: typeof options.filterParent === "string" ? options.filterParent : undefined,
|
|
393
|
-
sprint: typeof options.filterSprint === "string" ? options.filterSprint : undefined,
|
|
394
|
-
release: typeof options.filterRelease === "string" ? options.filterRelease : undefined,
|
|
395
|
-
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
396
|
-
offset: typeof options.offset === "string" ? options.offset : undefined,
|
|
397
|
-
includeBody: true,
|
|
398
|
-
},
|
|
399
|
-
dryRun: options.dryRun === true ? true : undefined,
|
|
400
|
-
apply: options.apply === true ? true : undefined,
|
|
401
|
-
author: typeof options.author === "string" ? options.author : undefined,
|
|
402
|
-
message: typeof options.message === "string" ? options.message : undefined,
|
|
403
|
-
allowAuditUpdate: options.allowAuditUpdate === true || options.allow_audit_update === true || options.allowAudit_update === true
|
|
404
|
-
? true
|
|
405
|
-
: undefined,
|
|
406
|
-
force: options.force === true ? true : undefined,
|
|
407
|
-
}, globalOptions);
|
|
408
|
-
if (result.mode === "apply") {
|
|
409
|
-
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
410
|
-
}
|
|
411
|
-
printResult(result, globalOptions);
|
|
412
|
-
if (globalOptions.profile) {
|
|
413
|
-
printError(`profile:command=normalize took_ms=${Date.now() - startedAt}`);
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
243
|
program
|
|
417
244
|
.command("close")
|
|
418
245
|
.argument("<id>", "Item id")
|
|
419
|
-
.argument("
|
|
246
|
+
.argument("[text]", "Close reason text (alias: --reason)")
|
|
247
|
+
.option("--reason <value>", "Close reason text (alias for positional <text>)")
|
|
248
|
+
.option("--close-reason <value>", "Close reason text (alias for positional <text>)")
|
|
420
249
|
.option("--author <value>", "Mutation author")
|
|
421
250
|
.option("--message <value>", "History message")
|
|
422
251
|
.option("--validate-close [mode]", 'Validate closure metadata before close: "off", "warn", or "strict" (default: settings governance preset)')
|
|
@@ -425,7 +254,25 @@ export function registerMutationCommands(program) {
|
|
|
425
254
|
.action(async (id, text, options, command) => {
|
|
426
255
|
const globalOptions = getGlobalOptions(command);
|
|
427
256
|
const startedAt = Date.now();
|
|
428
|
-
const
|
|
257
|
+
const { runClose } = await loadMutationCommandsModule();
|
|
258
|
+
const reasonFromOption = (typeof options.reason === "string" && options.reason.trim().length > 0 && options.reason) ||
|
|
259
|
+
(typeof options.closeReason === "string" && options.closeReason.trim().length > 0 && options.closeReason) ||
|
|
260
|
+
undefined;
|
|
261
|
+
const resolvedText = typeof text === "string" && text.length > 0 ? text : reasonFromOption;
|
|
262
|
+
if (typeof resolvedText !== "string" || resolvedText.length === 0) {
|
|
263
|
+
throw new PmCliError("pm close requires a close reason as the second positional argument or via --reason.", EXIT_CODE.USAGE, {
|
|
264
|
+
code: "missing_required_argument",
|
|
265
|
+
why: "Close mutations are auditable; a reason is mandatory for the history record.",
|
|
266
|
+
examples: [
|
|
267
|
+
`pm close ${id} "All acceptance criteria met"`,
|
|
268
|
+
`pm close ${id} --reason "Verified by integration test"`,
|
|
269
|
+
],
|
|
270
|
+
nextSteps: [
|
|
271
|
+
"Re-run with the close reason as the second positional argument, or pass --reason \"<text>\".",
|
|
272
|
+
],
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
const result = await runClose(id, resolvedText, {
|
|
429
276
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
430
277
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
431
278
|
validateClose: options.validateClose === true
|
|
@@ -451,6 +298,7 @@ export function registerMutationCommands(program) {
|
|
|
451
298
|
.action(async (id, options, command) => {
|
|
452
299
|
const globalOptions = getGlobalOptions(command);
|
|
453
300
|
const startedAt = Date.now();
|
|
301
|
+
const { runDelete } = await loadMutationCommandsModule();
|
|
454
302
|
const result = await runDelete(id, {
|
|
455
303
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
456
304
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -473,6 +321,7 @@ export function registerMutationCommands(program) {
|
|
|
473
321
|
.action(async (id, options, command) => {
|
|
474
322
|
const globalOptions = getGlobalOptions(command);
|
|
475
323
|
const startedAt = Date.now();
|
|
324
|
+
const { runAppend } = await loadMutationCommandsModule();
|
|
476
325
|
const result = await runAppend(id, {
|
|
477
326
|
body: typeof options.body === "string" ? options.body : "",
|
|
478
327
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
@@ -496,6 +345,7 @@ export function registerMutationCommands(program) {
|
|
|
496
345
|
.action(async (id, target, options, command) => {
|
|
497
346
|
const globalOptions = getGlobalOptions(command);
|
|
498
347
|
const startedAt = Date.now();
|
|
348
|
+
const { runRestore } = await loadMutationCommandsModule();
|
|
499
349
|
const result = await runRestore(id, target, {
|
|
500
350
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
501
351
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -507,6 +357,204 @@ export function registerMutationCommands(program) {
|
|
|
507
357
|
printError(`profile:command=restore took_ms=${Date.now() - startedAt}`);
|
|
508
358
|
}
|
|
509
359
|
});
|
|
360
|
+
const planCommand = program
|
|
361
|
+
.command("plan")
|
|
362
|
+
.description("Agent-optimized Plan item workflow: create, manage steps, link dependencies, approve, and materialize.")
|
|
363
|
+
.argument("[subcommand]", "Plan subcommand: create|show|add-step|update-step|complete-step|block-step|reorder-step|remove-step|link|unlink|decision|discovery|validation|resume|approve|materialize")
|
|
364
|
+
.argument("[id]", "Plan id (required for non-create subcommands); for create this may be the positional title")
|
|
365
|
+
.argument("[stepRef]", "Step reference: stable id (plan-step-001) or order integer")
|
|
366
|
+
.argument("[reorderTo]", "New order integer for reorder-step")
|
|
367
|
+
.option("--title <value>", "Plan title")
|
|
368
|
+
.option("--description <value>", "Plan description")
|
|
369
|
+
.option("--scope <value>", "Short scope statement of the target change or investigation")
|
|
370
|
+
.option("--parent <value>", "Parent pm item id")
|
|
371
|
+
.option("--related <value>", "Related pm item ids (repeatable, csv-friendly)", collect)
|
|
372
|
+
.option("--blocks <value>", "Pm item ids this plan blocks (repeatable, csv-friendly)", collect)
|
|
373
|
+
.option("--blocked-by <value>", "Pm item ids that block this plan (repeatable, csv-friendly)", collect)
|
|
374
|
+
.option("--blocked_by <value>", "Alias for --blocked-by", collect)
|
|
375
|
+
.option("--harness <value>", "Plan harness provenance: codex|claude-code|cursor|generic")
|
|
376
|
+
.option("--mode <value>", "Plan mode: draft|research|review|approved|executing|paused|completed|superseded")
|
|
377
|
+
.option("--resume-context <value>", "Compact context summary for a future stateless agent")
|
|
378
|
+
.option("--resume_context <value>", "Alias for --resume-context")
|
|
379
|
+
.option("--tags <value>", "Comma-separated tags")
|
|
380
|
+
.option("--priority <value>", "Priority 0-4")
|
|
381
|
+
.option("--body <value>", "Plan item body")
|
|
382
|
+
.option("--claim", "Claim the plan on create for the author")
|
|
383
|
+
.option("--from-search <value>", "Record the search query that led to plan creation")
|
|
384
|
+
.option("--from_search <value>", "Alias for --from-search")
|
|
385
|
+
.option("--step-title <value>", "Step title for add-step / update-step")
|
|
386
|
+
.option("--step_title <value>", "Alias for --step-title")
|
|
387
|
+
.option("--step-body <value>", "Step body text")
|
|
388
|
+
.option("--step_body <value>", "Alias for --step-body")
|
|
389
|
+
.option("--step-owner <value>", "Step owner")
|
|
390
|
+
.option("--step_owner <value>", "Alias for --step-owner")
|
|
391
|
+
.option("--step-status <value>", "Step status: pending|in_progress|completed|blocked|skipped|superseded")
|
|
392
|
+
.option("--step_status <value>", "Alias for --step-status")
|
|
393
|
+
.option("--step-evidence <value>", "Step evidence text (used by update-step/complete-step)")
|
|
394
|
+
.option("--step_evidence <value>", "Alias for --step-evidence")
|
|
395
|
+
.option("--step-blocked-reason <value>", "Step blocked reason (required when blocking)")
|
|
396
|
+
.option("--step_blocked_reason <value>", "Alias for --step-blocked-reason")
|
|
397
|
+
.option("--step-replacement <value>", "Replacement reference for a superseded step")
|
|
398
|
+
.option("--step_replacement <value>", "Alias for --step-replacement")
|
|
399
|
+
.option("--depends-on <value>", "Pm item ids the step depends on (repeatable, csv-friendly)", collect)
|
|
400
|
+
.option("--depends_on <value>", "Alias for --depends-on", collect)
|
|
401
|
+
.option("--link <value>", "Pm item id to link (repeatable, csv-friendly)", collect)
|
|
402
|
+
.option("--link-kind <value>", "Link kind: related|blocks|blocked_by|depends_on|discovered_from|implements|verifies|supersedes")
|
|
403
|
+
.option("--link_kind <value>", "Alias for --link-kind")
|
|
404
|
+
.option("--link-note <value>", "Optional note for the link")
|
|
405
|
+
.option("--link_note <value>", "Alias for --link-note")
|
|
406
|
+
.option("--promote-to-item-dep", "Also add the linked id as a top-level item dependency when linking")
|
|
407
|
+
.option("--promote_to_item_dep", "Alias for --promote-to-item-dep")
|
|
408
|
+
.option("--allow-multiple-active", "Allow multiple steps to be in_progress at once")
|
|
409
|
+
.option("--allow_multiple_active", "Alias for --allow-multiple-active")
|
|
410
|
+
.option("--file <value>", "Step linked file path=<value>[,scope=project|global,note=<text>] (repeatable)", collect)
|
|
411
|
+
.option("--test <value>", "Step linked test command=<value>[,path=<value>,note=<text>] (repeatable)", collect)
|
|
412
|
+
.option("--doc <value>", "Step linked doc path=<value>[,scope=project|global,note=<text>] (repeatable)", collect)
|
|
413
|
+
.option("--decision-text <value>", "Decision log entry text")
|
|
414
|
+
.option("--decision_text <value>", "Alias for --decision-text")
|
|
415
|
+
.option("--decision-rationale <value>", "Decision log entry rationale")
|
|
416
|
+
.option("--decision_rationale <value>", "Alias for --decision-rationale")
|
|
417
|
+
.option("--decision-evidence <value>", "Decision log entry evidence")
|
|
418
|
+
.option("--decision_evidence <value>", "Alias for --decision-evidence")
|
|
419
|
+
.option("--discovery-text <value>", "Discovery log entry text")
|
|
420
|
+
.option("--discovery_text <value>", "Alias for --discovery-text")
|
|
421
|
+
.option("--validation-text <value>", "Validation log entry text")
|
|
422
|
+
.option("--validation_text <value>", "Alias for --validation-text")
|
|
423
|
+
.option("--validation-command <value>", "Validation log entry command")
|
|
424
|
+
.option("--validation_command <value>", "Alias for --validation-command")
|
|
425
|
+
.option("--validation-expected <value>", "Validation log entry expected outcome")
|
|
426
|
+
.option("--validation_expected <value>", "Alias for --validation-expected")
|
|
427
|
+
.option("--depth <value>", "Show depth: brief|standard|deep (default: brief)")
|
|
428
|
+
.option("--fields <value>", "Comma-separated field projection for show output")
|
|
429
|
+
.option("--steps <value>", "Comma-separated step ids/orders for materialize")
|
|
430
|
+
.option("--materialize-type <value>", "Item type for materialized steps (default: Task)")
|
|
431
|
+
.option("--materialize_type <value>", "Alias for --materialize-type")
|
|
432
|
+
.option("--materialize-parent <value>", "Parent item id for materialized children (default: the plan)")
|
|
433
|
+
.option("--materialize_parent <value>", "Alias for --materialize-parent")
|
|
434
|
+
.option("--materialize-tags <value>", "Comma-separated tags for materialized children")
|
|
435
|
+
.option("--materialize_tags <value>", "Alias for --materialize-tags")
|
|
436
|
+
.option("--author <value>", "Mutation author")
|
|
437
|
+
.option("--message <value>", "Mutation message")
|
|
438
|
+
.option("--force", "Force ownership override")
|
|
439
|
+
.action(async (subcommand, id, stepRef, reorderToken, options, command) => {
|
|
440
|
+
const globalOptions = getGlobalOptions(command);
|
|
441
|
+
const startedAt = Date.now();
|
|
442
|
+
const { runPlan, PLAN_SUBCOMMANDS } = await loadMutationCommandsModule();
|
|
443
|
+
const normalizedSubcommand = (subcommand ?? "").trim().toLowerCase();
|
|
444
|
+
if (!normalizedSubcommand) {
|
|
445
|
+
throw new PmCliError(`pm plan requires a subcommand. Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, {
|
|
446
|
+
code: "missing_required_argument",
|
|
447
|
+
examples: [
|
|
448
|
+
'pm plan create --title "Refactor lock retry"',
|
|
449
|
+
"pm plan show pm-a1b2 --depth standard",
|
|
450
|
+
'pm plan add-step pm-a1b2 --step-title "Read lock.ts"',
|
|
451
|
+
],
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
if (!PLAN_SUBCOMMANDS.includes(normalizedSubcommand)) {
|
|
455
|
+
const didYouMean = normalizedSubcommand === "list" || normalizedSubcommand === "ls"
|
|
456
|
+
? ['pm list --type Plan', 'pm list-all --type Plan']
|
|
457
|
+
: undefined;
|
|
458
|
+
throw new PmCliError(`Unknown pm plan subcommand "${subcommand}". Allowed: ${PLAN_SUBCOMMANDS.join(", ")}`, EXIT_CODE.USAGE, didYouMean ? { code: "unknown_subcommand", examples: didYouMean } : undefined);
|
|
459
|
+
}
|
|
460
|
+
const planOptions = { ...options };
|
|
461
|
+
// Normalize alternate-snake/camel aliases that Commander parses as different keys.
|
|
462
|
+
const aliasPairs = [
|
|
463
|
+
["blocked_by", "blockedBy"],
|
|
464
|
+
["resume_context", "resumeContext"],
|
|
465
|
+
["from_search", "fromSearch"],
|
|
466
|
+
["step_title", "stepTitle"],
|
|
467
|
+
["step_body", "stepBody"],
|
|
468
|
+
["step_owner", "stepOwner"],
|
|
469
|
+
["step_status", "stepStatus"],
|
|
470
|
+
["step_evidence", "stepEvidence"],
|
|
471
|
+
["step_blocked_reason", "stepBlockedReason"],
|
|
472
|
+
["step_replacement", "stepReplacement"],
|
|
473
|
+
["depends_on", "dependsOn"],
|
|
474
|
+
["link_kind", "linkKind"],
|
|
475
|
+
["link_note", "linkNote"],
|
|
476
|
+
["promote_to_item_dep", "promoteToItemDep"],
|
|
477
|
+
["allow_multiple_active", "allowMultipleActive"],
|
|
478
|
+
["decision_text", "decisionText"],
|
|
479
|
+
["decision_rationale", "decisionRationale"],
|
|
480
|
+
["decision_evidence", "decisionEvidence"],
|
|
481
|
+
["discovery_text", "discoveryText"],
|
|
482
|
+
["validation_text", "validationText"],
|
|
483
|
+
["validation_command", "validationCommand"],
|
|
484
|
+
["validation_expected", "validationExpected"],
|
|
485
|
+
["materialize_type", "materializeType"],
|
|
486
|
+
["materialize_parent", "materializeParent"],
|
|
487
|
+
["materialize_tags", "materializeTags"],
|
|
488
|
+
];
|
|
489
|
+
for (const [snake, camel] of aliasPairs) {
|
|
490
|
+
if (planOptions[snake] !== undefined && planOptions[camel] === undefined) {
|
|
491
|
+
planOptions[camel] = planOptions[snake];
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
let reorderTo;
|
|
495
|
+
if (normalizedSubcommand === "reorder-step" && typeof reorderToken === "string") {
|
|
496
|
+
const parsed = Number.parseInt(reorderToken, 10);
|
|
497
|
+
if (!Number.isFinite(parsed)) {
|
|
498
|
+
throw new PmCliError(`reorder-step requires an integer new order, got "${reorderToken}"`, EXIT_CODE.USAGE);
|
|
499
|
+
}
|
|
500
|
+
reorderTo = parsed;
|
|
501
|
+
}
|
|
502
|
+
// Allow positional title for `pm plan create "Title"` (mirrors pm create UX).
|
|
503
|
+
// Plan create never takes an id positional; the second token is the title.
|
|
504
|
+
let planId = id;
|
|
505
|
+
if (normalizedSubcommand === "create" && typeof id === "string" && id.length > 0 && planOptions.title === undefined) {
|
|
506
|
+
planOptions.title = id;
|
|
507
|
+
planId = undefined;
|
|
508
|
+
}
|
|
509
|
+
const result = await runPlan({
|
|
510
|
+
subcommand: normalizedSubcommand,
|
|
511
|
+
id: planId,
|
|
512
|
+
stepRef,
|
|
513
|
+
reorderTo,
|
|
514
|
+
options: planOptions,
|
|
515
|
+
global: globalOptions,
|
|
516
|
+
});
|
|
517
|
+
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
518
|
+
printResult(result, globalOptions);
|
|
519
|
+
if (globalOptions.profile) {
|
|
520
|
+
printError(`profile:command=plan took_ms=${Date.now() - startedAt}`);
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
void planCommand;
|
|
524
|
+
program
|
|
525
|
+
.command("history-redact")
|
|
526
|
+
.argument("<id>", "Item id")
|
|
527
|
+
.option("--literal <value>", "Literal string to redact (repeatable)", collect)
|
|
528
|
+
.option("--regex <value>", "Regex pattern to redact (repeatable; accepts /pattern/flags or raw pattern)", collect)
|
|
529
|
+
.option("--replacement <value>", 'Replacement string (default: "[redacted]")')
|
|
530
|
+
.option("--dry-run", "Preview redaction impact without writing item/history files")
|
|
531
|
+
.option("--author <value>", "Mutation author")
|
|
532
|
+
.option("--message <value>", "Audit history message for the redaction marker entry")
|
|
533
|
+
.option("--force", "Force ownership/lock override")
|
|
534
|
+
.description("Redact sensitive literals/patterns from an item history stream and recompute hashes.")
|
|
535
|
+
.action(async (id, options, command) => {
|
|
536
|
+
const globalOptions = getGlobalOptions(command);
|
|
537
|
+
const startedAt = Date.now();
|
|
538
|
+
const { runHistoryRedact } = await loadMutationCommandsModule();
|
|
539
|
+
const literal = Array.isArray(options.literal) ? options.literal : undefined;
|
|
540
|
+
const regex = Array.isArray(options.regex) ? options.regex : undefined;
|
|
541
|
+
const result = await runHistoryRedact(id, {
|
|
542
|
+
literal,
|
|
543
|
+
regex,
|
|
544
|
+
replacement: typeof options.replacement === "string" ? options.replacement : undefined,
|
|
545
|
+
dryRun: options.dryRun === true,
|
|
546
|
+
author: typeof options.author === "string" ? options.author : undefined,
|
|
547
|
+
message: typeof options.message === "string" ? options.message : undefined,
|
|
548
|
+
force: Boolean(options.force),
|
|
549
|
+
}, globalOptions);
|
|
550
|
+
if (result.changed && !result.dry_run) {
|
|
551
|
+
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
552
|
+
}
|
|
553
|
+
printResult(result, globalOptions);
|
|
554
|
+
if (globalOptions.profile) {
|
|
555
|
+
printError(`profile:command=history-redact took_ms=${Date.now() - startedAt}`);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
510
558
|
program
|
|
511
559
|
.command("comments")
|
|
512
560
|
.argument("<id>", "Item id")
|
|
@@ -538,6 +586,7 @@ export function registerMutationCommands(program) {
|
|
|
538
586
|
throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
|
|
539
587
|
}
|
|
540
588
|
const add = addFromOption ?? addFromPositional;
|
|
589
|
+
const { runComments } = await loadMutationCommandsModule();
|
|
541
590
|
const result = await runComments(id, {
|
|
542
591
|
add,
|
|
543
592
|
stdin: readFromStdin,
|
|
@@ -556,46 +605,6 @@ export function registerMutationCommands(program) {
|
|
|
556
605
|
printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
|
|
557
606
|
}
|
|
558
607
|
});
|
|
559
|
-
program
|
|
560
|
-
.command("comments-audit")
|
|
561
|
-
.option("--status <value>", "Filter by item status")
|
|
562
|
-
.option("--type <value>", "Filter by item type")
|
|
563
|
-
.option("--tag <value>", "Filter by tag")
|
|
564
|
-
.option("--priority <value>", "Filter by priority")
|
|
565
|
-
.option("--parent <value>", "Filter by parent item ID")
|
|
566
|
-
.option("--sprint <value>", "Filter by sprint")
|
|
567
|
-
.option("--release <value>", "Filter by release")
|
|
568
|
-
.option("--assignee <value>", "Filter by assignee")
|
|
569
|
-
.option("--assignee-filter <value>", "Filter assignee presence: assigned|unassigned")
|
|
570
|
-
.option("--assignee_filter <value>", "Alias for --assignee-filter")
|
|
571
|
-
.option("--limit-items <n>", "Limit returned item count")
|
|
572
|
-
.option("--limit <n>", "Alias for --limit-items")
|
|
573
|
-
.option("--full-history", "Export full comment history rows (cannot be combined with --latest)")
|
|
574
|
-
.option("--latest <n>", "Return latest n comments per item (default: 1, use 0 for summary-only rows)")
|
|
575
|
-
.description("Audit latest comments or full comment history across filtered items.")
|
|
576
|
-
.action(async (options, command) => {
|
|
577
|
-
const globalOptions = getGlobalOptions(command);
|
|
578
|
-
const startedAt = Date.now();
|
|
579
|
-
const result = await runCommentsAudit({
|
|
580
|
-
status: typeof options.status === "string" ? options.status : undefined,
|
|
581
|
-
type: typeof options.type === "string" ? options.type : undefined,
|
|
582
|
-
tag: typeof options.tag === "string" ? options.tag : undefined,
|
|
583
|
-
priority: typeof options.priority === "string" ? options.priority : undefined,
|
|
584
|
-
parent: typeof options.parent === "string" ? options.parent : undefined,
|
|
585
|
-
sprint: typeof options.sprint === "string" ? options.sprint : undefined,
|
|
586
|
-
release: typeof options.release === "string" ? options.release : undefined,
|
|
587
|
-
assignee: typeof options.assignee === "string" ? options.assignee : undefined,
|
|
588
|
-
assigneeFilter: typeof options.assigneeFilter === "string" ? options.assigneeFilter : undefined,
|
|
589
|
-
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
590
|
-
limitItems: typeof options.limitItems === "string" ? options.limitItems : undefined,
|
|
591
|
-
fullHistory: options.fullHistory === true,
|
|
592
|
-
latest: typeof options.latest === "string" ? options.latest : undefined,
|
|
593
|
-
}, globalOptions);
|
|
594
|
-
printResult(result, globalOptions);
|
|
595
|
-
if (globalOptions.profile) {
|
|
596
|
-
printError(`profile:command=comments-audit took_ms=${Date.now() - startedAt}`);
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
608
|
program
|
|
600
609
|
.command("notes")
|
|
601
610
|
.argument("<id>", "Item id")
|
|
@@ -617,6 +626,7 @@ export function registerMutationCommands(program) {
|
|
|
617
626
|
throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
618
627
|
}
|
|
619
628
|
const add = addFromOption ?? addFromPositional;
|
|
629
|
+
const { runNotes } = await loadMutationCommandsModule();
|
|
620
630
|
const result = await runNotes(id, {
|
|
621
631
|
add,
|
|
622
632
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -654,6 +664,7 @@ export function registerMutationCommands(program) {
|
|
|
654
664
|
throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
655
665
|
}
|
|
656
666
|
const add = addFromOption ?? addFromPositional;
|
|
667
|
+
const { runLearnings } = await loadMutationCommandsModule();
|
|
657
668
|
const result = await runLearnings(id, {
|
|
658
669
|
add,
|
|
659
670
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -693,6 +704,7 @@ export function registerMutationCommands(program) {
|
|
|
693
704
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
694
705
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
695
706
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
707
|
+
const { runFiles } = await loadMutationCommandsModule();
|
|
696
708
|
const result = await runFiles(id, {
|
|
697
709
|
add: addValues,
|
|
698
710
|
addGlob: addGlobValues,
|
|
@@ -727,6 +739,7 @@ export function registerMutationCommands(program) {
|
|
|
727
739
|
.action(async (id, options, command) => {
|
|
728
740
|
const globalOptions = getGlobalOptions(command);
|
|
729
741
|
const startedAt = Date.now();
|
|
742
|
+
const { runFilesDiscover } = await loadMutationCommandsModule();
|
|
730
743
|
const result = await runFilesDiscover(id, {
|
|
731
744
|
apply: Boolean(options.apply),
|
|
732
745
|
note: typeof options.note === "string" ? options.note : undefined,
|
|
@@ -763,6 +776,7 @@ export function registerMutationCommands(program) {
|
|
|
763
776
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
764
777
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
765
778
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
779
|
+
const { runDocs } = await loadMutationCommandsModule();
|
|
766
780
|
const result = await runDocs(id, {
|
|
767
781
|
add: addValues,
|
|
768
782
|
addGlob: addGlobValues,
|
|
@@ -793,6 +807,7 @@ export function registerMutationCommands(program) {
|
|
|
793
807
|
.action(async (id, options, command) => {
|
|
794
808
|
const globalOptions = getGlobalOptions(command);
|
|
795
809
|
const startedAt = Date.now();
|
|
810
|
+
const { runDeps } = await loadMutationCommandsModule();
|
|
796
811
|
const result = await runDeps(id, {
|
|
797
812
|
format: typeof options.format === "string" ? options.format : undefined,
|
|
798
813
|
maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : undefined,
|
|
@@ -805,4 +820,5 @@ export function registerMutationCommands(program) {
|
|
|
805
820
|
}
|
|
806
821
|
});
|
|
807
822
|
}
|
|
808
|
-
//# sourceMappingURL=register-mutation.js.map
|
|
823
|
+
//# sourceMappingURL=register-mutation.js.map
|
|
824
|
+
//# debugId=df6717c1-afaf-5933-945b-32b84cacd324
|