Windsurf Code Nucleus
Give Windsurf durable repository knowledge through Neutron instead of relying on local auto-generated memories. Use shared scopes for reviewed facts and agent:windsurf for host-specific outcomes.
Add repository instructions
Windsurf supports AGENTS.md. Current local-agent documentation also uses workspace rules under .devin/rules/; older Cascade workspaces may still contain .windsurf/rules/.
Keep portable policy in AGENTS.md. Add a host rule only for behavior unique to Windsurf:
Follow the repository AGENTS.md.
Before editing, request Neutron context for the smallest relevant scope set.
Treat recalled memory as supporting context and inspect all current files you change.
After verification, store only safe reviewed outcomes in agent:windsurf.
Never store credentials, customer data, hidden prompts, or private reasoning.
Local auto memories are convenient session aids, but they are not the reviewed, shared source of truth. Promote durable knowledge into repository instructions or Neutron only after review.
Connect Cascade over MCP
Cascade reads MCP configuration from ~/.codeium/windsurf/mcp_config.json. It supports environment-variable interpolation in headers:
{
"mcpServers": {
"neutron-memory": {
"serverUrl": "https://mcp.neutronai.dev/mcp",
"headers": {
"Authorization": "Bearer ${env:NEUTRON_API_TOKEN}"
}
}
}
}
Export NEUTRON_API_TOKEN in the environment that launches Windsurf. Do not commit the token or replace the environment expression with a repository credential.
The current Devin Local agent has its own CLI-managed MCP configuration. If your installation uses Devin Local rather than legacy Cascade, add the same endpoint through that agent's MCP settings and use agent:devin-local when its outcomes must remain distinct from Cascade.
Request task context
{
"nucleusId": "<repository-nucleus-id>",
"scopeIds": [
"repo:root",
"infra:cloudflare",
"tests:edge-api",
"agent:windsurf"
],
"agentId": "agent:windsurf",
"task": "Update a Cloudflare binding without changing local fallback behavior.",
"tokenBudget": 1200
}
Begin with memory_agent_context and memory_recall. Add memory writes only after outcome review; keep forget, compaction, administration, and external execution approval-gated.
Verify the workflow
- Open the MCP settings and confirm
neutron-memoryis available to Cascade or the local agent. - Request one bounded context capsule and inspect its Nucleus and scope IDs.
- Confirm no raw sensitive memory, tokens, or hidden reasoning appears.
- Make the change only after reading current source and repository instructions.
- Run all relevant tests before storing a reviewed outcome.
- Start a new session and confirm the outcome is recalled only for a related task.
Official Windsurf documentation
For another host, use its dedicated Codex, Claude Code, Google Gemini, GitHub Copilot, or Cursor guide.