create-pmos 0.5.0 → 0.6.1

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.
Files changed (58) hide show
  1. package/README.md +127 -0
  2. package/bin/create-pmos.js +93 -7
  3. package/package.json +7 -3
  4. package/payload/AGENTS-HUMAN.md +6 -0
  5. package/payload/AGENTS.md +35 -1
  6. package/payload/KIT-VERSION +2 -2
  7. package/payload/README.md +6 -0
  8. package/payload/SECURITY.md +6 -0
  9. package/payload/okf/core/concepts/frontmatter-format.md +75 -0
  10. package/payload/okf/core/concepts/index.md +3 -0
  11. package/payload/okf/core/concepts/log.md +13 -0
  12. package/payload/okf/core/templates/eval-rubric-template.md +12 -10
  13. package/payload/okf/core/templates/prd-template.md +6 -0
  14. package/payload/okf/core/templates/prototype-brief-template.md +45 -21
  15. package/payload/planning/evals/agent-run-eval-rubric.md +10 -7
  16. package/payload/scripts/metrics.py +142 -121
  17. package/payload/skills/SKILL-FORMAT.md +6 -0
  18. package/payload/skills/discovery.skill +4 -0
  19. package/payload/skills/eval-rubric.skill +1 -1
  20. package/payload/skills/explain-surface.skill +156 -0
  21. package/payload/skills/pmos-router.skill +25 -3
  22. package/payload/skills/prd.skill +8 -0
  23. package/payload/skills/prototype.skill +106 -41
  24. package/payload/skills/source-to-concept.skill +67 -0
  25. package/payload/skills/strategic-brief.skill +57 -0
  26. package/payload/skills-native/discovery/SKILL.md +4 -0
  27. package/payload/skills-native/eval-rubric/SKILL.md +1 -1
  28. package/payload/skills-native/explain-surface/SKILL.md +158 -0
  29. package/payload/skills-native/pmos-router/SKILL.md +25 -3
  30. package/payload/skills-native/prd/SKILL.md +8 -0
  31. package/payload/skills-native/prototype/SKILL.md +106 -41
  32. package/payload/skills-native/source-to-concept/SKILL.md +69 -0
  33. package/payload/skills-native/strategic-brief/SKILL.md +59 -0
  34. package/payload/templates/agent-run-eval-rubric.md +10 -7
  35. package/payload/templates/ticket-template.md +2 -0
  36. package/workspace/README.md +112 -0
  37. package/workspace/REMOTE.md +131 -0
  38. package/workspace/bin/pmos.js +206 -0
  39. package/workspace/doctor.js +99 -0
  40. package/workspace/lib/console-state.js +117 -0
  41. package/workspace/lib/file-mode-parse.js +58 -0
  42. package/workspace/lib/harness-parse.js +222 -0
  43. package/workspace/lib/preview-kind.js +98 -0
  44. package/workspace/lib/rate-limit.js +26 -0
  45. package/workspace/lib/remote-access.js +235 -0
  46. package/workspace/lib/review-gate.js +39 -0
  47. package/workspace/lib/schedule-logic.js +132 -0
  48. package/workspace/lib/skill-store.js +143 -0
  49. package/workspace/lib/surface-contract.js +79 -0
  50. package/workspace/lib/transcript-read.js +247 -0
  51. package/workspace/package-lock.json +94 -0
  52. package/workspace/package.json +23 -0
  53. package/workspace/public/app.js +1710 -0
  54. package/workspace/public/index.html +175 -0
  55. package/workspace/public/styles.css +766 -0
  56. package/workspace/server.js +1753 -0
  57. package/workspace/skills/backlog-triage.skill +13 -0
  58. package/workspace/skills/weekly-report.skill +19 -0
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ ---
2
+ type: Reference
3
+ title: "create-pmos"
4
+ timestamp: 2026-07-23
5
+ ---
6
+
1
7
  # create-pmos
2
8
 
3
9
  **A product manager's operating system you can adopt in five minutes — no coding expertise
@@ -51,6 +57,11 @@ Next steps in /home/you/my-product:
51
57
  Do those three lines and setup is over. A fresh kit with zero history is not behind — it is
52
58
  exactly where every product starts.
53
59
 
