| name | sysml-view-doc-sync |
| description | After SysML structure/behaviour changes: align projects/<name>/outputs/*.md (system design, interconnection, behaviour) and optional Mermaid; use SysML v2 MCP preview for BDD/IBD checks—not visualizeFile unless user asks. Preserve de facto alignment: markdown must use the same port names and site conventions as deploy (see sysml-traceability/references/de-facto-modeling.md). Interconnection Mermaid: layered topology, short edge labels + legend, one diagram per intent—see references/interconnection-mermaid.md. Commissioning / plant-setup flows: prefer outputs/diagrams/ (e.g. plant-setup-flow.md) from behaviour + requirements. Triggers: sync doc to model, update outputs from deploy, diagram from sysml, IBD markdown, plant-setup flow diagram, operator-facing wiring table. |
| metadata | {"pattern":"pipeline","pairs_with":["mcp-sysml-v2","mermaid","mmdc","sysml-connections","sysml-behaviour-generator","project-output-article","system-design-report-generator"]} |
| token_guardrails | - Model is source of truth; do not invent structure only in .md.
- Obey mcp-sysml-v2 references/cursor-mcp-rules.md for preview vs visualizeFile.
- For interconnection flowcharts: follow references/interconnection-mermaid.md; prefer short Mermaid; validate with mmdc when user wants rendered assets or CI checks diagrams.
- Submodule / canonical repo: [project-in-another-repo.mdc](../../../.cursor/rules/project-in-another-repo.mdc), [DOCS_INDEX.md](../../../docs/DOCS_INDEX.md). MBSE vs implementation: [AGENTS.md](../../../AGENTS.md) scope table.
- `outputs/*.md` are for human reading: keep prose short, precise, and non-redundant. Use tables or bullets for dense wiring detail instead of long paragraphs.
- **UTF-8 encoding:** All `.md` files must be saved as UTF-8 (no BOM, no mixed encoding). When syncing from model, preserve UTF-8 throughout. If editing `.md` in an editor, ensure UTF-8 is the output encoding.
- After substantive .sysml changes: run sysml-modeling-workflow step 6 (MemNet delta + line refresh).
- Before multi-file refactor: pin_map(TSK_model_*).
- **Special character sanitization:** When merging or exporting `.md` files, replace Unicode special chars with ASCII to prevent Mermaid parser errors:
- En-dash `–` → hyphen `-`
- Em-dash `—` → hyphen `-`
- Right arrow → keep as `->` (ASCII)
- Double arrow `↔` → `<->`
- Multiplication `×` → `x`
- Section symbol `§` → `s.`
- **Mermaid parser safety:** Validate merged `.md` files with `mmdc` before publication; if parse error occurs in a diagram with labels, sanitize Unicode chars in labels first.
|
system_instruction: |
Prefer plain Markdown tables or domain wire; do not use TOON/TRON. JSON only at tool boundaries.
SysML view & doc sync
When: User updated .sysml and outputs/*.md, diagrams, or HTML exports should match the model.
This skill should help the report read cleanly, not just stay mechanically synced.
Pairing: For long-form outputs/*.md structure, TOC, and section order, see project-output-article (references PROJECT_OUTPUT_ARTICLE_STANDARD.md). For split system design packs (hub + section files), see system-design-report-generator — sync every section file after deploy edits; then run report MemNet delta (@ART/@SEC/@CLM) per memnet-report-pipeline.md when serve is up.
Interconnection / IBD-style Mermaid: See sysml-interconnection-mermaid (canonical pipeline) and references/interconnection-mermaid.md (layout quick ref). Repo-wide prose rules: repo-mermaid-rules.
Pipeline
-
Identify outputs — projects/<name>/outputs/ — which .md (or system-design-report/ hub + *.md sections) reference deploy part names, connections, states (see project README or DOCS_INDEX). For packs, read hub llm_toc first, then the section file you need.
-
Diff narrative — Update sections: architecture, part tree, connection summary, behaviour states, ( or pack equivalent -- parent/child requirementIds + satisfy) — grep/read of deploy, behaviour, and requirements files, not from memory. Copy qualified port paths from deploy for tables (de facto wiring).
Keep prose terse and factual; avoid repeating port lists in multiple paragraphs when one table or caption suffices.