Repository navigation
feat(eval): check what a skill writes, not only where (#67, step 1 of 3) - #97
Merged
Merged
Conversation
An entry of effects.writes.<scope> can carry an allow (op, and where it applies label and marker). The scenario checker places an effect in its scope as before, then, if the scope has allow entries, requires one to match. A scope is all sentences or all allow, and the validator rejects the mix. shepherd-github-pr is the worked example (ADR 0017); the other skills are migrated in later steps.
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of 3 for #67: the schema, the checker, and one skill as a worked example.
What changes
The scenario checker could only compare an effect to its scope (
claimed,repository,other,shared). A skill that addedwontfixto the PR it had claimed passed. An entry ofeffects.writes.<scope>can now be{text, allow}: the sentence stays as the explanation, andallow(one mapping or a list) says what it permits:opis required.label(name or*glob) is required forlabel_add/label_remove.marker(name, glob, ornullfor no marker) is required forcomment/comment_edit.comment_editcarries only an index, so its marker is that of the comment it edits in the world the run started from. A comment that can't be found matches nothing, not evennull.scopeOfis unchanged. The three places that checked a scope (pure skills, item skills, reruns) now share one function,forbiddenWrite.allow. A scope withoutallowis checked by scope alone, as before, so nothing changes until a contract is migrated. The validator rejects a mix (a bare sentence beside anallowwould look like permission it doesn't give) and anallowwhose op can never land in its scope.shepherd-github-pris migrated in full (all four scopes). Its 9 golden scenarios pass unchanged.Design and trade-offs:
docs/adr/0017-structured-write-allowances.md. The protocol's Contracts section documents the format.Behaviour guard
517 existing tests pass unchanged after the refactor alone (before migrating shepherd). 19 new tests: schema validation, glob/marker matching,
comment_editlookup, and the worked example against the real shepherd contract (wontfixlabel, unlisted marker, unmarked comment, a label on the linked issue, the rerun path, and prose scopes keeping their old behaviour). Disabling the allow check makes 5 of them fail.npm test: 536/536.npm run validateandcheck-plugin-versionpass.Not in this PR
create_pr,create_issue,closeandreview_requestare matched by op alone. The schema rejectslabel/markeron them so they can't be mistaken for checked.triage-github-issue,implement-github-issue,review-github-pr) and 3 (groups, sweep, file skills).Refs #67, #72.