60
+ > **Prefer a GUI to a folder of files?** One more command gives you the **Terminal Workspace** — a
61
+ > local app that runs your agent sessions as real terminals with the library and gates beside them.
62
+ > See [The Terminal Workspace](#the-terminal-workspace-gui-optional) below. It's optional; the
63
+ > file-mode workflow above needs nothing but your editor and your agent.
64
+
54
65
  ### Behind a corporate proxy? (403 on install)
55
66
 
56
67
  On many work laptops, npm goes through a company registry mirror — and a brand-new public package
@@ -75,6 +86,78 @@ ways through:
75
86
  Same result, byte-identical kit, no proxy involved. (Which is fitting — keeping your work
76
87
  inside your own boundary is the whole point of this kit.)
77
88
 
89
+ ## The Terminal Workspace (GUI) — optional
90
+
91
+ The kit above is files-and-your-agent. If you'd rather **see** the whole loop — your agent sessions
92
+ running as real terminals, the library and the gates in the same window — activate the **Terminal
93
+ Workspace**: a local companion app that lives entirely on your machine (localhost only, never a
94
+ public endpoint).
95
+
96
+ ### Activate it — one command
97
+
98
+ ```bash
99
+ npx create-pmos@latest workspace
100
+ ```
101
+
102
+ That single command does everything:
103
+
104
+ 1. **Installs the app + puts `pmos` on your PATH.** The workspace hosts real terminal sessions, so
105
+ it has one native dependency (`node-pty`) — this is the one step in the whole kit that builds
106
+ something. It takes ~20 seconds, once.
107
+ 2. **Launches the GUI** — it starts a small localhost server and opens your browser on the current
108
+ repo as a workspace.
109
+
110
+ From then on, the daily driver is just one word, from any repo folder:
111
+
112
+ ```bash
113
+ pmos # open THIS repo as a workspace (starts the server if it isn't up)
114
+ pmos ../other-repo # open a different repo — one server hosts many, they never disturb each other
115
+ pmos status # is it running? which repos, which sessions?
116
+ pmos stop # shut the server down (scrollback is kept; sessions re-attach next launch)
117
+ pmos doctor # diagnose the environment (node build tools, PTY spawn test)
118
+ ```
119
+
120
+ Close the terminal and your sessions keep running — the server is persistent; `pmos stop` is the
121
+ only thing that ends it.
122
+
123
+ ### If `pmos` doesn't land on your PATH
124
+
125
+ Some machines lock down npm's global folder. If the activation prints a warning instead of putting
126
+ `pmos` on your PATH, it still opens the GUI — and it tells you the one line to run for the bare
127
+ `pmos` command next time (usually `sudo npm install -g …`, or
128
+ [point npm's global prefix somewhere you own](https://docs.npmjs.com/resolving-eacces-permissions-errors)
129
+ so no `sudo` is ever needed).
130
+
131
+ ### What to expect
132
+
133
+ - **Requirements:** Node 18+. macOS, Linux, and Windows. Activation (`create-pmos workspace`) builds
134
+ `node-pty` once with a C toolchain — most dev machines already have one; `pmos doctor` names the
135
+ exact fix if not.
136
+ - **It's local and private.** The server binds `127.0.0.1` and is never exposed to the network. Your
137
+ agent CLI (Claude Code, Codex, a plain shell) runs **untouched** — its own login, slash commands,
138
+ and keybindings all work; the workspace is the terminal, not a wrapper.
139
+ - **The gates are the same gates.** `approve` / `return` / `accept` in the GUI write the exact
140
+ file-mode records (`state/acceptances.jsonl`) this kit already uses — only ever on your click.
141
+ Nothing is recorded automatically.
142
+ - **Works with or without the kit.** Best in a repo you've run `create-pmos` in (it reads and writes
143
+ `pmos/state/`), but it opens any repo — a plain project just records into the server's own state.
144
+
145
+ > **Why this is a separate opt-in.** Vendoring the file-mode kit stays dependency-free and
146
+ > proxy-safe — no native builds, no install scripts, nothing fetched. The workspace is the one
147
+ > place a native module is unavoidable, so it only ever installs when you explicitly ask for the
148
+ > GUI. The app itself ships inside this package; `workspace` builds it, it doesn't download it.
149
+
150
+ <details><summary>Running it from a PMOS checkout instead (no npx)</summary>
151
+
152
+ If you have the PMOS source, the workspace is a normal Node app:
153
+
154
+ ```bash
155
+ cd workspace
156
+ npm install -g . # installs the `pmos` command
157
+ pmos # from any folder
158
+ ```
159
+ </details>
160
+
78
161
  ## Your first conversation
79
162
 
80
163
  Open the folder with your coding agent and talk to it like a colleague — clear about the goal,
@@ -250,6 +333,50 @@ Refreshes the skills, concepts, and scripts only. Your records — `state/`, `pl
250
333
  `okf/product/` — are yours, and an update never touches them. `pmos/KIT-VERSION` always says
251
334
  exactly what you're running.
252
335
 
336
+ ## What's new in 0.6.1
337
+
338
+ A completeness fix: two skills the kit already *pointed at* but didn't *ship*.
339
+
340
+ - **`strategic-brief` and `source-to-concept` now ride in the kit.** The shipped `pmos-router` and
341
+ `prd` skills recommend `strategic-brief` (make the go/no-go case before a PRD — D61, optional and
342
+ router-recommended for new-bet feature work), and `ingest-repo` cites `source-to-concept` as its
343
+ extraction discipline — but neither skill was in the bundle, so those were dangling references.
344
+ Both are now included. They're file-mode-clean (no backend, no network).
345
+
346
+ **Upgrade note:** `npx create-pmos@latest --update` brings both in and never touches your `state/`,
347
+ `planning/`, or `okf/product/` records. Purely additive.
348
+
349
+ ## What's new in 0.6.0
350
+
351
+ 0.5.0 made the kit provider- and model-agnostic. 0.6.0 adds a **face** to the file-mode loop: the
352
+ **Terminal Workspace GUI**, activated by one command.
353
+
354
+ - **`npx create-pmos@latest workspace` — install and launch the GUI in one step.** The workspace is
355
+ a local companion app that runs your agent sessions as real terminals, with the library and the
356
+ gates in the same window (D62). The command installs it, puts a one-word `pmos` launcher on your
357
+ PATH, and opens your browser on the current repo. After that, `pmos` (plus `pmos status`,
358
+ `pmos stop`, `pmos doctor`) is the daily driver from any folder. The server is localhost-only and
359
+ persistent — close the terminal and your sessions keep running.
360
+
361
+ > See it before you wire it: `npx create-pmos@latest workspace` in any repo. The gates in the GUI
362
+ > write the same `state/acceptances.jsonl` records the file-mode kit already uses — only on your
363
+ > click, never automatically.
364
+
365
+ - **The scaffolder is still dependency-free — on purpose.** Vendoring or updating the file-mode kit
366
+ builds nothing, fetches nothing, and stays proxy-safe exactly as before. The workspace is the one
367
+ place a native module (`node-pty`, for real terminals) is unavoidable, so it installs **only** when
368
+ you explicitly ask for the GUI. The app is bundled in this package — `workspace` builds it locally,
369
+ it is never downloaded.
370
+
371
+ - **Graceful when the global install is locked down.** On machines where npm's global folder needs
372
+ elevation, activation doesn't fail — it opens the GUI from the bundled copy and prints the single
373
+ line to get the bare `pmos` command for next time.
374
+
375
+ **Upgrade note:** `npx create-pmos@latest --update` is unchanged and never touches your `state/`,
376
+ `planning/`, or `okf/product/` records. The GUI is purely additive and entirely optional — if you
377
+ never run `create-pmos workspace`, nothing native is ever installed and the file-mode workflow is
378
+ exactly what it was.
379
+
253
380
  ## What's new in 0.5.0
254
381
 
255
382
  0.4.0 opened the front of the loop. 0.5.0 makes explicit what was always the intent: **the kit is
@@ -4,17 +4,26 @@
4
4
  *
5
5
  * npx create-pmos@latest [target-dir] vendor a fresh pmos/ kit (default target: cwd)
6
6
  * npx create-pmos@latest --update [dir] refresh ONLY the kernel of an existing kit
7
+ * npx create-pmos@latest workspace [dir] install + launch the Terminal Workspace GUI (D62)
7
8
  * npx create-pmos@latest --version print package version + bundled kernel provenance
8
9
  *
9
- * Dependency-free by design. Makes NO network calls, sends NO telemetry — the payload is
10
- * bundled in this package (assembled by the canonical kit/build-kit.sh at publish time).
11
- * --update never touches state/, planning/ (except check_rubrics.py), or okf/product/.
10
+ * The SCAFFOLDER is dependency-free by design: vendoring/updating the file-mode kit makes NO
11
+ * network calls, sends NO telemetry, and builds NOTHING native — the kit payload is bundled in
12
+ * this package (assembled by the canonical kit/build-kit.sh at publish time). --update never
13
+ * touches state/, planning/ (except check_rubrics.py), or okf/product/.
14
+ *
15
+ * The `workspace` subcommand is the one OPT-IN exception: the Terminal Workspace is a local
16
+ * companion app with a native dependency (node-pty), so activating it runs `npm install`. Nothing
17
+ * native is fetched unless the user explicitly asks for the GUI — the proxy-safe scaffolder path
18
+ * is unchanged. The workspace app itself is bundled in this package, not downloaded.
12
19
  */
13
20
  'use strict';
14
21
  const fs = require('fs');
15
22
  const path = require('path');
23
+ const { spawnSync } = require('child_process');
16
24
 
17
- const PAYLOAD = path.join(__dirname, '..', 'payload'); // the assembled pmos/ kit
25
+ const PAYLOAD = path.join(__dirname, '..', 'payload'); // the assembled pmos/ kit (file-mode)
26
+ const WORKSPACE = path.join(__dirname, '..', 'workspace'); // the bundled Terminal Workspace app (D62)
18
27
  const PKG = require(path.join(__dirname, '..', 'package.json'));
19
28
 
20
29
  // Kernel paths (relative to the kit root) that --update may rewrite. Everything else is state.
@@ -93,14 +102,91 @@ function update(dirArg) {
93
102
  console.log('state/, planning/ (beyond check_rubrics.py), and okf/product/ were not touched. Review the diff as a normal PR.');
94
103
  }
95
104
 
105
+ // ── workspace ────────────────────────────────────────────────────────────────
106
+ // Activate the Terminal Workspace GUI (D62). This is the one command that installs — the workspace
107
+ // hosts real agent-CLI terminals (PTYs), so it needs the native node-pty module. We do it in two
108
+ // honest steps so the failure mode of each is legible:
109
+ // 1. put the `pmos` command on PATH (npm install -g the bundled app → builds node-pty once)
110
+ // 2. launch it (`pmos <dir>` starts the localhost server + opens the GUI)
111
+ // After this one-time activation, the daily driver is just `pmos` from any repo folder. If the
112
+ // global install can't run (locked-down npm prefix), we DON'T fail — we launch straight from the
113
+ // bundled copy (its own bin/pmos.js installs runtime deps on first run) and print the one manual
114
+ // line to get the bare `pmos` word for next time.
115
+ function onPath(cmd) {
116
+ // `command -v` (POSIX) and `where` (Windows) are shell BUILTINS — neither has a standalone binary on
117
+ // Linux, so the probe MUST run through a shell or it ENOENTs and always reports "not found" (which,
118
+ // after a successful install, prints a false PATH warning and defeats the idempotent fast path). cmd
119
+ // is always a literal, so the string form is injection-safe.
120
+ const probe = process.platform === 'win32' ? `where ${cmd}` : `command -v ${cmd}`;
121
+ try { return spawnSync(probe, { stdio: 'ignore', shell: true }).status === 0; }
122
+ catch { return false; }
123
+ }
124
+
125
+ function workspaceOrDie() {
126
+ if (!fs.existsSync(path.join(WORKSPACE, 'bin', 'pmos.js'))) {
127
+ die('this build does not bundle the Terminal Workspace — reinstall with `npx create-pmos@latest`, '
128
+ + 'or install it from a PMOS checkout: `cd workspace && npm install -g .`');
129
+ }
130
+ }
131
+
132
+ function launchWorkspace(targetDir, viaGlobal) {
133
+ if (viaGlobal && onPath('pmos')) {
134
+ // `pmos` owns the whole lifecycle: start the server detached, open the browser on this repo.
135
+ return spawnSync('pmos', [targetDir], { stdio: 'inherit', shell: process.platform === 'win32' }).status || 0;
136
+ }
137
+ // Fallback: run the bundled launcher directly. Its ensureInstalled() pulls runtime deps on first run.
138
+ console.log('Launching from the bundled copy (the `pmos` command is not on PATH).');
139
+ return spawnSync(process.execPath, [path.join(WORKSPACE, 'bin', 'pmos.js'), targetDir],
140
+ { stdio: 'inherit', env: process.env }).status || 0;
141
+ }
142
+
143
+ function workspace(targetArg) {
144
+ workspaceOrDie();
145
+ const targetDir = path.resolve(targetArg || '.');
146
+
147
+ // Already activated? Then this is just a launch — fast path, no reinstall.
148
+ if (onPath('pmos')) {
149
+ console.log('✅ workspace already activated — launching. (Type `pmos` directly next time.)');
150
+ process.exit(launchWorkspace(targetDir, true));
151
+ }
152
+
153
+ console.log('Activating the PMOS Terminal Workspace (one-time). Installing node-pty (native) + putting `pmos` on PATH…');
154
+ const npmCmd = process.platform === 'win32' ? 'npm.cmd' : 'npm';
155
+ const g = spawnSync(npmCmd, ['install', '-g', WORKSPACE, '--no-audit', '--no-fund'],
156
+ { stdio: 'inherit', shell: process.platform === 'win32' });
157
+
158
+ if (g.status === 0 && onPath('pmos')) {
159
+ console.log('\n✅ `pmos` is now on your PATH. From any repo folder, just type: pmos');
160
+ console.log(' pmos status · pmos stop · pmos doctor');
161
+ process.exit(launchWorkspace(targetDir, true));
162
+ }
163
+
164
+ // Global install refused (common on system-owned npm prefixes) — don't fail, still open the GUI.
165
+ console.log('\n⚠ Could not put `pmos` on your PATH automatically (your npm global prefix may be locked down).');
166
+ console.log(' To get the bare `pmos` command for next time, run ONE of:');
167
+ console.log(` npm install -g "${WORKSPACE}" # then: pmos`);
168
+ console.log(` sudo npm install -g "${WORKSPACE}" # if your node is system-owned`);
169
+ console.log(` Docs: npm prefix without sudo → https://docs.npmjs.com/resolving-eacces-permissions-errors`);
170
+ console.log(' Opening the GUI now from the bundled copy…\n');
171
+ process.exit(launchWorkspace(targetDir, false));
172
+ }
173
+
96
174
  const args = process.argv.slice(2);
