create-pmos 0.644.0 → 0.645.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.
Files changed (29) hide show
  1. package/package.json +14 -20
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/design-system/charts/README.md +2 -1
  4. package/payload/design-system/charts/components/Funnel/README.md +50 -0
  5. package/payload/design-system/charts/components/Funnel/preview.html +11 -0
  6. package/payload/design-system/charts/components/bundle.css +1 -0
  7. package/payload/design-system/charts/components/bundle.js +20 -1
  8. package/payload/design-system/charts/spec.md +2 -1
  9. package/payload/planning/evals/eval-calibration.md +1 -1
  10. package/payload/planning/okrs/health-budgets.md +1 -1
  11. package/payload/state/discoveries.md +1 -1
  12. package/workspace/changelog.json +13 -0
  13. package/workspace/design-system/charts/README.md +2 -1
  14. package/workspace/design-system/charts/components/Funnel/README.md +50 -0
  15. package/workspace/design-system/charts/components/Funnel/preview.html +11 -0
  16. package/workspace/design-system/charts/components/bundle.css +1 -0
  17. package/workspace/design-system/charts/components/bundle.js +20 -1
  18. package/workspace/design-system/charts/spec.md +2 -1
  19. package/workspace/guide/layout.md +1 -0
  20. package/workspace/package-lock.json +2 -2
  21. package/workspace/package.json +1 -1
  22. package/workspace/public/pm/charts.css +1 -0
  23. package/workspace/public/pm/cozy-vw-mtg.css +87 -74
  24. package/workspace/public/pm/cozy-vw-rp.css +52 -45
  25. package/workspace/public/pm/cozy-vw.css +83 -74
  26. package/workspace/public/pm/premium-vw-cal.css +21 -15
  27. package/workspace/public/pm/premium-vw-meet.css +11 -11
  28. package/workspace/public/pm/premium-vw-rec.css +11 -11
  29. package/workspace/public/pm/premium-vw-report.css +14 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.644.0",
3
+ "version": "0.645.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.645.0",
38
+ "at": "2026-11-20T02:59:30.947Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1427,
43
+ "t": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
44
+ "s": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
45
+ "k": "new"
46
+ }
47
+ ]
48
+ },
36
49
  {
37
50
  "v": "0.644.0",
38
51
  "at": "2026-11-20T02:28:58.438Z",
@@ -303,25 +316,6 @@
303
316
  "k": "new"
304
317
  }
305
318
  ]
306
- },
307
- {
308
- "v": "0.618.0",
309
- "at": "2026-11-19T04:00:56.732Z",
310
- "f": 4,
311
- "prs": [
312
- {
313
- "n": 1400,
314
- "t": "A key result waits on Confluence, not on a raw page id",
315
- "s": "A key result waits on Confluence, not on a raw page id",
316
- "k": "fix"
317
- },
318
- {
319
- "n": 1391,
320
- "t": "Popup round 3 follow-up (stage-move day, task popup, phone chat, one task list)",
321
- "s": "Popup round 3 follow-up (stage-move day, task popup, phone chat, one task list)",
322
- "k": "new"
323
- }
324
- ]
325
319
  }
326
320
  ]
327
321
  }
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@36174d14
1
+ kernel-source: pmos@6d0ce06a
2
2
  assembled: 2026-11-20
3
3
  mode: vendor
@@ -21,7 +21,7 @@ Each level is made only from the levels above it.
21
21
  | --- | --- | --- |
22
22
  | 0 · Foundations | Roles (`chart-*`, `diagram-*`) and the three media with their sizes. Colours and fonts come from Komorebi. | Roles, Media |
23
23
  | 1 · Elements | The smallest pieces of a chart. | Marks, Labels, Controls |
