create-pmos 0.768.0 → 0.769.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 +14 -38
- 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 +13 -0
- package/workspace/guide/cli.md +1 -0
- package/workspace/lib/engine/boards.js +11 -3
- package/workspace/lib/initiative-chat.js +1 -1
- package/workspace/lib/routes-boards.js +31 -1
- package/workspace/lib/task-cli.js +25 -2
- package/workspace/lib/task-store.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-task-pop.css +57 -17
- package/workspace/public/pm/cozy-task-pop.js +161 -20
- package/workspace/public/pm/task-card.js +113 -5
- package/workspace/public/pm/vw-ds.js +112 -38
- package/workspace/test-lists/task-detail-one-column.json +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.769.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,19 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.769.0",
|
|
38
|
+
"at": "2026-11-24T08:04:34.713Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1729,
|
|
43
|
+
"t": "The task detail is one column, with its fields as chips",
|
|
44
|
+
"s": "The task detail is one column, with its fields as chips",
|
|
45
|
+
"k": "new"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
36
49
|
{
|
|
37
50
|
"v": "0.768.0",
|
|
38
51
|
"at": "2026-11-24T07:49:37.442Z",
|
|
@@ -339,43 +352,6 @@
|
|
|
339
352
|
"k": "new"
|
|
340
353
|
}
|
|
341
354
|
]
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"v": "0.749.0",
|
|
345
|
-
"at": "2026-11-23T17:01:32.549Z",
|
|
346
|
-
"f": 4,
|
|
347
|
-
"prs": [
|
|
348
|
-
{
|
|
349
|
-
"n": 1680,
|
|
350
|
-
"t": "Date fields take dates typed in words (A488)",
|
|
351
|
-
"s": "Date fields take dates typed in words (A488)",
|
|
352
|
-
"k": "new"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"n": 1684,
|
|
356
|
-
"t": "One ranked Your move leads Today's log (A468)",
|
|
357
|
-
"s": "One ranked Your move leads Today's log (A468)",
|
|
358
|
-
"k": "new"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"n": 1683,
|
|
362
|
-
"t": "Draft the next sprint from team capacity, carry-over first (A471)",
|
|
363
|
-
"s": "Draft the next sprint from team capacity, carry-over first (A471)",
|
|
364
|
-
"k": "new"
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"n": 1682,
|
|
368
|
-
"t": "Standing rules list — see, edit and retire the rules PMOS learned (A470)",
|
|
369
|
-
"s": "Standing rules list — see, edit and retire the rules PMOS learned (A470)",
|
|
370
|
-
"k": "new"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"n": 1681,
|
|
374
|
-
"t": "Ask for the smallest test before building a ranked bet",
|
|
375
|
-
"s": "Ask for the smallest test before building a ranked bet",
|
|
376
|
-
"k": "new"
|
|
377
|
-
}
|
|
378
|
-
]
|
|
379
355
|
}
|
|
380
356
|
]
|
|
381
357
|
}
|
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-24T08:04:31Z"}
|
|
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-24T08:04:31Z"}
|
|
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-24T08:04:31Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.769.0",
|
|
4
|
+
"at": "2026-11-24T08:04:34.713Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1729,
|
|
9
|
+
"t": "The task detail is one column, with its fields as chips",
|
|
10
|
+
"s": "The task detail is one column, with its fields as chips",
|
|
11
|
+
"k": "new"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
2
15
|
{
|
|
3
16
|
"v": "0.768.0",
|
|
4
17
|
"at": "2026-11-24T07:49:37.442Z",
|
package/workspace/guide/cli.md
CHANGED
|
@@ -562,6 +562,7 @@ An agent adds and closes tasks when you ask, so you do not have to find the task
|
|
|
562
562
|
- `pmos task set <task> [<task> …] --parent <task>` puts tasks under a parent task as subtasks; `--parent none` moves them back to the top level. A loop or a parent that does not exist is refused. The answer prints an `Undo:` line, one command per old parent. `pmos task add … --parent <task>` adds a new task as a subtask.
|
|
563
563
|
- `pmos task remove <task> [<task> …]` deletes a task that was added by mistake, such as a placeholder or a duplicate. The task goes from every list, and the Undo on the page brings it back. For work that stopped, use Archived or Won't do instead. A breakdown item cannot be deleted: set it to Won't do.
|
|
564
564
|
- `pmos task describe <task>` prints the task's description and its sources. `pmos task describe <task> "<text>"` writes it: what the task is, why it matters, and when it is done. `none` clears it. The task page shows it at once, with Undo. When a task has no description, PMOS writes one by itself from the initiative's record, PRD and plan documents, and names its sources. A Jira ticket keeps its description in Jira.
|
|
565
|
+
- `pmos task comment <task>` lists the task's comments. `pmos task comment <task> "<text>"` adds one. The task page shows it at once, under Activity › Comments. Comments stay in PMOS: nothing is sent to Jira.
|
|
565
566
|
- `pmos task link <from> <to>` makes `<to>` wait on `<from>`. `--type` sets how they wait: `fs` (start after it finishes, the default), `ss` (start when it starts), `ff` (finish when it finishes) or `sf` (finish when it starts). `--lag` adds days, or takes them away with a negative number. Make a link only when the PM asks for it. To suggest a link, add `--propose --why "<reason>"`: the link shows under the blue ✦ in the Tasks header, and the PM approves it or drops it. A link that loops back to a task is refused.
|
|
566
567
|
- `pmos task unlink <from> <to>` removes the link. The dates stay as they are.
|
|
567
568
|
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
* task-update { task, state?, start?, due?, title?, owner?, notes?, initiative?, why } a status move, a reschedule, a rename or an edit in the Viewer
|
|
40
40
|
* ticket-note { ref, notes } the PM's own notes on a Jira ticket (Jira keeps its fields)
|
|
41
41
|
* task-description { task, description, sources? } a task's description (task-descriptions): '' clears; sources [{ path, line, title }]
|
|
42
|
+
* task-comment { task, text } a comment on a task (task-detail-one-column): each line adds one, oldest first
|
|
42
43
|
* task-section { task, section } a task's place in the breakdown (one view, feedback batch 6 item 1): the key
|
|
43
44
|
* of a stage of its initiative's workflow, '' for "Not in a stage". It is the task's place, never its state, and moving a task
|
|
44
45
|
* never moves the initiative. `task` is a Board task or a breakdown item; the last line wins.
|
|
@@ -195,7 +196,10 @@ const KINDS = new Set(['board', 'workflow', 'move', 'assign', 'ask', 'ask-accept
|
|
|
195
196
|
// a task's priority, set in the row (initiative inline-sprint-priority): P1, P2 or P3; '' takes it out
|
|
196
197
|
'task-priority',
|
|
197
198
|
// a task's description (initiative task-descriptions): what it is, why, and when it is done; '' clears it
|
|
198
|
-
'task-description'
|
|
199
|
+
'task-description',
|
|
200
|
+
// a comment on a task (initiative task-detail-one-column): the task popup's Activity › Comments and `pmos task comment`
|
|
201
|
+
'task-comment']);
|
|
202
|
+
const COMMENT_MAX = 2000; // one comment on a task (task-comment)
|
|
199
203
|
// A task's state is its only stage (Wawan, 2026-10-25): the same five every workflow ends in. An old 'In review' reads as In progress (taskState).
|
|
200
204
|
const TASK_STATES = Object.freeze(['To do', 'In progress', 'Done', "Won't do", 'Archived']);
|
|
201
205
|
const taskState = (s) => (s === 'In review' ? 'In progress' : TASK_STATES.includes(s) ? s : null);
|
|
@@ -229,6 +233,7 @@ function fold(events) {
|
|
|
229
233
|
const parents = new Map(); // task id (or Jira key) → the id of its parent task (subtasks, initiative work-subtasks); the last task-parent line wins
|
|
230
234
|
const orders = new Map(); // key(initiative, section) → the task ids in the PM's order inside that stage; the last task-order line wins
|
|
231
235
|
const pins = new Map(); // task id (or Jira key) → true | false: the PM's pin on a milestone; a null line takes it out (the rule again)
|
|
236
|
+
const comments = new Map(); // task id → [{ text, by, at }]: its comments, oldest first (task-detail-one-column)
|
|
232
237
|
const descriptions = new Map(); // task id → { text, by, at, sources }: the task's description (task-descriptions); the last line wins, '' clears
|
|
233
238
|
const priorities = new Map(); // task id → 'P1' | 'P2' | 'P3': the PM's priority (inline-sprint-priority); a '' line takes it out, the last line wins
|
|
234
239
|
const removed = new Map(); // task id → the task a task-remove took out, so a task-restore (Delete's Undo) puts it back
|
|
@@ -339,6 +344,9 @@ function fold(events) {
|
|
|
339
344
|
} else if (e.kind === 'task-description' && typeof e.task === 'string' && e.task && typeof e.description === 'string') {
|
|
340
345
|
if (e.description) descriptions.set(e.task, { text: e.description, by: e.by || null, at: e.at || null, sources: Array.isArray(e.sources) ? e.sources.filter((x) => x && typeof x.path === 'string').slice(0, 8) : [] });
|
|
341
346
|
else descriptions.delete(e.task);
|
|
347
|
+
} else if (e.kind === 'task-comment' && typeof e.task === 'string' && e.task && typeof e.text === 'string' && e.text.trim()) {
|
|
348
|
+
if (!comments.has(e.task)) comments.set(e.task, []);
|
|
349
|
+
comments.get(e.task).push({ text: e.text.slice(0, COMMENT_MAX), by: e.by || null, at: e.at || null });
|
|
342
350
|
} else if (e.kind === 'task-priority' && typeof e.task === 'string' && e.task && typeof e.priority === 'string' && /^(P[1-3])?$/.test(e.priority)) {
|
|
343
351
|
if (e.priority) priorities.set(e.task, e.priority); else priorities.delete(e.task);
|
|
344
352
|
} else if (e.kind === 'task-pin' && typeof e.task === 'string' && e.task && (typeof e.pinned === 'boolean' || e.pinned === null)) {
|
|
@@ -422,7 +430,7 @@ function fold(events) {
|
|
|
422
430
|
suggestNo.set(e.id, { kind: e.of === 'merge' ? 'merge' : 'split', fp: e.fp, at: e.at || null });
|
|
423
431
|
}
|
|
424
432
|
}
|
|
425
|
-
return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, descriptions, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
|
|
433
|
+
return { boards, moves, assigns, asks, stages, iniWorkflows, tasks, removed, sections, parents, orders, milestones, pins, priorities, descriptions, comments, ticketNotes, ticketDates, epics, archives, deleted, notDup, iniWf, ends, judged, autoOver, ticketMoves, backlogRank, smOps, smUndone, suggestNo, events: list };
|
|
426
434
|
}
|
|
427
435
|
|
|
428
436
|
/** The stages an initiative runs on a board: its own workflow when one is recorded, else the board's. */
|
|
@@ -926,5 +934,5 @@ module.exports = {
|
|
|
926
934
|
templateWorkflow, isTemplateEdited, fold, readingOf, deriveStage, stageOf, catOf, moveWarnings, cardWarnings,
|
|
927
935
|
applyWorkflowEdit, filterRows, health, counts, sprintsOf, backlogOf, key,
|
|
928
936
|
INI_TEMPLATES, TASK_STATES, taskState, isBuildStage, templateBuilds, boardSettings, jiraProjectsOf, JIRA_KEY_RE, JIRA_PROJECT_RE, workflowOf, templateOf, applyIniWorkflow, taskOf, shiftDay,
|
|
929
|
-
ITEM_PROGRESS, itemStatus, taskItem, rollupItems, wouldCycle,
|
|
937
|
+
ITEM_PROGRESS, itemStatus, taskItem, rollupItems, wouldCycle, COMMENT_MAX,
|
|
930
938
|
};
|
|
@@ -55,7 +55,7 @@ function rule(info, id) {
|
|
|
55
55
|
`The workflow stage is on the initiative: the stage card and the Board show it. \`pmos workflow of ${ini}\` reads it. When the PM asks to move the initiative, run \`pmos workflow move ${ini} --stage <key> --why "<reason>"\`. When the PM asks to change its workflow, run \`pmos workflow switch ${ini} --to <workflow id>\`. Both write what the page's press writes, under your name.`,
|
|
56
56
|
'There is one kind of task: the ones the PM sees in the initiative\'s Tasks section. The stage card\'s To finish entries and the older breakdown items are tasks too. '
|
|
57
57
|
+ 'A task\'s state is To do, In progress, Done, Won\'t do or Archived. The Tasks section groups the tasks under the stages of this initiative\'s workflow: a task\'s group is its place in the breakdown, never its state. When the PM asks to add, close, group or change a task, '
|
|
58
|
-
+ `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--parent <task>]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). Tasks nest: \`pmos task set <task> [<task> …] --parent <task>|none\` puts tasks under a parent task as subtasks, or back at the top level with none, and \`--parent\` on add makes a new subtask. When the PM asks to group tasks into task and subtask, make the parent tasks and move the tasks under them, keeping each task and its state; never close tasks as Won't do to group them. Tell the PM the Undo line the command prints. \`pmos task describe <task> "<text>"\` writes a task's description (What, Why, Done when) and \`pmos task describe <task>\` reads it. \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
|
|
58
|
+
+ `do it yourself, never send the PM to the Board: \`pmos task add ${ini} "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--parent <task>]\` adds one, \`pmos task list ${ini}\` names them all, \`pmos task state <task> [<task> …] --to "<state>" --why "<what shows it>"\` sets their state and \`pmos task set <task> [<task> …] --stage <stage>|none\` groups them (it also takes --due, --start, --owner, --notes; none clears a date). Tasks nest: \`pmos task set <task> [<task> …] --parent <task>|none\` puts tasks under a parent task as subtasks, or back at the top level with none, and \`--parent\` on add makes a new subtask. When the PM asks to group tasks into task and subtask, make the parent tasks and move the tasks under them, keeping each task and its state; never close tasks as Won't do to group them. Tell the PM the Undo line the command prints. \`pmos task describe <task> "<text>"\` writes a task's description (What, Why, Done when) and \`pmos task describe <task>\` reads it. \`pmos task comment <task> "<text>"\` adds a comment to a task (it shows under the task's Activity › Comments) and \`pmos task comment <task>\` lists them. \`pmos task remove <task> [<task> …]\` deletes a task added by mistake when the PM asks; work that stopped is Archived instead. Never use \`pmos item add\` for new work, and never change tasks to move the initiative.`,
|
|
59
59
|
// batch 31 (Wawan 2026-11-18): the chat offered to rewrite a closed initiative's dates to clear "145 days over"; the count was the page's bug
|
|
60
60
|
'The "N days over" badge counts from the planned finish (the latest due of its tasks). While the initiative is open it counts to today. Once it is in its workflow\'s last stage (Closed, Done) it counts to when the work really finished: the end of its last Done task, else the day it moved into that stage. On time, the badge goes away and the card says Done with that date; late, it reads "Finished N days late" and that number never grows. '
|
|
61
61
|
+ 'Never change a date, a task or the stage to clear or shorten the badge: the dates are the record. When the PM asks why it shows, explain this rule.',
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
* POST /api/boards/tasks/rename { ws, board, task, title } → { ok, from, item } only the title changes
|
|
43
43
|
* POST /api/boards/tasks/edit { ws, board, task, owner?, notes?, start?, due?, initiative?, section?, milestone?, pinned?, parent?, description? } → { ok, from, item } the Viewer's edits in place
|
|
44
44
|
* POST /api/boards/tasks/describe-draft { ws, board, task } → { ok, wrote, description?, sources?, from? } PMOS writes a task's description once (task-descriptions)
|
|
45
|
+
* POST /api/boards/tasks/comment { ws, board, task, text } → { ok, comment, comments } a comment on a task, a breakdown item or a Jira ticket, kept in
|
|
46
|
+
* PMOS only (task-detail-one-column: the task popup's Activity › Comments; `pmos task comment`). Nothing is sent to Jira
|
|
45
47
|
* (parent: the task it sits under, '' for the top level; a task-parent line, any kind of task, a loop refused)
|
|
46
48
|
* (milestone: true | false, the ◇ flag of batch 11 item 3; a Jira key takes the flag only)
|
|
47
49
|
* (pinned: true | false | null, a milestone's pin on the Board timeline, batch 13 item 4; null = the rule, the last one only)
|
|
@@ -195,6 +197,11 @@ function withTracker(w, f, key, lines) {
|
|
|
195
197
|
function descFields(d) {
|
|
196
198
|
return { description: d.text, descBy: /^agent:/.test(String(d.by || '')) ? 'pmos' : 'you', descSources: (d.sources || []).map((x) => ({ path: x.path, line: x.line || null, title: x.title || '' })) };
|
|
197
199
|
}
|
|
200
|
+
/** A folded comment as the page reads it: { text, by: 'you' | 'pmos' | name, at } (task-detail-one-column). Never the session token. */
|
|
201
|
+
function commentOf(c) {
|
|
202
|
+
const by = String((c && c.by) || '');
|
|
203
|
+
return { text: c.text, by: /^pm:/.test(by) ? 'you' : /^agent:/.test(by) ? 'pmos' : by || 'you', at: c.at || null };
|
|
204
|
+
}
|
|
198
205
|
function append(file, actor, ev) {
|
|
199
206
|
const line = { at: new Date().toISOString(), by: actor.by, ...ev };
|
|
200
207
|
// a task line is the initiative's (D104): it goes to the initiative ledger; only when that ledger cannot be placed does it stay here
|
|
@@ -904,6 +911,9 @@ function itemsOf(w, fr, board, rows) {
|
|
|
904
911
|
// the task's description (task-descriptions): carried only when set; descBy 'pmos' when PMOS wrote the last one, with its sources
|
|
905
912
|
const DS = fr.folded.descriptions || new Map();
|
|
906
913
|
if (DS.size) for (const x of out) if (x.src !== 'jira' && DS.has(x.uid)) Object.assign(x, descFields(DS.get(x.uid)));
|
|
914
|
+
// the task's comments (task-detail-one-column): carried only when there are some, for every kind of task (a Jira ticket's stay in PMOS)
|
|
915
|
+
const CM = fr.folded.comments || new Map();
|
|
916
|
+
if (CM.size) for (const x of out) if (x.kind !== 'Epic') { const c = CM.get(x.uid) || (x.src === 'jira' && x.key ? CM.get(String(x.key).toUpperCase()) : null); if (c && c.length) x.comments = c.map(commentOf); }
|
|
907
917
|
return B.rollupItems(out);
|
|
908
918
|
}
|
|
909
919
|
|
|
@@ -1841,6 +1851,25 @@ const WRITES = {
|
|
|
1841
1851
|
describing.set(t.id, run);
|
|
1842
1852
|
try { ctx.json(res, await run); } finally { describing.delete(t.id); }
|
|
1843
1853
|
},
|
|
1854
|
+
'/api/boards/tasks/comment': (ctx, res, body, g) => {
|
|
1855
|
+
// a comment on a task (initiative task-detail-one-column): one line, any kind of task; Jira is never written
|
|
1856
|
+
const p = postFrame(ctx, res, body);
|
|
1857
|
+
if (!p) return;
|
|
1858
|
+
if (typeof body.task !== 'string' || !body.task) return fail(ctx, res, 400, 'task is a task id or a Jira key');
|
|
1859
|
+
if (typeof body.text !== 'string' || !body.text.trim()) return fail(ctx, res, 400, 'text is the comment: write something first');
|
|
1860
|
+
if (body.text.length > B.COMMENT_MAX) return fail(ctx, res, 400, `a comment is at most ${B.COMMENT_MAX} characters`);
|
|
1861
|
+
const jira = B.JIRA_KEY_RE.test(body.task) && !B.taskOf(p.fr.folded, body.task);
|
|
1862
|
+
let id = jira ? body.task.toUpperCase() : body.task;
|
|
1863
|
+
if (!jira) {
|
|
1864
|
+
const t0 = B.taskOf(p.fr.folded, body.task);
|
|
1865
|
+
if (!t0 && TI.isItemId(body.task)) { if (!itemOnBoard(ctx, res, p, body.task)) return; } else if (!t0 || t0.board !== p.board.id) return fail(ctx, res, 404, `no PMOS task ${body.task} on this board`);
|
|
1866
|
+
}
|
|
1867
|
+
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1868
|
+
const line = append(p.file, g.actor, { kind: 'task-comment', board: p.board.id, task: id, text: body.text.replace(/\s+$/, ''), why: 'comment' });
|
|
1869
|
+
console.info('[task-detail] comment');
|
|
1870
|
+
const all = (B.fold(readLedger(ctx, p.w)).comments || new Map()).get(id) || [];
|
|
1871
|
+
ctx.json(res, { ok: true, comment: commentOf(line), comments: all.map(commentOf) });
|
|
1872
|
+
},
|
|
1844
1873
|
'/api/boards/tasks/bulk': (ctx, res, body, g) => {
|
|
1845
1874
|
// bulk move (initiative work-subtasks, board WorkBulkDS): several tasks under a parent, to a stage, to a person, by N days, or to Done.
|
|
1846
1875
|
// Each task goes through the same route a single press uses; the answer's `undo` puts every one back in one press (tasks/bulk-undo)
|
|
@@ -2236,6 +2265,7 @@ function taskState(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/state'
|
|
|
2236
2265
|
function taskAdd(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/add', body, g); }
|
|
2237
2266
|
/** A task's edit, by the same function as the Viewer's (POST /api/boards/tasks/edit; `pmos task set`). body: { ws, board, task, section?, start?, due?, owner?, notes? }. */
|
|
2238
2267
|
function taskEdit(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/edit', body, g); }
|
|
2268
|
+
function taskComment(ctx, body, g) { return writeAs(ctx, '/api/boards/tasks/comment', body, g); }
|
|
2239
2269
|
/** PMOS's own description of a task (POST /api/boards/tasks/describe-draft; task-descriptions). → Promise<{ status, body }> after the draft. */
|
|
2240
2270
|
async function describeDraft(ctx, body, g) {
|
|
2241
2271
|
let out = { status: 500, body: { ok: false, error: 'the draft was not answered' } };
|
|
@@ -2332,4 +2362,4 @@ function meetingBoards(ctx) {
|
|
|
2332
2362
|
return { list, detail };
|
|
2333
2363
|
}
|
|
2334
2364
|
|
|
2335
|
-
module.exports = { prefixes: ['/api/boards'], handle, tasksOfIni, postFrame, needRows, itemsOf, readLedger, foldOf, epicsOf, rowsOfBoard, invalidateRows: (w) => { rowsLib.invalidate(w.root); rowCache.delete(w.root); }, move, switchWorkflow, taskState, taskAdd, taskEdit, 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 };
|
|
2365
|
+
module.exports = { prefixes: ['/api/boards'], handle, 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 };
|
|
@@ -33,7 +33,7 @@ const B = require(repoScript('boards.js'));
|
|
|
33
33
|
const TI = require('./task-items.js');
|
|
34
34
|
const rowsLib = require('./initiative-rows.js');
|
|
35
35
|
|
|
36
|
-
const COMMANDS = { task: ['add', 'list', 'state', 'set', 'remove', 'link', 'unlink', 'describe'] };
|
|
36
|
+
const COMMANDS = { task: ['add', 'list', 'state', 'set', 'remove', 'link', 'unlink', 'describe', 'comment'] };
|
|
37
37
|
const USAGE = [
|
|
38
38
|
'usage: pmos task add|list|state|set|remove — an initiative\'s tasks, the ones the PM sees in its Tasks section',
|
|
39
39
|
' pmos task add <initiative> "<title>" [--stage <stage>] [--due YYYY-MM-DD] [--start YYYY-MM-DD] [--owner <who>] [--notes <text>] [--parent <task>]',
|
|
@@ -58,6 +58,7 @@ const USAGE = [
|
|
|
58
58
|
' The Tasks section groups tasks by the workflow\'s stages: --stage places a task there. It never changes the task\'s state or',
|
|
59
59
|
' moves the initiative. Move the initiative with pmos workflow move.',
|
|
60
60
|
' pmos task describe <task> ["<text>"]',
|
|
61
|
+
' pmos task comment <task> ["<text>"]',
|
|
61
62
|
' Print the task\'s description, or write it when the PM asks (what it is, why, and when it is done). "none" clears it.',
|
|
62
63
|
' The page shows it at once, with Undo. A Jira ticket keeps its description in Jira: it is refused here.',
|
|
63
64
|
' pmos task link <from> <to> [--type fs|ss|ff|sf] [--lag <days>] [--propose --why <text>]',
|
|
@@ -70,7 +71,7 @@ const USAGE = [
|
|
|
70
71
|
const BOOL = new Set(['json', 'help', 'all', 'milestone', 'no-milestone', 'pin', 'no-pin', 'pin-default', 'propose']);
|
|
71
72
|
const PIN_FLAGS = ['pin', 'no-pin', 'pin-default'];
|
|
72
73
|
const VALUE = new Set(['to', 'why', 'root', 'due', 'start', 'owner', 'notes', 'stage', 'type', 'lag', 'parent']);
|
|
73
|
-
const ONLY = { add: ['due', 'start', 'owner', 'notes', 'stage', 'parent'], list: ['all'], state: ['to', 'why'], remove: ['why'], set: ['due', 'start', 'owner', 'notes', 'stage', 'parent'], link: ['type', 'lag', 'why'], unlink: [], describe: [] };
|
|
74
|
+
const ONLY = { add: ['due', 'start', 'owner', 'notes', 'stage', 'parent'], list: ['all'], state: ['to', 'why'], remove: ['why'], set: ['due', 'start', 'owner', 'notes', 'stage', 'parent'], link: ['type', 'lag', 'why'], unlink: [], describe: [], comment: [] };
|
|
74
75
|
const OPEN = new Set(['To do', 'In progress']);
|
|
75
76
|
/** The PM's words for a state: any case, with or without the apostrophe or the space. */
|
|
76
77
|
function stateOf(s) {
|
|
@@ -282,6 +283,28 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
282
283
|
return 0;
|
|
283
284
|
}
|
|
284
285
|
|
|
286
|
+
if (verb === 'comment') {
|
|
287
|
+
// initiative task-detail-one-column: chat writes every card. List with one argument, add one with two; the same route as the page's box
|
|
288
|
+
const [id, text] = pos;
|
|
289
|
+
if (!id || pos.length > 2) { say('usage: pmos task comment <task> ["<text>"]'); return 2; }
|
|
290
|
+
const folded = boards.foldOf(ctx, w);
|
|
291
|
+
const t = findTask(folded, id);
|
|
292
|
+
if (!t) return fail(`no task ${id}; pmos task list <initiative> names them`);
|
|
293
|
+
if (text === undefined) {
|
|
294
|
+
const L = (folded.comments || new Map()).get(id) || [];
|
|
295
|
+
const by = (c) => (/^pm:/.test(String(c.by || '')) ? 'You' : /^agent:/.test(String(c.by || '')) ? 'PMOS' : c.by || 'You');
|
|
296
|
+
if (json) say(JSON.stringify({ ok: true, task: id, comments: L.map((c) => ({ text: c.text, by: by(c), at: c.at })) }));
|
|
297
|
+
else if (!L.length) say(`${id} has no comments yet.`);
|
|
298
|
+
else for (const c of L) say(`${String(c.at || '').slice(0, 10)} ${by(c)}: ${c.text}`);
|
|
299
|
+
return 0;
|
|
300
|
+
}
|
|
301
|
+
const e = boards.taskComment(ctx, { ws: w.id, board: t.board, task: id, text: String(text) }, g);
|
|
302
|
+
if (!e.body || e.body.ok !== true) return fail((e.body && e.body.error) || 'the write was refused');
|
|
303
|
+
if (json) say(JSON.stringify({ ok: true, task: id, comment: e.body.comment }));
|
|
304
|
+
else say(`✓ ${id} has your comment: ${t.title}. The page shows it under Activity › Comments. Nothing was sent.`);
|
|
305
|
+
return 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
285
308
|
if (verb === 'remove') {
|
|
286
309
|
// batch 7 item 5: a task added by mistake goes from every list (POST /api/boards/tasks/delete, the page's ⋯ Delete)
|
|
287
310
|
if (!pos.length) { say('usage: pmos task remove <task> [<task> …] [--why <text>]'); return 2; }
|
|
@@ -28,7 +28,7 @@ const path = require('path');
|
|
|
28
28
|
const ledgers = require('./plan-ledgers.js');
|
|
29
29
|
|
|
30
30
|
const LEDGER = 'initiative-tasks.jsonl';
|
|
31
|
-
const TASK_KINDS = Object.freeze(['task', 'task-update', 'task-remove', 'task-restore', 'task-section', 'task-milestone', 'task-pin', 'task-order', 'task-parent', 'task-priority', 'task-description']);
|
|
31
|
+
const TASK_KINDS = Object.freeze(['task', 'task-update', 'task-remove', 'task-restore', 'task-section', 'task-milestone', 'task-pin', 'task-order', 'task-parent', 'task-priority', 'task-description', 'task-comment']);
|
|
32
32
|
const KINDS = new Set(TASK_KINDS);
|
|
33
33
|
const isTaskKind = (k) => KINDS.has(k);
|
|
34
34
|
const isTaskLine = (r) => !!r && typeof r === 'object' && !Array.isArray(r) && isTaskKind(r.kind);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.769.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.769.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -53,17 +53,55 @@ button.ctp-cr:hover { text-decoration: underline; }
|
|
|
53
53
|
.ctp-hx .grey { color: var(--cz-ink2); }
|
|
54
54
|
.ctp-hx .warn { color: var(--cz-late); }
|
|
55
55
|
|
|
56
|
-
/*
|
|
57
|
-
* With no popup behind (a task opened from Today, Events, Goals or Search) it is centred and
|
|
58
|
-
|
|
59
|
-
.ctp-full
|
|
60
|
-
.ctp-
|
|
61
|
-
.ctp-
|
|
62
|
-
.ctp-
|
|
63
|
-
.ctp-
|
|
64
|
-
.ctp-
|
|
56
|
+
/* task-detail-one-column (board TjC): the full popup is ONE column of Komorebi blocks (pm/vw-ds.js), under the title and its chip row, so it
|
|
57
|
+
* reads the same beside the open chat (TjCChat). With no popup behind (a task opened from Today, Events, Goals or Search) it is centred and
|
|
58
|
+
* near full (ctp-solo). */
|
|
59
|
+
.ctp.ctp-full.ctp-solo { left: var(--space-24); top: var(--space-24); right: var(--space-24); bottom: var(--space-24); margin: 0 auto; max-width: 880px; }
|
|
60
|
+
.ctp-full .ctp-th { margin-bottom: var(--space-8); }
|
|
61
|
+
.ctp-mk { display: inline-flex; color: var(--muted); flex: none; }
|
|
62
|
+
.ctp-key { flex: none; }
|
|
63
|
+
.ctp-jira { text-decoration: none; }
|
|
64
|
+
.ctp-col { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; max-width: 760px; }
|
|
65
|
+
.ctp-col > div:empty { display: none; }
|
|
66
|
+
.ctp-col .ctp-hx { margin: 0; }
|
|
65
67
|
.ctp-say { margin: 0; }
|
|
66
|
-
|
|
68
|
+
/* the chip row: Status, the owner, Start → Due, a chip per set field, + (task-card.js layout 'chips') */
|
|
69
|
+
.ctp-chips { margin: 0 0 var(--space-16); }
|
|
70
|
+
.ctp-chips .tkc-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
|
|
71
|
+
.ctp-chips .tkc-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card); color: var(--ink); font: inherit; font-size: var(--fs-meta); line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
|
|
72
|
+
.ctp-chips .tkc-chip:hover, .ctp-chips .tkc-chip.open { background: var(--well); }
|
|
73
|
+
.ctp-chips .tkc-chip:focus-visible { outline: none; box-shadow: var(--glow); }
|
|
74
|
+
.ctp-chips .tkc-chip:disabled, .ctp-chips .tkc-chip.ro { cursor: default; background: var(--card); }
|
|
75
|
+
.ctp-chips .tkc-chip .k { color: var(--muted); }
|
|
76
|
+
.ctp-chips .tkc-chip.ghost { color: var(--muted); border-style: dashed; }
|
|
77
|
+
.ctp-chips .tkc-chip.st { font-weight: var(--fw-strong); }
|
|
78
|
+
.ctp-chips .tkc-chip.s-prog { background: var(--blue-tint); }
|
|
79
|
+
.ctp-chips .tkc-chip.s-done { background: var(--leaf-tint); }
|
|
80
|
+
.ctp-chips .tkc-chip.late { color: var(--alert); }
|
|
81
|
+
.ctp-chips .tkc-chip.agent svg { color: var(--leaf); }
|
|
82
|
+
.ctp-chips .tkc-chip.plus { width: 32px; padding: 0; justify-content: center; color: var(--muted); }
|
|
83
|
+
.ctp-chips .tkc-chip .av { width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--well); color: var(--muted); font-size: var(--fs-badge); font-weight: var(--fw-strong); display: inline-flex; align-items: center; justify-content: center; }
|
|
84
|
+
.ctp-chips .tkc-msg:empty { display: none; }
|
|
85
|
+
.ctp-chips .tkc-msg { margin: var(--space-8) 0 0; color: var(--alert); font-size: var(--fs-meta); }
|
|
86
|
+
/* Notes, Subtasks, Activity */
|
|
87
|
+
.ctp-notes { display: flex; flex-direction: column; gap: var(--space-8); }
|
|
88
|
+
.ctp-notes .head, .ctp-actb .head, .ctp-subs .head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
|
|
89
|
+
.ctp-sbar { height: 6px; margin: 0 var(--space-16) var(--space-8); }
|
|
90
|
+
.ctp-subs .ctp-sadd, .ctp-actb .ctp-cbox { margin: var(--space-4) var(--space-16) var(--space-16); }
|
|
91
|
+
.ctp-actb .pm-state, .ctp-actb .pm-fold { margin-left: var(--space-16); margin-right: var(--space-16); }
|
|
92
|
+
.ctp-sbar i { display: block; height: 100%; background: var(--leaf); border-radius: var(--radius-pill); }
|
|
93
|
+
.ctp-sub .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
|
|
94
|
+
.ctp-sub.on .t { color: var(--muted); text-decoration: line-through; }
|
|
95
|
+
.ctp-sadd, .ctp-cbox { display: flex; align-items: flex-end; gap: var(--space-8); }
|
|
96
|
+
.ctp-ci { height: auto; min-height: 40px; padding: var(--space-8) var(--space-12); resize: none; field-sizing: content; line-height: 1.5; }
|
|
97
|
+
.ctp-ct { white-space: normal; overflow-wrap: anywhere; }
|
|
98
|
+
.ctp-actb .pm-state { padding: 0 0 var(--space-8); }
|
|
99
|
+
.ctp-dmore { align-self: flex-start; }
|
|
100
|
+
.ctp-descw.ctp-fold .ctp-desc > :not(.head):not(:nth-child(2)) { display: none; }
|
|
101
|
+
.ctp-descw.ctp-fold .ctp-desc > :nth-child(2) { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
|
|
102
|
+
.ctp-menu .ctp-ph { display: none; }
|
|
103
|
+
.ctp-menu a { display: flex; align-items: center; gap: var(--space-8); padding: 7px var(--space-8); border-radius: 7px; font-size: var(--fs-meta); color: var(--cz-ink); text-decoration: none; }
|
|
104
|
+
.ctp-menu a:hover, .ctp-menu a:focus-visible { background: var(--cz-well); outline: none; }
|
|
67
105
|
/* the Description block (initiative task-descriptions): the text, Done when as a short list, PMOS's sources; edited in place like the notes */
|
|
68
106
|
.ctp-desc { display: flex; flex-direction: column; gap: var(--space-8); }
|
|
69
107
|
.ctp-desc .head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
|
|
@@ -75,13 +113,9 @@ button.ctp-cr:hover { text-decoration: underline; }
|
|
|
75
113
|
.ctp-dt:hover { background: var(--cz-well); }
|
|
76
114
|
.ctp-dt:focus { background: var(--cz-card); box-shadow: 0 0 0 1.5px var(--cz-blue), 0 0 0 5px var(--cz-bluebg); }
|
|
77
115
|
.ctp-ad { flex: none; width: 52px; }
|
|
78
|
-
.ctp-
|
|
79
|
-
.ctp-
|
|
80
|
-
.ctp-
|
|
81
|
-
@media (max-width: 900px) {
|
|
82
|
-
.ctp-g { grid-template-columns: minmax(0, 1fr); }
|
|
83
|
-
.ctp-side { position: static; order: -1; }
|
|
84
|
-
}
|
|
116
|
+
.ctp-col .pm-li { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
|
|
117
|
+
.ctp-col .pm-li:hover { background: var(--well); }
|
|
118
|
+
.ctp-col div.pm-li { cursor: default; }
|
|
85
119
|
|
|
86
120
|
/* PhoneWorkDS (job 1540): on a phone a task or a milestone opens full screen, with ← back to the initiative. No margins, one column. */
|
|
87
121
|
@media (max-width: 760px) {
|
|
@@ -94,4 +128,10 @@ button.ctp-cr:hover { text-decoration: underline; }
|
|
|
94
128
|
.ctp-full .ovw.tk-ini { background: none; padding-left: 0; padding-right: 0; border-radius: 0; }
|
|
95
129
|
.ctp-full .pm-block.list .head, .ctp-full .pm-block.list .pm-li { padding-left: 0; padding-right: 0; }
|
|
96
130
|
.ctp-full .ctp-b { padding: 0; }
|
|
131
|
+
/* TjPhone: the same chip row and order, 44 px targets, ↑ ↓ in ⋯, the comment box pinned at the bottom */
|
|
132
|
+
.ctp-full .ctp-step, .ctp-full .ctp-jira, .ctp-full .ctp-key { display: none; }
|
|
133
|
+
.ctp-menu .ctp-ph { display: flex; }
|
|
134
|
+
.ctp-full .ctp-ib, .ctp-chips .tkc-chip, .ctp-col .pm-btn { min-height: 44px; min-width: 44px; }
|
|
135
|
+
.ctp-chips .tkc-chip.plus { width: 44px; }
|
|
136
|
+
.ctp-full .ctp-cbox { position: sticky; bottom: calc(-1 * var(--space-24)); background: var(--card); padding: var(--space-8) 0 calc(env(safe-area-inset-bottom, 0px) + var(--space-8)); margin-bottom: calc(-1 * var(--space-8)); }
|
|
97
137
|
}
|