This guide shows how to integrate ActorCore with Windsurf to enhance your developer experience through AI-assisted coding.

Setting Up Windsurf Rules for ActorCore

Windsurf rules allow you to customize how the AI assistant (Cascade) behaves when working with ActorCore code. By providing project-specific context, you’ll get more accurate and relevant suggestions.

Workspace rules are stored in the .windsurfrules file in your project root and apply to your local workspace.

1

Open project

Open your ActorCore project in Windsurf
2

Create rules file

Navigate to “Windsurf - Settings” (at the bottom right) > “Settings” > “Cascade” > “Set Workspace AI Rules” and click “Edit Rules.”

This will create a .windsurfrules file in your project root.

3

Configure rules

Paste prompt.txt into the .windsurfrules file.

Global Rules

If you frequently work with ActorCore across multiple projects, you can add ActorCore-specific rules globally:

1

Open settings

Navigate to “Windsurf - Settings” (at the bottom right) > “Settings” > “Cascade” > “Set Global AI Rules” and click “Edit Rules.”

2

Add content

Paste prompt.txt into the global_rules.md file.

Global rules will apply to all of your projects when using Windsurf.

Example Queries for ActorCore

Here are some useful prompts to try with Windsurf when working with ActorCore:

Understand the Codebase

# Get an overview of ActorCore's architecture
Explain the architecture of ActorCore and how the different topologies work

# Understand how actors communicate
Explain how actors communicate with each other in the coordinate topology

# Learn about specific concepts
Explain the lifecycle hooks for actors and when each one is called

Find Relevant Code

# Find implementations of specific components
Find the files that implement the Redis driver

# Locate examples of specific patterns
Show me examples of RPC methods in the codebase

# Understand actor state management
Explain how actor state is persisted between restarts

Add New Features

# Create a new actor implementation
Help me create a new actor for managing user sessions

# Add authentication to an actor
Show me how to add authentication to my actor's _onBeforeConnect method

# Implement error handling
Help me implement proper error handling for my actor's RPC methods

Debug Issues

# Diagnose connection problems
My actor connections are dropping, help me debug why

# Fix state persistence issues
My actor state isn't persisting between restarts, what could be wrong?

# Address scaling problems
My actors are using too much memory, how can I optimize them?

Additional Resources