You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pattern-spec.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,45 @@ Patterns are organized into three main categories:
92
92
- Use realistic file paths and tool names
93
93
- Show both input and expected output where applicable
94
94
95
+
### Diagrams
96
+
Consider adding diagrams when the pattern would benefit from visual explanation:
97
+
98
+
**When to use diagrams:**
99
+
- Multi-step workflows or processes (use flowcharts)
100
+
- System interactions or data flow (use sequence diagrams)
101
+
- Component relationships or architecture (use component diagrams)
102
+
- State transitions or decision trees (use state diagrams)
103
+
- Timeline-based processes (use timeline or Gantt charts)
104
+
105
+
**Diagram guidelines:**
106
+
- Use Mermaid syntax for consistency and maintainability
107
+
- Place diagrams immediately after the pattern description, before Core Implementation
108
+
- Keep diagrams simple and focused on the core concept
109
+
- Label all components clearly with descriptive names
110
+
- Use consistent styling and colors within the same pattern
111
+
- Limit to 1-2 diagrams per pattern to maintain focus
112
+
113
+
**Mermaid diagram types to consider:**
114
+
```mermaid
115
+
# Flowchart for decision flows and processes
116
+
graph TD
117
+
A[Start] --> B{Decision}
118
+
B -->|Yes| C[Action 1]
119
+
B -->|No| D[Action 2]
120
+
121
+
# Sequence diagram for interactions over time
122
+
sequenceDiagram
123
+
participant User
124
+
participant AI
125
+
User->>AI: Request
126
+
AI->>User: Response
127
+
128
+
# Component diagram for system architecture
129
+
graph LR
130
+
A[Component A] --> B[Component B]
131
+
B --> C[Component C]
132
+
```
133
+
95
134
### Hyperlinks
96
135
- ALL pattern references MUST be hyperlinked using format: `[Pattern Name](#pattern-name-anchor)`
97
136
- This applies to: Reference table, Related Patterns sections, pattern mentions in descriptions, implementation examples, and any other pattern references
@@ -190,7 +229,10 @@ Before adding a new pattern, verify:
190
229
-[ ] Addresses specific, actionable problem
191
230
-[ ] Dependencies are clearly stated
192
231
-[ ] Example shows only the pattern's essence, not complete implementation
193
-
-[ ] References examples directory for detailed implementation
0 commit comments