create-pmos 0.839.0 → 0.841.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 (34) hide show
  1. package/package.json +80 -63
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/changelog.json +79 -10
  7. package/workspace/guide/cli.md +26 -0
  8. package/workspace/guide/layout.md +4 -2
  9. package/workspace/guide/programs.md +3 -0
  10. package/workspace/lib/app-versions.js +169 -0
  11. package/workspace/lib/features.json +2 -0
  12. package/workspace/lib/pmos-verbs.js +6 -0
  13. package/workspace/lib/roadmap-audiences.js +157 -0
  14. package/workspace/lib/roadmap-cli.js +68 -0
  15. package/workspace/lib/route-modules.js +2 -0
  16. package/workspace/lib/routes-app-versions.js +54 -0
  17. package/workspace/lib/routes-roadmap-audiences.js +55 -0
  18. package/workspace/lib/versions-cli.js +112 -0
  19. package/workspace/package-lock.json +2 -2
  20. package/workspace/package.json +1 -1
  21. package/workspace/public/pm/app-versions.js +97 -0
  22. package/workspace/public/pm/bd-ds.css +6 -0
  23. package/workspace/public/pm/bd-work-ds.css +26 -0
  24. package/workspace/public/pm/cozy-home.css +2 -2
  25. package/workspace/public/pm/cozy-pop-work.js +7 -3
  26. package/workspace/public/pm/ini-detail.css +38 -0
  27. package/workspace/public/pm/ini-detail.js +117 -0
  28. package/workspace/public/pm/premium-board.js +28 -5
  29. package/workspace/public/pm/roadmap-audiences.js +72 -0
  30. package/workspace/public/pm/wk-sum.js +103 -0
  31. package/workspace/public/premium-board.html +3 -0
  32. package/workspace/test-lists/app-versions.json +9 -0
  33. package/workspace/test-lists/ini-detail.json +9 -0
  34. package/workspace/test-lists/roadmap-audiences.json +9 -0
