RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/ssdeanx-langgraph-dm-clinerules-langgraphjs ↔ ssdeanx-langgraph-dm-windsurf-rules-langsmith

Comparison

A · Cline rules · ssdeanx/langgraph-dmB · Windsurf rules · ssdeanx/langgraph-dm
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0760%
Commands000—
Section tags0120%

What each file covers

Sections

0 shared · 7 only in A · 6 only in B
  • − LangGraph.js
  • − Overview
  • − Core Concepts
  • − Key Features
  • − Development Practices
  • − Deployment
  • − Relevant Files in this Project
  • + LangSmith Tracing & Console Rules
  • + Rule 1: Mandatory Logging for Agent Nodes
  • + Rule 2: Error Logging Standards
  • + Rule 3: Trace Agent Decision Paths
  • + Rule 4: Console Output for Key Events
  • + Rule 5: LangSmith Integration for Production

Commands

neither file has any

Section tags

0 shared · 1 only in A · 2 only in B
  • − architecture
  • + do-not
  • + agent-behaviour

Line diff

+24 added−39 removed11 unchanged22.0% identical
ssdeanx/langgraph-dm · .clinerules/langgraphjs.md
@@ −1 @@
1---
2glob: "**/*.ts"
3description: "Langgraphjs Architecture"
4---
5# LangGraph.js
6 
7## Overview
8 
9LangGraph.js is a powerful library for building stateful, multi-actor AI applications with Large Language Models (LLMs). It allows you to model complex agent workflows as graphs, where nodes represent individual steps or agents and edges define the flow of information and control.
10 
11## Core Concepts
 
 
 
12 
13* **StateGraph:** The primary class for defining graph-based workflows. It manages the shared state that is passed between nodes.
14* **Nodes:** Functions or runnable components that perform specific tasks and update the graph's state.
15* **Edges:** Define transitions between nodes, which can be unconditional or conditional based on the current state.
16* **State:** A shared data structure (`AgentState`) that represents the current context of the application, updated by nodes and passed along edges.
17* **Checkpoints:** Snapshots of the graph's state saved at various points, enabling persistence, debugging, and human-in-the-loop interactions.
18* **Subgraphs:** The ability to embed one graph as a node within another, promoting modularity and hierarchical design.
19* **Command Primitive:** A mechanism for combining state updates and dynamic control flow within a single node.
20* **Streaming:** First-class support for streaming intermediate results and LLM tokens, enhancing user experience.
21* **Human-in-the-Loop (HIL):** Features like `interrupt()` and breakpoints allow human intervention for approvals, state editing, and dynamic input.
22 
23## Key Features
 
 
 
24 
25* **Controllability:** Fine-grained control over the application's flow through explicit node and edge definitions.
26* **Persistence:** Built-in mechanisms for saving and restoring graph state, supporting long-running conversations and fault tolerance.
27* **Modularity:** Encourages breaking down complex problems into smaller, reusable components (nodes and subgraphs).
28* **Tool Integration:** Seamlessly integrates with LangChain tools, allowing agents to interact with external systems.
29* **Observability:** Integrates with LangSmith for tracing, debugging, and monitoring of LLM applications.
30 
31## Development Practices
 
 
 
32 
33* **TypeScript:** Strongly typed development for improved code quality and maintainability.
34* **Testing:** Encourages comprehensive unit and integration testing of nodes, agents, and overall graph workflows.
35* **Error Handling:** Robust error handling for tool calls and model invocations.
36 
37## Deployment
38 
39LangGraph.js applications can be deployed in various ways, including self-hosted solutions or through the LangGraph Platform (Cloud, BYOC). The LangGraph CLI and SDK provide tools for building, running, and interacting with deployed applications.
40 
41## Relevant Files in this Project
42 
43* `src/agent/graph.ts`: Defines the main `StateGraph` and its nodes/edges, orchestrating the agent workflow.
44* `src/agent/state.ts`: Defines the `AgentState` interface and `AgentAnnotation` for managing the application's state.
45* `src/agent/supervisor.ts`: Implements the supervisor agent for routing between specialized agents.
46* `src/agent/react_agent.ts`: Implements the ReAct (Reasoning and Acting) agent.
47* `src/memory/`: Contains implementations for memory management, including MongoDB integration for checkpoints and vector stores.
48* `src/tools/`: Houses various tools used by the agents (e.g., `calculator`, `document_processing`, `exa`, `github`, `local_git`, `tavily`, `web_scraping`).
49* `package.json`: Lists LangGraph and LangChain related dependencies.
50 
ssdeanx/langgraph-dm · .windsurf/rules/langsmith.md
@@ +1 @@
1---
2trigger: manual
 
