@proletariat/cli 0.3.8 → 0.3.9
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/LICENSE +21 -0
- package/bin/dev.js +0 -0
- package/dist/commands/branch/where.d.ts +21 -0
- package/dist/commands/branch/where.js +213 -0
- package/dist/commands/pmo/init.js +23 -5
- package/dist/commands/project/create.js +9 -10
- package/dist/commands/whoami.d.ts +1 -0
- package/dist/commands/whoami.js +36 -6
- package/dist/commands/work/start.js +11 -0
- package/dist/lib/database/index.d.ts +6 -0
- package/dist/lib/database/index.js +38 -0
- package/dist/lib/execution/devcontainer.js +3 -0
- package/dist/lib/execution/runners.js +3 -2
- package/dist/lib/execution/spawner.d.ts +3 -1
- package/dist/lib/execution/spawner.js +9 -2
- package/dist/lib/execution/storage.d.ts +14 -0
- package/dist/lib/execution/storage.js +88 -0
- package/dist/lib/pmo/index.d.ts +7 -21
- package/dist/lib/pmo/index.js +22 -101
- package/dist/lib/pmo/storage/base.d.ts +2 -2
- package/dist/lib/pmo/storage/base.js +14 -89
- package/dist/lib/pmo/templates-builtin.d.ts +66 -0
- package/dist/lib/pmo/templates-builtin.js +192 -0
- package/dist/lib/themes.js +4 -4
- package/oclif.manifest.json +3378 -3331
- package/package.json +4 -6
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builtin workflow templates - single source of truth.
|
|
3
|
+
*
|
|
4
|
+
* This file defines all builtin templates used by:
|
|
5
|
+
* - UI prompts (template selection menu)
|
|
6
|
+
* - Database seeding (pmo_templates table)
|
|
7
|
+
* - Board column creation
|
|
8
|
+
* - Work command column mappings
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* All builtin workflow templates.
|
|
12
|
+
*
|
|
13
|
+
* This is the SINGLE SOURCE OF TRUTH for:
|
|
14
|
+
* - Database seeding (seedBuiltinWorkflows reads from this)
|
|
15
|
+
* - UI template picker
|
|
16
|
+
* - Board column creation
|
|
17
|
+
* - Work command column mappings
|
|
18
|
+
*
|
|
19
|
+
* To add a new template:
|
|
20
|
+
* 1. Add it to this array
|
|
21
|
+
* 2. That's it - UI and DB will pick it up automatically
|
|
22
|
+
*/
|
|
23
|
+
export const BUILTIN_TEMPLATES = [
|
|
24
|
+
{
|
|
25
|
+
id: 'default',
|
|
26
|
+
name: 'Default',
|
|
27
|
+
description: 'Default workflow: Backlog → Ready → In Progress → Review → Done',
|
|
28
|
+
columns: ['Backlog', 'Ready', 'In Progress', 'Review', 'Done'],
|
|
29
|
+
statuses: [
|
|
30
|
+
{ name: 'Backlog', category: 'backlog', position: 0 },
|
|
31
|
+
{ name: 'Ready', category: 'unstarted', position: 1 },
|
|
32
|
+
{ name: 'In Progress', category: 'started', position: 2 },
|
|
33
|
+
{ name: 'Review', category: 'started', position: 3 },
|
|
34
|
+
{ name: 'Done', category: 'completed', position: 4 },
|
|
35
|
+
],
|
|
36
|
+
columnSettings: {
|
|
37
|
+
column_planned: 'Ready',
|
|
38
|
+
column_in_progress: 'In Progress',
|
|
39
|
+
column_done: 'Done',
|
|
40
|
+
},
|
|
41
|
+
showInPicker: false, // Internal default, not shown in picker
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'kanban',
|
|
45
|
+
name: 'Kanban',
|
|
46
|
+
description: 'Simple kanban workflow: Backlog → To Do → In Progress → Done',
|
|
47
|
+
columns: ['Backlog', 'To Do', 'In Progress', 'Done', 'Canceled'],
|
|
48
|
+
statuses: [
|
|
49
|
+
{ name: 'Backlog', category: 'backlog', position: 0 },
|
|
50
|
+
{ name: 'To Do', category: 'unstarted', position: 1 },
|
|
51
|
+
{ name: 'In Progress', category: 'started', position: 2 },
|
|
52
|
+
{ name: 'Done', category: 'completed', position: 3 },
|
|
53
|
+
{ name: 'Canceled', category: 'canceled', position: 4 },
|
|
54
|
+
],
|
|
55
|
+
columnSettings: {
|
|
56
|
+
column_planned: 'To Do',
|
|
57
|
+
column_in_progress: 'In Progress',
|
|
58
|
+
column_done: 'Done',
|
|
59
|
+
},
|
|
60
|
+
showInPicker: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'linear',
|
|
64
|
+
name: 'Linear',
|
|
65
|
+
description: 'Linear-style workflow with triage and review stages',
|
|
66
|
+
columns: ['Backlog', 'Triage', 'Todo', 'In Progress', 'In Review', 'Done', 'Canceled'],
|
|
67
|
+
statuses: [
|
|
68
|
+
{ name: 'Backlog', category: 'backlog', position: 0 },
|
|
69
|
+
{ name: 'Triage', category: 'backlog', position: 1 },
|
|
70
|
+
{ name: 'Todo', category: 'unstarted', position: 2 },
|
|
71
|
+
{ name: 'In Progress', category: 'started', position: 3 },
|
|
72
|
+
{ name: 'In Review', category: 'started', position: 4 },
|
|
73
|
+
{ name: 'Done', category: 'completed', position: 5 },
|
|
74
|
+
{ name: 'Canceled', category: 'canceled', position: 6 },
|
|
75
|
+
],
|
|
76
|
+
columnSettings: {
|
|
77
|
+
column_planned: 'Todo',
|
|
78
|
+
column_in_progress: 'In Progress',
|
|
79
|
+
column_done: 'Done',
|
|
80
|
+
},
|
|
81
|
+
showInPicker: true,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: '5-tool-founder',
|
|
85
|
+
name: '5-Tool Founder',
|
|
86
|
+
description: 'Founder workflow: Ship, Grow, Support, Strategy, BizOps backlogs → In Progress → Review → Done',
|
|
87
|
+
columns: ['Ship', 'Grow', 'Support', 'Strategy', 'BizOps', 'In Progress', 'Review', 'Done'],
|
|
88
|
+
statuses: [
|
|
89
|
+
{ name: 'Ship', category: 'backlog', position: 0 },
|
|
90
|
+
{ name: 'Grow', category: 'backlog', position: 1 },
|
|
91
|
+
{ name: 'Support', category: 'backlog', position: 2 },
|
|
92
|
+
{ name: 'Strategy', category: 'backlog', position: 3 },
|
|
93
|
+
{ name: 'BizOps', category: 'backlog', position: 4 },
|
|
94
|
+
{ name: 'In Progress', category: 'started', position: 5 },
|
|
95
|
+
{ name: 'Review', category: 'started', position: 6 },
|
|
96
|
+
{ name: 'Done', category: 'completed', position: 7 },
|
|
97
|
+
],
|
|
98
|
+
columnSettings: {
|
|
99
|
+
column_planned: 'Ship',
|
|
100
|
+
column_in_progress: 'In Progress',
|
|
101
|
+
column_done: 'Done',
|
|
102
|
+
},
|
|
103
|
+
showInPicker: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'bug-smash',
|
|
107
|
+
name: 'Bug Smash',
|
|
108
|
+
description: 'Bug tracking workflow with verification stages',
|
|
109
|
+
columns: ['Reported', 'Confirmed', 'Fixing', 'Verifying', 'Fixed', "Won't Fix"],
|
|
110
|
+
statuses: [
|
|
111
|
+
{ name: 'Reported', category: 'backlog', position: 0 },
|
|
112
|
+
{ name: 'Confirmed', category: 'unstarted', position: 1 },
|
|
113
|
+
{ name: 'Fixing', category: 'started', position: 2 },
|
|
114
|
+
{ name: 'Verifying', category: 'started', position: 3 },
|
|
115
|
+
{ name: 'Fixed', category: 'completed', position: 4 },
|
|
116
|
+
{ name: "Won't Fix", category: 'canceled', position: 5 },
|
|
117
|
+
],
|
|
118
|
+
columnSettings: {
|
|
119
|
+
column_planned: 'Confirmed',
|
|
120
|
+
column_in_progress: 'Fixing',
|
|
121
|
+
column_done: 'Fixed',
|
|
122
|
+
},
|
|
123
|
+
showInPicker: false, // Specialized template
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 'gtm',
|
|
127
|
+
name: 'GTM',
|
|
128
|
+
description: 'Go-to-market workflow for launches and campaigns',
|
|
129
|
+
columns: ['Ideation', 'Planning', 'In Development', 'Ready to Launch', 'Launched', 'Retired'],
|
|
130
|
+
statuses: [
|
|
131
|
+
{ name: 'Ideation', category: 'backlog', position: 0 },
|
|
132
|
+
{ name: 'Planning', category: 'unstarted', position: 1 },
|
|
133
|
+
{ name: 'In Development', category: 'started', position: 2 },
|
|
134
|
+
{ name: 'Ready to Launch', category: 'started', position: 3 },
|
|
135
|
+
{ name: 'Launched', category: 'completed', position: 4 },
|
|
136
|
+
{ name: 'Retired', category: 'canceled', position: 5 },
|
|
137
|
+
],
|
|
138
|
+
columnSettings: {
|
|
139
|
+
column_planned: 'Planning',
|
|
140
|
+
column_in_progress: 'In Development',
|
|
141
|
+
column_done: 'Launched',
|
|
142
|
+
},
|
|
143
|
+
showInPicker: false, // Specialized template
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
/**
|
|
147
|
+
* Get a template by ID.
|
|
148
|
+
*/
|
|
149
|
+
export function getBuiltinTemplate(id) {
|
|
150
|
+
return BUILTIN_TEMPLATES.find(t => t.id === id);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get templates that should be shown in the init picker.
|
|
154
|
+
*/
|
|
155
|
+
export function getPickerTemplates() {
|
|
156
|
+
return BUILTIN_TEMPLATES.filter(t => t.showInPicker);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get columns for a template (for backward compatibility).
|
|
160
|
+
*/
|
|
161
|
+
export function getColumnsForTemplate(templateId) {
|
|
162
|
+
const template = getBuiltinTemplate(templateId);
|
|
163
|
+
if (template) {
|
|
164
|
+
return template.columns;
|
|
165
|
+
}
|
|
166
|
+
// Default columns for unknown templates
|
|
167
|
+
return ['Backlog', 'Planned', 'In Progress', 'Done'];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get column settings for a template (for backward compatibility).
|
|
171
|
+
*/
|
|
172
|
+
export function getColumnSettingsForTemplate(templateId, columns) {
|
|
173
|
+
const template = getBuiltinTemplate(templateId);
|
|
174
|
+
if (template) {
|
|
175
|
+
return template.columnSettings;
|
|
176
|
+
}
|
|
177
|
+
// For custom/unknown templates, try to find matching columns by keyword
|
|
178
|
+
const findColumn = (keywords, fallback) => {
|
|
179
|
+
const lowerColumns = columns.map(c => c.toLowerCase());
|
|
180
|
+
for (const keyword of keywords) {
|
|
181
|
+
const idx = lowerColumns.findIndex(c => c.includes(keyword));
|
|
182
|
+
if (idx !== -1)
|
|
183
|
+
return columns[idx];
|
|
184
|
+
}
|
|
185
|
+
return fallback;
|
|
186
|
+
};
|
|
187
|
+
return {
|
|
188
|
+
column_planned: findColumn(['planned', 'ready', 'scheduled', 'todo'], columns[1] || 'Planned'),
|
|
189
|
+
column_in_progress: findColumn(['progress', 'active', 'doing', 'working'], columns[2] || 'In Progress'),
|
|
190
|
+
column_done: findColumn(['done', 'complete', 'finished', 'published', 'shipped'], columns[columns.length - 1] || 'Done'),
|
|
191
|
+
};
|
|
192
|
+
}
|
package/dist/lib/themes.js
CHANGED
|
@@ -107,8 +107,8 @@ export const BUILTIN_THEMES = [
|
|
|
107
107
|
name: 'toyotas',
|
|
108
108
|
displayName: 'Toyota Garage',
|
|
109
109
|
description: 'Reliable workhorses for your project',
|
|
110
|
-
persistentDir: '
|
|
111
|
-
ephemeralDir: '
|
|
110
|
+
persistentDir: 'staff',
|
|
111
|
+
ephemeralDir: 'temp',
|
|
112
112
|
names: [
|
|
113
113
|
// Classic & current models
|
|
114
114
|
'4runner', 'avalon', 'camry', 'celica', 'corolla', 'cressida',
|
|
@@ -131,8 +131,8 @@ export const BUILTIN_THEMES = [
|
|
|
131
131
|
name: 'companies',
|
|
132
132
|
displayName: 'Company Portfolio',
|
|
133
133
|
description: 'Your corporate portfolio',
|
|
134
|
-
persistentDir: '
|
|
135
|
-
ephemeralDir: '
|
|
134
|
+
persistentDir: 'staff',
|
|
135
|
+
ephemeralDir: 'temp',
|
|
136
136
|
names: [
|
|
137
137
|
// Major tech companies
|
|
138
138
|
'adobe', 'airbnb', 'amazon', 'apple', 'atlassian', 'cisco',
|