175
+ const positional = args.filter((a) => !a.startsWith('-'));
97
176
  if (args.includes('--help') || args.includes('-h')) {
98
- console.log('usage: create-pmos [target-dir] | create-pmos --update [kit-or-repo-dir] | create-pmos --version');
177
+ console.log('usage:');
178
+ console.log(' create-pmos [target-dir] vendor the file-mode kit into a repo');
179
+ console.log(' create-pmos --update [kit-or-repo] refresh only the kit kernel');
180
+ console.log(' create-pmos workspace [repo-dir] install + launch the Terminal Workspace GUI');
181
+ console.log(' create-pmos --version print version + bundled kernel provenance');
99
182
  } else if (args.includes('--version') || args.includes('-v')) {
100
183
  console.log(`create-pmos ${PKG.version}`);
101
184
  console.log(kitVersion());
185
+ console.log(`workspace bundled: ${fs.existsSync(path.join(WORKSPACE, 'bin', 'pmos.js')) ? 'yes' : 'no'}`);
186
+ } else if (positional[0] === 'workspace') {
187
+ workspace(positional[1]);
102
188
  } else if (args.includes('--update')) {
103
- update(args.filter((a) => !a.startsWith('-'))[0]);
189
+ update(positional[0]);
104
190
  } else {
105
- vendor(path.resolve(args.filter((a) => !a.startsWith('-'))[0] || '.'));
191
+ vendor(path.resolve(positional[0] || '.'));
106
192
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-pmos",
3
- "version": "0.5.0",
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. No database, no network, no telemetry.",
3
+ "version": "0.6.1",
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. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "create-pmos": "bin/create-pmos.js"
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "bin/",
11
11
  "payload/",
12
+ "workspace/",
12
13
  "README.md",
13
14
  "LICENSE"
14
15
  ],
