create-pmos 0.626.0 → 0.627.0
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/package.json +14 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +13 -0
- package/workspace/guide/backlog.md +1 -1
- package/workspace/lib/sprint-overview.js +2 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-backlog.css +40 -40
- package/workspace/public/pm/bd-backlog.js +2 -2
- package/workspace/public/pm/bd-sprint.js +17 -17
- package/workspace/public/pm/bk-sprint.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.627.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.627.0",
|
|
38
|
+
"at": "2026-11-19T06:18:29.854Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1408,
|
|
43
|
+
"t": "Sprint band layout and theme names",
|
|
44
|
+
"s": "Sprint band layout and theme names",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.626.0",
|
|
38
51
|
"at": "2026-11-19T05:42:19.332Z",
|
|
@@ -441,19 +454,6 @@
|
|
|
441
454
|
"k": "fix"
|
|
442
455
|
}
|
|
443
456
|
]
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"v": "0.605.0",
|
|
447
|
-
"at": "2026-11-18T11:01:50.738Z",
|
|
448
|
-
"f": 4,
|
|
449
|
-
"prs": [
|
|
450
|
-
{
|
|
451
|
-
"n": 1350,
|
|
452
|
-
"t": "Delete a prototype version from the chat or the Viewer, with Undo",
|
|
453
|
-
"s": "Delete a prototype version from the chat or the Viewer, with Undo",
|
|
454
|
-
"k": "new"
|
|
455
|
-
}
|
|
456
|
-
]
|
|
457
457
|
}
|
|
458
458
|
]
|
|
459
459
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-19T06:18:25Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.627.0",
|
|
4
|
+
"at": "2026-11-19T06:18:29.854Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1408,
|
|
9
|
+
"t": "Sprint band layout and theme names",
|
|
10
|
+
"s": "Sprint band layout and theme names",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.626.0",
|
|
4
17
|
"at": "2026-11-19T05:42:19.332Z",
|
|
@@ -49,7 +49,7 @@ Press **This sprint** to see the current sprint above the list:
|
|
|
49
49
|
|
|
50
50
|
- **The sprint.** The sprint name, how many of its tickets move (In progress or In review), how many are to do, and how many are in no initiative. The line under the name says when PMOS last read Jira. An amber dot shows that the read is old. Press the read-again button to read Jira again. PMOS does not store the sprint dates, owners or story points, so the overview does not show them.
|
|
51
51
|
- **Themes.** PMOS groups the tickets by what their titles are about. Jira does not store themes, so they have the ✦ mark. Press a theme to show only its tickets in the list. Press it again, or press **Show all**, to show all the tickets again.
|
|
52
|
-
- **Sprint goals, Doing now and Planned next.** PMOS writes them from the tickets, not from the goal in Jira. A short PMOS session reads only the ticket keys, titles and states. Until it answers, PMOS groups the tickets by shared words. The counts add up to the ticket counts. Press the pencil to change a block. PMOS does not write over your words. When its draft changes, it asks with ✓ (use the new draft) and ✕ (keep yours).
|
|
52
|
+
- **Sprint goals, Doing now and Planned next.** PMOS writes them from the tickets, not from the goal in Jira. A short PMOS session reads only the ticket keys, titles and states. Until it answers, PMOS groups the tickets by shared words, and the line above the themes says so. The counts add up to the ticket counts. Press the pencil to change a block. PMOS does not write over your words. When its draft changes, it asks with ✓ (use the new draft) and ✕ (keep yours).
|
|
53
53
|
- **Proposals.** For example, put sub-tasks in the initiative of their parent ticket, or make an initiative for a theme. Nothing changes until you press ✓. Each ✓ and ✕ has Undo.
|
|
54
54
|
|
|
55
55
|
## What PMOS can take
|
|
@@ -21,7 +21,7 @@ const crypto = require('crypto');
|
|
|
21
21
|
|
|
22
22
|
const MODEL = 'claude-sonnet-5-5';
|
|
23
23
|
const LEAN = Object.freeze([{ flag: '--strict-mcp-config' }, { flag: '--disable-slash-commands' }, { flag: '--setting-sources', value: 'user' }, { flag: '--tools', value: 'Read' }]);
|
|
24
|
-
const TIMEOUT_MS =
|
|
24
|
+
const TIMEOUT_MS = 240000;
|
|
25
25
|
const SPARE = 'Everything else';
|
|
26
26
|
const BLOCKS = ['goals', 'doing', 'next'];
|
|
27
27
|
const MOVING = new Set(['In progress', 'In review']);
|
|
@@ -123,7 +123,7 @@ function draft(ctx, tickets, opts = {}) {
|
|
|
123
123
|
const key = keyOf(tickets), have = readDrafts(ctx)[key];
|
|
124
124
|
if (have && have.draft) return { state: 'ready', key, draft: have.draft, at: have.at };
|
|
125
125
|
if (running.has(key)) return { state: 'pending', key };
|
|
126
|
-
if (have && have.failed && !opts.again && Date.now() - Date.parse(have.at) <
|
|
126
|
+
if (have && have.failed && !opts.again && Date.now() - Date.parse(have.at) < 10 * 60000) return { state: 'failed', key, why: have.failed };
|
|
127
127
|
running.set(key, Date.now());
|
|
128
128
|
Promise.resolve(viaSession(ctx, promptOf(tickets), key)).then((text) => {
|
|
129
129
|
const d = text == null ? null : normalize(text, tickets);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.627.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.627.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -159,45 +159,45 @@ textarea.bk-rvl-ed, .bk-rvl textarea.bd { resize: vertical; min-height: 180px; }
|
|
|
159
159
|
@media (max-width: 760px) { .bk-i > .c-due { display: none; } }
|
|
160
160
|
|
|
161
161
|
/* the sprint overview while "This sprint" is on (pm/bd-sprint.js; boards SpA and SpA2) */
|
|
162
|
-
.
|
|
163
|
-
.
|
|
164
|
-
.
|
|
165
|
-
.
|
|
166
|
-
.
|
|
167
|
-
.
|
|
168
|
-
.
|
|
169
|
-
.
|
|
170
|
-
.
|
|
171
|
-
.
|
|
172
|
-
.
|
|
173
|
-
.
|
|
174
|
-
.
|
|
175
|
-
.
|
|
176
|
-
.
|
|
177
|
-
.
|
|
178
|
-
.
|
|
179
|
-
.
|
|
180
|
-
.
|
|
181
|
-
.
|
|
182
|
-
.
|
|
183
|
-
.
|
|
184
|
-
.
|
|
185
|
-
.
|
|
186
|
-
.
|
|
187
|
-
.
|
|
188
|
-
.
|
|
189
|
-
.
|
|
190
|
-
.
|
|
191
|
-
.
|
|
192
|
-
.
|
|
193
|
-
.
|
|
194
|
-
.
|
|
195
|
-
@media (hover: hover) { .
|
|
196
|
-
@media (max-width: 1100px) { .
|
|
162
|
+
.sbo-band { margin: 6px 0 16px; padding: 20px 22px; border-radius: 18px; background: var(--cz-card); box-shadow: inset 0 0 0 1px var(--cz-hair); color: var(--cz-ink2); }
|
|
163
|
+
.sbo-top { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 40px; }
|
|
164
|
+
.sbo-h { display: flex; align-items: center; gap: 10px; }
|
|
165
|
+
.sbo-h b { font-size: var(--fs-panel); font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
166
|
+
.sbo-meta { margin: 4px 0 0; font-size: var(--fs-meta); color: var(--cz-ink3); }
|
|
167
|
+
.sbo-big { margin: 18px 0 8px; font-size: var(--fs-row); color: var(--cz-ink3); }
|
|
168
|
+
.sbo-big b { font-size: var(--fs-display); font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
169
|
+
.sbo-bar { display: flex; height: 8px; border-radius: 999px; background: var(--cz-well); overflow: hidden; }
|
|
170
|
+
.sbo-bar s { display: block; height: 100%; background: var(--cz-blue); text-decoration: none; }
|
|
171
|
+
.sbo-s { color: var(--cz-blue); }
|
|
172
|
+
.sbo-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
|
|
173
|
+
.sbo-thl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 2px 32px; margin-top: 6px; }
|
|
174
|
+
.sbo-t { all: unset; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) minmax(56px, 104px) 56px; gap: 12px; align-items: center; min-height: 36px; padding: 0 8px; border-radius: 10px; font-size: var(--fs-row); color: var(--cz-ink); }
|
|
175
|
+
.sbo-t b { font-weight: var(--fw-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
176
|
+
.sbo-t .c { font-size: var(--fs-meta); color: var(--cz-ink3); text-align: right; white-space: nowrap; }
|
|
177
|
+
.sbo-t.on { background: var(--cz-bluebg); }
|
|
178
|
+
.sbo-pl { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 32px; margin-top: 18px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--cz-hair); }
|
|
179
|
+
.sbo-b h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--cz-ink); }
|
|
180
|
+
.sbo-b h4 .k { font-size: var(--fs-meta); font-weight: var(--fw-regular); color: var(--cz-ink3); }
|
|
181
|
+
.sbo-b h4 .bk-ib { margin-left: auto; }
|
|
182
|
+
.sbo-b ul { margin: 0; padding: 0; list-style: none; }
|
|
183
|
+
.sbo-b li { display: flex; gap: 10px; padding: 4px 0; font-size: var(--fs-row); color: var(--cz-ink); }
|
|
184
|
+
.sbo-b li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--cz-ink3); opacity: .4; }
|
|
185
|
+
.sbo-b li span { flex: 1; min-width: 0; }
|
|
186
|
+
.sbo-b li em { font-style: normal; font-size: var(--fs-meta); color: var(--cz-ink3); }
|
|
187
|
+
.sbo-ta { box-sizing: border-box; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: var(--cz-well); color: var(--cz-ink); font: inherit; font-size: var(--fs-row); resize: vertical; }
|
|
188
|
+
.sbo-ed { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
|
|
189
|
+
.sbo-new { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: var(--fs-meta); color: var(--cz-ink2); }
|
|
190
|
+
.sbo-props { margin-top: 14px; }
|
|
191
|
+
.sbo-p { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: var(--fs-row); color: var(--cz-ink); box-shadow: inset 0 1px 0 var(--cz-hair); }
|
|
192
|
+
.sbo-p .x { flex: 1; min-width: 0; }
|
|
193
|
+
.sbo-p .x em { font-style: normal; margin-left: 8px; font-size: var(--fs-meta); color: var(--cz-ink3); }
|
|
194
|
+
.sbo-t:focus-visible, .sbo-ta:focus-visible { outline: 2px solid var(--cz-blue); outline-offset: 2px; }
|
|
195
|
+
@media (hover: hover) { .sbo-t:hover:not(.on) { background: var(--cz-well); } }
|
|
196
|
+
@media (max-width: 1100px) { .sbo-pl { grid-template-columns: 1fr 1fr; } }
|
|
197
197
|
@media (max-width: 760px) {
|
|
198
|
-
.
|
|
199
|
-
.
|
|
200
|
-
.
|
|
201
|
-
.
|
|
202
|
-
.
|
|
198
|
+
.sbo-band { padding: 16px; }
|
|
199
|
+
.sbo-top, .sbo-pl { grid-template-columns: 1fr; gap: 18px; }
|
|
200
|
+
.sbo-thl { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
|
|
201
|
+
.sbo-t { min-height: 44px; grid-template-columns: minmax(0, 1fr) 40px 52px; gap: 10px; }
|
|
202
|
+
.sbo-p { flex-wrap: wrap; padding: 8px 0; }
|
|
203
203
|
}
|
|
@@ -142,7 +142,7 @@ function headHtml(cols) {
|
|
|
142
142
|
}
|
|
143
143
|
function groupHtml(g, cols = COLS) {
|
|
144
144
|
if (g.k === 'theme') {
|
|
145
|
-
return `<div class="bk-r bk-g open" role="row"><span class="bk-gt"><span class="
|
|
145
|
+
return `<div class="bk-r bk-g open" role="row"><span class="bk-gt"><span class="sbo-s" aria-hidden="true">${SPARK}</span><b>${esc(g.n)}</b><span class="k">${g.rows.length} ${g.rows.length === 1 ? 'ticket' : 'tickets'}</span></span>`
|
|
146
146
|
+ `<button type="button" class="bk-lnk" data-spall>Show all ${g.total}</button></div>` + g.rows.map((t) => rowHtml(t, BM.groupOf(t, partB()), cols)).join('');
|
|
147
147
|
}
|
|
148
148
|
const open = FOLD[g.k] != null ? FOLD[g.k] : g.open;
|
|
@@ -402,7 +402,7 @@ function closeRv() { if (rv) { rv.remove(); rv = null; } }
|
|
|
402
402
|
const taskOf = (u) => (SC ? SC.tasks() : DATA ? DATA.tasks : []).find((t) => uidOf(t) === u) || null;
|
|
403
403
|
async function press(e, emb) {
|
|
404
404
|
const t0 = e.target;
|
|
405
|
-
if (!emb && t0.closest('.
|
|
405
|
+
if (!emb && t0.closest('.sbo-band, [data-spall]') && await SP.press(e, spDeps())) return;
|
|
406
406
|
const chip = t0.closest('[data-bkchip]');
|
|
407
407
|
if (chip) { const k = chip.dataset.bkchip; if (k === 'all') CHIPS.clear(); else if (CHIPS.has(k)) CHIPS.delete(k); else CHIPS.add(k); draw(); const n = host.querySelector(`[data-bkchip="${k}"]`); if (n) n.focus(); return; }
|
|
408
408
|
if (t0.closest('[data-bkall]')) { CHIPS.clear(); PICK = {}; SP.clearTheme(); draw(); return; }
|
|
@@ -39,7 +39,7 @@ function ask(sp, deps) {
|
|
|
39
39
|
const e = { sig, state: 'pending', d: null };
|
|
40
40
|
DR.set(sp.id, e);
|
|
41
41
|
(async () => {
|
|
42
|
-
for (let i = 0; i <
|
|
42
|
+
for (let i = 0; i < 60 && DR.get(sp.id) === e; i++) {
|
|
43
43
|
const r = await deps.post('/api/backlog/sprint-draft', { ws: sp.ws, board: sp.board, sprint: sp.name, again: again && i === 0 });
|
|
44
44
|
if (r && r.state === 'ready' && r.draft) { e.state = 'ready'; e.d = r.draft; if (!EDIT) deps.draw(); return; }
|
|
45
45
|
if (!r || r.state === 'failed' || r.ok === false && r.state !== 'pending') { e.state = 'failed'; return; }
|
|
@@ -69,34 +69,34 @@ export function bandHtml(o, deps) {
|
|
|
69
69
|
const pct = (a, b) => (b ? Math.round((a / b) * 1000) / 10 : 0);
|
|
70
70
|
const old = !o.readAt || Date.now() - Date.parse(o.readAt) > OLD_MS;
|
|
71
71
|
const read = `Jira says active${o.readAt ? ' · last read ' + dayOf(o.readAt) : ''}`;
|
|
72
|
-
const pick = S.length > 1 ? `<div class="
|
|
72
|
+
const pick = S.length > 1 ? `<div class="sbo-pick" role="group" aria-label="Sprint">${S.map((x) => `<button type="button" class="bk-chip${x.id === sp.id ? ' on' : ''}" data-sppick="${esc(x.id)}" aria-pressed="${x.id === sp.id}">${esc(x.label)}<span class="k">${x.tasks.length}</span></button>`).join('')}</div>` : '';
|
|
73
73
|
const tail = [st.todo ? st.todo + ' to do' : '', st.homeless ? `${st.homeless} of ${st.all} ${st.homeless === 1 ? 'is' : 'are'} in no initiative` : ''].filter(Boolean).join(' · ');
|
|
74
|
-
const sum = `<div class="
|
|
75
|
-
+ `<p class="
|
|
76
|
-
+ `<p class="
|
|
77
|
-
+ (tail ? `<p class="
|
|
78
|
-
const th = `<div class="
|
|
79
|
-
+ `<div class="
|
|
80
|
-
+ `<b>${esc(t.name)}</b><span class="
|
|
74
|
+
const sum = `<div class="sbo-sum">${pick}<div class="sbo-h"><b title="${esc(sp.name)}">${esc(sp.label)}</b><button type="button" class="bk-ib" data-spread aria-label="Read Jira again" title="Read Jira again">${SV(I.read)}</button></div>`
|
|
75
|
+
+ `<p class="sbo-meta">${old ? '<i class="bk-dot amber"></i>' : ''}${esc(read)}</p>`
|
|
76
|
+
+ `<p class="sbo-big"><b>${st.moving} of ${st.all}</b> <span>moving</span></p><div class="sbo-bar" aria-hidden="true"><s style="width:${pct(st.moving, st.all)}%"></s></div>`
|
|
77
|
+
+ (tail ? `<p class="sbo-meta">${esc(tail)}</p>` : '') + '</div>';
|
|
78
|
+
const th = `<div class="sbo-th"><p class="sbo-meta"><span class="sbo-s">${SPARK}</span> ${dr.state === 'pending' ? 'PMOS is reading the ticket titles to name the themes. Until then they are grouped by shared words.' : 'Themes PMOS found in the ticket titles. Press one to list its tickets below.'}</p>`
|
|
79
|
+
+ `<div class="sbo-thl">${themes.map((t) => `<button type="button" class="sbo-t${t.id === THEME ? ' on' : ''}" data-sptheme="${esc(t.id)}" aria-pressed="${t.id === THEME}" title="${esc(t.name)}: ${t.moving} of ${t.n} moving">`
|
|
80
|
+
+ `<b>${esc(t.name)}</b><span class="sbo-bar" aria-hidden="true"><s style="width:${pct(t.moving, t.n)}%"></s></span><span class="c">${t.moving} of ${t.n}</span></button>`).join('')}</div></div>`;
|
|
81
81
|
const blocks = ['goals', 'doing', 'next'].map((k) => blockHtml(k, draft, note, st)).join('');
|
|
82
|
-
const pr = props.length ? `<div class="
|
|
82
|
+
const pr = props.length ? `<div class="sbo-props">${props.map((p) => `<div class="sbo-p"><span class="sbo-s" aria-hidden="true">${SPARK}</span><span class="x">${esc(p.text)}${p.sub ? `<em>${esc(p.sub)}</em>` : ''}</span>`
|
|
83
83
|
+ `<span class="bk-two"><button type="button" class="bk-ib" data-spok="${esc(p.id)}" aria-label="Yes: ${esc(p.text)}" title="Yes">${SV(I.ok)}</button><button type="button" class="bk-ib" data-spno="${esc(p.id)}" aria-label="No: ${esc(p.text)}" title="No">${SV(I.x)}</button></span></div>`).join('')}</div>` : '';
|
|
84
|
-
return `<section class="
|
|
84
|
+
return `<section class="sbo-band" aria-label="Sprint overview"><div class="sbo-top">${sum}${th}</div><div class="sbo-pl">${blocks}</div>${pr}</section>`;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
function blockHtml(k, draft, note, st) {
|
|
88
88
|
const L = draft[k] || [], b = SK.blockOf(note[k], L);
|
|
89
89
|
const count = k === 'doing' ? st.moving : k === 'next' ? st.todo : 0;
|
|
90
|
-
const head = `<h4>${k === 'goals' && !b.mine ? `<span class="
|
|
90
|
+
const head = `<h4>${k === 'goals' && !b.mine ? `<span class="sbo-s" aria-hidden="true">${SPARK}</span>` : ''}${BLOCK[k]}${count ? `<span class="k">${count} ${count === 1 ? 'ticket' : 'tickets'}</span>` : ''}`
|
|
91
91
|
+ `<button type="button" class="bk-ib" data-spedit="${k}" aria-label="Edit ${BLOCK[k]}" title="Edit">${SV(I.pen)}</button></h4>`;
|
|
92
92
|
if (EDIT === k) {
|
|
93
|
-
return `<div class="
|
|
94
|
-
+ `<div class="
|
|
93
|
+
return `<div class="sbo-b">${head}<textarea class="sbo-ta" data-spta="${k}" rows="${Math.max(3, b.lines.length + 1)}" aria-label="${BLOCK[k]}, one point a line">${esc(b.lines.map((l) => l.text).join('\n'))}</textarea>`
|
|
94
|
+
+ `<div class="sbo-ed"><button type="button" class="bk-ib ok" data-spsave="${k}" aria-label="Save ${BLOCK[k]}" title="Save">${SV(I.ok)}</button><button type="button" class="bk-ib" data-spcancel aria-label="Cancel" title="Cancel">${SV(I.x)}</button></div></div>`;
|
|
95
95
|
}
|
|
96
96
|
const ul = b.lines.length ? `<ul>${b.lines.map((l) => `<li><span>${esc(l.text)}</span>${l.n ? `<em>${l.n}</em>` : ''}</li>`).join('')}</ul>` : '';
|
|
97
|
-
const foot = b.newer ? `<div class="
|
|
98
|
-
: k === 'goals' && !b.mine && L.length ? `<p class="
|
|
99
|
-
return `<div class="
|
|
97
|
+
const foot = b.newer ? `<div class="sbo-new"><span><span class="sbo-s" aria-hidden="true">${SPARK}</span> PMOS has a newer draft from the tickets.</span><span class="bk-two"><button type="button" class="bk-ib" data-spnew="${k}" aria-label="Use PMOS's newer draft of ${BLOCK[k]}" title="Use it">${SV(I.ok)}</button><button type="button" class="bk-ib" data-spkeep="${k}" aria-label="Keep yours" title="Keep yours">${SV(I.x)}</button></span></div>`
|
|
98
|
+
: k === 'goals' && !b.mine && L.length ? `<p class="sbo-meta">Drafted from the ${st.all} tickets, not from the goal set in Jira. Edit to make it yours.</p>` : '';
|
|
99
|
+
return `<div class="sbo-b">${head}${ul}${foot}</div>`;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/** The theme pressed, for the list below: { name, uids: Set, total } | null. */
|
|
@@ -82,6 +82,14 @@ export function hashOf(text) {
|
|
|
82
82
|
return (h >>> 0).toString(36);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/** A theme name from a ticket's title: its tags dropped, cut before a clause ("based on …", "for …") and to four words, never "…". */
|
|
86
|
+
export function nameOfTitle(title) {
|
|
87
|
+
const s0 = String(title || '').replace(/\[[^\]]*\]/g, ' ').replace(/\s+/g, ' ').trim() || String(title || '').trim();
|
|
88
|
+
const s1 = s0.split(/\s+(?:based on|for|to|with|from|in order to|so that|when|after|before)\s+/i)[0] || s0;
|
|
89
|
+
const w = s1.replace(/[,;:.()]+.*$/, '').trim().split(' ');
|
|
90
|
+
return w.slice(0, 4).join(' ') || s0;
|
|
91
|
+
}
|
|
92
|
+
|
|
85
93
|
/** PMOS's themes for the tickets of one sprint: a greedy grouping by the word (or the parent ticket) most tickets share, widened once by the
|
|
86
94
|
* word most of the group shares next. At most MAX_THEMES themes of two tickets or more; the rest is "Everything else". */
|
|
87
95
|
export function themesOf(tasks) {
|
|
@@ -130,7 +138,7 @@ export function themesOf(tasks) {
|
|
|
130
138
|
const nameOf = (g) => {
|
|
131
139
|
if (g.seed.startsWith('p:')) {
|
|
132
140
|
const key = g.seed.slice(2), p = T.find((t) => t.key === key), child = T.find((t) => t.epic && t.epic.key === key && t.epic.name);
|
|
133
|
-
return
|
|
141
|
+
return nameOfTitle(child ? child.epic.name : p ? p.title : key);
|
|
134
142
|
}
|
|
135
143
|
const a = form(g.seed), b = g.co ? form(g.co) : '';
|
|
136
144
|
const cap = (w) => (w[0] === w[0].toLowerCase() ? w[0].toUpperCase() + w.slice(1) : w);
|
|
@@ -206,7 +214,7 @@ export function proposalsOf(tasks, all, inis, themes, dismissed) {
|
|
|
206
214
|
const R = th.uids.map((u) => by.get(u)).filter((t) => t && !t.ini && !linked.has(uidOf(t)));
|
|
207
215
|
if (R.length < 2) continue;
|
|
208
216
|
const want = sig(th.name);
|
|
209
|
-
const hit = want.size ? inisOf(R[0]).map((x) => ({ x, n: [...sig(x.title)].filter((w) => want.has(w)).length })).filter((m) => m.n >= Math.max(
|
|
217
|
+
const hit = want.size ? inisOf(R[0]).map((x) => ({ x, n: [...sig(x.title)].filter((w) => want.has(w)).length })).filter((m) => m.n >= Math.max(2, Math.ceil(want.size / 2)))
|
|
210
218
|
.sort((a, b) => b.n - a.n)[0] : null;
|
|
211
219
|
if (hit) {
|
|
212
220
|
const id = 'place:' + th.id + '>' + hit.x.id;
|