skillevaluation 0.1.0__tar.gz

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 (93) hide show
  1. skillevaluation-0.1.0/.github/workflows/ci.yml +52 -0
  2. skillevaluation-0.1.0/.github/workflows/publish.yml +72 -0
  3. skillevaluation-0.1.0/.gitignore +14 -0
  4. skillevaluation-0.1.0/CHANGELOG.md +19 -0
  5. skillevaluation-0.1.0/CONFORMANCE.md +55 -0
  6. skillevaluation-0.1.0/CONTRIBUTING.md +48 -0
  7. skillevaluation-0.1.0/LICENSE +190 -0
  8. skillevaluation-0.1.0/PKG-INFO +197 -0
  9. skillevaluation-0.1.0/README.md +164 -0
  10. skillevaluation-0.1.0/adrs/0001-ab-not-absolute.md +41 -0
  11. skillevaluation-0.1.0/adrs/0002-llm-judge-vs-script-validator.md +45 -0
  12. skillevaluation-0.1.0/adrs/0003-baseline-cache-key.md +49 -0
  13. skillevaluation-0.1.0/adrs/0004-outcome-taxonomy.md +75 -0
  14. skillevaluation-0.1.0/adrs/0005-trajectory-format-canonical.md +63 -0
  15. skillevaluation-0.1.0/compatibility-tests/aggregation/apples-to-oranges-skip/expected.json +31 -0
  16. skillevaluation-0.1.0/compatibility-tests/aggregation/apples-to-oranges-skip/input.json +16 -0
  17. skillevaluation-0.1.0/compatibility-tests/aggregation/error-excluded/expected.json +31 -0
  18. skillevaluation-0.1.0/compatibility-tests/aggregation/error-excluded/input.json +11 -0
  19. skillevaluation-0.1.0/compatibility-tests/aggregation/negative-delta-good/expected.json +31 -0
  20. skillevaluation-0.1.0/compatibility-tests/aggregation/negative-delta-good/input.json +10 -0
  21. skillevaluation-0.1.0/compatibility-tests/aggregation/zero-baseline/expected.json +31 -0
  22. skillevaluation-0.1.0/compatibility-tests/aggregation/zero-baseline/input.json +10 -0
  23. skillevaluation-0.1.0/compatibility-tests/outcomes/error/expected.json +1 -0
  24. skillevaluation-0.1.0/compatibility-tests/outcomes/error/input.json +1 -0
  25. skillevaluation-0.1.0/compatibility-tests/outcomes/error-overrides/expected.json +1 -0
  26. skillevaluation-0.1.0/compatibility-tests/outcomes/error-overrides/input.json +1 -0
  27. skillevaluation-0.1.0/compatibility-tests/outcomes/fail-kept/expected.json +1 -0
  28. skillevaluation-0.1.0/compatibility-tests/outcomes/fail-kept/input.json +1 -0
  29. skillevaluation-0.1.0/compatibility-tests/outcomes/flip-to-fail/expected.json +1 -0
  30. skillevaluation-0.1.0/compatibility-tests/outcomes/flip-to-fail/input.json +1 -0
  31. skillevaluation-0.1.0/compatibility-tests/outcomes/flip-to-pass/expected.json +1 -0
  32. skillevaluation-0.1.0/compatibility-tests/outcomes/flip-to-pass/input.json +1 -0
  33. skillevaluation-0.1.0/compatibility-tests/outcomes/pass-kept/expected.json +1 -0
  34. skillevaluation-0.1.0/compatibility-tests/outcomes/pass-kept/input.json +1 -0
  35. skillevaluation-0.1.0/compatibility-tests/parser/happy-path/expected.json +15 -0
  36. skillevaluation-0.1.0/compatibility-tests/parser/happy-path/input.yaml +8 -0
  37. skillevaluation-0.1.0/compatibility-tests/parser/rejects-duplicate-names/expected-error.json +4 -0
  38. skillevaluation-0.1.0/compatibility-tests/parser/rejects-duplicate-names/input.yaml +9 -0
  39. skillevaluation-0.1.0/compatibility-tests/parser/rejects-empty-cases-list/expected-error.json +4 -0
  40. skillevaluation-0.1.0/compatibility-tests/parser/rejects-empty-cases-list/input.yaml +1 -0
  41. skillevaluation-0.1.0/compatibility-tests/parser/rejects-missing-assertions/expected-error.json +4 -0
  42. skillevaluation-0.1.0/compatibility-tests/parser/rejects-missing-assertions/input.yaml +3 -0
  43. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-case-key/expected-error.json +4 -0
  44. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-case-key/input.yaml +5 -0
  45. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-top-level-key/expected-error.json +4 -0
  46. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-top-level-key/input.yaml +6 -0
  47. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-validator-key/expected-error.json +4 -0
  48. skillevaluation-0.1.0/compatibility-tests/parser/rejects-unknown-validator-key/input.yaml +6 -0
  49. skillevaluation-0.1.0/compatibility-tests/trajectory/minimal-session/expected.txt +2 -0
  50. skillevaluation-0.1.0/compatibility-tests/trajectory/minimal-session/input.json +6 -0
  51. skillevaluation-0.1.0/compatibility-tests/trajectory/repeated-tool-calls/expected.txt +6 -0
  52. skillevaluation-0.1.0/compatibility-tests/trajectory/repeated-tool-calls/input.json +18 -0
  53. skillevaluation-0.1.0/compatibility-tests/trajectory/tool-call-with-output/expected.txt +4 -0
  54. skillevaluation-0.1.0/compatibility-tests/trajectory/tool-call-with-output/input.json +13 -0
  55. skillevaluation-0.1.0/compatibility-tests/trajectory/tool-output-truncation/expected.txt +2 -0
  56. skillevaluation-0.1.0/compatibility-tests/trajectory/tool-output-truncation/input.json +21 -0
  57. skillevaluation-0.1.0/compatibility-tests/verdict/all-error/expected.json +3 -0
  58. skillevaluation-0.1.0/compatibility-tests/verdict/all-error/input.json +3 -0
  59. skillevaluation-0.1.0/compatibility-tests/verdict/all-fail/expected.json +3 -0
  60. skillevaluation-0.1.0/compatibility-tests/verdict/all-fail/input.json +3 -0
  61. skillevaluation-0.1.0/compatibility-tests/verdict/all-pass/expected.json +3 -0
  62. skillevaluation-0.1.0/compatibility-tests/verdict/all-pass/input.json +3 -0
  63. skillevaluation-0.1.0/compatibility-tests/verdict/mixed/expected.json +3 -0
  64. skillevaluation-0.1.0/compatibility-tests/verdict/mixed/input.json +3 -0
  65. skillevaluation-0.1.0/compatibility-tests/verdict/pass-with-error-excluded/expected.json +3 -0
  66. skillevaluation-0.1.0/compatibility-tests/verdict/pass-with-error-excluded/input.json +3 -0
  67. skillevaluation-0.1.0/examples/gdpr-pii-classifier/SKILL.md +61 -0
  68. skillevaluation-0.1.0/examples/gdpr-pii-classifier/eval.yaml +74 -0
  69. skillevaluation-0.1.0/examples/gdpr-pii-classifier/expected-run-result.json +60 -0
  70. skillevaluation-0.1.0/pyproject.toml +67 -0
  71. skillevaluation-0.1.0/schemas/eval-yaml.schema.json +85 -0
  72. skillevaluation-0.1.0/schemas/judge-result.schema.json +30 -0
  73. skillevaluation-0.1.0/schemas/test-case-result.schema.json +68 -0
  74. skillevaluation-0.1.0/schemas/test-run-result.schema.json +77 -0
  75. skillevaluation-0.1.0/skillevaluation/__init__.py +14 -0
  76. skillevaluation-0.1.0/skillevaluation/aggregation.py +206 -0
  77. skillevaluation-0.1.0/skillevaluation/baseline.py +37 -0
  78. skillevaluation-0.1.0/skillevaluation/outcomes.py +125 -0
  79. skillevaluation-0.1.0/skillevaluation/parser.py +231 -0
  80. skillevaluation-0.1.0/skillevaluation/py.typed +0 -0
  81. skillevaluation-0.1.0/skillevaluation/trajectory/__init__.py +13 -0
  82. skillevaluation-0.1.0/skillevaluation/trajectory/format_v1.py +259 -0
  83. skillevaluation-0.1.0/spec/eval-yaml.md +142 -0
  84. skillevaluation-0.1.0/spec/llm-judge.md +134 -0
  85. skillevaluation-0.1.0/spec/runner-contract.md +174 -0
  86. skillevaluation-0.1.0/spec/trajectory-format.md +154 -0
  87. skillevaluation-0.1.0/spec/versioning-policy.md +88 -0
  88. skillevaluation-0.1.0/tests/test_aggregation.py +111 -0
  89. skillevaluation-0.1.0/tests/test_baseline.py +35 -0
  90. skillevaluation-0.1.0/tests/test_conformance.py +189 -0
  91. skillevaluation-0.1.0/tests/test_outcomes.py +87 -0
  92. skillevaluation-0.1.0/tests/test_parser.py +136 -0
  93. skillevaluation-0.1.0/tests/test_trajectory_format.py +146 -0
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ lint:
17
+ name: Lint + types + schema
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+ cache: pip
25
+ cache-dependency-path: pyproject.toml
26
+ - run: python -m pip install --upgrade pip
27
+ - run: pip install -e ".[dev]"
28
+ - name: Ruff
29
+ run: ruff check skillevaluation tests
30
+ - name: Mypy (strict)
31
+ run: mypy skillevaluation
32
+ - name: Validate eval.yaml JSON Schema (draft 2020-12)
33
+ run: python -c "import json, jsonschema; jsonschema.Draft202012Validator.check_schema(json.load(open('schemas/eval-yaml.schema.json'))); print('schema OK')"
34
+
35
+ test:
36
+ name: Tests (Python ${{ matrix.python-version }})
37
+ runs-on: ubuntu-latest
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - uses: actions/setup-python@v5
45
+ with:
46
+ python-version: ${{ matrix.python-version }}
47
+ cache: pip
48
+ cache-dependency-path: pyproject.toml
49
+ - run: python -m pip install --upgrade pip
50
+ - run: pip install -e ".[dev]"
51
+ - name: Pytest (unit + conformance suite)
52
+ run: pytest
@@ -0,0 +1,72 @@
1
+ name: Publish to PyPI
2
+
3
+ # Triggers when a release is published in GitHub. Tag conventions:
4
+ # v0.1.0 → publishes skillevaluation 0.1.0 to PyPI
5
+ #
6
+ # Uses Trusted Publisher (OIDC) — no API token needed.
7
+ # Configure once at https://pypi.org/manage/account/publishing/ with:
8
+ # project: skillevaluation
9
+ # owner: decimal-labs
10
+ # repo: skillevaluation
11
+ # workflow: publish.yml
12
+ # environment: pypi
13
+
14
+ on:
15
+ release:
16
+ types: [published]
17
+
18
+ permissions:
19
+ id-token: write
20
+ contents: read
21
+
22
+ jobs:
23
+ test:
24
+ name: Run Tests
25
+ runs-on: ubuntu-latest
26
+ strategy:
27
+ matrix:
28
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - uses: actions/setup-python@v5
33
+ with:
34
+ python-version: ${{ matrix.python-version }}
35
+
36
+ - name: Install
37
+ run: pip install -e ".[dev]"
38
+
39
+ - name: Run tests
40
+ run: pytest
41
+
42
+ publish:
43
+ name: Publish to PyPI
44
+ needs: test
45
+ runs-on: ubuntu-latest
46
+ environment: pypi
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - uses: actions/setup-python@v5
52
+ with:
53
+ python-version: "3.12"
54
+
55
+ - name: Install build tools
56
+ run: pip install build
57
+
58
+ - name: Build package
59
+ run: python -m build
60
+
61
+ - name: Verify package version matches release tag
62
+ run: |
63
+ PKG_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
64
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
65
+ if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
66
+ echo "Version mismatch: pyproject.toml=$PKG_VERSION, tag=$TAG_VERSION"
67
+ exit 1
68
+ fi
69
+ echo "Version match: $PKG_VERSION"
70
+
71
+ - name: Publish to PyPI
72
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.egg-info/
5
+ .pytest_cache/
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ .venv/
9
+ build/
10
+ dist/
11
+ *.egg
12
+ .coverage
13
+ htmlcov/
14
+ .DS_Store
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to `skillevaluation` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.0] — 2026-05-28
8
+
9
+ Initial extraction from the DecimalAI platform. Pre-stable; breaking changes expected before v1.0.
10
+
11
+ ### Added
12
+ - `skillevaluation.parser` — parses `eval.yaml` files with strict validation
13
+ - `skillevaluation.outcomes` — outcome classifier (`flip_to_pass` / `pass_kept` / `fail_kept` / `flip_to_fail` / `error`)
14
+ - `skillevaluation.aggregation` — per-dimension delta math + apples-to-oranges skip rule
15
+ - `skillevaluation.baseline` — baseline-cache key derivation
16
+ - `skillevaluation.trajectory.format_v1` — canonical trajectory text rendering for LLM judges
17
+ - `spec/` — file format, runner contract, judge contract, trajectory format docs
18
+ - `schemas/` — JSON Schemas for inputs and outputs
19
+ - `compatibility-tests/` — golden in/out pairs that conforming runners must reproduce
@@ -0,0 +1,55 @@
1
+ # Conformance
2
+
3
+ How an alternate-language implementation of `skillevaluation` proves it conforms to the spec.
4
+
5
+ ## Why this exists
6
+
7
+ The spec is a multi-language target. The Python reference implementation lives in this repo, but an implementation in TypeScript, Rust, Go, or any other language is conforming as long as it produces the same outputs for the same inputs. This document defines "same outputs."
8
+
9
+ ## What a conforming implementation must do
10
+
11
+ A conforming implementation must support, at minimum:
12
+
13
+ 1. **`eval.yaml` parsing** — accept an `eval.yaml` document, validate it against `schemas/eval-yaml.schema.json`, and enforce the semantic rules in `spec/eval-yaml.md` (e.g. unique case names within a suite, every case has at least one expectation or validator).
14
+
15
+ 2. **Outcome classification** — given a per-case `{ with_passed: bool, without_passed: bool, errored: bool }` triple, classify as one of the five outcomes in `spec/runner-contract.md`. The mapping is total and deterministic.
16
+
17
+ 3. **Aggregation** — given a list of per-case metric dicts, produce the run-level aggregate (pass rate, per-dimension deltas) following the apples-to-oranges skip rule documented in `spec/runner-contract.md`.
18
+
19
+ 4. **Trajectory rendering** — given a trace's user input, final output, and step list, produce the canonical text format defined in `spec/trajectory-format.md`. Byte-equal output across implementations is required (the format is the canonicalization step that LLM-judge interop depends on).
20
+
21
+ Implementations may add capabilities beyond these (caching, sandboxing, agent invocation), but those are extensions and don't affect conformance.
22
+
23
+ ## The conformance suite
24
+
25
+ Located under [`compatibility-tests/`](./compatibility-tests/). Each subdirectory is a scenario:
26
+
27
+ ```
28
+ compatibility-tests/
29
+ parser/
30
+ happy-path/
31
+ input.yaml # input
32
+ expected.json # parsed shape a conforming impl must produce
33
+ rejects-duplicate-names/
34
+ input.yaml
35
+ expected-error.json # error class + message snippet
36
+ outcomes/
37
+ flip-to-pass/
38
+ input.json # { with_passed, without_passed, errored }
39
+ expected.json # { outcome: "flip_to_pass" }
40
+ ...
41
+ aggregation/
42
+ apples-to-oranges-skip/
43
+ input.json # list of per-case metrics
44
+ expected.json # aggregate including cases_skipped count
45
+ trajectory/
46
+ minimal-session/
47
+ input.json # { user_input, final_output, llm_calls, spans }
48
+ expected.txt # byte-equal trajectory text
49
+ ```
50
+
51
+ The Python reference verifies itself via `tests/test_conformance.py`. To verify an alternate implementation, run that implementation against each `input.*` and assert byte-equal match against `expected.*`.
52
+
53
+ ## Versioning
54
+
55
+ The conformance suite is versioned with the spec. A breaking spec change MUST update or replace the affected golden outputs.
@@ -0,0 +1,48 @@
1
+ # Contributing to skillevaluation
2
+
3
+ Thanks for your interest. `skillevaluation` is a small, focused spec — contributions are most welcome in three forms:
4
+
5
+ ## 1. Conformance tests
6
+
7
+ If you find a case the existing `compatibility-tests/` golden suite doesn't cover (an edge case in outcome classification, an ambiguous YAML shape, an aggregation corner), add it as a new directory under `compatibility-tests/` with:
8
+
9
+ - `input.yaml` or `input.json` — the input the runner sees
10
+ - `expected.json` — what a conforming implementation must produce
11
+
12
+ Then update `tests/test_conformance.py` to pick up the new case.
13
+
14
+ ## 2. Reference implementation
15
+
16
+ The Python reference in `skillevaluation/` is the canonical implementation. Bugs here are spec bugs — they should be fixed in code AND have a conformance test added so the bug can't regress.
17
+
18
+ ## 3. Spec clarifications
19
+
20
+ If the prose in `spec/` is ambiguous, a PR that tightens the wording (with a regression-protection conformance test) is high-value.
21
+
22
+ ## What is NOT in scope
23
+
24
+ This spec deliberately does not cover:
25
+
26
+ - Production traffic-split experiments
27
+ - External eval-score push (DeepEval/LangSmith webhooks)
28
+ - Catalog ranking, publish-gate thresholds, or other product policy
29
+ - LLM judge prompt wording (the contract is specified; the prompt is implementation choice)
30
+
31
+ For changes outside these boundaries, see the sibling spec [`agentversion`](https://github.com/decimal-labs/agentversion) or open an issue to discuss.
32
+
33
+ ## Versioning
34
+
35
+ We're pre-v1. Breaking changes are allowed in 0.x with a CHANGELOG entry. Once we cut v1.0, breaking changes go through a deprecation cycle.
36
+
37
+ ## Development setup
38
+
39
+ ```bash
40
+ git clone https://github.com/decimal-labs/skillevaluation
41
+ cd skillevaluation
42
+ pip install -e ".[dev]"
43
+ pytest
44
+ ```
45
+
46
+ ## License
47
+
48
+ By contributing, you agree your changes are licensed under Apache 2.0.
@@ -0,0 +1,190 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work.
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Decimal AI
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.4
2
+ Name: skillevaluation
3
+ Version: 0.1.0
4
+ Summary: An open spec for A/B benchmarking Claude Code skills via declarative test suites.
5
+ Project-URL: Homepage, https://github.com/decimal-labs/skillevaluation
6
+ Project-URL: Documentation, https://github.com/decimal-labs/skillevaluation/tree/main/spec
7
+ Project-URL: Repository, https://github.com/decimal-labs/skillevaluation
8
+ Project-URL: Issues, https://github.com/decimal-labs/skillevaluation/issues
9
+ Author: Decimal AI
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: ab-test,agent,ai,benchmark,claude,eval,llm,skill
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: pyyaml>=6.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: jsonschema>=4.0; extra == 'dev'
27
+ Requires-Dist: mypy>=1.0; extra == 'dev'
28
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.4; extra == 'dev'
31
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # skillevaluation
35
+
36
+ **Does your Claude Code skill actually make the agent better? Prove it — with measured before/after numbers.**
37
+
38
+ [![CI](https://github.com/decimal-labs/skillevaluation/actions/workflows/ci.yml/badge.svg)](https://github.com/decimal-labs/skillevaluation/actions/workflows/ci.yml)
39
+ [![PyPI](https://img.shields.io/pypi/v/skillevaluation)](https://pypi.org/project/skillevaluation/)
40
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://pypi.org/project/skillevaluation/)
41
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/decimal-labs/skillevaluation/blob/main/LICENSE)
42
+
43
+ A Claude Code skill is just a folder — a `SKILL.md` plus some attachments. It's easy to write one and *assume* it helps. `skillevaluation` lets you **measure** the help: write a small `eval.yaml` next to your skill, and a runner executes each test case twice — once with the skill loaded, once without — then hands you a clear A/B delta on pass rate, speed, tokens, turns, and tool calls.
44
+
45
+ No more "I think this skill is good." Now you can say *"this skill lifts pass rate 40 points and cuts tokens 43%"* — and back it with reproducible cases.
46
+
47
+ ---
48
+
49
+ ## The payoff
50
+
51
+ Here's the bundled [`gdpr-pii-classifier`](https://github.com/decimal-labs/skillevaluation/tree/main/examples/gdpr-pii-classifier) example — the same five cases, run with the skill and without it:
52
+
53
+ | Dimension | Without skill | With skill | Delta |
54
+ |---|---:|---:|:---:|
55
+ | **Pass rate** | 40% | 80% | **+40 pts** |
56
+ | Avg tokens | 3,210 | 1,840 | **−43%** |
57
+ | Avg turns | 8.2 | 4.6 | **−44%** |
58
+ | Avg duration | 22.8s | 14.2s | **−38%** |
59
+ | Avg tool calls | 5.4 | 3.0 | **−44%** |
60
+
61
+ The skill more than doubled the pass rate *and* made the agent faster and cheaper. That's exactly the kind of claim `skillevaluation` is built to produce.
62
+
63
+ > Numbers above are illustrative of the example's shape — your real deltas depend on your agent runtime and model.
64
+
65
+ ---
66
+
67
+ ## How it works
68
+
69
+ 1. **Write `eval.yaml`** next to your `SKILL.md` — a handful of declarative cases (a prompt, plain-English expectations, and optional shell validators).
70
+ 2. **A runner executes each case twice** — once with the skill loaded (the *with* arm), once without (the *without* arm).
71
+ 3. **You get measured deltas** — each case is classified (`flip_to_pass`, `pass_kept`, …) and aggregated into per-dimension lift.
72
+
73
+ ```
74
+ ┌─ with skill ────▶ pass? + metrics ─┐
75
+ each case ──────▶┤ ├──▶ outcome ──▶ aggregate deltas
76
+ └─ without skill ─▶ pass? + metrics ─┘
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Quickstart
82
+
83
+ ```bash
84
+ pip install skillevaluation
85
+ ```
86
+
87
+ **1. Describe what "better" means.** Drop an `eval.yaml` beside your `SKILL.md`:
88
+
89
+ ```yaml
90
+ # eval.yaml
91
+ cases:
92
+ - name: tracks_with_id
93
+ prompt: "Classify these schema fields and write JSON to /workspace/output.json: email, ip_address, name, age."
94
+ expectations:
95
+ - "The response classifies email as PII"
96
+ - "The response identifies ip_address as pseudonymous (not PII)"
97
+ validators:
98
+ - cmd: "jq -e '.email.category == \"PII\"' /workspace/output.json"
99
+ label: "email categorized as PII"
100
+ ```
101
+
102
+ See the full five-case suite in [`examples/gdpr-pii-classifier/eval.yaml`](https://github.com/decimal-labs/skillevaluation/blob/main/examples/gdpr-pii-classifier/eval.yaml).
103
+
104
+ **2. Score your A/B results.** Once you've run each case with and without the skill, feed the per-arm results to the library and get the deltas back:
105
+
106
+ ```python
107
+ from skillevaluation.outcomes import classify_outcome
108
+ from skillevaluation.aggregation import CaseResult, CaseMetrics, compute_run_aggregates
109
+
110
+ results = [
111
+ CaseResult(
112
+ case_name="tracks_with_id",
113
+ outcome=classify_outcome(with_passed=True, without_passed=False),
114
+ with_skill=CaseMetrics(passed=True, duration_ms=14200, turns=4, total_tokens=1840, tool_call_count=3),
115
+ without_skill=CaseMetrics(passed=False, duration_ms=22800, turns=8, total_tokens=3210, tool_call_count=5),
116
+ ),
117
+ # ... one CaseResult per case
118
+ ]
119
+
120
+ agg = compute_run_aggregates(results)
121
+ print(agg.pass_rate) # {'with_skill': 1.0, 'without_skill': 0.0, 'delta_pts': 100.0}
122
+ print(agg.to_dict()) # full per-dimension JSON, matching the wire schema
123
+ ```
124
+
125
+ **What actually runs the agent?** That part is yours to bring. This repo defines the *format*, the *scoring*, and the *spec* — it does **not** ship the harness that drives Claude Code through each case. Wire your own agent loop to the [runner contract](https://github.com/decimal-labs/skillevaluation/blob/main/spec/runner-contract.md), or use a conforming runner like [DecimalAI](https://github.com/decimal-labs) that does the A/B execution for you.
126
+
127
+ > **Status:** v0.1.0, pre-1.0. The format is stable enough to build on, but APIs may shift before v1 — changes are logged in [`CHANGELOG.md`](https://github.com/decimal-labs/skillevaluation/blob/main/CHANGELOG.md).
128
+
129
+ ---
130
+
131
+ ## What's in the box
132
+
133
+ A typed, dependency-light Python reference implementation (only needs PyYAML):
134
+
135
+ | Module | What it does |
136
+ |---|---|
137
+ | `skillevaluation.parser` | Parse + strictly validate `eval.yaml` |
138
+ | `skillevaluation.outcomes` | Classify each case: `flip_to_pass` / `pass_kept` / `fail_kept` / `flip_to_fail` / `error` |
139
+ | `skillevaluation.aggregation` | Per-dimension delta math, with an honest apples-to-oranges skip rule |
140
+ | `skillevaluation.baseline` | Baseline-cache key derivation (skip re-running an unchanged *without* arm) |
141
+ | `skillevaluation.trajectory.format_v1` | Canonical agent-session rendering, so different runners' LLM judges agree |
142
+
143
+ ---
144
+
145
+ ## Use it as a spec, not just a library
146
+
147
+ `skillevaluation` is an **open spec**, so any tool — in any language — can produce interoperable results. If you're building your own runner, start here:
148
+
149
+ - [`spec/eval-yaml.md`](https://github.com/decimal-labs/skillevaluation/blob/main/spec/eval-yaml.md) — the file format
150
+ - [`spec/runner-contract.md`](https://github.com/decimal-labs/skillevaluation/blob/main/spec/runner-contract.md) — how to execute cases A/B and aggregate
151
+ - [`spec/llm-judge.md`](https://github.com/decimal-labs/skillevaluation/blob/main/spec/llm-judge.md) — the judge input/output contract
152
+ - [`spec/trajectory-format.md`](https://github.com/decimal-labs/skillevaluation/blob/main/spec/trajectory-format.md) — canonical session rendering
153
+ - [`schemas/`](https://github.com/decimal-labs/skillevaluation/tree/main/schemas) — JSON Schemas for every input and output
154
+ - [`CONFORMANCE.md`](https://github.com/decimal-labs/skillevaluation/blob/main/CONFORMANCE.md) + [`compatibility-tests/`](https://github.com/decimal-labs/skillevaluation/tree/main/compatibility-tests) — golden in/out pairs your implementation must reproduce
155
+
156
+ Deliberately **out of scope:** live traffic-split experiments, external eval-score webhooks (DeepEval/LangSmith), catalog ranking or publish-gate policy, and the exact LLM-judge prompt wording (the contract is specified; the prompt is your choice).
157
+
158
+ ---
159
+
160
+ ## Composing with agentversion
161
+
162
+ A `skillevaluation` run produces a numeric score; its sibling spec [`agentversion`](https://github.com/decimal-labs/agentversion) records that score as an evaluation gate on an agent manifest:
163
+
164
+ ```json
165
+ {
166
+ "evaluation": {
167
+ "gates": [
168
+ {
169
+ "name": "skillevaluation:gdpr-pii-classifier",
170
+ "actual_score": 0.92,
171
+ "threshold": 0.80,
172
+ "passed": true,
173
+ "evaluator_ref": "skillevaluation://eval-yaml@v1,hash:abc123…"
174
+ }
175
+ ]
176
+ }
177
+ }
178
+ ```
179
+
180
+ The `evaluator_ref` URI scheme is defined here; `agentversion` treats it as opaque.
181
+
182
+ ---
183
+
184
+ ## Contributing
185
+
186
+ Contributions are genuinely welcome — especially new conformance cases that catch an edge the golden suite misses. See [`CONTRIBUTING.md`](https://github.com/decimal-labs/skillevaluation/blob/main/CONTRIBUTING.md). Dev setup is the usual:
187
+
188
+ ```bash
189
+ git clone https://github.com/decimal-labs/skillevaluation
190
+ cd skillevaluation
191
+ pip install -e ".[dev]"
192
+ pytest
193
+ ```
194
+
195
+ ## License
196
+
197
+ [Apache 2.0](https://github.com/decimal-labs/skillevaluation/blob/main/LICENSE).