rmc-architecture-rules

Enforce declarative Rust crate-edge dependency rules and return structured violation JSON.

29|5|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-architecture-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rmc-architecture-rules
Source: https://github.com/molaco/rust-code-mcp/tree/main/skills/rmc-architecture-rules
Command: npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-architecture-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforcing architectural layering and dependency rules across a Rust workspace so layering breaks are detected early and made actionable.

Core Features & Use Cases

  • Declarative crate-edge rules: Define producer/consumer constraints using glob-style crate-name patterns with optional per-rule severity and custom messages.
  • CI-friendly violation reporting: Returns concrete violation rows (one per matching rule × edge) with sample symbols and reference counts so teams can triage quickly.
  • Workspace-wide scope: Runs over crate-level crate_edges after building the persisted hypergraph, enabling consistent enforcement across many crates.
  • Triaging support loop: Pairs well with follow-up symbol/file inspection tools to confirm legitimacy or fix the layering break.

Quick Start

Run the forbidden dependency check for your workspace by building the hypergraph first, then provide your rule list to forbidden_dependency_check(directory=..., rules=[...]) to get pass/fail violations.

Frequently Asked Questions about rmc-architecture-rules

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

FAQPage Schema
How do I enforce architectural layering rules in a Rust workspace?

Rust crate dependency analysis for CI checks detects forbidden producer-to-consumer relationships by building a workspace hypergraph and filtering crate-level edges. It returns structured violation JSON with sample symbols and reference counts for rapid triage.

How do I check for forbidden crate dependencies in a Rust CI pipeline?

You can check for forbidden crate dependencies in a Rust CI pipeline by running a forbidden dependency check that outputs structured violation rows. The check provides concrete pass or fail data with sample symbols and reference counts so teams can triage quickly.

Can I use glob patterns to define crate-edge dependency rules?

Yes, you can use glob-style crate-name patterns to define producer and consumer constraints for crate-edge dependency rules. You can also assign optional per-rule severity levels and custom messages to tailor the architectural layering audit to your specific needs.

What is a workspace hypergraph used for in Rust static analysis?

A workspace hypergraph in Rust static analysis is used to map and persist crate-level edges across a multi-crate repository. Building this hypergraph is a required step before filtering edges against your declarative dependency rules to find architectural violations.

How do I troubleshoot Rust crate layering violations detected by static analysis?

To troubleshoot Rust crate layering violations detected by static analysis, you review the structured violation JSON containing matching rules, sample symbols, and reference counts. You then pair this triage data with follow-up symbol or file inspection tools to confirm and fix the layering break.