Rete Kit AI - Rete.js

Rete Kit AI

The AI command feature is currently experimental. The API and behavior may change in future versions. We welcome feedback and suggestions for improvement. Please share your experience on GitHub Issues.

Rete Kit includes an AI command that generates context-aware instructions for AI-powered code editors (Cursor, GitHub Copilot, Windsurf, etc.). These instructions help AI assistants understand your specific situation and provide more accurate, relevant help when learning or developing with Rete.js.

Quick Start

The fastest way to get started is to use your IDE's agent or command execution feature:

prompt
Run npx rete-kit ai for [your intention]

Replace [your intention] with your actual goal (e.g., "learning Rete.js", "creating a new app", "adding to my existing project"). The AI agent will automatically determine the right tool and context options.

Or specify options manually:

bash
npx rete-kit ai --tool <tool> --context <context> [options]

Options:

  • --tool, -t <tool> - IDE tool (cursor, github, windsurf, etc.)
  • --context, -c <context> - Context (onboard, boot, dev, plugin)
  • --force, -f - Overwrite existing instruction files without confirmation
  • --interactive, -i - Interactive mode to select options

Run npx rete-kit ai --help for detailed usage information.

Contexts

Choose the context that matches your situation:

ContextWhen to UseDescription
onboardLearning Rete.js fundamentalsProvides conceptual explanations, core building blocks (nodes, connections, sockets), processing models, and educational guidance. Use when asking "What is Rete.js?" or "How does visual programming work?"
bootCreating a new Rete.js applicationProvides step-by-step app creation guidance, framework selection help, feature recommendations, and project structure explanation. Helps with running rete-kit app commands and understanding project setup.
devAdding Rete.js to existing app or working with existing Rete.js appProvides integration strategies, reference-driven patterns from Rete Kit apps, and problem-solving guidance. Helps with adding Rete.js to existing codebases, fixing issues, and adapting patterns to your architecture.
pluginDeveloping, debugging, or customizing Rete.js pluginsProvides plugin architecture, signal processing patterns, debugging techniques, and advanced best practices. Helps with plugin structure, signal systems, testing, and cross-framework development.

Supported Tools

ToolStatusNotes
Cursor✅ SupportedGenerates .mdc files in .cursor/rules/ directory
GitHub Copilot✅ SupportedCreates .copilot-instructions.md file in .github/ directory
Windsurf⚠️ IncludedPlaces .md files in .windsurf/rules/ directory
Continue⚠️ IncludedPlaces .md files in .continue/rules/ directory
Amazon Q⚠️ IncludedPlaces .md files in .amazonq/rules/ directory
Antigravity⚠️ IncludedPlaces .md files in .agent/rules/ directory
Codex⚠️ IncludedCreates AGENTS.md file in project root
Claude⚠️ IncludedCreates CLAUDE.md file in project root

Status Legend:

  • Supported - Tested and verified to work correctly
  • ⚠️ Included - Supported but not fully tested

Interactive Mode

Not sure which context to use? Run interactive mode:

bash
npx rete-kit ai --interactive

How It Works

Rete Kit reads context-specific instruction templates from its package and transforms them for your IDE:

  1. Reads templates from assets/ai/{context}/ (onboard, boot, dev, or plugin)
  2. Transforms content for your IDE's format (e.g., .mdc files for Cursor)
  3. Writes instructions to IDE-specific directories in your project
  4. Activates automatically - Your IDE's AI assistant uses these instructions immediately

The generated instructions contain Rete.js-specific guidance tailored to your selected context.

Switching Contexts

Switch contexts as your project evolves by running the command again with a different context. Use --force to overwrite existing instructions:

bash
npx rete-kit ai --tool cursor --context dev --force

Typical progression: onboardbootdevplugin

Troubleshooting

Instructions not working?

  • Verify files were created in the correct directory (e.g., .cursor/rules/ for Cursor)
  • Try starting a new chat/agent session - instructions may need a new conversation to be loaded
  • If a new session doesn't work, restart your IDE to ensure instructions are loaded
  • Test by asking your IDE's AI assistant a Rete.js-specific question
  • Regenerate with --force flag if needed
  • Check IDE settings to ensure AI features are enabled

Wrong context selected? Regenerate with the correct context:

bash
npx rete-kit ai --tool cursor --context <correct-context> --force

Interactive mode not working? Use explicit --tool and --context flags instead (interactive mode requires a TTY).