@@ -21,6 +22,9 @@
21
22
  "agent-harness",
22
23
  "eval-driven",
23
24
  "scaffold",
24
- "create"
25
+ "create",
26
+ "workspace",
27
+ "terminal",
28
+ "gui"
25
29
  ]
26
30
  }
@@ -1,3 +1,9 @@
1
+ ---
2
+ type: Reference
3
+ title: "AGENTS-HUMAN.md — the PMOS kit for a human builder (D58)"
4
+ timestamp: 2026-07-18
5
+ ---
6
+
1
7
  # AGENTS-HUMAN.md — the PMOS kit for a human builder (D58)
2
8
 
3
9
  You're a person, not an agent — same loop, plain terms, one helper. The full protocol lives in
package/payload/AGENTS.md CHANGED
@@ -1,3 +1,9 @@
1
+ ---
2
+ type: Reference
3
+ title: "AGENTS.md — PMOS Portable Kit (file mode)"
4
+ timestamp: 2026-07-22
5
+ ---
6
+
1
7
  # AGENTS.md — PMOS Portable Kit (file mode)
2
8
 
3
9
  > This file must be read at optimal altitude — concrete heuristics that guide behavior, not brittle
@@ -52,6 +58,26 @@ never invent a lane; a work shape with no lane escalates to the PM.
52
58
  | `chore` | a one-paragraph `intent:` in the initiative file | repo CI + PM spot-check at merge |
