create-pmos 0.667.0 → 0.669.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.
@@ -100,6 +100,20 @@ function offerMod(repoRoot, opts) {
100
100
  for (const k of m.kept) console.log(` mod: kept ${k}`);
101
101
  }
102
102
 
103
+ // Which profile a new kit gets: --code / --pm when given, else product-code when the folder already
104
+ // holds code (a package manifest or source files), else pm-artifacts. → { profile, why }
105
+ function chooseProfile(targetRoot, opts = {}) {
106
+ if (opts.code) return { profile: 'product-code', why: 'you passed --code' };
107
+ if (opts.pm) return { profile: 'pm-artifacts', why: 'you passed --pm' };
108
+ let detect = null;
109
+ for (const p of [path.join(WORKSPACE, 'lib', 'profile-default.js'), path.join(__dirname, '..', '..', 'workspace', 'lib', 'profile-default.js')]) {
110
+ try { if (fs.existsSync(p)) { detect = require(p); break; } } catch {}
111
+ }
112
+ const c = detect ? detect.looksLikeCode(targetRoot) : { code: false };
113
+ if (c.code) return { profile: 'product-code', why: `this folder holds code (${c.why}); pass --pm for a documents repository` };
114
+ return { profile: 'pm-artifacts', why: 'no code found here; pass --code if this repository will hold a product\'s code' };
115
+ }
116
+
103
117
  function vendor(targetRoot, opts) {
104
118
  payloadOrDie();
105
119
  const kit = path.join(targetRoot, 'pmos');
@@ -108,10 +122,12 @@ function vendor(targetRoot, opts) {
108
122
  fs.cpSync(PAYLOAD, kit, { recursive: true });
109
123
  stampInstall(kit, 'vendor');
110
124
  // D68 — the default user is a PM: a new repository is a pm-artifacts repository (documents,
111
- // strategy, specifications — PM lanes, the brief → draft → review → approved ladder). `--code`
112
- // keeps today's product-code behaviour. An existing .pmos-profile is never overwritten.
125
+ // strategy, specifications — PM lanes, the brief → draft → review → approved ladder). A folder that
126
+ // already holds code is a product-code repository (the workspace's rule, lib/profile-default.js,
127
+ // PM 2026-10-31). `--code` and `--pm` say it outright. An existing .pmos-profile is never overwritten.
113
128
  const profileFile = path.join(targetRoot, '.pmos-profile');
114
- const profile = opts && opts.code ? 'product-code' : 'pm-artifacts';
129
+ const chosen = chooseProfile(targetRoot, opts);
130
+ const profile = chosen.profile;
115
131
  if (!fs.existsSync(profileFile)) {
116
132
  fs.writeFileSync(profileFile, `${profile}\n# PMOS repository profile (D68): pm-artifacts | product-code\n`);
117
133
  }
@@ -125,7 +141,8 @@ function vendor(targetRoot, opts) {
125
141
  }
126
142
  }
127
143
  console.log(`✅ PMOS kit vendored at ${kit} (${kitVersion().split('\n')[0]})`);
128
- console.log(` profile: ${fs.readFileSync(profileFile, 'utf8').split('\n')[0]} (${profileFile})`);
144
+ const kept = fs.readFileSync(profileFile, 'utf8').split('\n')[0];
145
+ console.log(` profile: ${kept} (${profileFile})${kept === profile ? ` — ${chosen.why}` : ' — kept as it was'}`);
129
146
  reportSkillLinks(cockpit.linkSkills(targetRoot));
130
147
  offerMod(targetRoot, opts);
131
148
  console.log(`
@@ -427,8 +444,9 @@ function main() {
427
444
  const positional = args.filter((a) => !a.startsWith('-'));
428
445
  if (args.includes('--help') || args.includes('-h')) {
429
446
  console.log('usage:');
430
- console.log(' create-pmos [target-dir] vendor the file-mode kit into a repo (pm-artifacts profile, D68)');
431
- console.log(' create-pmos [target-dir] --code …as a product-code repository instead (code lanes and ladder)');
447
+ console.log(' create-pmos [target-dir] vendor the file-mode kit into a repo (product-code if it holds code, else pm-artifacts, D68)');
448
+ console.log(' create-pmos [target-dir] --code …as a product-code repository (code lanes and ladder)');
449
+ console.log(' create-pmos [target-dir] --pm …as a pm-artifacts (documents) repository, even if it holds code');
432
450
  console.log(' create-pmos [target-dir] --no-mod …without offering the pmos-cockpit mod in .claude/settings.json');
433
451
  console.log(' create-pmos --update [kit-or-repo] refresh only the kit kernel (add --offer-mod to offer the mod in .claude/settings.json)');
434
452
  console.log(' create-pmos workspace [repo-dir] install/upgrade + launch the Terminal Workspace GUI');
@@ -444,8 +462,8 @@ function main() {
444
462
  } else if (args.includes('--update')) {
445
463
  update(positional[0], { offerMod: args.includes('--offer-mod') });
446
464
  } else {
447
- vendor(path.resolve(positional[0] || '.'), { code: args.includes('--code'), noMod: args.includes('--no-mod') });
465
+ vendor(path.resolve(positional[0] || '.'), { code: args.includes('--code'), pm: args.includes('--pm'), noMod: args.includes('--no-mod') });
448
466
  }
449
467
  }
450
468
  if (require.main === module) main();
451
- else module.exports = { hide, globalRoot, runInstalledPmos, launcherCurrent, launchWorkspace, installedWorkspaceVersion, installWorkspaceGlobal, stopWorkspaceServer, resetRoot: () => { rootMemo = null; } };
469
+ else module.exports = { chooseProfile, hide, globalRoot, runInstalledPmos, launcherCurrent, launchWorkspace, installedWorkspaceVersion, installWorkspaceGlobal, stopWorkspaceServer, resetRoot: () => { rootMemo = null; } };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.667.0",
3
+ "version": "0.669.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": {
@@ -34,8 +34,21 @@
34
34
  ],
35
35
  "pmosChanges": [
36
36
  {
37
- "v": "0.667.0",
38
- "at": "2026-11-22T04:39:52.182Z",
37
+ "v": "0.669.0",
38
+ "at": "2026-11-22T04:57:48.469Z",
39
+ "f": 4,
40
+ "prs": [
41
+ {
42
+ "n": 1457,
43
+ "t": "Create-pmos picks the code profile itself; OKR template the board resolves",
44
+ "s": "Create-pmos picks the code profile itself; OKR template the board resolves",
45
+ "k": "new"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "v": "0.668.0",
51
+ "at": "2026-11-22T04:47:26.459Z",
39
52
  "f": 4,
40
53
  "prs": [
41
54
  {
@@ -49,6 +62,12 @@
49
62
  "t": "Dry-run each ticket before it is built, and outside sign-offs on the same question card",
50
63
  "s": "Dry-run each ticket before it is built, and outside sign-offs on the same question card",
51
64
  "k": "new"
65
+ },
66
+ {
67
+ "n": 1459,
68
+ "t": "The task popup loads komorebi.css from its own folder only (main red since #1452)",
69
+ "s": "The task popup loads komorebi.css from its own folder only (main red since #1452)",
70
+ "k": "fix"
52
71
  }
53
72
  ]
54
73
  },
@@ -333,19 +352,6 @@
333
352
  "k": "new"
334
353
  }
335
354
  ]
336
- },
337
- {
338
- "v": "0.636.0",
339
- "at": "2026-11-20T00:18:49.118Z",
340
- "f": 4,
341
- "prs": [
342
- {
343
- "n": 1418,
344
- "t": "The PMOS UI design system in the workspace, prototypes and the kit",
345
- "s": "The PMOS UI design system in the workspace, prototypes and the kit",
346
- "k": "new"
347
- }
348
- ]
349
355
  }
350
356
  ]
351
357
  }
package/payload/AGENTS.md CHANGED
@@ -33,7 +33,7 @@ It refuses frontmatter, fenced and indented code, table rows, headings, delibera
33
33
 
34
34
  | Hosted tool (as skills name them) | File-mode equivalent |
35
35
  |---|---|
36
- | `create_initiative` | write `pmos/state/initiatives/<id>.md` (frontmatter: id, title, parent_kr, stage, status, **type** — the D56 lane, default `feature` — plus `intent` for the chore lane, prd_path, rubric_path, created; plus `outcome_metric` + `outcome_horizon` — the D57 declaration for post-ship success criteria. No initiative goes without one: after you create it, and once its PRD exists, run `pmos outcomes propose <id>` and show the cited draft; write it with `pmos outcomes declare` only after the PM's yes; plus `description` — one paragraph that says what the initiative is, shown in About before any PRD exists: `pmos initiative describe <id>` lists the cited lines to draft it from, and `pmos initiative describe <id> "<text>"` writes it only after the PM's yes) |
36
+ | `create_initiative` | write `pmos/state/initiatives/<id>.md` (frontmatter: id, title, parent_kr — `<period>:<objective>:<kr>` such as `q4-2026:o1:kr1`, naming a KR in `pmos/planning/okrs/` written from `pmos/okf/core/templates/okr-template.md`, or `health:<id>` —, stage, status, **type** — the D56 lane, default `feature` — plus `intent` for the chore lane, prd_path, rubric_path, created; plus `outcome_metric` + `outcome_horizon` — the D57 declaration for post-ship success criteria. No initiative goes without one: after you create it, and once its PRD exists, run `pmos outcomes propose <id>` and show the cited draft; write it with `pmos outcomes declare` only after the PM's yes; plus `description` — one paragraph that says what the initiative is, shown in About before any PRD exists: `pmos initiative describe <id>` lists the cited lines to draft it from, and `pmos initiative describe <id> "<text>"` writes it only after the PM's yes) |
37
37
  | `save_spec` | the PRD file itself at `pmos/planning/prd/<id>-prd.md` (set `prd_path` on the initiative file) |
38
38
  | `get_spec` / `get_planning_artifact` | read `pmos/planning/…` |
39
39
  | `get_skill` | read `pmos/skills/<name>.skill` |
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@09022054
1
+ kernel-source: pmos@057b0945
2
2
  assembled: 2026-11-22
3
3
  mode: vendor
@@ -15,5 +15,6 @@ OKF reserved file (no frontmatter). Directory listing for progressive disclosure
15
15
  - [decision-record-template](decision-record-template.md) — Meeting notes and decisions (D68 decision-record lane, light by default): decisions, actions, open questions.
16
16
  - [report-weekly-template](report-weekly-template.md) — A regular status report (D68 report lane, light by default): what moved against which KR or domain goal, metrics, blockers, what needs the reader.
17
17
  - [experiment-record-template](experiment-record-template.md) — The experiment record (D107) at planning/initiatives/<id>.md: Intent, Done test, kill condition. The batch lead writes one for every batch item before its build.
18
+ - [okr-template](okr-template.md) — One period's OKR file in the shape the anchor resolver reads: `## O1 — …` headings, `**KR1**` bullets, anchors `q4-2026:o1:kr1`.
18
19
  - [done-test-template](done-test-template.md) — An experiment's done test (D107) at planning/done-tests/<id>.md: the checks that say the work is done, written before the build.
19
20
  - [agent-eval-set-template](agent-eval-set-template.md) — The done test of an initiative marked agent: true (agent-product-lane): a simulation eval set with scenarios (input conversation, expected behaviour, scoring rubric) and a pass threshold.
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: Template
3
+ title: OKR Template
4
+ description: The scaffold for one period's OKR file at planning/okrs/okrs-<quarter>-<year>.md, in the shape the anchor resolver reads, so an initiative's parent_kr resolves on the board.
5
+ tags: [template, okr, anchor]
6
+ timestamp: 2026-11-22
7
+ ---
8
+
9
+ # OKRs — Q4 2026
10
+
11
+ **Situating context:** the second-repo pilot (2026-11-22) wrote KRs as `**kr-fair-split:**` bullets and anchored work to a bare `kr-fair-split`. The Initiative Gate passed them, because it only checks that `parent_kr` is not empty, but the board showed every initiative blocked on anchor. The [okr skill](/skills/okr.skill) fills this template. Copy it to `planning/okrs/okrs-q4-2026.md` (in a kit repo, `pmos/planning/okrs/`) and replace the example text.
12
+
13
+ The shape the resolver reads:
14
+
15
+ - The period is in the H1 (`# OKRs — Q4 2026`), in a `period: 2026-Q4` line, or in the file name.
16
+ - Each objective is a heading `## O1 — <name>`.
17
+ - Each KR is a bullet under its objective that starts with `**KR1**`, `**KR2**`, … (or `**KR-<word>**`, with capital `KR`).
18
+ - An initiative anchors with `parent_kr: q4-2026:o1:kr1` (period, objective, KR), or with a health budget such as `parent_kr: health:tech`.
19
+
20
+ ## O1 — A split you can pay without arguing
21
+
22
+ - **KR1** — Every split adds up to the bill to the cent.
23
+ - baseline: 6,834 of 10,000 random bills do not add up → target: 0 · source: the product's test suite
24
+ - **KR2** — Real bills work: a tip and uneven shares.
25
+ - baseline: 0 of 2 → target: 2 of 2 · source: the product's test suite
@@ -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-22T04:39:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:57:45Z"}
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-22T04:39:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:57:45Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -54,6 +54,7 @@ operationalizes the [okr-tree](/okf/core/concepts/okr-tree.md) concept.
54
54
 
55
55
  - OKR instances are **operational** — under `/planning/okrs/`, not in the OKF bundle.
56
56
  - Filename: period-slugged, e.g. `okrs-q3-2026.md`.
57
+ - Shape: fill [the OKR template](/okf/core/templates/okr-template.md). Objectives are `## O1 — <name>` headings and KRs are `**KR1**` bullets under them, so the board can resolve an initiative's `parent_kr: q3-2026:o1:kr1`. A lowercase `kr-…` bullet or a bare `kr-…` anchor passes the gate but shows as blocked on the board.
57
58
 
58
59
  ## Quality bar
59
60
 
@@ -56,6 +56,7 @@ operationalizes the [okr-tree](/okf/core/concepts/okr-tree.md) concept.
56
56
 
57
57
  - OKR instances are **operational** — under `/planning/okrs/`, not in the OKF bundle.
58
58
  - Filename: period-slugged, e.g. `okrs-q3-2026.md`.
59
+ - Shape: fill [the OKR template](/okf/core/templates/okr-template.md). Objectives are `## O1 — <name>` headings and KRs are `**KR1**` bullets under them, so the board can resolve an initiative's `parent_kr: q3-2026:o1:kr1`. A lowercase `kr-…` bullet or a bare `kr-…` anchor passes the gate but shows as blocked on the board.
59
60
 
60
61
  ## Quality bar
61
62
 
@@ -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-22T04:39:48Z"}
5
+ generated: {by: process:create-pmos, at: "2026-11-22T04:57:45Z"}
6
6
  status: stable
7
7
  ---
8
8
 
@@ -1,7 +1,20 @@
1
1
  [
2
2
  {
3
- "v": "0.667.0",
4
- "at": "2026-11-22T04:39:52.182Z",
3
+ "v": "0.669.0",
4
+ "at": "2026-11-22T04:57:48.469Z",
5
+ "f": 4,
6
+ "prs": [
7
+ {
8
+ "n": 1457,
9
+ "t": "Create-pmos picks the code profile itself; OKR template the board resolves",
10
+ "s": "Create-pmos picks the code profile itself; OKR template the board resolves",
11
+ "k": "new"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "v": "0.668.0",
17
+ "at": "2026-11-22T04:47:26.459Z",
5
18
  "f": 4,
6
19
  "prs": [
7
20
  {
@@ -15,6 +28,12 @@
15
28
  "t": "Dry-run each ticket before it is built, and outside sign-offs on the same question card",
16
29
  "s": "Dry-run each ticket before it is built, and outside sign-offs on the same question card",
17
30
  "k": "new"
31
+ },
32
+ {
33
+ "n": 1459,
34
+ "t": "The task popup loads komorebi.css from its own folder only (main red since #1452)",
35
+ "s": "The task popup loads komorebi.css from its own folder only (main red since #1452)",
36
+ "k": "fix"
18
37
  }
19
38
  ]
20
39
  },
@@ -123,6 +123,7 @@ On a computer, a PMOS task you open from Events, Today, Goals or Search opens as
123
123
  - The top line has **Close**, the path (product › initiative › Jira key), the Jira chip, the chat button, ⋯ and ×. Press the initiative's name to open the initiative. One line under the name says Task or Milestone, who has it, when it is due and its stage.
124
124
  - The left column has three blocks. **Where it stands** says who has it, its status, when it is due or how many days late it is, what waits on you and which initiative it moves. A task with no due date says so. **Linked** lists the initiative, the Jira ticket and each link in the notes; with nothing linked, the block does not show. **Activity** lists PMOS's kept changes, newest first: three, then **Earlier**. A change from the last 7 days has **Undo**.
125
125
  - The right column is the task card: status, dates, owner, notes and every change you can make there, each with **Undo**.
126
+ - After PMOS updates, the popup draws with the new version's look at once; it never keeps the look of the version before.
126
127
 
127
128
  ## Work and its chat, in one popup
128
129
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.667.0",
3
+ "version": "0.669.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pmos-workspace",
9
- "version": "0.667.0",
9
+ "version": "0.669.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@anthropic-ai/sdk": "^1.3.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.667.0",
3
+ "version": "0.669.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",
@@ -91,7 +91,7 @@ export async function openTask(uid, ctx = {}) {
91
91
  if (ctx.full) {
92
92
  el.classList.add('ctp-full', 'pm-ds'); scrim.classList.add('ctp-full'); // pm-ds: the Komorebi parts inside (komorebi.css, loaded below)
93
93
  const K = new URL('./komorebi.css', import.meta.url).href;
94
- if (!document.querySelector(`link[href="${K}"]`) && !document.querySelector('link[href="/pm/komorebi.css"]')) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = K; document.head.appendChild(l); }
94
+ if (!document.querySelector(`link[href="${K}"], link[href$="/komorebi.css"]`)) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = K; document.head.appendChild(l); }
95
95
  const L = document.querySelector('.cz-pop .cz-pop-l');
96
96
  if (L && typeof ResizeObserver !== 'undefined') { S.ro = new ResizeObserver(place); S.ro.observe(L); }
97
97
  window.addEventListener('resize', place); place();