create-pmos 0.835.0 → 0.837.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 +90 -50
- 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 +89 -4
- package/workspace/guide/breakdown.md +1 -1
- package/workspace/guide/cli.md +19 -0
- package/workspace/guide/layout.md +5 -1
- package/workspace/lib/built-vs-design-http.js +81 -0
- package/workspace/lib/built-vs-design.js +454 -0
- package/workspace/lib/deps-cli.js +47 -2
- package/workspace/lib/features.json +1 -0
- package/workspace/lib/first-hour.js +219 -0
- package/workspace/lib/needs-providers.js +1 -0
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/prefs-sync.js +1 -0
- package/workspace/lib/review-cli.js +6 -0
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-first-hour.js +37 -0
- package/workspace/lib/routes-pop-work.js +4 -1
- package/workspace/lib/routes-team-waits.js +39 -2
- package/workspace/lib/team-cli.js +24 -1
- package/workspace/lib/team-slips.js +160 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/ask-here-ctx.js +20 -2
- package/workspace/public/pm/ask-here.css +6 -1
- package/workspace/public/pm/ask-here.js +38 -25
- package/workspace/public/pm/bd-backlog.js +34 -5
- package/workspace/public/pm/built-vs-design.css +16 -0
- package/workspace/public/pm/built-vs-design.js +95 -0
- package/workspace/public/pm/cozy-events-view.js +1 -1
- package/workspace/public/pm/cozy-home.css +10 -0
- package/workspace/public/pm/cozy-pop-work.js +6 -4
- package/workspace/public/pm/cozy-today-view.js +4 -1
- package/workspace/public/pm/first-hour.js +78 -0
- package/workspace/public/pm/goals-ds.js +3 -2
- package/workspace/public/pm/home-chat.js +19 -3
- package/workspace/public/pm/ini-tasks.js +2 -2
- package/workspace/public/pm/page-chat.js +2 -1
- package/workspace/public/pm/premium-board.js +2 -0
- package/workspace/public/pm/team-slips.js +48 -0
- package/workspace/public/premium-board.html +1 -0
- package/workspace/test-lists/built-vs-design.json +9 -0
- package/workspace/test-lists/first-hour.json +9 -0
- package/workspace/test-lists/team-slips.json +9 -0
|
@@ -107,7 +107,7 @@ const stageKeyOf = (v) => { const L = stagesOf(v), k = STAGE.get(v.id || v.key);
|
|
|
107
107
|
* view sheet (a bottom sheet on a phone, a popover under it on a desktop): View, Group by and Zoom, three rows of the same shape. ── */
|
|
108
108
|
export function viewBtnHtml(m) {
|
|
109
109
|
const x = VIEWS.find((y) => y[0] === m) || VIEWS[0];
|
|
110
|
-
return `<button type="button" class="ivx-vb" data-iv-vbtn aria-haspopup="dialog" aria-expanded="false" aria-label="${esc('Tasks view: ' + x[1] + '. Change the view, grouping or zoom')}" title="View, group and zoom">${SVG(x[2], 18)}${SVG(P.down, 13, 2.2)}</button>`;
|
|
110
|
+
return `<button type="button" class="ivx-vb" data-iv-vbtn aria-haspopup="dialog" aria-expanded="${POP && POP.el.isConnected && POP.el.querySelector('.ivs') ? 'true' : 'false'}" aria-label="${esc('Tasks view: ' + x[1] + '. Change the view, grouping or zoom')}" title="View, group and zoom">${SVG(x[2], 18)}${SVG(P.down, 13, 2.2)}</button>`;
|
|
111
111
|
}
|
|
112
112
|
/** The Kanban's stage picker (or group picker): at the top of the Kanban, not in the header. */
|
|
113
113
|
export function kanbanPickHtml(v) {
|
|
@@ -588,7 +588,7 @@ function rehang(P) {
|
|
|
588
588
|
if (!n || P.el.contains(n)) return;
|
|
589
589
|
P.anchor = n; n.setAttribute('aria-expanded', 'true'); const r = n.getBoundingClientRect(); P.at = [r.left, r.top];
|
|
590
590
|
}
|
|
591
|
-
export function closePop() { if (!POP) return; const { el, anchor, scrim } = POP; POP = null; el.remove(); if (scrim) scrim.remove(); if (anchor && anchor.isConnected) anchor.setAttribute('aria-expanded', 'false'); }
|
|
591
|
+
export function closePop() { if (!POP) return; const { el, anchor, scrim } = POP; POP = null; el.remove(); if (scrim) scrim.remove(); if (anchor && anchor.isConnected) anchor.setAttribute('aria-expanded', 'false'); document.querySelectorAll('[data-iv-vbtn][aria-expanded="true"]').forEach((b) => b.setAttribute('aria-expanded', 'false')); } // a redraw while open drew a new button as expanded
|
|
592
592
|
/** o.sheet: a bottom sheet over a scrim (a phone); o.right: the popover's right edge under the press's right edge. */
|
|
593
593
|
export function openPop(anchor, html, onPress, o = {}) {
|
|
594
594
|
closePop(); cardStyle();
|
|
@@ -126,9 +126,10 @@ export function itemTarget(it, ws) {
|
|
|
126
126
|
const kind = String((it && it.kind) || 'item').trim().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'item';
|
|
127
127
|
const id = String((it && it.id) || '').replace(/[^A-Za-z0-9._:-]+/g, '-').replace(/^[^A-Za-z0-9]+/, '');
|
|
128
128
|
if (!id || !title) return null;
|
|
129
|
+
const where = String((it && it.where) || '').replace(/\s+/g, ' ').trim().slice(0, 40); // the field pressed (ask-here.js): "In: <title> › <field>"
|
|
129
130
|
const key = ('pop:' + kind + ':' + id).slice(0, 104);
|
|
130
131
|
const facts = (Array.isArray(it.facts) ? it.facts : []).filter((f) => Array.isArray(f) && f[1] != null && String(f[1]).trim()).slice(0, 12).map(([a, b]) => [String(a), String(b)]);
|
|
131
|
-
return { key, ws: ws || undefined, title, about: title, role: CLAUDE, rich: false, popAbout: true, scope: { text: 'In: ' + title, icon: PIN, drop: true },
|
|
132
|
+
return { key, ws: ws || undefined, title, about: title, role: CLAUDE, rich: false, popAbout: true, scope: { text: 'In: ' + title + (where ? ' › ' + where : ''), icon: PIN, drop: true },
|
|
132
133
|
context: { title, subject: String(it.subject || ''), say: String(it.say || ''), facts }, placeholder: 'Ask or tell PMOS', empty: COS_EMPTY };
|
|
133
134
|
}
|
|
134
135
|
export function cosTarget(here, ws) {
|
|
@@ -76,6 +76,7 @@ import * as STRAT from './bd-strategy.js'; // the product's strategy in five l
|
|
|
76
76
|
import * as PRIN from './bd-principles.js'; // the product's principles drafted from its decisions, below the strategy (bet A352)
|
|
77
77
|
import * as SWO from './switch-owners.js'; // who has which switch, per customer, below the principles (idea A263)
|
|
78
78
|
import * as SKM from './skill-map.js'; // the team skill map below the principles (bet A208)
|
|
79
|
+
import * as FHR from './first-hour.js'; // the first hour for a new engineer, below Team skills (bet A55)
|
|
79
80
|
import * as CMAP from './code-map.js'; // the product's code map, one box per main part (idea A176)
|
|
80
81
|
import * as SWN from './cozy-status-when.js'; // the day a status move really happened, in the toast (round 3 point 18)
|
|
81
82
|
import { pressHold } from './state-glyph.js';
|
|
@@ -1533,6 +1534,7 @@ async function load() {
|
|
|
1533
1534
|
PRIN.refresh($('#cPrin'), { ws: M.board.ws || null, single: !ALL, say });
|
|
1534
1535
|
SWO.refresh($('#cSw'), { ws: M.board.ws || null, single: !ALL, say });
|
|
1535
1536
|
SKM.refresh($('#cSkills'), { ws: M.board.ws || null, single: !ALL, say });
|
|
1537
|
+
FHR.refresh($('#cWelcome'), { ws: M.board.ws || null, single: !ALL, say });
|
|
1536
1538
|
CMAP.mount($('#cCode'), { ws: M.board.ws || null, single: !ALL });
|
|
1537
1539
|
focusOnce(); taskOnce(); programOnce(); newOnce(); loadOthers(); loadWorkflows();
|
|
1538
1540
|
if (r.stale) setTimeout(load, 2000); // a press is still being derived: ask again
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* pm/team-slips.js — "Upstream" on Work › Dependencies: other teams' slips, before they hit you (initiative team-slips, bet A15; board
|
|
2
|
+
* BatchMoreADS panel 27). Pure: Node imports it (team-slips.test.js). Rows come from GET /api/team-slips (lib/team-slips.js slipsOf).
|
|
3
|
+
*
|
|
4
|
+
* rowsOf(slips) → [{ key, ws, name, sub, state, move, act, ini, chase }] one row per slip, as the board draws them
|
|
5
|
+
* slipsHtml(rows, { watching }) → the block: pm-block "Upstream" with "Watching n boards your work waits on", a pm-li per slip, an
|
|
6
|
+
* icon-only ✦ (the one move) and an icon-only wave-off; '' with no slip (zero is silence)
|
|
7
|
+
* chaseDraft(s, { by }) → { to, subject, body, mailto } a draft for the PM's own mail app. PMOS sends nothing.
|
|
8
|
+
*
|
|
9
|
+
* A row: "<team> will likely slip to 9 Dec", then "was 2 Dec · your <what> is 5 Dec". ✦ shifts your date (it opens the initiative, whose
|
|
10
|
+
* owner moves the date) when the slip lands on or past your date, else it opens a chase draft. Text from records goes through esc().
|
|
11
|
+
* The UI says PMOS. */
|
|
12
|
+
import { stateGlyph } from './state-glyph.js';
|
|
13
|
+
import { esc, dayWords } from './team-waits.js';
|
|
14
|
+
|
|
15
|
+
const ICON_SPARK = 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z';
|
|
16
|
+
const ICON_X = 'M6 6l12 12M18 6L6 18';
|
|
17
|
+
const SV = (d) => `<svg class="pm-ic" width="16" height="16" viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
|
|
18
|
+
|
|
19
|
+
export function rowsOf(slips) {
|
|
20
|
+
return (Array.isArray(slips) ? slips : []).map((s) => {
|
|
21
|
+
const act = s.move === 'shift' ? `Shift your date to ${dayWords(s.shift_to)}` : `Chase ${s.who || s.team || 'them'}`;
|
|
22
|
+
const sub = [`was ${dayWords(s.theirs)}`, s.yours ? `your ${s.yours_what || s.title || 'date'} is ${dayWords(s.yours)}` : ''].filter(Boolean).join(' · ');
|
|
23
|
+
return { key: s.key, ws: s.ws || '', name: `${s.team || s.from || s.key} will likely slip to ${dayWords(s.likely)}`, sub,
|
|
24
|
+
state: s.hits ? 'late' : 'wait', move: s.move, act, ini: s.ini || '', chase: s };
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function slipsHtml(rows, { watching = 0 } = {}) {
|
|
29
|
+
if (!rows || !rows.length) return '';
|
|
30
|
+
const row = (r, i) => `<div class="pm-li" role="listitem" data-ts="${esc(r.key)}">${stateGlyph(r.state, { size: 14 })}`
|
|
31
|
+
+ `<span class="txt"><span class="t">${esc(r.name)}</span><span class="w">${esc(r.sub)}</span></span>`
|
|
32
|
+
+ `<span class="acts"><button type="button" class="pm-btn" data-ts-go="${i}" aria-label="${esc(r.act)}" title="✦ ${esc(r.act)}">${SV(ICON_SPARK)}</button>`
|
|
33
|
+
+ `<button type="button" class="pm-btn" data-ts-skip="${i}" aria-label="Wave off this slip" title="Wave off: the row goes until a later date">${SV(ICON_X)}</button></span></div>`;
|
|
34
|
+
const n = Number(watching) || 0;
|
|
35
|
+
return `<section class="pm-block list ts-block" aria-label="Upstream"><div class="head"><h3 class="pm-h-sm">Upstream</h3><span class="sp"></span>`
|
|
36
|
+
+ `<span class="pm-meta">Watching ${n} ${n === 1 ? 'board' : 'boards'} your work waits on</span></div><div class="rows" role="list">${rows.map(row).join('')}</div></section>`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The chase draft for a slip: to the wait's person when PMOS knows an address. PMOS sends nothing. */
|
|
40
|
+
export function chaseDraft(s, { by = '' } = {}) {
|
|
41
|
+
const ini = s.title || s.ini || 'our work';
|
|
42
|
+
const to = /^[^\s@]+@[^\s@]+$/.test(s.email || '') ? s.email : '';
|
|
43
|
+
const hi = s.who ? `Hi ${String(s.who).split(/\s+/)[0]},` : 'Hi,';
|
|
44
|
+
const subject = `${ini}: ${s.key} now looks like ${dayWords(s.likely)}`;
|
|
45
|
+
const body = [hi, '', `${s.key} was due ${dayWords(s.theirs)} and now looks like ${dayWords(s.likely)}.`
|
|
46
|
+
+ (s.yours ? ` ${ini} needs it for ${dayWords(s.yours)}.` : ''), 'Is the new date firm, and is there anything we can do to help it land sooner?', '', 'Thanks', by].join('\n').trimEnd();
|
|
47
|
+
return { to, subject, body, mailto: 'mailto:' + encodeURIComponent(to).replace(/%40/g, '@') + '?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body) };
|
|
48
|
+
}
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
<section class="bd-sec" id="cSw" aria-label="Switches" hidden></section>
|
|
70
70
|
<!-- the team skill map (pm/skill-map.js, bet A208): below the principles, one product only, for the person and their lead -->
|
|
71
71
|
<section class="bd-sec" id="cSkills" aria-label="Team skills" hidden></section>
|
|
72
|
+
<section class="bd-sec" id="cWelcome" aria-label="Welcome" hidden></section>
|
|
72
73
|
<!-- the product's code map (pm/code-map.js, idea A176): one box per main part of its repository, one product only -->
|
|
73
74
|
<section class="bd-sec" id="cCode" aria-label="Code" hidden></section>
|
|
74
75
|
<section class="bd-sec" id="cIni" aria-labelledby="hIni">
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Built screen beside its design (initiative built-vs-design, job #1903, A380; done test V1-V7, N1-N3): the PNG reader, the numbered differences, pmos review on a scratch repository, the routes with a fake context, the Review block's markup, the guide. No server, browser, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"built-vs-design.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"built-vs-design.test.js": 2
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "The first hour for a new engineer (initiative first-hour, job #1979, idea A55; done test F1-F6, N1-N4): the four steps from the strategy card, tasks and code map, done when opened, the finished line, the ✦ newcomer suggestion, pmos team welcome, the route and the Work block's markup. No server, browser, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"first-hour.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"first-hour.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Other teams' slips (initiative team-slips, bet A15, done test S1-S7, N1, N2): the store, pmos deps slips, the Today row, the Upstream block and /api/team-slips. Fixture repos; no browser, model or network.",
|
|
3
|
+
"modules": [
|
|
4
|
+
"team-slips.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"team-slips.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|