53
59
  | `incident` | incident record at `prd_path`, **post-hoc within 48h** (template in `okf/core/templates/`) — the one sanctioned inversion of eval-first | retro in the record; follow-ups become their own initiatives |
54
60
  | `content` | content brief at `prd_path` (audience, message, claims + sources — `skills/copywriting.skill`, template in `okf/core/templates/`) | copy rubric recommended, not required (D58); PM judges at the gate otherwise |
61
+ | `prototype` | quick prototype brief at `prd_path` (the judgement exercised + the specimen format — `skills/prototype.skill`, template in `okf/core/templates/`), **before** the PRD | **NO rubric, BY DESIGN** — grilled as dialogue, never scored (D60(d)); closes on a PM disposition: promote / iterate / kill |
62
+
63
+ > **Known gap in this kit build:** `scripts/gate-initiative.sh` does not yet parameterise the
64
+ > `prototype` lane — a prototype initiative falls through to the `feature` branch and is asked for a
65
+ > `rubric_path` it must not have. Until that is fixed, set the lane's `type: prototype` in the
66
+ > initiative file as normal and expect to carry the gate failure knowingly, or run the prototype
67
+ > before opening the record. Tracked upstream; not a licence to invent a rubric for leg A.
68
+
69
+ **Routing rule (D60, as amended 2026-07-24) — an idea the PM cannot judge from a DESCRIPTION goes to
70
+ the `prototype` lane BEFORE anyone writes a PRD.** The entry rule is the **specimen test**: *can the
71
+ PM judge this from a description, or do they need an instance of it in front of them?* It is **not
72
+ gated on the work having a user interface** — *does this skill's output actually teach?* and *does
73
+ this API feel right to call?* qualify exactly as an unseen screen does. The PM briefs; an agent
74
+ produces **2–3 divergent specimens in whatever format fits** (lookable UI, a worked sample output,
75
+ call/response transcripts, a schema sketch); a craft-grade grilling sharpens them as **dialogue,
76
+ never a score**; a promote-disposition derives the feature-lane PRD + rubric from what was validated.
77
+ The test must discriminate **both ways** — most work (a tool, a migration, a CI gate) *is*
78
+ description-judgeable and routes straight to its PRD untaxed. Contrast `discovery`, which holds a
79
+ **question** and delivers a **learning**; this lane holds a **candidate** and delivers a **validated
80
+ direction**. Prototypes live in `prototype/` and never ship.
55
81
 
