Skip to content

Add a code-review agent skill for Copilot - #100

Merged
RobertoMachorro merged 2 commits into
masterfrom
copilot-code-review-skill
Aug 18, 2026
Merged

RobertoMachorro merged 2 commits into
masterfrom
copilot-code-review-skill

Conversation

@RobertoMachorro

Copy link
Copy Markdown
Owner

Copilot reviewed #99 and generated no comments, then suggested the repository could teach it what to look for. This is that file: the invariants that are load-bearing here but invisible to a generic Swift review, and — just as useful — the settled decisions it should stop proposing.

The invariants are the ones that have already cost a bug or a round of review: rendering state never entering NSTextStorage, SyntaxHighlighter's exclusive hold on textStorage.delegate and the foregroundColor temporary attribute, the ensureLayout requirement under allowsNonContiguousLayout paired with the opposite rule that layout must never be forced from inside a draw, and MopedTheme's Sendable guarantee resting on plain sRGB component colours.

Two get called out by name because they are the likeliest defects. A new preference has to reach both EditorState.makeEditor and applyPreferences, which are separate call sites with no shared helper, and each omission has its own symptom. And check_localized_strings.sh cannot see a literal handed to a helper rather than to Toggle directly, which is exactly the shape every row in the Editing pane takes.

The "do not raise" list is deliberate. Without it the same rejected suggestions — spaces over tabs, Bool over the Yes/No encoding, TextKit 2, extract-a-protocol — arrive on every pull request.

Format follows GitHub's agent-skill spec: .github/skills//SKILL.md with name and description in the frontmatter, and a review-focused directory name so Copilot associates it with pull request review.

Copilot reviewed #99 and generated no comments, then suggested the repository
could teach it what to look for. This is that file: the invariants that are
load-bearing here but invisible to a generic Swift review, and — just as
useful — the settled decisions it should stop proposing.

The invariants are the ones that have already cost a bug or a round of review:
rendering state never entering NSTextStorage, SyntaxHighlighter's exclusive
hold on textStorage.delegate and the foregroundColor temporary attribute, the
ensureLayout requirement under allowsNonContiguousLayout paired with the
opposite rule that layout must never be forced from inside a draw, and
MopedTheme's Sendable guarantee resting on plain sRGB component colours.

Two get called out by name because they are the likeliest defects. A new
preference has to reach both EditorState.makeEditor and applyPreferences,
which are separate call sites with no shared helper, and each omission has its
own symptom. And check_localized_strings.sh cannot see a literal handed to a
helper rather than to Toggle directly, which is exactly the shape every row in
the Editing pane takes.

The "do not raise" list is deliberate. Without it the same rejected
suggestions — spaces over tabs, Bool over the Yes/No encoding, TextKit 2,
extract-a-protocol — arrive on every pull request.

Format follows GitHub's agent-skill spec: .github/skills/<name>/SKILL.md with
name and description in the frontmatter, and a review-focused directory name
so Copilot associates it with pull request review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@RobertoMachorro RobertoMachorro self-assigned this Aug 17, 2026
Copilot AI lite review requested due to automatic review settings August 17, 2026 23:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a repository-specific GitHub agent skill (code-review) to encode Moped’s review invariants (TextKit 1/editor core constraints, localization gotchas, preference wiring requirements, theme invariants, and “do not raise” settled decisions) so automated and human reviews focus on the project’s actual load-bearing concerns.

Changes:

  • Introduces a new review skill document under .github/skills/code-review/ with Moped-specific invariants and common failure modes.
  • Documents CI “gates,” localization practices (including known blind spots), and preference-wiring requirements.
  • Captures editor-core and theme constraints plus established project conventions and “do not raise” guidance.
Suppressed comments (1)

.github/skills/code-review/SKILL.md:48

  • This section title says "three legs" but the checklist below has four required wiring points. The mismatch makes the guidance harder to follow.
## Adding a preference: three legs, and the one that gets forgotten

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/skills/code-review/SKILL.md Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@RobertoMachorro
RobertoMachorro merged commit c762fe4 into master Aug 18, 2026
1 check passed
@RobertoMachorro
RobertoMachorro deleted the copilot-code-review-skill branch August 18, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants