Skip to content

Commit 469ea68

Browse files
avoid direct class styling in prompt
1 parent dbd1b81 commit 469ea68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/app/prompts.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@
147147
148148
Ensure that your diagram adheres strictly to the given explanation, without adding or omitting any significant components or relationships.
149149
150-
Important notes:
150+
Important notes on syntax:
151151
- In Mermaid.js syntax, we cannot include slashes without being inside quotes. For example: `EX[/api/process]:::api` is a syntax error but `EX["/api/process"]:::api` is valid.
152+
- In Mermaid.js syntax, you cannot apply a class style directly within a subgraph declaration. For example: `subgraph "Frontend Layer":::frontend` is a syntax error. However, you can apply them to nodes within the subgraph. For example: `Example["Example Node"]:::frontend}` is valid, and `class Example frontend` is valid.
152153
"""
153154
# ^^^ note: ive generated a few diagrams now and claude still writes incorrect mermaid code sometimes. in the future, refer to those generated diagrams and add important instructions to the prompt above to avoid those mistakes. examples are best.
154155

0 commit comments

Comments
 (0)