56
82
  `no-initiative` label = anchor-free trivia ONLY (a typo, a broken link). A chore, spike,
57
83
  incident, or piece of content is real work and takes its lane — that is what keeps the record
@@ -64,12 +90,20 @@ honest.
64
90
  No skill fits → escalate to the PM; do not improvise a procedure.
65
91
  3. Retrieve context: `pmos/okf/` for concepts, `pmos/okf/product/` for this product's knowledge,
66
92
  `pmos/state/runs.jsonl` + `discoveries.md` for what prior runs tried (episodic memory).
93
+ - **Existing surface → the PM needs the understanding too.** That retrieval warms *you*. When the
94
+ work touches something that already exists — the test is *would specifying this honestly require
95
+ reading code that already exists?* — run `skills/explain-surface.skill` on that region **before**
96
+ the brief/PRD is authored, in a fresh context and **not** by the agent that will write it.
97
+ Standard for existing surfaces, skipped for greenfield. Without it, the agent acquires the
98
+ understanding and the **PM approves a spec built on facts they never saw**.
67
99
  4. Anchor: the initiative file must exist at stage `intake`/`spec` with its **lane's** spec/eval
68
100
  artifacts authored **before** build (eval-first, D13, generalized per lane — see the lane table
69
101
  above; `feature` = PRD + rubric; the incident lane alone records post-hoc). Contract per lane:
70
102
  `feature` = the rubric's sprint-contract section with the PM's explicit `PM_approved: true`;
71
103
  `discovery` = the PM-approved spike brief (question + timebox); `chore` = the stated intent;
72
- `content` = the PM-approved content brief. No work before the lane's approval. Feature-lane
104
+ `content` = the PM-approved content brief; `prototype` = the PM-approved quick brief (the
105
+ judgement exercised + the specimen format) — and **no rubric**, which is the decision, not an
106
+ omission. No work before the lane's approval. Feature-lane
73
107
  `test_method`s SHOULD be executable checks written before build (D58) — wire
74
108
  `templates/product-ci-starter.yml` so tier 1 is never silently empty.
75
109
  5. Branch `initiative/<id>`; execute at control altitude; one commit per artifact.
@@ -1,3 +1,3 @@
1
- kernel-source: pmos@917d29e
2
- assembled: 2026-07-23
1
+ kernel-source: pmos@005408d
2
+ assembled: 2026-07-27
3
3
  mode: vendor
package/payload/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ ---
2
+ type: Reference
3
+ title: "PMOS Portable Kit (file mode)"
4
+ timestamp: 2026-07-23
5
+ ---
6
+
1
7
  # PMOS Portable Kit (file mode)
2
8
 
3
9
  Run the PMOS workflow — initiative → PRD → eval rubric → pre-run contract → build →
@@ -1,3 +1,9 @@
1
+ ---
2
+ type: Reference
3
+ title: "PMOS kit — security posture"
4
+ timestamp: 2026-07-23
5
+ ---
6
+
1
7
  # PMOS kit — security posture
2
8
 
3
9
  A skill is not a document. It is **instructions that run inside your agent**, with your agent's
