create-pmos 0.575.0 → 0.577.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.
Files changed (62) hide show
  1. package/package.json +27 -27
  2. package/payload/AGENTS.md +35 -2
  3. package/payload/KIT-VERSION +2 -2
  4. package/payload/okf/core/templates/agent-eval-set-template.md +65 -0
  5. package/payload/okf/core/templates/index.md +1 -0
  6. package/payload/planning/evals/eval-calibration.md +1 -1
  7. package/payload/planning/okrs/health-budgets.md +1 -1
  8. package/payload/scripts/agent-eval-set.js +85 -0
  9. package/payload/scripts/factory-guardrail.js +50 -8
  10. package/payload/scripts/work-item.js +49 -3
  11. package/payload/scripts/workflow-state.js +28 -3
  12. package/payload/state/discoveries.md +1 -1
  13. package/payload/state/log.md +1 -1
  14. package/payload/templates/pmos-guardrail.yml +38 -10
  15. package/payload/templates/pmos-review-check.yml +59 -0
  16. package/workspace/changelog.json +26 -0
  17. package/workspace/fixtures/builder-bench.json +121 -0
  18. package/workspace/guide/cli.md +71 -4
  19. package/workspace/guide/settings-and-switches.md +7 -0
  20. package/workspace/lib/agent-team.js +5 -2
  21. package/workspace/lib/build-cli.js +119 -7
  22. package/workspace/lib/build-engine.js +106 -25
  23. package/workspace/lib/builder-bench.js +267 -0
  24. package/workspace/lib/engine/agent-eval-set.js +85 -0
  25. package/workspace/lib/engine/workflow-state.js +28 -3
  26. package/workspace/lib/factory-checks.js +117 -0
  27. package/workspace/lib/factory-ci.js +151 -0
  28. package/workspace/lib/factory-fleet.js +263 -0
  29. package/workspace/lib/factory-identity.js +182 -0
  30. package/workspace/lib/factory-lessons.js +183 -0
  31. package/workspace/lib/factory-needs.js +48 -0
  32. package/workspace/lib/factory-review.js +241 -0
  33. package/workspace/lib/factory-rollout.js +56 -10
  34. package/workspace/lib/factory-traces.js +229 -0
  35. package/workspace/lib/headless.js +11 -2
  36. package/workspace/lib/job-graph.js +9 -1
  37. package/workspace/lib/needs-providers.js +1 -0
  38. package/workspace/lib/pmos-verbs.js +1 -1
  39. package/workspace/lib/project-onboard.js +1 -1
  40. package/workspace/lib/proposals.js +3 -1
  41. package/workspace/lib/route-modules.js +1 -0
  42. package/workspace/lib/routes-factory-metrics.js +41 -0
  43. package/workspace/lib/routes-proposals.js +9 -1
  44. package/workspace/lib/signals.js +272 -0
  45. package/workspace/lib/team-cli.js +2 -2
  46. package/workspace/lib/team-runs.js +13 -3
  47. package/workspace/lib/vendor/scripts/agent-eval-set.js +85 -0
  48. package/workspace/lib/vendor/scripts/workflow-state.js +28 -3
  49. package/workspace/lib/verify-runs.js +89 -1
  50. package/workspace/package-lock.json +2 -2
  51. package/workspace/package.json +1 -1
  52. package/workspace/public/pm/ini-props.js +1 -1
  53. package/workspace/server.js +4 -0
  54. package/workspace/test-files.json +2 -1
  55. package/workspace/test-lists/adlc-identity.json +9 -0
  56. package/workspace/test-lists/build-engine.json +5 -3
  57. package/workspace/test-lists/builder-bench.json +9 -0
  58. package/workspace/test-lists/factory-checks.json +9 -0
  59. package/workspace/test-lists/factory-fleet.json +9 -0
  60. package/workspace/test-lists/factory-lessons.json +9 -0
  61. package/workspace/test-lists/factory-real-run.json +9 -0
  62. package/workspace/test-lists/factory-run-traces.json +9 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmos-workspace",
