create-pmos 0.801.0 → 0.803.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 -34
- 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/guide/home.md +1 -1
- package/workspace/guide/layout.md +2 -2
- package/workspace/lib/routes-boards.js +54 -6
- package/workspace/lib/routes-proposals.js +3 -5
- package/workspace/lib/routes-task-plans.js +4 -1
- package/workspace/lib/task-cli.js +9 -7
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-home.css +17 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.803.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.803.0",
|
|
38
|
+
"at": "2026-11-25T02:11:48.085Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1831,
|
|
43
|
+
"t": "Chat input text spans the full width, controls row under it",
|
|
44
|
+
"s": "Chat input text spans the full width, controls row under it",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1828,
|
|
49
|
+
"t": "Every new task gets a stage; tasks with none are placed on the next read",
|
|
50
|
+
"s": "Every new task gets a stage; tasks with none are placed on the next read",
|
|
51
|
+
"k": "fix"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
36
55
|
{
|
|
37
56
|
"v": "0.801.0",
|
|
38
57
|
"at": "2026-11-25T01:53:19.580Z",
|
|
@@ -422,39 +441,6 @@
|
|
|
422
441
|
}
|
|
423
442
|
}
|
|
424
443
|
]
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"v": "0.782.0",
|
|
428
|
-
"at": "2026-11-24T16:18:37.421Z",
|
|
429
|
-
"f": 4,
|
|
430
|
-
"prs": [
|
|
431
|
-
{
|
|
432
|
-
"n": 1767,
|
|
433
|
-
"t": "Sprint retro from PMOS's close numbers, with one tracked change",
|
|
434
|
-
"s": "Sprint retro from PMOS's close numbers, with one tracked change",
|
|
435
|
-
"k": "new",
|
|
436
|
-
"h": "Sprint retro from PMOS's close numbers, with one tracked change",
|
|
437
|
-
"try": {
|
|
438
|
-
"steps": [
|
|
439
|
-
"Open Today and ask the chat: what was the retro of our last sprint?",
|
|
440
|
-
"Then ask: drop that change, or track the in-review one instead"
|
|
441
|
-
],
|
|
442
|
-
"see": "The chat answers with done of total, why work was carried (never started, started, in review, carried twice, added after the start), names one change for the next sprint, and for a sprint whose…"
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"n": 1770,
|
|
447
|
-
"t": "One Undo command for a multi-parent move; test that one Undo restores parent, stage and order (checker findings)",
|
|
448
|
-
"s": "One Undo command for a multi-parent move; test that one Undo restores parent, stage and order (checker findings)",
|
|
449
|
-
"k": "fix"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"n": 1757,
|
|
453
|
-
"t": "Five page layouts and one calm reading view for documents (A334)",
|
|
454
|
-
"s": "Five page layouts and one calm reading view for documents (A334)",
|
|
455
|
-
"k": "new"
|
|
456
|
-
}
|
|
457
|
-
]
|
|
458
444
|
}
|
|
459
445
|
]
|
|
460
446
|
}
|
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-25T02:11:44Z"}
|
|
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-25T02:11:44Z"}
|
|
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-25T02:11:44Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.803.0",
|
|
4
|
+
"at": "2026-11-25T02:11:48.085Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1831,
|
|
9
|
+
"t": "Chat input text spans the full width, controls row under it",
|
|
10
|
+
"s": "Chat input text spans the full width, controls row under it",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1828,
|
|
15
|
+
"t": "Every new task gets a stage; tasks with none are placed on the next read",
|
|
16
|
+
"s": "Every new task gets a stage; tasks with none are placed on the next read",
|
|
17
|
+
"k": "fix"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
2
21
|
{
|
|
3
22
|
"v": "0.801.0",
|
|
4
23
|
"at": "2026-11-25T01:53:19.580Z",
|
package/workspace/guide/home.md
CHANGED
|
@@ -225,7 +225,7 @@ There is no My work page. The list on Today is your list:
|
|
|
225
225
|
- **Recording.** Record a note now, with no calendar event.
|
|
226
226
|
- **Initiative.** Work opens with **New initiative**, in the open product.
|
|
227
227
|
- **Sessions.** A session row names its agent. The coloured dot beside it is its state: blue waits on you, amber may be blocked, green is running. A session PMOS started itself (a skill or a background job) shows on Today only while it works or asks you something. Once it finishes its prompt, it leaves the list. On an initiative's page, a session that waits on you shows once, under **Needs you**, not again under **Sessions**. **Finished sessions** does not list an old run of a chat that is open again.
|
|
228
|
-
- **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. A chat opens at its newest message. If a message cannot be sent, a red **Not sent:** line under the box says why, and your words and files stay in the box. The chat beside a document (Library, an initiative's artefacts) is about that document and reads its file.
|
|
228
|
+
- **One chat box.** Every conversation has the same box: **+** (attach a file, notes, the terminal, and **Link to an initiative** for a loose chat), **/** for commands, **@** inside an initiative, the To or In chip, the mic, and Send. Your words take the box's full width on top, and these controls sit in one row under them, on a phone and on a computer. A chat opens at its newest message. If a message cannot be sent, a red **Not sent:** line under the box says why, and your words and files stay in the box. The chat beside a document (Library, an initiative's artefacts) is about that document and reads its file.
|
|
229
229
|
- **While PMOS works.** A line at the top of the chat shows what PMOS is trying to do. If PMOS keeps a to-do list, the line shows the to-do in progress and how many are done, for example **2 of 5 done**. Tap the line to see the full list. If PMOS has no to-do list, the line shows PMOS's newest one-line status and the time since your message. The line never shows raw commands. To see the commands, tap the terminal icon.
|
|
230
230
|
- **A session's terminal.** **Watch its terminal** in **+**, or a session row such as **Claude sign-in**, opens the session's terminal in the Viewer. While the session runs, it is a real terminal: type in it to answer PMOS or paste a code. It fills the Viewer and fits its lines again when you resize the Viewer or the window. The chat goes on showing every answer while the terminal is open and after you close it: the terminal is a second view of the same session. When the session has ended, the Viewer shows it read only and says so.
|
|
231
231
|
- **Setting up your first project opens by itself** until a registered folder holds an initiative or setup has finished. The `PMOS` folder that the one-line installer makes holds no initiative yet, so a new user who opens PMOS from the Start menu or the Dock still gets the setup conversation, not an empty Today.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Layout and first run: the places, the navigation, the Viewer, the launcher and Adler"
|
|
4
4
|
description: "The places, the navigation at the left, the Viewer, the keys and the phone; the first run; when features appear; the PMOS app; and Adler."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-25
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Layout and first run
|
|
@@ -177,7 +177,7 @@ On a computer, an initiative you open from Today, Work or Intelligence opens in
|
|
|
177
177
|
- The chat icon opens the popup on the session that waits for you, or else the newest. The left side shows that session's work, or the list of sessions when it is about no work.
|
|
178
178
|
- The chat's top bar has the session, one quiet line under it that says what the chat is about, ⋯ and ×. ⋯ has **Hide the chat**, **Sessions** and, while the session is live, **End session**. On a desk, work always opens in this popup.
|
|
179
179
|
- On Today and Today the chat is drawn from the PMOS design system: your question sits in a grey box, the box you write in is one white card, and **Send** is a blue circle inside the box. When you type in the box, its grey line gets darker. No coloured ring shows.
|
|
180
|
-
- The chat reads as on a phone: messages only, without names or times on each one. Each answer shows in full, and the small notes and steps before it fold into one line, for example "Worked 6 steps · 20 s"; press it to see them. Copy, Retry and Make it a task show on the newest answer.
|
|
180
|
+
- The chat reads as on a phone: messages only, without names or times on each one. Each answer shows in full, and the small notes and steps before it fold into one line, for example "Worked 6 steps · 20 s"; press it to see them. Copy, Retry and Make it a task show on the newest answer. In the box, your words take the full width and the box grows upward as you write. Under them is one row: **+** at the left, then ↶ (when it shows), the microphone and send at the right. The box is the same on a phone and on a computer.
|
|
181
181
|
- Beside the page, a panel you slide off the edge is put away. The round Live button above the chat icon then shows, and its first row brings the panel back. Otherwise the chat icon holds your sessions, and there is no Live button.
|
|
182
182
|
|
|
183
183
|
A phone keeps its own layout. A shared read-only Work has no popup.
|
|
@@ -744,6 +744,42 @@ function rowsOfBoard(fr, board, base) {
|
|
|
744
744
|
}
|
|
745
745
|
return rows;
|
|
746
746
|
}
|
|
747
|
+
/** The stage a task sits in, as the breakdown reads it: its last task-section line, else the stage whose To finish entry made it. '' or null = none. */
|
|
748
|
+
function sectionOf(folded, t) {
|
|
749
|
+
if (!t) return null;
|
|
750
|
+
const S = folded.sections || new Map();
|
|
751
|
+
return S.has(t.id) ? S.get(t.id) : (t.from && t.from.stage) || null;
|
|
752
|
+
}
|
|
753
|
+
/** The stage a new task with no section named goes under: its parent's stage, else the initiative's stage in progress; null when the
|
|
754
|
+
* initiative has no workflow stage to name (the task then has no place, as before). */
|
|
755
|
+
function defaultSection(folded, row, parent) {
|
|
756
|
+
const st = (row && row.wfStages) || [];
|
|
757
|
+
const ok = (k) => typeof k === 'string' && k && st.some((x) => x.key === k);
|
|
758
|
+
if (parent) { const ps = sectionOf(folded, folded.tasks && folded.tasks.get(parent)); if (ok(ps)) return ps; }
|
|
759
|
+
const cur = row && row.wfStage && row.wfStage.key;
|
|
760
|
+
return ok(cur) ? cur : null;
|
|
761
|
+
}
|
|
762
|
+
const CLOSED_TASK = new Set(['Done', "Won't do", 'Archived']);
|
|
763
|
+
/** The repair of tasks with no place (data reliability, 2026-11-25): an open task of a live initiative that has NO task-section line and no
|
|
764
|
+
* To finish stage was hidden by the Work breakdown (it draws tasks by stage; the ones in no stage only count in a footer). Each such task
|
|
765
|
+
* is placed under its parent's stage, else the stage in progress, once: the line it writes makes it placed, so the next read finds nothing.
|
|
766
|
+
* A task the PM put in "Not in a stage" has a line ('') and is never touched. `pmos task set <task> --stage none` takes one back out.
|
|
767
|
+
* → the number placed. */
|
|
768
|
+
function placeLoose(file, folded, board, row) {
|
|
769
|
+
if (!file || !row || board.self || row.ended || row.archived || !row.wfStage) return 0;
|
|
770
|
+
const S = folded.sections || new Map();
|
|
771
|
+
let n = 0;
|
|
772
|
+
for (const t of tasksOfIni(folded, row.id)) {
|
|
773
|
+
if (!t || t.kind === 'Epic' || CLOSED_TASK.has(t.state) || S.has(t.id) || (t.from && t.from.stage)) continue;
|
|
774
|
+
const parent = folded.parents ? folded.parents.get(t.id) : null;
|
|
775
|
+
const sec = defaultSection(folded, row, parent || null);
|
|
776
|
+
if (!sec) continue;
|
|
777
|
+
append(file, { by: 'agent:repair' }, { kind: 'task-section', board: board.id, task: t.id, section: sec, repair: true,
|
|
778
|
+
why: 'placed under ' + sec + ': it had no stage, so Work did not show it' });
|
|
779
|
+
n++;
|
|
780
|
+
}
|
|
781
|
+
return n;
|
|
782
|
+
}
|
|
747
783
|
/** A stage's To finish entries are tasks of the initiative (feedback batch 5: "Also there is workflow tasks, confusing"). Each entry of the
|
|
748
784
|
* current stage becomes one Board task, once: its `from` marker names the stage and the entry, so a move back and forth makes no second
|
|
749
785
|
* one. It runs on a move, a switch and the first read that finds none, so closing one (on the stage card, in the Tasks section or with
|
|
@@ -780,6 +816,9 @@ function seedRows(ctx, w, fr, board, rows) {
|
|
|
780
816
|
let n = 0;
|
|
781
817
|
for (const r of rows) if (r.wf && r.wf.id !== 'product-feature') n += stageTasks(file, fr.folded, board, r, stagedBy(fr.folded, board.id, r.id));
|
|
782
818
|
if (n) fr.folded = foldOf(ctx, w);
|
|
819
|
+
let m = 0;
|
|
820
|
+
for (const r of rows) m += placeLoose(file, fr.folded, board, r);
|
|
821
|
+
if (m) fr.folded = foldOf(ctx, w);
|
|
783
822
|
return n;
|
|
784
823
|
}
|
|
785
824
|
|
|
@@ -1580,21 +1619,26 @@ const WRITES = {
|
|
|
1580
1619
|
const b0 = base.find((r) => r.id === body.initiative);
|
|
1581
1620
|
if (!b0 || boardIdOf(b0, p.fr.boards, p.fr.folded, p.w) !== p.board.id) return fail(ctx, res, 404, `no initiative ${body.initiative} on this board`);
|
|
1582
1621
|
// the + on a stage of the Tasks list (batch 18 item 16): the task goes under that stage
|
|
1622
|
+
const row0 = boardRow(p.board, b0, p.fr.folded);
|
|
1583
1623
|
if (body.section != null) {
|
|
1584
1624
|
if (typeof body.section !== 'string' || body.section.length > 80) return fail(ctx, res, 400, "section is a stage key of the initiative's workflow, or '' for Not in a stage");
|
|
1585
|
-
const st =
|
|
1625
|
+
const st = row0.wfStages || [];
|
|
1586
1626
|
if (body.section && !st.some((x) => x.key === body.section)) return fail(ctx, res, 400, `"${body.section}" is not a stage of this initiative's workflow: one of ${st.map((x) => x.key).join(', ')}, or ''`);
|
|
1587
1627
|
}
|
|
1588
1628
|
const id = `task-${crypto.randomBytes(5).toString('hex')}`;
|
|
1589
1629
|
// "under Batch 2: …" in the add box (initiative work-subtasks): the new task is a subtask from its first line
|
|
1590
1630
|
if (body.parent != null && body.parent !== '') { const pe = parentError(p, id, body.parent, body.initiative); if (pe) return fail(ctx, res, 400, pe); }
|
|
1631
|
+
// every new task gets a place (data reliability, 2026-11-25): a caller that names no section (the chat, \`pmos task add\`, a kept ✦,
|
|
1632
|
+
// an outcome's next step) used to write no task-section line, so the Work breakdown had no stage to draw the task under and hid it.
|
|
1633
|
+
// No section named: the parent's stage for a subtask, else the stage in progress. '' stays the PM's own "Not in a stage".
|
|
1634
|
+
const sec = typeof body.section === 'string' ? body.section : defaultSection(p.fr.folded, row0, body.parent || null);
|
|
1591
1635
|
// a milestone has one date, the due day, and no start (the ◇ of the Viewer's add field, batch 25 item 5)
|
|
1592
1636
|
const ms = body.milestone === true;
|
|
1593
1637
|
const start = ms ? '' : body.start || (body.due && body.due < B.shiftDay(today(), 1) ? body.due : B.shiftDay(today(), 1));
|
|
1594
1638
|
const due = body.due || (ms ? body.start || B.shiftDay(today(), 8) : B.shiftDay(start, 7));
|
|
1595
1639
|
append(p.file, g.actor, { kind: 'task', board: p.board.id, task: id, type: body.type || 'Task', initiative: body.initiative, title: body.title.trim(), epic: body.epic ? String(body.epic).trim() : null,
|
|
1596
1640
|
owner: body.owner ? String(body.owner).trim() : actorLib.pageName(g.actor.by), state: 'To do', start, due, ...(body.notes && body.notes.trim() ? { notes: body.notes.replace(/\s+$/, '') } : {}), ...(body.parent ? { parent: body.parent } : {}) });
|
|
1597
|
-
if (typeof
|
|
1641
|
+
if (typeof sec === 'string') append(p.file, g.actor, { kind: 'task-section', board: p.board.id, task: id, section: sec, why: sec ? 'placed under ' + sec + (typeof body.section === 'string' ? '' : ', the ' + (body.parent ? "parent's stage" : 'stage in progress')) : 'placed under no stage' });
|
|
1598
1642
|
if (ms) append(p.file, g.actor, { kind: 'task-milestone', board: p.board.id, task: id, milestone: true, why: 'added as a milestone' });
|
|
1599
1643
|
const t = B.taskOf(B.fold(readLedger(ctx, p.w)), id);
|
|
1600
1644
|
ctx.json(res, { ok: true, item: B.rollupItems([B.taskItem(t)])[0] });
|
|
@@ -2313,9 +2357,13 @@ function initiativeWorkflow(ctx, w, id) {
|
|
|
2313
2357
|
/** stageTasks for one initiative outside HTTP (`pmos task list|state`): its current stage's To finish entries made tasks once. → the number made, or 0. */
|
|
2314
2358
|
function seedInitiative(ctx, w, id) {
|
|
2315
2359
|
const r = initiativeWorkflow(ctx, w, id);
|
|
2316
|
-
if (!r.ok || !r.row.wf
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2360
|
+
if (!r.ok || !r.row.wf) return 0;
|
|
2361
|
+
const file = ledgerFile(ctx, w);
|
|
2362
|
+
let folded = foldOf(ctx, w);
|
|
2363
|
+
const n = r.row.wf.id === 'product-feature' ? 0 : stageTasks(file, folded, r.board, r.row, stagedBy(folded, r.board.id, id));
|
|
2364
|
+
if (n) folded = foldOf(ctx, w);
|
|
2365
|
+
placeLoose(file, folded, r.board, r.row); // a task with no place is placed before it is listed (data reliability, 2026-11-25)
|
|
2366
|
+
return n;
|
|
2319
2367
|
}
|
|
2320
2368
|
|
|
2321
2369
|
/** The board of each initiative of a workspace, for other routes (Reports): { boards: [{ id, title }], of(id) → board id }.
|
|
@@ -2382,4 +2430,4 @@ function meetingBoards(ctx) {
|
|
|
2382
2430
|
return { list, detail };
|
|
2383
2431
|
}
|
|
2384
2432
|
|
|
2385
|
-
module.exports = { prefixes: ['/api/boards'], handle, jiraFacts, tasksOfIni, postFrame, needRows, itemsOf, readLedger, foldOf, epicsOf, rowsOfBoard, invalidateRows: (w) => { rowsLib.invalidate(w.root); rowCache.delete(w.root); }, move, switchWorkflow, taskState, taskAdd, taskEdit, taskComment, describeDraft, writeAs, taskDelete, taskRestore, initiativeWorkflow, seedInitiative, stageTasks, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, startOnDefault, kindSwitch, kindFollowsWorkflow, recordKind, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, taskSpanOf, workflowRowOf, closedOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
|
|
2433
|
+
module.exports = { prefixes: ['/api/boards'], handle, jiraFacts, tasksOfIni, defaultSection, placeLoose, postFrame, needRows, itemsOf, readLedger, foldOf, epicsOf, rowsOfBoard, invalidateRows: (w) => { rowsLib.invalidate(w.root); rowCache.delete(w.root); }, move, switchWorkflow, taskState, taskAdd, taskEdit, taskComment, describeDraft, writeAs, taskDelete, taskRestore, initiativeWorkflow, seedInitiative, stageTasks, boardIndex, appendScanAsk, scanDeclineSignal, createAndPlace, startOnDefault, kindSwitch, kindFollowsWorkflow, recordKind, ledgerFile, append, frameFor, boardIdOf, meetingBoards, boardsOf, baseRows, boardRow, taskSpanOf, workflowRowOf, closedOf, foldOf, portfolio, SELF_REFUSAL, NO_STATE };
|
|
@@ -331,14 +331,12 @@ function applyOne(ctx, p, g, f, ini, x, choices, outbox) {
|
|
|
331
331
|
for (const it of items) {
|
|
332
332
|
if (it.jira) { epics.push(it.jira.toUpperCase()); continue; }
|
|
333
333
|
const title = (it.wbs && !String(it.title).startsWith(it.wbs) ? it.wbs + ' ' : '') + it.title;
|
|
334
|
+
// the stage the source names goes with the add; none named: the add places it under the stage in progress (routes-boards defaultSection)
|
|
335
|
+
const st = it.stage ? stagesOf(ctx, p, ini).find((s) => s.key === it.stage || s.name.toLowerCase() === String(it.stage).toLowerCase()) : null;
|
|
334
336
|
const r = RB.taskAdd(ctx, { ws: p.w.id, board: p.board.id, initiative: ini, title: title.slice(0, 200), ...(it.start ? { start: it.start } : {}), ...(it.due ? { due: it.due } : {}), ...(it.owner ? { owner: it.owner } : {}),
|
|
335
|
-
notes: ['From ' + (it.source || source || 'your sources') + (it.ref ? ': ' + it.ref : ''), it.notes || ''].filter(Boolean).join('\n').slice(0, 1900) }, g);
|
|
337
|
+
...(st ? { section: st.key } : {}), notes: ['From ' + (it.source || source || 'your sources') + (it.ref ? ': ' + it.ref : ''), it.notes || ''].filter(Boolean).join('\n').slice(0, 1900) }, g);
|
|
336
338
|
if (!W.ok(r)) continue;
|
|
337
339
|
const uid = r.body.item && (r.body.item.uid || r.body.item.id);
|
|
338
|
-
if (uid && it.stage) {
|
|
339
|
-
const st = stagesOf(ctx, p, ini).find((s) => s.key === it.stage || s.name.toLowerCase() === String(it.stage).toLowerCase());
|
|
340
|
-
if (st) RB.taskEdit(ctx, { ws: p.w.id, board: p.board.id, task: uid, section: st.key }, g);
|
|
341
|
-
}
|
|
342
340
|
add({ op: 'add', task: uid, title, to: { start: it.start || '', due: it.due || '' } });
|
|
343
341
|
}
|
|
344
342
|
if (epics.length) {
|
|
@@ -89,11 +89,14 @@ function nameFor(F, ini, fromLive) {
|
|
|
89
89
|
function applyLive(ctx, p, row, d, g) {
|
|
90
90
|
const live = liveOf(p, row), S = TP.stepsOf(d, live), undo = { added: [], changed: [], dropped: [], unchosen: [] };
|
|
91
91
|
const file = p.file, by = g.actor;
|
|
92
|
+
let dk; // the stage in progress, read once: where a new task with no stage named goes
|
|
93
|
+
const dflt = () => { if (dk === undefined) { try { dk = RB.defaultSection(p.fr.folded, RB.boardRow(p.board, row, p.fr.folded), null); } catch { dk = null; } } return dk; };
|
|
92
94
|
for (const x of S.add) {
|
|
93
95
|
const id = `task-${require('crypto').randomBytes(5).toString('hex')}`;
|
|
94
96
|
RB.append(file, by, { kind: 'task', board: p.board.id, task: id, type: 'Task', initiative: row.id, title: x.title || 'Task', epic: null, owner: x.owner || actorLib.pageName(by.by),
|
|
95
97
|
state: 'To do', start: x.start || null, due: x.due || null, ...(x.milestone ? { milestone: true } : {}), why: 'made live from ' + d.name });
|
|
96
|
-
|
|
98
|
+
// no stage named: the stage in progress, so the task shows in the Work breakdown (data reliability, 2026-11-25)
|
|
99
|
+
const sec = x.section || (x.from && x.from.stage) || dflt() || '';
|
|
97
100
|
if (sec) RB.append(file, by, { kind: 'task-section', board: p.board.id, task: id, section: sec, why: 'placed under ' + sec });
|
|
98
101
|
undo.added.push(id);
|
|
99
102
|
}
|
|
@@ -39,6 +39,7 @@ const USAGE = [
|
|
|
39
39
|
'usage: pmos task add|list|state|set|remove — an initiative\'s tasks, the ones the PM sees in its Tasks section',
|
|
40
40
|
' pmos task add <initiative> "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--start YYYY-MM-DD] [--owner <who>] [--notes <text>] [--parent <task>]',
|
|
41
41
|
' Add a task. Every new task goes here; pmos item add is the older breakdown record. --parent adds it as a subtask of that task.',
|
|
42
|
+
' With no --stage it goes under the parent\'s stage, else the stage in progress, so Work shows it. --stage none keeps it in no stage.',
|
|
42
43
|
' pmos task set <task> [<task> …] [--stage <stage>|none] [--due YYYY-MM-DD|none] [--start YYYY-MM-DD|none] [--owner <who>] [--notes <text>]',
|
|
43
44
|
' [--milestone|--no-milestone] [--pin|--no-pin|--pin-default] [--parent <task>|none]',
|
|
44
45
|
' --parent puts the task under another task of the same initiative as a subtask; none takes it back to the top level. Set it only when the PM asks.',
|
|
@@ -180,17 +181,18 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
180
181
|
const body = { ws: w.id, board: r.board.id, initiative: id, title };
|
|
181
182
|
for (const k of ['due', 'start', 'owner', 'notes']) if (flags[k] !== undefined) body[k] = flags[k];
|
|
182
183
|
if (flags.parent !== undefined && String(flags.parent).toLowerCase() !== 'none') body.parent = String(flags.parent); // a subtask (initiative chat-subtasks)
|
|
184
|
+
// the place goes with the add, in one write: no --stage places it under the parent's stage or the stage in progress (routes-boards
|
|
185
|
+
// defaultSection), so a task the chat adds always shows in the Work breakdown; --stage none keeps it in no stage
|
|
186
|
+
if (sec != null) body.section = sec;
|
|
183
187
|
const a = boards.taskAdd(ctx, body, g);
|
|
184
188
|
if (!a.body || a.body.ok !== true) return fail((a.body && a.body.error) || 'the write was refused');
|
|
185
189
|
const t = a.body.item;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (!e.body || e.body.ok !== true) return fail(`added ${t.uid}, but it was not placed under ${sec}: ${(e.body && e.body.error) || 'the write was refused'}`);
|
|
189
|
-
}
|
|
190
|
+
let placedAt = sec;
|
|
191
|
+
if (placedAt == null) { try { placedAt = (boards.foldOf(ctx, w).sections || new Map()).get(t.uid) || null; } catch { placedAt = null; } }
|
|
190
192
|
if (body.parent) console.error('[task-parent]', 'add', 1);
|
|
191
|
-
LIVE.emit(stateDir, { id: t.uid, field: 'added', value: { initiative: id, title: t.title, status: t.status, owner: t.owner || '', start: t.start || '', end: t.end || '', ...(
|
|
192
|
-
if (json) say(JSON.stringify({ ok: true, task: { id: t.uid, board: t.board, title: t.title, state: t.status, owner: t.owner, start: t.start, due: t.end, ...(
|
|
193
|
-
else say(`✓ added ${t.uid} · ${t.status} · ${t.title}${body.parent ? ' · a subtask of ' + body.parent : ''}${
|
|
193
|
+
LIVE.emit(stateDir, { id: t.uid, field: 'added', value: { initiative: id, title: t.title, status: t.status, owner: t.owner || '', start: t.start || '', end: t.end || '', ...(placedAt ? { section: placedAt } : {}), ...(body.parent ? { parent: body.parent } : {}) } });
|
|
194
|
+
if (json) say(JSON.stringify({ ok: true, task: { id: t.uid, board: t.board, title: t.title, state: t.status, owner: t.owner, start: t.start, due: t.end, ...(placedAt ? { stage: placedAt } : {}), ...(body.parent ? { parent: body.parent } : {}) } }));
|
|
195
|
+
else say(`✓ added ${t.uid} · ${t.status} · ${t.title}${body.parent ? ' · a subtask of ' + body.parent : ''}${placedAt ? ' · under ' + placedAt : ''}${t.end ? ' · due ' + t.end : ''}. The initiative's Tasks section shows it. Nothing was sent.`);
|
|
194
196
|
return 0;
|
|
195
197
|
}
|
|
196
198
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.803.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.803.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -361,7 +361,7 @@ body:has(.hm-addm:not([hidden])) .cz-fab { visibility: hidden; }
|
|
|
361
361
|
.hm-stop i { width: 9px; height: 9px; border-radius: 2px; background: var(--cz-ink); }
|
|
362
362
|
.hm-box-rich, .hm-box#hmForm, form.hm-box { display: flex; flex-direction: column; gap: 6px; padding: var(--space-8); border-radius: var(--radius-panel, 24px); background: var(--cz-well); }
|
|
363
363
|
form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: none; font: inherit; font-size: var(--fs-body); color: var(--cz-ink); padding: var(--space-8) 10px; outline: none; line-height: var(--lh-body); }
|
|
364
|
-
.hm-tb { display: flex; align-items: center; gap: var(--space-4); }
|
|
364
|
+
.hm-tb { display: flex; align-items: center; gap: var(--space-4); order: 5; } /* the controls row is the box's last row: the files and marks of the next message sit between the text and it */
|
|
365
365
|
.hm-tb .sp { flex: 1; }
|
|
366
366
|
.hm-tool { width: 36px; height: 36px; border-radius: var(--radius-md, 12px); display: grid; place-items: center; border: 0; background: none; color: var(--cz-ink2); cursor: pointer; font-size: var(--fs-body); line-height: var(--lh-body); }
|
|
367
367
|
.hm-tool:hover { background: var(--cz-well2); }
|
|
@@ -973,20 +973,18 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
973
973
|
body.cz-home:not(.hm-plist) .hm-a:not(.held):not(:focus-within) .hm-tools { height: 0; margin: 0; overflow: hidden; opacity: 0; }
|
|
974
974
|
body.cz-home:not(.hm-plist) .hm-log > .hm-worked:has(+ .hm-a:not(.held):not(:focus-within)):not(:has([aria-expanded="true"])):not(:focus-within) { display: none; }
|
|
975
975
|
|
|
976
|
-
/* the foot: one box
|
|
976
|
+
/* the foot: one box on the card with no fade over the stream. The text has the box's full width and grows upward; the controls
|
|
977
|
+
* sit in one row under it, + at the left and undo · mic · send at the right (Wawan 2026-11-25, the same layout as the desktop) */
|
|
977
978
|
body.cz-home:not(.hm-plist) #hmFoot { padding: var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom)); background: var(--cz-card); }
|
|
978
979
|
body.cz-home:not(.hm-plist) #hmFoot::before { content: none; }
|
|
979
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box {
|
|
980
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box
|
|
981
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-tb > :is(.sp, .hm-key) { display: none; }
|
|
982
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box > *, body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-tb > * { order: 2; }
|
|
983
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-addw { order: 0; width: 44px; flex: none; margin: 0; }
|
|
984
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box textarea { order: 1; flex: 1; min-width: 0; box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px var(--space-8) 11px var(--space-4); line-height: 22px; }
|
|
980
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box { gap: 0; padding: var(--space-4); border-radius: var(--radius-panel, 26px); }
|
|
981
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box textarea { width: 100%; box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px var(--space-12) var(--space-4); line-height: 22px; }
|
|
985
982
|
body.cz-home:not(.hm-plist) form#hmForm.hm-box textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one row: a long placeholder ends in … */
|
|
986
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box .
|
|
987
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-
|
|
983
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-tb { gap: var(--space-4); }
|
|
984
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-tb > .hm-key { display: none; }
|
|
985
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box .hm-addw { width: 44px; flex: none; margin: 0; }
|
|
988
986
|
body.cz-home:not(.hm-plist) form#hmForm.hm-box :is(.hm-tool, .ut-mic, .hm-send) { flex: none; width: 44px; height: 44px; margin: 0; }
|
|
989
|
-
body.cz-home:not(.hm-plist) form#hmForm.hm-box > .hm-files {
|
|
987
|
+
body.cz-home:not(.hm-plist) form#hmForm.hm-box > .hm-files { padding: var(--space-4) var(--space-8); box-sizing: border-box; }
|
|
990
988
|
}
|
|
991
989
|
@container hmchat (max-width: 760px) {
|
|
992
990
|
/* the In: chip and "also" leave the box: the context line says it */
|
|
@@ -1011,20 +1009,18 @@ form.hm-box textarea { min-height: 48px; border: 0; background: none; resize: no
|
|
|
1011
1009
|
.cz-pop-chat .hm-tools { margin-top: var(--space-8); }
|
|
1012
1010
|
.cz-pop-chat .hm-a:not(.last):not(.held):not(:focus-within) .hm-tools { height: 0; margin: 0; overflow: hidden; opacity: 0; }
|
|
1013
1011
|
|
|
1014
|
-
/* the foot: one box
|
|
1012
|
+
/* the foot: one box on the card with no fade over the stream. The text has the box's full width and grows upward; the controls
|
|
1013
|
+
* sit in one row under it, + at the left and undo · mic · send at the right (Wawan 2026-11-25, the same layout as the desktop) */
|
|
1015
1014
|
.cz-pop-chat #hmFoot { padding: var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom)); background: var(--cz-card); }
|
|
1016
1015
|
.cz-pop-chat #hmFoot::before { content: none; }
|
|
1017
|
-
.cz-pop-chat form#hmForm.hm-box {
|
|
1018
|
-
.cz-pop-chat form#hmForm.hm-box
|
|
1019
|
-
.cz-pop-chat form#hmForm.hm-box .hm-tb > :is(.sp, .hm-key) { display: none; }
|
|
1020
|
-
.cz-pop-chat form#hmForm.hm-box > *, .cz-pop-chat form#hmForm.hm-box .hm-tb > * { order: 2; }
|
|
1021
|
-
.cz-pop-chat form#hmForm.hm-box .hm-addw { order: 0; width: 44px; flex: none; margin: 0; }
|
|
1022
|
-
.cz-pop-chat form#hmForm.hm-box textarea { order: 1; flex: 1; min-width: 0; box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px var(--space-8) 11px var(--space-4); line-height: 22px; }
|
|
1016
|
+
.cz-pop-chat form#hmForm.hm-box { gap: 0; padding: var(--space-4); border-radius: var(--radius-panel, 26px); }
|
|
1017
|
+
.cz-pop-chat form#hmForm.hm-box textarea { width: 100%; box-sizing: border-box; min-height: 44px; margin: 0; padding: 11px var(--space-12) var(--space-4); line-height: 22px; }
|
|
1023
1018
|
.cz-pop-chat form#hmForm.hm-box textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one row: a long placeholder ends in … */
|
|
1024
|
-
.cz-pop-chat form#hmForm.hm-box .
|
|
1025
|
-
.cz-pop-chat form#hmForm.hm-box .hm-
|
|
1019
|
+
.cz-pop-chat form#hmForm.hm-box .hm-tb { gap: var(--space-4); }
|
|
1020
|
+
.cz-pop-chat form#hmForm.hm-box .hm-tb > .hm-key { display: none; }
|
|
1021
|
+
.cz-pop-chat form#hmForm.hm-box .hm-addw { width: 44px; flex: none; margin: 0; }
|
|
1026
1022
|
.cz-pop-chat form#hmForm.hm-box :is(.hm-tool, .ut-mic, .hm-send) { flex: none; width: 44px; height: 44px; margin: 0; }
|
|
1027
|
-
.cz-pop-chat form#hmForm.hm-box > .hm-files {
|
|
1023
|
+
.cz-pop-chat form#hmForm.hm-box > .hm-files { padding: var(--space-4) var(--space-8); box-sizing: border-box; }
|
|
1028
1024
|
}
|
|
1029
1025
|
/* the notes a turn's worked line folds (popup round 3 point 19c): quiet, above its steps */
|
|
1030
1026
|
.hm-notes { padding: var(--space-4) 0 2px 18px; }
|