@@ -0,0 +1,75 @@
1
+ ---
2
+ type: Concept
3
+ title: Repo-wide frontmatter format
4
+ description: The PMOS house convention — every tracked .md carries OKF-format YAML frontmatter with a required type + title + timestamp, so agents and the harness classify and route a file by reading it, not by guessing from its path.
5
+ tags: [frontmatter, okf, format, harness, aci, convention]
6
+ timestamp: 2026-07-24
7
+ ---
8
+
9
+ # Repo-wide frontmatter format
10
+
11
+ **Situating context:** authored for the `repo-wide-md-frontmatter` initiative (proposed D63, amends
12
+ D03). The PM's framing — *"OKF is the format, not the folder"* — decouples the OKF **format** (which
13
+ this makes universal) from the `okf/` **bundle** (curated knowledge, unchanged) and from a file's
14
+ **location** (D04, unchanged). This concept is the reference for what the frontmatter lint enforces.
15
+
16
+ ## The rule
17
+
18
+ Every **tracked** markdown file MUST open with a YAML frontmatter block declaring three **required**
19
+ keys:
20
+
21
+ | key | meaning | rule |
22
+ |---|---|---|
23
+ | `type` | what the file *is* | one of the registry values (below); enforced |
24
+ | `title` | human-readable name | non-empty string |
25
+ | `timestamp` | last-modified | valid ISO 8601 date (`YYYY-MM-DD`) or datetime |
26
+
27
+ Recommended-but-optional (OKF): `description`, `tags`, `resource`. Any pre-existing producer keys
28
+ (`initiative_id`, `eval_type`, `parent_KR`, `pass_threshold`, …) are preserved as optional extension
29
+ keys — never stripped.
30
+
31
+ ```yaml
32
+ ---
33
+ type: Concept
34
+ title: Repo-wide frontmatter format
35
+ timestamp: 2026-07-24
36
+ ---
37
+ ```
38
+
39
+ ## Relationship to OKF and D03
40
+
41
+ OKF requires only `type`. PMOS layers `title` + `timestamp` as **required house keys**, applied
42
+ **repo-wide** (not just the `okf/` bundle). This is stricter than OKF's minimum but still
43
+ OKF-**conformant** — the spec is permissive about extra keys. It is the deliberate amendment D03
44
+ carries (type-only → richer set, repo-wide). The guardrail against required-key creep is this
45
+ registry: the enforced list of `type` values is closed and versioned.
46
+
47
+ ## Reserved files (exempt)
48
+
49
+ OKF's reserved filenames carry **no** frontmatter and are skipped by both the migration and the lint:
50
+
51
+ - `index.md` — a directory listing for progressive disclosure
52
+ - `log.md` — a chronological update history
53
+
54
+ ## The `type` registry
55
+
56
+ The enforced list lives in [`scripts/frontmatter_registry.txt`](/scripts/frontmatter_registry.txt) —
57
+ the single source `frontmatter_lint.py` reads. A `type:` value not in it fails CI (this catches typos).
58
+
59
+ - **OKF core:** `Concept`, `ADR`, `Template`, `Playbook`, `Reference`
60
+ - **Planning:** `PRD`, `Rubric`, `OKR`, `Radar`, `Checklist`, `Calibration`, `Research`, `Design`, `Prototype`
61
+ - **Root governance:** `Decision`, `Principle`, `Debt`, `Discovery`, `Guide`
62
+
63
+ ### Extending the vocabulary
64
+
65
+ Add **one line** to `scripts/frontmatter_registry.txt` and a matching row above. A new `type` is a
66
+ visible, reviewable diff — never an ad-hoc value invented in a single file.
67
+
68
+ ## Enforcement
69
+
70
+ - [`scripts/frontmatter_lint.py`](/scripts/frontmatter_lint.py) — deterministic, no secrets; asserts
71
+ the three required keys (and `type` ∈ registry) on every non-reserved tracked `.md`. Run in
72
+ `.github/workflows/frontmatter-ci.yml`.
73
+ - [`scripts/backfill_frontmatter.py`](/scripts/backfill_frontmatter.py) — the one-time migration:
74
+ prepend-only, idempotent; reuses a file's already-declared `type`/`date` when present, else infers
75
+ from path (`type`), the first H1 (`title`), and the last git-commit date (`timestamp`).
@@ -5,8 +5,10 @@ to pick concepts, then fetch the file(s) you need.
5
5
 
6
6
  - [agent-harness](agent-harness.md) — Everything wrapping the model that lets it finish work — and the Summary Gate, the input gate that compresses prior-session context into essential state.
7
7
  - [control-plane](control-plane.md) — What it means for PMOS to be a control plane — it orchestrates, specs, evaluates, and routes agent work rather than generating production code itself.
8
+ - [design-craft](design-craft.md) — The UI/UX practice a design agent applies: perception/cognition evidence, craft moves, accessibility floors, and recorded anti-patterns (D60).
8
9
  - [design-loop](design-loop.md) — How PMOS makes UI/UX design a first-class, repeatable sub-flow of the Build stage — brief → design → reconcile → build → design-sync — gated by the Review Gate, presentation-only, and never a data decision.
9
10
  - [eval-driven-pm](eval-driven-pm.md) — PMOS's core method — write the eval before the build. The rubric is the spec; the PM manages by defining what "good" means, not by inspecting work after the fact.
11
+ - [frontmatter-format](frontmatter-format.md) — The repo-wide house frontmatter (`type` + `title` + `timestamp` on every tracked `.md`) and the Frontmatter Gate + registry that enforce it (D63); machine-readable classification by reading, not path-guessing.
10
12
  - [health-anchors](health-anchors.md) — The second anchor class (D59): work anchors to a KR or a declared, capped, PM-reviewed health budget, so refactor/ops/security work anchors honestly.
