mz-adapter-guide

Guides development and review of Materialize adapter, coordinator, pgwire, and timestamp oracle code.

6.4k|512|Updated Feb 22, 2019
One-click install
npx skills add https://github.com/MaterializeInc/materialize --skill mz-adapter-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mz-adapter-guide
Source: https://github.com/MaterializeInc/materialize/tree/main/.agents/skills/mz-adapter-guide
Command: npx skills add https://github.com/MaterializeInc/materialize --skill mz-adapter-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Engineers working on Materialize's adapter layer, coordinator, pgwire, peek paths, or timestamp oracle risk violating subtle correctness invariants or repeating optimizations that were already tried and rejected. This Skill ensures those invariants and architectural notes are read before writing or reviewing code in these subsystems.

Core Features & Use Cases

  • Correctness Invariant Enforcement: Directs the AI to read doc/developer/guide-adapter.md before making or reviewing changes to src/adapter/, src/pgwire/, and related crates.
  • Timestamp Oracle Guidance: Points to module-level docs in src/timestamp-oracle/ covering the TimestampOracle trait contract and batching/linearizability invariants.
  • Knowledge Capture: When an approach turns out to be wrong, the Skill prompts distilling the lesson back into the developer guide so pitfalls are not rediscovered.
  • Use Case: While reviewing a PR that touches src/adapter/src/coord.rs, the Skill loads the adapter guide so the reviewer checks the change against documented correctness invariants and the review checklist.

Quick Start

Ask the assistant to explain how the coordinator handles read holds or to review a diff touching src/adapter/, and it will consult the adapter guide first.

Frequently Asked Questions about mz-adapter-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the Materialize coordinator work?

The coordinator lives in src/adapter/ and manages query planning, sequencing, and peek paths. This Skill directs you to doc/developer/guide-adapter.md, which documents its architecture, correctness invariants, and how timestamp selection and read holds interact with it.

What are read holds in Materialize?

Read holds prevent compaction of data past timestamps that in-flight queries still need to read. The adapter guide explains how they are acquired and released, and why mishandling them causes queries to block or return incorrect results.

How do I review a PR that touches src/adapter/?

Read doc/developer/guide-adapter.md first; it contains a review checklist plus a list of optimizations previously tried and rejected for correctness reasons. Check the diff against the documented invariants before approving.

Why does my Materialize query block?

Blocking usually relates to timestamp selection or read holds in the peek path. The adapter guide documents these interactions, and the timestamp oracle docs in src/timestamp-oracle/ explain the batching and linearizability invariants involved.

What invariants does the TimestampOracle trait enforce?

The TimestampOracle trait contract and its batching/linearizability invariants are documented in src/timestamp-oracle/src/lib.rs and batching_oracle.rs. This Skill ensures those module docs are read before modifying the oracle.