create-pmos 0.675.0 → 0.676.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 +20 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +19 -0
- package/workspace/lib/mention-store.js +78 -3
- package/workspace/lib/task-jira.js +3 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.676.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,25 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.676.0",
|
|
38
|
+
"at": "2026-11-22T06:16:08.626Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1464,
|
|
43
|
+
"t": "An ask marked Done in Today stays done, re-worded copies included",
|
|
44
|
+
"s": "An ask marked Done in Today stays done, re-worded copies included",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1458,
|
|
49
|
+
"t": "A task Jira closed carries the resolution day as its finish day",
|
|
50
|
+
"s": "A task Jira closed carries the resolution day as its finish day",
|
|
51
|
+
"k": "new"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
36
55
|
{
|
|
37
56
|
"v": "0.675.0",
|
|
38
57
|
"at": "2026-11-22T05:53:46.914Z",
|
|
@@ -351,19 +370,6 @@
|
|
|
351
370
|
"k": "new"
|
|
352
371
|
}
|
|
353
372
|
]
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"v": "0.643.0",
|
|
357
|
-
"at": "2026-11-20T02:02:59.828Z",
|
|
358
|
-
"f": 4,
|
|
359
|
-
"prs": [
|
|
360
|
-
{
|
|
361
|
-
"n": 1425,
|
|
362
|
-
"t": "The Work page moves to the PMOS design system",
|
|
363
|
-
"s": "The Work page moves to the PMOS design system",
|
|
364
|
-
"k": "new"
|
|
365
|
-
}
|
|
366
|
-
]
|
|
367
373
|
}
|
|
368
374
|
]
|
|
369
375
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:16:05Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:16:05Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-22T06:16:05Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.676.0",
|
|
4
|
+
"at": "2026-11-22T06:16:08.626Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1464,
|
|
9
|
+
"t": "An ask marked Done in Today stays done, re-worded copies included",
|
|
10
|
+
"s": "An ask marked Done in Today stays done, re-worded copies included",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1458,
|
|
15
|
+
"t": "A task Jira closed carries the resolution day as its finish day",
|
|
16
|
+
"s": "A task Jira closed carries the resolution day as its finish day",
|
|
17
|
+
"k": "new"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"v": "0.675.0",
|
|
4
23
|
"at": "2026-11-22T05:53:46.914Z",
|
|
@@ -479,6 +479,49 @@ function convRow(id, list, j, mk, reads, now, me) {
|
|
|
479
479
|
return r;
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/* ── the same ask in other words ── */
|
|
483
|
+
const ASK_STOP = new Set(['the', 'and', 'for', 'you', 'your', 'ask', 'asks', 'whether', 'does', 'did', 'can', 'could', 'what', 'when', 'with', 'that', 'this',
|
|
484
|
+
'from', 'pm', 'is', 'are', 'be', 'to', 'of', 'on', 'or', 'in', 'a', 'an', 'it', 'its', 'if', 'by', 'at', 'as', 'do', 'say', 'says', 'yes', 'no', 'not', 'please',
|
|
485
|
+
'need', 'needs', 'needed', 'has', 'have', 'had', 'been', 'was', 'were', 'wawan', 'will', 'would', 'should', 'there', 'their', 'they', 'them', 'any', 'some', 'about', 'which', 'who', 'how', 'why', 'since']);
|
|
486
|
+
/** The words that carry an ask: lower case, no small words, a plain stem ("numbers" and "number" are one word). Pure. */
|
|
487
|
+
function askTokens(t) {
|
|
488
|
+
const out = new Set();
|
|
489
|
+
for (let w of String(t || '').toLowerCase().replace(/[^\p{L}\p{N}\s]+/gu, ' ').split(/\s+/)) {
|
|
490
|
+
if (w.length < 2 || ASK_STOP.has(w)) continue;
|
|
491
|
+
if (w.length > 4) w = w.replace(/(?:ing|ed|es|s)$/, ''); else if (w.length > 3) w = w.replace(/s$/, '');
|
|
492
|
+
if (w.length >= 2 && !ASK_STOP.has(w)) out.add(w);
|
|
493
|
+
}
|
|
494
|
+
return out;
|
|
495
|
+
}
|
|
496
|
+
/** Two asks say the same thing in other words: at least two carrying words shared, and most of the shorter ask's words. Pure.
|
|
497
|
+
* "Does the microsite need KB numbers" and "Yes or no on KB numbers for the microsite" are one ask. */
|
|
498
|
+
function sameAskLoose(a, b) {
|
|
499
|
+
const A = askTokens(a), B = askTokens(b);
|
|
500
|
+
if (!A.size || !B.size) return false;
|
|
501
|
+
let n = 0; for (const w of A) if (B.has(w)) n++;
|
|
502
|
+
return n >= 2 && n / Math.min(A.size, B.size) >= 0.6;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/** The PM's Done on an ask in Today's log (POST /api/today-log/mark, key 'mn:<conversation id>') is the PM covering that ask: Done
|
|
506
|
+
* holds a day in the log, so without this the ask came back the next morning. The last done or undone of a key wins; done reads as
|
|
507
|
+
* Mark answered at the time it was pressed. lines: today-log/log.jsonl. → mention marks. Pure. */
|
|
508
|
+
function todayDoneMarks(lines) {
|
|
509
|
+
const last = new Map();
|
|
510
|
+
for (const ev of lines || []) {
|
|
511
|
+
if (!ev || ev.event !== 'mark' || (ev.act !== 'done' && ev.act !== 'undone')) continue;
|
|
512
|
+
const m = /^mn:([0-9a-f]{12})$/.exec(String(ev.key || '')); if (!m) continue;
|
|
513
|
+
last.set(m[1], ev);
|
|
514
|
+
}
|
|
515
|
+
const out = [];
|
|
516
|
+
for (const [id, ev] of last) {
|
|
517
|
+
if (ev.act !== 'done') continue;
|
|
518
|
+
const at = T(ev.at) || T(ev.day ? ev.day + 'T23:59:00' : '');
|
|
519
|
+
if (at) out.push({ id, act: 'answered', by: 'pm', at: new Date(at).toISOString(), from: 'today' });
|
|
520
|
+
}
|
|
521
|
+
return out;
|
|
522
|
+
}
|
|
523
|
+
const todayLogFile = (rt) => path.join(rt, 'today-log', 'log.jsonl');
|
|
524
|
+
|
|
482
525
|
/** The pure view. entries: the store's mentions; marks: marks.jsonl lines; o: { now, me: [lower-case names], reads: Map id → read }.
|
|
483
526
|
* → { waiting (Your move, oldest first), toread (newest first), answered (newest first), recent (toread + answered, newest first),
|
|
484
527
|
* watching, landed } */
|
|
@@ -495,11 +538,42 @@ function build(entries, marks, o = {}) {
|
|
|
495
538
|
groups.get(id).push(e);
|
|
496
539
|
}
|
|
497
540
|
const waiting = [], toread = [], answered = [];
|
|
541
|
+
const judged = [];
|
|
498
542
|
for (const [id, list] of groups) {
|
|
499
543
|
const mk = marksFor([...list.map((e) => e.id), id], mks);
|
|
500
544
|
const j = judgeConv(list, mk, now, me);
|
|
501
545
|
if (j.snoozed) continue; // Remind me at 09:00: hidden until then
|
|
502
|
-
|
|
546
|
+
judged.push({ id, list, j, r: convRow(id, list, j, mk, o.reads, now, me) });
|
|
547
|
+
}
|
|
548
|
+
// THE SAME ASK, READ AGAIN (Wawan 2026-11-22: Done asks kept coming back, Jin's one ask three times). A brief re-states an ask in new
|
|
549
|
+
// words, with no link and often no message time, so each day's copy is a new conversation. A copy is the same ask when the same person
|
|
550
|
+
// asks it in most of the same words (sameAskLoose). It is covered when the PM already covered that ask and the copy carries no message
|
|
551
|
+
// newer than the cover; open copies of one ask are one row, the oldest, with the others under it (`dups`).
|
|
552
|
+
const asksOf = (list) => list.filter((e) => e.reply_needed && !e.broadcast).map((e) => e.ask || e.gist || e.text).filter(Boolean);
|
|
553
|
+
const peopleOf = (r) => new Set((r.people && r.people.length ? r.people : [r.who]).map((w) => String(w || '').trim().split(/\s+/)[0].toLowerCase()).filter(Boolean));
|
|
554
|
+
const realLast = (list) => Math.max(0, ...list.flatMap((e) => [T(e.at), ...(e.thread || []).filter((m) => !isMe(m.who, me)).map((m) => T(m.at))]));
|
|
555
|
+
const same = (a, b) => { const pa = peopleOf(a.r), pb = peopleOf(b.r); if (![...pa].some((n) => pb.has(n))) return false;
|
|
556
|
+
const xa = asksOf(a.list), xb = asksOf(b.list); return xa.some((x) => xb.some((y) => sameAskLoose(x, y))); };
|
|
557
|
+
const covers = judged.filter((c) => c.j.ask && !c.j.waiting && c.j.upto > 0);
|
|
558
|
+
for (const w of judged) {
|
|
559
|
+
if (!w.j.waiting) continue;
|
|
560
|
+
const real = realLast(w.list);
|
|
561
|
+
const c = covers.find((x) => x !== w && real <= x.j.upto + 60000 && same(w, x));
|
|
562
|
+
if (!c) continue;
|
|
563
|
+
w.j = { ...w.j, waiting: false, how: c.j.how || 'answered', sinceReply: false, last: Math.max(w.j.last, c.j.upto) };
|
|
564
|
+
delete w.r.since; w.r.waiting = false; w.r.status = c.j.how || 'answered'; w.r.same_as = c.id; delete w.r.check;
|
|
565
|
+
}
|
|
566
|
+
const open = judged.filter((x) => x.j.waiting).sort((a, b) => a.j.since - b.j.since);
|
|
567
|
+
for (let i = 0; i < open.length; i++) {
|
|
568
|
+
const keep = open[i]; if (keep.gone) continue;
|
|
569
|
+
for (let k = i + 1; k < open.length; k++) {
|
|
570
|
+
const d = open[k]; if (d.gone || !same(keep, d)) continue;
|
|
571
|
+
d.gone = true; keep.r.dups = (keep.r.dups || []).concat(d.id, d.r.dups || []);
|
|
572
|
+
keep.r.count = (keep.r.count || 0) + (d.r.count || 0);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
for (const { j, r, gone } of judged) {
|
|
576
|
+
if (gone) continue;
|
|
503
577
|
if (j.waiting) waiting.push(r);
|
|
504
578
|
else if (j.last < start.getTime() && !r.watch && !r.landed) continue;
|
|
505
579
|
else if (j.ask && !j.sinceReply) answered.push(r);
|
|
@@ -536,7 +610,8 @@ function view(rt, o = {}) {
|
|
|
536
610
|
if (o.brief) { try { ingestBrief(rt, o.brief, { me: o.me }); } catch { /* the same */ } }
|
|
537
611
|
const reads = new Map();
|
|
538
612
|
for (const l of lines(readsFile(rt))) if (l && ID_RE.test(String(l.id || '')) && typeof l.read === 'boolean') reads.set(l.id, l.read);
|
|
539
|
-
|
|
613
|
+
// Today's Done on an ask counts as Mark answered, before the mention's own marks so a later Undo or a new ask still wins
|
|
614
|
+
const B = build(Object.values(load(rt)), todayDoneMarks(lines(todayLogFile(rt))).concat(lines(marksFile(rt))).sort((a, b) => T(a.at) - T(b.at)), { now, me: o.me, reads });
|
|
540
615
|
// honest gaps, said once at the end: a mention source not reached, and a check that has not run today
|
|
541
616
|
const gaps = [];
|
|
542
617
|
for (const m of o.missing || []) if (MENTION_SOURCES.includes(m.source) && m.state !== 'off') gaps.push({ kind: 'source', source: m.source, state: m.state });
|
|
@@ -552,4 +627,4 @@ function view(rt, o = {}) {
|
|
|
552
627
|
return { ok: true, ...B, count: B.waiting.length, gaps, as_of, sources, reads_at, now: new Date(now).toISOString() };
|
|
553
628
|
}
|
|
554
629
|
|
|
555
|
-
module.exports = { MENTION_SOURCES, ACTS, AGENT_ACTS, VIAS, keyOf, convKeyOf, convIdOf, judgeConv, nextNine, isMention, namesMe, timeOf, entryOf, briefExtras, merge, ingestRead, ingestBrief, mark, foldMarks, judge, build, prune, view, nineTomorrow, _files: { storeFile, marksFile } };
|
|
630
|
+
module.exports = { sameAskLoose, askTokens, todayDoneMarks, MENTION_SOURCES, ACTS, AGENT_ACTS, VIAS, keyOf, convKeyOf, convIdOf, judgeConv, nextNine, isMention, namesMe, timeOf, entryOf, briefExtras, merge, ingestRead, ingestBrief, mark, foldMarks, judge, build, prune, view, nineTomorrow, _files: { storeFile, marksFile } };
|
|
@@ -119,7 +119,9 @@ function trackerLines(lines, snapOf) {
|
|
|
119
119
|
const closes = want === 'Done' || want === "Won't do";
|
|
120
120
|
if (jiraAt ? jiraAt <= changed : !closes) continue;
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
// happened: Jira's resolution day when it closed the ticket, so a done task carries its real finish day, not the read's (A67)
|
|
123
|
+
const happened = (want === 'Done' || want === "Won't do") && /^\d{4}-\d{2}-\d{2}$/.test(String(rd.resolved || '')) ? { happened: rd.resolved } : {};
|
|
124
|
+
out.push({ at: s.fetchedAt, by: BY, kind: 'task-update', task: t.task, state: want, tracker: true, ...happened,
|
|
123
125
|
why: `Jira says ${String(rd.status || want).slice(0, 40)} (${t.key}, read ${String(s.fetchedAt).slice(0, 16).replace('T', ' ')} UTC)` });
|
|
124
126
|
}
|
|
125
127
|
return out.sort((a, b) => String(a.at).localeCompare(String(b.at)));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.676.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.676.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED