Repository navigation
feat(review): bundle review criteria and a verify step into the code-review skill #747
Copy link
Copy link
Closed
Labels
area:metaOrganization-wide policy, templates, or meta-repo work.Organization-wide policy, templates, or meta-repo work.type:featureA request for new behavior or capability.A request for new behavior or capability.
Description
Problem
The organization code-review skill (.github/skills/code-review/SKILL.md) is vendored into at least 15 consumer repositories at the approved revision 5593b7d. The checked copies match the approved content apart from YAML indentation. The skill is mostly a router, though, and the z-shell review criteria it routes to are not present where vendored reviews run.
- The criteria are absent from every consumer. The severity table (CRITICAL, IMPORTANT, SUGGESTION), dialect classification and deterministic checks live only in
.github/instructions/quality/code-review.instructions.mdin this repository. No consumer has a local copy. The skill says to follow that file by its github.com URL, or a local copy "when available". Copilot code review reads instructions and skills from the PR head branch; whether it follows the external URL is unverified. In a plugin, annex or module repository the review may therefore run without the z-shell priorities. - The pin covers only part of the skill. The skill is pinned, but its links to the criteria, tool-integration guidance and the org-review and pull-request runbooks point at
blob/main. The effective rules can change without a re-pin, whileorg-routing.py checkstill reports the consumer as current. - There is no verification procedure. The criteria ask for verified failure scenarios, but the skill has no step that separates finding suspected defects from verifying them. It also does not ask the reviewer to pin base, head and merge-base, to read existing review threads (thread resolution is a merge gate under ADR-0013), to review only the delta on a re-review, or to recheck the head before reporting.
- Every PR review loads org process text. About a third of the body covers repository-health readiness and the ADR-0026 fallback election. Health readiness is already owned by
runbooks/org-review.mdand enforced byautomation/agents/org-routing.py. The fallback election is meaningful to a local agent, not to the hosted reviewer.
No recorded review yet shows Copilot attributing a review to the skill, so its effect on review quality is unmeasured (runbooks/org-review.md already treats invocation as unverified).
Proposal
Scope is this repository. Re-pinning each consumer remains a separate authorized change per runbooks/org-review.md.
- Bundle the criteria in the skill. Extend
automation/knowledge/knowledge-delivery.pysoknowledge/domains/quality/code-review.mdalso renders.github/skills/code-review/references/criteria.md. The skill reference drops the Copilot frontmatter (applyTo,excludeAgent) and rewrites relative links that leave the skill directory to absolutehttps://github.com/z-shell/.github/blob/main/...URLs, so no bundled link breaks in a consumer. The core criteria are then pinned with the skill; the linked Zsh scripting standard and machine policy stay org-wide current by design. The knowledge source remains the only editable copy. - Rewrite
SKILL.mdto about 600 words (currently 756): readreferences/criteria.mdfirst and use its severity labels; add a verify step (record each suspected defect, check it against code, callers and tests, report confirmed and suspected separately, drop refuted ones); add the PR mechanics above; reduce health readiness to a pointer torunbooks/org-review.md; keep the fallback paragraph, scoped to agents that are not the hosted reviewer. - Add
references/criteria.mdto thefileslist ofcode-reviewinknowledge/domains/agents/data/approved-skills.json. Advance the approved revision in a follow-up change once the skill commit exists. - Update the install and update section of
runbooks/org-review.mdand the quality knowledge page for the multi-file skill and the second consumer. - Measure before and after the re-pin, each step separately authorized: a draft PR in one plugin repository with three planted defects (Bash-only syntax in native Zsh, a feature above the declared floor, network activity in the load path), a requested Copilot review, and a record of which defects were found, which severity labels were used and whether the skill was attributed. Close the PR unmerged.
- Re-pin in the runbook pilot order: this repository, one standard plugin, one documentation repository, then the remaining consumers.
Acceptance criteria
-
references/criteria.mdis generated from the knowledge source, carries the generated header, has no Copilot frontmatter and no relative link that leaves the skill directory. -
knowledge-delivery.py --checkfails when the reference drifts from its source; generator tests cover the second consumer and the link rewrite. -
SKILL.mdnames the bundled criteria, contains the verify step and the PR mechanics, and points torunbooks/org-review.mdfor health readiness. -
approved-skills.jsonlists both files andorg-routing.py verify-approvedpasses at the advanced revision. - The affected runbook and knowledge pages describe the multi-file skill.
- Baseline and post-change measurements are recorded on this issue (local Claude Code and Codex runs; Copilot measurement moved to Measure Copilot code review with the bundled code-review criteria #762).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:metaOrganization-wide policy, templates, or meta-repo work.Organization-wide policy, templates, or meta-repo work.type:featureA request for new behavior or capability.A request for new behavior or capability.
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(review): bundle review criteria and a verify step into the code-…
fix(review): state the approval ancestry rule exactly and align the s…
fix(review): state the approval ancestry rule exactly
ss-o commentedon Oct 7, 2026
Progress: items 1 to 4 of the proposal are merged.
references/criteria.mdis generated fromknowledge/domains/quality/code-review.mdalongside the instructions file,SKILL.mdhas the verify step and pull-request mechanics and points torunbooks/org-review.mdfor health readiness, approved-skill records can pin extra files by Git blob id, and the runbook and knowledge pages describe the multi-file skill.code-reviewis approved at ede9ed9 withfilesSKILL.mdandreferences/criteria.md, andresourcespinning the criteria blob;verify-approvedpasses.Downstream impact: consumers call
org-routing.ymlat a full SHA, and the job reads the approved record at that SHA, so no consumer's check changes until it moves that pin. A consumer that moves its caller pin past b96ad52 must re-pin the skill to ede9ed9 in the same change, or itscheckfails.Next: the baseline measurement (item 5) in z-shell/zsh-eza while it still vendors 5593b7d, then its re-pin, then the post-change measurement. Results will be recorded here.
ss-o commentedon Oct 7, 2026
Baseline measurement (item 5), first attempt: review request not registered; cause unconfirmed.
main(ruleset hascopilot_code_reviewwithreview_draft_pull_requests: false,review_on_push: false). Measurement PR feat(init): warn when the installed eza is older than the latest release zsh-eza#139, head c9fbb9e, vendoredcode-reviewskill at 5593b7d.POST /pulls/139/requested_reviewerswithcopilot-pull-request-reviewer[bot], thengh pr edit --add-reviewer @copilot; afterready_for_reviewat 2026-10-07T02:33:02Z, one more REST request at 02:33:23Z. Every response succeeded with an emptyrequested_reviewers, and the timeline shows noreview_requestedevent for Copilot and no Copilot review.The planted defects are not described here so a later run on the same PR is not primed. No further requests until the cause is known.
ss-o commentedon Oct 7, 2026
Cause of the unregistered request above: Copilot usage limits were reached for the requester (confirmed by the maintainer). The baseline stays pending on z-shell/zsh-eza#139, which is back in draft. Its head vendors the skill at 5593b7d and will not be rebased, so the baseline can still run there once the limit resets, independently of zsh-eza's re-pin on
main.Proceeding with the re-pin pilot in z-shell/zsh-eza meanwhile.
ss-o commentedon Oct 7, 2026
Re-pin pilot: z-shell/zsh-eza#140 re-pins
code-reviewto ede9ed9 and moves its Org Routing caller to a07ed57.gh skill install ... --pin ede9ed9... --dir .github/skillscopiesreferences/criteria.md, and the installed file is the approved blobcb2520c5. One of the two open verification questions is settled.criteria.md. A consumer that formats Markdown (Trunktrunk-fmt-pre-commit, or a Trunk check on changed files) would commit different bytes, andorg-routing.py checkwould then fail the resource blob comparison.SKILL.mdis unaffected because its digest ignores frontmatter formatting..trunk/trunk.yamlunderlint, as zsh-eza#140 does:Every remaining consumer re-pin needs the same entry (merged into an existing
ignorelist where one exists) beforereferences/criteria.mdis committed.ss-o commentedon Oct 7, 2026
Re-pin pilot: z-shell/wiki#939 merged (0d2f24f), re-pinning
code-reviewto ede9ed9 with the Org Routing caller at a07ed57. Post-merge runs onmain, including Org Routing and Deploy Wiki, pass. The vendoredSKILL.mdandreferences/criteria.mdare byte-identical to zsh-eza#140.Refinement of the formatter exclusion above: z-shell/wiki has ten locally authored skills under
.github/skills/, so its exclusion is scoped to the vendored skill (.github/skills/code-review/**) to keep those formatted. Use.github/skills/**only where every skill under it is vendored, and otherwise scope it to the vendored skill directories.Review note: the wiki is class 1. Copilot is configured but its request did not register, so the review of record used the ADR-0035 sole-maintainer exception, elected by the maintainer, with a separate read-only review of the same head.
Pilot order is complete (this repository, a standard plugin, a documentation repository). The remaining consumers and the Copilot measurement on z-shell/zsh-eza#139 are still open.
ci: re-pin the code-review skill with bundled criteria (#16)
ci: re-pin the code-review skill with bundled criteria (#15)
ss-o commentedon Oct 7, 2026
Re-pin wave: 11 more consumers re-pinned to
code-reviewat ede9ed9, with the Org Routing caller at a07ed57 and the Trunk exclusion scoped to.github/skills/code-review/**in each.next;mainfollows on promotion), ci: re-pin the code-review skill with bundled criteria zpmod#152, ci: re-pin the code-review skill with bundled criteria agent-skills#10, ci: re-pin the code-review skill with bundled criteria zsh#28, ci: re-pin the code-review skill with bundled criteria F-Sy-H#196, ci: re-pin the code-review skill with bundled criteria zsh-fancy-completions#72, ci: re-pin the code-review skill with bundled criteria zsh-lint#597, ci: re-pin the code-review skill with bundled criteria zunit#40.SKILL.mdandreferences/criteria.mdare byte-identical to the pilots, hosted Org Routing reported the repository current at tooling a07ed57, and every run on the base branch after the merge passed. Before reinstalling with--force, every local copy matched the previously approved digest.Remaining: z-shell/src and z-shell/zd, both class 1 with Copilot configured, which need the ADR-0035 route per PR; and the Copilot measurement on z-shell/zsh-eza#139 once the usage limit resets.
ss-o commentedon Oct 7, 2026
Coordination note: the z-shell/src consumer re-pin of
code-review(to ede9ed9, approved in #753) is being done together with thezi-installre-pin from #741 in one z-shell/src pull request, because bumping z-src's Org Routing caller past #753 requires both. Please skip z-shell/src in the #747 re-pins; the PR will link here.ss-o commentedon Oct 7, 2026
Correction to my previous note: z-shell/src#232 already re-pins
code-reviewin z-shell/src, so keep it as planned. The #741zi-installre-pin will follow on top of it once it merges, moving the caller from a07ed57 to 75e8552 (#759).ss-o commentedon Oct 7, 2026
Re-pin complete: z-shell/src#232 and z-shell/zd#134 are merged, so all 15 consumers vendor
code-reviewat ede9ed9. Each hasreferences/criteria.mdat the approved blobcb2520c5, the Org Routing caller at a07ed57, and Org Routing passing on its default branch after the merge. z-shell/zi has it onnext; zi'smainkeeps 5593b7d with its matching caller pin until the next promotion.Both class 1 PRs used the ADR-0035 sole-maintainer exception, elected by the maintainer per PR. In each, one Copilot request did not register (usage limit), and a separate read-only review of the same head found no actionable findings before the review of record was posted.
Remaining on this issue: the baseline and post-change Copilot measurement (item 5, last acceptance criterion). The baseline PR z-shell/zsh-eza#139 is in draft and still vendors 5593b7d; it runs once the Copilot limit resets, followed by the same planted defects against the new skill.
ss-o commentedon Oct 7, 2026
Measurement (item 5), run locally because Copilot code review could not register (usage limit). The Copilot-specific questions move to #762.
Setup. The same planted commit was reviewed with the previous skill (5593b7d) and with the new one (ede9ed9), in otherwise identical z-shell/zsh-eza trees: the diff under review is byte-identical in both arms. Each arm ran Claude Code and Codex twice, headless and read-only, with one neutral prompt: review the last commit using the repository's code-review skill and report findings in a fixed JSON shape. The prompt does not mention planted defects. The three defects are Bash-only syntax in native Zsh, a feature above the declared 5.9.2 floor, and a network request in the load path.
Isolated runs (decisive). Each arm is a standalone clone outside any workspace, with no network: Claude restricted to file tools, git and
zsh -n, with no MCP servers, and Codex in its read-only sandbox with web search disabled. Transcripts show no web, MCP or URL access.In both arms, Codex's second run missed the above-floor defect. Neither arm produced false positives. Both arms also reported real, unplanted issues: no tests,
!=used as a version ordering, unlocalized=~match parameters, and an undocumented load-time side effect.In-workspace runs. Reviewers run inside the maintainer's meta-workspace reached the org criteria from a sibling checkout of this repository even with the previous skill, so both arms tied there: 4 of 4 used the z-shell labels, and all three defects were found in every run. The first isolated attempt was discarded after its logs showed Codex's built-in web search fetching the org instructions from raw.githubusercontent.com.
Conclusion. With the criteria bundled, a reviewer that has only the consumer repository applies the z-shell severity scale, which it did not do before. Detection of these three defects did not change at this sample size: two runtimes, two runs each per arm. Whether Copilot reads the skill and its reference, and credits it, is tracked in #762.
ss-o commentedon Oct 7, 2026
Closing: all acceptance criteria are met. Copilot code review measurement continues in #762.