Skip to content

Add Cursor rule for LangGraph in TypeScript#326

Open
Nyx-abu wants to merge 1 commit into
PatrickJS:mainfrom
Nyx-abu:add-langgraph-rule
Open

Add Cursor rule for LangGraph in TypeScript#326
Nyx-abu wants to merge 1 commit into
PatrickJS:mainfrom
Nyx-abu:add-langgraph-rule

Conversation

@Nyx-abu

@Nyx-abu Nyx-abu commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adding a Cursor project rule .mdc file to document best practices for building stateful multi-agent workflows with LangGraph in TypeScript.

Contribution Type

  • New Cursor rule file or rules folder
  • Update/fix to an existing rule
  • New rules/*.mdc rule
  • Documentation or README cleanup

Value To Cursor Users

Provides a solid architectural pattern for using LangGraph in TypeScript, including how to define the State with Annotation.Root, proper typing for async nodes, and routing for conditional edges. This helps users quickly scaffold reliable multi-agent systems with type safety.

Added Or Changed Files

  • rules/langgraph-typescript.mdc: The new Cursor rule file with LangGraph TS patterns.
  • README.md: Registered the new rule in the Backend and Full-Stack section (alphabetically ordered).

Quality Checklist

  • The contribution includes original rule content, or clearly credits the source.
  • New rule files use a descriptive kebab-case filename, such as react-typescript.mdc.
  • New rules/*.mdc files include frontmatter with a non-empty description, relevant globs, and alwaysApply: false unless the rule is universal.
  • README links use canonical GitHub URLs for repo files and point to the correct category.
  • The text is neutral and useful, not sales copy.
  • This is not a standalone external tool, product, directory, marketplace, or service listing.
  • No secrets, tokens, affiliate links, tracking links, or unrelated product claims are included.
  • I checked for duplicate or near-duplicate existing entries.

Notes For Maintainers

Tested locally with npm run validate to ensure frontmatter and README formatting meet the required repository hygiene.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

A new rules/langgraph-typescript.mdc cursor rule file is added, documenting best practices for building stateful multi-agent workflows with LangGraph in TypeScript. A corresponding entry is added to the README under the Backend and Full-Stack rules list.

Changes

LangGraph TypeScript Rule

Layer / File(s) Summary
Rule content and README registration
rules/langgraph-typescript.mdc, README.md
New .mdc rule file defines metadata, core principles, AgentState interface and Annotation.Root state pattern, async node implementation, conditional edge/router logic, and StateGraph assembly with compiled export. README adds a bullet linking to the new rule.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through graphs of state,
Typed nodes and edges, all first-rate,
__end__ awaits at the final turn,
No infinite loops—a lesson to learn!
🐇 Stateful agents, compiled and neat! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change: adding a Cursor rule for LangGraph in TypeScript.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description follows the required template and includes the summary, contribution type, value, files, checklist, and maintainer notes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant