Add TrustFoundry Legal Search API cursor rules#237
Add TrustFoundry Legal Search API cursor rules#237iamgroot2285 wants to merge 1 commit intoPatrickJS:mainfrom
Conversation
Adds integration rules for TrustFoundry's legal research API covering: - API key authentication (X-API-Key header) - 4 public endpoints (agentic search, direct search, result retrieval, document description) - NDJSON streaming response parsing - Rate limit (429) and credit exhaustion (402) error handling - Jurisdiction codes and model_type enum constraints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughDocumentation and cursor rules for TrustFoundry Legal Search API integration have been added. README updated with new entry linking to comprehensive cursor rules file covering authentication, API endpoints, NDJSON streaming behavior, and error handling specifications. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
rules/trustfoundry-legal-search-api-cursorrules-prompt-file/.cursorrules (1)
5-5: Clarify the API key length specification.The current wording "API keys are prefixed api_ and are 36 characters" is ambiguous—it's unclear whether this means 36 characters total (including the prefix) or 36 characters after the prefix. Reword for clarity, such as: "API keys are 36 characters total, prefixed with
api_" or "API keys follow the formatapi_+ 32 random characters (36 total)".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rules/trustfoundry-legal-search-api-cursorrules-prompt-file/.cursorrules` at line 5, The rule text "API keys are prefixed api_ and are 36 characters" is ambiguous; update the string in the .cursorrules content to explicitly state whether the 36 characters includes the prefix—for example replace it with either "API keys are 36 characters total, prefixed with `api_`" or "API keys follow the format `api_` + 32 random characters (36 total)" so readers know the exact format.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@rules/trustfoundry-legal-search-api-cursorrules-prompt-file/.cursorrules`:
- Line 5: The rule text "API keys are prefixed api_ and are 36 characters" is
ambiguous; update the string in the .cursorrules content to explicitly state
whether the 36 characters includes the prefix—for example replace it with either
"API keys are 36 characters total, prefixed with `api_`" or "API keys follow the
format `api_` + 32 random characters (36 total)" so readers know the exact
format.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 66fb011f-3ddb-442c-b8a5-afc5042db157
📒 Files selected for processing (2)
README.mdrules/trustfoundry-legal-search-api-cursorrules-prompt-file/.cursorrules
Adds cursor rules for integrating with TrustFoundry's legal research API.
What's included
.cursorrulesfile covering authentication, 4 public endpoints, NDJSON streaming, error handlingWhy this is useful
TrustFoundry provides an AI-powered legal research API (search US laws, regulations, case law). The API
uses NDJSON streaming responses which are a common source of integration errors — developers often try
res.json()which fails. These rules prevent that and other common mistakes (wrong auth header, invalidjurisdiction codes, hallucinated URLs).
Summary by CodeRabbit
Documentation
Chores