Skip to content

Conversation

hicklin
Copy link
Contributor

@hicklin hicklin commented Oct 16, 2025

Adds documentation describing the different implementation and usage pattern types used for Matter clusters. Provides a summary table of the patterns supported/required for all non-provisional Matter 1.3 clusters.

This documentation has been added to the docs directory for the time being. It is expected that this documentation will later make it to the book described in the main README.

Copy link
Contributor

Summary of Changes

Hello @hicklin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the rs-matter SDK's documentation by introducing a detailed guide on Matter cluster implementation patterns. It categorizes cluster handling into four distinct approaches—Simple, Implemented, Hooks-Based, and Coupled Handlers—each tailored to different levels of complexity and interdependency. The documentation provides clear guidance for both SDK contributors and consumers on when and how to apply these patterns, supported by code examples and UML diagrams. Additionally, it includes a comprehensive table summarizing pattern support across Matter v1.3 clusters, improving clarity and ease of use for developers working with the SDK.

Highlights

  • New Documentation for Matter Cluster Patterns: Introduces a new document detailing different implementation and usage patterns for Matter clusters within the rs-matter SDK.
  • Defined Implementation Patterns: Describes four distinct patterns: Simple Handler (A), Implemented Handler (B), Hooks-Based Handler (B1), and Coupled Clusters (C), outlining their characteristics, implementation, and usage.
  • Comprehensive Cluster Support Table: Provides a summary table indicating which patterns are supported or required for various non-provisional Matter 1.3 clusters.
  • README Update: The README.md has been updated to include a link to the newly added docs directory, making the new documentation easily discoverable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds valuable documentation on Matter cluster implementation patterns. The document is well-structured and provides useful examples. I've found a few issues, mainly typos and some errors in the code snippets that could confuse users. Additionally, the UML diagram images referenced in the document are missing. Addressing these points will greatly improve the quality and clarity of the documentation.

Copy link

PR #331: Size comparison from b4bfd38 to ddd3b79

Full report (3 builds for linux)
platform target config section b4bfd38 ddd3b79 change % change
linux dimmable_light rs-matter FLASH 2236232 2236232 0 0.0
RAM 42776 42776 0 0.0
onoff-light rs-matter FLASH 2137800 2137800 0 0.0
RAM 42760 42760 0 0.0
speaker rs-matter FLASH 2209256 2209256 0 0.0
RAM 5528 5528 0 0.0

@hicklin hicklin force-pushed the document_cluster_patterns branch from ddd3b79 to 824d6d0 Compare October 16, 2025 09:25
@hicklin hicklin requested a review from ivmarkov October 16, 2025 09:27
Copy link

PR #331: Size comparison from b4bfd38 to 824d6d0

Full report (3 builds for linux)
platform target config section b4bfd38 824d6d0 change % change
linux dimmable_light rs-matter FLASH 2236232 2236232 0 0.0
RAM 42776 42776 0 0.0
onoff-light rs-matter FLASH 2137800 2137800 0 0.0
RAM 42760 42760 0 0.0
speaker rs-matter FLASH 2209256 2209256 0 0.0
RAM 5528 5528 0 0.0

Copy link
Contributor

@ivmarkov ivmarkov left a comment

Choose a reason for hiding this comment

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

Some nits here and there but overall - great content!

@hicklin hicklin requested a review from ivmarkov October 19, 2025 17:47
@ivmarkov ivmarkov force-pushed the document_cluster_patterns branch from 4d8811f to 85e12d9 Compare October 19, 2025 19:25
Copy link

PR #331: Size comparison from d8463db to 85e12d9

Full report (8 builds for dimmable-light, onoff-light, onoff-light-bt, rs-matter-core, speaker)
platform target config section d8463db 85e12d9 change % change
dimmable-light infologs-optz-ltofat x86_64-unknown-linux-gnu FLASH 1942176 1941984 -192 -0.0
RAM 42720 42720 0 0.0
onoff-light infologs-optz-ltofat x86_64-unknown-linux-gnu FLASH 1852688 1852496 -192 -0.0
RAM 42704 42704 0 0.0
onoff-light-bt infologs-optz-ltofat x86_64-unknown-linux-gnu FLASH 3207768 3207584 -184 -0.0
RAM 9308 9308 0 0.0
rs-matter-core infodefmt-optz-ltofat riscv32imac-unknown-none-elf FLASH 390438 390428 -10 -0.0
RAM 68952 68952 0 0.0
thumbv6m-none-eabi FLASH 325992 325984 -8 -0.0
RAM 65348 65348 0 0.0
thumbv7em-none-eabi FLASH 301396 301376 -20 -0.0
RAM 64836 64836 0 0.0
infologs-optz-ltofat x86_64-unknown-linux-gnu FLASH 840647 840687 40 0.0
RAM 73634 73634 0 0.0
speaker infologs-optz-ltofat x86_64-unknown-linux-gnu FLASH 1912880 1912704 -176 -0.0
RAM 5480 5480 0 0.0

@hicklin hicklin merged commit e14f27a into project-chip:main Oct 20, 2025
12 checks passed
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