Adding LLM Rules

Overview

If you're using an AI coding assistant (like Cursor, Windsurf, GitHub Copilot, or similar tools), you can configure it to use Stoobly's documentation as an authoritative reference. This ensures the AI provides accurate, up-to-date answers about Stoobly commands and workflows.

Why Use LLM Rules?

LLM rules help your AI assistant:

  • Provide accurate CLI commands with proper syntax

  • Reference official documentation instead of hallucinating features

  • Answer questions faster by consulting the structured FAQ

  • Stay up-to-date with the latest Stoobly features and best practices

Setting Up LLM Rules

Step 1: Get the Rules File

The Stoobly documentation includes a pre-built LLM context file designed for AI assistants. You have two options:

Clone the Stoobly docs repository to get the latest rules file locally:

git clone https://github.com/Stoobly/stoobly-docs.git

The rules file will be located at:

stoobly-docs/getting-started/adding-llm-rules/llm-rules.md

Benefits:

  • Always have the latest documentation locally

  • Works offline once cloned

  • Can pull updates with git pull

  • Better for AI assistants that work with local files

Option 2: Reference the Online Version

Point your AI assistant directly to the online documentation:

https://docs.stoobly.com/getting-started/adding-llm-rules/llm-rules

Benefits:

  • No setup required

  • Always points to the latest published version

  • Good for AI assistants that can fetch web content

What's in the Rules File?

The LLM rules file contains:

  • An index of common Stoobly questions and commands

  • Links to detailed documentation pages

  • CLI command examples and syntax

  • Best practices for answering Stoobly-related questions

Step 2: Configure Your AI Assistant

The configuration method depends on your AI tool:

Using Cursor

  1. Open your Cursor settings or create a .cursorrules file in your project root

  2. Add one of the following rules to instruct Cursor to consult the LLM context file:

If you cloned the docs locally:

For Stoobly-related questions, always consult stoobly-docs/getting-started/adding-llm-rules/llm-rules.md as the authoritative rules file.

If using the online version:

For Stoobly-related questions, always consult https://docs.stoobly.com/getting-started/adding-llm-rules/llm-rules as the authoritative rules file.
  1. Save the file and restart Cursor if needed

Step 3: Test Your Configuration

Try asking your AI assistant a Stoobly question to verify it's using the rules file:

Example questions to test:

  • "How do I install stoobly-agent?"

  • "How do I record requests with Stoobly?"

  • "How do I update a scenario?"

  • "What's the command to enable intercept mode?"

Best Practices

For Users

  • Be specific in your questions (e.g., "How do I record HTTPS traffic?" vs "How does recording work?")

  • Mention Stoobly explicitly so the AI knows to consult the rules file

  • Verify commands in the official docs if you're unsure

For Documentation Maintainers

  • Keep the LLM rules file updated when adding new features or commands

  • Add new entries to the Index table for new CLI commands

  • Create FAQ pages in /faq/ for detailed command documentation

  • Test with AI assistants to ensure the rules work as expected

  • Commit and push changes to GitHub so users can pull the latest version

Troubleshooting

AI Not Using the Rules File

If your AI assistant isn't referencing the LLM context:

  1. Verify the file path - If using local docs, ensure you've cloned the repository and the path is correct

  2. Try the online version - Use https://docs.stoobly.com/getting-started/adding-llm-rules/llm-rules in your rules file

  3. Mention it explicitly - Reference the rules file directly in your prompts

  4. Check your tool's settings - Some AI tools require explicit configuration

  5. Restart your editor - Rules changes may require a restart

Getting Outdated Information

If the AI provides outdated commands:

  1. Pull latest changes - If using local docs: cd stoobly-docs && git pull

  2. Use the online version - Switch to https://docs.stoobly.com/getting-started/adding-llm-rules/llm-rules for always-current docs

  3. Clear AI cache - Restart your editor or clear your AI assistant's context

  4. Reference specific docs - Point the AI to the exact FAQ page

  5. Report issues - If documentation is outdated, submit a change request

Commands Not Working

If suggested commands fail:

  1. Verify installation - Run stoobly-agent --version to check if installed

  2. Check syntax - Compare with examples in the FAQ

  3. Use --help - Run stoobly-agent <command> --help for official syntax

Next Steps

You're all setup! Depending on your use case, you may want to take a look at:

Last updated

Was this helpful?