Repository navigation
Add a code-review agent skill for Copilot - #100
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
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.