@dzhechkov/skills-bto 1.3.0 → 1.3.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.
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.1",
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": {
@@ -11,10 +11,6 @@
11
11
  "src/",
12
12
  "templates/"
13
13
  ],
14
- "scripts": {
15
- "test": "node bin/cli.js doctor",
16
- "prepublishOnly": "node scripts/sync-templates.js"
17
- },
18
14
  "keywords": [
19
15
  "claude",
20
16
  "claude-code",
@@ -35,9 +31,10 @@
35
31
  },
36
32
  "repository": {
37
33
  "type": "git",
38
- "url": "https://github.com/dzhechko/product-keysarium-2026"
34
+ "url": "https://github.com/djd1m/dz-harness-hub.git",
35
+ "directory": "packages/@dzhechkov/skills-bto"
39
36
  },
40
- "homepage": "https://github.com/dzhechko/product-keysarium-2026#readme",
37
+ "homepage": "https://github.com/djd1m/dz-harness-hub/tree/main/packages/@dzhechkov/skills-bto#readme",
41
38
  "bugs": {
42
39
  "url": "https://github.com/dzhechko/product-keysarium-2026/issues"
43
40
  },
@@ -48,5 +45,8 @@
48
45
  "@dzhechkov/keysarium-core": {
49
46
  "optional": true
50
47
  }
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
51
  }
52
52
  }
@@ -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
  ```