11
13
  - [okf-governance](okf-governance.md) — How PMOS organizes its Open Knowledge Format bundle and the governance rules that keep it spec-conformant.
12
14
  - [okr-anti-optimism](okr-anti-optimism.md) — Why PMOS biases status reporting toward pessimism — surfacing the red underneath green metrics — to keep KR self-reporting honest.
@@ -15,4 +17,5 @@ to pick concepts, then fetch the file(s) you need.
15
17
  - [pm-identity](pm-identity.md) — How PMOS models a product manager — the pm_slug identifier, the PM's authority as the human in the loop, and PM-scoped namespaces.
16
18
  - [product-slug-convention](product-slug-convention.md) — The rules for product_slug — the stable lowercase identifier that scopes products across OKF namespaces, planning artifacts, and agent records.
17
19
  - [sdlc-loop](sdlc-loop.md) — The closed agent-driven software development lifecycle PMOS orchestrates — spec, contract, build, evaluate, accept, learn — and how it loops.
20
+ - [self-refining-harness](self-refining-harness.md) — The pattern where the harness improves from its own run evidence (evals, friction, calibration) via a detect → draft → PM-gate loop, bounded at the L3 ceiling — never L4 self-mutation.
18
21
  - [watermelon-flag](watermelon-flag.md) — A status that reads green on automated metrics but is red underneath on strategic alignment — and silent drift, the L4 failure mode it signals.
@@ -2,5 +2,18 @@
2
2
 
3
3
  OKF reserved file (no frontmatter). Change history, newest first, ISO 8601 dates.
4
4
 
5
+ ## 2026-07-24
6
+ - Added [frontmatter-format](frontmatter-format.md) — the repo-wide house frontmatter (`type` + `title` + `timestamp` on every tracked `.md`) + the Frontmatter Gate and registry (D63). Indexed.
7
+
8
+ ## 2026-07-21
9
+ - Added [design-craft](design-craft.md) — the UI/UX practice a design agent applies (perception/cognition evidence, craft moves, accessibility floors, recorded anti-patterns); promoted from `planning/design/attention-research.md` (D60). Indexed.
10
+
11
+ ## 2026-07-18
12
+ - Added [health-anchors](health-anchors.md) — the second anchor class: work anchors to a KR or a declared, capped, PM-reviewed health budget (D59). Indexed.
13
+
14
+ ## 2026-07-01
15
+ - Added [design-loop](design-loop.md) — UI/UX design as a Review-Gate-gated, presentation-only sub-flow of Build (brief → design → reconcile → build → design-sync); D48. Indexed.
16
+ - Added [self-refining-harness](self-refining-harness.md) — the harness improves from its own run evidence via detect → draft → PM-gate, bounded at L3 (D47). Indexed.
17
+
5
18
  ## 2026-06-29
6
19
  - Creation — per-folder index/log added (OKF recursive progressive disclosure; D29 reversal direction).
@@ -20,17 +20,19 @@ OKF bundle.
20
20
  ---
21
21
 
22
22
  ```markdown
23
- # Eval Rubric: <initiative title>
23
+ ---
24
+ type: Rubric
25
+ title: <initiative title>
26
+ eval_type: capability | regression # capability = push frontier; regression = guard against backslide
27
+ initiative_id: <id>
28
+ product_slug: <product_slug>
29
+ pm_slug: <pm_slug>
30
+ parent_KR: <reference OR health:<id> (D59)>
31
+ pass_threshold: <0.00–1.00> # pre-committed, before output exists
32
+ timestamp: <YYYY-MM-DD>
33
+ ---
24
34
 
25
- ## Frontmatter
26
- - type: Rubric
27
- - eval_type: capability | regression <!-- capability = push frontier; regression = guard against backslide -->
28
- - initiative_id: <id>
29
- - product_slug: <product_slug>
30
- - pm_slug: <pm_slug>
31
- - parent_KR: <reference OR health:<id> (D59)>
32
- - pass_threshold: <0.00–1.00> <!-- pre-committed, before output exists -->
33
- - date: <YYYY-MM-DD>
35
+ # Eval Rubric: <initiative title>
34
36
 
35
37
  ## Gate assignment
36
38
  <!-- State which gate each criterion serves. Acceptance Gate is PM-only and NOT rubric-graded. -->
@@ -20,6 +20,12 @@ copy is an operational instance and does not live in the OKF bundle.
20
20
  ---
21
21
 
22
22
  ```markdown
23
+ ---
24
+ type: PRD
25
+ title: <initiative title>
26
+ timestamp: <YYYY-MM-DD>
27
+ ---
28
+
23
29
  # PRD: <initiative title>
24
30
 
25
31
  ## Identity