@@ -0,0 +1,157 @@
1
+ 'use strict';
2
+ /* roadmap-audiences.js — the ranked Roadmap (D105) written for one audience at a time: exec, team or customer (bet A88, initiative
3
+ * roadmap-audiences). Derived on every read, so it follows the plan; it prints or saves a local file and is never sent.
4
+ *
5
+ * items({ root, rows?, now?, dir? }) → [{ id, title, stage, outcome, date, owners, blockers, shared }] the live roadmap, in rank order
6
+ * text(list, audience, { product }) → the markdown for one audience PURE
7
+ * lines(list, audience) → [line] one line per item, the same words as the markdown PURE
8
+ * shared(dir) · share(dir, id, on, { by, now }) → Set of shared ids · { ok, line } | { ok: false, error } <records>/roadmap-share.jsonl
9
+ * count(root) → the items marked for customers (the health number)
10
+ *
11
+ * THE THREE AUDIENCES (rules said once, here):
12
+ * exec one line per item: the title, its expected outcome and the date to check it (outcome_horizon, else the Roadmap's check-by)
13
+ * team one line per item: the title, its stage, the task owners, and the tasks that are blocked or waiting (at most MAX_BLOCKERS)
14
+ * customer only the items marked shareable, the title only, with a plain word for where it is (Planned, In progress, Shipped). No ids,
15
+ * no owners, no anchors, no internal names: a title that starts with "Name:" loses that part.
16
+ * Live means ranked, not dormant, not accepted and not stopped. At most MAX items show; the rest are one line "and N more on the roadmap".
17
+ * A value the records do not hold is left out of the line (zero is silence), never guessed. */
18
+ const fs = require('fs');
19
+ const path = require('path');
20
+
21
+ const AUDIENCES = ['exec', 'team', 'customer'];
22
+ const LABEL = { exec: 'Exec', team: 'Team', customer: 'Customer' };
23
+ const FILE = 'roadmap-share.jsonl';
24
+ const TAG = '[roadmap-audiences]';
25
+ const MAX = 20;
26
+ const MAX_BLOCKERS = 2;
27
+ const BLOCKED = /^(blocked|waiting|on hold|held)$/i;
28
+ const SHIPPED = new Set(['deliver', 'monitor', 'evaluate', 'closed', 'shipped', 'done']);
29
+ const DOING = new Set(['build', 'implementation', 'in progress', 'evaluation']);
30
+
31
+ const oneLine = (s, n = 160) => { const t = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1).trimEnd() + '…' : t; };
32
+ const nameOf = (s) => oneLine(String(s || '').replace(/^person:/i, ''), 60);
33
+
34
+ function recordsDirOf(root) {
35
+ try { const { repoScript } = require('./repo-script.js'); return require(repoScript('signals/layout-paths.js')).pathsFor(root).recordsDir; } catch { return path.join(root, 'planning', 'records'); }
36
+ }
37
+
38
+ /** The frontmatter keys of a record file: { key: value } for plain `key: value` lines. */
39
+ function frontOf(file) {
40
+ let text = '';
41
+ try { text = fs.readFileSync(file, 'utf8'); } catch { return {}; }
42
+ const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text);
43
+ if (!m) return {};
44
+ const out = {};
45
+ for (const l of m[1].split(/\r?\n/)) {
46
+ const k = /^([a-z_]+):\s*(.*)$/.exec(l);
47
+ if (k) out[k[1]] = k[2].replace(/^["']|["']$/g, '').trim();
48
+ }
49
+ return out;
50
+ }
51
+
52
+ function tasksOf(root) {
53
+ try {
54
+ const Facts = require('./drift-facts.js');
55
+ const stateDir = require('./driver.js').stateDirOf(root);
56
+ let storeFile = null; try { const s = require('./task-store.js').storeFor(root); storeFile = s && s.file; } catch { storeFile = null; }
57
+ return Facts.tasksOf(root, stateDir ? path.join(stateDir, 'boards.jsonl') : null, storeFile, []).tasks;
58
+ } catch { return []; }
59
+ }
60
+
61
+ /** Each initiative's task owners and blocked tasks, from the task lines. PURE. */
62
+ function teamOf(tasks) {
63
+ const by = new Map();
64
+ for (const t of tasks || []) {
65
+ let state = '', owner = '', removed = false;
66
+ for (const l of (t.lines || []).slice().sort((a, b) => a.at - b.at)) {
67
+ if (l.state) state = l.state;
68
+ if (l.owner !== undefined) owner = nameOf(l.owner);
69
+ if (l.kind === 'task-remove') removed = true;
70
+ if (l.kind === 'task-restore') removed = false;
71
+ }
72
+ if (removed || state === 'Done' || state === 'Archived') continue;
73
+ const e = by.get(t.initiative) || { owners: [], blockers: [] };
74
+ if (owner && !e.owners.some((o) => o.toLowerCase() === owner.toLowerCase())) e.owners.push(owner);
75
+ if (BLOCKED.test(state) && e.blockers.length < MAX_BLOCKERS) e.blockers.push(oneLine(t.title, 70));
76
+ by.set(t.initiative, e);
77
+ }
78
+ return by;
79
+ }
80
+
81
+ function readShare(dir) {
82
+ let text = '';
83
+ try { text = fs.readFileSync(path.join(dir, FILE), 'utf8'); } catch { return []; }
84
+ const out = [];
85
+ for (const l of text.split('\n')) { if (!l.trim()) continue; try { const o = JSON.parse(l); if (o && typeof o.id === 'string') out.push(o); } catch { /* torn */ } }
86
+ return out;
87
+ }
88
+ function shared(dir) {
89
+ const s = new Set();
90
+ for (const o of dir ? readShare(dir) : []) { if (o.on) s.add(o.id); else s.delete(o.id); }
91
+ return s;
92
+ }
93
+ function share(dir, id, on, { by = 'pm', now = Date.now() } = {}) {
94
+ const i = String(id || '').trim();
95
+ if (!/^[a-z0-9][a-z0-9._-]{0,80}$/.test(i)) return { ok: false, error: 'name an initiative id from the roadmap' };
96
+ if (!dir) return { ok: false, error: 'this product has no records folder' };
97
+ const line = { at: new Date(now).toISOString(), id: i, on: !!on, by };
98
+ fs.mkdirSync(dir, { recursive: true });
99
+ fs.appendFileSync(path.join(dir, FILE), JSON.stringify(line) + '\n');
100
+ return { ok: true, line };
101
+ }
102
+
103
+ /** The live roadmap in rank order. rows: initiative-rows' rows (else derived now). */
104
+ function items({ root, rows = null, now = Date.now(), dir = null, tasks } = {}) {
105
+ root = path.resolve(root);
106
+ if (!rows) { const d = require('./initiative-rows.js').deriveSync(root); if (!d.ok) return []; rows = d.rows; }
107
+ let placed;
108
+ try { placed = require('./placements.js').readPlacements(root, { now, rules: require('./plan-rules.js').readRules(root), records: rows }); } catch { return []; }
109
+ const byRow = new Map(rows.map((r) => [r.id, r]));
110
+ const team = teamOf(tasks === undefined ? tasksOf(root) : tasks);
111
+ const share = shared(dir || recordsDirOf(root));
112
+ const out = [];
113
+ for (const id of placed.ranked || []) {
114
+ const r = byRow.get(id), p = (placed.byInit || {})[id] || {};
115
+ if (!r || p.dormant || r.accepted || r.stopped) continue;
116
+ const fm = r.record && out.length < MAX ? frontOf(path.join(root, r.record)) : {}; // only the lines that show read their record
117
+ const t = team.get(id) || { owners: [], blockers: [] };
118
+ out.push({ id, title: oneLine(r.title || id, 120), stage: String(r.stage || '').toLowerCase(), outcome: oneLine(fm.expected_outcome || '', 200),
119
+ date: /^\d{4}-\d{2}-\d{2}/.test(fm.outcome_horizon || '') ? fm.outcome_horizon.slice(0, 10) : (p.check_by || ''), owners: t.owners, blockers: t.blockers, shared: share.has(id) });
120
+ }
121
+ return out;
122
+ }
123
+
124
+ const plainStage = (s) => (SHIPPED.has(s) ? 'Shipped' : DOING.has(s) ? 'In progress' : 'Planned');
125
+ const outerTitle = (t) => oneLine(String(t || '').replace(/^\s*[A-Z][a-z]+(?:\s[A-Z][a-z]+)?:\s+/, ''), 120);
126
+
127
+ /** One line per item for an audience. PURE. */
128
+ function lines(list, audience) {
129
+ const L = list || [];
130
+ if (audience === 'exec') return L.map((x) => [x.title, x.outcome && `outcome: ${x.outcome}`, x.date && `check ${x.date}`].filter(Boolean).join(' · '));
131
+ if (audience === 'team') return L.map((x) => [x.title, x.stage, x.owners.length && `owners: ${x.owners.join(', ')}`, x.blockers.length && `blocked: ${x.blockers.join('; ')}`].filter(Boolean).join(' · '));
132
+ if (audience === 'customer') return L.filter((x) => x.shared).map((x) => `${outerTitle(x.title)} · ${plainStage(x.stage)}`);
133
+ return [];
134
+ }
135
+
136
+ /** The markdown for one audience. PURE. */
137
+ function text(list, audience, { product = '' } = {}) {
138
+ if (!AUDIENCES.includes(audience)) return '';
139
+ const all = lines(list, audience);
140
+ const head = `# Roadmap${product && audience !== 'customer' ? ' · ' + oneLine(product, 60) : ''} · for ${audience === 'exec' ? 'leadership' : audience === 'team' ? 'the team' : 'customers'}`;
141
+ if (!all.length) return `${head}\n\n${audience === 'customer' ? 'Nothing is marked for customers yet.' : 'The roadmap has no live items.'}\n`;
142
+ const shown = all.slice(0, MAX).map((l, i) => `${i + 1}. ${l}`);
143
+ if (all.length > MAX) shown.push(`\nand ${all.length - MAX} more on the roadmap.`);
144
+ return `${head}\n\n${shown.join('\n')}\n`;
145
+ }
146
+
147
+ function count(root) { return shared(recordsDirOf(path.resolve(root))).size; }
148
+
149
+ module.exports = { AUDIENCES, LABEL, FILE, TAG, MAX, MAX_BLOCKERS, frontOf, teamOf, shared, share, items, lines, text, count, recordsDirOf, plainStage, outerTitle };
150
+
151
+ if (require.main === module) {
152
+ const a = process.argv.slice(2);
153
+ if (a[0] !== 'count') { console.error('usage: node lib/roadmap-audiences.js count <root>'); process.exit(2); }
154
+ const n = count(a[1] || '.');
155
+ console.log(`${TAG} ${n} items marked for customers`);
156
+ console.log(String(n));
157
+ }
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+ /* roadmap-cli.js — `pmos roadmap`: the ranked Roadmap written for one audience (bet A88, initiative roadmap-audiences; lib/roadmap-audiences.js).
3
+ *
4
+ * pmos roadmap for exec|team|customer [--out <file>] [--json] the live roadmap, in rank order, as markdown for that audience
5
+ * pmos roadmap share|unshare <initiative> mark an item for customers, or take the mark off
6
+ * every command: [--root <dir>] (default: the git root of this folder)
7
+ *
8
+ * The same versions show on Work (Roadmap for others). Derived on each run, so it follows the plan. Nothing is sent: it prints, or writes
9
+ * the one local file --out names. Exit codes: 0 done, 1 refused, 2 usage. */
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const RA = require('./roadmap-audiences.js');
13
+
14
+ const COMMANDS = { roadmap: ['for', 'share', 'unshare'] };
15
+ const USAGE = [
16
+ 'usage: pmos roadmap for exec|team|customer [--out <file>] [--json] the roadmap written for leadership, the team or customers',
17
+ ' pmos roadmap share|unshare <initiative> mark an item for customers, or take the mark off',
18
+ 'exec: outcome and check date · team: stage, owners, blocked tasks · customer: only the items marked, no names. Nothing is sent.',
19
+ ];
20
+
21
+ function gitRoot(cwd = process.cwd()) {
22
+ for (let d = path.resolve(cwd); ; d = path.dirname(d)) {
23
+ if (fs.existsSync(path.join(d, '.git'))) return d;
24
+ if (path.dirname(d) === d) return cwd;
25
+ }
26
+ }
27
+ function parse(args) {
28
+ const pos = [], flags = {};
29
+ for (let i = 0; i < args.length; i++) {
30
+ const a = args[i];
31
+ if (!a.startsWith('--')) { pos.push(a); continue; }
32
+ const k = a.slice(2);
33
+ if (k === 'json') flags.json = true;
34
+ else flags[k] = args[i + 1] !== undefined && !String(args[i + 1]).startsWith('--') ? args[++i] : '';
35
+ }
36
+ return { pos, flags };
37
+ }
38
+
39
+ function run(argv, { say = console.log, now = Date.now(), cwd = process.cwd(), rows = null } = {}) {
40
+ const rest = argv[0] === 'roadmap' ? argv.slice(1) : argv.slice();
41
+ const sub = rest[0];
42
+ if (!sub || sub === 'help' || rest.includes('--help') || !COMMANDS.roadmap.includes(sub)) { USAGE.forEach((l) => say(l)); return 2; }
43
+ const { pos, flags } = parse(rest.slice(1));
44
+ const root = flags.root ? path.resolve(cwd, flags.root) : gitRoot(cwd);
45
+ const dir = RA.recordsDirOf(root);
46
+ if (sub === 'share' || sub === 'unshare') {
47
+ const r = RA.share(dir, pos[0], sub === 'share', { by: 'cli', now });
48
+ if (!r.ok) { say(`✗ ${r.error}`); return 1; }
49
+ say(sub === 'share' ? `✓ ${r.line.id} is marked for customers (undo: pmos roadmap unshare ${r.line.id})` : `✓ ${r.line.id} is no longer marked for customers`);
50
+ return 0;
51
+ }
52
+ const who = pos[0];
53
+ if (!RA.AUDIENCES.includes(who)) { say(`✗ the audience is one of ${RA.AUDIENCES.join(', ')}`); return 2; }
54
+ const list = RA.items({ root, rows, now, dir });
55
+ const md = RA.text(list, who, { product: path.basename(root) });
56
+ console.error(`${RA.TAG} for ${who} · ${RA.lines(list, who).length} items`);
57
+ if (flags.out) {
58
+ const f = path.resolve(cwd, flags.out);
59
+ fs.writeFileSync(f, md);
60
+ say(flags.json ? JSON.stringify({ ok: true, audience: who, file: f }) : `✓ wrote the ${who} roadmap to ${f}`);
61
+ return 0;
62
+ }
63
+ if (flags.json) { say(JSON.stringify({ ok: true, audience: who, markdown: md, lines: RA.lines(list, who) })); return 0; }
64
+ say(md.trimEnd());
65
+ return 0;
66
+ }
67
+
68
+ module.exports = { run, COMMANDS, USAGE };
@@ -154,10 +154,12 @@ const MODULES = Object.freeze([
154
154
  'routes-strategy-card', // bet A458: a product's five-line strategy above its Board, and the gentle "doesn't fit" note on new work (records strategy-card.jsonl; page-press POST)
155
155
  'routes-segments', // idea A327: a product's user groups and the roadmap items that serve each, kept or renamed on Work (records segments.jsonl; page-press POST)
156
156
  'routes-principles', // bet A352: a product's principles drafted from its decisions, kept or dropped on the Board (records principles.jsonl; page-press POST)
157
+ 'routes-app-versions', // idea A211: a product's app versions in use, the open bugs their users hit, one ✦ force proposal the PM decides (records app-versions.jsonl; page-press POST)
157
158
  'routes-switches', // idea A263: who has which switch, per customer, on Work; turning one waits for the PM's own press (records switches.jsonl; page-press POST)
158
159
  'routes-prefs', // bet A461: view preferences that follow the person to the phone and other browsers (runtime view-prefs.json; page-press POST)
159
160
  'routes-skill-map', // bet A208: the team skill map on Work, for the person and their lead only (records skill-map.jsonl; page-press POST)
160
161
  'routes-first-hour', // bet A55: the first hour for a new engineer on Work (records first-hour.jsonl; page-press POST)
162
+ 'routes-roadmap-audiences', // bet A88: the roadmap for exec, team or customer on Work (records roadmap-share.jsonl; page-press POST)
161
163
  'routes-stakeholders', // bet A371: an initiative's stakeholder map, decides / must agree / needs to know, in the Work popup (records stakeholders.jsonl; page-press POST)
162
164
  'routes-meeting-stance', // bet A333: before the meeting, the two questions for a contested decision and where each person stands, in the Work popup (records meeting-stance.jsonl; page-press POST)
163
165
  'routes-code-map', // idea A176: the product's code map on Work, redrawn when the default branch moves (records code-map.json; read-only)
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+ /* routes-app-versions.js — a product's app versions over HTTP (idea A211, initiative app-versions). The store and its rules are
3
+ * lib/app-versions.js (app-versions.jsonl in the product's records folder, lib/records-dir.js); `pmos versions` writes the same file.
4
+ *
5
+ * GET /api/app-versions?ws=<id> → { ok, rows, proposal, undoable, seed } rows newest first; proposal: at most one ✦
6
+ * or null; seed: when no version is recorded, the release names the product's Jira
7
+ * readings hold (the block's way in, LINE.md Rule 12), else []
8
+ * POST /api/app-versions { ws, act, version?, users? } → the same | 400 act: force | leave | undo | users (the PM types a count on Work)
9
+ *
10
+ * WHO WRITES. Only the PM's press on the page (pm-guard requirePagePress: the page's Origin and launch nonce). `force` records the PM's
11
+ * decision; forcing the update itself is an outward change PMOS never makes. A GET writes nothing. */
12
+ const guard = require('./pm-guard.js');
13
+ const AV = require('./app-versions.js');
14
+ const { recordsDirFor } = require('./records-dir.js');
15
+
16
+ /** The workspace's root, for its stored Jira readings. */
17
+ function rootFor(ctx, ws) {
18
+ if (ctx && ctx.repoRoot) return ctx.repoRoot;
19
+ try { const w = ctx && typeof ctx.getWs === 'function' ? ctx.getWs(ws || null) : null; return w && w.root ? w.root : null; } catch { return null; }
20
+ }
21
+ function view(dir, root) {
22
+ const S = AV.read(dir), rows = AV.rows(S);
23
+ const seed = !rows.length && root ? AV.releases(root, S) : [];
24
+ return { ok: true, rows, proposal: AV.proposal(S, rows), undoable: !!S.undoable, seed };
25
+ }
26
+
27
+ async function handle(req, res, url, ctx) {
28
+ if (url.pathname !== '/api/app-versions') return false;
29
+ const send = (status, body) => { ctx.json(res, body, status); return true; };
30
+ if (req.method === 'GET') {
31
+ const ws = url.searchParams.get('ws') || null;
32
+ const v = view(recordsDirFor(ctx, ws), rootFor(ctx, ws));
33
+ console.info(`[app-versions] read versions=${v.rows.length} proposal=${v.proposal ? v.proposal.version : 'none'}${v.seed.length ? ' seed=' + v.seed.length : ''}`);
34
+ return send(200, v);
35
+ }
36
+ if (req.method !== 'POST') return send(405, { ok: false, error: 'GET or POST' });
37
+ const rd = await ctx.readJson(req);
38
+ if (!rd.ok) return send(400, { ok: false, error: 'the body is not JSON' });
39
+ const body = rd.body || {};
40
+ const g = guard.requirePagePress(req, body);
41
+ if (!g.ok) return send(g.status, { ok: false, error: g.error });
42
+ const dir = recordsDirFor(ctx, body.ws || null);
43
+ const act = String(body.act || '');
44
+ let r;
45
+ if (act === 'undo') r = AV.undo(dir);
46
+ else if (act === 'force' || act === 'leave') r = AV.decide(dir, String(body.version || ''), act);
47
+ else if (act === 'users') r = AV.setUsers(dir, { version: String(body.version || ''), users: body.users, source: 'typed on Work by the PM' });
48
+ else return send(400, { ok: false, error: 'act is force, leave, undo or users' });
49
+ if (!r.ok) return send(400, { ok: false, error: r.error });
50
+ console.info(`[app-versions] ${act} ${body.version || ''}`.trim());
51
+ return send(200, view(dir, rootFor(ctx, body.ws || null)));
52
+ }
53
+
54
+ module.exports = { handle, prefixes: ['/api/app-versions'] };
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+ /* routes-roadmap-audiences.js — the roadmap for one audience over HTTP, for Work's Roadmap for others block (bet A88, initiative
3
+ * roadmap-audiences). The core is lib/roadmap-audiences.js; the verb is `pmos roadmap`.
4
+ *
5
+ * GET /api/roadmap-for?ws=<id>&for=exec|team|customer → { ok, audience, markdown, lines, offer } | { ok, pending: true }
6
+ * offer (customer only): up to OFFER live items not yet marked, [{ id, title }], for the ✓ beside each
7
+ * POST /api/roadmap-for/share { ws, id, on } → { ok, line } | 400 a page press only
8
+ *
9
+ * The rows come from the initiative cache (lib/initiative-rows.js rowsFor): while it derives, the GET answers { pending: true } and the
10
+ * block reads again. A GET that carries `pack=` (a published page) is refused with 403. Nothing is sent anywhere. */
11
+ const path = require('path');
12
+ const guard = require('./pm-guard.js');
13
+ const RA = require('./roadmap-audiences.js');
14
+ const { recordsDirFor } = require('./records-dir.js');
15
+
16
+ const OFFER = 5;
17
+ const CHECKOUT = path.join(__dirname, '..', '..');
18
+ function wsOf(ctx, ws) { try { return ctx && typeof ctx.getWs === 'function' ? ctx.getWs(ws || null) : null; } catch { return null; } }
19
+ const rootFor = (ctx, w) => (ctx && ctx.repoRoot) || (w && w.root) || CHECKOUT;
20
+
21
+ async function handle(req, res, url, ctx) {
22
+ if (url.pathname !== '/api/roadmap-for' && url.pathname !== '/api/roadmap-for/share') return false;
23
+ const send = (status, body) => { ctx.json(res, body, status); return true; };
24
+ const now = ctx.now ? ctx.now() : Date.now();
25
+ if (url.pathname === '/api/roadmap-for') {
26
+ if (req.method !== 'GET') return send(405, { ok: false, error: 'GET' });
27
+ if (url.searchParams.has('pack')) return send(403, { ok: false, error: 'the roadmap for others is never on a published page' });
28
+ const who = url.searchParams.get('for') || '';
29
+ if (!RA.AUDIENCES.includes(who)) return send(400, { ok: false, error: `for is one of ${RA.AUDIENCES.join(', ')}` });
30
+ const wsId = url.searchParams.get('ws') || null;
31
+ const w = wsOf(ctx, wsId), root = rootFor(ctx, w);
32
+ let rows = ctx.roadmapRows || null;
33
+ if (!rows) {
34
+ const r = require('./initiative-rows.js').rowsFor(root);
35
+ if (r.pending) return send(200, { ok: true, pending: true });
36
+ if (!r.ok) return send(200, { ok: false, error: r.error || 'the roadmap could not be read' });
37
+ rows = r.rows;
38
+ }
39
+ const list = RA.items({ root, rows, now, dir: recordsDirFor(ctx, wsId), tasks: ctx.roadmapTasks });
40
+ const lines = RA.lines(list, who);
41
+ (ctx.log || ((s) => console.log(s)))(`${RA.TAG} for ${who} · ${lines.length} items`);
42
+ const offer = who === 'customer' ? list.filter((x) => !x.shared).slice(0, OFFER).map((x) => ({ id: x.id, title: RA.outerTitle(x.title) })) : [];
43
+ return send(200, { ok: true, audience: who, markdown: RA.text(list, who, { product: (w && w.name) || path.basename(root) }), lines, offer });
44
+ }
45
+ if (req.method !== 'POST') return send(405, { ok: false, error: 'POST' });
46
+ const rd = await ctx.readJson(req);
47
+ if (!rd.ok) return send(400, { ok: false, error: 'the body is not JSON' });
48
+ const body = rd.body || {};
49
+ const g = guard.requirePagePress(req, body);
50
+ if (!g.ok) return send(g.status, { ok: false, error: g.error });
51
+ const r = RA.share(recordsDirFor(ctx, body.ws || null), body.id, body.on !== false, { by: (g.actor && g.actor.by) || 'pm', now });
52
+ return r.ok ? send(200, { ok: true, line: r.line }) : send(400, { ok: false, error: r.error });
53
+ }
54
+
55
+ module.exports = { prefixes: ['/api/roadmap-for'], handle, OFFER };
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+ /* versions-cli.js — `pmos versions`: which versions of the product's app are still in use, the open bugs their users hit, and the ✦ proposal
3
+ * of which version to force (idea A211, initiative app-versions). The store is lib/app-versions.js (app-versions.jsonl in the product's
4
+ * records folder); the Versions block on Work reads the same file, so what the chat writes here shows there.
5
+ *
6
+ * pmos versions list [--json] one row per version in use, newest first, and the ✦ proposal
7
+ * pmos versions set <version> --users <count|share%> --source "<where>" the users on a version, from the user's own source
8
+ * pmos versions gone <version> the version is no longer in use
9
+ * pmos versions bug --key <id> --title "<what>" --version <v> [--version <v>…] [--crash] --source "<where>" an open bug and the versions it hits
10
+ * pmos versions fixed <key> the bug is fixed
11
+ * pmos versions force <version> record the PM's decision to force the update (PMOS sends nothing)
12
+ * pmos versions leave <version> leave that version alone: no ✦ for it
13
+ * pmos versions undo take back the last force or leave
14
+ * every command: [--root <dir>] (default: this repository)
15
+ *
16
+ * Forcing an update is an outward change: `force` only records the PM's own decision, and inside a background run (PMOS_AI_RUN set)
17
+ * force, leave and undo refuse. Exit codes: 0 done, 1 refused, 2 usage. Nothing is sent. */
18
+ const path = require('path');
19
+ const fs = require('fs');
20
+ const AV = require('./app-versions.js');
21
+
22
+ const COMMANDS = { versions: ['list', 'set', 'gone', 'bug', 'fixed', 'force', 'leave', 'undo'] };
23
+ const USAGE = [
24
+ 'usage: pmos versions list|set|gone|bug|fixed|force|leave|undo — the app versions still in use and the open bugs their users hit',
25
+ ' pmos versions list [--json] one row per version in use, newest first, and the ✦ proposal',
26
+ ' pmos versions set 4.2 --users 710 --source "store console" the users on a version (a count, or a share: 7%)',
27
+ ' pmos versions gone 3.8 the version is no longer in use',
28
+ ' pmos versions bug --key PAY-12 --title "crash on pay" --version 3.9 --crash --source "Jira" an open bug its users hit',
29
+ ' pmos versions fixed PAY-12 the bug is fixed',
30
+ ' pmos versions force 3.9 record that you will force the update; PMOS sends nothing',
31
+ ' pmos versions leave 3.9 leave that version alone',
32
+ ' pmos versions undo take back the last force or leave',
33
+ 'Run it in the product\'s repository, or pass --root <dir>.',
34
+ ];
35
+ const ALLOWED = { list: ['json', 'root'], set: ['json', 'root', 'users', 'source'], gone: ['json', 'root'], bug: ['json', 'root', 'key', 'title', 'version', 'crash', 'source'],
36
+ fixed: ['json', 'root'], force: ['json', 'root'], leave: ['json', 'root'], undo: ['json', 'root'] };
37
+ const ONE_ARG = new Set(['set', 'gone', 'fixed', 'force', 'leave']);
38
+ const BOOL = new Set(['json', 'crash']);
39
+ const MULTI = new Set(['version']);
40
+
41
+ function parse(args) {
42
+ const pos = [], flags = {};
43
+ for (let i = 0; i < args.length; i++) {
44
+ const a = args[i];
45
+ if (!a.startsWith('--')) { pos.push(a); continue; }
46
+ const k = a.slice(2);
47
+ if (BOOL.has(k)) { flags[k] = true; continue; }
48
+ const v = args[i + 1] !== undefined && !String(args[i + 1]).startsWith('--') ? args[++i] : '';
49
+ if (MULTI.has(k)) (flags[k] = flags[k] || []).push(v); else flags[k] = v;
50
+ }
51
+ return { pos, flags };
52
+ }
53
+ /** The repository the command runs in: the nearest folder up from cwd that holds .git (a folder, or a file in a worktree). */
54
+ function repoRoot(cwd) {
55
+ let d = path.resolve(cwd);
56
+ for (;;) {
57
+ if (fs.existsSync(path.join(d, '.git'))) return d;
58
+ const up = path.dirname(d);
59
+ if (up === d) return path.resolve(cwd);
60
+ d = up;
61
+ }
62
+ }
63
+ function recordsDirOf(root) {
64
+ try { const { repoScript } = require('./repo-script.js'); return require(repoScript('signals/layout-paths.js')).pathsFor(root).recordsDir; } catch { return path.join(root, 'planning', 'records'); }
65
+ }
66
+
67
+ /** The rows as lines a person reads: "4.2 71 % of users —". */
68
+ function listLines(rs, p) {
69
+ if (!rs.length) return ['No app version is recorded. Record one: pmos versions set 4.2 --users 710 --source "store console"'];
70
+ const out = rs.map((r) => {
71
+ const b = r.bugs.length ? `${r.bugs.length} open bug${r.bugs.length === 1 ? '' : 's'}${r.crash ? ' · ' + r.bugs.find((x) => x.crash).title : ''} (${r.bugs.map((x) => x.key).join(', ')})` : '—';
72
+ return ` ${r.version.padEnd(10)} ${AV.usersWord(r).padEnd(18)} ${b}${r.forced ? ' you decided to force an update' : ''}`;
73
+ });
74
+ if (p) out.push(`✦ ${p.text} You decide: pmos versions force ${p.version} (PMOS sends nothing) or pmos versions leave ${p.version}`);
75
+ return out;
76
+ }
77
+
78
+ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), env = process.env } = {}) {
79
+ const args = argv[0] === 'versions' ? argv.slice(1) : argv.slice();
80
+ const sub = args[0];
81
+ if (!sub || ['help', '--help', '-h'].includes(sub)) { for (const l of USAGE) say(l); return sub ? 0 : 1; }
82
+ if (!COMMANDS.versions.includes(sub)) { say(`unknown versions command "${sub}". Use one of: ${COMMANDS.versions.join(', ')}`); return 2; }
83
+ const { pos, flags } = parse(args.slice(1));
84
+ const fail = (error, code = 1) => { say(flags.json ? JSON.stringify({ ok: false, error }) : '✗ ' + error); return code; };
85
+ for (const k of Object.keys(flags)) if (!ALLOWED[sub].includes(k)) return fail(`--${k} is not an option of pmos versions ${sub}`, 2);
86
+ if (ONE_ARG.has(sub) ? pos.length !== 1 : pos.length) return fail(ONE_ARG.has(sub) ? `pmos versions ${sub} takes one ${sub === 'fixed' ? 'bug key' : 'version'}` : `pmos versions ${sub} takes options, not an argument`, 2);
87
+ if (['force', 'leave', 'undo'].includes(sub) && env.PMOS_AI_RUN) return fail('a background run never decides a forced update: the PM does');
88
+ const dir = recordsDirOf(path.resolve(flags.root || repoRoot(cwd)));
89
+
90
+ if (sub === 'list') {
91
+ const S = AV.read(dir), rs = AV.rows(S), p = AV.proposal(S, rs);
92
+ console.info(`[app-versions] cli versions=${rs.length} proposal=${p ? p.version : 'none'}`);
93
+ if (flags.json) { say(JSON.stringify({ ok: true, rows: rs, proposal: p })); return 0; }
94
+ for (const l of listLines(rs, p)) say(l);
95
+ return 0;
96
+ }
97
+ let r;
98
+ if (sub === 'set') r = AV.setUsers(dir, { version: pos[0], users: flags.users, source: flags.source });
99
+ else if (sub === 'gone') r = AV.gone(dir, pos[0]);
100
+ else if (sub === 'bug') r = AV.bug(dir, { key: flags.key, title: flags.title, versions: flags.version || [], crash: !!flags.crash, source: flags.source });
101
+ else if (sub === 'fixed') r = AV.fixed(dir, pos[0]);
102
+ else if (sub === 'undo') r = AV.undo(dir);
103
+ else r = AV.decide(dir, pos[0], sub);
104
+ if (!r.ok) return fail(r.error);
105
+ console.info(`[app-versions] ${sub} ${r.line.version || r.line.key || ''}`.trim());
106
+ const words = { set: `recorded ${pos[0]}`, gone: `${pos[0]} is no longer in use`, bug: `recorded bug ${flags.key}`, fixed: `${pos[0]} is fixed`, undo: 'took back the last decision',
107
+ force: `recorded: you will force an update from ${pos[0]}. PMOS sends nothing; turn it on where your app's updates are set`, leave: `left ${pos[0]} alone` };
108
+ say(flags.json ? JSON.stringify({ ok: true, line: r.line }) : words[sub]);
109
+ return 0;
110
+ }
111
+
112
+ module.exports = { run, COMMANDS, USAGE, listLines };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.839.0",
3
+ "version": "0.841.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.839.0",
9
+ "version": "0.841.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.839.0",
3
+ "version": "0.841.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",
@@ -0,0 +1,97 @@
1
+ /* pm/app-versions.js — the product's app versions still in use, on its Work page (idea A211, initiative app-versions; board BatchReleaseDS
2
+ * panel 22). Below the principles, one product only.
3
+ *
4
+ * mount(host, { ws, single, say }) → draws the block into `host`; a Work page that shows several products at once shows none
5
+ *
6
+ * Built only from Komorebi parts: a Detail block (pm-block, its head), pm-table, pm-said with the ✦ star, pm-btn icon buttons. It reads and
7
+ * writes GET and POST /api/app-versions (lib/routes-app-versions.js) and nothing else; `pmos versions` writes the same store.
8
+ * · One row per version in use, newest first: its share of users and the open bugs its users hit (a crash in the alert colour).
9
+ * · At most one ✦ line: which version to force, with the reason; ✓ records the PM's decision to force it, ✕ leaves it. Forcing the
10
+ * update is an outward change PMOS never makes, so the ✓ only records it and says so, with Undo in the page's toast.
11
+ * · No version recorded, but the product's Jira readings name releases (seed): one ✦ line naming them and a users field per release,
12
+ * ✓ saves it (bdVersAdd). This is the way in without a typed ask (LINE.md Rule 12).
13
+ * · No version recorded and no release named: no block (zero is silence).
14
+ * The controls are named bdVersForce, bdVersLeave and bdVersAdd and each press notes that name in the local use log (noteUse): the health number. */
15
+ import { pmGet, pmPost } from './http.js';
16
+ import { noteUse } from './use-log.js';
17
+
18
+ const API = '/api/app-versions';
19
+ const esc = (s) => String(s == null ? '' : s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
20
+ const SV = (d, cls = '') => `<svg class="pm-ic${cls}" width="16" height="16" viewBox="0 0 24 24" aria-hidden="true"><path d="${d}"/></svg>`;
21
+ const I = { phone: 'M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2', star: 'M12 3l1.8 5.4L19 10.2l-5.2 1.8L12 17.4l-1.8-5.4L5 10.2l5.2-1.8z',
22
+ ok: 'M5 12.5l4.5 4.5L19 7.5', x: 'M6 6l12 12M18 6L6 18' };
23
+
24
+ const usersCell = (r) => (r.share != null ? r.share + ' %' : r.users + (r.unit === '%' ? ' %' : ' users'));
25
+ function bugsCell(r) {
26
+ if (!r.bugs || !r.bugs.length) return '—';
27
+ const n = r.bugs.length, crash = r.bugs.find((b) => b.crash);
28
+ const tip = ` title="${esc(r.bugs.map((b) => b.key + ' ' + b.title).join(' · '))}"`;
29
+ return crash ? `<span class="bd-vers-crash"${tip}>${n} · ${esc(crash.title)}</span>` : `<span${tip}>${n}</span>`;
30
+ }
31
+
32
+ const HEAD = () => `<div class="head">${SV(I.phone)}<h3 class="pm-h-sm">Versions</h3></div>`;
33
+ const listWords = (vs) => (vs.length < 2 ? vs[0] : vs.slice(0, -1).join(', ') + ' and ' + vs[vs.length - 1]);
34
+ /** No version recorded, releases named in Jira: a ✦ line and one users field per release. */
35
+ function seedHtml(seed) {
36
+ const tr = (v) => `<tr data-version="${esc(v)}"><td>${esc(v)}</td><td><input class="pm-input" name="bdVersUsers" inputmode="decimal" autocomplete="off" placeholder="710 or 7%" aria-label="Users on ${esc(v)}"></td>`
37
+ + `<td><button type="button" class="pm-btn primary" name="bdVersAdd" value="${esc(v)}" aria-label="Save the users on ${esc(v)}" title="Save the users on ${esc(v)}">${SV(I.ok)}</button></td></tr>`;
38
+ return `<section class="pm-block bd-vers" aria-label="Versions">${HEAD()}`
39
+ + `<p class="pm-said">${SV(I.star, ' pm-star')}<span>Your Jira releases name ${esc(listWords(seed))}. Add the users still on each one, from your store console or analytics, and PMOS shows which version to force.</span></p>`
40
+ + `<table class="pm-table"><thead><tr><th scope="col">Version</th><th scope="col">Users</th><th scope="col" aria-label="Save"></th></tr></thead><tbody>${seed.map(tr).join('')}</tbody></table></section>`;
41
+ }
42
+
43
+ /** The block's markup. state = { rows, proposal, seed }. Pure, so the test reads it. '' when no version is recorded and no release is named. */
44
+ export function blockHtml(state) {
45
+ const rows = Array.isArray(state && state.rows) ? state.rows : [];
46
+ const seed = Array.isArray(state && state.seed) ? state.seed.filter(Boolean) : [];
47
+ if (!rows.length) return seed.length ? seedHtml(seed) : '';
48
+ const p = state.proposal || null;
49
+ const btn = (name, icon, label, kind) => `<button type="button" class="pm-btn${kind ? ' ' + kind : ''}" name="${name}" value="${esc(p.version)}" aria-label="${esc(label)}" title="${esc(label)}">${SV(icon)}</button>`;
50
+ const tr = (r) => `<tr data-version="${esc(r.version)}"><td>${esc(r.version)}</td><td>${esc(usersCell(r))}</td><td>${bugsCell(r)}${r.forced ? ' <span class="pm-meta">· you decided to force an update</span>' : ''}</td></tr>`;
51
+ const said = p ? `<p class="pm-said">${SV(I.star, ' pm-star')}<span>${esc(p.text)}</span>`
52
+ + `${btn('bdVersLeave', I.x, 'Leave this version alone', 'outline')}${btn('bdVersForce', I.ok, 'I will force this update (PMOS sends nothing)', 'primary')}</p>` : '';
53
+ return `<section class="pm-block bd-vers" aria-label="Versions">${HEAD()}`
54
+ + `<table class="pm-table"><thead><tr><th scope="col">Version</th><th scope="col">Users</th><th scope="col">Open bugs they hit</th></tr></thead><tbody>${rows.map(tr).join('')}</tbody></table>`
55
+ + said + '</section>';
56
+ }
57
+
58
+ /** Draw the block into `host` and wire its presses. */
59
+ export async function mount(host, opts = {}) {
60
+ if (!host) return;
61
+ const { ws = null, single = true, say = null } = opts;
62
+ if (!single) { host.hidden = true; host.innerHTML = ''; return; }
63
+ const r = await pmGet(API + (ws ? '?ws=' + encodeURIComponent(ws) : '')).catch(() => null);
64
+ if (!r || !r.ok) { host.hidden = true; return; } // the block is an extra: a failed read leaves Work as it was
65
+ const html = blockHtml(r);
66
+ host.hidden = !html; host.innerHTML = html;
67
+ const addUsers = async (b) => {
68
+ const field = b.closest('tr') && b.closest('tr').querySelector('input[name="bdVersUsers"]');
69
+ const users = field ? field.value.trim() : '';
70
+ if (!users) { if (field) field.focus(); return; }
71
+ noteUse(b.name);
72
+ b.disabled = true;
73
+ const res = await pmPost(API, { ws, act: 'users', version: b.value, users }).catch(() => null);
74
+ if (!res || !res.ok) { b.disabled = false; if (say) say((res && res.error) || 'Not saved.'); return; }
75
+ mount(host, opts);
76
+ };
77
+ host.onkeydown = (e) => {
78
+ if (e.key !== 'Enter' || !e.target.matches('input[name="bdVersUsers"]')) return;
79
+ const b = e.target.closest('tr').querySelector('button[name="bdVersAdd"]');
80
+ if (b) { e.preventDefault(); addUsers(b); }
81
+ };
82
+ host.onclick = async (e) => {
83
+ const add = e.target.closest('button[name="bdVersAdd"]'); if (add) { addUsers(add); return; }
84
+ const b = e.target.closest('button[name="bdVersForce"], button[name="bdVersLeave"]'); if (!b) return;
85
+ const act = b.name === 'bdVersForce' ? 'force' : 'leave', version = b.value;
86
+ noteUse(b.name);
87
+ b.disabled = true;
88
+ const res = await pmPost(API, { ws, act, version }).catch(() => null);
89
+ if (!res || !res.ok) { b.disabled = false; if (say) say((res && res.error) || 'Not saved.'); return; }
90
+ const words = act === 'force' ? `Recorded: you will force an update from ${version}. PMOS sends nothing; turn it on where your app's updates are set.` : `Left ${version} alone.`;
91
+ if (say) say(words, async () => { await pmPost(API, { ws, act: 'undo' }).catch(() => null); mount(host, opts); });
92
+ mount(host, opts);
93
+ };
94
+ }
95
+
96
+ /** Draw the block again after a read of the Work page. */
97
+ export const refresh = (host, opts) => mount(host, opts);
@@ -55,3 +55,9 @@ body.bd-page.pm-ds > :not(#czNav, .pv-scrim, .pv-ov) :focus-visible { outline: n
55
55
 
56
56
  /* Toast: ink on card, medium corners, lift, bottom centre (the system's Toast). */
57
57
  .bd-page.pm-ds .bd-toast { border-radius: var(--radius-md); box-shadow: var(--lift); font-size: var(--fs-meta); }
58
+
59
+ /* Versions (pm/app-versions.js, idea A211): the head's title takes the row, the ✦ line sits flush, a bug its users hit with a crash in the alert colour. */
60
+ .bd-page.pm-ds .bd-vers .head .pm-h-sm, .bd-page.pm-ds .bd-vers .pm-said > span { flex: 1; }
61
+ .bd-page.pm-ds .bd-vers .pm-said { margin: 0; align-items: center; }
62
+ .bd-page.pm-ds .bd-vers .bd-vers-crash { color: var(--alert); }
63
+ .bd-page.pm-ds .bd-vers .pm-input { width: 8em; max-width: 100%; }
@@ -221,3 +221,29 @@ body.bd-page.bk-on [id="bkBody"] { display: flex; flex-direction: column; gap: v
221
221
  @media (max-width: 760px) {
222
222
  .lb-m .lb-said span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
223
223
  }
224
+
225
+ /* Work › Initiatives (board TbInitiatives, slice 2, job 2038): the summary strip, the chips, and the list beside the Key results column 2 : 1.
226
+ Under 1100 px the column sits under the list and the strip takes two cells a row. */
227
+ .wk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 var(--space-16); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); overflow: hidden; }
228
+ .wk-strip .wk-sc { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--space-12) var(--space-16); border-left: 1px solid var(--line); }
229
+ .wk-strip .wk-sc:first-child { border-left: 0; }
230
+ .wk-strip .wk-sc b { font-size: var(--fs-section); font-weight: var(--fw-strong); color: var(--ink); }
231
+ .wk-strip .wk-sc.warn b { color: var(--alert); }
232
+ .wk-strip .wk-sc .nm { font-size: var(--fs-row); font-weight: var(--fw-strong); color: var(--ink); }
233
+ .wk-strip .wk-sc .pm-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
234
+ .wk-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: 0 0 var(--space-12); }
235
+ .wk-chips .wk-chip { gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: var(--fs-meta); cursor: pointer; }
236
+ .wk-chips .wk-chip .k { color: var(--muted); }
237
+ .wk-chips .wk-chip.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
238
+ .wk-chips .wk-chip.on .k { color: inherit; }
239
+ .wk-tb { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: var(--space-16); align-items: start; }
240
+ .wk-tbm { min-width: 0; }
241
+ .wk-krs ul { list-style: none; margin: 0; padding: 0; }
242
+ .wk-krs .wk-kr { display: block; padding: var(--space-8) 0; border-top: 1px solid var(--line); }
243
+ .wk-krs .wk-kr:first-child { border-top: 0; }
244
+ .wk-krs .wk-kr .pm-meta { display: block; }
245
+ @media (max-width: 1100px) {
246
+ .wk-tb { grid-template-columns: minmax(0, 1fr); }
247
+ .wk-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
248
+ .wk-strip .wk-sc { border-left: 0; border-top: 1px solid var(--line); }
249
+ }