Skip to content

Commit e6b52a7

Browse files
authored
Merge pull request #12 from doITmagic/fix/strict-file-path-and-installer
feat: standardize tools, improve workspace detection, and enable Homebrew support
2 parents 644c08c + 402538f commit e6b52a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2022
-594
lines changed

.clauderules

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
**For any information about the code (location, structure, logic, or usage), you MUST use RagCode MCP tools. Never guess code details from memory; always search the local index first.**
66

77
## Available Tools
8-
- search_code: Primary entry point for semantic search.
9-
- get_function_details: Get full implementation of a function.
10-
- find_type_definition: Get struct/interface definitions.
11-
- list_package_exports: See what a module offers.
12-
- search_docs: Find project documentation.
8+
- rag_search_code: Primary entry point for semantic search.
9+
- rag_get_function_details: Get full implementation of a function.
10+
- rag_find_type_definition: Get struct/interface definitions.
11+
- rag_list_package_exports: See what a module offers.
12+
- rag_search_docs: Find project documentation.
1313

1414
## Usage Guidelines
1515
- Always provide 'file_path' to tools to ensure they detect the correct project context.
16-
- Use 'hybrid_search' if looking for exact variable names or error messages.
17-
- If the tool says "workspace not indexed", use 'index_workspace' once.
16+
- Use 'rag_hybrid_search' if looking for exact variable names or error messages.
17+
- If the tool says "workspace not indexed", use 'rag_index_workspace' once.

.clinerules

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
**For any information about the code (location, structure, logic, or usage), you MUST use RagCode MCP tools. Never guess code details from memory; always search the local index first.**
66

77
## Available Tools
8-
- search_code: Primary entry point for semantic search.
9-
- get_function_details: Get full implementation of a function.
10-
- find_type_definition: Get struct/interface definitions.
11-
- list_package_exports: See what a module offers.
12-
- search_docs: Find project documentation.
8+
- rag_search_code: Primary entry point for semantic search.
9+
- rag_get_function_details: Get full implementation of a function.
10+
- rag_find_type_definition: Get struct/interface definitions.
11+
- rag_list_package_exports: See what a module offers.
12+
- rag_search_docs: Find project documentation.
1313

1414
## Usage Guidelines
1515
- Always provide 'file_path' to tools to ensure they detect the correct project context.
16-
- Use 'hybrid_search' if looking for exact variable names or error messages.
17-
- If the tool says "workspace not indexed", use 'index_workspace' once.
16+
- Use 'rag_hybrid_search' if looking for exact variable names or error messages.
17+
- If the tool says "workspace not indexed", use 'rag_index_workspace' once.

.cursorrules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## ⚖️ The Golden Rule
44
**For any information about the codebase (structure, logic, or usage), you MUST use RagCode MCP tools.**
5-
Never guess code details from memory; always search the local index first using `search_code` or `get_function_details`.
5+
Never guess code details from memory; always search the local index first using `rag_search_code` or `rag_get_function_details`.
66

77
## Guidelines
8-
1. **Context First**: Always call `search_code` when starting a task to see where relevant logic exists.
9-
2. **Actual Code**: Use `get_function_details` to read the implementation of a function instead of assuming what it does.
8+
1. **Context First**: Always call `rag_search_code` when starting a task to see where relevant logic exists.
9+
2. **Actual Code**: Use `rag_get_function_details` to read the implementation of a function instead of assuming what it does.
1010
3. **Workspace Detection**: Always provide the current `file_path` to the tools so they can identify the correct project/workspace.
11-
4. **No Guesswork**: If you don't find something, index the workspace using `index_workspace` and search again.
11+
4. **No Guesswork**: If you don't find something, index the workspace using `rag_index_workspace` and search again.

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ RagCode is a Model Context Protocol (MCP) server that provides semantic code sea
2222
- **Logging**: MCP server logs to `mcp.log` next to the executable. Check `MCP_LOG_LEVEL=debug` for issues.
2323

2424
## MCP Tools Usage
25-
- `search_code`: Use as the primary entry point for exploration. **Crucial**: Always provide the `file_path` parameter as it's used for workspace and language detection.
26-
- `index_workspace`: Triggered automatically on first query per workspace, but can be manually invoked for major changes.
25+
- `rag_search_code`: Use as the primary entry point for exploration. **Crucial**: Always provide the `file_path` parameter as it's used for workspace and language detection.
26+
- `rag_index_workspace`: Triggered automatically on first query per workspace, but can be manually invoked for major changes.
2727

2828
## Integration Points
2929
- **Ollama**: Requires `phi3:medium` (reasoning) and `mxbai-embed-large` (embeddings) by default.

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26+
- name: Check for Homebrew Tap Token
27+
id: check_token
28+
run: |
29+
if [ -n "${{ secrets.HOMEBREW_TAP_TOKEN }}" ]; then
30+
echo "SKIP_HOMEBREW=" >> $GITHUB_OUTPUT
31+
echo "HOMEBREW_TAP_TOKEN is present. Homebrew updates enabled."
32+
else
33+
echo "SKIP_HOMEBREW=--skip=homebrew" >> $GITHUB_OUTPUT
34+
echo "HOMEBREW_TAP_TOKEN is missing. Homebrew Tap update will be skipped."
35+
fi
36+
2637
- name: Fetch all tags
2738
run: git fetch --force --tags
2839

