Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b65646a
feat(quality): load Reliability error-handling rules from quality config
westonplatter Nov 3, 2026
dbb0ed1
feat(quality): score Reliability error handling from quality config
westonplatter Nov 3, 2026
70580c1
docs(quality): document error_handling in the quality config
westonplatter Nov 3, 2026
3f16fdd
refactor(quality): tidy error_handling loading
westonplatter Nov 3, 2026
a982459
fix(quality): match custom terms that start or end with punctuation
westonplatter Nov 3, 2026
8f590f9
fix(quality): keep custom quality_config digests stable across packag…
westonplatter Nov 4, 2026
41b2728
Merge branch 'main' into feat/reliability-error-handling-config
rng1995 Nov 6, 2026
7ef7002
Merge branch 'main' into feat/reliability-error-handling-config
chrisknvidia Nov 9, 2026
2444198
Merge remote-tracking branch 'upstream/main' into feat/reliability-er…
westonplatter Nov 11, 2026
2914166
feat(quality-config): let a custom file omit expected_headers
westonplatter Nov 11, 2026
176e753
docs(quality): explain that points: 0 differs between the two sections
westonplatter Nov 11, 2026
ca287e4
docs(quality): narrow the scripts and lib rows to the files checked
westonplatter Nov 11, 2026
8f939cb
fix(quality): match multi-word error-handling terms across whitespace
westonplatter Nov 11, 2026
31e2458
docs(quality): describe the quality config file as a whole
westonplatter Nov 11, 2026
61eb038
refactor(quality-config): rename load_quality_config_with_provenance
westonplatter Nov 11, 2026
0c04fab
refactor(quality-config): restore the quality_config_provenance name
westonplatter Nov 11, 2026
ac48cf1
docs(changelog): note the quality_config_provenance signature change
westonplatter Nov 11, 2026
a5d7f36
refactor(quality-config): name the loader load_quality_config_with_pr…
westonplatter Nov 11, 2026
461b560
docs(quality): say lib skips only for .py or .sh files directly in sc…
westonplatter Nov 11, 2026
1242bc3
Merge upstream/main into feat/reliability-error-handling-config
westonplatter Nov 12, 2026
69cff7a
Merge upstream/main into feat/reliability-error-handling-config
westonplatter Nov 12, 2026
8bda96b
Merge upstream/main into feat/reliability-error-handling-config
westonplatter Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ All notable changes to SkillEvaluator are documented in this file.

### Added

- Add an `error_handling` section to the `--quality-config` file for
Reliability's three error-handling rules: the `SKILL.md` mention check and
the `scripts` and `lib` code checks. Each sets `points`, `message`,
`suggestion`, and its `terms` or `markers`; `points: 0` turns a rule off.
The section is optional and merges with the packaged values. A custom file
may now also omit `expected_headers`, which then falls back to the packaged
heading list; a list you set still replaces it and `[]` still turns heading
checks off. Without a
custom file, scores and findings are unchanged. The packaged
`quality_config` digest changes once, because `quality-default.yaml` gained
the section. A custom file's digest covers only the rules that file sets, so
existing custom files keep their digests and a digest changes only when the
file's rules change.

- A reproducible public terminal starter runs the released CLI against the
bundled text-analyzer skill, checks real script/report output and a seeded
quality regression, and retains an editable task, fixture and run receipt.
Expand Down Expand Up @@ -181,6 +195,11 @@ All notable changes to SkillEvaluator are documented in this file.

### Changed

- Remove `skillevaluator.quality_config.quality_config_provenance(path, config)`.
Use `load_quality_config_with_provenance(path)` instead: it loads the config
and returns `(config, provenance)`, and its digest covers only the rules a
custom file sets. The report's `quality_config` field keeps its shape.

- Name Skill Lift as the headline comparison and label pass@k differences as
supporting reliability across reports and terminal output.

