Repository navigation
feat(skills): give every pipeline skill a machine-checked contract - #50
Merged
Merged
Conversation
…DR 0010) Each pipeline skill now opens with a ## Contract (YAML): requires, returns, ensures, effects by scope, never, calls, idempotent, terminates. It replaces the Eligibility, Context read, Outputs, Result, Never and Success criteria sections. Behaviour is unchanged. Two documented results are corrected (escalated on triage-github-issue and implement-github-issue). scripts/contracts.mjs checks each contract against its skill in npm run validate, with tests in tests/contracts.test.mjs. Known behaviour gaps found while writing the contracts are listed in the ADR and left for separate changes.
This was referenced Nov 1, 2026
This was referenced Nov 2, 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.
What
Every pipeline skill now opens with a
## Contract: a YAML block that says what the skill is as a function. This is the first step toward evaluating the skills as functions (design in ADR 0010).The contract replaces the prose Eligibility, Context read, Outputs, Result, Never and Success criteria sections. Process stays prose.
Behaviour: unchanged
The contracts describe what the skills do today, including the awkward parts. Two documented results are corrected:
triage-github-issueandimplement-github-issuenow list#N escalated: <reason>, which their steps could already produce.Everything I found that looks like a real behaviour problem is listed under Known gaps in the ADR, deliberately not fixed here, so the contracts stay a clean baseline for evaluation.
Checks
scripts/contracts.mjs, run bynpm run validate, checks each contract against its skill:paramsequal the Inputs table, every#N …result the text returns is inreturns, item skills listskippedandfailed(andescalatedif they citeescalate.md), write scopes are valid, group skills never claim,callsanddispatchesresolve, and the folded prose sections are gone.tests/contracts.test.mjs: 17 tests on synthetic skills. Added tonpm test.implement-github-issue: removingescalated, adding a bogus param, re-adding a## Resultsection and returning an undeclared result each fail validation.validate,lint,sync:checkandcheck-plugin-versionpass. 70 node tests pass. 148 shell tests pass (neededjqon PATH).Other changes
file-github-issues: its Inputs table was split by a prose line into a headed table and a headless one. Now two valid tables. This reorders one line (unattended) in the generated runner prompt.AGENTS.mdlisted threemetaskills and one user-invoked skill.runner-promptsis both. Fixed, and a Contracts rule added.agent-workflow-protocol: new Contracts section. The group and item frame now points at the contract'srequiresandreturns.For review
Read the contract of one item skill against its Process. The thing to judge is whether
ensures,effectsandneversay what the skill really promises. I wrote them from the skill text, not from runs.Utility skills are next, and so are scenario tests built on these contracts.