@@ -37,9 +48,10 @@ jobs:
3748
with:
3849
distribution: goreleaser
3950
version: v2.6.1
40-
args: release --clean
51+
args: release --clean ${{ steps.check_token.outputs.SKIP_HOMEBREW }}
4152
env:
4253
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
4355

4456
- name: Update server.json version
4557
run: |

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
on:
44
push:
5-
branches: [ main, dev, 'feat/**' ]
5+
branches: [ main, dev, 'feat/**', 'fix/**' ]
66
pull_request:
7-
branches: [ main, dev, 'feat/**' ]
7+
branches: [ main, dev, 'feat/**', 'fix/**' ]
88

99
jobs:
1010
test:

.goreleaser.yaml

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,33 @@ builds:
6767
- -X main.Date={{.Date}}
6868
- -X main.BuiltBy=goreleaser
6969

70+
- id: index-all
71+
main: ./cmd/index-all
72+
binary: index-all
73+
74+
env:
75+
- CGO_ENABLED=0
76+
77+
goos:
78+
- linux
79+
- darwin
80+
- windows
81+
82+
goarch:
83+
- amd64
84+
- arm64
85+
86+
ignore:
87+
- goos: windows
88+
goarch: arm64
89+
90+
ldflags:
91+
- -s -w
92+
- -X main.Version={{.Version}}
93+
- -X main.Commit={{.Commit}}
94+
- -X main.Date={{.Date}}
95+
- -X main.BuiltBy=goreleaser
96+
7097
archives:
7198
- id: default
7299
format: tar.gz
@@ -155,11 +182,24 @@ release:
155182
156183
**Full documentation:** https://github.com/doITmagic/rag-code-mcp
157184
158-
# Homebrew tap (optional, can be enabled later)
159-
# brews:
160-
# - repository:
161-
# owner: doITmagic
162-
# name: homebrew-tap
163-
# homepage: https://github.com/doITmagic/rag-code-mcp
164-
# description: Semantic code navigation for Go codebases using RAG
165-
# license: MIT
185+
# Homebrew tap configuration
186+
brews:
187+
- repository:
188+
owner: doITmagic
189+
name: homebrew-tap
190+
# REQUIRED: A dedicated token (HOMEBREW_TAP_TOKEN) with write access to the tap repository.
191+
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
192+
193+
directory: Formula
194+
homepage: "https://github.com/doITmagic/rag-code-mcp"
195+
description: "Semantic code navigation for Go, PHP, and Python codebases using RAG and MCP."
196+
license: "MIT"
197+
198+
# Custom install script to handle multiple binaries
199+
install: |
200+
bin.install "rag-code-mcp"
201+
bin.install "ragcode-installer"
202+
bin.install "index-all"
203+
204+
test: |
205+
system "#{bin}/rag-code-mcp --version"

.goreleaser.yml

Lines changed: 0 additions & 110 deletions
This file was deleted.

.roomodes

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
**For any information about the code (location, structure, logic, or usage), you MUST use RagCode MCP tools. Never guess code details from memory; always search the local index first.**
66

77
## Available Tools
8-
- search_code: Primary entry point for semantic search.
9-
- get_function_details: Get full implementation of a function.
10-
- find_type_definition: Get struct/interface definitions.
11-
- list_package_exports: See what a module offers.
12-
- search_docs: Find project documentation.
8+
- rag_search_code: Primary entry point for semantic search.
9+
- rag_get_function_details: Get full implementation of a function.
10+
- rag_find_type_definition: Get struct/interface definitions.
11+
- rag_list_package_exports: See what a module offers.
12+
- rag_search_docs: Find project documentation.
1313

1414
## Usage Guidelines
1515
- Always provide 'file_path' to tools to ensure they detect the correct project context.
16-
- Use 'hybrid_search' if looking for exact variable names or error messages.
17-
- If the tool says "workspace not indexed", use 'index_workspace' once.
16+
- Use 'rag_hybrid_search' if looking for exact variable names or error messages.
17+
- If the tool says "workspace not indexed", use 'rag_index_workspace' once.

.windsurfrules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## ⚖️ The Golden Rule
44
**For any information about the codebase (structure, logic, or usage), you MUST use RagCode MCP tools.**
5-
Never guess code details from memory; always search the local index first using `search_code` or `get_function_details`.
5+
Never guess code details from memory; always search the local index first using `rag_search_code` or `rag_get_function_details`.
66

77
## Guidelines
8-
1. **Context First**: Always call `search_code` when starting a task to see where relevant logic exists.
9-
2. **Actual Code**: Use `get_function_details` to read the implementation of a function instead of assuming what it does.
8+
1. **Context First**: Always call `rag_search_code` when starting a task to see where relevant logic exists.
9+
2. **Actual Code**: Use `rag_get_function_details` to read the implementation of a function instead of assuming what it does.
1010
3. **Workspace Detection**: Always provide the current `file_path` to the tools so they can identify the correct project/workspace.
11-
4. **No Guesswork**: If you don't find something, index the workspace using `index_workspace` and search again.
11+
4. **No Guesswork**: If you don't find something, index the workspace using `rag_index_workspace` and search again.

0 commit comments

Comments
 (0)