From 184fde1e8c5e643e9791f4d47a151a5a93556387 Mon Sep 17 00:00:00 2001 From: Aishanee Shah Date: Wed, 15 Apr 2026 18:06:46 +0000 Subject: [PATCH] feat(mermaid): integrate MCP style guide with local precedence --- .gemini/agents/visualizer.md | 6 +++++- .gemini/settings.json | 8 ++++++++ .gemini/skills/mermaid-diagrammer/SKILL.md | 6 +++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gemini/agents/visualizer.md b/.gemini/agents/visualizer.md index 4cb0dde31a..a3a6298e86 100644 --- a/.gemini/agents/visualizer.md +++ b/.gemini/agents/visualizer.md @@ -16,6 +16,7 @@ tools: - read_file - activate_skill - replace + - mcp_mermaid-guide_get_mermaid_style_guide model: inherit max_turns: 30 --- @@ -52,7 +53,10 @@ You must execute your tasks following a strict, sequential three-phase pipeline: ## Phase 1: Explore & Verify -1. **Activate Skill:** When asked to generate a diagram, you MUST first call `activate_skill` with `skill_name: "mermaid-diagrammer"` to load the specialized syntax rules and conversion scripts. +1. **Activate Skill & Style Guide:** When asked to generate a diagram, you MUST: + - Call `activate_skill` with `skill_name: "mermaid-diagrammer"` to load scripts. + - Read `references/mermaid_syntax.md` within the skill directory; this local file is the primary source of truth for syntax and styling. + - Call `mcp_mermaid-guide_get_mermaid_style_guide` for supplemental organizational best practices. 2. **Evaluate Payload:** Before writing any diagram syntax, evaluate the payload provided by the orchestrator: - **If `` is provided:** Do NOT perform a full repository scan. Instead, use targeted commands (like `read_file` or `grep_search`) to quickly verify that the components, interactions, and files listed in the context actually exist in the code. If they do, use them to build the diagram. - **If `` is missing or insufficient:** You must assume total ownership. Proactively explore the filesystem using `list_directory` and `grep_search` to map the architecture from scratch. diff --git a/.gemini/settings.json b/.gemini/settings.json index cd0e72ecb5..21a3bbd1b2 100644 --- a/.gemini/settings.json +++ b/.gemini/settings.json @@ -7,5 +7,13 @@ }, "general": { "devtools": true + }, + "mcpServers": { + "mermaid-guide": { + "command": "node", + "args": [ + "/usr/local/google/home/aishaneeshah/mcp-mermaid-guide/index.mjs" + ] + } } } diff --git a/.gemini/skills/mermaid-diagrammer/SKILL.md b/.gemini/skills/mermaid-diagrammer/SKILL.md index 446a273e77..1caa30d69a 100644 --- a/.gemini/skills/mermaid-diagrammer/SKILL.md +++ b/.gemini/skills/mermaid-diagrammer/SKILL.md @@ -10,7 +10,11 @@ This skill enables the creation of professional Mermaid diagrams and their conve ## Workflow ### 1. Create Mermaid Diagram -Select the appropriate diagram type based on the task. You MUST read `references/mermaid_syntax.md` to understand the required syntax rules and templates before creating any diagram. +Select the appropriate diagram type based on the task. + +**Standard Operating Procedure (Precedence):** +1. **Local Standards:** You MUST first read `references/mermaid_syntax.md`. This local file contains project-specific syntax templates and takes absolute precedence. +2. **Supplemental Standards:** Call `mcp_mermaid-guide_get_mermaid_style_guide` to retrieve broader organization standards. Use these only if they do not contradict the local file. **Handling Existing Diagrams / Inputs:** - **If provided as a `.mmd` file:** Use `read_file` to examine the content and apply edits directly.