create-pmos 0.560.0 → 0.561.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/okf/core/templates/done-test-template.md +47 -0
- package/payload/okf/core/templates/experiment-record-template.md +62 -0
- package/payload/okf/core/templates/index.md +2 -0
- 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/agent-capabilities.md +1 -1
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/jira.md +2 -2
- package/workspace/guide/reports.md +1 -1
- package/workspace/guide/settings-and-switches.md +1 -0
- package/workspace/lib/actor.js +2 -2
- package/workspace/lib/artefacts.js +1 -1
- package/workspace/lib/autonomy.js +1 -1
- package/workspace/lib/board-goals.js +1 -1
- package/workspace/lib/chat-file-locate.js +2 -2
- package/workspace/lib/corrections-memory.js +1 -1
- package/workspace/lib/drive-guard.js +5 -5
- package/workspace/lib/driver.js +1 -1
- package/workspace/lib/first-input.js +1 -1
- package/workspace/lib/folder-repair.js +1 -1
- package/workspace/lib/git-identity.js +1 -1
- package/workspace/lib/goal-loop.js +1 -1
- package/workspace/lib/goal-source.js +1 -1
- package/workspace/lib/harness-parse.js +1 -1
- package/workspace/lib/impact-cli.js +1 -1
- package/workspace/lib/impact.js +1 -1
- package/workspace/lib/initiative-chat.js +1 -1
- package/workspace/lib/item-cli.js +1 -1
- package/workspace/lib/meeting-suggest.js +3 -3
- package/workspace/lib/meeting-terms.js +2 -2
- package/workspace/lib/notes.js +1 -1
- package/workspace/lib/okr-goals.js +2 -2
- package/workspace/lib/one-stage.js +1 -1
- package/workspace/lib/plan-items.js +3 -3
- package/workspace/lib/pm-slug.js +51 -0
- package/workspace/lib/profile-default.js +1 -1
- package/workspace/lib/program-chat.js +2 -2
- package/workspace/lib/programs.js +1 -1
- package/workspace/lib/ready-reports.js +1 -1
- package/workspace/lib/report-acts.js +3 -3
- package/workspace/lib/report-cli.js +1 -1
- package/workspace/lib/report-draft.js +1 -1
- package/workspace/lib/routes-autonomy.js +1 -1
- package/workspace/lib/routes-boards.js +3 -3
- package/workspace/lib/routes-insights-premium.js +1 -1
- package/workspace/lib/routes-programs.js +2 -2
- package/workspace/lib/session-name.js +1 -1
- package/workspace/lib/skill-store.js +4 -4
- package/workspace/lib/skills-registry.js +5 -2
- package/workspace/lib/transcript-read.js +1 -1
- package/workspace/lib/typesafe-settings.js +1 -1
- package/workspace/lib/worktree-gc.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-asks.js +1 -1
- package/workspace/public/pm/bd-prog-panel.js +2 -2
- package/workspace/public/pm/bd-prog.js +1 -1
- package/workspace/public/pm/bd-span.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/cozy-pick.js +1 -1
- package/workspace/public/pm/cozy-viewer.js +1 -1
- package/workspace/public/pm/goals-clear.js +1 -1
- package/workspace/public/pm/home-app.js +1 -1
- package/workspace/public/pm/home-ini-model.js +1 -1
- package/workspace/public/pm/ini-view.js +1 -1
- package/workspace/public/pm/loose-props.js +1 -1
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-insights.js +1 -1
- package/workspace/public/pm/premium-report-read.js +1 -1
- package/workspace/public/pm/premium-shell.js +1 -1
- package/workspace/public/pm/prog-move.js +2 -2
- package/workspace/public/pm/stage-chip.js +1 -1
- package/workspace/public/pm/state.js +10 -10
- package/workspace/public/pm/tk-send.js +1 -1
- package/workspace/run-tests.js +5 -1
- package/workspace/server.js +16 -16
- package/workspace/skills/gather-requirements.skill +1 -1
- package/workspace/skills/impact-detect.skill +1 -1
- package/workspace/skills/live-notes.skill +1 -1
- package/workspace/skills/loose-propose.skill +1 -1
- package/workspace/skills/measure.skill +1 -1
- package/workspace/skills/metric-draft.skill +1 -1
- package/workspace/skills/report-design.skill +1 -1
- package/workspace/skills/report-setup.skill +1 -1
- package/workspace/skills/report-weekly.skill +1 -1
- package/workspace/skills/report-write.skill +1 -1
- package/workspace/skills/story-first.skill +1 -1
- package/workspace/test-lists/pm-slug.json +9 -0
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* read-only checker (scripts/check-plan-items.js). Agents reach this module only through `pmos item`. Every
|
|
10
10
|
* require of this file is spelled with `.js` so scripts/check-separation.js lists each caller by name.
|
|
11
11
|
*
|
|
12
|
-
* ATTRIBUTION IS SET BY THE CALL PATH, NEVER BY A FIELD. `appendFromUi` writes `pm
|
|
13
|
-
* `appendFromCli` writes `pm
|
|
12
|
+
* ATTRIBUTION IS SET BY THE CALL PATH, NEVER BY A FIELD. `appendFromUi` writes `pm:<slug>` / `ui`;
|
|
13
|
+
* `appendFromCli` writes `pm:<slug>` only at an interactive terminal, `agent:<PMOS_SESSION>` from a bound
|
|
14
14
|
* session, and `agent:unknown` otherwise. A caller that sends `by`, `via`, `at`, `eid`, `v` or `override`
|
|
15
15
|
* is refused — accepting one, even an identical one, would make the field something a caller chooses.
|
|
16
16
|
*
|
|
@@ -40,7 +40,7 @@ const LEDGER = 'plan-items.jsonl';
|
|
|
40
40
|
// `restored` (batch 11 item 16) is the Undo of a Delete: it brings back a withdrawn item as it was. A delete is a withdraw with why "deleted".
|
|
41
41
|
const EVENTS = ['planned', 'set', 'moved', 'flagged', 'withdrawn', 'kept', 'restored'];
|
|
42
42
|
const STATES = ['todo', 'doing', 'review', 'done'];
|
|
43
|
-
const PM_SLUG =
|
|
43
|
+
const PM_SLUG = actorLib.PM_SLUG; // lib/pm-slug.js
|
|
44
44
|
const ID_RE = /^(.+)\.([0-9a-z]{10})$/;
|
|
45
45
|
const INIT_RE = planTree.INIT_RE;
|
|
46
46
|
const SESSION_RE = /^sess-\d+\.[0-9a-f]{8}$/;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/* pm-slug.js — the short name of this install's PM, as every ledger line carries it (`pm:<slug>`, `human:<slug>`).
|
|
3
|
+
*
|
|
4
|
+
* slug() → the name, read once per process and then kept
|
|
5
|
+
* slugify(text) → lower case a-z, 0-9, `_` and `-`, at most 40 characters, or '' (the form actor.BY_RE accepts)
|
|
6
|
+
* resolve({ env, gitName, userName }) → the name from these inputs. PURE; slug() calls it with the real ones.
|
|
7
|
+
*
|
|
8
|
+
* The order:
|
|
9
|
+
* 1. PMOS_PM, when it is set (a PM who wants another name, and the test runner)
|
|
10
|
+
* 2. the first word of the git user name (`git config user.name` from the home folder), the name Home greets the PM by
|
|
11
|
+
* 3. the computer's user name
|
|
12
|
+
* 4. 'pm'
|
|
13
|
+
*
|
|
14
|
+
* The kit used to write one fixed name here, so every install recorded its PM under the same person. Records from before
|
|
15
|
+
* still read as the PM's: the readers test the `pm:` or `human:` prefix, never the name after it.
|
|
16
|
+
*/
|
|
17
|
+
const os = require('os');
|
|
18
|
+
|
|
19
|
+
const FALLBACK = 'pm';
|
|
20
|
+
|
|
21
|
+
function slugify(text) {
|
|
22
|
+
return String(text == null ? '' : text)
|
|
23
|
+
.normalize('NFKD').replace(/[̀-ͯ]/g, '')
|
|
24
|
+
.toLowerCase().replace(/[^a-z0-9_-]+/g, '-').replace(/^-+|-+$/g, '')
|
|
25
|
+
.slice(0, 40).replace(/-+$/, '');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function resolve({ env = {}, gitName = '', userName = '' } = {}) {
|
|
29
|
+
const fromEnv = slugify(env.PMOS_PM);
|
|
30
|
+
if (fromEnv) return fromEnv;
|
|
31
|
+
const first = String(gitName || '').trim().split(/\s+/)[0];
|
|
32
|
+
return slugify(first) || slugify(userName) || FALLBACK;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function gitUserName() {
|
|
36
|
+
try {
|
|
37
|
+
return String(require('child_process').execFileSync('git', ['config', 'user.name'],
|
|
38
|
+
{ cwd: os.homedir(), encoding: 'utf8', timeout: 2000, stdio: ['ignore', 'pipe', 'ignore'] })).trim();
|
|
39
|
+
} catch { return ''; }
|
|
40
|
+
}
|
|
41
|
+
function osUserName() { try { return os.userInfo().username || ''; } catch { return ''; } }
|
|
42
|
+
|
|
43
|
+
let cached = null;
|
|
44
|
+
function slug() {
|
|
45
|
+
if (cached) return cached;
|
|
46
|
+
const env = process.env;
|
|
47
|
+
cached = slugify(env.PMOS_PM) || resolve({ gitName: gitUserName(), userName: osUserName() });
|
|
48
|
+
return cached;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = { slug, slugify, resolve, FALLBACK };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* D68 gave a new repository the `pm-artifacts` profile (create-pmos writes `.pmos-profile`; `--code` opts out). A repository made before
|
|
6
6
|
* that has no `.pmos-profile`, so PMOS read it as a CODE repository: its records were saved only on the default branch, nothing put its
|
|
7
|
-
* folder back, and a worktree was made per initiative.
|
|
7
|
+
* folder back, and a worktree was made per initiative. Three products were like this, and one product's folder sat on a feature
|
|
8
8
|
* branch with its records unsaved.
|
|
9
9
|
*
|
|
10
10
|
* ensure(root) → { action, why }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
/* program-chat — what a chat knows about programs (bug 2026-10-24: "Set Project
|
|
2
|
+
/* program-chat — what a chat knows about programs (bug 2026-10-24: "Set Project Horizon as Program" in Home chat).
|
|
3
3
|
* A program is the level above initiatives, across products (initiative program-hierarchy). It is a PMOS record in each workspace's
|
|
4
4
|
* <state>/programs.jsonl (lib/programs.js), not a key on an initiative record. Without this rule a chat looked for "a program marker", found
|
|
5
5
|
* none, and invented one (`kind: programme` in the initiative's front matter, children linked by `parent_programme`). Nothing reads those keys.
|
|
@@ -16,7 +16,7 @@ const isAsk = (text) => ASK_RE.test(String(text == null ? '' : text)) && !String
|
|
|
16
16
|
|
|
17
17
|
const RULE = [
|
|
18
18
|
'PMOS has programs. A program is the level above initiatives (Program > Initiative > Epic) and can span products. It has no stages of its own: its state, products and stage spread come from its initiatives.',
|
|
19
|
-
'A program is a record in programs.jsonl in a workspace state folder (pmos/state/ or the workspace state folder), one JSON line each: {"kind":"program",…} is the charter, {"kind":"member","program":"<id>","initiative":"<id>"} puts an initiative in it, and "leave", "task", "check", "order" (the PM\'s sequence of its initiatives) and "archive" lines follow the same pattern. A program id is its title in lower case with dashes, for example project-
|
|
19
|
+
'A program is a record in programs.jsonl in a workspace state folder (pmos/state/ or the workspace state folder), one JSON line each: {"kind":"program",…} is the charter, {"kind":"member","program":"<id>","initiative":"<id>"} puts an initiative in it, and "leave", "task", "check", "order" (the PM\'s sequence of its initiatives) and "archive" lines follow the same pattern. A program id is its title in lower case with dashes, for example project-horizon.',
|
|
20
20
|
'A program is NOT a key on an initiative. Never add kind, program, programme, parent_program or parent_programme to an initiative record or any front matter: nothing reads them.',
|
|
21
21
|
'You never make, change, join, leave or archive a program yourself, and you never write programs.jsonl: the routes refuse an agent session, and the PM presses on the Board.',
|
|
22
22
|
'Tell the PM which press does what they asked:',
|
|
@@ -37,7 +37,7 @@ const INI_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,80}$/;
|
|
|
37
37
|
const DAY_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
38
38
|
const str = (v, n) => String(v == null ? '' : v).replace(/[\u0000-\u001f]+/g, ' ').trim().slice(0, n);
|
|
39
39
|
|
|
40
|
-
/** A program id from a title: "Project
|
|
40
|
+
/** A program id from a title: "Project Horizon" → "project-horizon". */
|
|
41
41
|
const slug = (t) => String(t || '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 60);
|
|
42
42
|
/** A milestone id from its name that no other milestone of the charter has: "Pilot live" → "pilot-live", then "pilot-live-2". */
|
|
43
43
|
function idOf(name, taken) {
|
|
@@ -230,7 +230,7 @@ function promiseOf(row, rows, kept) {
|
|
|
230
230
|
|
|
231
231
|
function goalDot(r) { return r.now === null ? 'none' : r.off ? 'behind' : r.ahead ? 'ahead' : 'on'; }
|
|
232
232
|
const SHORT_MAX = 56; // a goal card's title fits two lines of the Viewer at 390 px (batch 21 item 2, RdProgL)
|
|
233
|
-
/** A goal's short title for the one program page (RdProgL "
|
|
233
|
+
/** A goal's short title for the one program page (RdProgL "Old sign-in retired, every user on the new login."): the KR id goes to its own chip,
|
|
234
234
|
* so it leaves the title; then the part before a dash, a colon or a bracket that carries the detail, when that part says enough (3 words or
|
|
235
235
|
* more); then cut at a word. Pure: it only shortens the record's own words, it never writes new ones. → { short, kr } */
|
|
236
236
|
function shortTitle(title, anchor) {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* WHY. The grill (3 Nov, on 0.514.0) found the five drafts that wait for the PM at the bottom of the panel, under "Yours", named by their id
|
|
12
12
|
* ("daily"), previewed by the warning "this definition is a draft", and with no press that settles them. Each waiting report now has ONE ✓,
|
|
13
13
|
* the act that unblocks it, in this order:
|
|
14
|
-
* move the report is about another product than the one it sits in (
|
|
14
|
+
* move the report is about another product than the one it sits in (a pricing review in the Acme Shop workspace) → "Move to Acme Web"
|
|
15
15
|
* confirm its draft follows a definition an agent proposed and nobody has confirmed (status: draft, no setup) → "Confirm the definition"
|
|
16
16
|
* issue a draft waits and its definition is confirmed → "Issue" (POST /api/report/issue with the sha of the file as read)
|
|
17
17
|
* resume a set-up report is paused → "Resume"
|
|
@@ -27,7 +27,7 @@ const refuse = (status, error) => ({ ok: false, status, error });
|
|
|
27
27
|
const clean = (s) => String(s == null ? '' : s).replace(/\s+/g, ' ').trim();
|
|
28
28
|
const escRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
29
29
|
|
|
30
|
-
/** "Daily report definition" → "Daily report"; "
|
|
30
|
+
/** "Daily report definition" → "Daily report"; "Pricing review report definition" → "Pricing review report". '' when there is none. PURE. */
|
|
31
31
|
function defTitleOf(def) {
|
|
32
32
|
const t = clean(def && def.title).replace(/^["']|["']$/g, '');
|
|
33
33
|
if (!t || (def && t === def.id)) return '';
|
|
@@ -130,7 +130,7 @@ function copyReportTree(from, to) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* Move a set-up report to the product it is about (Reports and dashboards redesign R, "✦ Move to
|
|
133
|
+
* Move a set-up report to the product it is about (Reports and dashboards redesign R, "✦ Move to Acme Web"): its definition, its drafts and its
|
|
134
134
|
* setup line go to `toRoot`, and it is removed here. A report with an ISSUED issue is refused (409): an issued report is never moved or deleted,
|
|
135
135
|
* it stays where it was issued. The id must be free in the target. Everything is copied before anything is removed here, so a failed copy
|
|
136
136
|
* leaves this workspace as it was (and removes what it copied). → { ok, id, moved: [rel] } | { ok: false, status, error }
|
|
@@ -211,7 +211,7 @@ async function run(argv, { say = (s) => console.log(s), cwd = process.cwd(), isT
|
|
|
211
211
|
async function engineVerb(verb, { pos, flags, root, json, say, fail, isTTY, env, stdin, now }) {
|
|
212
212
|
const RE = require('./report-engine.js');
|
|
213
213
|
const id = pos[0];
|
|
214
|
-
if (!id || !RE.ID_RE.test(id)) { say(`usage: pmos report ${verb} <id> … (the id is lower case letters, digits and dashes, for example
|
|
214
|
+
if (!id || !RE.ID_RE.test(id)) { say(`usage: pmos report ${verb} <id> … (the id is lower case letters, digits and dashes, for example pricing-review)`); return 2; }
|
|
215
215
|
let clock = now == null ? Date.now() : now;
|
|
216
216
|
if (flags.now !== undefined) { clock = Date.parse(flags.now); if (!Number.isFinite(clock)) return fail('--now must be a time, for example 2026-10-16T09:00:00Z', 2); }
|
|
217
217
|
const slot = flags.slot !== undefined ? flags.slot : undefined;
|
|
@@ -515,7 +515,7 @@ function render(draft, { notes, name: given, purpose } = {}) {
|
|
|
515
515
|
if (!draft || draft.ok === false) return '';
|
|
516
516
|
const n = notes && typeof notes === 'object' ? notes : {};
|
|
517
517
|
const noteOf = (id, fallback) => (has(n, id) ? n[id] : (fallback == null ? '' : fallback));
|
|
518
|
-
// The title is the report's own name (its definition's), never its id: "
|
|
518
|
+
// The title is the report's own name (its definition's), never its id: "Pricing review report 2026-11-02", not "Pricing-review-report report …".
|
|
519
519
|
const named = isStr(given) && given.trim() ? given.trim().replace(/["\\]/g, "'") : '';
|
|
520
520
|
const name = named ? (/\breport$/i.test(named) ? named.replace(/\s*report$/i, '') : named) : cap(draft.cadence);
|
|
521
521
|
// The description is what readers see under the title: the report's purpose. How the file is made stays in this module's header.
|
|
@@ -69,7 +69,7 @@ async function undoRef(ctx, w, ref, g) {
|
|
|
69
69
|
return bad(400, 'ref is a Driver proposal id (p-…) or a ✦ batch id (pk-…)');
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/* the Driver's kinds said as an act: "problem:
|
|
72
|
+
/* the Driver's kinds said as an act: "problem: Checkout tickets lack…" reads "Wrote the problem: Checkout tickets lack…" */
|
|
73
73
|
const ACT = { problem: 'Wrote the problem', evidence: 'Added evidence', sizing: 'Sized it', assumption: 'Wrote an assumption', stakeholders: 'Named the people',
|
|
74
74
|
move: 'Moved it', note: 'Added a note', doc: 'Drafted a document', overlap: 'Noted an overlap', artefact: 'Wrote the experiment', 'next-step': 'Set the next step', 'follow-up': 'Set a follow-up' };
|
|
75
75
|
function sayOf(a) {
|
|
@@ -484,7 +484,7 @@ const maxDay = (a, b) => (!a ? b || null : !b ? a : a > b ? a : b);
|
|
|
484
484
|
/** batch 26 item 5: whether an initiative stands in its workflow's terminal stage. Read from the workflow first: the stage is in the Done
|
|
485
485
|
* category, or it is the last stage (stages after it that only end work, such as Won't do or Cancelled, do not count). A stage the workflow
|
|
486
486
|
* does not hold (a Jira-read status such as "Closed") is terminal when its name says so, as tkStatus reads a ticket (done, closed, resolved,
|
|
487
|
-
* released). Follow-up (
|
|
487
|
+
* released). Follow-up (a board's rows still late after #1202): the board column branch ignored the Done category and any stage outside the list. */
|
|
488
488
|
const TERMINAL_RE = /\b(done|closed|resolved|released|complete|completed|finished)\b/i;
|
|
489
489
|
const END_RE = /\b(won'?t do|cancel+ed|archived|abandoned|dropped|rejected)\b/i;
|
|
490
490
|
const isDoneCat = (c) => String(c || '').toLowerCase() === 'done';
|
|
@@ -1336,7 +1336,7 @@ const WRITES = {
|
|
|
1336
1336
|
if (typeof body.id !== 'string' || !body.id) return fail(ctx, res, 400, 'id is required');
|
|
1337
1337
|
if (!p.board.build) return fail(ctx, res, 409, `${p.board.name} has Build and deliver off, so it mirrors no Jira`);
|
|
1338
1338
|
const list = Array.isArray(body.epics) ? body.epics : typeof body.epics === 'string' ? body.epics.split(/[,\s]+/).filter(Boolean) : null;
|
|
1339
|
-
if (!list || list.length > 20 || list.some((k) => typeof k !== 'string' || !B.JIRA_KEY_RE.test(k.trim()))) return fail(ctx, res, 400, 'epics is a list of Jira keys (at most 20), each like
|
|
1339
|
+
if (!list || list.length > 20 || list.some((k) => typeof k !== 'string' || !B.JIRA_KEY_RE.test(k.trim()))) return fail(ctx, res, 400, 'epics is a list of Jira keys (at most 20), each like SHOP-2685');
|
|
1340
1340
|
const epics = [...new Set(list.map((k) => k.trim().toUpperCase()))];
|
|
1341
1341
|
const projects = p.board.jiraProjects || [];
|
|
1342
1342
|
const off = projects.length ? epics.filter((k) => !projects.includes(k.split('-')[0])) : [];
|
|
@@ -1590,7 +1590,7 @@ const WRITES = {
|
|
|
1590
1590
|
// the PM's own notes on a Jira ticket (canvas XetX1Jira): Jira keeps the title, status, dates and assignee
|
|
1591
1591
|
const p = postFrame(ctx, res, body);
|
|
1592
1592
|
if (!p) return;
|
|
1593
|
-
if (typeof body.ref !== 'string' || !B.JIRA_KEY_RE.test(body.ref)) return fail(ctx, res, 400, 'ref is a Jira key, like
|
|
1593
|
+
if (typeof body.ref !== 'string' || !B.JIRA_KEY_RE.test(body.ref)) return fail(ctx, res, 400, 'ref is a Jira key, like SHOP-2685');
|
|
1594
1594
|
if (typeof body.notes !== 'string' || body.notes.length > 4000) return fail(ctx, res, 400, 'notes are text of at most 4000 characters');
|
|
1595
1595
|
if (!p.file) return fail(ctx, res, 409, NO_STATE);
|
|
1596
1596
|
const ref = body.ref.toUpperCase(), from = p.fr.folded.ticketNotes.get(p.board.id + '\u0000' + ref) || '';
|
|
@@ -134,7 +134,7 @@ module.exports = {
|
|
|
134
134
|
}
|
|
135
135
|
// premium-uncovered-features (IsMenus): the product picker says how many goals each product's workspace records; a workspace that cannot be read says none
|
|
136
136
|
const counts = new Map();
|
|
137
|
-
// one goal source: a product's goals are its key results plus the records no key result claims (
|
|
137
|
+
// one goal source: a product's goals are its key results plus the records no key result claims (a product with 10 key results and 1 record said 1 before)
|
|
138
138
|
const countOf = (w) => { if (w === ws && goalSrc) return goalSrc.count; let r = null; try { const x = ctx.getWs(w); r = x && x.root ? require('path').resolve(x.root) : null; } catch { r = null; } const s = GSRC.source({ root: r, recordsDir: recordsDirFor(ctx, w) }); return s.ok ? s.count : null; };
|
|
139
139
|
const goalsIn = (w) => { if (!counts.has(w)) { let n = null; try { n = countOf(w); } catch { n = null; } counts.set(w, n); } return counts.get(w) === null ? {} : { goals: counts.get(w) }; };
|
|
140
140
|
// batch 16 item 6 ("Claude runs the OKRs"): the reading ledger, each record's own history, and the product's open drafts
|
|
@@ -51,7 +51,7 @@ const fileOf = (ctx, w, create = true) => { const d = stateDir(ctx, w, create);
|
|
|
51
51
|
const read = (f) => { try { return f ? pmItems.readLines(f).filter(Boolean) : []; } catch { return []; } };
|
|
52
52
|
|
|
53
53
|
/** The registered workspace a linked git worktree stands for: the one at the same place in the repo's main tree. A worktree is its own
|
|
54
|
-
* checkout, so it carries its own copy of programs.jsonl, and registered it is its own "product" (`
|
|
54
|
+
* checkout, so it carries its own copy of programs.jsonl, and registered it is its own "product" (`acme-shop ⑂ initiative/x`). Read as
|
|
55
55
|
* such, a charter saved from the worktree puts the program under the worktree product while its members sit under the main one, and a
|
|
56
56
|
* member line that both hold shows twice. So the ledgers of a repo's trees are read as ONE product, the main tree's. Null when the
|
|
57
57
|
* workspace is not a linked worktree, or its main tree is not registered (nothing to fold into). Memoised: all() runs on every poll. */
|
|
@@ -82,7 +82,7 @@ function all(ctx, now = Date.now()) {
|
|
|
82
82
|
const perWs = list.map((w) => ({ ws: (of(w) || w).id, lines: read(fileOf(ctx, w, false)), tree: of(w) ? 0 : 1 })).sort((a, b) => a.tree - b.tree);
|
|
83
83
|
const progs = P.merge(perWs);
|
|
84
84
|
// an initiative the PM deleted on the board (lib/ini-deleted.js) is no longer a member: the ledger line stays, so a restore brings it back,
|
|
85
|
-
// and the program does not keep naming what no list shows (
|
|
85
|
+
// and the program does not keep naming what no list shows (a program kept `decommission` after it was deleted)
|
|
86
86
|
const rootOf = new Map(list.map((w) => [w.id, w.root]));
|
|
87
87
|
for (const p of progs) p.members = (p.members || []).filter((m) => { const r = rootOf.get(m.ws); return !(r && deletedIds.ids(r).has(m.initiative)); });
|
|
88
88
|
const R = new Map();
|
|
@@ -55,7 +55,7 @@ function due(s, { hx, automatic = false, now = Date.now() } = {}) {
|
|
|
55
55
|
|
|
56
56
|
function promptFor({ first, last, answer, current }) {
|
|
57
57
|
const lines = [
|
|
58
|
-
'Name this working session in 2 to 6 words, the way a person titles a to-do: sentence case, starting with a verb, naming the job (for example: Shortlist
|
|
58
|
+
'Name this working session in 2 to 6 words, the way a person titles a to-do: sentence case, starting with a verb, naming the job (for example: Shortlist payment vendors).',
|
|
59
59
|
'No quotes, no ending period, no session or chat words. Reply with the name only, on one line.',
|
|
60
60
|
];
|
|
61
61
|
if (current) lines.push(`Its name now is: ${clip(current, NAME_MAX)}. If that still names the job, reply KEEP. Give a new name only when the job has clearly changed.`);
|
|
@@ -107,7 +107,7 @@ function loadSkills(dirs) {
|
|
|
107
107
|
* `workspace/state/needs.json`". After the move those are two paths nothing reads. An agent that
|
|
108
108
|
* follows them succeeds, reports success, and the deliverable never appears in the needs-you queue
|
|
109
109
|
* — a REPORT THAT SILENTLY NEVER ARRIVES, which is the exact failure this initiative exists to
|
|
110
|
-
* end. The PM has eleven such skills (draft-me, release-notes and nine
|
|
110
|
+
* end. The PM has eleven such skills (draft-me, release-notes and nine shop-*), all authored
|
|
111
111
|
* against the old contract.
|
|
112
112
|
*
|
|
113
113
|
* Injecting the paths into the SCAFFOLD only fixes skills that do not exist yet. So the retarget
|
|
@@ -121,13 +121,13 @@ function loadSkills(dirs) {
|
|
|
121
121
|
*
|
|
122
122
|
* The first cut of this matched on the CHARACTER BEFORE the path — start-of-line, whitespace, a
|
|
123
123
|
* quote, a backtick, a paren or a bracket — and that covered 2 of the PM's 11 skills. The other
|
|
124
|
-
* nine (every
|
|
124
|
+
* nine (every shop-*) do not spell the path relatively at all; they spell it ABSOLUTELY:
|
|
125
125
|
*
|
|
126
126
|
* /Users/…/pmos/workspace/state/deliverables/<run-id>.md
|
|
127
127
|
*
|
|
128
128
|
* The character before `workspace/state/` there is `/`, which was not in the class, so nothing
|
|
129
129
|
* matched and nothing was rewritten. That is not an edge case: every one of the PM's 45 schedules
|
|
130
|
-
* fires
|
|
130
|
+
* fires a shop-* skill, and the two skills the old rule DID repair have zero schedules between
|
|
131
131
|
* them. A near-miss on a character class was therefore 0% coverage of the real workload.
|
|
132
132
|
*
|
|
133
133
|
* So the question is no longer "what character precedes this" but "IS THIS PATH'S PARENT THE OLD
|
|
@@ -136,7 +136,7 @@ function loadSkills(dirs) {
|
|
|
136
136
|
*
|
|
137
137
|
* `state/…` `./state/…` — relative to the app directory
|
|
138
138
|
* `workspace/state/…` `./workspace/state/…` — relative to a repository root
|
|
139
|
-
* `/any/abs/path/workspace/state/…` — absolute, any install (the nine
|
|
139
|
+
* `/any/abs/path/workspace/state/…` — absolute, any install (the nine shop-*)
|
|
140
140
|
* `<filing.legacy>/…` — the app directory's OWN state dir, derived by the
|
|
141
141
|
* caller from __dirname, whatever it is named
|
|
142
142
|
*
|
|
@@ -32,6 +32,9 @@ const rootKey = (root) => {
|
|
|
32
32
|
return crypto.createHash('sha256').update(real).digest('hex').slice(0, 16);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
// The PM's own presses. Any `human:` name: approvals written before the PM's name was derived (lib/pm-slug.js) still count.
|
|
36
|
+
const isHuman = (by) => typeof by === 'string' && by.startsWith('human:');
|
|
37
|
+
|
|
35
38
|
function readApprovals(file) {
|
|
36
39
|
let text = ''; try { text = fs.readFileSync(file, 'utf8'); } catch { return []; }
|
|
37
40
|
const out = [];
|
|
@@ -50,11 +53,11 @@ function appendApproval(file, ev) {
|
|
|
50
53
|
// The local approvals for ONE repository, as the core's resolve() wants them: [{id, sha, at}]
|
|
51
54
|
function approvedFor(file, root) {
|
|
52
55
|
const k = rootKey(root);
|
|
53
|
-
return readApprovals(file).filter((e) => e.root === k && e.op === 'approve' && e.by
|
|
56
|
+
return readApprovals(file).filter((e) => e.root === k && e.op === 'approve' && isHuman(e.by));
|
|
54
57
|
}
|
|
55
58
|
function readsFor(file, root) {
|
|
56
59
|
const k = rootKey(root); const set = new Set();
|
|
57
|
-
for (const e of readApprovals(file)) if (e.root === k && e.op === 'read' && e.by
|
|
60
|
+
for (const e of readApprovals(file)) if (e.root === k && e.op === 'read' && isHuman(e.by)) set.add(`${e.id}@${e.sha}`);
|
|
58
61
|
return set;
|
|
59
62
|
}
|
|
60
63
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* with MCP attribution, plus one skill_listing attachment.
|
|
12
12
|
*
|
|
13
13
|
* ─────────────────────────────────────────────────────────────────────────────────────────
|
|
14
|
-
* VENDOR COUPLING — READ BEFORE CHANGING. Owner: the PM
|
|
14
|
+
* VENDOR COUPLING — READ BEFORE CHANGING. Owner: the PM.
|
|
15
15
|
*
|
|
16
16
|
* This reads an UNDOCUMENTED internal file layout with no compatibility promise:
|
|
17
17
|
* ~/.claude/sessions/<pid>.json → {pid, sessionId, cwd, version, …}
|
|
@@ -98,7 +98,7 @@ const UV_INSTALLER = 'https://github.com/astral-sh/uv/releases/latest/download/u
|
|
|
98
98
|
/** The commands that install Laya into its own folder under the runtime directory (once) and start it on loopback.
|
|
99
99
|
* The workspace types them into a terminal and never runs them itself: the PM reads them and presses Enter (as D91's
|
|
100
100
|
* Whisper setup does).
|
|
101
|
-
* They bring their own Python, so the PM installs nothing by hand (PM
|
|
101
|
+
* They bring their own Python, so the PM installs nothing by hand (the PM, 2026-10-13). macOS ships Python 3.9, where
|
|
102
102
|
* pip quietly picks Laya 0.3.4, which has no laya-serve. So the commands fetch uv into `laya-tools/` (an unmanaged
|
|
103
103
|
* install: no PATH change and no receipt outside that folder), let uv download a private Python 3.12 into the same
|
|
104
104
|
* folder, rebuild `laya/` with it (a folder an earlier run made with Python 3.9 goes) and install Laya there. Nothing is written outside the runtime directory. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/* lib/worktree-gc.js — remove the folders of finished work, so they do not pile up (D102; the PM: "a worktree should be invisible").
|
|
3
3
|
*
|
|
4
|
-
* A linked worktree is an extra folder of a repository.
|
|
4
|
+
* A linked worktree is an extra folder of a repository. one product had six under acme-shop-worktrees/ and another three under acme-web-worktrees/,
|
|
5
5
|
* each left behind after its branch was merged. collect(root) removes a worktree only when ALL of these hold, so nothing a person
|
|
6
6
|
* could miss is ever removed:
|
|
7
7
|
* - root is the repository's own folder, and the worktree is another one on a named branch that is not the default branch;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.561.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.561.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@anthropic-ai/sdk": "^1.3.0",
|
package/workspace/package.json
CHANGED
|
@@ -259,7 +259,7 @@ export function openNewMenu(btn) {
|
|
|
259
259
|
function openNewProgram(from) {
|
|
260
260
|
const ws = M().board.all ? ((products()[0] || {}).ws || '') : M().board.ws;
|
|
261
261
|
const body = `<form class="bd-form bd-new" data-form="newprog" data-ws="${esc(ws || '')}" novalidate>`
|
|
262
|
-
+ `<label class="bd-field">Name<input class="bd-inp" name="title" maxlength="120" placeholder="For example: Project
|
|
262
|
+
+ `<label class="bd-field">Name<input class="bd-inp" name="title" maxlength="120" placeholder="For example: Project Horizon" autocomplete="off"></label>`
|
|
263
263
|
+ `<label class="bd-field">What it is for<textarea class="bd-inp ta" name="goal" rows="2" maxlength="400" placeholder="The outcome its initiatives add up to"></textarea></label>`
|
|
264
264
|
+ `<label class="bd-field">Target<input class="bd-inp" type="date" name="target"><span class="bd-amut">Optional. A program can run longer than any one initiative.</span></label>`
|
|
265
265
|
+ `<p class="bd-amsg" id="formM" role="status"></p><div class="bd-arow bd-pfoot"><button type="submit" class="bd-btn solid">Create program</button><span class="bd-amut">Then move initiatives into it from its panel</span></div></form>`;
|
|
@@ -422,8 +422,8 @@ function draw(keepFocus) {
|
|
|
422
422
|
}
|
|
423
423
|
/** ⋯ in the shell's order: change it (add, move in), look back (the charter), copy, then archive in red, last. */
|
|
424
424
|
function moreOf(p) {
|
|
425
|
-
// the initiatives that can move in, grouped by product with the PROGRAM's own product first (batch 11 item 11: a
|
|
426
|
-
// on Home listed only
|
|
425
|
+
// the initiatives that can move in, grouped by product with the PROGRAM's own product first (batch 11 item 11: a program of one product
|
|
426
|
+
// on Home listed only another product's initiatives, with no product named). A program spans products, so the others stay, each under its name.
|
|
427
427
|
const M = O.M(), hw = p.home || board().ws || '';
|
|
428
428
|
const taken = new Set(((O.programs()) || []).flatMap((x) => (x.members || []).map((m) => (m.ws || hw) + '|' + m.initiative)));
|
|
429
429
|
// only the open initiatives: a cancelled or archived one moved in would not show in the program
|
|
@@ -115,7 +115,7 @@ function mergeWorkflows(lists) {
|
|
|
115
115
|
/** The products a program spans: its members' workspaces, once each. */
|
|
116
116
|
export const productsOf = (p) => new Set((p.members || []).map((m) => m.ws || '')).size;
|
|
117
117
|
|
|
118
|
-
/** A product's two letters: "
|
|
118
|
+
/** A product's two letters: "Acme" → "AC", "Web" → "WE", "Data Platform" → "DP". */
|
|
119
119
|
export const initialsOf = (name) => { const w = String(name || '').trim().split(/\s+/).filter(Boolean); return (w.length > 1 ? w[0][0] + w[1][0] : (w[0] || '?').slice(0, 2)).toUpperCase(); };
|
|
120
120
|
/** One of four calm tones per product name, stable across views. */
|
|
121
121
|
const toneOf = (name) => { let h = 0; for (const c of String(name || '')) h = (h * 31 + c.charCodeAt(0)) >>> 0; return 'tn' + (h % 4); };
|
|
@@ -624,7 +624,7 @@ function progSpan(g, own) {
|
|
|
624
624
|
/** A program's milestones in the window as diamonds (filled once done, open while ahead, amber when late); the ones within `days` of each
|
|
625
625
|
* other merge into one counted diamond (pm/program-model.js mergeClose) whose label reads "Pilot live +2 · Nov 18–21" ("Nov ’26" on 2 yr and
|
|
626
626
|
* 5 yr, `fmt`). A counted diamond opens the program and names its milestones in its label and its title. The milestones not done also wait as
|
|
627
|
-
* one edge tab on the right, which pm/bd-scroll.js names after the first one past the view (TsCOpen: "
|
|
627
|
+
* one edge tab on the right, which pm/bd-scroll.js names after the first one past the view (TsCOpen: "Old login off · Sep ’27 ›"). */
|
|
628
628
|
function progMarks(g, st, X, W, days, fmt, phone, pxPct) {
|
|
629
629
|
const p = g.program, inW = (m) => { const d = day(m.date); return d && d >= W.from && d <= W.to; };
|
|
630
630
|
const C = mergeClose((st.milestones || []).filter(inW), days);
|
|
@@ -99,7 +99,7 @@ export function geo(node, vars) {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/* ── text bits ── */
|
|
102
|
-
/** The Jira projects a board mirrors, for a sentence: "
|
|
102
|
+
/** The Jira projects a board mirrors, for a sentence: "SHOP, WEB" (a board may map several Jira projects). */
|
|
103
103
|
export const jiraLabel = (b) => ((b && Array.isArray(b.jiraProjects) && b.jiraProjects.length) ? b.jiraProjects.join(', ') : (b && b.jira) || '');
|
|
104
104
|
export const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many || one + 's');
|
|
105
105
|
export const trunc = (s, n) => { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; };
|
|
@@ -41,7 +41,7 @@ export function tonesOf(products) {
|
|
|
41
41
|
return Object.fromEntries(L.map((p, i) => [p.ws, i % TONES]));
|
|
42
42
|
}
|
|
43
43
|
const isAll = (P) => !!P && P.products.length > 1 && P.products.every((p) => p.on); // one product registered: its tile, never All
|
|
44
|
-
/** The words of the chip (its tooltip and accessible name): "Products on Home:
|
|
44
|
+
/** The words of the chip (its tooltip and accessible name): "Products on Home: acme-shop, acme-web", or "… all 3". */
|
|
45
45
|
export function chipWords(P, label) {
|
|
46
46
|
if (!P || !P.products.length) return label + ': none registered';
|
|
47
47
|
return label + ': ' + (isAll(P) ? 'all ' + P.products.length : P.products.filter((p) => p.on).map((p) => p.name).join(', '));
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* One trail (feedback batch 14 item 7, canvas Exploring · Navigation NvADesk, NvAPhone, NvAPhoneTrail, NvAFlow):
|
|
58
58
|
* - a press inside the Viewer keeps the item shown behind the one it opens (a drill-in), as back: true and drill() do; a press on the page
|
|
59
59
|
* outside starts a new trail; fresh: true always starts one. Opening the item shown again (the same id) draws it again in its place.
|
|
60
|
-
* - ← goes one step back, and its name says where ("Back to
|
|
60
|
+
* - ← goes one step back, and its name says where ("Back to Spring Sale Landing Page"); at the trail's first item a desk shows no ←, a phone's
|
|
61
61
|
* ← closes. → shows only after a back, and any new open drops it. Hover ← or → (desk) or hold it (phone): the trail, newest first,
|
|
62
62
|
* ending at the page it started on; a press jumps there.
|
|
63
63
|
* - every step is a browser history entry ({ czvw: { s, i } }), so the browser's Back and Forward and a phone's back swipe walk the same
|
|
@@ -254,7 +254,7 @@ export function lineOf(goals, product) {
|
|
|
254
254
|
}
|
|
255
255
|
return null;
|
|
256
256
|
}
|
|
257
|
-
/** A drafted-metrics ✦ line (GcJ1aTable): "I drafted a North Star, 3 inputs and 2 guardrails for
|
|
257
|
+
/** A drafted-metrics ✦ line (GcJ1aTable): "I drafted a North Star, 3 inputs and 2 guardrails for acme-shop." */
|
|
258
258
|
export function draftsLine(rows, product) {
|
|
259
259
|
const R = (rows || []).filter((r) => r && r.kind === 'metric' && r.state === 'open'); if (!R.length) return null;
|
|
260
260
|
const n = (g) => R.filter((r) => r.group === g).length;
|
|
@@ -163,7 +163,7 @@ const taskRenameOf = (t) => taskRename({ pmPost, ws: t.ws || boardWs(), board: t
|
|
|
163
163
|
toastUndo('Renamed', async () => { const u = await o.undo(); if (u.ok) { renamedHere('task', t.uid, u.title); t.title = u.title; { const c = VW.current(); if (c && String(c.id).endsWith(t.uid)) VW.retitle(c.id, u.title); } load(); } return u; });
|
|
164
164
|
load();
|
|
165
165
|
} });
|
|
166
|
-
// another product's initiative renames in ITS workspace, not Home's (batch 11 item 9: "no initiative
|
|
166
|
+
// another product's initiative renames in ITS workspace, not Home's (batch 11 item 9: "no initiative spring-sale-landing")
|
|
167
167
|
const iniWsOf = (id) => { const o = otherIni(id); return (o && o.ws) || WS || undefined; };
|
|
168
168
|
const iniRenameOf = (id, prefix) => initiativeRename({ pmPost, ws: iniWsOf(id), id, epics: ((iniRowOf(id) || {}).epics) || [],
|
|
169
169
|
onSaved: (o) => {
|
|
@@ -56,7 +56,7 @@ export function moveModel(h, M, L, now = Date.now()) {
|
|
|
56
56
|
now,
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
/** Whether a move by itself fires now (bug 2026-11-08: opening
|
|
59
|
+
/** Whether a move by itself fires now (bug 2026-11-08: opening an initiative moved it Discover → Plan → Prioritize → Build over three
|
|
60
60
|
* opens). Opening or redrawing an initiative is a read, and a read never writes a stage. A stage moves by itself only on a change this page
|
|
61
61
|
* saw: an earlier draw of the SAME stage had an open exit item, and now every one is done. A stage that is already all done when the page
|
|
62
62
|
* first draws it waits for the PM. This also covers Product feature, whose exit items are the engine's checks and do not change when the
|
|
@@ -136,7 +136,7 @@ const pipsOf = (st, cls) => {
|
|
|
136
136
|
const d = Math.min(n, st.nDone || 0), l = Math.min(n - d, st.nLate || 0);
|
|
137
137
|
return `<span class="iv-pips${cls ? ' ' + cls : ''}" aria-hidden="true">${Array.from({ length: n }, (_, i) => `<i class="${i < d ? 'd' : i < d + l ? 'l' : 'o'}"></i>`).join('')}</span>`;
|
|
138
138
|
};
|
|
139
|
-
/** W1: under the stage, what set it ("Jira
|
|
139
|
+
/** W1: under the stage, what set it ("Jira SHOP-2815 · Design Discovery · read 07:16") and the gate line ("Gate to Build · PRD ✓ · contract not
|
|
140
140
|
* approved"): the spec ladder no longer sets the stage. '' when neither is known. */
|
|
141
141
|
function srcGateHtml(st) {
|
|
142
142
|
const g = st.gate && Array.isArray(st.gate.parts) && st.gate.parts.length ? `<p class="hm-gate iv-gate"><span class="lbl">${esc(st.gate.label)}</span>${st.gate.parts.map((x) => `<span class="g${x.ok ? '' : ' no'}"${x.ok ? ` aria-label="${esc(x.text + ' done')}"` : ''}${x.note ? ` title="${esc(x.note)}"` : ''}>${esc(x.text)}${x.ok ? '<svg class="cz-ck" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12l4.5 4.5L19 7"/></svg>' : ''}</span>`).join('')}</p>` : '';
|
|
@@ -38,7 +38,7 @@ const ago = (iso, today) => {
|
|
|
38
38
|
const n = Math.max(0, Math.round((b - a) / 864e5));
|
|
39
39
|
return n === 0 ? 'today' : n + ' d ago';
|
|
40
40
|
};
|
|
41
|
-
/** Two letters for an initiative's tile ("
|
|
41
|
+
/** Two letters for an initiative's tile ("Shop data fixes" → SD, "Checkout redesign" → CR). */
|
|
42
42
|
export const tileOf = (title) => { const w = String(title || '').trim().split(/[\s_-]+/).filter(Boolean); return (w.length > 1 && w[0].length < 4 ? w[0][0] + w[1][0] : String(w[0] || '?').slice(0, 2)).toUpperCase(); };
|
|
43
43
|
const SHOW = 5; // an open proposal shows 5 rows, then "+N more" (the grill's legacy pile)
|
|
44
44
|
|
|
@@ -207,7 +207,7 @@ function say(msg, undo) {
|
|
|
207
207
|
clearTimeout(toastT); toastT = setTimeout(() => { t.hidden = true; }, undo ? 10000 : 5000);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
/* ── the product chip (batch 12 item 5, canvas XhpA5Pages): the same chip and list as Home's; it replaces "
|
|
210
|
+
/* ── the product chip (batch 12 item 5, canvas XhpA5Pages): the same chip and list as Home's; it replaces "acme-shop +1" ── */
|
|
211
211
|
/** The pick as this page shows it: the saved one, or for a one-off link the products on screen. */
|
|
212
212
|
function shownPick() {
|
|
213
213
|
if (!PKP) return null;
|
|
@@ -136,7 +136,7 @@ function periods() {
|
|
|
136
136
|
const d = new Date(today()), y = d.getUTCFullYear(), q = Math.floor(d.getUTCMonth() / 3), h = d.getUTCMonth() < 6 ? 0 : 1;
|
|
137
137
|
const span = (y0, m0, y1, m1) => ({ from: Date.UTC(y0, m0, 1), to: Date.UTC(y1, m1, 0) });
|
|
138
138
|
const lq = q ? { y, q: q - 1 } : { y: y - 1, q: 3 };
|
|
139
|
-
const F = M && M.okrFile && M.okrFile.period; // Intelligence redesign A: the OKR file's own period opens first (H2 2026
|
|
139
|
+
const F = M && M.okrFile && M.okrFile.period; // Intelligence redesign A: the OKR file's own period opens first (for example H2 2026)
|
|
140
140
|
return (F ? [{ key: 'okr', label: F.label, short: F.short, name: 'The OKR period', said: 'this OKR period', from: F.from, to: F.to }] : []).concat([
|
|
141
141
|
Object.assign({ key: 'q', label: 'Q' + (q + 1) + ' ' + y, short: 'Q' + (q + 1), name: 'This quarter', said: 'this quarter' }, span(y, q * 3, y, q * 3 + 3)),
|
|
142
142
|
Object.assign({ key: 'lq', label: 'Q' + (lq.q + 1) + ' ' + lq.y, short: 'Q' + (lq.q + 1), name: 'Last quarter', said: 'last quarter' }, span(lq.y, lq.q * 3, lq.y, lq.q * 3 + 3)),
|
|
@@ -213,7 +213,7 @@ function titleSlide(w) {
|
|
|
213
213
|
const f = headFigure(w), t = [R.row.slot ? 'As of ' + longSlot(R.row.slot) : '', f && f.data ? 'Data: ' + f.data : ''].filter(Boolean).join(' · ');
|
|
214
214
|
// A long audience (a list of people) stays in At a glance: on the slide it would fill the eyebrow and repeat as the accent line (Wawan, 2026-11-01).
|
|
215
215
|
const aud = R.audience && R.audience.length <= AUD_MAX ? R.audience : '';
|
|
216
|
-
// an older draft is titled from the report's id ("
|
|
216
|
+
// an older draft is titled from the report's id ("Pricing-review-report report 2026-11-02"): show the report's name instead
|
|
217
217
|
const idTitle = R.name && /^[A-Za-z][a-z0-9]*(?:-[a-z0-9]+)+ report \d{4}-\d{2}-\d{2}$/.test(w.title || '');
|
|
218
218
|
return { k: 'title', h: 'Title', title: idTitle ? R.name : w.title, eye: aud || 'Report', acc: aud ? aud.toLowerCase() : '', sub: (!INTERNAL_RE.test(w.sub || '') && w.sub) || list, t,
|
|
219
219
|
fig: f ? { v: f.v, cap: f.cap } : null };
|
|
@@ -314,7 +314,7 @@ document.addEventListener('click', (e) => {
|
|
|
314
314
|
/* ── the standard dialog: detail first, the conversation beside it (Detail tab first on a phone) ─────────── */
|
|
315
315
|
export const kv = (rows) => `<div class="kv2">${rows.filter((r) => r && r[1]).map(([k, v]) => `<span>${esc(k)}</span><span>${esc(v)}</span>`).join('')}</div>`;
|
|
316
316
|
export const H = (t) => `<h3 class="h2">${esc(t)}</h3>`;
|
|
317
|
-
/* premium-popup-context P1: a popup with no row in a server model still gets its own conversation. Its key names the thing (pop:task:
|
|
317
|
+
/* premium-popup-context P1: a popup with no row in a server model still gets its own conversation. Its key names the thing (pop:task:SHOP-2611),
|
|
318
318
|
* and the first message carries what the popup shows (title, sub line, Claude's first line, its facts), so Claude starts from the same view. */
|
|
319
319
|
export function popKey(...parts) {
|
|
320
320
|
const k = parts.map((p) => String(p == null ? '' : p).replace(/[^A-Za-z0-9._-]+/g, '-').replace(/^-+|-+$/g, '')).filter(Boolean).join(':').replace(/^[^A-Za-z0-9]+/, '').slice(0, 100);
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* programItem(o) the ONE "Program" entry of the short initiative ⋯ (feedback batch 16 item 5c, canvas FmI1Menu): its note is the program
|
|
12
12
|
* it is in; a press opens one picker with the open programs (the current one marked), "No program" (the move out) and,
|
|
13
13
|
* in no program, "Make it a program" (o.turn()). A press on another program moves it there, or joins it. Every move has Undo.
|
|
14
|
-
* outText(program, product, n, phone) the toast: "Moved out of Project
|
|
15
|
-
* "Now under
|
|
14
|
+
* outText(program, product, n, phone) the toast: "Moved out of Project Horizon · now under Acme Shop · off 1 milestone"; a phone says only
|
|
15
|
+
* "Now under Acme Shop · off 1 milestone". Zero milestones is silence.
|
|
16
16
|
*
|
|
17
17
|
* The leave also takes the initiative off the charter's milestones that wait on it (lib/routes-programs.js answers `off`): a milestone that waits
|
|
18
18
|
* on an initiative that left could never be done. Undo rejoins the old program with `back` = that list, so the milestones wait on it again; the
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* so the Board row, the Timeline, the page header, Documents, the chat opener and the program page say the same stage.
|
|
4
4
|
*
|
|
5
5
|
* stageName(r) → 'Discover' | 'Shipped' | 'On hold' | … the words; a row on its own workflow names its own stage
|
|
6
|
-
* stageSource(r) → 'Jira
|
|
6
|
+
* stageSource(r) → 'Jira SHOP-2815 · Design Discovery · read 4 Nov 07:16' | '' what set it, and when it was read
|
|
7
7
|
* stageChip(r, opts?) → '<span class="cz-pill cz-stg …">…</span>' the chip; opts.ms adds the milestone mark (cz-ms)
|
|
8
8
|
*
|
|
9
9
|
* A row from an older model (no oneStage) falls back to what it carried: its workflow stage, its track, its stage name.
|