Skip to content

skills: add mz-console-review for reviewing Console PRs - #39880

Merged
leedqin merged 4 commits into
MaterializeInc:mainfrom
leedqin:mz-console-review-skill
Oct 22, 2026
Merged

leedqin merged 4 commits into
MaterializeInc:mainfrom
leedqin:mz-console-review-skill

Conversation

@leedqin

@leedqin leedqin commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

mz-pr-review's checklists are Rust-specific, so agents reviewing a Console (console/) PR had nothing that encodes how Console code is actually reviewed. They fall back to generic React advice and miss the repo's own helpers, catalog quirks, and conventions.

Description

Adds .agents/skills/mz-console-review, a review skill for diffs under console/:

  • Checklist (section 4) distilled from roughly 570 human review comments on about 150 Console PRs from 2025 and 2026, ordered by how often each kind of feedback came up: remove and simplify, SQL and catalog correctness, reuse of existing helpers (a table mapping re-rolled code to the helper that already exists), tests, types, naming, comments, loading and error states, data layer, routing, versions and flags, visual QA, security traps, and charts.
  • Workflow: check the PR's files into a tree to run them, verify every behavioral claim by executing it before writing it down, read the PR description before the code, triage findings with the person you review for, then post one GitHub review and re-review from the last reviewed SHA.
  • cost-and-structure.md: deeper checks a read of the diff misses, loaded only when the diff touches a query, poll, subscribe, hot interaction, or hooks. Covers mz_catalog_server cost (EXPLAIN with the Console's session settings, index use, per-viewer subscribe and poll cost) and render-count probes. Kept separate so SKILL.md stays under the 500-line skill guideline.

Smaller changes:

  • mz-pr-review's description points Console changes at the new skill, since both otherwise match "review my PR".
  • The skills README gains a Console section listing the new skill and mz-query-perf, which had no README entry.

console/AGENTS.md (which console/CLAUDE.md links to) told agents to use useSqlLazy for imperative calls and listed the useSql* hooks as the data-fetching API. New code uses react-query useQuery / useMutation, so its "useSql Hooks" section is now "React Query", with the read and write pattern and examples from platform/clusters/queries.ts, and the useSql* hooks are marked legacy. The skill points at that section instead of restating it.

Verification

Every file path and exported symbol the skill cites was checked against main. Helpers that exist but are module-private are flagged as "export it" rather than "reuse it". The checkout and cleanup commands in section 1 were run against a scratch repo with both added and modified files. The whitespace, copyright, and Slack-link lints pass.

🤖 Generated with Claude Code

mz-pr-review's checklists are Rust-specific, so Console PRs had no review
skill. mz-console-review encodes what Console reviewers flag in practice,
distilled from roughly 570 review comments on about 150 Console PRs and
ordered by frequency: removal and simplification, SQL and catalog
correctness, reuse of existing helpers, tests, types, naming, loading and
error states, data layer, routing, versions and flags, visual QA, and
charts. It also covers running the change to verify claims before
writing them, catalog_server cost and render-performance probes (in
cost-and-structure.md), comment voice, and posting findings as a single
GitHub review.

Every cited path and symbol was checked against main. mz-pr-review's
description now points Console changes at the new skill, and the skills
README gains a Console section listing it alongside mz-query-perf.
console/AGENTS.md told agents to use useSqlLazy for imperative calls and
listed the useSql* hooks as the data-fetching API. New code uses react-query
useQuery and useMutation instead, so the doc now describes that pattern with
examples from platform/clusters/queries.ts and marks the useSql* hooks as
legacy. mz-console-review points at that section instead of restating it.
@leedqin
leedqin requested a review from a team as a code owner October 15, 2026 20:58
@leedqin
leedqin requested review from Alphadelta14, SangJunBak, bosconi and jdonelson and removed request for Alphadelta14 October 15, 2026 20:58
Co-authored-by: Jeremy Donelson <jeremy.donelson@gmail.com>
@leedqin
leedqin enabled auto-merge (squash) October 16, 2026 17:53
@leedqin
leedqin merged commit d04de44 into MaterializeInc:main Oct 22, 2026
77 checks passed
@leedqin leedqin added the A-CONSOLE Area: Console label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CONSOLE Area: Console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants