@skillstate/bench 2.0.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.
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Deterministic local benchmark harness: conversation baseline vs SKILL.state.
3
+ *
4
+ * @non-paper — this harness is NOT the paper's evaluation. The paper's
5
+ * Table 1 / §5.2 numbers come from Gemini/Gemma runs on Warehousing tasks;
6
+ * this file measures a minimal, fully deterministic A/B on fixed synthetic
7
+ * data so anyone can reproduce OUR numbers with `npm run bench`.
8
+ *
9
+ * Method (honest A/B on IDENTICAL data):
10
+ * - Fixed spec P (BENCH_SPEC), fixed observation Ot (BENCH_OBSERVATION,
11
+ * constant length), fixed mock-LLM response (BENCH_REASONING + valid
12
+ * state_patch + action, constant length). No RNG anywhere, so no seed is
13
+ * needed (BENCH_SEED documents that fact).
14
+ * - Mode (b) SKILL.state: each step prompts with At = (P, Σt, Ot) via the
15
+ * real SkillStateRuntime (paper-exact `formatPaper`). Prompt strings are
16
+ * captured from the mock LLM to measure real char lengths.
17
+ * - Mode (a) conversation baseline: prompt[t] is the concatenation of the
18
+ * state prompts for steps 0..t — i.e. every prior turn is re-sent at full
19
+ * current-turn size. This is exactly the TokenTracker.compareWithBaseline
20
+ * model (cumulative conv = Σt Σi≤t promptChars[i], paper §3.3 eq.5), so
21
+ * with constant-size turns the closed form is reductionFactor = (T+1)/2.
22
+ * Caveat (read before quoting): P is included in every re-sent turn, so
23
+ * this is an UPPER bound on real-baseline savings — a production baseline
24
+ * sends P once and re-sends cheaper turn payloads.
25
+ *
26
+ * Metrics are raw string chars (paper §4.3), never tokenizer output.
27
+ */
28
+ import type { Observation, ProceduralSpec, StatePatch } from '@skillstate/core';
29
+ /** No RNG is used anywhere — determinism needs no seed; this says so. */
30
+ export declare const BENCH_SEED = "none-no-rng-deterministic";
31
+ /** Horizon values measured by `npm run bench`. */
32
+ export declare const BENCH_T_VALUES: readonly number[];
33
+ /** Minimal fixed skill: one string field, constant serialized size. */
34
+ export declare const BENCH_SPEC: ProceduralSpec;
35
+ /** Fixed observation payload: 64 chars, identical every step. */
36
+ export declare const BENCH_OBSERVATION: string;
37
+ /** Fixed mock-LLM reasoning prefix (discarded, never stored). */
38
+ export declare const BENCH_REASONING = "bench reasoning note";
39
+ /** Fixed mock-LLM action. */
40
+ export declare const BENCH_ACTION = "bench-action";
41
+ /** Fixed patch: re-assigns the schema default, so Σt never changes size. */
42
+ export declare const BENCH_PATCH: StatePatch;
43
+ /** One fixed mock-LLM response (valid state_patch + action). */
44
+ export declare function benchResponse(): string;
45
+ /** Fixed observation object (timestamp pinned for determinism). */
46
+ export declare function benchObservation(): Observation;
47
+ /** Per-horizon benchmark outcome (all sizes in raw chars). */
48
+ export interface BenchResult {
49
+ T: number;
50
+ seed: string;
51
+ /** Per-step SKILL.state prompt sizes |At| (measured). */
52
+ statePerStep: number[];
53
+ /** Per-step conversation-baseline prompt sizes (prefix sums, measured). */
54
+ convPerStep: number[];
55
+ /** Per-step raw response sizes (measured). */
56
+ responsePerStep: number[];
57
+ stateCumulative: number;
58
+ convCumulative: number;
59
+ responseCumulative: number;
60
+ stateAverage: number;
61
+ convAverage: number;
62
+ /** convCumulative / stateCumulative. */
63
+ reductionFactor: number;
64
+ /** statePerStep[T-1] - statePerStep[0] (flat = 0 when constant). */
65
+ stateSlope: number;
66
+ /** convPerStep[T-1] - convPerStep[0] (linear growth). */
67
+ convSlope: number;
68
+ }
69
+ /** Closed-form expectation for constant-size turns (paper §3.3 eq.5-7). */
70
+ export declare function expectedReduction(T: number): number;
71
+ /**
72
+ * Run one deterministic horizon: drive the real SkillStateRuntime for T
73
+ * steps on fixed data, capture every state prompt string, then build the
74
+ * conversation-baseline prompts as concatenations of the state prompts.
75
+ */
76
+ export declare function runScenario(T: number): Promise<BenchResult>;
77
+ /** Run every horizon in order. */
78
+ export declare function runAll(horizons: readonly number[]): Promise<BenchResult[]>;
79
+ /** Render results as a human-readable text table (used by `npm run bench`). */
80
+ export declare function formatTable(results: readonly BenchResult[]): string;
81
+ //# sourceMappingURL=harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACX,MAAM,kBAAkB,CAAC;AAE1B,yEAAyE;AACzE,eAAO,MAAM,UAAU,8BAA8B,CAAC;AAEtD,kDAAkD;AAClD,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAuB,CAAC;AAEpE,uEAAuE;AACvE,eAAO,MAAM,UAAU,EAAE,cAaxB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,QAAiB,CAAC;AAEhD,iEAAiE;AACjE,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,6BAA6B;AAC7B,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,WAAW,EAAE,UAAiC,CAAC;AAE5D,gEAAgE;AAChE,wBAAgB,aAAa,IAAI,MAAM,CAKtC;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,IAAI,WAAW,CAE9C;AAED,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnD;AAUD;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAwCjE;AAED,kCAAkC;AAClC,wBAAsB,MAAM,CAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,OAAO,CAAC,WAAW,EAAE,CAAC,CAMxB;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAQnE"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Deterministic local benchmark harness: conversation baseline vs SKILL.state.
3
+ *
4
+ * @non-paper — this harness is NOT the paper's evaluation. The paper's
5
+ * Table 1 / §5.2 numbers come from Gemini/Gemma runs on Warehousing tasks;
6
+ * this file measures a minimal, fully deterministic A/B on fixed synthetic
7
+ * data so anyone can reproduce OUR numbers with `npm run bench`.
8
+ *
9
+ * Method (honest A/B on IDENTICAL data):
10
+ * - Fixed spec P (BENCH_SPEC), fixed observation Ot (BENCH_OBSERVATION,
11
+ * constant length), fixed mock-LLM response (BENCH_REASONING + valid
12
+ * state_patch + action, constant length). No RNG anywhere, so no seed is
13
+ * needed (BENCH_SEED documents that fact).
14
+ * - Mode (b) SKILL.state: each step prompts with At = (P, Σt, Ot) via the
15
+ * real SkillStateRuntime (paper-exact `formatPaper`). Prompt strings are
16
+ * captured from the mock LLM to measure real char lengths.
17
+ * - Mode (a) conversation baseline: prompt[t] is the concatenation of the
18
+ * state prompts for steps 0..t — i.e. every prior turn is re-sent at full
19
+ * current-turn size. This is exactly the TokenTracker.compareWithBaseline
20
+ * model (cumulative conv = Σt Σi≤t promptChars[i], paper §3.3 eq.5), so
21
+ * with constant-size turns the closed form is reductionFactor = (T+1)/2.
22
+ * Caveat (read before quoting): P is included in every re-sent turn, so
23
+ * this is an UPPER bound on real-baseline savings — a production baseline
24
+ * sends P once and re-sends cheaper turn payloads.
25
+ *
26
+ * Metrics are raw string chars (paper §4.3), never tokenizer output.
27
+ */
28
+ import { SkillStateRuntime } from '@skillstate/core';
29
+ /** No RNG is used anywhere — determinism needs no seed; this says so. */
30
+ export const BENCH_SEED = 'none-no-rng-deterministic';
31
+ /** Horizon values measured by `npm run bench`. */
32
+ export const BENCH_T_VALUES = [10, 50, 100, 200];
33
+ /** Minimal fixed skill: one string field, constant serialized size. */
34
+ export const BENCH_SPEC = {
35
+ id: 'bench-harness',
36
+ name: 'BenchHarness',
37
+ instructions: 'Hold a steady state and emit the fixed benchmark action every step.',
38
+ schema: {
39
+ status: {
40
+ type: 'string',
41
+ default: 'steady',
42
+ description: 'Fixed benchmark status marker',
43
+ },
44
+ },
45
+ version: '1.0.0',
46
+ };
47
+ /** Fixed observation payload: 64 chars, identical every step. */
48
+ export const BENCH_OBSERVATION = 'o'.repeat(64);
49
+ /** Fixed mock-LLM reasoning prefix (discarded, never stored). */
50
+ export const BENCH_REASONING = 'bench reasoning note';
51
+ /** Fixed mock-LLM action. */
52
+ export const BENCH_ACTION = 'bench-action';
53
+ /** Fixed patch: re-assigns the schema default, so Σt never changes size. */
54
+ export const BENCH_PATCH = { status: 'steady' };
55
+ /** One fixed mock-LLM response (valid state_patch + action). */
56
+ export function benchResponse() {
57
+ return `${BENCH_REASONING}\n\n\`\`\`json\n${JSON.stringify({
58
+ state_patch: BENCH_PATCH,
59
+ action: BENCH_ACTION,
60
+ })}\n\`\`\``;
61
+ }
62
+ /** Fixed observation object (timestamp pinned for determinism). */
63
+ export function benchObservation() {
64
+ return { content: BENCH_OBSERVATION, timestamp: 0, source: 'bench' };
65
+ }
66
+ /** Closed-form expectation for constant-size turns (paper §3.3 eq.5-7). */
67
+ export function expectedReduction(T) {
68
+ return (T + 1) / 2;
69
+ }
70
+ function sum(values) {
71
+ let total = 0;
72
+ for (const value of values) {
73
+ total += value;
74
+ }
75
+ return total;
76
+ }
77
+ /**
78
+ * Run one deterministic horizon: drive the real SkillStateRuntime for T
79
+ * steps on fixed data, capture every state prompt string, then build the
80
+ * conversation-baseline prompts as concatenations of the state prompts.
81
+ */
82
+ export async function runScenario(T) {
83
+ const promptTexts = [];
84
+ const responseText = benchResponse();
85
+ const runtime = new SkillStateRuntime({
86
+ spec: BENCH_SPEC,
87
+ llm: async (prompt) => {
88
+ promptTexts.push(prompt);
89
+ return responseText;
90
+ },
91
+ execute: async () => benchObservation(),
92
+ });
93
+ for (let step = 0; step < T; step += 1) {
94
+ await runtime.step(benchObservation());
95
+ }
96
+ const statePerStep = promptTexts.map((text) => text.length);
97
+ const convPerStep = promptTexts.map((_text, index) => promptTexts.slice(0, index + 1).join('').length);
98
+ const responsePerStep = promptTexts.map(() => responseText.length);
99
+ const stateCumulative = sum(statePerStep);
100
+ const convCumulative = sum(convPerStep);
101
+ const responseCumulative = sum(responsePerStep);
102
+ return {
103
+ T,
104
+ seed: BENCH_SEED,
105
+ statePerStep,
106
+ convPerStep,
107
+ responsePerStep,
108
+ stateCumulative,
109
+ convCumulative,
110
+ responseCumulative,
111
+ stateAverage: stateCumulative / T,
112
+ convAverage: convCumulative / T,
113
+ reductionFactor: convCumulative / stateCumulative,
114
+ stateSlope: statePerStep[T - 1] - statePerStep[0],
115
+ convSlope: convPerStep[T - 1] - convPerStep[0],
116
+ };
117
+ }
118
+ /** Run every horizon in order. */
119
+ export async function runAll(horizons) {
120
+ const results = [];
121
+ for (const T of horizons) {
122
+ results.push(await runScenario(T));
123
+ }
124
+ return results;
125
+ }
126
+ /** Render results as a human-readable text table (used by `npm run bench`). */
127
+ export function formatTable(results) {
128
+ const header = 'T | state/step | conv/step(avg) | state cum | conv cum | reduction | state slope | conv slope';
129
+ const rows = results.map((result) => `${result.T} | ${result.statePerStep[0]} | ${result.convAverage.toFixed(1)} | ${result.stateCumulative} | ${result.convCumulative} | ${result.reductionFactor.toFixed(2)}x (formula (T+1)/2=${expectedReduction(result.T)}) | ${result.stateSlope} | ${result.convSlope}`);
130
+ return [header, ...rows].join('\n');
131
+ }
132
+ //# sourceMappingURL=harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness.js","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,yEAAyE;AACzE,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAEtD,kDAAkD;AAClD,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEpE,uEAAuE;AACvE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,cAAc;IACpB,YAAY,EACV,qEAAqE;IACvE,MAAM,EAAE;QACN,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,+BAA+B;SAC7C;KACF;IACD,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEhD,iEAAiE;AACjE,MAAM,CAAC,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAEtD,6BAA6B;AAC7B,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAE5D,gEAAgE;AAChE,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,eAAe,mBAAmB,IAAI,CAAC,SAAS,CAAC;QACzD,WAA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AM,GACV,+FAA+F,CAAC;IAClG,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CACtB,CAAC,MAAM,EAAE,EAAE,CACT,GAAG,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,eAAe,MAAM,MAAM,CAAC,cAAc,MAAM,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,UAAU,MAAM,MAAM,CAAC,SAAS,EAAE,CAC5Q,CAAC;IACF,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './harness.js';
2
+ export * from './run.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ // @skillstate/bench — deterministic local benchmark harness.
2
+ //
3
+ // NOTE: re-exporting `./run.js` also evaluates its top-level `main()`
4
+ // (the `npm run bench` entry), exactly like importing the historical
5
+ // `dist/bench/run.js` directly.
6
+ export * from './harness.js';
7
+ export * from './run.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,gCAAgC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
package/dist/run.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `npm run bench` entry point (zero-deps, runs from compiled dist).
3
+ *
4
+ * @non-paper — local deterministic harness CLI, not part of the paper.
5
+ */
6
+ import type { BenchResult } from './harness.js';
7
+ /** Run all horizons, print the table plus machine-readable JSON. */
8
+ export declare function main(): Promise<BenchResult[]>;
9
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,oEAAoE;AACpE,wBAAsB,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAKnD"}
package/dist/run.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `npm run bench` entry point (zero-deps, runs from compiled dist).
3
+ *
4
+ * @non-paper — local deterministic harness CLI, not part of the paper.
5
+ */
6
+ import { BENCH_T_VALUES, runAll, formatTable } from './harness.js';
7
+ /** Run all horizons, print the table plus machine-readable JSON. */
8
+ export async function main() {
9
+ const results = await runAll(BENCH_T_VALUES);
10
+ console.log(formatTable(results));
11
+ console.log(JSON.stringify(results, null, 2));
12
+ return results;
13
+ }
14
+ void main();
15
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGnE,oEAAoE;AACpE,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@skillstate/bench",
3
+ "version": "2.0.0",
4
+ "description": "Deterministic local benchmark harness for the skillstate runtime (entry only).",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": ["dist"],
16
+ "sideEffects": false,
17
+ "engines": {
18
+ "node": ">=20"
19
+ },
20
+ "license": "MIT",
21
+ "dependencies": {
22
+ "@skillstate/core": "^2.0.0"
23
+ }
24
+ }