feat(mermaid): integrate MCP style guide with local precedence

This commit is contained in:
Aishanee Shah
2026-04-15 18:06:46 +00:00
parent 043d61063e
commit 184fde1e8c
3 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -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 `<known_context>` 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 `<known_context>` 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.
+8
View File
@@ -7,5 +7,13 @@
},
"general": {
"devtools": true
},
"mcpServers": {
"mermaid-guide": {
"command": "node",
"args": [
"/usr/local/google/home/aishaneeshah/mcp-mermaid-guide/index.mjs"
]
}
}
}
+5 -1
View File
@@ -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.