@unbrained/pm-cli 2026.5.11 → 2026.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -116
- package/CHANGELOG.md +18 -0
- package/PRD.md +18 -39
- package/README.md +8 -5
- package/dist/cli/commander-usage.js +27 -0
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.js +19 -4
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/calendar.js +5 -2
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/contracts.js +63 -19
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.js +58 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +14 -3
- package/dist/cli/commands/extension.js +481 -95
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -8
- package/dist/cli/commands/index.js +1 -8
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +8 -0
- package/dist/cli/commands/reindex.js +96 -23
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +51 -25
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.js +14 -6
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +63 -0
- package/dist/cli/commands/upgrade.js +260 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/guide-topics.js +18 -16
- package/dist/cli/guide-topics.js.map +1 -1
- package/dist/cli/help-content.js +57 -18
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +73 -7
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +24 -142
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +49 -257
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +29 -198
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +181 -204
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +2 -2
- package/dist/cli/registration-helpers.js +1 -19
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/core/extensions/loader.js +7 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/packages/manifest.d.ts +38 -0
- package/dist/core/packages/manifest.js +221 -0
- package/dist/core/packages/manifest.js.map +1 -0
- package/dist/core/search/embedding-batches.d.ts +13 -1
- package/dist/core/search/embedding-batches.js +19 -1
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/store/front-matter-cache.d.ts +8 -1
- package/dist/core/store/front-matter-cache.js +20 -11
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/mcp/server.d.ts +8 -0
- package/dist/mcp/server.js +100 -43
- 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 +477 -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 +92 -0
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +22 -32
- package/dist/sdk/cli-contracts.js +155 -296
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +2 -0
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +29 -0
- package/dist/sdk/runtime.js +28 -0
- package/dist/sdk/runtime.js.map +1 -0
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/COMMANDS.md +17 -1
- package/docs/EXTENSIONS.md +169 -61
- package/docs/QUICKSTART.md +11 -2
- package/docs/README.md +4 -6
- package/docs/RELEASING.md +4 -2
- package/docs/SDK.md +79 -438
- package/package.json +6 -23
- package/packages/pm-beads/README.md +10 -0
- package/packages/pm-beads/extensions/beads/index.js +113 -0
- package/{.agents/pm/extensions/beads/index.js → packages/pm-beads/extensions/beads/index.ts} +42 -20
- package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.js +2 -17
- package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.ts +41 -18
- package/packages/pm-beads/package.json +50 -0
- 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 +95 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +104 -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/README.md +11 -0
- package/packages/pm-todos/extensions/todos/index.js +130 -0
- package/{.agents/pm/extensions/todos/index.js → packages/pm-todos/extensions/todos/index.ts} +47 -23
- package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.js +3 -18
- package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.ts +42 -20
- package/packages/pm-todos/package.json +51 -0
- package/plugins/pm-cli-claude/README.md +1 -2
- package/plugins/pm-cli-claude/hooks/session-start.mjs +4 -55
- package/plugins/pm-cli-claude/scripts/pm-mcp-server.mjs +4 -2
- package/plugins/pm-cli-codex/scripts/pm-mcp-server.mjs +4 -2
- package/.agents/pm/extensions/.managed-extensions.json +0 -42
- package/.agents/skills/HARNESS_COMPATIBILITY.md +0 -45
- package/.agents/skills/README.md +0 -21
- package/.agents/skills/pm-developer/SKILL.md +0 -73
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +0 -48
- package/.agents/skills/pm-developer/references/PROMPTS.md +0 -17
- package/.agents/skills/pm-extensions/SKILL.md +0 -57
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +0 -40
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +0 -25
- package/.agents/skills/pm-sdk/SKILL.md +0 -50
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +0 -31
- package/.agents/skills/pm-sdk/references/PROMPTS.md +0 -13
- package/.agents/skills/pm-user/SKILL.md +0 -59
- package/.agents/skills/pm-user/references/PROMPTS.md +0 -17
- package/.agents/skills/pm-user/references/WORKFLOWS.md +0 -35
- package/.pi/README.md +0 -35
- package/.pi/agents/pm-triage-agent.md +0 -19
- package/.pi/agents/pm-verification-agent.md +0 -21
- package/.pi/chains/pm-native-delivery.chain.md +0 -11
- package/.pi/extensions/pm-cli/index.js +0 -387
- package/.pi/prompts/pm-workflow.md +0 -5
- package/.pi/skills/pm-native/SKILL.md +0 -44
- package/.pi/skills/pm-release/SKILL.md +0 -35
- package/dist/pi/native.d.ts +0 -5
- package/dist/pi/native.js +0 -236
- package/dist/pi/native.js.map +0 -1
- package/docs/PI_PACKAGE.md +0 -141
- /package/{.agents/pm → packages/pm-beads}/extensions/beads/manifest.json +0 -0
- /package/{.agents/pm → packages/pm-todos}/extensions/todos/manifest.json +0 -0
|
@@ -1,77 +1,39 @@
|
|
|
1
|
-
import { runAppend, runClose, runComments, runCommentsAudit, runCreate, runDelete, runDeps, runDocs, runFiles, runFilesDiscover, runLearnings, runNormalize, runNotes, runRestore, runUpdate, runUpdateMany, } from "./commands/index.js";
|
|
2
1
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
3
2
|
import { PmCliError } from "../core/shared/errors.js";
|
|
3
|
+
import { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, } from "../sdk/cli-contracts.js";
|
|
4
4
|
import { collect, extractUpdateManyMutationOptionSource, getGlobalOptions, invalidateSearchCachesForMutation, normalizeCreateOptions, normalizeUpdateOptions, printError, printResult, } from "./registration-helpers.js";
|
|
5
|
+
let mutationCommandsModulePromise = null;
|
|
6
|
+
async function loadMutationCommandsModule() {
|
|
7
|
+
mutationCommandsModulePromise ??= import("./commands/index.js");
|
|
8
|
+
return mutationCommandsModulePromise;
|
|
9
|
+
}
|
|
10
|
+
function registerCommanderOptionContracts(command, contracts) {
|
|
11
|
+
for (const contract of contracts) {
|
|
12
|
+
if (contract.required) {
|
|
13
|
+
command.requiredOption(contract.option, contract.description);
|
|
14
|
+
}
|
|
15
|
+
else if (contract.repeatable) {
|
|
16
|
+
command.option(contract.option, contract.description, collect);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
command.option(contract.option, contract.description);
|
|
20
|
+
}
|
|
21
|
+
for (const aliasContract of contract.aliasOptions ?? []) {
|
|
22
|
+
if (contract.repeatable) {
|
|
23
|
+
command.option(aliasContract.option, aliasContract.description, collect);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
command.option(aliasContract.option, aliasContract.description);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
5
31
|
export function registerMutationCommands(program) {
|
|
6
|
-
program
|
|
32
|
+
const createCommand = program
|
|
7
33
|
.command("create")
|
|
8
|
-
.description("Create a new project management item.")
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.option("--type <value>", "Item type (built-ins plus any configured custom types)")
|
|
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)
|
|
34
|
+
.description("Create a new project management item.");
|
|
35
|
+
registerCommanderOptionContracts(createCommand, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
|
|
36
|
+
createCommand
|
|
75
37
|
.option("--clear-deps", "Clear dependency entries")
|
|
76
38
|
.option("--clear-comments", "Clear comments")
|
|
77
39
|
.option("--clear-notes", "Clear notes")
|
|
@@ -82,18 +44,11 @@ export function registerMutationCommands(program) {
|
|
|
82
44
|
.option("--clear-reminders", "Clear reminders")
|
|
83
45
|
.option("--clear-events", "Clear events")
|
|
84
46
|
.option("--clear-type-options", "Clear type options")
|
|
85
|
-
.option("--reminder <value>", "Seed reminder entry at=<iso|relative>,text=<text> (also accepts markdown pairs and - for stdin; repeatable)", collect)
|
|
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
47
|
.action(async (options, command) => {
|
|
94
48
|
const globalOptions = getGlobalOptions(command);
|
|
95
49
|
const startedAt = Date.now();
|
|
96
50
|
const normalized = normalizeCreateOptions(options, { requireType: false });
|
|
51
|
+
const { runCreate } = await loadMutationCommandsModule();
|
|
97
52
|
const result = await runCreate(normalized, globalOptions);
|
|
98
53
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
99
54
|
printResult(result, globalOptions);
|
|
@@ -101,85 +56,14 @@ export function registerMutationCommands(program) {
|
|
|
101
56
|
printError(`profile:command=create took_ms=${Date.now() - startedAt}`);
|
|
102
57
|
}
|
|
103
58
|
});
|
|
104
|
-
program
|
|
59
|
+
const updateCommand = program
|
|
105
60
|
.command("update")
|
|
106
61
|
.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)
|
|
62
|
+
.description("Update item fields and metadata.");
|
|
63
|
+
registerCommanderOptionContracts(updateCommand, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS);
|
|
64
|
+
updateCommand
|
|
170
65
|
.option("--replace-deps", "Atomically replace dependency entries with the provided --dep values")
|
|
171
66
|
.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
67
|
.option("--clear-deps", "Clear dependency entries")
|
|
184
68
|
.option("--clear-comments", "Clear comments")
|
|
185
69
|
.option("--clear-notes", "Clear notes")
|
|
@@ -198,6 +82,7 @@ export function registerMutationCommands(program) {
|
|
|
198
82
|
.action(async (id, options, command) => {
|
|
199
83
|
const globalOptions = getGlobalOptions(command);
|
|
200
84
|
const startedAt = Date.now();
|
|
85
|
+
const { runUpdate } = await loadMutationCommandsModule();
|
|
201
86
|
const result = await runUpdate(id, normalizeUpdateOptions(options), globalOptions);
|
|
202
87
|
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
203
88
|
printResult(result, globalOptions);
|
|
@@ -316,6 +201,7 @@ export function registerMutationCommands(program) {
|
|
|
316
201
|
.action(async (options, command) => {
|
|
317
202
|
const globalOptions = getGlobalOptions(command);
|
|
318
203
|
const startedAt = Date.now();
|
|
204
|
+
const { runUpdateMany } = await loadMutationCommandsModule();
|
|
319
205
|
const result = await runUpdateMany({
|
|
320
206
|
status: typeof options.filterStatus === "string" ? options.filterStatus : undefined,
|
|
321
207
|
list: {
|
|
@@ -348,71 +234,6 @@ export function registerMutationCommands(program) {
|
|
|
348
234
|
printError(`profile:command=update-many took_ms=${Date.now() - startedAt}`);
|
|
349
235
|
}
|
|
350
236
|
});
|
|
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
237
|
program
|
|
417
238
|
.command("close")
|
|
418
239
|
.argument("<id>", "Item id")
|
|
@@ -425,6 +246,7 @@ export function registerMutationCommands(program) {
|
|
|
425
246
|
.action(async (id, text, options, command) => {
|
|
426
247
|
const globalOptions = getGlobalOptions(command);
|
|
427
248
|
const startedAt = Date.now();
|
|
249
|
+
const { runClose } = await loadMutationCommandsModule();
|
|
428
250
|
const result = await runClose(id, text, {
|
|
429
251
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
430
252
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -451,6 +273,7 @@ export function registerMutationCommands(program) {
|
|
|
451
273
|
.action(async (id, options, command) => {
|
|
452
274
|
const globalOptions = getGlobalOptions(command);
|
|
453
275
|
const startedAt = Date.now();
|
|
276
|
+
const { runDelete } = await loadMutationCommandsModule();
|
|
454
277
|
const result = await runDelete(id, {
|
|
455
278
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
456
279
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -473,6 +296,7 @@ export function registerMutationCommands(program) {
|
|
|
473
296
|
.action(async (id, options, command) => {
|
|
474
297
|
const globalOptions = getGlobalOptions(command);
|
|
475
298
|
const startedAt = Date.now();
|
|
299
|
+
const { runAppend } = await loadMutationCommandsModule();
|
|
476
300
|
const result = await runAppend(id, {
|
|
477
301
|
body: typeof options.body === "string" ? options.body : "",
|
|
478
302
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
@@ -496,6 +320,7 @@ export function registerMutationCommands(program) {
|
|
|
496
320
|
.action(async (id, target, options, command) => {
|
|
497
321
|
const globalOptions = getGlobalOptions(command);
|
|
498
322
|
const startedAt = Date.now();
|
|
323
|
+
const { runRestore } = await loadMutationCommandsModule();
|
|
499
324
|
const result = await runRestore(id, target, {
|
|
500
325
|
author: typeof options.author === "string" ? options.author : undefined,
|
|
501
326
|
message: typeof options.message === "string" ? options.message : undefined,
|
|
@@ -538,6 +363,7 @@ export function registerMutationCommands(program) {
|
|
|
538
363
|
throw new PmCliError("Specify comment text with exactly one source: positional [text], --add, --stdin, or --file", EXIT_CODE.USAGE);
|
|
539
364
|
}
|
|
540
365
|
const add = addFromOption ?? addFromPositional;
|
|
366
|
+
const { runComments } = await loadMutationCommandsModule();
|
|
541
367
|
const result = await runComments(id, {
|
|
542
368
|
add,
|
|
543
369
|
stdin: readFromStdin,
|
|
@@ -556,46 +382,6 @@ export function registerMutationCommands(program) {
|
|
|
556
382
|
printError(`profile:command=comments took_ms=${Date.now() - startedAt}`);
|
|
557
383
|
}
|
|
558
384
|
});
|
|
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
385
|
program
|
|
600
386
|
.command("notes")
|
|
601
387
|
.argument("<id>", "Item id")
|
|
@@ -617,6 +403,7 @@ export function registerMutationCommands(program) {
|
|
|
617
403
|
throw new PmCliError("Specify note text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
618
404
|
}
|
|
619
405
|
const add = addFromOption ?? addFromPositional;
|
|
406
|
+
const { runNotes } = await loadMutationCommandsModule();
|
|
620
407
|
const result = await runNotes(id, {
|
|
621
408
|
add,
|
|
622
409
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -654,6 +441,7 @@ export function registerMutationCommands(program) {
|
|
|
654
441
|
throw new PmCliError("Specify learning text either as positional [text] or with --add, not both", EXIT_CODE.USAGE);
|
|
655
442
|
}
|
|
656
443
|
const add = addFromOption ?? addFromPositional;
|
|
444
|
+
const { runLearnings } = await loadMutationCommandsModule();
|
|
657
445
|
const result = await runLearnings(id, {
|
|
658
446
|
add,
|
|
659
447
|
limit: typeof options.limit === "string" ? options.limit : undefined,
|
|
@@ -693,6 +481,7 @@ export function registerMutationCommands(program) {
|
|
|
693
481
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
694
482
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
695
483
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
484
|
+
const { runFiles } = await loadMutationCommandsModule();
|
|
696
485
|
const result = await runFiles(id, {
|
|
697
486
|
add: addValues,
|
|
698
487
|
addGlob: addGlobValues,
|
|
@@ -727,6 +516,7 @@ export function registerMutationCommands(program) {
|
|
|
727
516
|
.action(async (id, options, command) => {
|
|
728
517
|
const globalOptions = getGlobalOptions(command);
|
|
729
518
|
const startedAt = Date.now();
|
|
519
|
+
const { runFilesDiscover } = await loadMutationCommandsModule();
|
|
730
520
|
const result = await runFilesDiscover(id, {
|
|
731
521
|
apply: Boolean(options.apply),
|
|
732
522
|
note: typeof options.note === "string" ? options.note : undefined,
|
|
@@ -763,6 +553,7 @@ export function registerMutationCommands(program) {
|
|
|
763
553
|
const addGlobValues = Array.isArray(options.addGlob) ? options.addGlob : [];
|
|
764
554
|
const removeValues = Array.isArray(options.remove) ? options.remove : [];
|
|
765
555
|
const migrateValues = Array.isArray(options.migrate) ? options.migrate : [];
|
|
556
|
+
const { runDocs } = await loadMutationCommandsModule();
|
|
766
557
|
const result = await runDocs(id, {
|
|
767
558
|
add: addValues,
|
|
768
559
|
addGlob: addGlobValues,
|
|
@@ -793,6 +584,7 @@ export function registerMutationCommands(program) {
|
|
|
793
584
|
.action(async (id, options, command) => {
|
|
794
585
|
const globalOptions = getGlobalOptions(command);
|
|
795
586
|
const startedAt = Date.now();
|
|
587
|
+
const { runDeps } = await loadMutationCommandsModule();
|
|
796
588
|
const result = await runDeps(id, {
|
|
797
589
|
format: typeof options.format === "string" ? options.format : undefined,
|
|
798
590
|
maxDepth: typeof options.maxDepth === "string" ? options.maxDepth : undefined,
|