create-pmos 0.681.0 → 0.682.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 +9 -9
- 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 +8 -8
- package/workspace/guide/layout.md +3 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-pop-ds.css +5 -0
- package/workspace/public/pm/bd-pop-ds.js +10 -5
- package/workspace/public/pm/cozy-pop-work.js +9 -11
- package/workspace/public/pm/pop-work-model.js +13 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.682.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": {
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
36
|
{
|
|
37
|
-
"v": "0.
|
|
38
|
-
"at": "2026-11-22T07:
|
|
37
|
+
"v": "0.682.0",
|
|
38
|
+
"at": "2026-11-22T07:57:47.146Z",
|
|
39
39
|
"f": 4,
|
|
40
40
|
"prs": [
|
|
41
|
-
{
|
|
42
|
-
"n": 1488,
|
|
43
|
-
"t": "Read a document as a CFO, an engineer and a sceptic (A110)",
|
|
44
|
-
"s": "Read a document as a CFO, an engineer and a sceptic (A110)",
|
|
45
|
-
"k": "new"
|
|
46
|
-
},
|
|
47
41
|
{
|
|
48
42
|
"n": 1487,
|
|
49
43
|
"t": "Design drift guard counts token bypasses, with a ratchet",
|
|
50
44
|
"s": "Design drift guard counts token bypasses, with a ratchet",
|
|
51
45
|
"k": "new"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1478,
|
|
49
|
+
"t": "Work breakdown keeps done tasks in date order and folds a finished stage",
|
|
50
|
+
"s": "Work breakdown keeps done tasks in date order and folds a finished stage",
|
|
51
|
+
"k": "new"
|
|
52
52
|
}
|
|
53
53
|
]
|
|
54
54
|
},
|
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-22T07:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T07:57:44Z"}
|
|
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-22T07:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T07:57:44Z"}
|
|
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-22T07:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T07:57:44Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"v": "0.
|
|
4
|
-
"at": "2026-11-22T07:
|
|
3
|
+
"v": "0.682.0",
|
|
4
|
+
"at": "2026-11-22T07:57:47.146Z",
|
|
5
5
|
"f": 4,
|
|
6
6
|
"prs": [
|
|
7
|
-
{
|
|
8
|
-
"n": 1488,
|
|
9
|
-
"t": "Read a document as a CFO, an engineer and a sceptic (A110)",
|
|
10
|
-
"s": "Read a document as a CFO, an engineer and a sceptic (A110)",
|
|
11
|
-
"k": "new"
|
|
12
|
-
},
|
|
13
7
|
{
|
|
14
8
|
"n": 1487,
|
|
15
9
|
"t": "Design drift guard counts token bypasses, with a ratchet",
|
|
16
10
|
"s": "Design drift guard counts token bypasses, with a ratchet",
|
|
17
11
|
"k": "new"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1478,
|
|
15
|
+
"t": "Work breakdown keeps done tasks in date order and folds a finished stage",
|
|
16
|
+
"s": "Work breakdown keeps done tasks in date order and folds a finished stage",
|
|
17
|
+
"k": "new"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Layout and first run: the places, the navigation, the Viewer, the launcher and Adler"
|
|
4
4
|
description: "The places, the navigation at the left, the Viewer, the keys and the phone; the first run; when features appear; the PMOS app; and Adler."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-22
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Layout and first run
|
|
@@ -150,7 +150,7 @@ The left column has three blocks:
|
|
|
150
150
|
|
|
151
151
|
- **Where it stands.** What is happening, in a few sentences. Then **Next**: the next three dates, a milestone as a diamond and the outcome check as a circle; press a milestone to open it. Then one suggestion from PMOS with **Why**, **PMOS will** and **Based on**. The pencil opens it so you can change it first, ✓ does it and ✕ drops it. Other suggestions are one link under it.
|
|
152
152
|
- **Stages.** Each stage of the workflow, with its dates under its name or "no dates yet", on a month scale with a red line for today. A stage's bar runs from the earliest start to the latest end of its tasks; a task with no start counts from its due date. Only a stage with no dated task uses the days the workflow moved through it. To change a stage's dates, change its tasks' dates. A stage has a bar only when it has real dates. A milestone is a diamond on its stage's row.
|
|
153
|
-
- **Work breakdown.** **List** or **Gantt**; PMOS keeps your choice on this computer. **List** has one box on top: type a task and press Enter. Say its stage ("… in Plan"), or it goes to the stage in progress; start with ◇ to add a milestone. Each stage with tasks is one group that says how much is done, for example "1 of 3 done". A done task stays in its
|
|
153
|
+
- **Work breakdown.** **List** or **Gantt**; PMOS keeps your choice on this computer. **List** has one box on top: type a task and press Enter. Say its stage ("… in Plan"), or it goes to the stage in progress; start with ◇ to add a milestone. Each stage with tasks is one group that says how much is done, for example "1 of 3 done". Press the group to fold it, and press it again to open it. A stage whose tasks are all done is folded until you open it. In a stage, the tasks are in date order, a late task first. A done task stays in its place, in grey with a check. Stages with no tasks fold into one line at the end. Press the box before a task to mark it done, with **Undo**. Press its name to rename it: Enter saves and Escape cancels. When you point at the row, four icons show: **Who** (You, the people on this initiative, or **PMOS does it**, which gives the task to PMOS), **Due date**, **Stage** (moves the task to another stage) and ⋯ (**Status**, **Make it a milestone** and **Open the task**). Each change has **Undo**. A Jira ticket keeps its owner and stage from Jira. **Gantt** is the table described below, with its bars.
|
|
154
154
|
|
|
155
155
|
Press the rest of a row, or a milestone, to open it as a full popup in place of the work side. Its top line has ←, the path (**Work › product › initiative**), the chat button, ⋯ and ×. ← or the initiative's name goes back to the initiative, where you left it. The chat button shows **Ask PMOS** beside it. × closes the popup. A task shows its status, dates, owner, notes and what changed. A milestone also shows its date and how many days are left, the done test, **Kill if**, and the suggestion from PMOS about it when there is one.
|
|
156
156
|
|
|
@@ -162,7 +162,7 @@ The right column has two blocks:
|
|
|
162
162
|
On a phone, in a shared read-only copy and in a breakdown given the whole popup, the work side keeps the three parts below. They use the full width of the popup: in a wide popup the timeline gets the extra width. A done task shows in grey text, never struck through.
|
|
163
163
|
|
|
164
164
|
- **Overview.** Three short lines from the initiative's own records: **Problem**, **Goal** (with the goal it serves, by name) and **Done when**. A line with no record says **Not written yet.** and offers a draft with ✓ and ✕. Press a line to change it; it saves when you leave the field, with **Undo**. Then one line on where it stands, **PMOS suggests** (at most three, each with ✓ and ✕), and **Details ›** for the facts: Stage, Status, Start, Target end, Next milestone, Goal, Product, Program, Workflow and Open. A fact with no value is not shown. Goal, Product, Program and Next milestone are in the link colour and open their thing; the others are plain text. An initiative that is closed or done but has open tasks shows one suggestion: **Close them** or **Reopen**.
|
|
165
|
-
- **Work breakdown.** Each stage is a row that folds and says how much is done, for example "3 of 9 done". Only the stage in progress opens by itself. In a long stage you see the late tasks, the tasks in progress and the next five, then **N more tasks**.
|
|
165
|
+
- **Work breakdown.** Each stage is a row that folds and says how much is done, for example "3 of 9 done". Only the stage in progress opens by itself, and a stage whose tasks are all done stays folded until you open it. In a stage, the tasks are in date order, a late task first; a done task stays in its place, in grey. In a long stage you see the late tasks, the tasks in progress and the next five, then **N more tasks**. The stages after the next one fold to one row. A task in no stage is not in the breakdown: it is in Work › Backlog, and one quiet line under the breakdown says how many, for example **2 tasks with no stage are in the Backlog ›**. A task with no date shows no date and is never late. The timeline is on the right, with **Today** on it. Drag the grip between the columns and the timeline to make the timeline wider or narrower; a double press puts it back. Choose its span (Quarter to Full) beside the tune icon, which shows or hides columns. The four-corners icon gives the breakdown the whole popup. Type in the last row of a stage to add a task; the **Task** choice beside it makes the next one a milestone.
|
|
166
166
|
- **Status.** Press a task's status and pick the new one. **When did this happen?** shows under the list, with **Today** chosen: press the status again, or Enter, to keep today. Press **Yesterday**, or **Pick a date**, when the work moved earlier than you noted it. A day in the future, or a day before the task's previous move, cannot be picked. The toast says both days, for example "Done on 14 Nov, noted today.", with **Undo**.
|
|
167
167
|
- **Open the task.** The ↗ on a row, or **Open the task** in its ⋯, opens a small popup on top: Task or Milestone, the name (press it to rename), status, dates, owner and notes. Its status asks **When did this happen?** too. ↑ and ↓ go to the task before or after it, and ⋯ has **Make it a milestone**, **Archive** and **Delete**, each with **Undo**. A change shows on the task's row at once. Escape, × or a press outside closes only the small popup, and the task's row lights for a moment.
|
|
168
168
|
- **Dates.** Press a task's date. **Task | Milestone** on top turns it into a milestone (one Date) or back into a task (Start and Due). Write a day as "15 Oct 2026", or press the calendar icon. The row's ⋯ also has **Make it a milestone** and **Open the task**.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.682.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.682.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -78,3 +78,8 @@ div.pwd-art { cursor: default; }
|
|
|
78
78
|
.pwd-art.miss .t { color: var(--muted); }
|
|
79
79
|
.pwd-art .w.warn { color: var(--alert); }
|
|
80
80
|
.pwd-ai { flex: none; color: var(--muted); display: inline-flex; }
|
|
81
|
+
/* a stage head is a press that folds the stage (Wawan, 2026-11-22): the system's pm-group as a button, the chevron at the end */
|
|
82
|
+
.pwd-list .pm-group.pwd-gh { width: 100%; border: 0; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); text-align: left; cursor: pointer; }
|
|
83
|
+
.pwd-list .pm-group.pwd-gh svg { margin-left: auto; flex: none; }
|
|
84
|
+
.pwd-list .pm-group.pwd-gh:hover { color: var(--ink); }
|
|
85
|
+
.pwd-list .pm-group.pwd-gh:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
@@ -19,7 +19,7 @@ export const I = {
|
|
|
19
19
|
star: 'M12 3l1.8 5.4L19 10.2l-5.2 1.8L12 17.4l-1.8-5.4L5 10.2l5.2-1.8z', pen: 'M4 20h4L19 9l-4-4L4 16z', ok: 'M5 12.5l4.5 4.5L19 7.5', x: 'M6 6l12 12M18 6L6 18',
|
|
20
20
|
plus: 'M12 5v14M5 12h14', more: 'M5 12h.01M12 12h.01M19 12h.01', open: 'M14 5h5v5M19 5l-8 8M18 14v5H5V6h5', box: 'M6 5h12a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z',
|
|
21
21
|
dia: 'M12 4l8 8-8 8-8-8z', doc: 'M7 3h7l4 4v14H7zM14 3v4h4M9.5 12h6M9.5 16h6', deck: 'M4 5h16v11H4zM12 16v4M8 20h8', link: 'M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1',
|
|
22
|
-
proto: 'M4 5h16v12H4zM9 21h6M12 17v4', right: 'M10 7l5 5-5 5',
|
|
22
|
+
proto: 'M4 5h16v12H4zM9 21h6M12 17v4', right: 'M10 7l5 5-5 5', down: 'M7 10l5 5 5-5',
|
|
23
23
|
who: 'M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM5 20a7 7 0 0 1 14 0', cal: 'M5 6h14v14H5zM5 10h14M9 4v4M15 4v4', stage: 'M5 7h14M5 12h10M5 17h6',
|
|
24
24
|
};
|
|
25
25
|
const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
@@ -131,7 +131,8 @@ export function stageKeyOf(text, st) {
|
|
|
131
131
|
const cur = L.find((x) => x.now) || L.find((x) => !x.done) || L[0];
|
|
132
132
|
return cur ? { key: cur.key, name: cur.name, title: s, guessed: true } : null;
|
|
133
133
|
}
|
|
134
|
-
/** rows: the breakdown with every stage open,
|
|
134
|
+
/** rows: the breakdown with every stage open but a finished one, done tasks in their date order and no "more" fold (pop-work-model.js
|
|
135
|
+
* breakdownOf with openAll). A stage head is a press that folds it (data-pw-fold, the Gantt's own). o: { ro, looseN, ms } */
|
|
135
136
|
export function listHtml(rows, W, o = {}) {
|
|
136
137
|
const groups = [], empty = [];
|
|
137
138
|
let g = null;
|
|
@@ -156,9 +157,13 @@ export function listHtml(rows, W, o = {}) {
|
|
|
156
157
|
return `<div class="pm-li pwd-li${x.done ? ' dn' : ''}${x.lit ? ' now' : ''}" data-pwli="${esc(x.uid)}" data-pw-row="${esc(x.uid)}">${box}<span class="txt">${title}${sub ? `<span class="w${x.late ? ' late' : ''}">${esc(sub)}</span>` : ''}</span>${acts}</div>`;
|
|
157
158
|
};
|
|
158
159
|
const body = groups.map((G) => {
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
// a stage row from breakdownOf says whether it has tasks (can) and is open; a row without them is open when tasks follow it
|
|
161
|
+
const has = G.s.can != null ? !!G.s.can : G.tasks.length > 0, open = G.s.open != null ? !!G.s.open : true;
|
|
162
|
+
if (!has) { empty.push(G.s.name); return ''; }
|
|
163
|
+
const count = G.s.count || G.tasks.filter((x) => x.done).length + ' of ' + G.tasks.length + ' done';
|
|
164
|
+
// the head folds the stage (Wawan, 2026-11-22: "completed stage can be collapsed"); its tasks keep their date order, done ones in place
|
|
165
|
+
const head = `<button type="button" class="pm-group pwd-gh${G.s.now ? ' now' : ''}" data-pw-fold="${esc(G.s.key)}" aria-expanded="${open}"><b>${esc(G.s.name)}</b> <span class="pm-meta">${esc(count)}</span>${SV(open ? I.down : I.right, 14)}</button>`;
|
|
166
|
+
return head + (open ? G.tasks.map(li).join('') : '');
|
|
162
167
|
}).join('');
|
|
163
168
|
const fold = empty.length ? `<div class="pm-fold pwd-fold">${esc(empty.length === 1 ? empty[0] + ' has no tasks yet' : empty.slice(0, -1).join(', ') + ' and ' + empty[empty.length - 1] + ' have no tasks yet')}</div>` : '';
|
|
164
169
|
const cap = o.ro ? '' : `<input class="pm-input pwd-cap" data-pw-cap placeholder="Add a task; say its stage, or PMOS picks one" aria-label="Add a task. Say its stage, or PMOS picks one" maxlength="200" autocomplete="off">`;
|
|
@@ -52,10 +52,10 @@ const store = {
|
|
|
52
52
|
// 'pw-cols2': a column choice saved before round 3 (Status and Date hidden by an older tune menu) no longer hides them (round 3 point 5)
|
|
53
53
|
const COLS = 'pw-cols2', SPAN = 'pw-span', BIG = 'pw-big', TLW = 'pw-tlw';
|
|
54
54
|
const cols = () => ({ status: true, date: true, tl: true, kind: true, when: true, ...store.get(COLS, {}) });
|
|
55
|
-
const ST = new Map(); // initiative id → { open, shut,
|
|
55
|
+
const ST = new Map(); // initiative id → { open, shut, moreOpen, farOpen, details, top }
|
|
56
56
|
const LOOSE = 'pw-loose'; // the initiatives whose Not in a stage row the PM opened (round 3 point 21), remembered on this computer
|
|
57
57
|
const stOf = (id) => {
|
|
58
|
-
if (!ST.has(id)) ST.set(id, { open: new Set((store.get(LOOSE, []) || []).includes(id) ? [''] : []), shut: new Set(),
|
|
58
|
+
if (!ST.has(id)) ST.set(id, { open: new Set((store.get(LOOSE, []) || []).includes(id) ? [''] : []), shut: new Set(), moreOpen: new Set(), farOpen: false, details: null, top: 0, msAdd: false, focus: '' });
|
|
59
59
|
return ST.get(id);
|
|
60
60
|
};
|
|
61
61
|
const looseKeep = (id, on) => { const L = (store.get(LOOSE, []) || []).filter((x) => x !== id); if (on) L.push(id); store.set(LOOSE, L.slice(-200)); };
|
|
@@ -207,12 +207,11 @@ const xOf = (W) => { const a = Date.parse(W.span.a), b = Date.parse(W.span.b); r
|
|
|
207
207
|
function barHtml(x, W) {
|
|
208
208
|
const X = xOf(W);
|
|
209
209
|
if (x.kind === 'stage') return x.start || x.end ? CB.stageBar({ start: x.start, end: x.end, tone: x.tone, late: x.late, ms: x.ms, name: x.name, gaps: x.gaps, marks: x.open ? [] : x.marks }, X, { today: W.today }) : '';
|
|
210
|
-
if (x.kind === 'done') return x.start || x.end ? CB.stageBar({ start: x.start, end: x.end, tone: 'dn' }, X, { today: W.today }) : '';
|
|
211
210
|
return CB.taskBar(x, X, W.today);
|
|
212
211
|
}
|
|
213
212
|
function rowHtml(x, W, C, sugRows) {
|
|
214
213
|
if (RO) { x = { ...x, jira: true }; sugRows = new Map(); } // a copy: a task's status, date and name are text, as a Jira task's are; no ✦
|
|
215
|
-
const tl = C.tl ? `<div class="pw-tl">${(x.kind === 'stage' || x.kind === 'task'
|
|
214
|
+
const tl = C.tl ? `<div class="pw-tl">${(x.kind === 'stage' || x.kind === 'task') ? barHtml(x, W) : ''}${W.tx != null ? `<i class="pw-now" style="left:${W.tx.toFixed(2)}%"></i>` : ''}</div>` : '';
|
|
216
215
|
const stc = C.status ? `<span class="pw-st">${x.kind === 'task' && !x.jira ? `<button type="button" class="pw-cell" data-pw-status="${esc(x.uid)}" aria-haspopup="menu" aria-label="${esc('Status: ' + x.status + '. Change it')}">${esc(x.status)}</button>` : esc(x.status || '')}</span>` : '';
|
|
217
216
|
const dtc = C.date ? `<span class="pw-dt${x.late ? ' warn' : ''}">${x.kind === 'task' && !x.jira ? `<button type="button" class="pw-cell${x.date ? '' : ' empty'}" data-pw-date="${esc(x.uid)}" aria-label="${esc((x.date ? (x.ms ? 'Milestone ' : 'Due ') + x.date : 'No date') + '. Set the date, or make it a ' + (x.ms ? 'task' : 'milestone'))}">${esc(x.date || 'Set a date')}</button>` : esc(x.date || '')}</span>` : '';
|
|
218
217
|
if (x.kind === 'stage') {
|
|
@@ -223,7 +222,6 @@ function rowHtml(x, W, C, sugRows) {
|
|
|
223
222
|
}
|
|
224
223
|
if (x.kind === 'far') return `<div class="pw-tr pw-sr" role="row"><span class="pw-it"><button type="button" class="pw-stg" data-pw-far aria-expanded="false"><span class="pw-n">${esc(x.n)}</span><b>${esc(x.name)}</b>${SVG(P.right, 14)}<small>${esc(x.count)}</small></button></span>${stc}${C.date ? '<span></span>' : ''}${tl}</div>`;
|
|
225
224
|
if (x.kind === 'more') return `<div class="pw-tr pw-dr" role="row"><span class="pw-it"><button type="button" class="pw-dn" data-pw-more="${esc(x.key)}" aria-expanded="false">${esc(x.label)}${SVG(P.right, 14)}</button></span>${C.status ? '<span></span>' : ''}${C.date ? '<span></span>' : ''}${C.tl ? '<div class="pw-tl"></div>' : ''}</div>`;
|
|
226
|
-
if (x.kind === 'done') return `<div class="pw-tr pw-dr" role="row"><span class="pw-it"><button type="button" class="pw-dn" data-pw-done="${esc(x.key)}" aria-expanded="${x.open}">${esc(x.label)}${SVG(x.open ? P.down : P.right, 14)}</button></span>${C.status ? '<span></span>' : ''}${C.date ? '<span></span>' : ''}${tl}</div>`;
|
|
227
225
|
const s = sugRows.get(x.uid);
|
|
228
226
|
const title = x.jira ? `<span class="pw-tt">${esc(x.title)}</span>` : `<button type="button" class="pw-tt" data-pw-name="${esc(x.uid)}" aria-label="${esc('Rename ' + x.title)}">${esc(x.title)}</button>`;
|
|
229
227
|
return `<div class="pw-tr pw-kr${x.done ? ' done' : ''}${x.lit ? ' lit' : ''}" role="row" data-pw-row="${esc(x.uid)}" data-pw-sec="${esc(x.sec)}"><span class="pw-it"><i class="pw-bul${x.ms ? ' ms' : ''}" aria-hidden="true"></i>${title}${RO ? '' : ib(`data-pw-open="${esc(x.uid)}"`, 'Open the task', P.open, 'xs hov') + ib(`data-pw-row-more="${esc(x.uid)}" aria-haspopup="menu"`, 'More for ' + x.title, P.more, 'xs hov')}</span>${stc}${dtc}${tl}</div>`
|
|
@@ -289,7 +287,7 @@ const keyOf = (v, o) => String((o && o.id) || (v && (v.id || v.key)) || '');
|
|
|
289
287
|
function model(r, v, o) {
|
|
290
288
|
const id = keyOf(v, o), S = stOf(id), it = ITEMS.get(id);
|
|
291
289
|
const g = o.goal || goalOf(o.ws, o.board, r.anchor || v.anchor);
|
|
292
|
-
const W = M.workOf(r, v, { ...o, goal: M.idShaped(g) ? '' : g, product: productName(o.product, o.ws), art: artOf(id, o.ws), open: S.open, shut: S.shut,
|
|
290
|
+
const W = M.workOf(r, v, { ...o, goal: M.idShaped(g) ? '' : g, product: productName(o.product, o.ws), art: artOf(id, o.ws), open: S.open, shut: S.shut, moreOpen: S.moreOpen, farOpen: S.farOpen, focus: S.focus, mode: store.get(SPAN, 'full'), items: it || [], dropped: dropped() });
|
|
293
291
|
const mk = M.marksOf(W.span, W.today); W.tx = mk.today;
|
|
294
292
|
return { W, S, id };
|
|
295
293
|
}
|
|
@@ -306,13 +304,15 @@ export function html(r, v, o = {}) {
|
|
|
306
304
|
* breakdown table with its bars and tools; List and Gantt are one remembered choice ('pw-view'). */
|
|
307
305
|
const VIEW = 'pw-view';
|
|
308
306
|
const allOpen = (v) => { const k = new Set(((v.tasks || {}).sections || []).filter((s) => s.kind === 'stage').map((s) => s.key)); return k; };
|
|
309
|
-
|
|
307
|
+
// the List (S given): every stage with tasks open but a finished one (Wawan, 2026-11-22), and the PM's own fold and unfold, shared with the
|
|
308
|
+
// Gantt. No S (a lookup: which stage holds a task, which stage a line names): every stage open, so every task is a row
|
|
309
|
+
function stagesOf(r, v, o, S) {
|
|
310
310
|
const k = allOpen(v);
|
|
311
|
-
return M.breakdownOf(r, v, { ...o, open: k, shut: new Set(),
|
|
311
|
+
return M.breakdownOf(r, v, { ...o, openAll: true, open: S ? S.open : k, shut: S ? S.shut : new Set(), moreOpen: k, farOpen: true }).rows;
|
|
312
312
|
}
|
|
313
313
|
function dsHtml(r, v, o, W, S, C, mode) {
|
|
314
314
|
const id = keyOf(v, o), view = store.get(VIEW, 'list') === 'gantt' ? 'gantt' : 'list';
|
|
315
|
-
const st = stagesOf(r, v, { ...o, today: W.today, focus: S.focus });
|
|
315
|
+
const st = stagesOf(r, v, { ...o, today: W.today, focus: S.focus }, S);
|
|
316
316
|
const wbs = view === 'gantt'
|
|
317
317
|
? breakdownHtml(W, C, mode, false, S).replace('<h3>Work breakdown</h3>', PD.wbsHead('gantt')).replace('class="pw-sec"', 'class="pw-sec pm-block pwd-blk pwd-wbs"')
|
|
318
318
|
: `<section class="pm-block pwd-blk pwd-wbs" aria-label="Work breakdown">${PD.wbsHead('list')}${PD.listHtml(st, W, { looseN: W.looseN })}</section>`;
|
|
@@ -352,7 +352,6 @@ function phoneHtml(W, S, oid, v) {
|
|
|
352
352
|
if (x.kind === 'stage' && x.loose) return '';
|
|
353
353
|
if (x.kind === 'stage') return `<li class="pw-pst${x.now ? ' now' : ''}">${dot(x)}<button type="button" class="pw-pstg" data-pw-fold="${esc(x.key)}" aria-expanded="${x.open}"${x.can ? '' : ' disabled'}><span class="pw-n">${esc(x.n)}</span><b>${esc(x.name)}</b></button>${x.date ? `<span class="pw-pd${x.late ? ' warn' : ''}">${esc(x.date)}</span>` : x.can ? `<span class="pw-pd">${esc(x.count || '')}</span>` : ''}</li>`;
|
|
354
354
|
if (x.kind === 'far') return `<li class="pw-pst">${dot({ status: 'To do' })}<button type="button" class="pw-pstg" data-pw-far aria-expanded="false"><span class="pw-n">${esc(x.n)}</span><b>${esc(x.name)}</b></button><span class="pw-pd">${esc(x.count)}</span></li>`;
|
|
355
|
-
if (x.kind === 'done') return `<li class="pw-ptk"><button type="button" class="pw-dn" data-pw-done="${esc(x.key)}" aria-expanded="${x.open}">${esc(x.label)}</button></li>`;
|
|
356
355
|
if (x.kind === 'more') return `<li class="pw-ptk"><button type="button" class="pw-dn" data-pw-more="${esc(x.key)}" aria-expanded="false">${esc(x.label)}</button></li>`;
|
|
357
356
|
if (x.kind === 'task') return `<li class="pw-ptk${x.done ? ' done' : ''}"><i class="pw-bul${x.ms ? ' ms' : ''}" aria-hidden="true"></i><button type="button" class="pw-tt" data-pw-open="${esc(x.uid)}">${esc(x.title)}</button>${x.date ? `<span class="pw-pd${x.late ? ' warn' : ''}">${esc(x.date)}</span>` : ''}</li>`;
|
|
358
357
|
return '';
|
|
@@ -508,7 +507,6 @@ export function wire(body, h0, x0) {
|
|
|
508
507
|
if ('pwDetails' in d) { S.details = !S.details; redraw(); return; }
|
|
509
508
|
if (d.pwFold != null) { const k = d.pwFold, open = b.getAttribute('aria-expanded') === 'true'; S.open.delete(k); S.shut.delete(k); (open ? S.shut : S.open).add(k); if (k === '') looseKeep(c.id, !open); redraw(); return; }
|
|
510
509
|
if ('pwFar' in d) { S.farOpen = true; redraw(); return; }
|
|
511
|
-
if (d.pwDone != null) { if (S.doneOpen.has(d.pwDone)) S.doneOpen.delete(d.pwDone); else S.doneOpen.add(d.pwDone); redraw(); return; }
|
|
512
510
|
if ('pwTl' in d) { store.set(COLS, { ...cols(), tl: !cols().tl }); redraw(); return; }
|
|
513
511
|
if ('pwSpan' in d) { spanMenu(b, redraw); return; }
|
|
514
512
|
if (d.pwTune) { tuneMenu(b, d.pwTune, redraw); return; }
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* o { steps (Product feature's eight), today ('YYYY-MM-DD'), docs (home-ini-model.js docRows of the initiative's read), items (the
|
|
9
9
|
* Library's rows for this initiative, GET /api/library-items, when that route is there), product (its name), program ({ title } | null),
|
|
10
10
|
* goal (the goal's name, else the anchor), mode ('full' | 'quarter' | 'half' | 'year' | '2y' | '5y': the timeline's span), open (Set of
|
|
11
|
-
* stage keys the PM unfolded), shut (Set of stage keys the PM folded),
|
|
11
|
+
* stage keys the PM unfolded), shut (Set of stage keys the PM folded), openAll (the List: every stage with tasks opens by itself), farOpen (bool) }
|
|
12
12
|
* levelOf(L, o) → the same parts one level up: a program or a product (boards 26, 27). L: { kind, title, path, summary, facts, rows, docs, props }
|
|
13
13
|
* spanOf(dates, mode, today) → { a, b } ISO the window of the timeline: Full runs from the earliest start to the latest end (no bar is cut)
|
|
14
14
|
* barOf(x, span, today) → { l, w, pass, late, ms, dot } in % of the window one bar: the plan, the part that has passed, the missed date
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
* 1 Overview: the summary, then "PMOS suggests" (at most three; absent when there is none), then the facts. With many tasks the Overview
|
|
20
20
|
* folds to its summary and "Details" opens the facts (many: more than 6 rows of tasks in the open stage).
|
|
21
21
|
* 2 A suggestion about one task sits under that task (rowSuggests by uid); the same suggestion never shows twice.
|
|
22
|
-
* 3 The breakdown: a stage is a row that folds ("3 of 9 done"). Only the stage in progress opens by itself
|
|
23
|
-
*
|
|
24
|
-
* ("
|
|
22
|
+
* 3 The breakdown: a stage is a row that folds ("3 of 9 done"). Only the stage in progress opens by itself (the List: every stage with
|
|
23
|
+
* tasks). A stage whose tasks are all done stays folded until the PM opens it. In an open stage late open tasks come first, then every
|
|
24
|
+
* task by date, a done task in its place, marked done (Wawan, 2026-11-22: "it's weird to put done task on the bottom and hidden. Also
|
|
25
|
+
* completed stage can be collapsed"). The stages after the next one fold into one row ("Prioritize to Evaluate, 5 stages").
|
|
25
26
|
* 4 Bars: light grey the plan, dark grey the part that has passed, the missed date a diamond, a red line from it to today. A row with no
|
|
26
27
|
* date has no bar: PMOS does not invent a date.
|
|
27
28
|
* 5 Artefacts: one table: Artefact, Kind, Updated. A core document a gate needs that is not written is a grey row that says which gate. */
|
|
@@ -121,6 +122,8 @@ const taskSpan = (ts) => {
|
|
|
121
122
|
return [a[0] || '', b[b.length - 1] || ''];
|
|
122
123
|
};
|
|
123
124
|
const urgent = (a, b) => (b.late - a.late) || (a.end || '9999').localeCompare(b.end || '9999');
|
|
125
|
+
/** One date order for a stage's done and open tasks: a late open task first, then by date, a done task in its place. */
|
|
126
|
+
const inOrder = (a, b) => ((!b.closed && !!b.late) - (!a.closed && !!a.late)) || (a.end || a.start || '9999').localeCompare(b.end || b.start || '9999');
|
|
124
127
|
const STATUS = { done: 'Done', now: 'In progress', next: 'To do', skip: 'Skipped' };
|
|
125
128
|
const taskStatus = (x) => (x.wont ? "Won't do" : x.status || 'To do');
|
|
126
129
|
|
|
@@ -301,7 +304,7 @@ export function breakdownOf(r, v, o = {}) {
|
|
|
301
304
|
const t = todayOf(o), list = ((v.stage || {}).ladder || []).map((s, i) => ({ name: s.name, status: s.cls, ms: !!s.ms, i }));
|
|
302
305
|
const secs = (v.tasks || {}).sections || [];
|
|
303
306
|
const ran = ranOf(r, secs.filter((s) => s.kind === 'stage').map((s) => ({ key: s.key, name: s.name, status: s.status })));
|
|
304
|
-
const open = o.open || new Set(), shut = o.shut || new Set(),
|
|
307
|
+
const open = o.open || new Set(), shut = o.shut || new Set(), f = o.focus ? String(o.focus) : '';
|
|
305
308
|
const lit = (row) => (f && row.uid != null && String(row.uid) === f ? { ...row, lit: true } : row);
|
|
306
309
|
const stages = secs.filter((s) => s.kind === 'stage');
|
|
307
310
|
const cur = stages.findIndex((s) => s.status === 'now');
|
|
@@ -330,7 +333,9 @@ export function breakdownOf(r, v, o = {}) {
|
|
|
330
333
|
if (a && b && b < a) b = a;
|
|
331
334
|
const live = s.status === 'now' && r.status !== 'done' && !r.ended;
|
|
332
335
|
const dl = b && (s.status === 'now' || s.status === 'next') ? dateLate(b, t, live || ts.some((x) => !x.closed)) : { text: b && s.status === 'done' ? '' : '', late: false };
|
|
333
|
-
|
|
336
|
+
// a finished stage (every task done) folds until the PM opens it; the List opens every other stage with tasks
|
|
337
|
+
const finished = n > 0 && nDone === n;
|
|
338
|
+
const isOpen = holds(all, f) ? true : shut.has(s.key) ? false : open.has(s.key) ? true : !finished && (o.openAll || s.status === 'now');
|
|
334
339
|
// the count holds every task drawn under the stage: its own and the ones in no stage that sit under it (design check, 2026-11-19)
|
|
335
340
|
const nAll = n + lz.length;
|
|
336
341
|
const count = nAll ? (s.status === 'next' && !nDone ? plural(nAll, 'task', 'tasks') : nDone + ' of ' + nAll + ' done') : '';
|
|
@@ -341,8 +346,8 @@ export function breakdownOf(r, v, o = {}) {
|
|
|
341
346
|
rows.push({ kind: 'stage', key: s.key, n: s.n, name: s.name, ms: !!s.ms, status: STATUS[s.status] || '', count, date: dl.text, late: dl.late, start: a, end: b, gaps, marks, tone: s.status === 'done' ? 'dn' : s.status === 'now' ? 'now' : '',
|
|
342
347
|
done: s.status === 'done', open: (isOpen || lz.length > 0) && has, can: has, now: s.status === 'now', skip: s.status === 'skip' });
|
|
343
348
|
if (!((isOpen || lz.length > 0) && has)) return;
|
|
344
|
-
|
|
345
|
-
|
|
349
|
+
if (s.status === 'now' && ts.length > MANY) many = true;
|
|
350
|
+
const sorted = all.slice().sort(inOrder);
|
|
346
351
|
// a long stage (round 3 point 7): the late and in-progress tasks, then the next NEXT, then "N more"; the task a Today row opened always shows
|
|
347
352
|
const all2 = sorted.map((x) => taskRow(x, t));
|
|
348
353
|
let shown = all2;
|
|
@@ -354,12 +359,6 @@ export function breakdownOf(r, v, o = {}) {
|
|
|
354
359
|
for (const x of shown) rows.push(lit({ ...x, sec: s.key }));
|
|
355
360
|
if (shown.length < all2.length) rows.push({ kind: 'more', key: s.key, n: all2.length - shown.length, label: plural(all2.length - shown.length, 'more task', 'more tasks') });
|
|
356
361
|
for (const x of lz.slice().sort(urgent)) { rows.push(lit({ ...taskRow(x, t), sec: '', loose: s.key })); loose.push({ uid: x.uid, title: x.title, to: s.key, name: s.name }); }
|
|
357
|
-
if (nDone) {
|
|
358
|
-
const dd = s.done.map((x) => x.end).filter(Boolean).sort();
|
|
359
|
-
const dO = dOpen.has(s.key) || holds(s.done, f);
|
|
360
|
-
rows.push({ kind: 'done', key: s.key, n: nDone, label: plural(nDone, 'task', 'tasks') + ' done', open: dO, start: (s.done.map((x) => x.start).filter(Boolean).sort()[0]) || dd[0] || '', end: dd[dd.length - 1] || '' });
|
|
361
|
-
if (dO) for (const x of s.done) rows.push(lit({ ...taskRow(x, t), sec: s.key }));
|
|
362
|
-
}
|
|
363
362
|
};
|
|
364
363
|
// the stages after the next one fold into one row (board 20), unless the PM opened it
|
|
365
364
|
const farFrom = cur >= 0 ? cur + 2 : -1;
|