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.md in 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, while org-routing.py check still 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.md and enforced by automation/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.py so knowledge/domains/quality/code-review.md also 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 absolute https://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.md to about 600 words (currently 756): read references/criteria.md first 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 to runbooks/org-review.md; keep the fallback paragraph, scoped to agents that are not the hosted reviewer.
- Add
references/criteria.md to the files list of code-review in knowledge/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.md and 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
Problem
The organization
code-reviewskill (.github/skills/code-review/SKILL.md) is vendored into at least 15 consumer repositories at the approved revision5593b7d. 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..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.blob/main. The effective rules can change without a re-pin, whileorg-routing.py checkstill reports the consumer as current.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.mdalready treats invocation as unverified).Proposal
Scope is this repository. Re-pinning each consumer remains a separate authorized change per
runbooks/org-review.md.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.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.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.runbooks/org-review.mdand the quality knowledge page for the multi-file skill and the second consumer.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.