Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,23 @@ The system automatically detects and processes files for all supported languages

### Step 2: Query the Codebase

**Interactive mode:**

Start the interactive RAG CLI:

```bash
python -m codebase_rag.main start --repo-path /path/to/your/repo
```

**Non-interactive mode (single query):**

Run a single query and exit, with output sent to stdout (useful for scripting):

```bash
python -m codebase_rag.main start --repo-path /path/to/your/repo \
--ask-agent "What functions call UserService.create_user?"
```
Comment on lines +266 to +273
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation introduces the --ask-agent flag for non-interactive mode. However, based on the provided codebase_rag/main.py file, the start command does not have this option defined. This makes the documentation inconsistent with the current state of the code in this branch. Please ensure the feature is included in this PR or that this documentation is merged only after the corresponding feature PR.


### Step 2.5: Real-Time Graph Updates (Optional)

For active development, you can keep your knowledge graph automatically synchronized with code changes using the realtime updater. This is particularly useful when you're actively modifying code and want the AI assistant to always work with the latest codebase structure.
Expand Down Expand Up @@ -503,6 +514,10 @@ claude mcp add --transport stdio graph-code \
- **surgical_replace_code** - Precise code edits
- **read_file / write_file** - File operations
- **list_directory** - Browse project structure
- **shell_command** - Execute terminal commands
- **document_analyzer** - Analyze PDFs and documents
- **semantic_search** - Find functions by intent
- **get_function_source** - Retrieve function source by ID
Comment on lines +517 to +520
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change adds several new tools to the MCP server's available tools list. However, in the provided codebase_rag/mcp/tools.py file, these tools (shell_command, document_analyzer, semantic_search, get_function_source) are not registered in the MCPToolsRegistry. This makes the documentation inconsistent with the code in this branch.

Additionally, there seems to be a naming inconsistency. The agent tools for similar functionalities are named execute_shell_command, analyze_document, semantic_search_functions, and get_function_source_by_id. It would be good to ensure the MCP tool names are consistent or that the difference is intentional and clear.

Please ensure the tool registration is part of this PR or that this documentation is merged after the feature is implemented and the names are confirmed.


### Example Usage

Expand Down Expand Up @@ -607,6 +622,9 @@ The agent has access to a suite of tools to understand and interact with the cod
- **`create_new_file`**: Creates a new file with specified content.
- **`replace_code_surgically`**: Surgically replaces specific code blocks in files. Requires exact target code and replacement. Only modifies the specified block, leaving rest of file unchanged. True surgical patching.
- **`execute_shell_command`**: Executes a shell command in the project's environment.
- **`analyze_document`**: Analyzes PDFs and documents to answer questions about their content.
- **`semantic_search_functions`**: Finds functions by natural language intent using embeddings.
- **`get_function_source_by_id`**: Retrieves source code for a function by its node ID.

### Intelligent and Safe File Editing

Expand Down