Repository navigation
fix(skills): resolve the ten contract gaps (ADR 0011) - #51
Merged
Merged
Conversation
…spatched items An item skill 'run on its own' wrote a run-log entry, but a dispatched sub-agent was given only the item URL, so it could not tell it was dispatched and the item and the group could both log. It also lost runner, unattended, trusted_authors and every other input of the group run. Add write_log (default true) to the four item skills with their own log entry. Dispatching now passes the URL, write_log=false and every group input the item also lists in params. The validator checks a dispatched item can take write_log.
…ore claiming skipped meant 'nothing happened' before a claim but was also returned after one (merge lane held), after the claim had posted a lease comment, so a PR waiting on the lane collected a comment per run. Add #N noop: <reason> for a claimed item that is released unchanged, and make eligibility read the lane and merge state first so a PR that can only wait is skipped without a claim. A conflicted PR often runs no checks, so shepherd-github-pr skipped it as no-checks-yet and never reached its conflict handling. A DIRTY branch is now eligible whatever the checks say. review-github-pr step 4 sent a PR back to needs-work with no result line. It now returns #N not ready: <reason>.
…atch deterministic file-github-issues referred to a limit the caller could give, but had no such input, so explore could not enforce explore_batch. Add limit: once that many are filed the rest return deferred: over limit unchecked. explore-github-repo passes limit=explore_batch in one call. explore_batch defaulted to 5, or 3 when the backlog was 'large' (undefined). It is now always 5. Dedupe already prefers a comment to a near-duplicate filing.
… lease Eligibility called clear_stale_lease, which removes a label, so a precondition had a side effect. Checking a lease now only reads: a stale label does not count as a lease (lease_live decides) and is replaced by the next claim. lease_live ignores who holds the lease, so a skill that called an item skill on an item it already held would see its own lease and skip, and a nested release would drop the caller's lease. Add lease_held (default false): claim and release do nothing, and the lease must be live. The validator rejects a precondition that names a writing helper.
…skill for housekeeping 'Close the issue after a merge unless it is keep-open' was written out in three places (triage housekeeping, implement step 2, review step 7.4), and the abandoned-PR rule in two. They now share references/issue-after-pr.md, and each caller states only what it adds. triage-github-issues did housekeeping itself, which made a group skill change issues it had not claimed. Move it to reconcile-github-issues (kind: sweep), which lists exactly what it may change, takes dry_run, and is called by triage-github-issues or run on its own. It also takes over clearing stale lease labels, now that eligibility only reads. The label repair priority is read from labels.md instead of being copied.
…ub-issue The check for a prior trusted outcome (old step 7) ran after the costly unattended-triage call (old step 5), so a pass that had already decided once paid for the decision again. Move it to step 4, ahead of the format check and the decision: a standing outcome skips both and goes to a reconciliation note. Steps 8 to 10 keep their numbers.
glennfaison
force-pushed
the
fix/contract-gaps
branch
from
November 2, 2026 11:34
1cf0dd6 to
d27f85b
Compare
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.
Stacked on #50 (base is
feat/skill-contracts). Resolves the ten gaps listed in ADR 0010. One commit per change, so each can be reviewed or reverted on its own. The decisions are in ADR 0011.Behaviour changes
write_logand dispatch forwardingwrite_loginput (defaulttrue) on the four item skills. A group skill dispatches with the URL,write_log=falseand every group input the item also lists inparams. Also fixes something I had not reported: a sub-agent used to get only the URL, so it lostrunner,unattendedandtrusted_authorsnoopand shepherd pre-claimskippedalways means nothing was claimed. Newnoopfor claimed-then-released andnot readyfor review step 4. Shepherd reads the lane and merge state before it claims. ADIRTYbranch is eligible whatever its checks saylimitandexplore_batchfile-github-issuesgets a reallimit.explore_batchis always5lease_heldclear_stale_lease. Newlease_heldmakesclaimandreleasedo nothing, for a nested callreconcile-github-issuesowns whattriage-github-issuesdid to unclaimed issues, and also clears stale leases. Newreferences/issue-after-pr.mdreplaces three copies of the close-after-merge ruleunattended-triagecallChecks
scripts/contracts.mjslearned: asweepkind, that a dispatched item which logs must acceptwrite_log, and that arequiresline may not name a writing helper (claim,release,clear_stale_lease, ...). 20 unit tests.tests/lib.test.shcovers the new defaults and thatclaim/releasedo nothing underlease_held=true. 154 pass (withjq).validate,lint,sync:check,check-plugin-versionpass.What this does not prove
Nothing here ran against real GitHub. The shell tests use the repo's
ghmock, and the skill changes are text that a model follows. In particular:reconcile-github-issuesis new. It moves existing steps and adds stale-lease clearing, but it has not been run.lease_heldis only exercised at the helper level. No skill passes it yet.For review
reconcile-github-issuesright as apipelineskill withkind: sweep, or should it sit elsewhere?noopandnot readythe right names?triage-github-issue, is "a standing prior outcome skips the format check as well as the decision" what you want? Skipping only the decision is the more conservative reading.