@dzhechkov/skills-bto 1.3.0 → 1.3.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dzhechko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/bin/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzhechkov/skills-bto",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Build-Benchmark-Test-Optimize skill pack for Claude Code — deterministic benchmarking, quality gates, witness chain, judge attestation, and optimization",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -9,12 +9,9 @@
9
9
  "files": [
10
10
  "bin/",
11
11
  "src/",
12
- "templates/"
12
+ "templates/",
13
+ "LICENSE"
13
14
  ],
14
- "scripts": {
15
- "test": "node bin/cli.js doctor",
16
- "prepublishOnly": "node scripts/sync-templates.js"
17
- },
18
15
  "keywords": [
19
16
  "claude",
20
17
  "claude-code",
@@ -35,9 +32,10 @@
35
32
  },
36
33
  "repository": {
37
34
  "type": "git",
38
- "url": "https://github.com/dzhechko/product-keysarium-2026"
35
+ "url": "https://github.com/djd1m/dz-harness-hub.git",
36
+ "directory": "packages/@dzhechkov/skills-bto"
39
37
  },
40
- "homepage": "https://github.com/dzhechko/product-keysarium-2026#readme",
38
+ "homepage": "https://github.com/djd1m/dz-harness-hub/tree/main/packages/@dzhechkov/skills-bto#readme",
41
39
  "bugs": {
42
40
  "url": "https://github.com/dzhechko/product-keysarium-2026/issues"
43
41
  },
@@ -48,5 +46,8 @@
48
46
  "@dzhechkov/keysarium-core": {
49
47
  "optional": true
50
48
  }
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
51
52
  }
52
53
  }
@@ -445,8 +445,74 @@ PERFORMANCE SCORE: X.XX
445
445
 
446
446
  ---
447
447
 
448
+ ## Layer B4: Cost Efficiency (advisory axis)
449
+
450
+ > Inspired by Princeton HAL harness — cost is tracked as a **separate first-class
451
+ > axis**, NOT blended into the quality score. A skill is never blocked for being
452
+ > expensive; instead the cost↔quality tradeoff is surfaced so the operator can
453
+ > decide. Two skills with equal quality but a 10x cost difference must be
454
+ > distinguishable at a glance.
455
+
456
+ ### Static estimate (pre-run)
457
+
458
+ Estimate the skill's cost band from its declared model usage *before* any LLM
459
+ call is made, by counting how many times the artifact routes work to each tier:
460
+
461
+ ```
462
+ relative_units = haiku_calls * 1 + sonnet_calls * 4 + opus_calls * 20
463
+
464
+ Band:
465
+ free : relative_units == 0 (deterministic, no LLM)
466
+ low : 1 - 8
467
+ medium : 9 - 40
468
+ high : > 40
469
+ ```
470
+
471
+ > The deterministic implementation lives in `@dzhechkov/harness-core`
472
+ > (`estimateSkillCost()`), surfaced on every `BenchmarkScore.cost`. Prefer it to
473
+ > hand-counting when benchmarking via the CLI.
474
+
475
+ ### Measured cost (post-run, when TEST has executed)
476
+
477
+ When TEST has run real judges, aggregate actual token usage into a dollar cost
478
+ using the per-token pricing table and provider-normalized usage:
479
+
480
+ ```
481
+ invocation_cost_usd = Σ over calls [ normalizeUsage(call) priced via MODEL_PRICES ]
482
+ cost_efficiency = quality_score / invocation_cost_usd (quality per $)
483
+ ```
484
+
485
+ `normalizeUsage()` reconciles OpenAI / Anthropic / Bedrock token shapes and
486
+ applies cached-read discounts (~10% of prompt price). Both helpers are exported
487
+ from `@dzhechkov/harness-core` (`invocationCost`, `costEfficiency`).
488
+
489
+ ### Layer B4 Output
490
+
491
+ ```
492
+ LAYER B4 -- Cost Efficiency (advisory)
493
+ Static band: medium (relative_units = 23)
494
+ Tier calls: haiku x3, sonnet x5, opus x0
495
+ Measured cost: $0.042 / invocation (if TEST ran)
496
+ Cost-efficiency: 202 quality-points/$ (8.5 / $0.042)
497
+ Verdict: efficient — no opus on the hot path
498
+ ```
499
+
500
+ ### Cost Gate (advisory only — never blocks)
501
+
502
+ | Band | Advisory |
503
+ |------|----------|
504
+ | free / low | ✅ Lean. No action. |
505
+ | medium | ℹ️ Acceptable. Confirm opus calls (if any) are reserved for disagreement/synthesis. |
506
+ | high | ⚠️ Flag for OPTIMIZE: can any opus call drop to sonnet, or any layer merge, without quality loss? |
507
+
508
+ ---
509
+
448
510
  ## Overall Benchmark Score
449
511
 
512
+ > Cost (B4) is reported alongside but is **not** part of `BENCHMARK_SCORE` —
513
+ > quality and cost are orthogonal axes (HAL principle). Quality gates the
514
+ > pipeline; cost informs the operator.
515
+
450
516
  ```
451
517
  BENCHMARK_SCORE = B0_golden * 0.30 + B1_tests * 0.35 + B2_consistency * 0.15 + B3_performance * 0.20
452
518
  ```