@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
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
|
|
4
|
+
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
5
|
+
let calendarCore = null;
|
|
6
|
+
let calendarCoreLoadPromise = null;
|
|
7
|
+
|
|
8
|
+
async function ensureCalendarCoreModule() {
|
|
9
|
+
if (calendarCore) {
|
|
10
|
+
return calendarCore;
|
|
11
|
+
}
|
|
12
|
+
if (!calendarCoreLoadPromise) {
|
|
13
|
+
calendarCoreLoadPromise = loadCalendarCoreModule();
|
|
14
|
+
}
|
|
15
|
+
calendarCore = await calendarCoreLoadPromise;
|
|
16
|
+
return calendarCore;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function loadCalendarCoreModule() {
|
|
20
|
+
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
21
|
+
if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
`builtin-calendar requires ${PM_PACKAGE_ROOT_ENV} to locate core SDK runtime exports.`,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
const modulePath = path.join(path.resolve(envRoot.trim()), "dist", "sdk", "runtime.js");
|
|
27
|
+
try {
|
|
28
|
+
const loaded = await import(pathToFileURL(modulePath).href);
|
|
29
|
+
if (
|
|
30
|
+
typeof loaded.runCalendar === "function" &&
|
|
31
|
+
typeof loaded.renderCalendarMarkdown === "function" &&
|
|
32
|
+
typeof loaded.resolveCalendarOutputFormat === "function"
|
|
33
|
+
) {
|
|
34
|
+
return loaded;
|
|
35
|
+
}
|
|
36
|
+
} catch {
|
|
37
|
+
// Fall through to deterministic failure message below.
|
|
38
|
+
}
|
|
39
|
+
throw new Error(
|
|
40
|
+
`builtin-calendar failed to load calendar SDK runtime exports from ${modulePath}.`,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isCalendarResult(value) {
|
|
45
|
+
return (
|
|
46
|
+
typeof value === "object" &&
|
|
47
|
+
value !== null &&
|
|
48
|
+
value.output_default === "markdown" &&
|
|
49
|
+
Array.isArray(value.events) &&
|
|
50
|
+
Array.isArray(value.days)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isCalendarCommand(command) {
|
|
55
|
+
return command === "calendar" || command === "cal";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function readPayloadFormat(payload) {
|
|
59
|
+
if (typeof payload === "object" && payload !== null) {
|
|
60
|
+
const format = payload.format;
|
|
61
|
+
if (format === "json") {
|
|
62
|
+
return "json";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return "toon";
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function readPayloadResult(payload) {
|
|
69
|
+
if (typeof payload === "object" && payload !== null && "result" in payload) {
|
|
70
|
+
return payload.result;
|
|
71
|
+
}
|
|
72
|
+
return payload;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export async function runCalendarPackage(options, global) {
|
|
76
|
+
const loaded = await ensureCalendarCoreModule();
|
|
77
|
+
return loaded.runCalendar(options, global);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function renderCalendarPackageOutput(context) {
|
|
81
|
+
const result = readPayloadResult(context.payload);
|
|
82
|
+
if (!calendarCore || !isCalendarCommand(context.command) || !isCalendarResult(result)) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const options = context.options ?? {};
|
|
86
|
+
const global = context.global ?? {};
|
|
87
|
+
const outputFormat = calendarCore.resolveCalendarOutputFormat(options, global);
|
|
88
|
+
if (outputFormat === "markdown") {
|
|
89
|
+
return `${calendarCore.renderCalendarMarkdown(result)}\n`;
|
|
90
|
+
}
|
|
91
|
+
if (outputFormat === "json" || readPayloadFormat(context.payload) === "json") {
|
|
92
|
+
return `${JSON.stringify(result, null, 2)}\n`;
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
import type { CalendarOptions, CalendarResult } from "../../../../src/sdk/runtime.js";
|
|
4
|
+
import type { GlobalOptions, ServiceOverrideContext } from "../../../../src/sdk/index.js";
|
|
5
|
+
|
|
6
|
+
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
7
|
+
|
|
8
|
+
interface CalendarCoreModule {
|
|
9
|
+
runCalendar: (options: CalendarOptions, global: GlobalOptions) => Promise<CalendarResult>;
|
|
10
|
+
renderCalendarMarkdown: (result: CalendarResult) => string;
|
|
11
|
+
resolveCalendarOutputFormat: (options: CalendarOptions, global: GlobalOptions) => "markdown" | "toon" | "json";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let calendarCore: CalendarCoreModule | null = null;
|
|
15
|
+
let calendarCoreLoadPromise: Promise<CalendarCoreModule> | null = null;
|
|
16
|
+
|
|
17
|
+
async function ensureCalendarCoreModule(): Promise<CalendarCoreModule> {
|
|
18
|
+
if (calendarCore) {
|
|
19
|
+
return calendarCore;
|
|
20
|
+
}
|
|
21
|
+
if (!calendarCoreLoadPromise) {
|
|
22
|
+
calendarCoreLoadPromise = loadCalendarCoreModule();
|
|
23
|
+
}
|
|
24
|
+
calendarCore = await calendarCoreLoadPromise;
|
|
25
|
+
return calendarCore;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async function loadCalendarCoreModule(): Promise<CalendarCoreModule> {
|
|
29
|
+
const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
|
|
30
|
+
if (typeof envRoot !== "string" || envRoot.trim().length === 0) {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`builtin-calendar requires ${PM_PACKAGE_ROOT_ENV} to locate core SDK runtime exports.`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
const modulePath = path.join(path.resolve(envRoot.trim()), "dist", "sdk", "runtime.js");
|
|
36
|
+
try {
|
|
37
|
+
const loaded = (await import(pathToFileURL(modulePath).href)) as Partial<CalendarCoreModule>;
|
|
38
|
+
if (
|
|
39
|
+
typeof loaded.runCalendar === "function" &&
|
|
40
|
+
typeof loaded.renderCalendarMarkdown === "function" &&
|
|
41
|
+
typeof loaded.resolveCalendarOutputFormat === "function"
|
|
42
|
+
) {
|
|
43
|
+
return loaded as CalendarCoreModule;
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
// Fall through to deterministic failure message below.
|
|
47
|
+
}
|
|
48
|
+
throw new Error(
|
|
49
|
+
`builtin-calendar failed to load calendar SDK runtime exports from ${modulePath}.`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function isCalendarResult(value: unknown): value is CalendarResult {
|
|
54
|
+
return (
|
|
55
|
+
typeof value === "object" &&
|
|
56
|
+
value !== null &&
|
|
57
|
+
(value as { output_default?: unknown }).output_default === "markdown" &&
|
|
58
|
+
Array.isArray((value as { events?: unknown }).events) &&
|
|
59
|
+
Array.isArray((value as { days?: unknown }).days)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function isCalendarCommand(command: unknown): boolean {
|
|
64
|
+
return command === "calendar" || command === "cal";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function readPayloadFormat(payload: unknown): "toon" | "json" {
|
|
68
|
+
if (typeof payload === "object" && payload !== null) {
|
|
69
|
+
const format = (payload as { format?: unknown }).format;
|
|
70
|
+
if (format === "json") {
|
|
71
|
+
return "json";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return "toon";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function readPayloadResult(payload: unknown): unknown {
|
|
78
|
+
if (typeof payload === "object" && payload !== null && "result" in payload) {
|
|
79
|
+
return (payload as { result?: unknown }).result;
|
|
80
|
+
}
|
|
81
|
+
return payload;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function runCalendarPackage(options: CalendarOptions, global: GlobalOptions): Promise<CalendarResult> {
|
|
85
|
+
const loaded = await ensureCalendarCoreModule();
|
|
86
|
+
return loaded.runCalendar(options, global);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function renderCalendarPackageOutput(context: ServiceOverrideContext): string | null {
|
|
90
|
+
const result = readPayloadResult(context.payload);
|
|
91
|
+
if (!calendarCore || !isCalendarCommand(context.command) || !isCalendarResult(result)) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const options = (context.options ?? {}) as CalendarOptions;
|
|
95
|
+
const global = (context.global ?? {}) as GlobalOptions;
|
|
96
|
+
const outputFormat = calendarCore.resolveCalendarOutputFormat(options, global);
|
|
97
|
+
if (outputFormat === "markdown") {
|
|
98
|
+
return `${calendarCore.renderCalendarMarkdown(result)}\n`;
|
|
99
|
+
}
|
|
100
|
+
if (outputFormat === "json" || readPayloadFormat(context.payload) === "json") {
|
|
101
|
+
return `${JSON.stringify(result, null, 2)}\n`;
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unbrained/pm-package-calendar",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "First-party pm package for calendar and agenda views.",
|
|
7
|
+
"homepage": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/unbraind/pm-cli.git",
|
|
11
|
+
"directory": "packages/pm-calendar"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/unbraind/pm-cli/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"pm-package",
|
|
18
|
+
"project-management",
|
|
19
|
+
"calendar",
|
|
20
|
+
"agenda"
|
|
21
|
+
],
|
|
22
|
+
"pm": {
|
|
23
|
+
"aliases": [
|
|
24
|
+
"calendar"
|
|
25
|
+
],
|
|
26
|
+
"extensions": [
|
|
27
|
+
"extensions/calendar"
|
|
28
|
+
],
|
|
29
|
+
"catalog": {
|
|
30
|
+
"display_name": "Calendar Views",
|
|
31
|
+
"category": "workflow",
|
|
32
|
+
"summary": "Show agenda, day, week, and month views for deadlines, reminders, and scheduled events.",
|
|
33
|
+
"tags": [
|
|
34
|
+
"calendar",
|
|
35
|
+
"agenda",
|
|
36
|
+
"workflow"
|
|
37
|
+
],
|
|
38
|
+
"links": {
|
|
39
|
+
"docs": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar#readme",
|
|
40
|
+
"repository": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-calendar",
|
|
41
|
+
"report": "https://github.com/unbraind/pm-cli/issues"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"docs": [
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
"examples": [
|
|
48
|
+
"README.md"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# pm-governance-audit
|
|
2
|
+
|
|
3
|
+
First-party package that restores optional governance audit surfaces in bare-core `pm`.
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- `pm dedupe-audit`
|
|
8
|
+
- `pm comments-audit`
|
|
9
|
+
- `pm normalize`
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pm install governance-audit --project
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Verify
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pm dedupe-audit --mode parent_scope --limit 20 --json
|
|
21
|
+
pm comments-audit --latest 3 --limit-items 20 --json
|
|
22
|
+
pm normalize --dry-run --json
|
|
23
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runCommentsAuditPackage,
|
|
3
|
+
runDedupeAuditPackage,
|
|
4
|
+
runNormalizePackage,
|
|
5
|
+
} from "./runtime.js";
|
|
6
|
+
|
|
7
|
+
export const manifest = {
|
|
8
|
+
name: "builtin-governance-audit",
|
|
9
|
+
version: "0.1.0",
|
|
10
|
+
entry: "./index.js",
|
|
11
|
+
priority: 0,
|
|
12
|
+
capabilities: ["commands", "schema"],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const dedupeAuditFlags = [
|
|
16
|
+
{ long: "--mode", value_name: "value", value_type: "string", description: "Audit mode: title_exact|title_fuzzy|parent_scope." },
|
|
17
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
18
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
19
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
20
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
21
|
+
{ long: "--deadline-before", value_name: "value", value_type: "string", description: "Filter by deadline upper bound." },
|
|
22
|
+
{ long: "--deadline-after", value_name: "value", value_type: "string", description: "Filter by deadline lower bound." },
|
|
23
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
24
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
25
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
26
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
27
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
28
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit analyzed items." },
|
|
29
|
+
{ long: "--threshold", value_name: "value", value_type: "string", description: "Similarity threshold for fuzzy modes." },
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const commentsAuditFlags = [
|
|
33
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
34
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
35
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
36
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
37
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
38
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
39
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
40
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
41
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
42
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit output rows." },
|
|
43
|
+
{ long: "--limit-items", value_name: "n", value_type: "string", description: "Limit scanned items before comment expansion." },
|
|
44
|
+
{ long: "--latest", value_name: "n", value_type: "string", description: "Include latest n comments per item." },
|
|
45
|
+
{ long: "--full-history", value_type: "boolean", description: "Emit full comment history rows." },
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const normalizeFlags = [
|
|
49
|
+
{ long: "--filter-status", value_name: "value", value_type: "string", description: "Status filter applied before normalize planning." },
|
|
50
|
+
{ long: "--filter_status", value_name: "value", value_type: "string", description: "Alias for --filter-status." },
|
|
51
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
52
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
53
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
54
|
+
{ long: "--deadline-before", value_name: "value", value_type: "string", description: "Filter by deadline upper bound." },
|
|
55
|
+
{ long: "--deadline-after", value_name: "value", value_type: "string", description: "Filter by deadline lower bound." },
|
|
56
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
57
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
58
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
59
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
60
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
61
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit listed items." },
|
|
62
|
+
{ long: "--offset", value_name: "n", value_type: "string", description: "Skip first n listed items." },
|
|
63
|
+
{ long: "--include-body", value_type: "boolean", description: "Include body while listing candidate items." },
|
|
64
|
+
{ long: "--include_body", value_type: "boolean", description: "Alias for --include-body." },
|
|
65
|
+
{ long: "--compact", value_type: "boolean", description: "Request compact list projection." },
|
|
66
|
+
{ long: "--fields", value_name: "value", value_type: "string", description: "Comma-separated list projection fields." },
|
|
67
|
+
{ long: "--sort", value_name: "value", value_type: "string", description: "Sort field." },
|
|
68
|
+
{ long: "--order", value_name: "value", value_type: "string", description: "Sort order." },
|
|
69
|
+
{ long: "--dry-run", value_type: "boolean", description: "Preview normalize mutations without applying." },
|
|
70
|
+
{ long: "--apply", value_type: "boolean", description: "Apply normalize mutations." },
|
|
71
|
+
{ long: "--author", value_name: "value", value_type: "string", description: "Author used for apply-mode updates." },
|
|
72
|
+
{ long: "--message", value_name: "value", value_type: "string", description: "History message used for apply-mode updates." },
|
|
73
|
+
{ long: "--force", value_type: "boolean", description: "Force apply-mode updates." },
|
|
74
|
+
{ long: "--allow-audit-update", value_type: "boolean", description: "Allow append-only audit updates across owners." },
|
|
75
|
+
{ long: "--allow_audit_update", value_type: "boolean", description: "Alias for --allow-audit-update." },
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
function dedupeAuditCommand() {
|
|
79
|
+
return {
|
|
80
|
+
name: "dedupe-audit",
|
|
81
|
+
action: "dedupe-audit",
|
|
82
|
+
description: "Audit likely duplicate items by title and parent scope heuristics.",
|
|
83
|
+
flags: [...dedupeAuditFlags],
|
|
84
|
+
run: async (context) => runDedupeAuditPackage(context.options, context.global),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function commentsAuditCommand() {
|
|
89
|
+
return {
|
|
90
|
+
name: "comments-audit",
|
|
91
|
+
action: "comments-audit",
|
|
92
|
+
description: "Audit item comment coverage and export comment history rows.",
|
|
93
|
+
flags: [...commentsAuditFlags],
|
|
94
|
+
run: async (context) => runCommentsAuditPackage(context.options, context.global),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function normalizeCommand() {
|
|
99
|
+
return {
|
|
100
|
+
name: "normalize",
|
|
101
|
+
action: "normalize",
|
|
102
|
+
description: "Plan/apply lifecycle metadata normalization sweeps.",
|
|
103
|
+
flags: [...normalizeFlags],
|
|
104
|
+
run: async (context) => runNormalizePackage(context.options, context.global),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function activate(api) {
|
|
109
|
+
api.registerCommand(dedupeAuditCommand());
|
|
110
|
+
api.registerCommand(commentsAuditCommand());
|
|
111
|
+
api.registerCommand(normalizeCommand());
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export default {
|
|
115
|
+
manifest,
|
|
116
|
+
activate,
|
|
117
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { CommandDefinition, ExtensionApi } from "../../../../src/sdk/index.js";
|
|
2
|
+
import {
|
|
3
|
+
runCommentsAuditPackage,
|
|
4
|
+
runDedupeAuditPackage,
|
|
5
|
+
runNormalizePackage,
|
|
6
|
+
} from "./runtime.js";
|
|
7
|
+
|
|
8
|
+
export const manifest = {
|
|
9
|
+
name: "builtin-governance-audit",
|
|
10
|
+
version: "0.1.0",
|
|
11
|
+
entry: "./index.js",
|
|
12
|
+
priority: 0,
|
|
13
|
+
capabilities: ["commands", "schema"],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const dedupeAuditFlags = [
|
|
17
|
+
{ long: "--mode", value_name: "value", value_type: "string", description: "Audit mode: title_exact|title_fuzzy|parent_scope." },
|
|
18
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
19
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
20
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
21
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
22
|
+
{ long: "--deadline-before", value_name: "value", value_type: "string", description: "Filter by deadline upper bound." },
|
|
23
|
+
{ long: "--deadline-after", value_name: "value", value_type: "string", description: "Filter by deadline lower bound." },
|
|
24
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
25
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
26
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
27
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
28
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
29
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit analyzed items." },
|
|
30
|
+
{ long: "--threshold", value_name: "value", value_type: "string", description: "Similarity threshold for fuzzy modes." },
|
|
31
|
+
] as const;
|
|
32
|
+
|
|
33
|
+
const commentsAuditFlags = [
|
|
34
|
+
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
35
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
36
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
37
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
38
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
39
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
40
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
41
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
42
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
43
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit output rows." },
|
|
44
|
+
{ long: "--limit-items", value_name: "n", value_type: "string", description: "Limit scanned items before comment expansion." },
|
|
45
|
+
{ long: "--latest", value_name: "n", value_type: "string", description: "Include latest n comments per item." },
|
|
46
|
+
{ long: "--full-history", value_type: "boolean", description: "Emit full comment history rows." },
|
|
47
|
+
] as const;
|
|
48
|
+
|
|
49
|
+
const normalizeFlags = [
|
|
50
|
+
{ long: "--filter-status", value_name: "value", value_type: "string", description: "Status filter applied before normalize planning." },
|
|
51
|
+
{ long: "--filter_status", value_name: "value", value_type: "string", description: "Alias for --filter-status." },
|
|
52
|
+
{ long: "--type", value_name: "value", value_type: "string", description: "Filter by item type." },
|
|
53
|
+
{ long: "--tag", value_name: "value", value_type: "string", description: "Filter by tag." },
|
|
54
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Filter by priority." },
|
|
55
|
+
{ long: "--deadline-before", value_name: "value", value_type: "string", description: "Filter by deadline upper bound." },
|
|
56
|
+
{ long: "--deadline-after", value_name: "value", value_type: "string", description: "Filter by deadline lower bound." },
|
|
57
|
+
{ long: "--assignee", value_name: "value", value_type: "string", description: "Filter by assignee." },
|
|
58
|
+
{ long: "--assignee-filter", value_name: "value", value_type: "string", description: "Filter assignee presence." },
|
|
59
|
+
{ long: "--parent", value_name: "value", value_type: "string", description: "Filter by parent item ID." },
|
|
60
|
+
{ long: "--sprint", value_name: "value", value_type: "string", description: "Filter by sprint." },
|
|
61
|
+
{ long: "--release", value_name: "value", value_type: "string", description: "Filter by release." },
|
|
62
|
+
{ long: "--limit", value_name: "n", value_type: "string", description: "Limit listed items." },
|
|
63
|
+
{ long: "--offset", value_name: "n", value_type: "string", description: "Skip first n listed items." },
|
|
64
|
+
{ long: "--include-body", value_type: "boolean", description: "Include body while listing candidate items." },
|
|
65
|
+
{ long: "--include_body", value_type: "boolean", description: "Alias for --include-body." },
|
|
66
|
+
{ long: "--compact", value_type: "boolean", description: "Request compact list projection." },
|
|
67
|
+
{ long: "--fields", value_name: "value", value_type: "string", description: "Comma-separated list projection fields." },
|
|
68
|
+
{ long: "--sort", value_name: "value", value_type: "string", description: "Sort field." },
|
|
69
|
+
{ long: "--order", value_name: "value", value_type: "string", description: "Sort order." },
|
|
70
|
+
{ long: "--dry-run", value_type: "boolean", description: "Preview normalize mutations without applying." },
|
|
71
|
+
{ long: "--apply", value_type: "boolean", description: "Apply normalize mutations." },
|
|
72
|
+
{ long: "--author", value_name: "value", value_type: "string", description: "Author used for apply-mode updates." },
|
|
73
|
+
{ long: "--message", value_name: "value", value_type: "string", description: "History message used for apply-mode updates." },
|
|
74
|
+
{ long: "--force", value_type: "boolean", description: "Force apply-mode updates." },
|
|
75
|
+
{ long: "--allow-audit-update", value_type: "boolean", description: "Allow append-only audit updates across owners." },
|
|
76
|
+
{ long: "--allow_audit_update", value_type: "boolean", description: "Alias for --allow-audit-update." },
|
|
77
|
+
] as const;
|
|
78
|
+
|
|
79
|
+
function dedupeAuditCommand(): CommandDefinition {
|
|
80
|
+
return {
|
|
81
|
+
name: "dedupe-audit",
|
|
82
|
+
action: "dedupe-audit",
|
|
83
|
+
description: "Audit likely duplicate items by title and parent scope heuristics.",
|
|
84
|
+
flags: [...dedupeAuditFlags],
|
|
85
|
+
run: async (context) => runDedupeAuditPackage(context.options, context.global),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function commentsAuditCommand(): CommandDefinition {
|
|
90
|
+
return {
|
|
91
|
+
name: "comments-audit",
|
|
92
|
+
action: "comments-audit",
|
|
93
|
+
description: "Audit item comment coverage and export comment history rows.",
|
|
94
|
+
flags: [...commentsAuditFlags],
|
|
95
|
+
run: async (context) => runCommentsAuditPackage(context.options, context.global),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function normalizeCommand(): CommandDefinition {
|
|
100
|
+
return {
|
|
101
|
+
name: "normalize",
|
|
102
|
+
action: "normalize",
|
|
103
|
+
description: "Plan/apply lifecycle metadata normalization sweeps.",
|
|
104
|
+
flags: [...normalizeFlags],
|
|
105
|
+
run: async (context) => runNormalizePackage(context.options, context.global),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function activate(api: ExtensionApi): void {
|
|
110
|
+
api.registerCommand(dedupeAuditCommand());
|
|
111
|
+
api.registerCommand(commentsAuditCommand());
|
|
112
|
+
api.registerCommand(normalizeCommand());
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export default {
|
|
116
|
+
manifest,
|
|
117
|
+
activate,
|
|
118
|
+
};
|