Expand Down
6 changes: 3 additions & 3 deletions docs/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ errors, such as an option the workflow does not accept, exit `2`.
| `--skip CHECKS` | none | Comma-separated checks to leave out, e.g. `secrets` for the Gitleaks scan. Skipped checks are shown and reported as skipped, nothing is installed for them, and the run cannot certify Tier 1 for publication |
| `--llm / --no-llm` | Enabled when a provider is configured | Enable or skip rubric, LLM security, and finding verification; explicit `--llm` requires valid provider configuration |
| `--min-score INTEGER` | `70` | Minimum passing quality and rubric score, from 0 to 100; quality severity overrides cannot waive the minimum |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file that replaces the quality check's expected-heading rules. See [Tier 1: Validation](tier1-validation.mdx#the-checks). |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file that adjusts the quality check's expected headings and error-handling rules; settings it omits keep their packaged values. See [Tier 1: Validation](tier1-validation.mdx#the-checks). |
| `--pii-waivers PATH` | none | Reviewed, expiring PII waivers applied by the `pii` check. See [PII waivers](tier1-validation.mdx#pii-waivers). |
| `--profile TEXT` | `SKILLEVALUATOR_PROFILE`, then `default` | Validation policy; `external` is a compatibility alias |
| `--previous-version TEXT` | `SKILLEVALUATOR_PREVIOUS_VERSION`, else unset | Previous version for version checks |
Expand Down Expand Up @@ -301,7 +301,7 @@ Static checks; LLM-free by default. Tier 1 gates the exit code and always runs.
| `--llm-verify` | off | Run a second LLM pass to suppress false-positive findings. |
| `--skillspector-baseline FILE` | unset | Audited SkillSpector suppression baseline for the `security` check; never discovered from the skill. See [Audited SkillSpector baselines](tier1-validation.mdx#audited-skillspector-baselines). |
| `--min-score INTEGER` | `70` | Minimum quality score (0–100) required per skill when the `quality` check runs; policy severity overrides cannot waive this gate. |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file that replaces the quality check's expected-heading rules. See [Tier 1: Validation](tier1-validation.mdx#the-checks). |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file that adjusts the quality check's expected headings and error-handling rules; settings it omits keep their packaged values. See [Tier 1: Validation](tier1-validation.mdx#the-checks). |
| `--pii-waivers PATH` | none | Reviewed, expiring PII waivers applied by the `pii` check; forwarded to each skill of a catalog run. See [PII waivers](tier1-validation.mdx#pii-waivers). |

### Tier 2 · Deduplication
Expand Down Expand Up @@ -372,7 +372,7 @@ skillevaluator quality-check ./my-skill
| Flag | Default | Effect |
| --- | --- | --- |
| `--min-score INTEGER` | `70` | Minimum composite score required per skill; passing also requires no HIGH or CRITICAL quality findings. |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file with expected section headers and rules for grading. |
| `--quality-config PATH` | packaged `quality-default.yaml` | YAML file that adjusts the expected headings and error-handling rules used for grading; settings it omits keep their packaged values. |

Plus the standard report options. A collection's displayed average does not
replace the minimum required of each skill. Scoring weights, grade bands, the
Expand Down
26 changes: 23 additions & 3 deletions docs/tier1-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice
If a quality score changes unexpectedly, inspect the finding message rather than adding keywords. The checker rewards usable instructions and evidence in their relevant context, not vocabulary alone.
</Tip>

**Expected headings.** Reliability deducts points when `SKILL.md` lacks an expected heading. The packaged `quality-default.yaml` expects `## Prerequisites` (or `## Requirements`), `## Limitations`, and `## Troubleshooting` (or `## Common Issues` or `## FAQ`), each worth 5 points. Pass `--quality-config PATH` to `quality-check`, `tier1`, or `validate` to use your own list instead. The file replaces the packaged defaults rather than merging with them, so copy any default entries you want to keep.
**Quality config file.** Pass `--quality-config PATH` to `quality-check`, `tier1`, or `validate` to adjust the Reliability rules below. The file has two optional sections, `expected_headers` and `error_handling`. Anything you leave out keeps its packaged value from `quality-default.yaml`, and any list you set replaces the packaged list rather than merging with it.

**Expected headings.** Reliability deducts points when `SKILL.md` lacks an expected heading. The packaged `quality-default.yaml` expects `## Prerequisites` (or `## Requirements`), `## Limitations`, and `## Troubleshooting` (or `## Common Issues` or `## FAQ`), each worth 5 points. Omit `expected_headers` to keep that list. A list you set replaces it, so copy any default entries you want to keep. Set `expected_headers: []` to turn heading checks off.

```yaml title="quality.yaml"
expected_headers:
Expand All @@ -365,15 +367,33 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice
| --- | --- | --- |
| `heading` | Yes | A single ATX Markdown heading, such as `## Security` |
| `alternatives` | No | Other headings that satisfy the same entry |
| `points` | No (default `5`) | Non-negative number deducted from Reliability when no accepted heading is found |
| `points` | No (default `5`) | Non-negative number deducted from Reliability when no accepted heading is found. With `points: 0` the missing heading is still reported as a zero-point (advisory) finding, but the score does not change |
| `message` | No | Finding message reported when the heading is missing. Defaults to `Missing expected heading: '## Examples'`, listing any alternatives |
| `suggestion` | No | Fix suggestion attached to the finding. Defaults to `Add a '## Examples' section`, or `Add one of these sections: ...` when there are alternatives |

The packaged defaults set `message` and `suggestion` explicitly, so their findings keep the original wording.

An entry is satisfied when the heading or any alternative appears anywhere in `SKILL.md` as text, so `## Security` also matches `### Security Notes` or a heading inside a code block.

The file is checked before any validation runs. A file that is missing, unreadable, not UTF-8, invalid YAML, has an unknown key (such as `point` instead of `points`), or lists the same heading twice is a usage error: the command exits with code 2 and names the file and the problem. `validate` checks the file even when `--checks` leaves out `quality`.
**Error-handling checks.** Reliability also runs three error-handling rules, set in the `error_handling` section of the same file. An omitted rule, or an omitted key within a rule, keeps its packaged value. Set `points: 0` to turn a rule off; it then adds no finding. This differs from `expected_headers`, where an entry with `points: 0` still reports a zero-point finding that does not change the score.

```yaml title="quality.yaml"
error_handling:
mentioned:
terms: [error, failure, rollback, retry]
scripts:
points: 0
```

| Rule | Deducts when | Packaged points | List field |
| --- | --- | --- | --- |
| `mentioned` | `SKILL.md` contains none of the `terms` | `10` | `terms`: whole words, any case. `error` matches `Error` but not `errorless`. A term with spaces, such as `exit code`, also matches when its words are split by a line break or several spaces |
| `scripts` | A `.py` file directly in `scripts/` or `tools/` has neither a `try:`/`except` pair nor any of the `markers` | `5` | `markers`: case-sensitive text found anywhere in the file, such as `raise` or `if not ` |
| `lib` | A module in the skill's Python package, for skills with no `.py` or `.sh` files directly in `scripts/` or `tools/`, has neither a `try:`/`except` pair nor any of the `markers` | `5` | `markers`: as for `scripts` |

Each rule also takes `message` and `suggestion`. The `scripts` and `lib` findings append up to three file names to the message, as in `Scripts may lack error handling: run.py`. The `try:`/`except` pair always counts as error handling and is not configurable. See the packaged `quality-default.yaml` for every default term and marker. The `quality_config` digest in the report covers only the rules your file sets, not the packaged values it leaves out, so the digest changes only when your file's rules change.

The file is checked before any validation runs. A file that is missing, unreadable, not UTF-8, invalid YAML, has an unknown key (such as `point` instead of `points`), lists the same heading twice, has a negative or non-numeric `points`, an empty `terms` or `markers` list, or a repeated entry in one of those lists is a usage error: the command exits with code 2 and names the file and the problem. `validate` checks the file even when `--checks` leaves out `quality`.

```text title="Example error"
Error: Invalid value for '--quality-config': quality.yaml: unknown key(s) in expected_headers[0]: point (allowed: alternatives, heading, message, points, suggestion)
Expand Down
23 changes: 23 additions & 0 deletions src/skillevaluator/config/quality-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,26 @@ expected_headers:
points: 5
message: "No troubleshooting section documented"
suggestion: "Add '## Troubleshooting' with Error/Cause/Solution patterns"

# Reliability error-handling rules. A custom file may set any subset of these;
# omitted blocks and keys keep the values below. Set points to 0 to turn a rule off.
error_handling:
# SKILL.md mentions none of the terms (whole word, any case).
mentioned:
points: 10
message: "No mention of error handling or validation"
suggestion: "Document expected errors and how to handle them"
terms: [error, errors, exception, exceptions, invalid, fail, fails, failed, failure, failures, failing,
validate, validates, validated, validating, validation, validations]
# A script has neither try/except nor any marker (case-sensitive substring).
scripts:
points: 5
message: "Scripts may lack error handling"
suggestion: "Scripts should handle errors explicitly"
markers: ["if not ", "if error", "raise", "assert", "ValueError", "FileNotFoundError"]
# A lib module has neither try/except nor any marker (case-sensitive substring).
lib:
points: 5
message: "Lib modules may lack error handling"
suggestion: "Library code should handle errors explicitly with try/except or raise"
markers: ["raise", "assert", "ValueError", "TypeError", "RuntimeError"]
Loading