3---
 
4 
5# LangSmith Tracing & Console Rules
6 
7These rules are designed to ensure effective tracing and debugging of agent interactions within the LangGraph project using LangSmith or similar console logging mechanisms. Proper logging and tracing are essential for monitoring the behavior of conversational agents and diagnosing issues in the graph workflow.
8 
9## Rule 1: Mandatory Logging for Agent Nodes
10- **Description**: All agent nodes must log their entry and exit states, including key state variables like message count and session ID, to provide visibility into the conversation flow.
11- **Rationale**: In 'src/agent/graph.ts', logging is implemented for chat and entry nodes to track processing, which is crucial for understanding node behavior during debugging.
12- **Enforcement**: Ensure each node function includes logging statements at the beginning and end of processing, capturing relevant state information.
13 
14## Rule 2: Error Logging Standards
15- **Description**: Errors encountered during model invocation or node processing must be logged with detailed error messages, including the error type and context, to facilitate quick diagnosis.
16- **Rationale**: Error handling in 'src/agent/graph.ts' uses 'handleGlobalError' to manage and log errors, ensuring that issues are captured for review.
17- **Enforcement**: Implement error logging in try-catch blocks within node functions, ensuring error details are recorded.
 
 
 
 
 
18 
19## Rule 3: Trace Agent Decision Paths
20- **Description**: Log the decision paths taken by the supervisor or routing functions to trace how conversations are routed through the graph.
21- **Rationale**: The 'routeMessages' function in 'src/agent/graph.ts' logs routing decisions, which helps in understanding why a particular node was chosen next.
22- **Enforcement**: Include logging for routing logic outcomes, specifying the next node or termination condition.
23 
24## Rule 4: Console Output for Key Events
25- **Description**: Key events such as user input receipt, agent response generation, and conversation termination must be output to the console for real-time monitoring.
26- **Rationale**: Real-time console output provides immediate feedback on system operation, aiding developers during testing and debugging sessions.
27- **Enforcement**: Add console.log statements or equivalent for significant events in the conversation flow.
 
