create-pmos 0.591.0 → 0.593.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 -27
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/changelog.json +26 -0
- package/workspace/guide/agent-capabilities.md +24 -12
- package/workspace/guide/cli.md +2 -2
- package/workspace/lib/autonomy.js +3 -0
- package/workspace/lib/idle-lab.js +17 -5
- package/workspace/lib/lab-cli.js +8 -6
- package/workspace/lib/live-round.js +351 -68
- package/workspace/lib/proposals.js +46 -2
- package/workspace/lib/proto-runtime.js +104 -0
- package/workspace/lib/routes-briefing-premium.js +33 -16
- package/workspace/lib/routes-lab.js +73 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-home.css +8 -0
- package/workspace/public/pm/cozy-lab.js +15 -7
- package/workspace/public/pm/cozy-proto.css +143 -0
- package/workspace/public/pm/cozy-proto.js +474 -0
- package/workspace/public/pm/home-app.js +2 -0
- package/workspace/public/pm/home-chat.js +39 -5
- package/workspace/server.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.593.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.593.0",
|
|
38
|
+
"at": "2026-11-18T01:08:15.346Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1331,
|
|
43
|
+
"t": "The newest prototype version is the initiative's prototype, and the chat knows it",
|
|
44
|
+
"s": "The newest prototype version is the initiative's prototype, and the chat knows it",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"v": "0.592.0",
|
|
51
|
+
"at": "2026-11-17T16:29:19.409Z",
|
|
52
|
+
"f": 4,
|
|
53
|
+
"prs": [
|
|
54
|
+
{
|
|
55
|
+
"n": 1329,
|
|
56
|
+
"t": "Prototype by chatting, one canvas with its flow, swimlane and copy",
|
|
57
|
+
"s": "Prototype by chatting, one canvas with its flow, swimlane and copy",
|
|
58
|
+
"k": "new"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
36
62
|
{
|
|
37
63
|
"v": "0.591.0",
|
|
38
64
|
"at": "2026-11-17T14:18:25.456Z",
|
|
@@ -272,32 +298,6 @@
|
|
|
272
298
|
"k": "fix"
|
|
273
299
|
}
|
|
274
300
|
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"v": "0.573.0",
|
|
278
|
-
"at": "2026-11-16T04:53:10.251Z",
|
|
279
|
-
"f": 4,
|
|
280
|
-
"prs": [
|
|
281
|
-
{
|
|
282
|
-
"n": 1304,
|
|
283
|
-
"t": "The kill switch reaches open factory PRs; clearer build help, policy and next",
|
|
284
|
-
"s": "The kill switch reaches open factory PRs; clearer build help, policy and next",
|
|
285
|
-
"k": "fix"
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"v": "0.572.0",
|
|
291
|
-
"at": "2026-11-16T04:39:30.480Z",
|
|
292
|
-
"f": 4,
|
|
293
|
-
"prs": [
|
|
294
|
-
{
|
|
295
|
-
"n": 1305,
|
|
296
|
-
"t": "A Project's dated tasks with a ◇ milestone are its dated plan",
|
|
297
|
-
"s": "A Project's dated tasks with a ◇ milestone are its dated plan",
|
|
298
|
-
"k": "new"
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
301
|
}
|
|
302
302
|
]
|
|
303
303
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
kernel-source: pmos@
|
|
2
|
-
assembled: 2026-11-
|
|
1
|
+
kernel-source: pmos@a59cfcc4
|
|
2
|
+
assembled: 2026-11-18
|
|
3
3
|
mode: vendor
|
|
@@ -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-18T01:08:11Z"}
|
|
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-18T01:08:11Z"}
|
|
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-18T01:08:11Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/payload/state/log.md
CHANGED
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.593.0",
|
|
4
|
+
"at": "2026-11-18T01:08:15.346Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1331,
|
|
9
|
+
"t": "The newest prototype version is the initiative's prototype, and the chat knows it",
|
|
10
|
+
"s": "The newest prototype version is the initiative's prototype, and the chat knows it",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"v": "0.592.0",
|
|
17
|
+
"at": "2026-11-17T16:29:19.409Z",
|
|
18
|
+
"f": 4,
|
|
19
|
+
"prs": [
|
|
20
|
+
{
|
|
21
|
+
"n": 1329,
|
|
22
|
+
"t": "Prototype by chatting, one canvas with its flow, swimlane and copy",
|
|
23
|
+
"s": "Prototype by chatting, one canvas with its flow, swimlane and copy",
|
|
24
|
+
"k": "new"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
2
28
|
{
|
|
3
29
|
"v": "0.591.0",
|
|
4
30
|
"at": "2026-11-17T14:18:25.456Z",
|
|
@@ -192,23 +192,35 @@ Not proven yet: the compare view's Production and Design columns stay left out u
|
|
|
192
192
|
|
|
193
193
|
## The live round
|
|
194
194
|
|
|
195
|
-
You can ask to see an idea at any moment: alone while you work on an initiative, or with stakeholders in the room.
|
|
196
|
-
|
|
197
|
-
1. **Ask in the initiative's chat.** Say, for example, "
|
|
198
|
-
2. **
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
You can ask to see an idea at any moment: alone while you work on an initiative, or with stakeholders in the room. It works like design work with Claude Code: you say what you want, PMOS makes or changes the one prototype, the Viewer shows it, and the chat says what changed.
|
|
196
|
+
|
|
197
|
+
1. **Ask in the initiative's chat.** Say, for example, "prototype this" or "mock this up". PMOS starts one prototype at once. Nothing to press. It opens in the Viewer beside the chat as soon as it opens and renders in a headless browser, in about a minute. The chat answers with a **Version 1** tag and says what was made and for whom. Tap a Version tag to show that version again.
|
|
198
|
+
2. **The Viewer is one canvas.** Three cards update together, and the page copy opens beside them:
|
|
199
|
+
- **The prototype**, in a phone frame or a desktop browser frame (the Phone and Desktop presses in the toolbar).
|
|
200
|
+
- **The flow**: screens as cards, decisions as diamonds, and branches to the other scenarios. The main scenario is one row, side branches sit in rows under it, and lines going back run above or under the boxes, so no line crosses a box or a label. Tap a screen to see that moment on the prototype. Tap a side branch to play that scenario.
|
|
201
|
+
- **Page copy** (the Page copy press in the toolbar, closed by default): every word on the screen, in a side panel. Edit a line in place, and the prototype changes as you type. PMOS keeps the edit with the version, and the next version keeps it.
|
|
202
|
+
- **Who does what**: a swimlane with arrows between the steps. Tap a step to see it on the prototype. A card that the last version changed says **Updated**. Zoom out, zoom in and fit are in the toolbar.
|
|
203
|
+
3. **Change it in one sentence.** For example, "make the alert orange". PMOS makes the next version of the prototype and its flow, swimlane and copy, and the chat says what changed, then "Also updated: step 3, the swimlane and the copy". ‹ › in the toolbar walks the versions. On an older version, **Back to latest** returns, and **Continue from version n** makes your next change start from that version.
|
|
204
|
+
4. **Point, then say.** Press Point (S) and tap an element in the prototype. It goes into the chat box as a chip, for example "Screen list". Your next sentence changes that element. Sliders for that element (spacing, corner radius, colour) show under the prototype: they change it at once, with no chat round, and PMOS keeps them with the version.
|
|
205
|
+
5. **Comment.** Press Comment (C) and tap an element. Write the comment, then send it to PMOS as the next change, or keep it for the team. A kept comment stays pinned, with **Make this change** beside it.
|
|
206
|
+
6. **Draw or attach an image.** Press Draw (D), sketch over the prototype, then attach the sketch. It goes with your next message. An image you attach does the same. PMOS builds from it (its layout, hierarchy and colours) unless your words say otherwise, for example "only the colours".
|
|
207
|
+
7. **Play.** Press Play to run the prototype full size through a scenario of the flow. Tap where the user would tap. A tap that misses shows where to tap. Restart and Close are above it. Ask in the chat for another scenario.
|
|
208
|
+
8. **Several versions only when you ask.** Say "show me 3 ways" (or "two options"). PMOS picks that many directions and shows them in a tray. Tap one to preview it, then keep it (✓) or close the tray (✕).
|
|
209
|
+
9. **The initiative's prototype.** The newest version made from the chat is the initiative's prototype: the **Prototype** document of the initiative and the kept specimen on its Experiment card. Your edits in the Viewer are part of that version. Earlier versions stay in ‹ ›. PMOS never keeps a round by itself. A round of several ways, or one started from a terminal (a test), becomes the prototype only when you keep it with ✓ in the Viewer; the grill then runs once on it. ✕ drops a round, and you can say why.
|
|
210
|
+
10. **The chat knows the prototype.** Every message in the initiative's chat tells PMOS which version is current, where its files are, and the one command that makes the next version. So "Improve the prototype based on the PRD" or "Rebuild A from this list" makes the next version in the Viewer. The chat never writes a loose HTML file.
|
|
202
211
|
|
|
203
212
|
What each part does:
|
|
204
213
|
|
|
205
|
-
-
|
|
206
|
-
- **What the run
|
|
207
|
-
- **What the run
|
|
208
|
-
- **
|
|
214
|
+
- **The design sprint runs silently.** Each run works out from the initiative who the prototype is for and the one question it must answer, uses real content from the initiative, and keeps the fidelity just real enough to react to. None of that is a step you fill in. PMOS only recommends, as one ✦ on the canvas, for example "Try it on 3 to 5 people it is for", with a test link to copy.
|
|
215
|
+
- **What the run makes.** One run makes the prototype first, then the flow (`flow.json`), who does what (`lanes.json`) and the sliders (`tweaks.json`). PMOS reads the page copy (`copy.json`) from the prototype's own words, so the two always agree. A file that is not well formed is "not made" with the reason, and the prototype still shows.
|
|
216
|
+
- **What the run gets.** Each run gets the product's token sheet and the start of its component sheet (or PMOS's own), the initiative's name and the product's Intent, the files you attached, the element you pointed at, and your copy edits and sliders. A prototype must fit a 390 px phone screen.
|
|
217
|
+
- **What the run can do.** A run can only read and write in its own folder in the runtime folder, plus the last version and the files you attached. It has no shell, no web and nothing that sends. Nothing goes into a product repository before your ✓.
|
|
218
|
+
- **What the canvas can do.** The prototype runs in a sandboxed frame. It cannot reach PMOS. The canvas talks to it only to show a screen, point, pin, play and apply your edits.
|
|
219
|
+
- **A version that does not render,** or that takes more than 2 minutes, is "not made" with the reason, and the chat says so.
|
|
220
|
+
- **Lessons.** Each change sentence, ✓ and ✕ is a Lessons line of the experiment (`pmos artefacts show`). Each version that rendered is a Specimens line. The one you keep is the kept specimen.
|
|
209
221
|
- **The grill runs after the session, not during it.** When you keep a version, the grill runs once on the kept specimen, as the Review step. Its findings wait under the ✦ (D60 as amended on 2026-11-17).
|
|
210
222
|
- **Order.** A live round is step 1 of the queue: what you asked for starts at once. While it runs, the idle lab does not start on that initiative. The idle lab treats a live round as one more round, so the rounds stay in one history.
|
|
211
|
-
- **Without the chat.** `pmos lab round` does the same from a terminal (see the [Command reference](cli.md)).
|
|
223
|
+
- **Without the chat.** `pmos lab round` does the same from a terminal (see the [Command reference](cli.md)); with `--propose` it files a ✦ ask that your ✓ starts, the way the meeting companion offers one.
|
|
212
224
|
|
|
213
225
|
## The idle lab: where its results wait
|
|
214
226
|
|
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-17
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Command reference
|
|
@@ -231,7 +231,7 @@ The idle lab run uses only the first three commands:
|
|
|
231
231
|
- `pmos lab page <url>`: a scan run reads one public page. PMOS refuses a private or local address and keeps the page text, so a quote can be checked.
|
|
232
232
|
- `pmos lab file <group> --json -`: a run files one result. It waits until the run ends and the proof passes.
|
|
233
233
|
- `pmos lab status`: in a run, what it filed. Outside a run, this month's idle lab runs and spend.
|
|
234
|
-
- `pmos lab round <initiative> --brief "<what to show>" [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--ws <id>]`: a live round. PMOS
|
|
234
|
+
- `pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--ws <id>]`: a live round. With `--one`, PMOS makes one version with its flow, swimlane and copy, and shows it on the Viewer's canvas as soon as it renders; without it, PMOS starts three runs at once, one version each, side by side. With `--base B`, PMOS makes one new round of B from the brief. With `--propose`, PMOS files the ✦ ask instead, and your ✓ starts it. With `--chat`, the initiative chat started it: the chat is told when the version renders, and the version becomes the initiative's prototype (a round from a terminal without it waits for your ✓). A background lab run cannot use this command. See [The live round](agent-capabilities.md).
|
|
235
235
|
|
|
236
236
|
### pmos outcomes: expected outcomes
|
|
237
237
|
|
|
@@ -122,6 +122,9 @@ function classOfProposal(p) {
|
|
|
122
122
|
if (p.group === 'outcome' && p.type === 'refuted') return 'C';
|
|
123
123
|
// D108 as amended 2026-11-16 (Wawan: "Open them automatically"): the factory's pull request opens by itself, from the server (never the
|
|
124
124
|
// Builder's run), and Undo closes it. The guardrail and CI decide merge or review. `pmos ai off` or a demotion returns it to the ✓.
|
|
125
|
+
// a live round's prototype (lib/live-round.js, data.live) is the PM's to keep: PMOS never keeps one by itself (2026-11-18: a test round it
|
|
126
|
+
// kept became the initiative's design). The newest version is the prototype anyway (lib/proposals.js currentOf).
|
|
127
|
+
if ((p.group === 'prototyped' || p.group === 'improved') && isObj(p.data) && isObj(p.data.live)) return 'C';
|
|
125
128
|
if (p.group === 'build') return 'B'; // stopping or replacing an experiment is the PM's call (launch simulation W2)
|
|
126
129
|
// a maybe, or a duplicate already in another initiative (type link, or an item with `other`), is a question for the PM, not a change
|
|
127
130
|
// found type stage moves the initiative's stage: a stage move is C (as the Driver's `move`)
|
|
@@ -254,7 +254,9 @@ function compareOf(P, id, { key = '', titleOf = () => '', proven = PROVEN } = {}
|
|
|
254
254
|
const k = p.group === 'improved' ? p.data.base : (specs.find((s) => s.key === key) || specs[0] || {}).key || '';
|
|
255
255
|
const spec = specs.find((s) => s.key === k) || null;
|
|
256
256
|
const file = p.group === 'improved' ? p.data.file : spec && spec.file;
|
|
257
|
-
|
|
257
|
+
const making = !!(p.data && p.data.live && (p.data.live.slots || []).some((s) => s.state === 'working' || s.state === 'proving'));
|
|
258
|
+
// a live round still being made is readable before its file lands (the Viewer opens on it and reads again until it renders)
|
|
259
|
+
if (!file && !(p.data && p.data.live && (p.group === 'prototyped' || making))) return null;
|
|
258
260
|
const round = p.group === 'improved' ? p.data.round : 1;
|
|
259
261
|
const c = (p.data && p.data.compare) || {};
|
|
260
262
|
const cols = [];
|
|
@@ -270,17 +272,27 @@ function compareOf(P, id, { key = '', titleOf = () => '', proven = PROVEN } = {}
|
|
|
270
272
|
: { id: 'production', title: 'Production', left: 'Left out: PMOS cannot render production from the product repo yet. It shows here once that is proven.' });
|
|
271
273
|
cols.push(proven.design && c.design ? { id: 'design', title: 'Design', meta: 'the design for this screen', file: c.design.file, read: c.design.read }
|
|
272
274
|
: { id: 'design', title: 'Design', left: 'Left out: PMOS cannot read the design from Figma or a canvas yet. It shows here once that is proven.' });
|
|
273
|
-
cols.push({ id: 'prototype', title: 'Prototype', meta: 'round ' + round + (spec ? ' · ' + spec.key : ''), file, read: (p.data && p.data.checked) || '' }
|
|
275
|
+
cols.push(file ? { id: 'prototype', title: 'Prototype', meta: 'round ' + round + (spec ? ' · ' + spec.key : ''), file, read: (p.data && p.data.checked) || '' }
|
|
276
|
+
: { id: 'prototype', title: 'Prototype', left: 'PMOS is still making it.' });
|
|
274
277
|
}
|
|
275
278
|
const shown = new Set(cols.filter((x) => !x.left).map((x) => x.id));
|
|
276
279
|
const pins = (c.pins || []).filter((x) => shown.has(x.vs)).map((x, i) => ({ n: i + 1, vs: x.vs, text: x.text }));
|
|
277
280
|
const history = [];
|
|
278
|
-
for (const r of rounds.slice().reverse()) history.push({ id: r.id, round: r.data.round, at: r.at, state: stateOf(r), meta: r.data.changed || '', current: r.id === p.id });
|
|
281
|
+
for (const r of rounds.slice().reverse()) history.push({ id: r.id, round: r.data.round, at: r.at, state: stateOf(r), meta: r.data.said || r.data.changed || '', current: r.id === p.id });
|
|
279
282
|
if (root) history.push({ id: root.id, round: 1, at: root.at, state: stateOf(root), meta: specs.map((s) => s.key).join(', ') + (specs.length ? ': ' : '') + specs.map((s) => s.title).join(' · '), current: root.id === p.id, keys: specs.map((s) => ({ key: s.key, title: s.title })) });
|
|
280
283
|
const name = titleOf(p.ini) || p.ini;
|
|
281
284
|
const live = !!(p.data && p.data.live);
|
|
282
|
-
|
|
283
|
-
|
|
285
|
+
// what the version says about itself (its <meta name="pmos-changed">, lib/live-round.js saidOf) comes first; else what was asked
|
|
286
|
+
const slot = live && p.group === 'prototyped' ? (p.data.live.slots || []).find((s) => s.key === k) : null;
|
|
287
|
+
const said = p.group === 'improved' ? p.data.said : slot && slot.said;
|
|
288
|
+
const say = said ? said : p.group === 'improved' ? 'Round ' + round + ' of ' + k + ': ' + p.data.changed : live ? 'You asked: "' + one(p.data.live.brief, 200) + '"' : (spec ? spec.title + (spec.caption ? ': ' + spec.caption : '') : '');
|
|
289
|
+
// what this version changed beside the prototype (lib/live-round.js changesOf): the canvas's Updated chips and the chat's "Also updated"
|
|
290
|
+
const upd = p.group === 'improved' && p.data.updated ? p.data.updated : null;
|
|
291
|
+
// the version's companions as data, read by the route next to its file (lib/routes-lab.js), and their state while it is being made
|
|
292
|
+
const slotNow = live ? (p.data.live.slots || []).find((s) => s.key === k) || (p.data.live.slots || [])[0] : null;
|
|
293
|
+
return { ini: p.ini, board: p.board || '', id: p.id, sig: PRsig(p), state: stateOf(p), title: name, round, key: k, say, columns: cols, pins, history,
|
|
294
|
+
...(file ? { file } : {}), ...(upd ? { updated: upd, also: p.data.also || '' } : {}), ...(slotNow && slotNow.parts ? { parts: slotNow.parts } : {}),
|
|
295
|
+
...(live ? { live: true, working: (p.data.live.slots || []).some((s) => s.state === 'working' || s.state === 'proving' || Object.values(s.parts || {}).includes('working')) } : {}) };
|
|
284
296
|
}
|
|
285
297
|
|
|
286
298
|
/** PURE. The initiative's prototype rounds, newest first, open or not: a kept or dropped round stays reachable from the initiative page
|
package/workspace/lib/lab-cli.js
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* pmos lab page <n> [--from <line>] print a page this run already read, from a line
|
|
7
7
|
* pmos lab file <group> --json <file|-> one result of this run. It waits until the run ends; then PMOS proves it and files it under ✦
|
|
8
8
|
* pmos lab status in a run: what this run filed. Outside a run: this month's idle lab runs and spend
|
|
9
|
-
* pmos lab round <ini> --brief "…" [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--ws <id>]
|
|
9
|
+
* pmos lab round <ini> --brief "…" [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--ws <id>]
|
|
10
|
+
* --chat: the initiative chat's own agent started it, so the chat is told when the version renders
|
|
10
11
|
* the live round (lib/live-round.js): the running server starts three runs now, or one on B; --propose
|
|
11
12
|
* files its ✦ ask for the PM's ✓ instead (the initiative chat's way)
|
|
12
13
|
*
|
|
@@ -29,9 +30,9 @@ const USAGE = [
|
|
|
29
30
|
' pmos lab file scanned --json - { "title", "why", "claims": [{ "text", "sources": [{ "page": 1, "line": 12, "quote": "<words on that line>" }] }], "refreshed"? }',
|
|
30
31
|
' pmos lab file scan --json - the same, for a finding that fits no initiative',
|
|
31
32
|
' pmos lab status',
|
|
32
|
-
' pmos lab round <initiative> --brief "<what to show>" [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--ws <id>]',
|
|
33
|
-
' the live round: three versions now (one with
|
|
34
|
-
'
|
|
33
|
+
' pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--ws <id>]',
|
|
34
|
+
' the live round: three versions now (--one: one, with its flow, swimlane and copy; --base B: the next',
|
|
35
|
+
' version of B from the brief), each shown as soon as it renders. --propose files the ✦ ask instead',
|
|
35
36
|
'A specimen must open and render; every claim must quote what was read. What is not proven is dropped. Nothing is sent.',
|
|
36
37
|
];
|
|
37
38
|
const flag = (args, k) => { const i = args.indexOf('--' + k); return i >= 0 ? (args[i + 1] === undefined || args[i + 1].startsWith('--') ? true : args[i + 1]) : undefined; };
|
|
@@ -134,15 +135,16 @@ async function run(argv, { say = (s) => console.log(s), env = process.env, stdin
|
|
|
134
135
|
if (run) { say('✗ a lab run cannot start a live round'); return 1; }
|
|
135
136
|
const ini = args[1] && !args[1].startsWith('--') ? args[1] : '';
|
|
136
137
|
const brief = flag(args, 'brief'), base = flag(args, 'base'), dirs = flag(args, 'dirs'), ws = flag(args, 'ws'), board = flag(args, 'board');
|
|
137
|
-
if (!ini || typeof brief !== 'string' || !brief.trim()) { say('usage: pmos lab round <initiative> --brief "<what to show>" [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--ws <id>]'); return 2; }
|
|
138
|
+
if (!ini || typeof brief !== 'string' || !brief.trim()) { say('usage: pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--ws <id>]'); return 2; }
|
|
138
139
|
if (base !== undefined && !/^[A-C]$/i.test(String(base))) { say('✗ --base is the key of the version to improve: A, B or C'); return 2; }
|
|
139
140
|
if (typeof call !== 'function') { say('✗ no PMOS server answers: start PMOS, then ask again'); return 1; }
|
|
140
141
|
let by = ''; try { by = require('./actor.js').fromCli({ env }).by || ''; } catch { by = ''; }
|
|
141
|
-
const body = { ini, brief: brief.trim(), ...(base ? { base: String(base).toUpperCase() } : {}), ...(typeof dirs === 'string' ? { dirs } : {}), ...(typeof ws === 'string' ? { ws } : {}), ...(typeof board === 'string' ? { board } : {}), ...(flag(args, 'propose') ? { propose: true } : {}), ...(by ? { by } : {}) };
|
|
142
|
+
const body = { ini, brief: brief.trim(), ...(base ? { base: String(base).toUpperCase() } : {}), ...(typeof dirs === 'string' ? { dirs } : {}), ...(typeof ws === 'string' ? { ws } : {}), ...(typeof board === 'string' ? { board } : {}), ...(flag(args, 'propose') ? { propose: true } : {}), ...(flag(args, 'one') ? { one: true } : {}), ...(flag(args, 'chat') ? { from: 'chat' } : {}), ...(by ? { by } : {}) };
|
|
142
143
|
let r = null; try { r = await call('POST', '/api/lab/round', body); } catch { r = null; }
|
|
143
144
|
if (!r) { say('✗ no PMOS server answers: start PMOS, then ask again'); return 1; }
|
|
144
145
|
if (!r.ok) { say('✗ ' + (r.error || 'the round did not start')); return 1; }
|
|
145
146
|
if (body.propose) { say(`✓ filed under the initiative's ✦: ${r.said}. The PM's ✓ starts it.`); return 0; }
|
|
147
|
+
if (body.from === 'chat') { say(`✓ version ${r.round.n} started from ${r.round.directions.map((d) => d.key).join(', ')}. PMOS tells this chat when it is in the Viewer (2 minutes at most). Do not build it yourself.`); return 0; }
|
|
146
148
|
say(`✓ round ${r.round.n} started: ${r.round.directions.map((d) => d.key + ' · ' + d.title).join('; ')}. Each version shows under the initiative's ✦ as soon as it renders (2 minutes at most).`);
|
|
147
149
|
return 0;
|
|
148
150
|
}
|