24
- | 2 · Charts | Seven chart kinds. | Bar, BarGoal, Line, StackedBar, HorizontalBar, Meter, Sparkline |
24
+ | 2 · Charts | Eight chart kinds. | Bar, BarGoal, Line, StackedBar, HorizontalBar, Funnel, Meter, Sparkline |
25
25
  | 3 · Diagrams | Four diagram kinds. | Flow, Swimlane, Timeline, DateRanges |
26
26
  | 4 · Placements | Where a chart sits in each system. | InBlock (workspace), OnSlide (decks), OnPage (documents) |
27
27
 
@@ -36,6 +36,7 @@ Each level is made only from the levels above it.
36
36
  | How is it moving over time, against plan? | Line |
37
37
  | What share is done, in progress, at risk? | StackedBar |
38
38
  | Which one is biggest or slowest? | HorizontalBar |
39
+ | Where do people leave on the way to done? | Funnel |
39
40
  | How is a number trending, at a glance? | Sparkline beside the number |
40
41
  | How does work move? Who does what? | Flow, Swimlane |
41
42
  | When do things happen? What is late? | Timeline, DateRanges |
@@ -0,0 +1,50 @@
1
+ ---
2
+ type: Reference
3
+ title: "PMOS Charts: Funnel"
4
+ description: "Steps from first view to done: one bar per step, with the drop from the step before written under it in `alert` (\"−39%\"). The target after a change is a dashed `chart-done` outline on each bar (`\"target\"`, one value per step). One step is lit: the one the answer is about. At most 6 steps. Moved here from PMOS Slides, which draws it on its Funnel and Bet slides."
5
+ timestamp: 2026-11-20
6
+ ---
7
+ Steps from first view to done: one bar per step, with the drop from the step before written under it in `alert` ("−39%"). The target after a change is a dashed `chart-done` outline on each bar (`"target"`, one value per step). One step is lit: the one the answer is about. At most 6 steps. Moved here from PMOS Slides, which draws it on its Funnel and Bet slides.
8
+
9
+ ## Interaction
10
+
11
+ The same as every chart: hover or touch for the value, click to open the items behind a mark, Left and Right to move, Enter to open, Esc to leave. On a slide only the light moves; on a page nothing moves and every value is printed.
12
+
13
+ ## Spec
14
+
15
+ ```json
16
+ {
17
+ "kind": "funnel",
18
+ "answer": "Most people leave at the sign-in method and the form",
19
+ "unit": "%",
20
+ "x": [
21
+ "Viewed",
22
+ "Picked method",
23
+ "Filled form",
24
+ "Consent",
25
+ "Signed up"
26
+ ],
27
+ "series": [
28
+ {
29
+ "name": "People",
30
+ "role": "read",
31
+ "values": [
32
+ 100,
33
+ 61,
34
+ 34,
35
+ 30,
36
+ 26
37
+ ]
38
+ }
39
+ ],
40
+ "target": [
41
+ null,
42
+ 70,
43
+ 50,
44
+ 40,
45
+ 35
46
+ ],
47
+ "lit": 4,
48
+ "source": "Sign-up events, GA, Apr 2024 to Mar 2025"
49
+ }
50
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- @dsCard group="2 · Charts" height=260 -->
2
+ <!doctype html>
3
+ <html>
4
+ <head><meta charset="utf-8"><title>Funnel</title></head>
5
+ <body>
6
+ <div class="pcx">
7
+ <div data-pc="{&quot;kind&quot;: &quot;funnel&quot;, &quot;answer&quot;: &quot;Most people leave at the sign-in method and the form&quot;, &quot;unit&quot;: &quot;%&quot;, &quot;x&quot;: [&quot;Viewed&quot;, &quot;Picked method&quot;, &quot;Filled form&quot;, &quot;Consent&quot;, &quot;Signed up&quot;], &quot;series&quot;: [{&quot;name&quot;: &quot;People&quot;, &quot;role&quot;: &quot;read&quot;, &quot;values&quot;: [100, 61, 34, 30, 26]}], &quot;target&quot;: [null, 70, 50, 40, 35], &quot;lit&quot;: 4, &quot;source&quot;: &quot;Sign-up events, GA, Apr 2024 to Mar 2025&quot;}" data-medium="screen" data-height="240"></div>
8
+ </div>
9
+ <script>PMOSCharts.mount(document)</script>
10
+ </body>
11
+ </html>
@@ -27,6 +27,7 @@ body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--font-s
27
27
  .pc-plot .pc-sel{stroke:var(--chart-done);stroke-width:3;paint-order:stroke}
28
28
  text.pc-l{fill:var(--muted);font-family:var(--font-sans)}
29
29
  text.pc-ink{fill:var(--ink)}
30
+ text.pc-drop{fill:var(--alert);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
30
31
  text.pc-v{fill:var(--ink);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
31
32
  .pc-tip{position:absolute;z-index:2;pointer-events:none;white-space:nowrap;background:var(--card);color:var(--ink);font-size:13px;line-height:20px;padding:4px 10px;border-radius:var(--radius-md,10px);box-shadow:var(--lift);font-variant-numeric:tabular-nums}
32
33
  .pc-tabs{display:inline-flex;gap:2px;padding:3px;background:var(--well);border-radius:var(--radius-md,10px)}
@@ -13,7 +13,7 @@ var MED={
13
13
  function esc(s){return String(s==null?'':s).replace(/[&<>"]/g,function(c){return{'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'}[c]})}
14
14
  function num(v){return (Math.round(v*10)/10).toLocaleString('en-GB')}
15
15
  function fmt(v,u){return num(v)+(u?' '+u:'')}
16
- var BARS={bar:1,goal:1,stack:1,hbar:1}, DIAG={flow:1,swimlane:1,timeline:1,ranges:1};
16
+ var BARS={bar:1,goal:1,stack:1,hbar:1,funnel:1}, DIAG={flow:1,swimlane:1,timeline:1,ranges:1};
17
17
 
18
18
  function render(el, spec, opts){
19
19
  opts=opts||{};
@@ -119,6 +119,25 @@ function chart(d,spec,m,medium,w,h,st){
119
119
  g.horiz=true; g.tip=function(i){return x[i]+' · '+fmt(vals[i],u)};
120
120
  return {svg:svg(w,H2,o),g:g};
121
121
  }
122
+ if(kind==='funnel'){
123
+ // steps from first view to done: one bar per step, the drop from the step before written under it in alert,
124
+ // the target after the change as a dashed chart-done outline on each bar, one lit step
125
+ var fv=all[0].values, tg=spec.target||[], fmx=Math.max.apply(0,fv.concat(tg.filter(function(v){return v!=null})))*1.1;
126
+ var fT=m.value*2, fB=L*3.8, fih=h-fT-fB, fband=w/n, fbw=Math.min(fband*.62,m.value*7);
127
+ var FX=function(i){return fband*i+(fband-fbw)/2}, FY=function(v){return fT+fih*(1-v/fmx)};
128
+ var drop=function(i){return i&&fv[i-1]?Math.round((1-fv[i]/fv[i-1])*100):0};
129
+ o.push('<line x1="0" x2="'+w+'" y1="'+(fT+fih)+'" y2="'+(fT+fih)+'" class="s-grid"/>');
130
+ for(var f=0;f<n;f++){var fr=d.risk.indexOf(f)>=0?'risk':(f===lit?'read':'rest'), fhl=(f===st.hov||f===st.sel)?' pc-hl':'';
131
+ o.push('<rect x="'+FX(f).toFixed(1)+'" y="'+FY(fv[f]).toFixed(1)+'" width="'+fbw.toFixed(1)+'" height="'+Math.max(1,fT+fih-FY(fv[f])).toFixed(1)+'" rx="'+m.bar+'" class="f-'+fr+fhl+(f===lit?' pc-lit':'')+(f===st.sel?' pc-sel':'')+'"/>');
132
+ if(tg[f]!=null){var ty=FY(tg[f]),sw=Math.max(1.5,m.stroke*.7);o.push('<path d="M'+(FX(f)+sw/2).toFixed(1)+' '+(fT+fih).toFixed(1)+' V'+(ty+m.bar).toFixed(1)+' Q'+(FX(f)+sw/2).toFixed(1)+' '+ty.toFixed(1)+' '+(FX(f)+m.bar).toFixed(1)+' '+ty.toFixed(1)+' H'+(FX(f)+fbw-m.bar).toFixed(1)+' Q'+(FX(f)+fbw-sw/2).toFixed(1)+' '+ty.toFixed(1)+' '+(FX(f)+fbw-sw/2).toFixed(1)+' '+(ty+m.bar).toFixed(1)+' V'+(fT+fih).toFixed(1)+'" fill="none" class="s-done" stroke-width="'+sw+'" stroke-dasharray="'+(sw*3)+' '+(sw*2.4)+'"/>')}
133
+ t(FX(f)+fbw/2,Math.min(FY(fv[f]),tg[f]!=null?FY(tg[f]):1e9)-L*.5,fmt(fv[f],u==='%'?'':u)+(u==='%'?'%':''),f===lit?'pc-v':'pc-l pc-ink','middle');
134
+ t(FX(f)+fbw/2,fT+fih+L*1.5,x[f],f===lit?'pc-l pc-ink':'pc-l','middle');
135
+ if(drop(f)>0) t(FX(f)+fbw/2,fT+fih+L*2.9,'−'+drop(f)+'%','pc-drop','middle');
136
+ g.pts.push([FX(f)+fbw/2,FY(fv[f])]);}
137
+ g.tip=function(i){var s=x[i]+' · '+fmt(fv[i],u==='%'?'':u)+(u==='%'?'%':'');if(drop(i)>0)s+=' · −'+drop(i)+'% from '+x[i-1];if(tg[i]!=null)s+=' · target '+num(tg[i])+(u==='%'?'%':(u?' '+u:''));return s};
138
+ g.open=function(i){return 'Opened the items behind '+x[i]+' beside the chart.'};
139
+ return {svg:svg(w,h,o),g:g};
140
+ }
122
141
  var T=m.value*2, B=L*2.2, R=(kind==='line'||kind==='stack')?L*7:(d.goal!=null?L*6:L*.5), Lp=kind==='line'?L*2.4:0;
123
142
  var ih=h-T-B;
124
143
  if(kind==='line'){
@@ -10,7 +10,7 @@ One JSON object describes a chart or diagram. PMOS writes it from records; every
10
10
 
11
11
  ```json
12
12
  {
13
- "kind": "bar | goal | line | stack | hbar | meter | spark | flow | swimlane | timeline | ranges",
13
+ "kind": "bar | goal | line | stack | hbar | funnel | meter | spark | flow | swimlane | timeline | ranges",
14
14
  "answer": "The sentence the chart proves",
15
15
  "unit": "items",
16
16
  "x": ["10 Nov", "11 Nov"],
@@ -25,6 +25,7 @@ One JSON object describes a chart or diagram. PMOS writes it from records; every
25
25
 
26
26
  - `lit` is the index of the one bar or point the answer is about. Default: the latest.
27
27
  - `risk` lists indexes drawn in `chart-risk`; write the reason in the answer or a label.
28
+ - `target` (funnel only) gives one target per step, drawn as a dashed `chart-done` outline; `null` for a step with none. The drop from the step before is worked out from `values`.
28
29
  - `ranges` replaces `x` and `series` with one set per tab. Slides and pages draw the first range and name it.
29
30
  - Diagrams: `flow` takes `steps` (`name`, `why`, `state`: done, now, next, late; optional `group`); `swimlane` takes `lanes`, `steps` with `lane` and `col`, and `edges`; `timeline` takes `points` (`date`, `name`, `state`, `late`); `ranges` takes `columns`, `today` and `rows` (`name`, `from`, `to`, `state`, `label`).
30
31
  - `source` is required. No source, no chart.
@@ -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-20T02:28:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T02:59:28Z"}
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-20T02:28:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T02:59:28Z"}
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-20T02:28:54Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-20T02:59:28Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,4 +1,17 @@
1
1
  [
2
+ {
3
+ "v": "0.645.0",
4
+ "at": "2026-11-20T02:59:30.947Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1427,
9
+ "t": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
10
+ "s": "The Viewer card's parts on the PMOS design system, and the Funnel chart kind",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
2
15
  {
3
16
  "v": "0.644.0",
4
17
  "at": "2026-11-20T02:28:58.438Z",
@@ -21,7 +21,7 @@ Each level is made only from the levels above it.
21
21
  | --- | --- | --- |
22
22
  | 0 · Foundations | Roles (`chart-*`, `diagram-*`) and the three media with their sizes. Colours and fonts come from Komorebi. | Roles, Media |
23
23
  | 1 · Elements | The smallest pieces of a chart. | Marks, Labels, Controls |
24
- | 2 · Charts | Seven chart kinds. | Bar, BarGoal, Line, StackedBar, HorizontalBar, Meter, Sparkline |
24
+ | 2 · Charts | Eight chart kinds. | Bar, BarGoal, Line, StackedBar, HorizontalBar, Funnel, Meter, Sparkline |
25
25
  | 3 · Diagrams | Four diagram kinds. | Flow, Swimlane, Timeline, DateRanges |
26
26
  | 4 · Placements | Where a chart sits in each system. | InBlock (workspace), OnSlide (decks), OnPage (documents) |
27
27
 
@@ -36,6 +36,7 @@ Each level is made only from the levels above it.
36
36
  | How is it moving over time, against plan? | Line |
37
37
  | What share is done, in progress, at risk? | StackedBar |
38
38
  | Which one is biggest or slowest? | HorizontalBar |
39
+ | Where do people leave on the way to done? | Funnel |
39
40
  | How is a number trending, at a glance? | Sparkline beside the number |
40
41
  | How does work move? Who does what? | Flow, Swimlane |
41
42
  | When do things happen? What is late? | Timeline, DateRanges |
@@ -0,0 +1,50 @@
1
+ ---
2
+ type: Reference
3
+ title: "PMOS Charts: Funnel"
4
+ description: "Steps from first view to done: one bar per step, with the drop from the step before written under it in `alert` (\"−39%\"). The target after a change is a dashed `chart-done` outline on each bar (`\"target\"`, one value per step). One step is lit: the one the answer is about. At most 6 steps. Moved here from PMOS Slides, which draws it on its Funnel and Bet slides."
5
+ timestamp: 2026-11-20
6
+ ---
7
+ Steps from first view to done: one bar per step, with the drop from the step before written under it in `alert` ("−39%"). The target after a change is a dashed `chart-done` outline on each bar (`"target"`, one value per step). One step is lit: the one the answer is about. At most 6 steps. Moved here from PMOS Slides, which draws it on its Funnel and Bet slides.
8
+
9
+ ## Interaction
10
+
11
+ The same as every chart: hover or touch for the value, click to open the items behind a mark, Left and Right to move, Enter to open, Esc to leave. On a slide only the light moves; on a page nothing moves and every value is printed.
12
+
13
+ ## Spec
14
+
15
+ ```json
16
+ {
17
+ "kind": "funnel",
18
+ "answer": "Most people leave at the sign-in method and the form",
19
+ "unit": "%",
20
+ "x": [
21
+ "Viewed",
22
+ "Picked method",
23
+ "Filled form",
24
+ "Consent",
25
+ "Signed up"
26
+ ],
27
+ "series": [
28
+ {
29
+ "name": "People",
30
+ "role": "read",
31
+ "values": [
32
+ 100,
33
+ 61,
34
+ 34,
35
+ 30,
36
+ 26
37
+ ]
38
+ }
39
+ ],
40
+ "target": [
41
+ null,
42
+ 70,
43
+ 50,
44
+ 40,
45
+ 35
46
+ ],
47
+ "lit": 4,
48
+ "source": "Sign-up events, GA, Apr 2024 to Mar 2025"
49
+ }
50
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- @dsCard group="2 · Charts" height=260 -->
2
+ <!doctype html>
3
+ <html>
4
+ <head><meta charset="utf-8"><title>Funnel</title></head>
5
+ <body>
6
+ <div class="pcx">
7
+ <div data-pc="{&quot;kind&quot;: &quot;funnel&quot;, &quot;answer&quot;: &quot;Most people leave at the sign-in method and the form&quot;, &quot;unit&quot;: &quot;%&quot;, &quot;x&quot;: [&quot;Viewed&quot;, &quot;Picked method&quot;, &quot;Filled form&quot;, &quot;Consent&quot;, &quot;Signed up&quot;], &quot;series&quot;: [{&quot;name&quot;: &quot;People&quot;, &quot;role&quot;: &quot;read&quot;, &quot;values&quot;: [100, 61, 34, 30, 26]}], &quot;target&quot;: [null, 70, 50, 40, 35], &quot;lit&quot;: 4, &quot;source&quot;: &quot;Sign-up events, GA, Apr 2024 to Mar 2025&quot;}" data-medium="screen" data-height="240"></div>
8
+ </div>
9
+ <script>PMOSCharts.mount(document)</script>
10
+ </body>
11
+ </html>
@@ -27,6 +27,7 @@ body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--font-s
27
27
  .pc-plot .pc-sel{stroke:var(--chart-done);stroke-width:3;paint-order:stroke}
28
28
  text.pc-l{fill:var(--muted);font-family:var(--font-sans)}
29
29
  text.pc-ink{fill:var(--ink)}
30
+ text.pc-drop{fill:var(--alert);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
30
31
  text.pc-v{fill:var(--ink);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
31
32
  .pc-tip{position:absolute;z-index:2;pointer-events:none;white-space:nowrap;background:var(--card);color:var(--ink);font-size:13px;line-height:20px;padding:4px 10px;border-radius:var(--radius-md,10px);box-shadow:var(--lift);font-variant-numeric:tabular-nums}
32
33
  .pc-tabs{display:inline-flex;gap:2px;padding:3px;background:var(--well);border-radius:var(--radius-md,10px)}
@@ -13,7 +13,7 @@ var MED={
13
13
  function esc(s){return String(s==null?'':s).replace(/[&<>"]/g,function(c){return{'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'}[c]})}
14
14
  function num(v){return (Math.round(v*10)/10).toLocaleString('en-GB')}
15
15
  function fmt(v,u){return num(v)+(u?' '+u:'')}
16
- var BARS={bar:1,goal:1,stack:1,hbar:1}, DIAG={flow:1,swimlane:1,timeline:1,ranges:1};
16
+ var BARS={bar:1,goal:1,stack:1,hbar:1,funnel:1}, DIAG={flow:1,swimlane:1,timeline:1,ranges:1};
17
17
 
18
18
  function render(el, spec, opts){
19
19
  opts=opts||{};
@@ -119,6 +119,25 @@ function chart(d,spec,m,medium,w,h,st){
119
119
  g.horiz=true; g.tip=function(i){return x[i]+' · '+fmt(vals[i],u)};
120
120
  return {svg:svg(w,H2,o),g:g};
121
121
  }
122
+ if(kind==='funnel'){
123
+ // steps from first view to done: one bar per step, the drop from the step before written under it in alert,
124
+ // the target after the change as a dashed chart-done outline on each bar, one lit step
125
+ var fv=all[0].values, tg=spec.target||[], fmx=Math.max.apply(0,fv.concat(tg.filter(function(v){return v!=null})))*1.1;
126
+ var fT=m.value*2, fB=L*3.8, fih=h-fT-fB, fband=w/n, fbw=Math.min(fband*.62,m.value*7);
127
+ var FX=function(i){return fband*i+(fband-fbw)/2}, FY=function(v){return fT+fih*(1-v/fmx)};
128
+ var drop=function(i){return i&&fv[i-1]?Math.round((1-fv[i]/fv[i-1])*100):0};
129
+ o.push('<line x1="0" x2="'+w+'" y1="'+(fT+fih)+'" y2="'+(fT+fih)+'" class="s-grid"/>');
130
+ for(var f=0;f<n;f++){var fr=d.risk.indexOf(f)>=0?'risk':(f===lit?'read':'rest'), fhl=(f===st.hov||f===st.sel)?' pc-hl':'';
131
+ o.push('<rect x="'+FX(f).toFixed(1)+'" y="'+FY(fv[f]).toFixed(1)+'" width="'+fbw.toFixed(1)+'" height="'+Math.max(1,fT+fih-FY(fv[f])).toFixed(1)+'" rx="'+m.bar+'" class="f-'+fr+fhl+(f===lit?' pc-lit':'')+(f===st.sel?' pc-sel':'')+'"/>');
132
+ if(tg[f]!=null){var ty=FY(tg[f]),sw=Math.max(1.5,m.stroke*.7);o.push('<path d="M'+(FX(f)+sw/2).toFixed(1)+' '+(fT+fih).toFixed(1)+' V'+(ty+m.bar).toFixed(1)+' Q'+(FX(f)+sw/2).toFixed(1)+' '+ty.toFixed(1)+' '+(FX(f)+m.bar).toFixed(1)+' '+ty.toFixed(1)+' H'+(FX(f)+fbw-m.bar).toFixed(1)+' Q'+(FX(f)+fbw-sw/2).toFixed(1)+' '+ty.toFixed(1)+' '+(FX(f)+fbw-sw/2).toFixed(1)+' '+(ty+m.bar).toFixed(1)+' V'+(fT+fih).toFixed(1)+'" fill="none" class="s-done" stroke-width="'+sw+'" stroke-dasharray="'+(sw*3)+' '+(sw*2.4)+'"/>')}
133
+ t(FX(f)+fbw/2,Math.min(FY(fv[f]),tg[f]!=null?FY(tg[f]):1e9)-L*.5,fmt(fv[f],u==='%'?'':u)+(u==='%'?'%':''),f===lit?'pc-v':'pc-l pc-ink','middle');
134
+ t(FX(f)+fbw/2,fT+fih+L*1.5,x[f],f===lit?'pc-l pc-ink':'pc-l','middle');
135
+ if(drop(f)>0) t(FX(f)+fbw/2,fT+fih+L*2.9,'−'+drop(f)+'%','pc-drop','middle');
136
+ g.pts.push([FX(f)+fbw/2,FY(fv[f])]);}
137
+ g.tip=function(i){var s=x[i]+' · '+fmt(fv[i],u==='%'?'':u)+(u==='%'?'%':'');if(drop(i)>0)s+=' · −'+drop(i)+'% from '+x[i-1];if(tg[i]!=null)s+=' · target '+num(tg[i])+(u==='%'?'%':(u?' '+u:''));return s};
138
+ g.open=function(i){return 'Opened the items behind '+x[i]+' beside the chart.'};
139
+ return {svg:svg(w,h,o),g:g};
140
+ }
122
141
  var T=m.value*2, B=L*2.2, R=(kind==='line'||kind==='stack')?L*7:(d.goal!=null?L*6:L*.5), Lp=kind==='line'?L*2.4:0;
123
142
  var ih=h-T-B;
124
143
  if(kind==='line'){
@@ -10,7 +10,7 @@ One JSON object describes a chart or diagram. PMOS writes it from records; every
10
10
 
11
11
  ```json
12
12
  {
13
- "kind": "bar | goal | line | stack | hbar | meter | spark | flow | swimlane | timeline | ranges",
13
+ "kind": "bar | goal | line | stack | hbar | funnel | meter | spark | flow | swimlane | timeline | ranges",
14
14
  "answer": "The sentence the chart proves",
15
15
  "unit": "items",
16
16
  "x": ["10 Nov", "11 Nov"],
@@ -25,6 +25,7 @@ One JSON object describes a chart or diagram. PMOS writes it from records; every
25
25
 
26
26
  - `lit` is the index of the one bar or point the answer is about. Default: the latest.
27
27
  - `risk` lists indexes drawn in `chart-risk`; write the reason in the answer or a label.
28
+ - `target` (funnel only) gives one target per step, drawn as a dashed `chart-done` outline; `null` for a step with none. The drop from the step before is worked out from `values`.
28
29
  - `ranges` replaces `x` and `series` with one set per tab. Slides and pages draw the first range and name it.
29
30
  - Diagrams: `flow` takes `steps` (`name`, `why`, `state`: done, now, next, late; optional `group`); `swimlane` takes `lanes`, `steps` with `lane` and `col`, and `edges`; `timeline` takes `points` (`date`, `name`, `state`, `late`); `ranges` takes `columns`, `today` and `rows` (`name`, `from`, `to`, `state`, `label`).
30
31
  - `source` is required. No source, no chart.
@@ -90,6 +90,7 @@ The Viewer shows one item: an initiative, a program, a task, a document, a meeti
90
90
  - Drag its edge to change its width. The expand icon opens it wide. Each kind of item keeps the width you gave it.
91
91
  - It keeps one trail: a press inside it keeps the item behind, ← goes back, → goes forward, and the browser's Back and Forward move along the same trail. × or Escape closes it.
92
92
  - An item opened on its own page, with **Open in a new tab**, shows the Viewer card in the colours and type of the PMOS design system. When you close it, one line at the top links to Home.
93
+ - On a page drawn from the PMOS design system (Today, Home, an item on its own page), the parts inside the Viewer card follow the system too: a meeting, the calendar and a report use its corners, its buttons and its switches. A word button has a small corner, a switch looks like tabs, and a chip or a tag stays round.
93
94
  - One item shows in one Viewer only. If an item is already open, opening it again (a row, a ⌘-click, Open beside) shows it in the Viewer it is in. It never opens a second copy.
94
95
 
95
96
  ## Work and its chat, in one popup
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.644.0",
3
+ "version": "0.645.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.644.0",
9
+ "version": "0.645.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.644.0",
3
+ "version": "0.645.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -36,6 +36,7 @@
36
36
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) .pc-plot .pc-sel{stroke:var(--chart-done);stroke-width:3;paint-order:stroke}
37
37
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) text.pc-l{fill:var(--muted);font-family:var(--font-sans)}
38
38
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) text.pc-ink{fill:var(--ink)}
39
+ :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) text.pc-drop{fill:var(--alert);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
39
40
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) text.pc-v{fill:var(--ink);font-weight:600;font-family:var(--font-sans);font-variant-numeric:tabular-nums}
40
41
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) .pc-tip{position:absolute;z-index:2;pointer-events:none;white-space:nowrap;background:var(--card);color:var(--ink);font-size:13px;line-height:20px;padding:4px 10px;border-radius:var(--radius-md,10px);box-shadow:var(--lift);font-variant-numeric:tabular-nums}
41
42
  :is(.pm-ds,.pmd-ds,.pms-ds,.pmc-ds) .pc-tabs{display:inline-flex;gap:2px;padding:3px;background:var(--well);border-radius:var(--radius-md,10px)}