Skip to content

docs(capability-matrix): add Mermaid diagram guidance to the spec template - #337

Merged
grdsdev merged 1 commit into
mainfrom
claude/capability-matrix-diagram-specs-282d21
Nov 6, 2026
Merged

grdsdev merged 1 commit into
mainfrom
claude/capability-matrix-diagram-specs-282d21

Conversation

@grdsdev

@grdsdev grdsdev commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

What

  • packages/capability-matrix/specs/TEMPLATE.md: the ## Behavior comment now asks for a Mermaid diagram when the behavior is a flow, a sequence across capabilities, or a state machine. It names the diagram type for each case (sequenceDiagram, stateDiagram-v2, flowchart) and says to skip a diagram for a single request and response.
  • .claude/skills/capability-matrix/SKILL.md: a new "Diagrams" review check points to that rule.

Why

Prose alone is hard to follow for multi-step flows and state machines, such as session states or a reconnect loop. A diagram makes them easier to read and review.

Notes for reviewers

  • The rule lives only in the template. The skill points to it and does not repeat it, so the rule has one source.
  • The prose stays normative. The diagram only illustrates it, and the two must agree. A diagram follows the same snapshot and service rules as a sentence.
  • bun run validate passes.

…plate

Specs that describe a flow, a sequence across capabilities, or a state
machine now get a Mermaid diagram next to the prose it illustrates. The
rule lives only in specs/TEMPLATE.md; the capability-matrix skill points
reviewers to it.
@grdsdev
grdsdev requested a review from a team as a code owner November 6, 2026 08:53
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Updated spec-writing guidance to include Mermaid diagrams for multi-step flows, cross-capability sequences, and state machines.
    • Clarified diagram types, consistency with explanatory text, and when diagrams should be omitted.

The capability-matrix spec template adds guidance for when to use Mermaid diagrams, which diagram types to select, and how diagrams must agree with the Behavior prose. The review skill adds a Diagrams check that refers reviewers to this template guidance.

Possibly related PRs

  • supabase/sdk#316: Adds a session refresh spec with Mermaid flowcharts, which connects to this PR’s diagram guidance.

Change: Other

Merge Risk: Minimal · up to 5f94d

The change adds diagram authoring and review guidance; no merge-blocking risk is identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bda5d4ad-79f7-4e69-9d3e-9fce664972c4
Commits

Reviewing files that changed from the base of the PR and between e7754fe and 5f94dba.

Files selected for processing: 2

  • .claude/skills/capability-matrix/SKILL.md
  • packages/capability-matrix/specs/TEMPLATE.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@grdsdev
grdsdev merged commit cc5fa7f into main Nov 6, 2026
9 checks passed
@grdsdev
grdsdev deleted the claude/capability-matrix-diagram-specs-282d21 branch November 6, 2026 15:00
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.

4 participants