create-pmos 0.206.0 → 0.207.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.206.0",
3
+ "version": "0.207.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": {
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@eaa7977
1
+ kernel-source: pmos@b515557
2
2
  assembled: 2026-10-14
3
3
  mode: vendor
@@ -2,7 +2,7 @@
2
2
  type: Reference
3
3
  title: "Eval calibration log"
4
4
  description: "Append-only record of every PM override of an evaluator verdict."
5
- generated: {by: process:create-pmos, at: "2026-10-14T00:14:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-14T01:10:19Z"}
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-10-14T00:14:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-14T01:10:19Z"}
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-10-14T00:14:56Z"}
5
+ generated: {by: process:create-pmos, at: "2026-10-14T01:10:19Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -45,8 +45,8 @@ const { harness } = require('./c3-ini-harness');
45
45
  ok('SP1 the active sprint header says Jira, read-only, and there is no banner', /Jira, read-only/.test(await text('[data-inb="sprints-source"]')) && await st(() => !!document.querySelector('[data-inb-state="active"] [data-inb="sprints-source"]') && !document.querySelector('.fold [data-inb="sprints-source"], .fold[data-inb="sprints-source"]')));
46
46
  ok('SP2 the active sprint is drawn with its counts; future and closed sprints are listed', await st(() => !!document.querySelector('[data-inb-state="active"]') && !!document.querySelector('[data-inb-state="future"]') && !!document.querySelector('[data-inb-state="closed"]') && ((m) => !!m && Number(m[1]) === 12 && Number(m[2]) + Number(m[3]) + Number(m[4]) === 12)(/Items(\d+):(\d+)done,(\d+)inprogress,(\d+)todo/.exec(document.querySelector('[data-inb="sprint-counts"]').textContent.replace(/\s+/g, '')))));
47
47
  // sprint-goal-summary: the goal (from Jira, or written from the tickets and why), the team summary, closed sprints read once
48
- ok('SP4 the active sprint\'s goal is written from the tickets, says Jira\'s goal is too broad and quotes it', await st(() => { const g = document.querySelector('[data-inb="sprint-summary"] [data-inb="sprint-goal"]'); return !!g && g.dataset.inbGoal === 'broad' && /written from the tickets/.test(g.textContent) && /too broad/.test(g.textContent) && /“Q4 delivery”/.test(g.textContent); })
49
- && /no goal for this sprint/.test(await text('[data-inb-state="future"] [data-inb="sprint-goal"]')) && /SPRINT GOAL · from Jira/.test(await text('[data-inb-state="closed"] [data-inb="sprint-goal"]')));
48
+ ok('SP4 the sprint goal is written from the tickets, with Jira\'s goal only as a reference', await st(() => { const g = document.querySelector('[data-inb="sprint-summary"] [data-inb="sprint-goal"]'); return !!g && g.dataset.inbGoal === 'tickets' && /SPRINT GOAL · from the tickets/.test(g.textContent) && /In Jira: “Q4 delivery”/.test(g.textContent) && !/from Jira/.test(g.textContent); })
49
+ && /from the tickets/.test(await text('[data-inb-state="future"] [data-inb="sprint-goal"]')) && !(await text('[data-inb-state="future"] [data-inb="sprint-goal"]')).includes('In Jira') && /from the tickets/.test(await text('[data-inb-state="closed"] [data-inb="sprint-goal"]')));
50
50
  ok('SP5 what the team is working on: a row per theme, one with no initiative', await st(() => document.querySelectorAll('[data-inb="sprint-themes"] [data-inb-theme]').length === 2 && !!document.querySelector('[data-inb-theme="none"]') && /No initiative/.test(document.querySelector('[data-inb-theme="none"]').textContent)));
51
51
  ok('SP6 a closed sprint shows done of total, carried, and that it was read and summarised once', /5 of 7 done/.test(await text('[data-inb-state="closed"]')) && /2 carried to/.test(await text('[data-inb-state="closed"]'))
52
52
  && /Read and summarised once on 29 Sep\. PMOS does not read a closed sprint again\./.test(await text('[data-inb-state="closed"] [data-inb="sprint-read-once"]')) && /Closed sprints/.test(await text('[data-inb="sprints-how"]')));
@@ -2,7 +2,7 @@
2
2
  type: Guide
3
3
  title: "Jira: tickets drafted from the PRD, and their status"
4
4
  description: "How to draft Jira tickets from a PRD in your ticket template, push the ones that are ready, and see their status, sprint and progress on the initiative's Jira tickets tab."
5
- timestamp: 2026-10-13
5
+ timestamp: 2026-10-14
6
6
  ---
7
7
 
8
8
  # Jira: tickets drafted from the PRD, and their status
@@ -119,6 +119,22 @@ pmos jira query --sprints
119
119
  pmos jira sync --sprints --from <file|-> [--query "<jql>"]
120
120
  ```
121
121
 
122
+ ## Each sprint's goal and summary
123
+
124
+ The check then writes a goal and a short summary for each sprint, from the tickets it read. The Sprints tab shows them above the sprint's items, with one row for each group of related work.
125
+
126
+ - The check always writes the goal from the sprint's tickets, because Jira's sprint goal is often empty, too broad (for example "Q4 delivery") or incomplete. The tab shows it as **from the tickets**.
127
+ - When Jira has a sprint goal, the tab shows it under the goal as a reference: **In Jira: "…"**.
128
+ - The active and the next sprint are summarised again at each check.
129
+ - A closed sprint is read and summarised once. After that, the check does not search it again and keeps its first summary.
130
+
131
+ The check writes `<state>/tracker/jira/_sprint-notes.md` with:
132
+
133
+ ```
134
+ pmos jira summary
135
+ pmos jira summary --from <file|-> [--dry-run]
136
+ ```
137
+
122
138
  ## Link an initiative to its Jira epics
123
139
 
124
140
  Your team may already plan in Jira, with an epic for each piece of work. Then link the initiative to its epics. You do not have to draft or push tickets.
@@ -656,7 +656,7 @@ function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null)
656
656
  const n = nl.find((x) => x.name === sp.name);
657
657
  const jg = jiraGoal(sp);
658
658
  if (n) {
659
- sp.goal = { from: n.goal.from, text: n.goal.text, jira: n.goal.from === 'jira' ? n.goal.text : n.goal.jira || null };
659
+ sp.goal = { from: 'tickets', text: n.goal.text, jira: n.goal.jira || jg || null }; // always from the tickets; Jira's goal is a reference
660
660
  sp.summary = n.summary;
661
661
  sp.themes = (n.themes || []).map((t) => ({ title: t.title, line: t.line || '', tickets: t.tickets || 0, done: t.done || 0, blocked: t.blocked || 0, people: t.people || '', initiative: t.initiative || null }));
662
662
  sp.writtenAt = n.writtenAt || null;
@@ -664,7 +664,8 @@ function sprintsOf(snapshots, onBoard = () => true, whole = null, notes = null)
664
664
  sp.closed = sp.state === 'closed' && n.closed ? { ...n.closed } : null;
665
665
  sp.frozen = sp.state === 'closed' && n.state === 'closed';
666
666
  } else {
667
- sp.goal = jg ? { from: 'jira', text: jg, jira: jg, unchecked: true } : null;
667
+ sp.goal = null;
668
+ sp.jiraGoal = jg;
668
669
  sp.summary = null; sp.themes = []; sp.writtenAt = null; sp.summarisedTickets = null; sp.closed = null; sp.frozen = false;
669
670
  }
670
671
  }
@@ -336,11 +336,10 @@ function syncSprints(root, raw, { query, dryRun = false, now } = {}) {
336
336
  function readSprints(root) { return readSnapshot(root, SPRINTS_FILE); }
337
337
 
338
338
  // ── the goal and summary of each sprint (sprint-goal-summary) ─────────────────────────────────────────
339
- // The Jira status check writes them from the tickets it read: Jira's goal when it says what the sprint delivers, else a goal
340
- // written from the tickets, with why (none: Jira has none; broad: too broad; partial: leaves out part of the sprint). A closed
341
- // sprint's note is written once and kept; its sprint is not searched again.
339
+ // The Jira status check writes them from the tickets it read. The goal is always written from the tickets: Jira's sprint goal is
340
+ // often empty, too broad or incomplete (the PM, 2026-10-14), so it is kept only as a reference (goal.jira). A closed sprint's
341
+ // note is written once and kept; its sprint is not searched again.
342
342
  const NOTES_FILE = '_sprint-notes';
343
- const GOAL_FROM = ['jira', 'none', 'broad', 'partial'];
344
343
  const INI_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,80}$/;
345
344
  const sameSprint = (a, b) => !!a && !!b && ((a.id && b.id) ? String(a.id) === String(b.id) : String(a.name) === String(b.name));
346
345
  function readSprintNotes(root) {
@@ -364,15 +363,11 @@ function noteOne(x) {
364
363
  const state = String(x.state || '').toLowerCase();
365
364
  if (!SPRINT_STATES.includes(state)) return { error: `${name}: state is active, future or closed` };
366
365
  const g = x.goal && typeof x.goal === 'object' ? x.goal : null;
367
- if (!g || !GOAL_FROM.includes(g.from)) return { error: `${name}: goal.from is jira, none, broad or partial` };
368
- const gt = text(g.text, 240);
369
- if (!gt) return { error: `${name}: the goal has no text` };
370
- const goal = { from: g.from, text: gt };
371
- if (g.from === 'broad' || g.from === 'partial') {
372
- const j = text(g.jira, 300);
373
- if (!j) return { error: `${name}: a ${g.from} goal carries Jira's own goal in goal.jira` };
374
- goal.jira = j;
375
- }
366
+ const gt = g ? text(g.text, 240) : '';
367
+ if (!gt) return { error: `${name}: the goal has no text — write it from the sprint's tickets` };
368
+ const goal = { from: 'tickets', text: gt };
369
+ const j = text(g.jira, 300);
370
+ if (j) goal.jira = j; // Jira's own sprint goal, kept for reference only
376
371
  const summary = text(x.summary, 900);
377
372
  if (!summary) return { error: `${name}: the summary is empty` };
378
373
  const themes = [];
@@ -437,12 +432,12 @@ function saveSprintNotes(root, raw, { dryRun = false, now } = {}) {
437
432
  if (dryRun || !saved.length) return result;
438
433
  const file = snapshotPath(root, NOTES_FILE);
439
434
  fs.mkdirSync(path.dirname(file), { recursive: true });
440
- const rows = notes.map((o) => `| ${cell(o.name)} | ${cell(o.state)} | ${cell(o.goal.text)} | ${o.goal.from === 'jira' ? 'Jira' : 'written from the tickets'} | ${cell(o.writtenAt)} |`);
435
+ const rows = notes.map((o) => `| ${cell(o.name)} | ${cell(o.state)} | ${cell(o.goal.text)} | ${o.goal.jira ? cell(o.goal.jira) : '—'} | ${cell(o.writtenAt)} |`);
441
436
  const body = [
442
437
  '---', 'type: Reference', 'title: "Jira sprints: goal and summary"', `timestamp: ${writtenAt}`, '---', '',
443
438
  '# Jira sprints: goal and summary', '',
444
439
  'Written by the Jira status check from the tickets it read, read-only. The Sprints tab of a board shows it. A closed sprint is written once and kept. Written by `pmos jira summary`; do not edit by hand.', '',
445
- '| Sprint | State | Goal | Goal from | Written |', '|---|---|---|---|---|', ...rows, '',
440
+ '| Sprint | State | Goal (from the tickets) | Goal in Jira | Written |', '|---|---|---|---|---|', ...rows, '',
446
441
  '```json', JSON.stringify({ written_at: writtenAt, sprints: notes }, null, 0), '```', '',
447
442
  ].join('\n');
448
443
  const tmp = `${file}.${process.pid}.tmp`;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.206.0",
3
+ "version": "0.207.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.206.0",
9
+ "version": "0.207.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.206.0",
3
+ "version": "0.207.0",
4
4
  "private": true,
5
5
  "description": "PMOS Terminal Workspace — local companion hosting real PTYs beside the library and gates (D62)",
6
6
  "license": "MIT",
@@ -385,15 +385,15 @@ export function handle(S, method, path, p, body) {
385
385
  const counts = { todo: issues.filter((i) => i.category === 'todo').length, doing: issues.filter((i) => i.category === 'doing').length, done: issues.filter((i) => i.category === 'done').length };
386
386
  const num = key === 'IDPF' ? 42 : 19;
387
387
  const extra = (k, state, name, cat, n) => { const is = Array.from({ length: n }, (_, i) => ({ key: key + '-' + (1100 + k * 20 + i), summary: (own[i % Math.max(1, own.length)] || { title: 'Sprint work' }).title + ': part ' + (i + 1), status: cat === 'done' ? 'Done' : 'To Do', category: cat, initiative: (own[i % Math.max(1, own.length)] || {}).id || null })); return { name, state, issues: is, counts: { todo: cat === 'todo' ? n : 0, doing: 0, done: cat === 'done' ? n : 0 } }; };
388
- // The goal and summary the Jira status check writes (sprint-goal-summary): Jira's goal is too broad for the active sprint,
389
- // missing for the next, and fine for the closed one, which was summarised once.
388
+ // The goal and summary the Jira status check writes (sprint-goal-summary). The goal is always written from the tickets;
389
+ // Jira's goal, when it has one, is a reference. The closed sprint was summarised once.
390
390
  const ini0 = own[0] ? own[0].id : null;
391
391
  const themes = [{ title: own[0] ? own[0].title : 'Sprint work', line: 'Most items are in progress or in review.', tickets: issues.filter((i) => i.initiative === ini0).length || 1, done: issues.filter((i) => i.initiative === ini0 && i.category === 'done').length, blocked: 1, people: 'Ana, Budi', initiative: ini0 },
392
392
  { title: 'Fixes and upkeep', line: 'Small fixes outside any initiative.', tickets: 2, done: 1, blocked: 0, people: 'Chen', initiative: null }];
393
- const act = { name: key + ' Sprint ' + num, state: 'active', issues, counts, goal: { from: 'broad', text: 'Get the first initiative ready for internal users and clear the blocked work.', jira: 'Q4 delivery' },
393
+ const act = { name: key + ' Sprint ' + num, state: 'active', issues, counts, goal: { from: 'tickets', text: 'Get the first initiative ready for internal users and clear the blocked work.', jira: 'Q4 delivery' },
394
394
  summary: 'Most of the sprint is on the first initiative. One item is blocked. Two small fixes sit outside any initiative.', themes, writtenAt: TODAY + 'T06:30:00Z', summarisedTickets: issues.length, closed: null, frozen: false };
395
- const fut = { ...extra(1, 'future', key + ' Sprint ' + (num + 1), 'todo', 3), goal: { from: 'none', text: 'Finish the first initiative and start the beta.', jira: null }, summary: 'Planned so far: three follow-up items.', themes: [], writtenAt: TODAY + 'T06:30:00Z', closed: null, frozen: false };
396
- const old = { ...extra(0, 'closed', key + ' Sprint ' + (num - 1), 'done', 5), goal: { from: 'jira', text: 'Start the first initiative.', jira: 'Start the first initiative.' }, summary: 'Goal met. Five items shipped; two moved to the next sprint.', themes: [{ title: 'Sprint work', line: '', tickets: 5, done: 5, blocked: 0, people: '', initiative: ini0 }],
395
+ const fut = { ...extra(1, 'future', key + ' Sprint ' + (num + 1), 'todo', 3), goal: { from: 'tickets', text: 'Finish the first initiative and start the beta.', jira: null }, summary: 'Planned so far: three follow-up items.', themes: [], writtenAt: TODAY + 'T06:30:00Z', closed: null, frozen: false };
396
+ const old = { ...extra(0, 'closed', key + ' Sprint ' + (num - 1), 'done', 5), goal: { from: 'tickets', text: 'Start the first initiative.', jira: null }, summary: 'Goal met. Five items shipped; two moved to the next sprint.', themes: [{ title: 'Sprint work', line: '', tickets: 5, done: 5, blocked: 0, people: '', initiative: ini0 }],
397
397
  writtenAt: '2026-09-29T06:30:00Z', closed: { done: 5, total: 7, carried: 2, carriedTo: key + ' Sprint ' + num, points: '21 of 26' }, frozen: true };
398
398
  return okb({ source: 'jira', readAt: TODAY + 'T08:10:00', sprints: [act, fut, old] });
399
399
  }
@@ -2,10 +2,10 @@
2
2
  * and team summary from mockup-c3-sprint-goal v3, initiative sprint-goal-summary).
3
3
  * registerBoardTab('sprints', (host, ctx) => ...)
4
4
  * Reads GET /api/boards/sprints { source: jira|none, readAt, sprints: [{ name, state: active|future|closed, start, end, issues: [{ key, summary,
5
- * status, category: todo|doing|done, initiative }], counts, goal: { from: jira|none|broad|partial, text, jira, unchecked? } | null, summary,
5
+ * status, category: todo|doing|done, initiative }], counts, goal: { from: 'tickets', text, jira } | null, jiraGoal?, summary,
6
6
  * themes: [{ title, line, tickets, done, blocked, people, initiative }], writtenAt, closed: { done, total, carried, carriedTo, points } | null,
7
7
  * frozen }] }. READ-ONLY: the sprints mirror Jira, so there is no create, edit or move control.
8
- * Left: the active sprint's goal and summary (the goal from Jira, or written from the tickets and saying why; what the team is working on,
8
+ * Left: the active sprint's goal and summary (the goal, always written from the tickets, with Jira's goal as a reference; what the team is working on,
9
9
  * one row per theme), its items (header chip: Jira, read-only and the read time; c3-board-declutter: no banner), then the next sprint