3
- "version": "0.575.0",
3
+ "version": "0.577.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",
@@ -40,7 +40,7 @@ const md = (iso) => { const m = DAY.exec(String(iso || '')); return m ? MON[+m[2
40
40
  const span = (a, b) => (a && b && a !== b ? md(a) + ' – ' + md(b) : md(a || b));
41
41
  const plural = (n, a, b) => n + ' ' + (n === 1 ? a : b);
42
42
  const clip = (s, n) => { s = String(s || ''); return s.length > n ? s.slice(0, n - 1) + '…' : s; };
43
- const GROUP = { build: 'Pull request', description: 'Description', outcome: 'Expected outcome', prototyped: 'PMOS prototyped it', improved: 'PMOS improved it', scanned: 'PMOS scanned for it', found: 'Found elsewhere', dates: 'Dates', status: 'Looks done', names: 'Names', links: 'Links', grill: 'PMOS grilled it' };
43
+ const GROUP = { build: 'Pull request', harness: 'Change the factory harness', description: 'Description', outcome: 'Expected outcome', prototyped: 'PMOS prototyped it', improved: 'PMOS improved it', scanned: 'PMOS scanned for it', found: 'Found elsewhere', dates: 'Dates', status: 'Looks done', names: 'Names', links: 'Links', grill: 'PMOS grilled it' };
44
44
 
45
45
  /* ── the chip and the live look ── */
46
46
  export function chipOf(p) {
@@ -4647,8 +4647,11 @@ function startHeadless(base, workdir, kind, launchArgs, env, initialInput, addDi
4647
4647
  const dim = (t) => `\x1b[38;5;244m${t}\x1b[0m`;
4648
4648
  // A run that calls a refused tool a second time is stopped: in dontAsk mode the answer will not change (lib/headless.js denialGuard).
4649
4649
  const guard = headlessLib.denialGuard();
4650
+ // The factory trace (lib/factory-traces.js): a team run that names a work item leaves one trace in the product's state folder.
4651
+ const ftrace = kind === 'team' && env && env.PMOS_TEAM_ROOT ? require('./lib/factory-traces.js').tracker() : null;
4650
4652
  const feed = (line) => {
4651
4653
  const ev = headlessLib.streamLines(line);
4654
+ if (ftrace) ftrace.see(line);
4652
4655
  if (ev.result) resultLine = line;
4653
4656
  if (ev.log.length) say(ev.log.map((l) => (/^›/.test(l) ? dim(l) : l)).join('\n') + '\n');
4654
4657
  const seen = headlessLib.initTools(line);
@@ -4690,6 +4693,7 @@ function startHeadless(base, workdir, kind, launchArgs, env, initialInput, addDi
4690
4693
  const r = headlessLib.parseResult(resultLine || out);
4691
4694
  // The token log (lib/run-tokens.js): one line per finished run, for `pmos ai status`.
4692
4695
  require('./lib/run-tokens.js').record(STATE, { kind, origin: s.origin, lean, result: { ...r, ...headlessLib.usageOf(resultLine || out) }, ok: code === 0 && r.ok && !r.isError });
4696
+ if (ftrace) { try { require('./lib/factory-traces.js').recordRun(env.PMOS_TEAM_ROOT, { role: env.PMOS_TEAM_ROLE, tracker: ftrace, result: { ...r, ...headlessLib.usageOf(resultLine || out) }, ok: code === 0 && r.ok && !r.isError }); } catch (e) { warnWriteFail('factory trace', e); } }
4693
4697
  if (r.ok) say('\n' + headlessLib.logLines(r, code).join('\n') + '\n');
4694
4698
  else if (out.trim() && !resultLine) say(r.text.split('\n').slice(-20).join('\n') + '\n');
4695
4699
  if (err.trim()) say(dim(err.trim().split('\n').slice(-20).join('\n')) + '\n');
@@ -129,7 +129,8 @@
129
129
  "claude-readiness.test.js",
130
130
  "setup-routes.test.js",
131
131
  "project-onboard.test.js",
132
- "loop-telemetry.test.js"
132
+ "loop-telemetry.test.js",
133
+ "signals.test.js"
133
134
  ],
134
135
  "panels": [
135
136
  "pm-r7-test.js",
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "ADLC gap P1 (factory-bot-identity-sandbox, done test I1-I7): the factory's own git identity and token from pmos/factory.json, and the Builder's check in a container with no network (lib/factory-identity.js, lib/build-engine.js). Stub gh and docker; no real GitHub or container.",
3
+ "modules": [
4
+ "factory-identity.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-identity.test.js": 4
8
+ }
9
+ }
@@ -1,11 +1,13 @@
1
1
  {
2
- "_comment": "Launch simulation W7 (kit-factory-builder): the D65 factory in a product repository. One sandbox run against a kit built by kit/build-kit.sh and a local bare remote: vendoring (F1), the kit (F2), the Builder's claim, propose, \u2726 and draft PR (F3), verify-work (F4). No browser, no network. D108 (factory-guardrail-merge): the merge guardrail, one case per rule (factory-guardrail.test.js), and G1\u2013G6 in the same sandbox.",
2
+ "_comment": "Launch simulation W7 (kit-factory-builder): the D65 factory in a product repository. One sandbox run against a kit built by kit/build-kit.sh and a local bare remote: vendoring (F1), the kit (F2), the Builder's claim, propose, \u2726 and draft PR (F3), verify-work (F4). No browser, no network. D108 (factory-guardrail-merge): the merge guardrail, one case per rule (factory-guardrail.test.js), and G1\u2013G6 in the same sandbox. factory-premerge-reviewer: the independent pre-merge review (factory-review.test.js).",
3
3
  "modules": [
4
4
  "build-engine.test.js",
5
- "factory-guardrail.test.js"
5
+ "factory-guardrail.test.js",
6
+ "factory-review.test.js"
6
7
  ],
7
8
  "seconds": {
8
9
  "build-engine.test.js": 8,
9
- "factory-guardrail.test.js": 3
10
+ "factory-guardrail.test.js": 3,
11
+ "factory-review.test.js": 3
10
12
  }
11
13
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "ADLC gap P2 (factory-builder-benchmark): the golden benchmark of the Builder. The golden set's checks against its solutions (B1), the sandbox (B2), a stub Builder through the real pmos build claim and propose (B3), the append-only record (B4), the rollup per model and harness (B5), the command and the default runner's tools (B6). No model call, no browser, no network.",
3
+ "modules": [
4
+ "builder-bench.test.js"
5
+ ],
6
+ "seconds": {
7
+ "builder-bench.test.js": 13
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "factory-builder-inner-loop: the product's declared checks run by PMOS in the Builder's worktree with no network, the CI-fix rounds and the blocked state (lib/factory-checks.js, lib/factory-ci.js, lib/factory-needs.js). One sandbox repository, a stub gh.",
3
+ "modules": [
4
+ "factory-checks.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-checks.test.js": 8
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "ADLC gap P2 (factory-fleet-scale): work items in dependency order (depends_on), the Builder's concurrency from pmos/factory.json builders, and the integrator that rebases an overlapping factory pull request in PMOS's own process. One sandbox against a kit built by kit/build-kit.sh, a local bare remote and a stub gh. No browser, no network.",
3
+ "modules": [
4
+ "factory-fleet.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-fleet.test.js": 6
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "factory-learning-loop (ADLC gap P2): factory setbacks become Builder lessons; a repeated one files Change the factory harness (lib/factory-lessons.js).",
3
+ "modules": [
4
+ "factory-lessons.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-lessons.test.js": 1
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "ADLC gap P0 (factory-real-run-kit): scripts/factory-real-run.js seeds a product into a repository and rehearses the whole factory path against a local bare remote with a fake gh. No browser, no network, no model.",
3
+ "modules": [
4
+ "factory-real-run.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-real-run.test.js": 8
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "ADLC gap P1 (factory-run-traces): one trace per factory run and the factory's numbers over a window (lib/factory-traces.js, lib/routes-factory-metrics.js). Pure folds and a temporary state folder; no git, no server, no browser. The sandbox case T3/T6 is in build-engine.test.js.",
3
+ "modules": [
4
+ "factory-traces.test.js"
5
+ ],
6
+ "seconds": {
7
+ "factory-traces.test.js": 1
8
+ }
9
+ }