polymath-society 0.2.18 → 0.2.20
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/dist/cli.js +503 -167
- package/dist/index.js +418 -140
- package/dist/pipeline/FOCUS-EXAMPLES.md +127 -0
- package/dist/pipeline/FOCUS-RUBRIC.md +418 -0
- package/dist/pipeline/coding-agglomerate.js +126 -2
- package/dist/pipeline/coding-aggregate.js +136 -0
- package/dist/pipeline/coding-build.js +118 -4
- package/dist/pipeline/coding-coaching.js +173 -14
- package/dist/pipeline/coding-day-digest.js +109 -0
- package/dist/pipeline/coding-delegation.js +189 -17
- package/dist/pipeline/coding-expertise.js +126 -2
- package/dist/pipeline/coding-flow.js +136 -0
- package/dist/pipeline/coding-focus.js +136 -0
- package/dist/pipeline/coding-frontier-detail.js +126 -2
- package/dist/pipeline/coding-gap-dist.js +136 -0
- package/dist/pipeline/coding-gap.js +182 -16
- package/dist/pipeline/coding-grade.js +132 -2
- package/dist/pipeline/coding-nutshell.js +159 -150
- package/dist/pipeline/coding-walkthrough.js +144 -0
- package/dist/web/app.js +59 -19
- package/package.json +1 -1
package/dist/web/app.js
CHANGED
|
@@ -7291,6 +7291,8 @@ var import_jsx_runtime = __toESM(require_jsx_runtime());
|
|
|
7291
7291
|
function ShareAnalysisRow({ kind, label }) {
|
|
7292
7292
|
const [state, setState] = (0, import_react.useState)("idle");
|
|
7293
7293
|
const [err, setErr] = (0, import_react.useState)("");
|
|
7294
|
+
const [sync, setSync] = (0, import_react.useState)("idle");
|
|
7295
|
+
const [syncMsg, setSyncMsg] = (0, import_react.useState)("");
|
|
7294
7296
|
const send = async () => {
|
|
7295
7297
|
setState("sending");
|
|
7296
7298
|
try {
|
|
@@ -7309,23 +7311,55 @@ function ShareAnalysisRow({ kind, label }) {
|
|
|
7309
7311
|
setState("error");
|
|
7310
7312
|
}
|
|
7311
7313
|
};
|
|
7314
|
+
const doSync = async () => {
|
|
7315
|
+
setSync("sending");
|
|
7316
|
+
setSyncMsg("");
|
|
7317
|
+
try {
|
|
7318
|
+
const r = await fetch("/api/analysis/sync", { method: "POST", headers: { "content-type": "application/json" }, body: "{}" }).then((r2) => r2.json());
|
|
7319
|
+
if (r.ok) {
|
|
7320
|
+
const n = r.machines?.length ?? 1;
|
|
7321
|
+
const overlap = r.overlappingSessions ? ` \xB7 ${r.overlappingSessions} overlapping, counted once` : "";
|
|
7322
|
+
setSyncMsg(`Synced \u2713 ${r.machine} \u2014 ${r.uniqueSessions.toLocaleString()} unique sessions across ${n} machine${n === 1 ? "" : "s"}${overlap}`);
|
|
7323
|
+
setSync("idle");
|
|
7324
|
+
} else {
|
|
7325
|
+
setSyncMsg(r.error || "couldn't sync");
|
|
7326
|
+
setSync("error");
|
|
7327
|
+
}
|
|
7328
|
+
} catch {
|
|
7329
|
+
setSyncMsg("couldn't sync \u2014 try again");
|
|
7330
|
+
setSync("error");
|
|
7331
|
+
}
|
|
7332
|
+
};
|
|
7312
7333
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-4 flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 rounded-xl border border-line bg-paper px-3.5 py-2.5", children: [
|
|
7313
7334
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-[12px] text-muted", children: [
|
|
7314
7335
|
"Optional: share this full ",
|
|
7315
7336
|
label,
|
|
7316
|
-
" as feedback for Polymath (will greatly help us make this better!). Private \u2014 nothing gets a public link."
|
|
7337
|
+
" as feedback for Polymath (will greatly help us make this better!). Private \u2014 nothing gets a public link.",
|
|
7338
|
+
kind === "coding" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mt-1 block", children: "Work on two machines? Sync each to your account and they combine, overlap counted once." })
|
|
7317
7339
|
] }),
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7340
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex shrink-0 items-center gap-2", children: [
|
|
7341
|
+
syncMsg && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `text-[11px] ${sync === "error" ? "text-amber-700" : "text-ink"}`, children: syncMsg }),
|
|
7342
|
+
kind === "coding" && !syncMsg && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7321
7343
|
"button",
|
|
7322
7344
|
{
|
|
7323
|
-
onClick:
|
|
7324
|
-
disabled:
|
|
7345
|
+
onClick: doSync,
|
|
7346
|
+
disabled: sync === "sending",
|
|
7325
7347
|
className: "rounded-full border border-line px-3 py-1 text-[12px] text-ink transition-colors hover:border-accent disabled:opacity-50",
|
|
7326
|
-
children:
|
|
7348
|
+
children: sync === "sending" ? "Syncing\u2026" : "Sync to account"
|
|
7327
7349
|
}
|
|
7328
|
-
)
|
|
7350
|
+
),
|
|
7351
|
+
state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[12px] font-medium text-ink", children: "Shared \u2713" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
7352
|
+
state === "error" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[11px] text-amber-700", children: err }),
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7354
|
+
"button",
|
|
7355
|
+
{
|
|
7356
|
+
onClick: send,
|
|
7357
|
+
disabled: state === "sending",
|
|
7358
|
+
className: "rounded-full border border-line px-3 py-1 text-[12px] text-ink transition-colors hover:border-accent disabled:opacity-50",
|
|
7359
|
+
children: state === "sending" ? "Sending\u2026" : "Share it"
|
|
7360
|
+
}
|
|
7361
|
+
)
|
|
7362
|
+
] })
|
|
7329
7363
|
] })
|
|
7330
7364
|
] });
|
|
7331
7365
|
}
|
|
@@ -8527,6 +8561,10 @@ function bandLabel(score, doc = DEFAULT_CALIBRATION) {
|
|
|
8527
8561
|
for (const b of doc.scoreBands) if (b.score <= s && (!best || b.score > best.score)) best = b;
|
|
8528
8562
|
return (best ?? doc.scoreBands[0]).label;
|
|
8529
8563
|
}
|
|
8564
|
+
function topShare(percentile) {
|
|
8565
|
+
const t = Math.max(0.1, 100 - percentile);
|
|
8566
|
+
return t < 1 ? String(+t.toFixed(2)) : String(Math.round(t));
|
|
8567
|
+
}
|
|
8530
8568
|
function validateCalibration(raw) {
|
|
8531
8569
|
const fail = (msg) => {
|
|
8532
8570
|
throw new Error(`invalid calibration doc: ${msg}`);
|
|
@@ -9640,7 +9678,14 @@ function FrontierPanel({ f, detail, coaching, gap, parallelism }) {
|
|
|
9640
9678
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mt-1 text-[12.5px] leading-relaxed text-ink", children: [
|
|
9641
9679
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-semibold text-accent", children: "Why it helps you \u2014 " }),
|
|
9642
9680
|
r.whyItHelps
|
|
9643
|
-
] })
|
|
9681
|
+
] }),
|
|
9682
|
+
r.applyItHere?.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mt-2 border-t border-line pt-2", children: [
|
|
9683
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "text-[11px] font-semibold uppercase tracking-wider text-faint", children: "Where this would have hit, in your own work" }),
|
|
9684
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "mt-1.5 space-y-2", children: r.applyItHere.map((ex, j) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "leading-snug", children: [
|
|
9685
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "text-[12px] font-semibold text-ink", children: ex.insteadDo }),
|
|
9686
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-0.5 text-[11.5px] text-ink/80", children: ex.moment })
|
|
9687
|
+
] }, j)) })
|
|
9688
|
+
] }) : null
|
|
9644
9689
|
] }),
|
|
9645
9690
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "hidden flex-none items-center self-stretch sm:flex", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TipVisual, { title: r.title }) })
|
|
9646
9691
|
] }) }, i)) }),
|
|
@@ -10198,10 +10243,6 @@ function FeelSeenConclusionPanel({ data }) {
|
|
|
10198
10243
|
};
|
|
10199
10244
|
const rows = (data.stackUp ?? []).map((r) => ({ ...r, percentile: livePctl(r) })).filter((r) => r.percentile != null && r.score != null);
|
|
10200
10245
|
if (!rows.length) return null;
|
|
10201
|
-
const topPct2 = (p) => {
|
|
10202
|
-
const t = 100 - p;
|
|
10203
|
-
return t < 1 ? +t.toFixed(2) : Math.round(t);
|
|
10204
|
-
};
|
|
10205
10246
|
const ranked = rows.slice().sort((a, b) => b.percentile - a.percentile);
|
|
10206
10247
|
const standout = ranked.filter((r) => r.percentile >= 90);
|
|
10207
10248
|
const lead = (standout.length ? standout : ranked.slice(0, 2)).slice(0, 4);
|
|
@@ -10221,7 +10262,7 @@ function FeelSeenConclusionPanel({ data }) {
|
|
|
10221
10262
|
" \u2014 drop you into any small startup and you\u2019d independently own the outcome and just get the thing done, relentlessly. That\u2019s the rarest, most load-bearing thing here, and it\u2019s real: ",
|
|
10222
10263
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-semibold text-accent", children: [
|
|
10223
10264
|
"top ",
|
|
10224
|
-
|
|
10265
|
+
topShare(agencyRow.percentile),
|
|
10225
10266
|
"%"
|
|
10226
10267
|
] }),
|
|
10227
10268
|
" on agency",
|
|
@@ -10229,7 +10270,7 @@ function FeelSeenConclusionPanel({ data }) {
|
|
|
10229
10270
|
", and ",
|
|
10230
10271
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-semibold text-accent", children: [
|
|
10231
10272
|
"top ",
|
|
10232
|
-
|
|
10273
|
+
topShare(best.percentile),
|
|
10233
10274
|
"%"
|
|
10234
10275
|
] }),
|
|
10235
10276
|
" on ",
|
|
@@ -10240,7 +10281,7 @@ function FeelSeenConclusionPanel({ data }) {
|
|
|
10240
10281
|
"The honest, generous read: you\u2019re genuinely ",
|
|
10241
10282
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-semibold text-accent", children: [
|
|
10242
10283
|
"top ",
|
|
10243
|
-
|
|
10284
|
+
topShare(best.percentile),
|
|
10244
10285
|
"%"
|
|
10245
10286
|
] }),
|
|
10246
10287
|
" at ",
|
|
@@ -10251,7 +10292,7 @@ function FeelSeenConclusionPanel({ data }) {
|
|
|
10251
10292
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "font-semibold text-ink", children: r.label }),
|
|
10252
10293
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "font-semibold text-accent", children: [
|
|
10253
10294
|
"top ",
|
|
10254
|
-
|
|
10295
|
+
topShare(r.percentile),
|
|
10255
10296
|
"%"
|
|
10256
10297
|
] })
|
|
10257
10298
|
] }, r.label)) }),
|
|
@@ -10296,8 +10337,7 @@ function StackUpPanel({ rows }) {
|
|
|
10296
10337
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-0.5 text-[12.5px] text-faint", children: "where you land against everyone who works in coding agents" }),
|
|
10297
10338
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "mt-3 space-y-3.5", children: shown.map((r, i) => {
|
|
10298
10339
|
const pct = r.percentile;
|
|
10299
|
-
const
|
|
10300
|
-
const topStr = top == null ? null : top < 1 ? String(+top.toFixed(2)) : String(Math.round(top));
|
|
10340
|
+
const topStr = pct == null ? null : topShare(pct);
|
|
10301
10341
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "flex gap-2.5", children: [
|
|
10302
10342
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mt-[8px] h-1.5 w-1.5 flex-none rounded-full bg-ink" }),
|
|
10303
10343
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polymath-society",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "Deterministic metrics from your local Claude Code / Codex agent logs — parallelism, flow, throughput, projects. Zero LLM, zero server, on-device.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|