10
10
  * with its goal and summary, and each closed sprint with its goal, summary, done and carried counts and the read-once note. Right: the
11
11
  * active sprint's card, its burndown from GET /api/stage-tools/burndown (when that route is not on this server yet, the card says so
@@ -18,25 +18,24 @@ import { recordCards } from './c3-ini-records.js';
18
18
 
19
19
  const CAT = { todo: 'To do', doing: 'In progress', done: 'Done' };
20
20
  const readTime = (s) => { const m = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/.exec(String(s || '')); return m ? day(m[1]) + ', ' + m[2] : ''; };
21
- const WHY = { none: 'Jira has no goal for this sprint.', broad: 'The goal in Jira is too broad to tell what this sprint delivers.', partial: 'The goal in Jira leaves out part of the sprint.' };
22
21
  const timeOf = (s) => { const m = /T(\d{2}:\d{2})/.exec(String(s || '')); return m ? m[1] : ''; };
23
22
  /* Quiet pages (c3-quiet.css) hide .ini-note, .ini-lhm .dim and a row's third chip. The goal's reason, the theme chips and the
24
23
  * read-once note are the content of this tab (mockup v3), so they use their own classes. */
25
- /* The goal: Jira's when it says what the sprint delivers; else written from the tickets, with why and Jira's own text underneath. */
26
- function goalBlock(g) {
24
+ /* The goal is always written from the sprint's tickets: Jira's sprint goal is often empty, too broad or incomplete (the PM,
25
+ * 2026-10-14). Jira's own text shows underneath as a reference. */
26
+ const jiraRef = (j) => (j ? el('div', { class: 'dim ini-sp-note', 'data-inb': 'sprint-goal-jira' }, 'In Jira: “' + j + '”') : null);
27
+ function goalBlock(g, jiraGoal) {
27
28
  if (!g) return el('div', { class: 'lh', 'data-inb': 'sprint-goal', 'data-inb-goal': 'missing' }, el('span', { class: 'ki' }, icon('target')),
28
- el('div', { class: 'ini-sp-goal' }, lbl('SPRINT GOAL'), el('div', { class: 'dim ini-sp-note' }, 'No goal yet. The Jira status check writes one from the tickets at its next check.')));
29
- const derived = g.from !== 'jira';
30
- return el('div', { class: 'lh', 'data-inb': 'sprint-goal', 'data-inb-goal': g.from }, el('span', { class: 'ki' }, icon('target')),
31
- el('div', { class: 'ini-sp-goal' }, lbl(derived ? 'SPRINT GOAL · written from the tickets' : 'SPRINT GOAL · from Jira'), el('b', null, g.text),
32
- derived ? el('div', { class: 'dim ini-sp-note', 'data-inb': 'sprint-goal-why' }, (WHY[g.from] || '') + (g.jira ? ' In Jira: “' + g.jira + '”' : '')) : null));
29
+ el('div', { class: 'ini-sp-goal' }, lbl('SPRINT GOAL'), el('div', { class: 'dim ini-sp-note' }, 'No goal yet. The Jira status check writes one from the tickets at its next check.'), jiraRef(jiraGoal)));
30
+ return el('div', { class: 'lh', 'data-inb': 'sprint-goal', 'data-inb-goal': 'tickets' }, el('span', { class: 'ki' }, icon('target')),
31
+ el('div', { class: 'ini-sp-goal' }, lbl('SPRINT GOAL · from the tickets'), el('b', null, g.text), jiraRef(g.jira)));
33
32
  }
