Windsurf rules
.windsurf/rules/graphs.mdWindsurf rules
Quality
55/100
Scores the file, not the repository.Length
420 words
6 headings · 0 code blocksRepository
0
— · pushed 392 days agoLast changed
3 days ago
First indexed 3 days ago.12345# Graph Rules67These rules govern the construction and management of graph workflows within the LangGraph project. The purpose is to ensure that graphs are structured correctly, maintain logical flow, and adhere to best practices for conversational agent interactions.89## Rule 1: Mandatory Entry Node10- **Description**: All graph workflows must include an entry node to process initial user input. This node is responsible for initializing the conversation state and ensuring that user input is captured correctly.11- **Rationale**: The entry node sets the foundation for the conversation flow, as seen in 'src/agent/graph.ts' where the 'entryNode' function processes the initial user input into the state.12- **Enforcement**: During graph design or updates, verify that an 'entry' node is defined and connected to the START point.1314## Rule 2: Conditional Routing Logic15- **Description**: Graphs must implement conditional routing logic to determine the next node based on the state or supervisor decisions. This ensures dynamic conversation flow.16- **Rationale**: In 'src/agent/graph.ts', the 'routeMessages' function uses state.next to decide whether to proceed to a chat node or end the conversation, demonstrating the importance of conditional edges.17- **Enforcement**: Ensure that conditional edges are defined for supervisor nodes to route to appropriate nodes or END.1819## Rule 3: Node Error Handling20- **Description**: Each node in the graph must include error handling to manage model invocation failures or unexpected issues during processing.21- **Rationale**: Error handling is critical for robustness, as shown in 'src/agent/graph.ts' where 'safeModelInvoke' and 'handleGlobalError' are used to catch and manage errors during model calls.22- **Enforcement**: Include try-catch blocks or error handling mechanisms in node implementations.2324## Rule 4: Logging for Node Transitions25- **Description**: Log transitions between nodes to track the flow of conversation and aid in debugging graph execution.26- **Rationale**: Logging is implemented in 'src/agent/graph.ts' for chat and entry nodes to monitor processing, which is essential for understanding graph behavior.27- **Enforcement**: Add logging statements at the start and end of each node's processing logic.2829## Rule 5: Termination Conditions30- **Description**: Define clear termination conditions within the graph to prevent infinite loops and ensure conversations can conclude appropriately.31- **Rationale**: The 'routeMessages' function in 'src/agent/graph.ts' checks for 'FINISH' or 'END' to route to END, providing a clear exit path.32- **Enforcement**: Verify that routing logic includes checks for termination signals or states.3334These rules are designed to maintain the integrity and efficiency of graph-based workflows in LangGraph, ensuring that conversational agents operate smoothly and reliably. Review these during graph design and updates to ensure compliance.35
Also in ssdeanx/langgraph-dm
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ssdeanx/langgraph-dm.clinerules/memory.md · 0 | Cline rules | styleperformance | 43/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/agents.md · 0 | Cline rules | typesagent-behaviour | 44/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/development_guidelines.md · 0 | Cline rules | setupbuildtestlint-format+3 | 83/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/docs-technical-style.md · 0 | Cline rules | setuplint-formatstyledocs | 53/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/langgraphjs.md · 0 | Cline rules | arch | 52/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/project_overview.md · 0 | Cline rules | testlint-formatstylearch | 75/100 | 3 days ago | |
| ssdeanx/langgraph-dm.clinerules/subgraphs.md · 0 | Cline rules | agent-behaviour | 48/100 | 3 days ago | |
| ssdeanx/langgraph-dm.github/copilot-instructions.md · 0 | Copilot instructions | setupsecuritydeploymentdo-not+2 | 57/100 | 3 days ago | |
| ssdeanx/langgraph-dm.windsurf/rules/langsmith.md · 0 | Windsurf rules | do-notagent-behaviour | 55/100 | 3 days ago |
Diff against .clinerules/memory.md Diff against .clinerules/agents.md Diff against .clinerules/development_guidelines.md Diff against .clinerules/docs-technical-style.md Diff against .clinerules/langgraphjs.md Diff against .clinerules/project_overview.md Diff against .clinerules/subgraphs.md Diff against .github/copilot-instructions.md Diff against .windsurf/rules/langsmith.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.windsurf/rules/guard-git.md · 119 | Windsurf rules | stylearchgitsecurity+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/organize-workspace.md · 119 | Windsurf rules | buildstylegitdeployment+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/quick-fix.md · 119 | Windsurf rules | teststylegitdeployment+1 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/develop-tdd.md · 119 | Windsurf rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/commit-message.md · 119 | Windsurf rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/extract-design.md · 119 | Windsurf rules | lint-formatstyledependenciesui | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/session-state.md · 119 | Windsurf rules | lint-formatstyleagent-behaviour | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.windsurf/rules/setup-environment.md · 119 | Windsurf rules | setupstylesecuritydo-not+1 | 81/100 | 3 days ago |
