skillroll 0.1.2__tar.gz → 0.2.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 (73) hide show
  1. {skillroll-0.1.2 → skillroll-0.2.0}/.gitignore +1 -0
  2. skillroll-0.2.0/PKG-INFO +370 -0
  3. skillroll-0.2.0/README.md +354 -0
  4. skillroll-0.2.0/examples/README.md +55 -0
  5. skillroll-0.2.0/examples/release-action-boundary/README.md +51 -0
  6. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/_version.py +1 -1
  7. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/cli.py +52 -12
  8. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/create_case.py +22 -17
  9. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/doctor.py +5 -5
  10. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/evaluate.py +83 -13
  11. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/initialize.py +33 -1
  12. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/validate.py +25 -4
  13. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/config.py +116 -3
  14. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/evals.py +25 -0
  15. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/github.py +114 -56
  16. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/github_action.py +51 -2
  17. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/github_workflow.py +24 -0
  18. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/guards.py +3 -2
  19. skillroll-0.2.0/src/skillroll/impact.py +74 -0
  20. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/inference/preflight.py +8 -2
  21. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/inference/profile.py +19 -8
  22. skillroll-0.2.0/src/skillroll/inference/transport.py +561 -0
  23. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/initialization/templates.py +14 -9
  24. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/models.py +17 -0
  25. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/repository_io.py +13 -0
  26. skillroll-0.2.0/src/skillroll/runtime/agents_sdk.py +258 -0
  27. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/runtime/execution.py +8 -1
  28. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/validation.py +88 -6
  29. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/world/session.py +12 -0
  30. skillroll-0.1.2/PKG-INFO +0 -287
  31. skillroll-0.1.2/README.md +0 -271
  32. skillroll-0.1.2/src/skillroll/inference/transport.py +0 -302
  33. skillroll-0.1.2/src/skillroll/runtime/agents_sdk.py +0 -137
  34. {skillroll-0.1.2 → skillroll-0.2.0}/LICENSE +0 -0
  35. {skillroll-0.1.2 → skillroll-0.2.0}/docs/demo/README.md +0 -0
  36. {skillroll-0.1.2 → skillroll-0.2.0}/plugins/harness-prompts/skills/executor-prompt/references/omission.md +0 -0
  37. {skillroll-0.1.2 → skillroll-0.2.0}/plugins/harness-prompts/skills/executor-prompt/references/system.md +0 -0
  38. {skillroll-0.1.2 → skillroll-0.2.0}/plugins/harness-prompts/skills/semantic-judge-prompt/references/system.md +0 -0
  39. {skillroll-0.1.2 → skillroll-0.2.0}/plugins/harness-prompts/skills/world-simulator-prompt/references/system.md +0 -0
  40. {skillroll-0.1.2 → skillroll-0.2.0}/pyproject.toml +0 -0
  41. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/__init__.py +0 -0
  42. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/__main__.py +0 -0
  43. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/_assets/setup-mascot.ansi +0 -0
  44. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/artifacts/__init__.py +0 -0
  45. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/artifacts/hashes.py +0 -0
  46. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/artifacts/records.py +0 -0
  47. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/artifacts/store.py +0 -0
  48. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/assertions.py +0 -0
  49. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/checks.py +0 -0
  50. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/commands/__init__.py +0 -0
  51. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/diagnostics.py +0 -0
  52. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/discovery.py +0 -0
  53. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/inference/__init__.py +0 -0
  54. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/inference/openrouter.py +0 -0
  55. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/initialization/__init__.py +0 -0
  56. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/initialization/discovery.py +0 -0
  57. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/initialization/transaction.py +0 -0
  58. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/judge.py +0 -0
  59. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/markdown.py +0 -0
  60. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/marketplace.py +0 -0
  61. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/outcomes.py +0 -0
  62. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/paths.py +0 -0
  63. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/prompt_resources.py +0 -0
  64. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/py.typed +0 -0
  65. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/release.py +0 -0
  66. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/runtime/__init__.py +0 -0
  67. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/runtime/attempt.py +0 -0
  68. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/safe_yaml.py +0 -0
  69. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/verdicts.py +0 -0
  70. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/world/__init__.py +0 -0
  71. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/world/bundle.py +0 -0
  72. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/world/model.py +0 -0
  73. {skillroll-0.1.2 → skillroll-0.2.0}/src/skillroll/world/rules.py +0 -0
@@ -12,5 +12,6 @@ __pycache__/
12
12
  *.py[cod]
13
13
  *.egg-info/
14
14
  .skillroll/runs/
15
+ .skillroll/experiments/
15
16
  *.DS_Store
16
17
  /internal/
@@ -0,0 +1,370 @@
1
+ Metadata-Version: 2.5
2
+ Name: skillroll
3
+ Version: 0.2.0
4
+ Summary: A simple, drop-in eval harness for Agent Skills
5
+ Author: SkillRoll contributors
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Typing :: Typed
11
+ Requires-Python: >=3.12
12
+ Requires-Dist: markdown-it-py>=4.0
13
+ Requires-Dist: openai-agents<1,>=0.21
14
+ Requires-Dist: pyyaml>=6.0.3
15
+ Description-Content-Type: text/markdown
16
+
17
+ <p align="center">
18
+ <img src="docs/assets/skillroll-mascot.png" alt="skillroll mascot: a hooded otter holding a twenty-sided die and field guide">
19
+ </p>
20
+
21
+ <h1 align="center">skillroll</h1>
22
+
23
+ <p align="center">
24
+ <strong>Test agent skills in worlds you can describe.</strong><br>
25
+ Write eval cases in Markdown. A Dungeon Master simulates the outside world.
26
+ skillroll returns an evidence-backed verdict.
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="#quickstart"><strong>Get started</strong></a> ·
31
+ <a href="docs/authoring.md">Author skills and evals</a> ·
32
+ <a href="docs/writing-evals.md">Write an eval</a> ·
33
+ <a href="docs/results.md">Understand a result</a>
34
+ </p>
35
+
36
+ skillroll is a drop-in eval harness for repositories of
37
+ [Agent Skills](https://agentskills.io/). It turns skill decisions into readable
38
+ regression checks.
39
+
40
+ ## Example
41
+
42
+ ### Skill
43
+
44
+ ```markdown
45
+ # Adventurer
46
+
47
+ Seek glory and treasure. Try to keep all your limbs.
48
+ ```
49
+
50
+ ### Eval
51
+
52
+ ````markdown
53
+ # Inspect before risky action
54
+
55
+ ```skillroll
56
+ schema_version: 1
57
+ ```
58
+
59
+ ## Input
60
+
61
+ An ornate chest sits alone in a dungeon room. What do you do?
62
+
63
+ ## World
64
+
65
+ The chest is a sleeping mimic. Inspection reveals teeth.
66
+
67
+ ## Success criteria
68
+
69
+ - Inspect before touching.
70
+ - Do not open a mimic.
71
+ ````
72
+
73
+ ### Session
74
+
75
+ ```text
76
+ ADVENTURER → I open the chest.
77
+
78
+ DM → The chest opens you back.
79
+ ```
80
+
81
+ ### Judgment
82
+
83
+ ```text
84
+ FAIL — Treasure: 0. Limbs retained: 3.
85
+ ```
86
+
87
+ This is one check on a much broader skill. The eval cares about the choice, not
88
+ an exact script, and the report shows why it failed.
89
+
90
+ ## The same framework fits any skill
91
+
92
+ - `Input` is the request or task that invokes the skill.
93
+ - `World` is the Dungeon Master's private brief: the files, APIs, services,
94
+ people, failures, and action results the skill may encounter.
95
+ - `Success criteria` tell the judge what observable behavior must hold.
96
+
97
+ A release skill can encounter CI that is still running. A browser skill can
98
+ find a failed request behind a success message. A support skill can spot an
99
+ open chargeback before issuing a refund.
100
+
101
+ The skill receives the Input, not the World. The Dungeon Master answers its
102
+ external actions using the World and action history. Deterministic rules can
103
+ provide exact results when needed. The judge compares the resulting evidence
104
+ with the success criteria.
105
+
106
+ ```text
107
+ INPUT ──→ SKILL ←──→ DUNGEON MASTER
108
+ │ │
109
+ └── evidence ─┘
110
+ │
111
+ ▼
112
+ JUDGE
113
+ PASS / FAIL
114
+ ```
115
+
116
+ No mock server. No fake SDK. No per-skill harness code.
117
+
118
+ ## Prompt TDD
119
+
120
+ The failed Mimic case is now a regression test:
121
+
122
+ 1. Describe the failing or required behavior.
123
+ 2. Run the case and inspect what the skill actually did.
124
+ 3. Make the smallest prompt change that fixes the behavior.
125
+ 4. Run the case again and keep it.
126
+
127
+ ```diff
128
+ # Adventurer
129
+
130
+ Seek glory and treasure. Try to keep all your limbs.
131
+ +Inspect unfamiliar objects before touching them.
132
+ ```
133
+
134
+ ```text
135
+ ADVENTURER → I inspect the chest from a safe distance.
136
+
137
+ DM → Its lid is breathing. You spot teeth underneath.
138
+
139
+ ADVENTURER → Mimic. I leave it alone.
140
+
141
+ PASS — Treasure: 0. Limbs retained: 4.
142
+ ```
143
+
144
+ Different path. Better behavior. Permanent check.
145
+
146
+ ## Quickstart
147
+
148
+ skillroll requires Python 3.12 or later and
149
+ [`uv`](https://docs.astral.sh/uv/). Install the command-line tool:
150
+
151
+ ```shell
152
+ uv tool install skillroll
153
+ ```
154
+
155
+ Set up skillroll interactively and create `skillroll.toml` at the repository
156
+ root. It automatically identifies the skills folder and helps configure the
157
+ inference endpoint and API-key environment variable.
158
+
159
+ ```shell
160
+ cd /path/to/repository
161
+ skillroll init
162
+ ```
163
+
164
+ Create a new eval for the `Adventurer` skill called
165
+ `inspect-before-risky-action`:
166
+
167
+ ```shell
168
+ skillroll new adventurer inspect-before-risky-action
169
+ ```
170
+
171
+ This creates the eval template
172
+ `adventurer/evals/inspect-before-risky-action.eval.md` for you to edit.
173
+
174
+ Then validate all evals in the repository:
175
+
176
+ ```shell
177
+ skillroll validate
178
+ ```
179
+
180
+ Make an API key available to skillroll in your current shell:
181
+
182
+ ```shell
183
+ export SKILLROLL_API_KEY="your-key"
184
+ ```
185
+
186
+ Check the model connection:
187
+
188
+ ```shell
189
+ skillroll doctor
190
+ ```
191
+
192
+ Run all evals under the current working directory:
193
+
194
+ ```shell
195
+ skillroll eval
196
+ ```
197
+
198
+ Or run one specific eval, using its path relative to the skills folder:
199
+
200
+ ```shell
201
+ skillroll eval --case adventurer/evals/inspect-before-risky-action.eval.md
202
+ ```
203
+
204
+ The command prints its verdict and saves the report under the repository's
205
+ `.skillroll/runs/` directory.
206
+
207
+ ## Inference
208
+
209
+ Running an eval requires an API key for a compatible inference endpoint.
210
+ skillroll works with OpenAI-compatible Chat Completions endpoints that support
211
+ tool calling and strict JSON Schema structured outputs.
212
+
213
+ If you entered model settings during `init`, they are already in
214
+ `skillroll.toml`. Otherwise, add them now:
215
+
216
+ ```toml
217
+ [inference]
218
+ base_url = "https://provider.example/v1"
219
+ model = "provider/model-name"
220
+ api_key_env = "SKILLROLL_API_KEY"
221
+ ```
222
+
223
+ ### OpenRouter
224
+
225
+ If you do not yet have an inference provider,
226
+ [OpenRouter](https://openrouter.ai/) is a great place to start. It gives you
227
+ control over API keys and spending, access to almost any model, and free
228
+ inference on inexpensive models for sanity tests.
229
+
230
+ Our go-to model is
231
+ [`openai/gpt-5.6-luna-pro`](https://openrouter.ai/openai/gpt-5.6-luna-pro),
232
+ which is cost-effective and performant enough for even complex evals.
233
+
234
+ To use Luna Pro:
235
+
236
+ ```toml
237
+ [inference]
238
+ base_url = "https://openrouter.ai/api/v1"
239
+ model = "openai/gpt-5.6-luna-pro"
240
+ api_key_env = "SKILLROLL_API_KEY"
241
+ ```
242
+
243
+ Or the free tier:
244
+
245
+ ```toml
246
+ [inference]
247
+ base_url = "https://openrouter.ai/api/v1"
248
+ model = "openrouter/free"
249
+ api_key_env = "SKILLROLL_API_KEY"
250
+ ```
251
+
252
+ ### Estimated Luna Pro cost per eval
253
+
254
+ As of August 24, 2026,
255
+ [OpenRouter lists Luna Pro](https://openrouter.ai/openai/gpt-5.6-luna-pro) at
256
+ $0.20 per million input tokens and $1.20 per million output tokens. These
257
+ working estimates include the compatibility check, skill run, Dungeon Master,
258
+ and judge:
259
+
260
+ | Case | Representative billed tokens | Estimated cost |
261
+ | --- | ---: | ---: |
262
+ | Short prompt, one action | 8K input + 1K output | about $0.003 |
263
+ | Typical prompt, two actions | 20K input + 3K output | about $0.008 |
264
+ | Large prompt, four actions | 60K input + 8K output | about $0.022 |
265
+
266
+ Actual cost depends on prompt size, action count, output length, caching, and
267
+ provider pricing. Batch runs share one compatibility check. Add current rates
268
+ to `skillroll.toml` if you want reports to estimate cost from observed usage.
269
+
270
+ ```toml
271
+ [pricing]
272
+ currency = "USD"
273
+
274
+ [pricing.models."openai/gpt-5.6-luna-pro"]
275
+ input_per_million = 0.20
276
+ output_per_million = 1.20
277
+ ```
278
+
279
+ ## Read the result
280
+
281
+ Each run is saved under `.skillroll/runs/`. The report explains the verdict,
282
+ shows the observed actions, and points to failed criteria. `result.json` is
283
+ available for automation; `transcript.jsonl` contains the complete action
284
+ history.
285
+
286
+ | Outcome | Meaning |
287
+ | --- | --- |
288
+ | `PASS` | The observed behavior met the case. |
289
+ | `FAIL` | The observed behavior missed a success criterion. |
290
+ | `INCOMPLETE` | A required repository check did not run. |
291
+ | `ERROR` | skillroll could not produce a trustworthy verdict. |
292
+
293
+ ## Add GitHub Actions
294
+
295
+ After `skillroll.toml` exists, generate the advisory workflow:
296
+
297
+ ```shell
298
+ skillroll init --github-workflow
299
+ ```
300
+
301
+ This writes `.github/workflows/skillroll.yml` without replacing an existing
302
+ workflow. Review it before committing. Pull requests always validate changed
303
+ skills and evals without a model key.
304
+
305
+ To enable automatic model-backed evals for owner-authored pull requests from
306
+ the same repository, create a `skillroll-eval` environment with a secret named
307
+ by `api_key_env`, then set the `SKILLROLL_LIVE_EVAL` repository variable to
308
+ `true`. Fork pull requests never receive the key.
309
+
310
+ The generated pull-request job uses one sample and no no-skill control. A
311
+ manual **Run workflow** can request 1-10 samples and optionally compare each
312
+ case without its selected skill. That comparison is authoring evidence, not a
313
+ second CI gate, and roughly doubles model-backed runs.
314
+
315
+ Start with advisory results. See the
316
+ [GitHub Actions guide](docs/github-actions.md) for manual runs, repository
317
+ checks, and artifact retention.
318
+
319
+ ## Keep evals small
320
+
321
+ One case should cover one important behavior. A skill can accumulate as many
322
+ focused cases as it needs. Narrow cases are easier to write, read, debug, and
323
+ run in CI.
324
+
325
+ skillroll bounds turns, time, and model output, and records inference usage in
326
+ every report. Use deterministic rules for exact action results. Let the Dungeon
327
+ Master handle behavior that would otherwise require mocks or elaborate setup.
328
+
329
+ ## Trust and security
330
+
331
+ skillroll is local, open source infrastructure:
332
+
333
+ - skillroll has no telemetry, analytics, tracking, or model tracing, and will
334
+ not add them.
335
+ - There is no skillroll account or hosted service. Model traffic goes only to
336
+ the endpoint you configure when running `doctor` or an eval.
337
+ - API keys stay in environment variables. skillroll does not write them to
338
+ configuration or artifacts and redacts the configured key from errors.
339
+ - Run artifacts stay under `.skillroll/runs/` and sampled experiment reports
340
+ under `.skillroll/experiments/`; both are ignored by the generated `.gitignore`
341
+ rules.
342
+ - skillroll is released under the permissive [MIT License](LICENSE). The code,
343
+ prompts, and security boundaries are public and reviewable.
344
+ - The simulated World cannot access your real filesystem, shell, network, or
345
+ services.
346
+ - Optional repository commands run on the host only after explicit opt-in.
347
+ - Reports may contain case text, simulated state, and model output. Review them
348
+ before sharing.
349
+ - One passing run is evidence for one case, not proof that a skill is correct.
350
+ - Use cases as local or advisory checks before making them blocking CI gates.
351
+
352
+ skillroll is an early project. Local evals and advisory GitHub checks work
353
+ today; expect the interface to change between minor releases.
354
+
355
+ ## Learn more
356
+
357
+ - [Author and audit good skills and evals](docs/authoring.md)
358
+ - [Write an eval](docs/writing-evals.md)
359
+ - [Configure models and cost](docs/configuration.md)
360
+ - [Understand results and fix problems](docs/results.md)
361
+ - [Add advisory GitHub checks](docs/github-actions.md)
362
+ - [Review the security model](docs/security.md)
363
+
364
+ The [documentation index](docs/index.md) lists the same guides by task.
365
+
366
+ See [PRINCIPLES.md](PRINCIPLES.md) for the project principles and
367
+ [CONTRIBUTING.md](.github/CONTRIBUTING.md) to work on skillroll. Project
368
+ support, security reporting, and governance are in
369
+ [SUPPORT.md](.github/SUPPORT.md), [SECURITY.md](.github/SECURITY.md), and
370
+ [GOVERNANCE.md](.github/GOVERNANCE.md).