-
Notifications
You must be signed in to change notification settings - Fork 18
chore: Add multi-workflow Copilot review instructions and slim copilot-instructions.md #1368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/add-copilot-instructions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bdb19df
Add Copilot onboarding instructions
Copilot 6966879
Address review feedback in onboarding docs
Copilot 7bb7bf9
Clarify dhautofunction reference
Copilot e3d27df
Replace duplicate "First steps" section in copilot-instructions.md wi…
Copilot 531c531
Slim copilot-instructions.md and add multi-agent copilot-review-instr…
Copilot 2b969a4
Split review instructions into per-reviewer files under .github/instr…
Copilot e4eedea
Apply suggestions from code review
mofojed a4a11aa
docs: clarify copilot review pass execution
Copilot 19c31b3
Apply suggestions from code review
mofojed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Copilot Instructions for `deephaven-plugins` | ||
|
|
||
| See [`AGENTS.md`](../AGENTS.md) for environment setup, available skills, build/test commands, and repo conventions. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Copilot Code Review Instructions for `deephaven-plugins` | ||
|
|
||
| ## Repository context | ||
|
|
||
| - Use `AGENTS.md` as the authoritative source for repository setup, build/test commands, and validation workflow. | ||
| - Do not duplicate `AGENTS.md` guidance in review comments; apply it. | ||
|
|
||
| ## Code review workflow | ||
|
|
||
| Treat code review as a multi-pass workflow and only comment when you find a concrete, actionable issue. | ||
| These "passes" describe a review process (specialized lenses), not a hard requirement to spawn separate runtime agents for each pass. | ||
| When a PR opens, execute this checklist in order within the review session: load `AGENTS.md`, map changed files to relevant instruction files, run only applicable passes, then publish consolidated high-signal findings. | ||
|
|
||
| Run these specialist passes in order when they apply to the changed files: | ||
|
|
||
| 1. **Systems architect**: check whether the PR fits the existing plugin architecture (Python server plugin ↔ JS client plugin boundary), abstraction level, and data flow. | ||
| 2. **UI/UX reviewer**: for UI changes, check labels, colour variables, accessibility, and SCSS token usage. | ||
| 3. **Code quality reviewer**: check maintainability, consistency with nearby patterns, error handling, and clean scoping. | ||
| 4. **Test reviewer**: for behaviour changes, verify that the right unit and/or e2e coverage exists and that CI checks pass. | ||
|
|
||
| Skip passes that do not apply to the touched files rather than forcing generic feedback. | ||
| Prefer a few high-signal findings over many style comments. | ||
|
|
||
| Use the specialized instruction files in `.github/instructions/` to deepen each pass: | ||
|
|
||
| - `architecture.instructions.md` | ||
| - `ui-ux.instructions.md` | ||
| - `code-quality.instructions.md` | ||
| - `tests.instructions.md` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| applyTo: | ||
| - "plugins/**/*.ts" | ||
| - "plugins/**/*.tsx" | ||
| - "plugins/**/*.js" | ||
| - "plugins/**/*.jsx" | ||
| - "plugins/**/*.py" | ||
| - "tools/**/*.py" | ||
| - ".github/workflows/**/*.yml" | ||
|
mofojed marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| # Systems architect review | ||
|
|
||
| - Review the PR as a systems architect before reviewing details. | ||
| - Check that changes fit the plugin model: Python server plugins implement `Registration.register_into(...)` and register their JS counterparts via `create_js_plugin(...)` (often wrapped by `DheSafeCallbackWrapper`) — keep communication across the standard message-passing boundary and do not bypass it. | ||
| - Flag changes that introduce cross-plugin dependencies that should instead go through a shared utility or the established extension points. | ||
| - New abstractions should be justified; prefer extending existing patterns (hooks, utilities, plugin base classes) over adding new layers. | ||
| - For Python changes, ensure the public API surface is consistent with the rest of the plugin and that internal details are not unnecessarily exposed. | ||
| - For JS changes, ensure module boundaries within a plugin (`src/js/`) are clean and that nothing is re-exported that should stay internal. | ||
| - For workflow or tooling changes, verify that the validation order still makes sense: `source .venv/bin/activate`, `pre-commit run --all-files`, `npm run build`, `npm run test:ci`. | ||
| - Only raise architecture comments when the issue would make the design harder to extend, harder to reason about, or inconsistent with the existing plugin model. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| applyTo: | ||
| - "plugins/**/*.ts" | ||
| - "plugins/**/*.tsx" | ||
| - "plugins/**/*.js" | ||
| - "plugins/**/*.jsx" | ||
| - "plugins/**/*.py" | ||
| --- | ||
|
mofojed marked this conversation as resolved.
mofojed marked this conversation as resolved.
|
||
|
|
||
| # Code quality review | ||
|
|
||
| - Review changed source as a code quality specialist. | ||
| - Check that the change matches established patterns in the same plugin before recommending a new abstraction. | ||
| - Prefer focused functions/components, descriptive names, and clear data flow over clever or overly dense logic. | ||
| - Flag copy/pasted logic when an existing utility, hook, or component would be a better fit. | ||
| - Check for maintainable error handling and cleanup, especially around async code, event listeners, and subscriptions. | ||
| - In TypeScript/React code, ensure types are correct and precise — avoid unnecessary `any` or unsafe casts; prefer patterns already used nearby for hooks, props, and state ownership. | ||
| - In Python code, ensure types are consistent with the rest of the plugin and that Pyright would accept them (`pre-commit run --all-files` runs Pyright). | ||
| - Avoid nitpicks about formatting or trivial style unless they hide a real maintenance problem. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| --- | ||
| applyTo: | ||
| - "plugins/**/*.ts" | ||
| - "plugins/**/*.tsx" | ||
| - "plugins/**/*.js" | ||
| - "plugins/**/*.jsx" | ||
| - "plugins/**/*.py" | ||
| - "plugins/**/*.test.ts" | ||
| - "plugins/**/*.test.tsx" | ||
| - "plugins/**/*.test.js" | ||
| - "plugins/**/*.test.jsx" | ||
| - "plugins/**/*.spec.ts" | ||
| - "plugins/**/*.spec.tsx" | ||
| - "plugins/**/*.spec.js" | ||
| - "plugins/**/*.spec.jsx" | ||
| - "plugins/**/test_*.py" | ||
| - "tests/**/*" | ||
| - "jest*.js" | ||
| - "jest*.cjs" | ||
| - "jest*.mjs" | ||
| - "playwright*.config.ts" | ||
|
mofojed marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| # Test review | ||
|
|
||
| - Review the PR as a test specialist whenever behaviour changes, bugs are fixed, or logic is added. | ||
| - Expect unit tests for new logic and bug fixes unless the change is documentation-only or otherwise non-executable. | ||
| - For user-visible workflow changes, consider whether Playwright e2e coverage should also be added or updated (`tests/` directory). | ||
| - Check that tests exercise the intended behaviour, not just implementation details or coverage counts. | ||
| - Prefer targeted tests close to the changed plugin; only reach for e2e tests when the behaviour is truly end-to-end. | ||
| - Remember the repository validation order: | ||
| - `source .venv/bin/activate` | ||
| - `pre-commit run --all-files` (Black, Pyright, Ruff, blacken-docs) | ||
| - `npm run build && npm run test:ci` (JS unit + lint) | ||
| - `cd plugins/<plugin> && tox -e py3.12` (Python unit, when `tox.ini` exists) | ||
| - `npm run e2e:docker -- ./tests/<file>.spec.ts --reporter=list` (e2e, requires Docker) | ||
| - Comment when coverage is missing, mis-scoped, or unvalidated — not simply because additional tests could theoretically exist. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| applyTo: | ||
| - "plugins/**/*.tsx" | ||
| - "plugins/**/*.jsx" | ||
| - "plugins/**/*.scss" | ||
| - "plugins/**/*.css" | ||
| --- | ||
|
mofojed marked this conversation as resolved.
mofojed marked this conversation as resolved.
|
||
|
|
||
| # UI/UX review | ||
|
|
||
| - Review UI-facing changes as a UI/UX specialist. | ||
| - Check that button labels, menu items, empty states, and dialogs are clear, specific, and consistent with the rest of the UI. | ||
| - In SCSS, prefer existing colour variables/tokens (e.g., `var(--dh-color-*)`) over hard-coded colours, spacing, or typography values. | ||
| - Prefer existing shared components and patterns over introducing one-off UI elements. | ||
| - Ensure interactive elements are accessible: keyboard reachable, properly labelled (aria attributes where needed), and not dependent on colour alone. | ||
| - Are loading, empty, and error states handled gracefully and communicated to the user? | ||
| - Is the interaction model intuitive — are affordances obvious, are destructive actions confirmed? | ||
| - Do not leave generic style feedback; focus on usability, accessibility, design-system consistency, and maintainable styling. | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot will you actually spawn multiple agents to do specialized reviews? Or give more details on how you'll process these instructions when a PR is opened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I clarified this in
.github/copilot-review-instructions.mdin commita4a11aaa: the four passes are a structured review process (specialized lenses), not a strict requirement to spawn separate runtime agents. I also documented the exact PR-open flow: loadAGENTS.md, map changed files to the relevant instruction files, run only applicable passes in order, then publish one consolidated set of high-signal findings.