34
33
  const themeRow = (t, ctx) => nrow({ ic: t.blocked ? 'alert' : t.tickets && t.done === t.tickets ? 'check' : t.initiative ? 'bolt' : 'task', hot: !t.blocked && t.done < t.tickets && !!t.initiative,
35
34
  title: t.title, attrs: { 'data-inb-theme': t.initiative || 'none' },
36
35
  after: el('div', null, t.line ? el('div', { class: 'dim ini-sp-note' }, t.line) : null, el('div', { class: 'chips ini-sp-chips' }, ...[chip(plural(t.tickets, 'ticket')), t.done ? st('ok', 'check', t.done + ' done') : null, t.blocked ? st('warn', 'alert', t.blocked + ' blocked') : null,
37
36
  t.people ? chip(icon('user', 'sm'), t.people) : null,
38
37
  t.initiative ? lk({ onclick: () => ctx.openInitiative(t.initiative), 'data-inb-theme-ini': t.initiative }, icon('init', 'sm'), t.initiative) : el('span', { class: 'chip2 dim' }, 'No initiative')].filter(Boolean))) });
39
- const summaryBody = (sp, ctx) => [goalBlock(sp.goal), sp.summary ? el('p', { class: 'ini-sp-sum' }, sp.summary) : null,
38
+ const summaryBody = (sp, ctx) => [goalBlock(sp.goal, sp.jiraGoal), sp.summary ? el('p', { class: 'ini-sp-sum' }, sp.summary) : null,
40
39
  sp.themes && sp.themes.length ? [lbl('WHAT THE TEAM IS WORKING ON'), list(sp.themes.map((t) => themeRow(t, ctx)), { 'data-inb': 'sprint-themes' })] : null];
41
40
  const countsOf = (sp) => { const c = sp.counts || {}; const f = (k) => (c[k] != null ? Number(c[k]) : (sp.issues || []).filter((i) => i.category === k).length); return { todo: f('todo'), doing: f('doing'), done: f('done') }; };
42
41
 
@@ -78,7 +77,7 @@ registerBoardTab('sprints', async (host, ctx) => {
78
77
  n ? list(active.issues.map(issueRow)) : empty('No items in this sprint yet.', { 'data-inb': 'sprint-no-issues' }))
79
78
  : empty(sprints.length ? 'No sprint is active.' : 'Jira has no sprints for this board.', { 'data-inb': sprints.length ? 'sprints-no-active' : 'sprints-empty' }),
80
79
  ...others.filter((s) => s.state !== 'closed').map((s) => sect({ ic: 'cal', title: s.name, count: (s.issues || []).length, right: tag(s.state || 'sprint'), attrs: { 'data-inb-sprint': s.name, 'data-inb-state': s.state } },
81
- goalBlock(s.goal), s.summary ? el('p', { class: 'ini-sp-sum' }, s.summary) : null, itemsRow(s))),
80
+ goalBlock(s.goal, s.jiraGoal), s.summary ? el('p', { class: 'ini-sp-sum' }, s.summary) : null, itemsRow(s))),
82
81
  ...others.filter((s) => s.state === 'closed').map(closedSect),
83
82
  ];
84
83
  const right = [];
@@ -91,7 +90,7 @@ registerBoardTab('sprints', async (host, ctx) => {
91
90
  right.push(...await recordCards(pseudo, ['burndown']));
92
91
  }
93
92
  if (sprints.length) right.push(card({ ic: 'redo', title: 'How sprints are read', attrs: { 'data-inb': 'sprints-how' } }, kv([
94
- ['Goal', 'From Jira when it says what the sprint delivers, otherwise written from the tickets'], ['Active sprint', 'Read and summarised at each Jira status check'],
93
+ ['Goal', 'Written from the sprint\'s tickets. Jira\'s goal is shown for reference'], ['Active sprint', 'Read and summarised at each Jira status check'],
95
94
  ['Next sprint', 'Read at each check, until it starts'], ['Closed sprints', 'Read and summarised once, then kept'], ['Jira', 'Read-only. PMOS changes nothing there']])));
96
95
  if (dead) return () => {};
97
96
  put(host, cols(left, right));
@@ -37,7 +37,7 @@ Procedure:
37
37
  4. Run `pmos jira sync <initiative> --from <the file> --query "<the JQL>"`. Then delete the file.
38
38
  4a. Read the whole sprints, after every initiative is synced. Run `pmos jira query --sprints`. It prints one Jira search for every issue in the sprints the tickets above are in, whoever the issue is assigned to. Do this even when the task names one initiative. If it prints "no Jira reading has a sprint yet" or "every sprint is closed and summarised once", skip to step 4b. Otherwise run that search with the same fields as step 2, fetch every page, save the result in the scratch folder in the same shape as step 3 (for example `<scratch>/jira-sprints.json`), run `pmos jira sync --sprints --from <the file> --query "<the JQL>"`, and delete the file. Do not record people from this search (step 5 is for the initiatives' own issues).
39
39
  4b. Write each sprint's goal and summary, after step 4a. Run `pmos jira summary`. Each line is a sprint that needs one: its name, its state, its number of issues and Jira's goal. A closed sprint that is already summarised is listed as kept: do not write it again. If it prints "no sprint needs a summary", skip this step. For each listed sprint, read its issues in the sprint search result of step 4a and write:
40
- - `goal`: `{"from": "jira", "text": "<Jira's goal>"}` when Jira's goal says what the sprint delivers. Otherwise write the goal from the sprint's tickets in one sentence (at most 240 characters), and say why: `"from": "none"` when Jira has no goal, `"broad"` when Jira's goal is too broad to tell what the sprint delivers (for example "Q4 delivery"), `"partial"` when it leaves out a large part of the sprint's tickets. With `broad` or `partial`, put Jira's own goal in `"jira"`.
40
+ - `goal`: `{"text": "<the goal>", "jira": "<Jira's goal, or null>"}`. Always write the goal yourself from the sprint's tickets, in one sentence of at most 240 characters: what the sprint delivers when its tickets are done, naming the two or three largest outcomes. Do not copy Jira's sprint goal: it is often empty, too broad or incomplete. Put Jira's own goal in `"jira"` only as a reference, exactly as Jira writes it.
41
41
  - `summary`: two to four plain sentences on what the team is working on: what is done, what is moving, what is blocked. For a closed sprint, say if the goal was met and what moved to the next sprint.
42
42
  - `themes`: one entry per group of related tickets, at most 8, largest first: `{"title", "line", "tickets", "done", "blocked", "people", "initiative"}`. Group by initiative when the tickets belong to one (the initiative id from step 1); put tickets with no initiative in one theme such as "Fixes and upkeep" with `"initiative": null`. `line` is one sentence; `people` is the assignees' first names, comma-separated.
43
43
  - For a closed sprint, also `closed`: `{"done", "total", "carried", "carriedTo", "points"}` (`points` as "31 of 38" when the tickets have points).