28 
29## Rule 5: LangSmith Integration for Production
30- **Description**: For production environments, integrate LangSmith or a similar tracing tool to capture detailed execution traces of graph workflows for post-analysis.
31- **Rationale**: Advanced tracing tools like LangSmith provide deeper insights into performance and bottlenecks, beyond basic console logging.
32- **Enforcement**: Configure LangSmith integration in the project settings or environment variables when moving to production testing or deployment.
33 
34These rules ensure that debugging and tracing capabilities are robust within the LangGraph project, allowing developers to monitor and improve agent performance effectively. Activate these rules during debugging sessions or when preparing for production deployment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35 
@@ −1 +1 @@
11 ---
2−glob: "**/*.ts"
3−description: "Langgraphjs Architecture"
2+trigger: manual
43 ---
5−# LangGraph.js
64  
7−## Overview
5+# LangSmith Tracing & Console Rules
86  
9−LangGraph.js is a powerful library for building stateful, multi-actor AI applications with Large Language Models (LLMs). It allows you to model complex agent workflows as graphs, where nodes represent individual steps or agents and edges define the flow of information and control.
7+These rules are designed to ensure effective tracing and debugging of agent interactions within the LangGraph project using LangSmith or similar console logging mechanisms. Proper logging and tracing are essential for monitoring the behavior of conversational agents and diagnosing issues in the graph workflow.
108  
11−## Core Concepts
9+## Rule 1: Mandatory Logging for Agent Nodes
10+- **Description**: All agent nodes must log their entry and exit states, including key state variables like message count and session ID, to provide visibility into the conversation flow.
11+- **Rationale**: In 'src/agent/graph.ts', logging is implemented for chat and entry nodes to track processing, which is crucial for understanding node behavior during debugging.
12+- **Enforcement**: Ensure each node function includes logging statements at the beginning and end of processing, capturing relevant state information.
1213  
13−* **StateGraph:** The primary class for defining graph-based workflows. It manages the shared state that is passed between nodes.
14−* **Nodes:** Functions or runnable components that perform specific tasks and update the graph's state.
15−* **Edges:** Define transitions between nodes, which can be unconditional or conditional based on the current state.
16−* **State:** A shared data structure (`AgentState`) that represents the current context of the application, updated by nodes and passed along edges.
17−* **Checkpoints:** Snapshots of the graph's state saved at various points, enabling persistence, debugging, and human-in-the-loop interactions.
18−* **Subgraphs:** The ability to embed one graph as a node within another, promoting modularity and hierarchical design.
19−* **Command Primitive:** A mechanism for combining state updates and dynamic control flow within a single node.
20−* **Streaming:** First-class support for streaming intermediate results and LLM tokens, enhancing user experience.
21−* **Human-in-the-Loop (HIL):** Features like `interrupt()` and breakpoints allow human intervention for approvals, state editing, and dynamic input.
14+## Rule 2: Error Logging Standards
15+- **Description**: Errors encountered during model invocation or node processing must be logged with detailed error messages, including the error type and context, to facilitate quick diagnosis.
16+- **Rationale**: Error handling in 'src/agent/graph.ts' uses 'handleGlobalError' to manage and log errors, ensuring that issues are captured for review.
17+- **Enforcement**: Implement error logging in try-catch blocks within node functions, ensuring error details are recorded.
2218  
23−## Key Features
19+## Rule 3: Trace Agent Decision Paths
20+- **Description**: Log the decision paths taken by the supervisor or routing functions to trace how conversations are routed through the graph.
21+- **Rationale**: The 'routeMessages' function in 'src/agent/graph.ts' logs routing decisions, which helps in understanding why a particular node was chosen next.
22+- **Enforcement**: Include logging for routing logic outcomes, specifying the next node or termination condition.
2423  
25−* **Controllability:** Fine-grained control over the application's flow through explicit node and edge definitions.
26−* **Persistence:** Built-in mechanisms for saving and restoring graph state, supporting long-running conversations and fault tolerance.
27−* **Modularity:** Encourages breaking down complex problems into smaller, reusable components (nodes and subgraphs).
28−* **Tool Integration:** Seamlessly integrates with LangChain tools, allowing agents to interact with external systems.
29−* **Observability:** Integrates with LangSmith for tracing, debugging, and monitoring of LLM applications.
24+## Rule 4: Console Output for Key Events
25+- **Description**: Key events such as user input receipt, agent response generation, and conversation termination must be output to the console for real-time monitoring.
26+- **Rationale**: Real-time console output provides immediate feedback on system operation, aiding developers during testing and debugging sessions.
27+- **Enforcement**: Add console.log statements or equivalent for significant events in the conversation flow.
3028  
31−## Development Practices
29+## Rule 5: LangSmith Integration for Production
30+- **Description**: For production environments, integrate LangSmith or a similar tracing tool to capture detailed execution traces of graph workflows for post-analysis.
31+- **Rationale**: Advanced tracing tools like LangSmith provide deeper insights into performance and bottlenecks, beyond basic console logging.
32+- **Enforcement**: Configure LangSmith integration in the project settings or environment variables when moving to production testing or deployment.
3233  
33−* **TypeScript:** Strongly typed development for improved code quality and maintainability.
34−* **Testing:** Encourages comprehensive unit and integration testing of nodes, agents, and overall graph workflows.
35−* **Error Handling:** Robust error handling for tool calls and model invocations.
36− 
37−## Deployment
38− 
39−LangGraph.js applications can be deployed in various ways, including self-hosted solutions or through the LangGraph Platform (Cloud, BYOC). The LangGraph CLI and SDK provide tools for building, running, and interacting with deployed applications.
40− 
41−## Relevant Files in this Project
42− 
43−* `src/agent/graph.ts`: Defines the main `StateGraph` and its nodes/edges, orchestrating the agent workflow.
44−* `src/agent/state.ts`: Defines the `AgentState` interface and `AgentAnnotation` for managing the application's state.
45−* `src/agent/supervisor.ts`: Implements the supervisor agent for routing between specialized agents.
46−* `src/agent/react_agent.ts`: Implements the ReAct (Reasoning and Acting) agent.
47−* `src/memory/`: Contains implementations for memory management, including MongoDB integration for checkpoints and vector stores.
48−* `src/tools/`: Houses various tools used by the agents (e.g., `calculator`, `document_processing`, `exa`, `github`, `local_git`, `tavily`, `web_scraping`).
49−* `package.json`: Lists LangGraph and LangChain related dependencies.
34+These rules ensure that debugging and tracing capabilities are robust within the LangGraph project, allowing developers to monitor and improve agent performance effectively. Activate these rules during debugging sessions or when preparing for production deployment.
5035  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack