pm-presets 2026.5.29 → 2026.5.30
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/README.md +14 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -6
- package/dist/index.js.map +1 -1
- package/dist/presets/bug-triage/index.d.ts +21 -32
- package/dist/presets/bug-triage/index.d.ts.map +1 -1
- package/dist/presets/bug-triage/index.js +61 -154
- package/dist/presets/bug-triage/index.js.map +1 -1
- package/dist/presets/indie-dev/index.d.ts +19 -17
- package/dist/presets/indie-dev/index.d.ts.map +1 -1
- package/dist/presets/indie-dev/index.js +30 -93
- package/dist/presets/indie-dev/index.js.map +1 -1
- package/dist/presets/open-source/index.d.ts +19 -37
- package/dist/presets/open-source/index.d.ts.map +1 -1
- package/dist/presets/open-source/index.js +49 -131
- package/dist/presets/open-source/index.js.map +1 -1
- package/dist/presets/shared.d.ts +77 -0
- package/dist/presets/shared.d.ts.map +1 -0
- package/dist/presets/shared.js +305 -0
- package/dist/presets/shared.js.map +1 -0
- package/dist/presets/software-sprint/index.d.ts +22 -17
- package/dist/presets/software-sprint/index.d.ts.map +1 -1
- package/dist/presets/software-sprint/index.js +70 -149
- package/dist/presets/software-sprint/index.js.map +1 -1
- package/dist/presets/startup-roadmap/index.d.ts +22 -36
- package/dist/presets/startup-roadmap/index.d.ts.map +1 -1
- package/dist/presets/startup-roadmap/index.js +52 -152
- package/dist/presets/startup-roadmap/index.js.map +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/registry.js.map +1 -1
- package/manifest.json +3 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ pm install github.com/unbraind/pm-presets --project
|
|
|
12
12
|
|
|
13
13
|
| Preset | Command | Governance | Best For |
|
|
14
14
|
|---|---|---|---|
|
|
15
|
-
| **bug-triage** | `pm triage-setup` | strict | Incident response, triage teams |
|
|
15
|
+
| **bug-triage** | `pm triage-setup` | custom strict-close | Incident response, triage teams |
|
|
16
16
|
| **indie-dev** | `pm indie-setup` | minimal | Solo developers, personal projects |
|
|
17
17
|
| **open-source** | `pm oss-setup` | standard | OSS maintainers with community contributors |
|
|
18
18
|
| **software-sprint** | `pm sprint-setup` | standard | Engineering teams running sprints |
|
|
19
|
-
| **startup-roadmap** | `pm roadmap-setup` |
|
|
19
|
+
| **startup-roadmap** | `pm roadmap-setup` | custom | Startups with investor-facing roadmaps |
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
@@ -40,15 +40,19 @@ All commands share the same flags:
|
|
|
40
40
|
|
|
41
41
|
| Flag | Short | Description |
|
|
42
42
|
|---|---|---|
|
|
43
|
-
| `--force` | `-f` | Overwrite existing
|
|
43
|
+
| `--force` | `-f` | Overwrite existing preset template files |
|
|
44
44
|
| `--dry-run` | `-n` | Preview changes without writing any files |
|
|
45
45
|
| `--prefix` | `-p` | Override the id_prefix in settings.json |
|
|
46
46
|
|
|
47
|
+
Each setup command installs valid `pm create` templates and registers the
|
|
48
|
+
`templates show` runtime handler required by the current pm CLI, so
|
|
49
|
+
`pm create --template <name>` works after installing and applying this package.
|
|
50
|
+
|
|
47
51
|
## Presets in Detail
|
|
48
52
|
|
|
49
53
|
### bug-triage
|
|
50
54
|
|
|
51
|
-
**Governance:** strict —
|
|
55
|
+
**Governance:** custom strict-close — progressive creation with strict ownership and close validation.
|
|
52
56
|
|
|
53
57
|
**Templates:** `incident`, `hotfix-task`, `regression`
|
|
54
58
|
|
|
@@ -116,7 +120,7 @@ pm create --template bug
|
|
|
116
120
|
|
|
117
121
|
### startup-roadmap
|
|
118
122
|
|
|
119
|
-
**Governance:**
|
|
123
|
+
**Governance:** custom with rich metadata — captures business value and strategic context.
|
|
120
124
|
|
|
121
125
|
**Templates:** `initiative`, `feature`, `milestone`
|
|
122
126
|
|
|
@@ -137,11 +141,11 @@ If you previously installed individual `pm-preset-*` packages, uninstall them
|
|
|
137
141
|
and install `pm-presets` instead:
|
|
138
142
|
|
|
139
143
|
```bash
|
|
140
|
-
pm uninstall pm-preset-bug-triage
|
|
141
|
-
pm uninstall pm-preset-indie-dev
|
|
142
|
-
pm uninstall pm-preset-open-source
|
|
143
|
-
pm uninstall pm-preset-software-sprint
|
|
144
|
-
pm uninstall pm-preset-startup-roadmap
|
|
144
|
+
pm package uninstall pm-preset-bug-triage --project
|
|
145
|
+
pm package uninstall pm-preset-indie-dev --project
|
|
146
|
+
pm package uninstall pm-preset-open-source --project
|
|
147
|
+
pm package uninstall pm-preset-software-sprint --project
|
|
148
|
+
pm package uninstall pm-preset-startup-roadmap --project
|
|
145
149
|
|
|
146
150
|
pm install github.com/unbraind/pm-presets --project
|
|
147
151
|
```
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;AAuCH,wBA+EG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,25 +16,31 @@
|
|
|
16
16
|
import { runBugTriageSetup } from "./presets/bug-triage/index.js";
|
|
17
17
|
import { runIndieDevSetup } from "./presets/indie-dev/index.js";
|
|
18
18
|
import { runOpenSourceSetup } from "./presets/open-source/index.js";
|
|
19
|
+
import { runTemplatesList, runTemplatesShow } from "./presets/shared.js";
|
|
19
20
|
import { runSoftwareSprintSetup } from "./presets/software-sprint/index.js";
|
|
20
21
|
import { runStartupRoadmapSetup } from "./presets/startup-roadmap/index.js";
|
|
21
22
|
const defineExtension = ((extension) => extension);
|
|
23
|
+
// pm-cli's loose-option matcher (extension-command-options.ts) only recognizes
|
|
24
|
+
// flag definitions whose `long`/`short` include their dash prefixes. Declaring
|
|
25
|
+
// `long: "dry-run"` (no `--`) makes the flag invisible to `--help` AND rejected
|
|
26
|
+
// at parse time as "Unknown option". Always include the prefixes.
|
|
22
27
|
const COMMON_FLAGS = [
|
|
23
28
|
{
|
|
24
|
-
long: "force",
|
|
25
|
-
short: "f",
|
|
29
|
+
long: "--force",
|
|
30
|
+
short: "-f",
|
|
26
31
|
type: "boolean",
|
|
27
32
|
description: "Overwrite existing settings.json and template files without prompting.",
|
|
28
33
|
},
|
|
29
34
|
{
|
|
30
|
-
long: "dry-run",
|
|
31
|
-
short: "n",
|
|
35
|
+
long: "--dry-run",
|
|
36
|
+
short: "-n",
|
|
32
37
|
type: "boolean",
|
|
33
38
|
description: "Preview what would be written without making any changes.",
|
|
34
39
|
},
|
|
35
40
|
{
|
|
36
|
-
long: "prefix",
|
|
37
|
-
short: "p",
|
|
41
|
+
long: "--prefix",
|
|
42
|
+
short: "-p",
|
|
43
|
+
value_name: "<prefix>",
|
|
38
44
|
type: "string",
|
|
39
45
|
description: "Override the id_prefix written to settings.json.",
|
|
40
46
|
},
|
|
@@ -76,6 +82,35 @@ export default defineExtension({
|
|
|
76
82
|
flags: COMMON_FLAGS,
|
|
77
83
|
run: runStartupRoadmapSetup,
|
|
78
84
|
});
|
|
85
|
+
// ── create-template runtime ─────────────────────────────────────────────
|
|
86
|
+
// pm create --template resolves through a package-owned "templates show"
|
|
87
|
+
// command. pm-presets provides the handler for templates it installs so
|
|
88
|
+
// presets work without requiring users to install a second package.
|
|
89
|
+
api.registerCommand({
|
|
90
|
+
name: "templates",
|
|
91
|
+
action: "templates-list",
|
|
92
|
+
description: "List create templates installed in this pm workspace.",
|
|
93
|
+
run: runTemplatesList,
|
|
94
|
+
});
|
|
95
|
+
api.registerCommand({
|
|
96
|
+
name: "templates list",
|
|
97
|
+
action: "templates-list",
|
|
98
|
+
description: "List create templates installed in this pm workspace.",
|
|
99
|
+
run: runTemplatesList,
|
|
100
|
+
});
|
|
101
|
+
api.registerCommand({
|
|
102
|
+
name: "templates show",
|
|
103
|
+
action: "templates-show",
|
|
104
|
+
description: "Show a create template installed in this pm workspace.",
|
|
105
|
+
arguments: [
|
|
106
|
+
{
|
|
107
|
+
name: "name",
|
|
108
|
+
required: true,
|
|
109
|
+
description: "Template name.",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
run: runTemplatesShow,
|
|
113
|
+
});
|
|
79
114
|
},
|
|
80
115
|
});
|
|
81
116
|
// Re-export public API
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,MAAM,eAAe,GAA+B,CAAC,CAAC,SAAc,EAAE,EAAE,CAAC,SAAS,CAAQ,CAAC;AAE3F,MAAM,YAAY,GAAG;IACnB;QACE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACz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AE,cAAc;YACpB,WAAW,EACT,gGAAgG;YAClG,KAAK,EAAE,YAAY;YACnB,GAAG,EAAE,sBAAsB;SAC5B,CAAC,CAAC;QAEH,2EAA2E;QAC3E,GAAG,CAAC,eAAe,CAAC;YAClB,IAAI,EAAE,eAAe;YACrB,WAAW,EACT,6GAA6G;YAC/G,KAAK,EAAE,YAAY;YACnB,GAAG,EAAE,sBAAsB;SAC5B,CAAC,CAAC;QAEH,2EAA2E;QAC3E,yEAAyE;QACzE,wEAAwE;QACxE,oEAAoE;QACpE,GAAG,CAAC,eAAe,CAAC;YAClB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,gBAAgB;YACxB,WAAW,EAAE,uDAAuD;YACpE,GAAG,EAAE,gBAAgB;SACtB,CAAC,CAAC;QAEH,GAAG,CAAC,eAAe,CAAC;YAClB,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,gBAAgB;YACxB,WAAW,EAAE,uDAAuD;YACpE,GAAG,EAAE,gBAAgB;SACtB,CAAC,CAAC;QAEH,GAAG,CAAC,eAAe,CAAC;YAClB,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,gBAAgB;YACxB,WAAW,EAAE,wDAAwD;YACrE,SAAS,EAAE;gBACT;oBACE,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,gBAAgB;iBAC9B;aACF;YACD,GAAG,EAAE,gBAAgB;SACtB,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,uBAAuB;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,40 +1,29 @@
|
|
|
1
1
|
import type { CommandHandlerContext } from "@unbrained/pm-cli/sdk";
|
|
2
2
|
export declare const SETTINGS: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
id_prefix: string;
|
|
4
|
+
governance: {
|
|
5
|
+
preset: "custom";
|
|
6
|
+
ownership_enforcement: "strict";
|
|
7
|
+
create_mode_default: "progressive";
|
|
8
|
+
close_validation_default: "strict";
|
|
9
|
+
parent_reference: "strict_error";
|
|
10
|
+
metadata_profile: "strict";
|
|
11
|
+
force_required_for_stale_lock: true;
|
|
12
|
+
create_default_type: string;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
validation: {
|
|
15
|
+
sprint_release_format: "strict_error";
|
|
16
|
+
parent_reference: "warn";
|
|
17
|
+
metadata_profile: "strict";
|
|
14
18
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readonly name: "Issue";
|
|
18
|
-
readonly description: "A defect, incident, or regression requiring investigation and resolution";
|
|
19
|
-
}, {
|
|
20
|
-
readonly name: "Task";
|
|
21
|
-
readonly description: "A remediation, hotfix, or follow-up task linked to an incident";
|
|
22
|
-
}];
|
|
23
|
-
};
|
|
24
|
-
readonly testing: {
|
|
25
|
-
readonly record_results_to_items: true;
|
|
26
|
-
};
|
|
27
|
-
readonly search: {
|
|
28
|
-
readonly mode: "keyword";
|
|
29
|
-
};
|
|
30
|
-
readonly calendar: {
|
|
31
|
-
readonly default_view: "agenda";
|
|
32
|
-
readonly first_day_of_week: 1;
|
|
33
|
-
};
|
|
34
|
-
readonly telemetry: {
|
|
35
|
-
readonly enabled: false;
|
|
19
|
+
testing: {
|
|
20
|
+
record_results_to_items: true;
|
|
36
21
|
};
|
|
37
22
|
};
|
|
38
|
-
export declare const TEMPLATES:
|
|
23
|
+
export declare const TEMPLATES: {
|
|
24
|
+
"incident.json": import("../shared.js").StoredCreateTemplateDocument;
|
|
25
|
+
"hotfix-task.json": import("../shared.js").StoredCreateTemplateDocument;
|
|
26
|
+
"regression.json": import("../shared.js").StoredCreateTemplateDocument;
|
|
27
|
+
};
|
|
39
28
|
export declare function runBugTriageSetup(context: CommandHandlerContext): void;
|
|
40
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presets/bug-triage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presets/bug-triage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AASnE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAoBU,CAAC;AAEhC,eAAO,MAAM,SAAS;;;;CAgDO,CAAC;AAE9B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAatE"}
|
|
@@ -1,172 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
// ─── Settings ────────────────────────────────────────────────────────────────
|
|
1
|
+
import { applyPreset, storedTemplate, } from "../shared.js";
|
|
4
2
|
export const SETTINGS = {
|
|
5
3
|
id_prefix: "bug-",
|
|
6
4
|
governance: {
|
|
7
|
-
preset: "
|
|
5
|
+
preset: "custom",
|
|
8
6
|
ownership_enforcement: "strict",
|
|
9
|
-
create_mode_default: "
|
|
7
|
+
create_mode_default: "progressive",
|
|
10
8
|
close_validation_default: "strict",
|
|
9
|
+
parent_reference: "strict_error",
|
|
11
10
|
metadata_profile: "strict",
|
|
11
|
+
force_required_for_stale_lock: true,
|
|
12
|
+
create_default_type: "Issue",
|
|
12
13
|
},
|
|
13
14
|
validation: {
|
|
14
15
|
sprint_release_format: "strict_error",
|
|
15
16
|
parent_reference: "warn",
|
|
17
|
+
metadata_profile: "strict",
|
|
16
18
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
name: "Issue",
|
|
21
|
-
description: "A defect, incident, or regression requiring investigation and resolution",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "Task",
|
|
25
|
-
description: "A remediation, hotfix, or follow-up task linked to an incident",
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
testing: { record_results_to_items: true },
|
|
30
|
-
search: { mode: "keyword" },
|
|
31
|
-
calendar: { default_view: "agenda", first_day_of_week: 1 },
|
|
32
|
-
telemetry: { enabled: false },
|
|
33
|
-
};
|
|
34
|
-
// ─── Templates ───────────────────────────────────────────────────────────────
|
|
35
|
-
const TEMPLATE_INCIDENT = {
|
|
36
|
-
type: "Issue",
|
|
37
|
-
priority: "1",
|
|
38
|
-
tags: ["incident"],
|
|
39
|
-
meta: {
|
|
40
|
-
severity: "sev2",
|
|
41
|
-
environment: "production",
|
|
42
|
-
detected_at: "",
|
|
43
|
-
reported_by: "",
|
|
44
|
-
owner: "",
|
|
45
|
-
affected_systems: "",
|
|
46
|
-
affected_users: "",
|
|
47
|
-
steps_to_reproduce: "",
|
|
48
|
-
root_cause: "",
|
|
49
|
-
mitigation_applied: "",
|
|
50
|
-
resolution: "",
|
|
51
|
-
postmortem_url: "",
|
|
52
|
-
linked_hotfix: "",
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
const TEMPLATE_HOTFIX_TASK = {
|
|
56
|
-
type: "Task",
|
|
57
|
-
priority: "1",
|
|
58
|
-
tags: ["hotfix"],
|
|
59
|
-
meta: {
|
|
60
|
-
linked_incident: "",
|
|
61
|
-
assignee: "",
|
|
62
|
-
fix_description: "",
|
|
63
|
-
pr_link: "",
|
|
64
|
-
target_branch: "main",
|
|
65
|
-
deploy_target: "production",
|
|
66
|
-
rollback_plan: "",
|
|
67
|
-
reviewed_by: "",
|
|
68
|
-
deployed_at: "",
|
|
69
|
-
verified_by: "",
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
const TEMPLATE_REGRESSION = {
|
|
73
|
-
type: "Issue",
|
|
74
|
-
priority: "2",
|
|
75
|
-
tags: ["regression"],
|
|
76
|
-
meta: {
|
|
77
|
-
severity: "sev3",
|
|
78
|
-
environment: "",
|
|
79
|
-
introduced_in: "",
|
|
80
|
-
last_known_good_version: "",
|
|
81
|
-
steps_to_reproduce: "",
|
|
82
|
-
expected_behavior: "",
|
|
83
|
-
actual_behavior: "",
|
|
84
|
-
owner: "",
|
|
85
|
-
affected_tests: "",
|
|
86
|
-
root_cause: "",
|
|
87
|
-
fix_pr: "",
|
|
88
|
-
verified_fixed_in: "",
|
|
19
|
+
testing: {
|
|
20
|
+
record_results_to_items: true,
|
|
89
21
|
},
|
|
90
22
|
};
|
|
91
23
|
export const TEMPLATES = {
|
|
92
|
-
"incident.json":
|
|
93
|
-
|
|
94
|
-
|
|
24
|
+
"incident.json": storedTemplate("incident", {
|
|
25
|
+
type: "Issue",
|
|
26
|
+
priority: "1",
|
|
27
|
+
tags: "incident,production",
|
|
28
|
+
severity: "critical",
|
|
29
|
+
environment: "production",
|
|
30
|
+
customerImpact: "TBD",
|
|
31
|
+
component: "TBD",
|
|
32
|
+
reporter: "TBD",
|
|
33
|
+
reproSteps: "1. TBD",
|
|
34
|
+
expectedResult: "Service remains healthy for users.",
|
|
35
|
+
actualResult: "TBD",
|
|
36
|
+
acceptanceCriteria: "Impact is mitigated, root cause is documented, and a follow-up owner is assigned.",
|
|
37
|
+
body: "## Impact\nTBD\n\n## Timeline\nDetected at: TBD\nOwner: TBD\nAffected systems: TBD\n\n## Mitigation\nTBD\n\n## Root Cause\nTBD\n\n## Postmortem\nTBD\n",
|
|
38
|
+
}),
|
|
39
|
+
"hotfix-task.json": storedTemplate("hotfix-task", {
|
|
40
|
+
type: "Task",
|
|
41
|
+
priority: "1",
|
|
42
|
+
tags: "hotfix,incident",
|
|
43
|
+
assignee: "TBD",
|
|
44
|
+
reviewer: "TBD",
|
|
45
|
+
release: "production",
|
|
46
|
+
risk: "high",
|
|
47
|
+
acceptanceCriteria: "Fix is reviewed, deployed to the target environment, and rollback steps are documented.",
|
|
48
|
+
body: "## Fix\nTBD\n\n## Linked Incident\nTBD\n\n## Validation\nTBD\n\n## Target\nBranch: main\nDeploy target: production\n\n## Rollback Plan\nTBD\n\n## Pull Request\nTBD\n",
|
|
49
|
+
}),
|
|
50
|
+
"regression.json": storedTemplate("regression", {
|
|
51
|
+
type: "Issue",
|
|
52
|
+
priority: "2",
|
|
53
|
+
tags: "regression",
|
|
54
|
+
severity: "high",
|
|
55
|
+
environment: "TBD",
|
|
56
|
+
regression: "true",
|
|
57
|
+
affectedVersion: "TBD",
|
|
58
|
+
fixedVersion: "TBD",
|
|
59
|
+
reproSteps: "1. TBD",
|
|
60
|
+
expectedResult: "Previous known-good behavior is preserved.",
|
|
61
|
+
actualResult: "TBD",
|
|
62
|
+
acceptanceCriteria: "Regression is fixed, verified against the last known-good behavior, and covered by a test.",
|
|
63
|
+
body: "## Regression Summary\nTBD\n\n## Owner\nTBD\n\n## Introduced In\nTBD\n\n## Affected Tests\nTBD\n\n## Last Known Good\nTBD\n\n## Verification\nTBD\n",
|
|
64
|
+
}),
|
|
95
65
|
};
|
|
96
|
-
// ─── Command Handler ──────────────────────────────────────────────────────────
|
|
97
66
|
export function runBugTriageSetup(context) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
`Run "pm init" first to initialise a pm workspace in this project.`);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
// 2. Build settings (optionally override prefix)
|
|
113
|
-
const settings = prefixOverride !== undefined
|
|
114
|
-
? { ...SETTINGS, id_prefix: prefixOverride }
|
|
115
|
-
: SETTINGS;
|
|
116
|
-
if (isDryRun) {
|
|
117
|
-
console.log("[dry-run] Would write settings.json:");
|
|
118
|
-
console.log(JSON.stringify(settings, null, 2));
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
if (fs.existsSync(settingsPath) && !isForce) {
|
|
122
|
-
console.warn(`settings.json already exists at ${settingsPath}. ` +
|
|
123
|
-
`Use --force to overwrite.`);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
if (fs.existsSync(settingsPath) && isForce) {
|
|
127
|
-
console.warn(`Overwriting existing settings.json (--force)`);
|
|
128
|
-
}
|
|
129
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
|
|
130
|
-
console.log(`Wrote settings.json → ${settingsPath}`);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// 3. Create templates directory and write template files
|
|
134
|
-
if (isDryRun) {
|
|
135
|
-
console.log(`[dry-run] Would create directory: ${templatesDir}`);
|
|
136
|
-
for (const [filename, template] of Object.entries(TEMPLATES)) {
|
|
137
|
-
console.log(`[dry-run] Would write template: ${path.join(templatesDir, filename)}`);
|
|
138
|
-
console.log(JSON.stringify(template, null, 2));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
if (!fs.existsSync(templatesDir)) {
|
|
143
|
-
fs.mkdirSync(templatesDir, { recursive: true });
|
|
144
|
-
console.log(`Created templates directory → ${templatesDir}`);
|
|
145
|
-
}
|
|
146
|
-
for (const [filename, template] of Object.entries(TEMPLATES)) {
|
|
147
|
-
const templatePath = path.join(templatesDir, filename);
|
|
148
|
-
fs.writeFileSync(templatePath, JSON.stringify(template, null, 2) + "\n", "utf8");
|
|
149
|
-
console.log(`Wrote template → ${templatePath}`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// 4. Print next steps
|
|
153
|
-
console.log("");
|
|
154
|
-
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
155
|
-
console.log(" Bug triage preset applied. Next steps:");
|
|
156
|
-
console.log("");
|
|
157
|
-
console.log(" Create a new production incident:");
|
|
158
|
-
console.log(" pm create --template incident");
|
|
159
|
-
console.log("");
|
|
160
|
-
console.log(" Create a hotfix task (linked to an incident):");
|
|
161
|
-
console.log(" pm create --template hotfix-task");
|
|
162
|
-
console.log("");
|
|
163
|
-
console.log(" Track a regression:");
|
|
164
|
-
console.log(" pm create --template regression");
|
|
165
|
-
console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
|
|
166
|
-
console.log("");
|
|
167
|
-
// 5. Strict governance warning
|
|
168
|
-
console.warn("STRICT GOVERNANCE ACTIVE: All close operations require " +
|
|
169
|
-
"'root_cause' and 'resolution' metadata fields to be set. " +
|
|
170
|
-
"Items cannot be closed without this information.");
|
|
67
|
+
applyPreset(context, {
|
|
68
|
+
label: "Bug triage",
|
|
69
|
+
settings: SETTINGS,
|
|
70
|
+
templates: TEMPLATES,
|
|
71
|
+
nextSteps: [
|
|
72
|
+
'pm create --template incident --title "Investigate production incident"',
|
|
73
|
+
'pm create --template hotfix-task --title "Ship incident hotfix"',
|
|
74
|
+
'pm create --template regression --title "Fix regression"',
|
|
75
|
+
],
|
|
76
|
+
warning: "Strict governance is active: closing work requires complete resolution metadata.",
|
|
77
|
+
});
|
|
171
78
|
}
|
|
172
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presets/bug-triage/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presets/bug-triage/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,cAAc,GAGf,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,MAAM,EAAE,QAAQ;QAChB,qBAAqB,EAAE,QAAQ;QAC/B,mBAAmB,EAAE,aAAa;QAClC,wBAAwB,EAAE,QAAQ;QAClC,gBAAgB,EAAE,cAAc;QAChC,gBAAgB,EAAE,QAAQ;QAC1B,6BAA6B,EAAE,IAAI;QACnC,mBAAmB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;QAC9F,IAAI,EACF,qJAAqJ;KACxJ,CAAC;CACyB,CAAC;AAE9B,MAAM,UAAU,iBAAiB,CAAC,OAA8B;IAC9D,WAAW,CAAC,OAAO,EAAE;QACnB,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE;YACT,yEAAyE;YACzE,iEAAiE;YACjE,0DAA0D;SAC3D;QACD,OAAO,EACL,kFAAkF;KACrF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import type { CommandHandlerContext } from "@unbrained/pm-cli/sdk";
|
|
2
2
|
export declare const SETTINGS: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
id_prefix: string;
|
|
4
|
+
governance: {
|
|
5
|
+
preset: "minimal";
|
|
6
|
+
ownership_enforcement: "none";
|
|
7
|
+
create_mode_default: "progressive";
|
|
8
|
+
close_validation_default: "off";
|
|
9
|
+
metadata_profile: "core";
|
|
10
|
+
create_default_type: string;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
validation: {
|
|
13
|
+
sprint_release_format: "warn";
|
|
14
|
+
parent_reference: "warn";
|
|
15
|
+
metadata_profile: "core";
|
|
14
16
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
readonly telemetry: {
|
|
19
|
-
readonly enabled: false;
|
|
17
|
+
testing: {
|
|
18
|
+
record_results_to_items: false;
|
|
20
19
|
};
|
|
21
20
|
};
|
|
22
|
-
export declare const TEMPLATES:
|
|
23
|
-
|
|
21
|
+
export declare const TEMPLATES: {
|
|
22
|
+
"idea.json": import("../shared.js").StoredCreateTemplateDocument;
|
|
23
|
+
"task.json": import("../shared.js").StoredCreateTemplateDocument;
|
|
24
|
+
};
|
|
25
|
+
export declare function runIndieDevSetup(context: CommandHandlerContext): void;
|
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presets/indie-dev/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presets/indie-dev/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AASnE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;CAkBU,CAAC;AAEhC,eAAO,MAAM,SAAS;;;CAkBO,CAAC;AAE9B,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAUrE"}
|