{
“markdown”: ”# Patterns\n- Config Isolation: Excluding environment-specific or locally managed plugin directories (e.g., quartz/local-plugins) from global linter/Prettier targets.\n- Data Sanitization: Using Unicode regex mapping functions (mapFn) to strip unwanted characters like emojis from UI components (e.g., Quartz Explorer).\n- State Management: Leveraging AsyncLocalStorage in Node/Bun for telemetry context propagation alongside safe lazy dynamic imports.\n\n# Anti-patterns\n- Signal Handler Overlap: Allowing signal handlers to clash when co-locating asynchronous frameworks (e.g., Uvicorn and Discord.py).\n- Unescaped Diagram Labels: Leaving Mermaid edge labels unescaped in markdown environments (like Quartz), which causes rendering failures.\n- Non-PTY Troubleshooting: Executing interactive or environment-sensitive troubleshooting commands (like omp commands) without a real PTY.\n\n# Best Practices\n- Telemetry: Propagate context safely using Node/Bun AsyncLocalStorage and lazy dynamic imports.\n- Process Management: Co-locate Uvicorn and Discord.py by explicitly ensuring they do not have overlapping signal handlers.\n- Diagram Syntax: Always escape Mermaid edge labels with double quotes in Quartz markdown.\n- Command Execution: Run omp troubleshooting commands strictly under a real PTY.\n- Workspace Hygiene: Exclude local plugins (quartz/local-plugins) from linter/Prettier configs to prevent formatting conflicts.\n- UI Formatting: Strip emojis from Quartz Explorer using a Unicode regex mapFn for consistent display.”
}