workspace: centralize default detection markers and include .ragcode#23
workspace: centralize default detection markers and include .ragcode#23
workspace: centralize default detection markers and include .ragcode#23Conversation
There was a problem hiding this comment.
Pull request overview
This pull request claims to centralize workspace detection markers and add .ragcode support, but actually represents a major release (v1.1.17 → v1.1.21) with extensive changes far beyond the stated scope.
Changes:
- Centralized workspace detection markers in
DefaultWorkspaceDetectionMarkers(as described) - Tool renaming: all MCP tools now prefixed with
rag_(search_code → rag_search_code, etc.) - Added 4 new major features: skills management, update checking/applying, AI evaluation, and generic language analyzer
- Changed default models from phi3:medium to qwen2.5-coder:0.5b (lighter weight)
- Added comprehensive test coverage for new features
- Updated all documentation, IDE configurations, and build workflows
Reviewed changes
Copilot reviewed 79 out of 80 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/config/config.go | ✅ Added DefaultWorkspaceDetectionMarkers with .ragcode and IDE markers |
| internal/config/loader.go | ✅ Uses centralized markers; changed default models |
| internal/workspace/detector.go | ✅ Uses centralized markers via config import |
| server.json | Version bump 1.1.17→1.1.21; tool count 9→10; all tools renamed with rag_ prefix |
| internal/updater/updater.go | New update/download mechanism with security protections (zip slip, size limits) |
| internal/skills/*.go | New AI skills installation framework with path traversal protection |
| internal/tools/*.go | All tools renamed and updated with workspace detection improvements |
| .goreleaser.yaml | Added Homebrew tap support, index-all binary |
| docs/* | Extensive documentation updates for renamed tools |
| llms.txt, README.md | Updated tool names and counts throughout |
| var DefaultWorkspaceDetectionMarkers = []string{ | ||
| ".git", | ||
| "go.mod", | ||
| "package.json", | ||
| "Cargo.toml", |
There was a problem hiding this comment.
DefaultWorkspaceDetectionMarkers drops several markers that were previously part of workspace.NewDetector() defaults (e.g. Dockerfile, docker-compose.yml, Makefile, tsconfig.json, vite/next configs, deno.json, artisan, mix.exs, .project). This changes default workspace detection behavior for projects that don’t have .git/language markers and also makes some inferProjectType / inferLanguageFromMarker cases effectively unreachable unless users override workspace.detection_markers. Consider expanding this centralized list to include the prior default markers (plus the new .ragcode additions) to avoid regressions.
| "Gemfile", | ||
| "Package.swift", | ||
| ".ragcode", | ||
| ".agent", | ||
| ".idea", |
There was a problem hiding this comment.
There’s no unit test asserting that a .ragcode directory is recognized as a valid workspace root marker (and that it works via the default marker list). Adding a detector test that creates <tmp>/.ragcode/ and verifies DetectFromPath picks <tmp> as the root would prevent regressions.
| - .ragcode | ||
| - .agent | ||
| - .idea | ||
| - .vscode | ||
| - .vs | ||
| - .cursor | ||
| - .windsurf | ||
| - AGENTS.md | ||
| - CLAUDE.md |
There was a problem hiding this comment.
The default config.yaml template still hardcodes the detection_markers list, so marker defaults are now duplicated between this YAML string and config.DefaultWorkspaceDetectionMarkers. Since the PR’s goal is to centralize these markers, consider generating this YAML section from the centralized list (or otherwise deriving it from config.DefaultConfig()) to prevent drift when markers change in the future.
Description
This PR improves workspace root detection by centralizing default detection markers and adding explicit support for
.ragcodeas a valid workspace root marker.Changes included:
DefaultWorkspaceDetectionMarkersininternal/config/config.go.internal/config/loader.go.internal/workspace/detector.go.cmd/rag-code-mcp/main.goto use centralized markers and includeAGENTS.md/CLAUDE.mdin the checked targets.Motivation/context:
.ragcode.Fixes # (issue)
Type of change
Checklist:
go fmt ./...go test ./...and they passAdditional notes
a61d64ea705b668ac644baf3eb258af6a9f1d8e9