create-pmos 0.613.0 → 0.615.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 +27 -39
- 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 +26 -0
- package/workspace/guide/cli.md +2 -1
- package/workspace/guide/layout.md +24 -10
- package/workspace/guide/settings-and-switches.md +1 -0
- package/workspace/lib/events-place.js +46 -10
- package/workspace/lib/mention-cli.js +6 -3
- package/workspace/lib/mention-store.js +49 -10
- package/workspace/lib/routes-events-place.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-events-view.js +23 -4
- package/workspace/public/pm/cozy-events.js +8 -2
- package/workspace/public/pm/cozy-home-rows.css +55 -0
- package/workspace/public/pm/cozy-nav.js +15 -2
- package/workspace/public/pm/cozy-pop-work.css +3 -0
- package/workspace/public/pm/cozy-pop-work.js +5 -3
- package/workspace/public/pm/cozy-today-app.js +119 -12
- package/workspace/public/pm/cozy-today-model.js +278 -21
- package/workspace/public/pm/cozy-today-page.css +74 -15
- package/workspace/public/pm/cozy-today-view.js +89 -31
- package/workspace/public/pm/home-app.js +14 -6
- package/workspace/public/pm/home-data.js +1 -1
- package/workspace/public/pm/home-ini.js +17 -1
- package/workspace/public/pm/home-mentions.js +121 -6
- package/workspace/public/pm/ini-edit.js +2 -0
- package/workspace/public/pm/ini-view.css +2 -0
- package/workspace/public/pm/mention-one-model.js +115 -0
- package/workspace/public/pm/pop-work-model.js +17 -11
- package/workspace/public/pm/scope-chip.js +5 -2
- package/workspace/run-tests.js +11 -4
- package/workspace/server.js +8 -0
- package/workspace/skills/morning-brief.skill +1 -1
- package/workspace/test-run.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.615.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,32 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.615.0",
|
|
38
|
+
"at": "2026-11-19T03:15:37.053Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1394,
|
|
43
|
+
"t": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
44
|
+
"s": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.614.0",
|
|
51
|
+
"at": "2026-11-19T02:50:21.667Z",
|
|
52
|
+
"f": 4,
|
|
53
|
+
"prs": [
|
|
54
|
+
{
|
|
55
|
+
"n": 1373,
|
|
56
|
+
"t": "Today matches its board, round 2 on real data, round 3 (one item per press, the self check)",
|
|
57
|
+
"s": "Today matches its board, round 2 on real data, round 3 (one item per press, the self check)",
|
|
58
|
+
"k": "fix"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
36
62
|
{
|
|
37
63
|
"v": "0.613.0",
|
|
38
64
|
"at": "2026-11-19T02:36:25.154Z",
|
|
@@ -398,44 +424,6 @@
|
|
|
398
424
|
"k": "new"
|
|
399
425
|
}
|
|
400
426
|
]
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"v": "0.595.0",
|
|
404
|
-
"at": "2026-11-18T02:36:22.728Z",
|
|
405
|
-
"f": 4,
|
|
406
|
-
"prs": [
|
|
407
|
-
{
|
|
408
|
-
"n": 1336,
|
|
409
|
-
"t": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
410
|
-
"s": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
411
|
-
"k": "fix"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"n": 1334,
|
|
415
|
-
"t": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
416
|
-
"s": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
417
|
-
"k": "fix"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"n": 1337,
|
|
421
|
-
"t": "Scheduled work shows how often and when next, and the PM sets it",
|
|
422
|
-
"s": "Scheduled work shows how often and when next, and the PM sets it",
|
|
423
|
-
"k": "new"
|
|
424
|
-
}
|
|
425
|
-
]
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"v": "0.594.0",
|
|
429
|
-
"at": "2026-11-18T02:08:44.140Z",
|
|
430
|
-
"f": 4,
|
|
431
|
-
"prs": [
|
|
432
|
-
{
|
|
433
|
-
"n": 1335,
|
|
434
|
-
"t": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
435
|
-
"s": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
436
|
-
"k": "fix"
|
|
437
|
-
}
|
|
438
|
-
]
|
|
439
427
|
}
|
|
440
428
|
]
|
|
441
429
|
}
|
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-19T03:15:33Z"}
|
|
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-19T03:15:33Z"}
|
|
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-19T03:15:33Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.615.0",
|
|
4
|
+
"at": "2026-11-19T03:15:37.053Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1394,
|
|
9
|
+
"t": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
10
|
+
"s": "Events audit round 2: product names, report names, old drafts, people's names",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.614.0",
|
|
17
|
+
"at": "2026-11-19T02:50:21.667Z",
|
|
18
|
+
"f": 4,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1373,
|
|
22
|
+
"t": "Today matches its board, round 2 on real data, round 3 (one item per press, the self check)",
|
|
23
|
+
"s": "Today matches its board, round 2 on real data, round 3 (one item per press, the self check)",
|
|
24
|
+
"k": "fix"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"v": "0.613.0",
|
|
4
30
|
"at": "2026-11-19T02:36:25.154Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Command reference: every pmos command, by area"
|
|
4
4
|
description: "Every pmos command of the workspace in one page, grouped by area, with its flags, examples and exit codes."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-19
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Command reference
|
|
@@ -83,6 +83,7 @@ These commands post nothing:
|
|
|
83
83
|
- `pmos mention stands <id> --settled "<line>" [--open "<line>"]` saves Where it stands.
|
|
84
84
|
- `pmos mention watch <id> --what "<Samuel’s tag>" --text "<the offer>"` offers to watch for a dated promise.
|
|
85
85
|
- `pmos mention landed <id> --text "<Samuel’s tag landed.>"` says that the promise landed.
|
|
86
|
+
- `pmos mention looks <id> --who "<name>" --text "<their line>" [--on <ISO>]` says that someone else may have answered, with their line quoted. Today shows it under the ask with ✓ ✕; nothing closes until you confirm.
|
|
86
87
|
|
|
87
88
|
### pmos lead: PMOS's leads in popups
|
|
88
89
|
|
|
@@ -14,7 +14,7 @@ PMOS has four places: **Today**, **Work**, **Goals** and **Events**. PMOS opens
|
|
|
14
14
|
On a computer, one thin panel at the left edge of every page holds the places. It is the same on every page. Press a place to go there.
|
|
15
15
|
|
|
16
16
|
- At its foot: the chat icon, **Search**, **Guide** and **Settings**.
|
|
17
|
-
- A number on Today says how many
|
|
17
|
+
- A number on Today says how many lines of Today's log are for today (Do first and what waits today). It shows on every place. A number on the chat icon says how many sessions wait for you.
|
|
18
18
|
- A blue dot on a place means that it has something new to show. An amber dot on Settings means that a source is stale.
|
|
19
19
|
- Settings opens over the page you are on. The navigation stays.
|
|
20
20
|
- The navigation does not count as a panel.
|
|
@@ -26,26 +26,40 @@ On a phone, the round button at the bottom right opens the same places as a menu
|
|
|
26
26
|
|
|
27
27
|
## Today
|
|
28
28
|
|
|
29
|
-
On a computer, Today is one page. Today's log
|
|
29
|
+
On a computer, Today is one page that starts at the left of the panel. At the top are the day and the time, and a greeting. Under them, the Overview and Today's log take the left (at most about 1100 px wide). Today's agenda is in one grey box on the right, about 320 px wide. Today reads every product. Home's old address on a computer (`/premium.html`, and a link that names one item) opens Today.
|
|
30
30
|
|
|
31
|
-
The
|
|
31
|
+
The **Overview** is one grey box written by PMOS (✦). It says how many lines are open, the ones to start with and why, how much free time today has and when your first or next meeting is. It names only what the lines themselves say. Under it, PMOS suggests what to clean up with ✓ ✕, only when it is true, for example "Drop the 2 checks carried more than 60 days". A row of chips counts each type (All, Asks, Decisions, Checks, Milestones, Tasks, Reports, Notes). Press a chip to show only that type; press it again to show all. A type with no lines has no chip.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
The log is a table, kept the Bullet Journal way, in three groups:
|
|
34
|
+
|
|
35
|
+
- **Do first**: five lines at most, each with the reason PMOS picked it under its title. PMOS picks what you marked first, a date that is late, a date that is today or a send that goes out today, a session that waits on you, and the person who waits longest. A line that PMOS suggests to drop is never in Do first.
|
|
36
|
+
- **Today**: what is new today (dated today, logged today or asked today), then what you did today.
|
|
37
|
+
- **Can wait**: the rest, folded to one line ("66 more · the oldest carried 23 days"). Press it to see them, by type and then the oldest first.
|
|
38
|
+
|
|
39
|
+
Each row is one short line:
|
|
40
|
+
|
|
41
|
+
- The bullet says what it is: **•** a task, **○** an event, **–** a note, **×** done, **✦** something PMOS suggests. **!** marks what you marked first.
|
|
42
|
+
- **What** (the thing to do), **Type**, **Work** (the initiative or program it belongs to; the column is left out when no line names one), **Job** and **When**. The type is **Ask** (a person asked you; the line starts with who, then the ask; an ask with no person behind it can wait), **Decision**, **Check** ("did it work?"), **Milestone**, **Task**, **Report** or **Note**. The same ask from the same people shows once, with every name ("Suhas and Betty: …"). **Decide** is a call you make up your mind on, **Do** is something you do yourself ("Draft the PRD, or let PMOS draft it"), **Reply** is an answer a person waits for, and **Send** is a thing of yours that is ready to go out. PMOS's own note, such as the asks that expired with no answer, closes the log with the Job **Note**.
|
|
35
43
|
- The rows are the calls only you can make, your late tasks, the next steps, your own items for today, the drafts to send, and what you typed yourself.
|
|
36
|
-
-
|
|
44
|
+
- The title line counts the log ("Today's log · 12"), with the jobs at the right, for example "5 to decide · 6 to do · 15 to reply · 1 to send".
|
|
37
45
|
|
|
38
46
|
To use the log:
|
|
39
47
|
|
|
40
48
|
1. Type a task, an event or a note in the first line and press Enter. Start with **o** for an event (add a time, such as 14:00, to put it on the agenda), with **-** for a note, and with **!** for what comes first. Enter only adds the row. It opens nothing and starts no session.
|
|
41
49
|
2. Point at a row to see its three icons: **Done**, **Move to tomorrow** and **Set a date**. Done gives the row the × bullet. Each change shows Undo for a moment.
|
|
42
|
-
3. Press a row, or an event in the agenda, to open
|
|
50
|
+
3. Press a row, or an event in the agenda, to open that one item in the popup. An ask opens that one mention, not the list of mentions. A task opens its initiative at that task, with the task's row lit. A check ("did it work?") opens its initiative. With the popup open, press **j** or **k** (or **↓** and **↑** in an ask) to open the next or the previous row in its place.
|
|
51
|
+
|
|
52
|
+
Every row says why it is on Today, after its title: "Due today", "3 days late", "Chen waits on you 13 days", "Goes out today 16:00", "PMOS finished it, needs your look" or "You said today". A task with none of these reasons is not on Today. A task whose date passed more than 30 days ago is not a row either: the Overview says how many there are in one ✦ line, and ✓ clears them from Today. A small **✦ 1** before the reason says what PMOS did on that row already (point at it to read it).
|
|
53
|
+
|
|
54
|
+
**One ask in the popup.** The title is the ask in one line. Under it: who asked, where (for example "Slack · #product"), how long they wait, and PMOS's check ("Checked 08:10 · still waiting on you"). When PMOS could not read that source, it says so ("Slack not read since 06:50") and claims neither. Then two boxes: **PMOS did** (from the records only, such as "drafted the reply") and **Left for you** (one step, verb first, such as "Read the reply, then send it in Slack"). Then the reply PMOS drafted, or why it could not draft one. Blanks in a reply ("[date]") are fields to fill in before you send. PMOS never posts: send copies the reply and opens the source. The four icons mark it answered, remind you at 09:00, make it a task, or say it is not for you. The messages follow, each with a name and a time; the same words from the same person show once with ×3, and older messages fold under "N earlier". **About: …** opens the work the ask is about, and **‹ All mentions** opens the full list.
|
|
55
|
+
|
|
56
|
+
**PMOS checks that an ask still waits on you.** On every read, when Today opens and again when you open the ask, PMOS checks the source. When you replied after the ask, the ticket it points to is closed, or the person took the ask back, the ask leaves Today by itself and a message says how ("You replied Tue 17 Nov: …"), with Undo. A new message from the person after your reply brings it back. An ask with no move for 21 days asks "Still needed?" once.
|
|
43
57
|
|
|
44
58
|
What you do not finish is carried to the next day, and the When column says for how long ("carried 16 days"). When a row is carried for 30 days, PMOS suggests to drop it from your log. ✓ drops it, ✕ keeps it, and PMOS does not ask again for a month. A task's own date changes only when you set a date on it.
|
|
45
59
|
|
|
46
60
|
Findings that fit no initiative (the Lab) are ✦ rows in the log. ✓ keeps one and starts an initiative from it. ✕ drops it.
|
|
47
61
|
|
|
48
|
-
The
|
|
62
|
+
The agenda is the day by hours, from 08:00 to 18:00, with a red line at the time now. Meetings that overlap sit side by side, so none covers or cuts another. The box is as tall as its hours. It shows your meetings, the reports that go out today at their time, your own events, and focus time: the free time from now until the next meeting, held for the first row of your log, in a dashed box. Press the focus time to open that row. **Events** at the top right opens the Events page. "PMOS did" is not on Today; it moves to Routine.
|
|
49
63
|
|
|
50
64
|
On a phone, Today is Home: the list of your work, and the chat when you open a row.
|
|
51
65
|
|
|
@@ -95,10 +109,10 @@ Events is one page for everything with a date, from every source PMOS reads: you
|
|
|
95
109
|
|
|
96
110
|
- Each row starts its grey line with its type: **Meeting**, **Focus time**, **Milestone**, **Task**, **Report** or **Deadline**. A deadline names its source, for example "From Slack · Ang, 18 Nov". Press it to see the line that states the date, with a link to the source.
|
|
97
111
|
|
|
98
|
-
- **Late** lists the dates that passed. For each one, PMOS suggests what to do: "It looks done. Mark it done" when the work is already in a later stage, a new date from the Jira forecast or from the planned finish, "Moves with" a task of the same stage, or "Drop it" for a task that is 28 days late or more. Press ✓ to do it, or ✕ to say no. PMOS does not suggest the same thing again after a no. **Yes to all** takes every suggestion in one press. Each change has Undo for a moment.
|
|
112
|
+
- **Late** lists the dates that passed. For each one, PMOS suggests what to do: "It looks done. Mark it done" when the work is already in a later stage, a new date from the Jira forecast or from the planned finish, "Moves with" a task of the same stage, or "Drop it" for a task that is 28 days late or more. Press ✓ to do it, or ✕ to say no. PMOS does not suggest the same thing again after a no. **Yes to all** takes every suggestion in view in one press. While the older late dates are folded, it reads **Yes to these 5** and takes only the five you see. Each change has Undo for a moment.
|
|
99
113
|
- PMOS cannot write a Jira date or an initiative's planned finish, so for those it suggests one of three things. "It looks done. Mark it done" appears when the work is already past Deliver. "Drop this date" appears when the date is 90 days late or more. Either way, Events stops listing the date. For any other late date, PMOS suggests "Ask the owner for a new date", and ✓ adds that ask to your own tasks, due today. A date that is at risk in Coming up gets "Ask the owner if 27 Nov holds".
|
|
100
114
|
- Late shows the newest five dates first. One line under them, such as "16 more late, the oldest 350 days", opens the rest.
|
|
101
|
-
- **Today** holds today's dates, with one press to the act itself: read the draft of a report, mark a task done, or open the work a meeting is about.
|
|
115
|
+
- **Today** holds today's dates, with one press to the act itself: read the draft of a report, mark a task done, or open the work a meeting is about. A report shows by its name and the day in words ("IDPF sprint biweekly update · 28 Oct"). Report drafts more than 14 days old are one row, "9 old report drafts", where PMOS suggests **Drop them** with ✓ and ✕. ✓ takes them off Events, with **Undo**, and the drafts stay in the Library.
|
|
102
116
|
- **Coming up** holds the next 30 days (meetings: the next 7). A day with three meetings or more is one line, such as "Fri 20 Nov · 5 meetings". Press it to see them. Milestones, tasks, deadlines and reports on that day keep their own rows. Only a date at risk carries a suggestion. A date that needs nothing shows nothing.
|
|
103
117
|
- Every late or at-risk date has a suggestion. A late task of yours with no later day in any record gets "Move to today". A late Jira ticket gets "Set a new date in Jira", which ✓ adds to your tasks. A late deadline from a source gets "Ask Ang where it stands".
|
|
104
118
|
- The delivery milestones after that are one line at the bottom, for example "6 delivery milestones in 2027. The next is 3 Mar: …". Press it to see them.
|
|
@@ -232,6 +232,7 @@ Do not set these on your own computer. The suites set them to make a run short o
|
|
|
232
232
|
| Variable | What it does | Default | Same in Settings |
|
|
233
233
|
|---|---|---|---|
|
|
234
234
|
| `PMOS_TEST` | `1` allows the test seam of the audit sink. | off | — |
|
|
235
|
+
| `PMOS_DESK_HOME` | `keep` keeps Home at `/premium.html` on a desk. Without it, a bare `/premium.html` (or one with only `?item=`) opens Today. | Today | — |
|
|
235
236
|
| `PMOS_OFFLOOP` | `0` runs the board fold in the server thread, not in a worker. | worker | — |
|
|
236
237
|
| `PMOS_TICK_MS` | The server's tick. | 1 minute | — |
|
|
237
238
|
| `PMOS_LIVENESS_MS` | How often the session list is sent again. | 2 seconds | — |
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* boards [{ ws, id, name, rows }] every product's Board model (lib/board-premium.js): the open rows, each with `milestones` (◇ tasks with a
|
|
10
10
|
* due day, PMOS and Jira), `tasks` (the PMOS tasks), `end` (the plan end), `stage`, `status`, `forecast`
|
|
11
11
|
* meetings [{ id, at, end, title, initiative }] lib/calendar-events.js readAll
|
|
12
|
-
* schedules [{ id, name, cadence, next }]
|
|
12
|
+
* schedules [{ id, name, cadence, next, time? }] the enabled report schedules, with the day each fires next ('YYYY-MM-DD') and its time
|
|
13
13
|
* drafts [{ ws, cadence, slot, title? }] report drafts that wait to be issued (lib/report-needs.js reportsOf: a draft, not issued)
|
|
14
14
|
* own [{ id, title, due, done }] the PM's own items (lib/pm-items.js)
|
|
15
15
|
* jira [{ key, title, url, due, category, initiative }] the Jira tickets assigned to the PM (<runtime>/my-work/read.json), with a due day
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
* A Jira item and a plan end: no route here writes them, so what PMOS suggests is kept by Events or is a task for the PM:
|
|
43
43
|
* met late, and its initiative is in a stage after Deliver: "It looks done. Mark it done". Events stops listing it.
|
|
44
44
|
* gone late OLD_DAYS days or more: "Drop this date". Events stops listing it.
|
|
45
|
+
* drafts a report draft older than DRAFT_OLD_DAYS is not a row of its own: the old ones are one row, "N old report drafts", with "Drop them"
|
|
46
|
+
* (suggest.keys: each draft's key, marked dropped). A report row says the report's name and the day in words, never a file name.
|
|
45
47
|
* ask any other late one: "Ask the owner for a new date". Coming up and at risk: "Ask the owner if <day> holds". ✓ adds the ask as the
|
|
46
48
|
* PM's own task, due today.
|
|
47
49
|
* EVERY LATE AND AT-RISK ROW HAS ONE (round 2, point 5). What the rules above leave empty:
|
|
@@ -79,6 +81,9 @@ function shortDay(d, today) {
|
|
|
79
81
|
}
|
|
80
82
|
const clip = (s, n) => { s = String(s == null ? '' : s).replace(/\s+/g, ' ').trim(); return s.length > n ? s.slice(0, n - 1).trimEnd() + '…' : s; };
|
|
81
83
|
const cap = (s) => String(s || '').replace(/[-_]+/g, ' ').replace(/^./, (c) => c.toUpperCase());
|
|
84
|
+
/** A person's name as a name: "vidhi" → "Vidhi", "budi santoso" → "Budi Santoso". A name written with any capital stays as written. */
|
|
85
|
+
const personName = (s) => { const t = String(s || '').trim(); return /[A-Z]/.test(t) ? t : t.replace(/(^|[\s.'-])([a-z])/g, (m, a, c) => a + c.toUpperCase()); };
|
|
86
|
+
const DRAFT_OLD_DAYS = 14;
|
|
82
87
|
|
|
83
88
|
/** The name of a stage key or name, from the row's own workflow when it has one. */
|
|
84
89
|
function stageName(r, sec) {
|
|
@@ -207,22 +212,46 @@ function build(input = {}) {
|
|
|
207
212
|
}
|
|
208
213
|
}
|
|
209
214
|
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
// a report's name, never its file: the schedule's name, else its cadence in words ("idpf-sprint-biweekly-update" → "IDPF sprint biweekly
|
|
216
|
+
// update"; a word that is a product's short name is written in capitals); the date goes beside it in words
|
|
217
|
+
const shorts = new Set(['pmos']);
|
|
218
|
+
for (const b of input.boards || []) for (const w of String(b.name || b.ws || '').toLowerCase().split(/[-_\s]+/)) if (/^[a-z]{2,5}$/.test(w) && w !== 'the') shorts.add(w);
|
|
219
|
+
const nameOfCadence = new Map((input.schedules || []).filter((x) => x && x.cadence && x.name).map((x) => [x.cadence, x.name]));
|
|
220
|
+
const reportName = (cadence) => {
|
|
221
|
+
const n = nameOfCadence.get(cadence);
|
|
222
|
+
if (n) return clip(n, 120);
|
|
223
|
+
const words = String(cadence || 'report').split(/[-_\s]+/).filter(Boolean).map((w) => (shorts.has(w.toLowerCase()) ? w.toUpperCase() : w.toLowerCase()));
|
|
224
|
+
const t = words.join(' ');
|
|
225
|
+
// one word ("weekly") is a cadence, so it is "Weekly report"; more words are the report's own name
|
|
226
|
+
return clip((/^[A-Z]{2,}\b/.test(t) ? t : t.replace(/^./, (c) => c.toUpperCase())) + (words.length === 1 && !/^report$/i.test(t) ? ' report' : ''), 120);
|
|
227
|
+
};
|
|
228
|
+
const draftOf = new Map(); // ws|cadence → the newest draft
|
|
229
|
+
for (const d of input.drafts || []) { const k = (d && d.ws || '') + '|' + (d && d.cadence); if (d && d.cadence && !draftOf.has(k)) draftOf.set(k, d); }
|
|
212
230
|
// a draft whose report goes out today is said on that report's row, not on a row of its own
|
|
213
231
|
const outToday = new Set((input.schedules || []).filter((s) => s && isDay(s.next) && day10(s.next) === today).map((s) => s.cadence));
|
|
232
|
+
const oldDrafts = [];
|
|
214
233
|
for (const d of draftOf.values()) {
|
|
215
234
|
if (outToday.has(d.cadence)) continue;
|
|
216
|
-
|
|
217
|
-
|
|
235
|
+
const key = 'draft:' + (d.ws || '') + '|' + d.cadence + '|' + (d.slot || '');
|
|
236
|
+
if (gone.has(key)) continue;
|
|
237
|
+
// a draft more than two weeks old is not today's work: the old ones are one line, "N old report drafts", that PMOS offers to drop
|
|
238
|
+
if (isDay(d.slot) && daysBetween(day10(d.slot), today) > DRAFT_OLD_DAYS) { oldDrafts.push(key); continue; }
|
|
239
|
+
put({ key, kind: 'report', date: today, time: null, until: null, title: reportName(d.cadence) + (isDay(d.slot) ? ' · ' + shortDay(d.slot, today) : ''),
|
|
240
|
+
line: 'The draft waits for you to issue it', product: '', work: null, task: null, own: null, jira: false, canFix: false, editable: false, draft: true,
|
|
218
241
|
scope: d.ws ? ['p:' + d.ws] : [], act: { label: 'Read the draft', href: '/premium-intelligence.html?tab=library' } });
|
|
219
242
|
}
|
|
243
|
+
if (oldDrafts.length) {
|
|
244
|
+
put({ key: 'drafts:old', kind: 'report', date: today, time: null, until: null, title: oldDrafts.length + ' old report ' + (oldDrafts.length === 1 ? 'draft' : 'drafts'),
|
|
245
|
+
line: 'More than ' + DRAFT_OLD_DAYS + ' days old, not issued', product: '', work: null, task: null, own: null, jira: false, canFix: false, editable: false, draft: true,
|
|
246
|
+
oldDrafts, scope: [], act: { label: 'Read the drafts', href: '/premium-intelligence.html?tab=library' } });
|
|
247
|
+
}
|
|
248
|
+
const draftByCadence = new Map([...draftOf.values()].map((d) => [d.cadence, d]));
|
|
220
249
|
for (const s of input.schedules || []) {
|
|
221
250
|
if (!s || !isDay(s.next)) continue;
|
|
222
|
-
const name =
|
|
223
|
-
const d =
|
|
251
|
+
const name = reportName(s.cadence) ;
|
|
252
|
+
const d = draftByCadence.get(s.cadence);
|
|
224
253
|
const waits = d && daysBetween(today, s.next) === 0;
|
|
225
|
-
put({ key: 'rep:' + (s.id || s.cadence) + ':' + day10(s.next), kind: 'report', date: s.next, time: null, until: null, title: name,
|
|
254
|
+
put({ key: 'rep:' + (s.id || s.cadence) + ':' + day10(s.next), kind: 'report', date: s.next, time: /^\d{2}:\d{2}$/.test(String(s.time || '')) ? s.time : null, until: null, title: s.name ? clip(s.name, 120) : name,
|
|
226
255
|
line: [s.cadence ? 'Goes out ' + String(s.cadence).replace(/[-_]+/g, ' ') : 'Goes out', waits ? 'the draft waits for you' : ''].filter(Boolean).join(' · '), product: '', work: null, task: null, own: null, jira: false, canFix: false, editable: false,
|
|
227
256
|
scope: [], act: waits ? { label: 'Read the draft', href: '/premium-intelligence.html?tab=library' } : null });
|
|
228
257
|
}
|
|
@@ -274,7 +303,7 @@ function build(input = {}) {
|
|
|
274
303
|
return declined.has(sig) ? null : { ...s, sig };
|
|
275
304
|
};
|
|
276
305
|
// a Jira date or a plan end: Events keeps the PM's answer (met, gone), or the PM asks the owner
|
|
277
|
-
const owner = (r) => (r && r.owner && !MINE.test(String(r.owner).trim()) ? clip(r.owner, 40) : 'the owner');
|
|
306
|
+
const owner = (r) => (r && r.owner && !MINE.test(String(r.owner).trim()) ? clip(personName(r.owner), 40) : 'the owner');
|
|
278
307
|
const askHolds = (x, r, why) => { const who = owner(r), d = shortDay(x.date, today); return say(x, { op: 'ask', ask: 'Ask ' + who + ' if ' + d + ' holds: ' + x.title, text: 'Ask ' + who + ' if ' + d + ' holds', why }); };
|
|
279
308
|
const noWrite = (x, r) => {
|
|
280
309
|
if (x.group === 'late') {
|
|
@@ -295,7 +324,7 @@ function build(input = {}) {
|
|
|
295
324
|
if (x.kind === 'deadline') {
|
|
296
325
|
if (x.group !== 'late') continue;
|
|
297
326
|
if (-x.days >= DROP_DAYS) { x.suggest = say(x, { op: 'gone', text: 'Drop this date', why: 'It is ' + (-x.days) + ' days past, and no source names a new one.' }); continue; }
|
|
298
|
-
const who = x.who ? clip(x.who, 40) : 'them';
|
|
327
|
+
const who = x.who ? clip(personName(x.who), 40) : 'them';
|
|
299
328
|
x.suggest = say(x, { op: 'ask', ask: 'Ask ' + who + ' where it stands: ' + x.title, text: 'Ask ' + who + ' where it stands', why: 'The day ' + x.source.from + ' named has passed.' });
|
|
300
329
|
continue;
|
|
301
330
|
}
|
|
@@ -347,6 +376,13 @@ function build(input = {}) {
|
|
|
347
376
|
x.suggest = askHolds(x, x.row, 'The work is at risk.');
|
|
348
377
|
}
|
|
349
378
|
}
|
|
379
|
+
// the old report drafts: one suggestion for all of them. ✓ marks each one dropped (Events stops listing it; the files stay), with Undo
|
|
380
|
+
for (const x of items) {
|
|
381
|
+
if (!x.oldDrafts) continue;
|
|
382
|
+
const sig = 'drafts:old|gone|' + x.oldDrafts.length;
|
|
383
|
+
x.suggest = declined.has(sig) ? null : { op: 'gone', keys: x.oldDrafts.slice(), text: 'Drop them', why: 'None was issued, and the newest is more than ' + DRAFT_OLD_DAYS + ' days old. The files stay in the Library.', sig };
|
|
384
|
+
delete x.oldDrafts;
|
|
385
|
+
}
|
|
350
386
|
|
|
351
387
|
const ORDER = { late: 0, today: 1, coming: 2, later: 3 };
|
|
352
388
|
// Late: the newest first, so the dates you can still save come before the old ones. A day: the dates with no time first, then by time
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* pmos mention stands <id> --settled "<line>"… [--open "<line>"…] "Where it stands": what is settled and what is still open
|
|
8
8
|
* pmos mention watch <id> --what "<Samuel’s tag>" --text "<the offer>" [--due <ISO>] offer to watch for a dated promise (the PM ✓ or ×)
|
|
9
9
|
* pmos mention landed <id> --text "<Samuel’s tag landed.>" the watched promise landed: the opening line says so once
|
|
10
|
+
* pmos mention looks <id> --who "<name>" --text "<their line>" [--on <ISO>] someone else may have answered: the line, quoted
|
|
10
11
|
* <id> is a conversation's id (pmos mention list prints it). Claude runs `draft` from the chat where the PM changes a reply ("Reply to
|
|
11
12
|
* Arif"), and the rest after a source read: the Viewer shows each on its next read. Every mark is one line in
|
|
12
13
|
* <runtime>/mentions/marks.jsonl with by: agent. This command posts nothing: the PM sends the reply where the mention is. */
|
|
@@ -15,9 +16,9 @@ const path = require('path');
|
|
|
15
16
|
const stateRoot = require('./state-root');
|
|
16
17
|
const store = require('./mention-store.js');
|
|
17
18
|
|
|
18
|
-
const COMMANDS = { mention: ['list', 'draft', 'gist', 'nodraft', 'stands', 'watch', 'landed'] };
|
|
19
|
+
const COMMANDS = { mention: ['list', 'draft', 'gist', 'nodraft', 'stands', 'watch', 'landed', 'looks'] };
|
|
19
20
|
const USAGE = [
|
|
20
|
-
'usage: pmos mention list|draft|gist|nodraft|stands|watch|landed — Home\'s Mentions',
|
|
21
|
+
'usage: pmos mention list|draft|gist|nodraft|stands|watch|landed|looks — Home\'s Mentions',
|
|
21
22
|
' pmos mention list the conversations: Your move, To read, Answered this week',
|
|
22
23
|
' pmos mention draft <id> --text "<reply>" change the proposed reply of one conversation (or --file <path|->)',
|
|
23
24
|
' pmos mention gist <id> --text "<one line>" the row\'s line: where the conversation stands',
|
|
@@ -25,6 +26,7 @@ const USAGE = [
|
|
|
25
26
|
' pmos mention stands <id> --settled "<line>" [--settled …] [--open "<line>" …] what is settled and what is open',
|
|
26
27
|
' pmos mention watch <id> --what "<Samuel’s tag>" --text "<the offer>" [--due <ISO>] offer to watch for a dated promise',
|
|
27
28
|
' pmos mention landed <id> --text "<Samuel’s tag landed.>" the watched promise landed',
|
|
29
|
+
' pmos mention looks <id> --who "<name>" --text "<their line>" [--on <ISO>] someone else may have answered: quote the line',
|
|
28
30
|
' every command: [--json]',
|
|
29
31
|
'This command never posts. You send the reply where the mention is.',
|
|
30
32
|
];
|
|
@@ -84,9 +86,10 @@ function run(argv, { say = console.log, env = process.env, stateDir, cwd = proce
|
|
|
84
86
|
const body = { id: conv.id, act: sub === 'watch' ? 'offer' : sub, text };
|
|
85
87
|
if (sub === 'watch') { body.what = a.what; if (a.due) body.due = a.due; }
|
|
86
88
|
if (sub === 'stands') { body.settled = a.settled || []; body.open = a.open || []; }
|
|
89
|
+
if (sub === 'looks') { if (a.who) body.who = a.who; if (a.on) body.on = a.on; }
|
|
87
90
|
const r = store.mark(dir, body, now(), 'agent');
|
|
88
91
|
if (!r.ok) { out(r, `✗ refused: ${r.error}`); return 1; }
|
|
89
|
-
const SAID = { draft: 'the proposed reply', gist: 'the gist', nodraft: 'why there is no draft', stands: 'Where it stands', watch: 'the watch offer', landed: 'that the promise landed' };
|
|
92
|
+
const SAID = { draft: 'the proposed reply', gist: 'the gist', nodraft: 'why there is no draft', stands: 'Where it stands', watch: 'the watch offer', landed: 'that the promise landed', looks: 'the line that may answer it' };
|
|
90
93
|
out({ ok: true, id: conv.id }, `saved ${SAID[sub]} of ${conv.id}. The Mentions Viewer shows it${sub === 'draft' ? '; you send it where the mention is' : ''}.`);
|
|
91
94
|
return 0;
|
|
92
95
|
}
|
|
@@ -44,11 +44,14 @@ const MENTION_SOURCES = Object.freeze(['slack', 'jira', 'confluence', 'mail']);
|
|
|
44
44
|
const VIAS = Object.freeze(['at', 'dm', 'name']);
|
|
45
45
|
const NAME_SOURCES = new Set(['slack', 'mail']); // where a plain name, with no @, counts (Jira and Confluence mention by handle)
|
|
46
46
|
const ACTS = Object.freeze(['answered', 'notask', 'snooze', 'task', 'keep', 'drafted', 'draft', 'read', 'closed', 'undo',
|
|
47
|
-
'gist', 'nodraft', 'stands', 'offer', 'watch', 'nowatch', 'landed']);
|
|
47
|
+
'gist', 'nodraft', 'stands', 'offer', 'watch', 'nowatch', 'landed', 'reopen', 'looks']);
|
|
48
48
|
// what Undo never takes back: opening, a task closed by a reply, and what Claude wrote (the reply, the gist, why no draft, Where it stands,
|
|
49
49
|
// the watch offer and its landing)
|
|
50
|
-
const NOT_UNDONE = new Set(['read', 'draft', 'closed', 'gist', 'nodraft', 'stands', 'offer', 'landed']);
|
|
51
|
-
|
|
50
|
+
const NOT_UNDONE = new Set(['read', 'draft', 'closed', 'gist', 'nodraft', 'stands', 'offer', 'landed', 'looks']);
|
|
51
|
+
// looks: "someone else may have answered" with the quoted line (round 3 point 10d). The morning brief writes it (step 5b, `pmos mention
|
|
52
|
+
// looks`, the PM's yes of 2026-11-19); the row drops to Can wait with ✓ ✕ and nothing closes until the PM says so.
|
|
53
|
+
const AGENT_ACTS = new Set(['draft', 'gist', 'nodraft', 'stands', 'offer', 'landed', 'looks']);
|
|
54
|
+
const STILL_DAYS = 21; // an ask with no move this long asks "Still needed?" once (round 3 point 10g)
|
|
52
55
|
const DAY = 86400000;
|
|
53
56
|
const KEEP_DAYS = 14; // a mention that stopped waiting is kept this long (Last 7 days shows 7 of them)
|
|
54
57
|
const MAX_WAIT_DAYS = 365; // an ask older than this is dropped, waiting or not
|
|
@@ -110,6 +113,11 @@ function entryOf(x, source, ref, o = {}) {
|
|
|
110
113
|
if (/^https:\/\/\S+$/i.test(String(x.link || '')) && String(x.link).length <= 500) e.link = x.link;
|
|
111
114
|
if (typeof x.initiative_id === 'string' && x.initiative_id) e.initiative = x.initiative_id;
|
|
112
115
|
if (x.replied === true) { e.replied = true; e.replied_seen = e.seen; }
|
|
116
|
+
// the self check from records (round 3 point 10b): the ticket or page it points to closed or resolved; the asker took the ask back
|
|
117
|
+
const st = String(x.status || '').trim();
|
|
118
|
+
if (x.closed === true || /^(done|closed|resolved|won'?t do|cancell?ed|complete[d]?)$/i.test(st)) { e.closed = true; e.closed_seen = e.seen; if (st) e.closed_as = clip(st, 40); }
|
|
119
|
+
else if (x.closed === false || st) e.closed = false; // a ticket that opened again
|
|
120
|
+
if (x.withdrawn === true) { e.withdrawn = true; e.withdrawn_seen = e.seen; }
|
|
113
121
|
const via = o.via || (VIAS.includes(x.via) ? x.via : '');
|
|
114
122
|
if (via) e.via = via;
|
|
115
123
|
return e;
|
|
@@ -171,6 +179,7 @@ function merge(old, nu) {
|
|
|
171
179
|
out.thread = th.slice(-8);
|
|
172
180
|
// the read said the PM replied: every ask up to that read is answered (a later ask makes it wait again)
|
|
173
181
|
if (nu.replied) { out.replied = true; out.replied_seen = nu.seen; }
|
|
182
|
+
if (nu.closed === false) { delete out.closed_seen; delete out.closed_as; }
|
|
174
183
|
return out;
|
|
175
184
|
}
|
|
176
185
|
|
|
@@ -248,6 +257,13 @@ function mark(rt, b, now = new Date(), by = 'pm') {
|
|
|
248
257
|
if (Number.isFinite(d)) line.due = new Date(d).toISOString();
|
|
249
258
|
}
|
|
250
259
|
}
|
|
260
|
+
if (b.act === 'looks') { // the quoted line that may answer it, and who wrote it
|
|
261
|
+
if (typeof b.text !== 'string' || !b.text.trim()) return { ok: false, error: 'text is the line that answers it, quoted from the thread' };
|
|
262
|
+
if (b.text.trim().length > 200) return { ok: false, error: 'text is over 200 characters: quote the one line' };
|
|
263
|
+
line.text = b.text.trim();
|
|
264
|
+
if (b.who) line.who = clip(b.who, 80);
|
|
265
|
+
const t = b.on ? Date.parse(b.on) : NaN; if (Number.isFinite(t)) line.on = new Date(t).toISOString();
|
|
266
|
+
}
|
|
251
267
|
if (b.act === 'stands') {
|
|
252
268
|
const list = (v) => (Array.isArray(v) ? v : v == null ? [] : [v]).map((t) => (typeof t === 'string' ? t.replace(/\s+/g, ' ').trim() : '')).filter(Boolean);
|
|
253
269
|
const settled = list(b.settled), open = list(b.open);
|
|
@@ -351,7 +367,7 @@ function marksFor(ids, mks) {
|
|
|
351
367
|
/** One conversation judged: waiting or not, since when, how many asks, what covered them, and whether a message came after the cover. Pure. */
|
|
352
368
|
function judgeConv(list, mk, now, me) {
|
|
353
369
|
const askT = [], meT = [], other = [];
|
|
354
|
-
let repSeen = 0, ask = false;
|
|
370
|
+
let repSeen = 0, closedSeen = 0, wdSeen = 0, ask = false;
|
|
355
371
|
for (const e of list) {
|
|
356
372
|
const th = e.thread || [];
|
|
357
373
|
for (const m of th) { const t = T(m.at); if (!t) continue; (isMe(m.who, me) ? meT : other).push(t); }
|
|
@@ -364,13 +380,18 @@ function judgeConv(list, mk, now, me) {
|
|
|
364
380
|
if (by.length) askT.push(...by); else if (own) askT.push(own);
|
|
365
381
|
}
|
|
366
382
|
if (e.replied) repSeen = Math.max(repSeen, T(e.replied_seen));
|
|
383
|
+
if (e.closed && e.closed_seen) closedSeen = Math.max(closedSeen, T(e.closed_seen));
|
|
384
|
+
if (e.withdrawn && e.withdrawn_seen) wdSeen = Math.max(wdSeen, T(e.withdrawn_seen));
|
|
367
385
|
}
|
|
368
386
|
askT.sort((a, b) => a - b);
|
|
369
387
|
const lastMe = meT.length ? Math.max(...meT) : 0;
|
|
370
388
|
// the read's replied: true covers every ask the store knew when that read came
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
const
|
|
389
|
+
const upTo = (seen) => { const b = seen ? askT.filter((t) => t <= seen + 1) : []; return b.length ? Math.max(...b) : 0; };
|
|
390
|
+
// what the records prove covers the ask (round 3 point 10c); Undo of one (reopen) sets aside every such proof up to that press
|
|
391
|
+
const reopened = mk.reopen ? T(mk.reopen.at) : 0;
|
|
392
|
+
const auto = (t) => (t && t > reopened ? t : 0);
|
|
393
|
+
const cover = [['replied', auto(Math.max(lastMe, upTo(repSeen)))], ['closed', auto(upTo(closedSeen))], ['withdrawn', auto(upTo(wdSeen))],
|
|
394
|
+
['answered', mk.answered ? T(mk.answered.at) : 0], ['notask', mk.notask ? T(mk.notask.at) : 0], ['task', mk.task ? T(mk.task.at) : 0]];
|
|
374
395
|
const upto = Math.max(...cover.map((c) => c[1]));
|
|
375
396
|
const how = upto ? cover.filter((c) => c[1] === upto)[0][0] : '';
|
|
376
397
|
const pending = askT.filter((t) => t > upto);
|
|
@@ -380,7 +401,8 @@ function judgeConv(list, mk, now, me) {
|
|
|
380
401
|
const last = Math.max(lastOther, lastMe, ...['answered', 'notask', 'task'].map((k) => (mk[k] ? T(mk[k].at) : 0)));
|
|
381
402
|
// answered, and someone wrote since without asking again: it comes back to To read, "New since your reply"
|
|
382
403
|
const sinceReply = ask && !pending.length && upto > 0 && lastOther > upto;
|
|
383
|
-
return { ask, waiting, snoozed: !!snoozed, since: pending.length ? pending[0] : 0, count: pending.length, last, lastOther, how: ask && !pending.length ? how : '', sinceReply
|
|
404
|
+
return { ask, waiting, snoozed: !!snoozed, since: pending.length ? pending[0] : 0, count: pending.length, last, lastOther, how: ask && !pending.length ? how : '', sinceReply,
|
|
405
|
+
upto, lastAsk: askT.length ? askT[askT.length - 1] : 0, closedSeen, wdSeen };
|
|
384
406
|
}
|
|
385
407
|
|
|
386
408
|
/** The newest of an entry field and a mark by Claude: { text, at } or null. */
|
|
@@ -425,7 +447,21 @@ function convRow(id, list, j, mk, reads, now, me) {
|
|
|
425
447
|
if (nd) r.nodraft = nd; else if (d) r.draft = d.text;
|
|
426
448
|
for (const k of ['found', 'why', 'send_to']) { const e = [...byT].reverse().find((x) => x[k]); if (e) r[k] = e[k]; }
|
|
427
449
|
if (mk.drafted && T(mk.drafted.at) >= j.since) r.drafted = mk.drafted.to || true;
|
|
428
|
-
|
|
450
|
+
// Still needed? (round 3 point 10g): an ask with no move for STILL_DAYS asks once; ✕ (keep) stops it until the thread moves again
|
|
451
|
+
const kept = mk.keep ? T(mk.keep.at) : 0;
|
|
452
|
+
if (j.waiting && j.since && now - Math.max(j.last, j.since) >= STILL_DAYS * DAY && !(kept && kept >= j.lastOther)) r.check = true;
|
|
453
|
+
// the proof the self check found (round 3 point 10c, 10f): what closed it, from the records only
|
|
454
|
+
if (!j.waiting && ['replied', 'closed', 'withdrawn'].includes(j.how)) {
|
|
455
|
+
const mine = msgs.filter((m) => m.me && T(m.at) && T(m.at) <= j.upto + 1).pop() || msgs.filter((m) => m.me).pop();
|
|
456
|
+
const by = (byT.find((e) => e.closed_as) || {}).closed_as;
|
|
457
|
+
r.proof = j.how === 'replied' ? { how: 'replied', at: mine && mine.at ? mine.at : new Date(j.upto).toISOString(), text: mine ? clip(mine.text, 160) : '' }
|
|
458
|
+
: j.how === 'closed' ? { how: 'closed', at: new Date(j.closedSeen).toISOString(), text: by || 'closed' }
|
|
459
|
+
: { how: 'withdrawn', at: new Date(j.wdSeen).toISOString(), text: latest && !latest.me ? clip(latest.text, 160) : '' };
|
|
460
|
+
r.auto = true;
|
|
461
|
+
}
|
|
462
|
+
// Looks answered (round 3 point 10d): someone else may have answered; the line is quoted. It stands until the asker writes again or ✕ keeps it
|
|
463
|
+
const lk = mk.looks || null;
|
|
464
|
+
if (j.waiting && lk && T(lk.at) >= j.lastAsk && !(kept && kept >= T(lk.at))) r.looks = { text: lk.text, who: lk.who || '', on: lk.on || null, at: lk.at };
|
|
429
465
|
if (mk.stands && mk.stands.settled && mk.stands.settled.length) r.stands = { settled: mk.stands.settled, open: mk.stands.open || [] };
|
|
430
466
|
// the watch: Claude offers it (✓ ×); accepted, the opening line says so until the promise lands, then once that it landed
|
|
431
467
|
const off = mk.offer || null, at = (k) => (mk[k] ? T(mk[k].at) : 0);
|
|
@@ -506,7 +542,10 @@ function view(rt, o = {}) {
|
|
|
506
542
|
if (as_of && T(as_of) < day0.getTime()) gaps.push({ kind: 'stale', upto: as_of });
|
|
507
543
|
// the sources a read reached, so the opening line can say "Nothing waits on you in Slack or Jira" when one is missing (MnA6)
|
|
508
544
|
const sources = Object.values(o.reads || {}).filter((r) => r && MENTION_SOURCES.includes(r.source) && r.state === 'read').map((r) => r.source);
|
|
509
|
-
|
|
545
|
+
// when each source was last read: the self check says "Checked 08:10" per conversation, or that its source was not read (round 3 point 10f)
|
|
546
|
+
const reads_at = {};
|
|
547
|
+
for (const r of Object.values(o.reads || {})) if (r && MENTION_SOURCES.includes(r.source) && r.state === 'read' && T(r.read_at) > T(reads_at[r.source])) reads_at[r.source] = new Date(T(r.read_at)).toISOString();
|
|
548
|
+
return { ok: true, ...B, count: B.waiting.length, gaps, as_of, sources, reads_at, now: new Date(now).toISOString() };
|
|
510
549
|
}
|
|
511
550
|
|
|
512
551
|
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 } };
|
|
@@ -95,7 +95,8 @@ function readSchedules(now) {
|
|
|
95
95
|
if (!cadence) continue;
|
|
96
96
|
const next = logic.nextRun(s, now);
|
|
97
97
|
if (!next) continue;
|
|
98
|
-
|
|
98
|
+
const at = new Date(next);
|
|
99
|
+
out.push({ id: String(s.id || s.name || cadence), name: s.name || '', cadence, next: localDay(at), time: `${pad(at.getHours())}:${pad(at.getMinutes())}` });
|
|
99
100
|
}
|
|
100
101
|
return out;
|
|
101
102
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.615.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.615.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED