Skip to content

feat(setup): auto-detect Windsurf and Cline - #324

Merged
luuuc merged 2 commits into
mainfrom
feat/setup-windsurf-cline
Sep 24, 2026
Merged

luuuc merged 2 commits into
mainfrom
feat/setup-windsurf-cline

Conversation

@luuuc

@luuuc luuuc commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Windsurf and Cline users now get Sense set up by sense setup, the same way Claude Code, Cursor, Codex CLI and OpenCode users do. The tool is detected, the guidance that steers the model toward Sense is written, and the one step Sense cannot do for you is spelled out.

Problem

sense setup only knew about four tools, so Windsurf and Cline users had to wire everything by hand. The FAQ also told them the generated .mcp.json would work, but neither tool reads it: both keep MCP servers only in a global settings file outside the project.

Summary

Adds Windsurf and Cline to the setup registry. Both read AGENTS.md, so setup writes the shared guidance there and prints the exact MCP server entry to add to the tool's global settings, since setup never writes outside the project.

Changes

  • internal/setup/windsurf.go: detects windsurf on PATH or ~/.codeium/windsurf/, writes AGENTS.md, prints the MCP note, and undoes cleanly.
  • internal/setup/cline.go: detects cline on PATH, ~/.cline/, or the VS Code extension, then does the same.
  • registry.go / detect.go: one registry line and one constant per tool. --tools windsurf and --tools cline work with no other wiring.
  • sense setup --help and CLI.md list all six tools. The help list is kept by hand, so a new test fails if a registry tool is missing from it.
  • Docs: README, FAQ and the AI-tool contributing guide list the two tools and explain the manual MCP step. The FAQ's wrong .mcp.json claim is fixed, and the guide no longer claims the help text derives from the registry.

Architecture Highlights

  • No files outside the project are touched, matching how Codex's global fallback is handled (a printed note, not a write).
  • No .mcp.json is written for these tools, since neither reads it.
  • Undo strips only Sense's section from AGENTS.md, keeping anything the user wrote.

Test Plan

  • Detection: each signal (PATH, home dir, VS Code extension) and the not-found and no-home cases
  • Setup writes AGENTS.md with the Sense section, prints the MCP note, and writes no .mcp.json
  • Running setup twice over a user's own AGENTS.md keeps their content and one Sense section
  • Undo restores the user's AGENTS.md exactly; a broken AGENTS.md fails the teardown with a clear error
  • Manual: sense setup --tools windsurf,cline then sense setup --undo --tools windsurf,cline in an empty folder leaves it empty
  • TestSetupHelpListsEveryTool fails without the help update and passes with it
  • make ci passes (new files at 100% line and function coverage, 0 lint issues, complexity ledger 0)
  • make smoke passes

Closes #168

Both tools read AGENTS.md, so setup writes the shared guidance there.
Neither reads MCP servers from the project (only from a global
settings file), and setup never writes outside the project, so it
prints the one server entry to add by hand instead.

Closes #168
@luuuc luuuc added the lane: ai-tool A new AI coding-tool integration or guidance tuning. label Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The setup help and CLI.md named the tools by hand and still showed the
old set. A test now fails if any registry tool is missing from the
help, and the contributor guide no longer claims the help derives from
the registry.
@luuuc luuuc self-assigned this Sep 24, 2026
@luuuc
luuuc merged commit 3d23f60 into main Sep 24, 2026
7 checks passed
@luuuc
luuuc deleted the feat/setup-windsurf-cline branch September 24, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane: ai-tool A new AI coding-tool integration or guidance tuning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-detect Windsurf and Cline in sense setup

1 participant