Content
```html
<div align="center">
# sanshu
[](https://github.com/yuaotian/sanshu/actions)
[](LICENSE)
[](https://www.rust-lang.org/)
[](https://github.com/yuaotian/sanshu)
[](https://modelcontextprotocol.io/)
> **One begets two, two begets three, and three begets all things**
*Intelligence · Memory · Search —— AI-assisted programming enhancement system*
[Features](#-core-features) •
[Quick Start](#-installation-and-usage) •
[Technical Architecture](#️-technical-architecture) •
[Contribution Guide](#-contribution-guide) •
[License](#-license)
</div>
---
## 📥 Releases
### Quick Download
<div align="center">
**🚀 Latest Version Download - Choose the right platform for you**
</div>
#### 📦 Pre-compiled Binaries
| 🖥️ Platform | 📥 GitHub Direct Link | 🌏 Domestic Acceleration | 📋 Description |
|:-------:|:-------------:|:-----------:|:------:|
| **Windows x64** | [Download .zip ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-windows-x86_64.zip) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-windows-x86_64.zip) | 64-bit Windows system |
| **macOS ARM64** | [Download .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-macos-aarch64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-macos-aarch64.tar.gz) | Apple Silicon (M1/M2/M3) |
| **macOS Intel** | [Download .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-macos-x86_64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-macos-x86_64.tar.gz) | Intel chip Mac |
| **Linux x64** | [Download .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-linux-x86_64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.5.0/sanshu-cli-v0.5.0-linux-x86_64.tar.gz) | 64-bit Linux system |
> **🎯 How to choose a download link?**
>
> 🇨🇳 **Users in mainland China** → give priority to **wget.la accelerated links** 🚀
>
> 🌍 **Users in other regions** → choose **GitHub direct link** 🌐
>
> 📱 **Mobile download** → All links support direct download from mobile browser
#### 🚀 Quick Start Guide
**For users in mainland China**:
1. 📍 Give priority to **wget.la accelerated links** for faster download speeds
2. 📱 Supports direct download on mobile devices without the need for a computer
3. ⚡ Automatically unzip and configure according to the [Installation Guide](#-installation-and-usage)
**Download Options**:
- 🏳️ **GitHub Direct Link**: Suitable for global users, speed depends on network conditions
- 🇨🇳 **wget.la Acceleration**: Optimized for users in mainland China for faster download speeds
- 📱 **Mobile Friendly**: Supports direct download from mobile browsers
- 🔄 **Automatic Update**: Links automatically point to the latest version after a new version is released
> **💡 What is wget.la?**
> wget.la is a professional GitHub acceleration service that provides faster download speeds for users in mainland China. All links point to the official GitHub Releases to ensure security and integrity.
> **📋 Version Information**: Current latest version 0.5.0 | Last updated: 2026-02-03
### Installation instructions
After downloading, please refer to the [📦 Installation and Usage](#-installation-and-usage) section to complete the environment configuration.
> 💡 **Tip**: If you prefer to build from source or install using a package manager, please see the [📦 Installation and Usage](#-installation-and-usage) section below.
---
## 📖 Introduction
**sanshu** is an AI-assisted programming enhancement system that integrates the three core capabilities of **Intelligence (zhi)**, **Memory (ji)**, and **Search (sou)**. It deeply collaborates with AI assistants through the MCP (Model Context Protocol) protocol, realizing a paradigm shift from passive response to active collaboration.
<div align="center">
<img src="screenshots/home.png" alt="三术主界面" width="800" />
<p><em>sanshu Main Interface - Unified Workbench Integrating Three Core Tools</em></p>
</div>
---
## 📑 Table of Contents
- [🌟 Core Features](#-core-features)
- [🚀 Core Features and Processes](#-core-features-and-processes)
- [🤖 Collaboration with Augment Ace](#-与-augment-ace-的协同)
- [🚀 Version Release Process](#-version-release-process)
- [🛠️ Technical Architecture](#️-technical-architecture)
- [📦 Installation and Usage](#-installation-and-usage)
- [☯️ Philosophy](#️-philosophy)
- [❓ Frequently Asked Questions (FAQ)](#-常见问题-faq)
- [🤝 Contribution Guide](#-contribution-guide)
- [📄 License](#-license)
- [🙏 Acknowledgements](#-致谢)
---
## 🌟 Core Features
sanshu consists of three complementary core tools and integrates Context7 document query capabilities:
| Tool | Name | Philosophy | Core Capabilities | Default State |
|:---:|:---:|:---:|:---|:---:|
| 🧠 | **zhi** | Assess the situation and act wisely | Interactive decision-making, multi-modal input (text/image/options), state visualization | ✅ Enabled |
| 📚 | **ji** | Be well-informed and review the past to know the new | Global memory, automatic recall, classification management, intelligent deduplication | ✅ Enabled |
| 🔍 | **sou** | Search for the hidden and see everything clearly | Semantic search, incremental indexing, intelligent waiting, file monitoring | ⚙️ Optional |
| 📖 | **context7** | Draw on the strengths of others and keep pace with the times | Framework document query, intelligent fallback search, paged browsing | ✅ Enabled |
| 🎨 | **tu (Icon Workshop)** | Convey meaning through images and use them freely | Iconfont icon search, preview, batch download, SVG editing | ✅ Built-in |
| 🧩 | **uiux (UI/UX Pro Max)** | Unify all skills and load them as needed | Design system generation, technology stack recommendation, style search | ✅ Enabled |
| ✨ | **enhance (Prompt Enhancement)** | Simplify complexity and express accurately | Prompt optimization, context enhancement, historical dialogue integration | ⚙️ Optional |
### 🚀 Auxiliary Functions
| Function | Description |
|:---|:---|
| 📱 **Telegram Bot Notification** | Supports pushing interactive pop-ups to Telegram for remote interaction (requires configuration of Bot Token and Chat ID) |
| 🔄 **Continue Reply** | Automatically detects incomplete replies and supports custom thresholds (default 1000 characters) and prompts |
| 🎵 **Sound Effect Reminder** | Plays a custom sound effect when an MCP pop-up appears, supports custom sound effect URLs |
| 🖼️ **Window Management** | Automatically adjusts size, keeps on top, and fixed mode, supports custom window sizes |
| 🎨 **Theme Customization** | Dark/light theme switching, custom font family and size |
| ⌨️ **Keyboard Shortcuts** | Configurable global keyboard shortcuts (customizable in the settings page) |
| 🌐 **Proxy Settings** | Supports HTTP/SOCKS5 proxy, configurable to enable only for specific requests |
### ⚙️ Advanced Configuration Options
The following configurations can be adjusted in the settings page or configuration file:
| Configuration Item | Type | Description | Default Value |
|:---|:---|:---|:---|
| `skill_python_path` | String | Custom Python interpreter path (used for skill runtime) | System PATH |
| `context7_api_key` | String | Context7 API Key (optional, improves API call rate limits) | Empty |
| `smart_wait_range` | Numeric | Intelligent waiting range for sou tool (seconds) | 1-5 |
| `icon_cache_expiry_minutes` | Numeric | Icon cache expiration time (minutes) | 30 |
| `auto_continue_threshold` | Numeric | Character threshold for automatic continuation of replies | 1000 |
| `request_timeout_ms` | Numeric | MCP request timeout time (milliseconds) | 30000 |
| `max_retry_count` | Numeric | Maximum number of MCP request retries | 3 |
> 💡 **Tip**: The configuration file is located in the system configuration directory:
> - **Windows**: `%APPDATA%\sanshu\settings.json`
> - **macOS/Linux**: `~/.config/sanshu/settings.json`
## 🛠️ Advanced Usage Guide
### 1. 🔍 sou Code Search Advanced Configuration
The semantic search capability of the `sou` tool is based on the built-in `acemcp` engine. For the best experience, you may need to adjust the relevant configurations:
- **acemcp_batch_size**: Controls the batch size when building the index (default 10). When the video memory/memory is large, it can be increased to 20-50 to speed up the indexing.
- **acemcp_max_lines_per_blob**: The maximum number of lines per code block (default 800). Increasing this value can retain more context, but will increase Token consumption.
- **Smart Wait**: When it detects that the background is indexing changed files, `sou` will automatically wait for 1-5 seconds (`smart_wait_range`). This is to prevent reading old code snapshots.
### 2. 🌐 Network and Proxy Details
sanshu has a built-in intelligent proxy management function to ensure that it is still available in complex network environments:
- **auto_detect**: Enabled by default. sanshu will automatically try to read system proxy settings or common proxy ports (such as 7890).
- **only_for_cn**: Enabled by default. When enabled, the proxy is only used when a domestic network environment is detected or access to restricted resources is detected to avoid affecting the speed of internal network access.
- **Supported protocols**: HTTP / SOCKS5. It is recommended to use SOCKS5 for better performance.
### 3. 🎨 UI/UX Pro Max Hidden Parameters
The `uiux` tool supports some advanced parameters that are not in the regular prompts, which can be called through the `custom` action:
- **persist**: `true/false` (default false). Whether to save the generated design system or component as a local file.
- **output_dir**: Specify the save path (defaults to `src/design` or `src/components`).
- **domain**: Restrict specific domains when searching for materials (such as `dribbble.com`).
### 🧠 zhi - Intelligent Code Review and Interaction
> **"Assess the situation and act wisely"**
- **Interactive decision-making**: Actively ask users for their intentions through MCP pop-ups to avoid AI acting arbitrarily
- **Multi-modal input**: Supports multiple interaction methods such as text, images, and predefined options
- **State visualization**: Real-time display of back-end task status (such as indexing progress) to make collaboration more transparent
<div align="center">
<img src="screenshots/popup.png" alt="Zhi Popup Interaction" width="700" />
<p><em>Zhi Intelligent Interaction Pop-up - A mandatory interaction interface to ensure the transparency of AI decision-making</em></p>
</div>
### 📚 ji - Memory Management System
> **"Be well-informed and review the past to know the new"**
- **Global memory**: Store project-level rules, preferences, best practices, and context
- **Automatic recall**: Automatically load relevant memories at the beginning of each conversation to maintain context consistency
- **Classification management**: Supports multi-dimensional management such as Rule, Preference, Pattern, and Context
### 🔍 sou - Code Semantic Search Engine
> **"Search for the hidden and see everything clearly"**
- **Semantic search**: Based on the acemcp engine, supports natural language query code base
- **Incremental indexing**: Real-time monitoring of file changes, automatic maintenance of the latest index
- **Intelligent waiting**: Automatically balances speed and completeness when the index is updated
### 📖 context7 - Framework Document Query
> **"Draw on the strengths of others and keep pace with the times"**
Query the latest framework and library documentation, supporting mainstream frameworks such as Next.js, React, Vue, and Spring.
- **Free to use**: No need to configure an API Key to use, configuring it will give you a higher rate limit
- **Intelligent fallback**: When the library identifier is incorrect, automatically search for candidate libraries and provide suggestions
- **Real-time documentation**: Get the latest official documentation of the framework to avoid the problem of outdated AI knowledge
**Example Usage**:
```json
{
"library": "vercel/next.js",
"topic": "routing",
"version": "15.1.0"
}
```
**Supported Library Examples**:
- `vercel/next.js` - Next.js framework
- `facebook/react` - React library
- `vuejs/vue` - Vue.js framework
- `spring-projects/spring-framework` - Spring framework
- `mybatis/mybatis-3` - MyBatis ORM
**Configuration Instructions**:
- API Key (optional): Configure in the "MCP Tools" tab of the settings page
- Configuring an API Key gives you a higher API call rate limit
<div align="center">
<img src="screenshots/mcp-tool.png" alt="MCP工具配置界面" width="700" />
<p><em>MCP Tool Configuration Interface - Context7 Document Query Tool Settings</em></p>
</div>
### 🎨 icon - Icon Download and Management
> **"Convey meaning through images and use them freely"**
- **Icon search**: Search the Iconfont icon library by keyword
- **Batch download**: Supports multi-select, batch save SVG/PNG
- **Path configurable**: The default save path can be adjusted in the settings
**Usage (MCP Tool)**:
```json
{
"query": "search keyword",
"style": "line",
"save_path": "assets/icons",
"project_root": "C:/path/to/project"
}
```
**Instructions**:
- `style` optional: line / fill / flat / all
- `save_path` is relative to the project root path
- The tool name is `tu`, and the interface displays "Icon Workshop"
### 🧩 skill - Skill MCP (Built-in UI/UX Pro Max)
> **"Unify all skills and load them as needed"**
The skill runtime is used to discover, load, and execute local skills. Currently, the built-in `ui-ux-pro-max` skill (located in `skills/ui-ux-pro-max`) supports UI/UX design system and search capabilities.
**Skill Discovery Directory (Default Scan)**:
- Within the project: `.codex/skills`, `.claude/skills`, `.continue/skills`, `.opencode/skills`, `.trae/skills`, `.windsurf/skills`, `.cursor/skills`, `.gemini/skills`, `.roo/skills`, `.kiro/skills`, `.qoder/skills`, `.codebuddy/skills`, `.agent/skills`, `.shared/skills`, `skills/`
- User global: `~/.codex/skills`
**Runtime Constraints**:
- Only Python entry is supported
- The system PATH is used by default, and the Python path can be specified by configuring `skill_python_path`
**Usage (Independent Tool)**:
```json
{
"action": "search",
"query": "beauty spa wellness service"
}
```
**Usage (General Tool)**:
```json
{
"skill_name": "ui-ux-pro-max",
"action": "design_system",
"query": "beauty spa wellness service"
}
```
**ui-ux-pro-max Supported Actions**:
- `search`: General search
- `design_system`: Generate design system recommendations
- `custom`: Allows passing custom parameters
The skill entry is declared by `skill.config.json`, and when no manifest is provided, the default entry will be used by convention (for example, `scripts/search.py`).
---
## 📦 Installation and Usage
### Environment Requirements
| Dependency | Version Requirement | Description |
|------|----------|------|
| Rust | 1.70+ | Back-end compilation |
| Node.js | 18+ | Front-end build |
| pnpm | 8+ | Package manager |
### 🚀 Quick Start
#### Method 1: Download Pre-compiled Binaries
<div align="center">
**📦 General Installation Method - Supports All Platforms**
</div>
If you choose to download the pre-compiled executable file directly, please follow the steps below to complete the installation and environment configuration.
```
#### 1️⃣ Download and Place Executable File
Download the compressed package for your platform from the [Releases page](https://github.com/yuaotian/sanshu/releases), extract it, and place the executable file in the following recommended directory:
| Platform | Recommended Installation Path | Description |
|------|-------------|------|
| **Windows** | `C:\Program Files\sanshu\` | Requires administrator privileges |
| **Windows** | `%LOCALAPPDATA%\sanshu\` | No administrator privileges required (recommended) |
| **Linux** | `~/.local/bin/` | User-level installation (recommended) |
| **Linux** | `/usr/local/bin/` | System-level installation, requires sudo |
| **macOS** | `~/.local/bin/` | User-level installation (recommended) |
| **macOS** | `/usr/local/bin/` | System-level installation, requires sudo |
#### 2️⃣ Configure Environment Variables
Add the directory containing the executable file to the system PATH environment variable:
<details>
<summary>🪟 Windows Configuration Method</summary>
**Method 1: Through System Settings (Graphical Interface)**
1. Press `Win + R`, enter `sysdm.cpl`, and press Enter
2. Click the "Advanced" tab → "Environment Variables"
3. Find `Path` in "User variables" or "System variables", and click "Edit"
4. Click "New", add the directory where the executable file is located (e.g., `C:\Program Files\sanshu\`)
5. Click "OK" to save, **restart the terminal** for the configuration to take effect
**Method 2: Through PowerShell Command**
```powershell
# Add to user-level PATH (no administrator privileges required)
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$userPath;C:\Program Files\sanshu\", "User")
# Or add to system-level PATH (requires administrator privileges)
$machinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")
[Environment]::SetEnvironmentVariable("Path", "$machinePath;C:\Program Files\sanshu\", "Machine")
```
> ⚠️ After the configuration is complete, you need to **restart the terminal** or **re-login** for the configuration to take effect.
</details>
<details>
<summary>🐧 Linux Configuration Method</summary>
Depending on the Shell you are using, edit the corresponding configuration file:
```bash
# Bash user (edit ~/.bashrc)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Zsh user (edit ~/.zshrc)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Or edit ~/.profile (effective for all Shells)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
source ~/.profile
```
</details>
<details>
<summary>🍎 macOS Configuration Method</summary>
Depending on the Shell you are using, edit the corresponding configuration file:
```bash
# Zsh user (macOS default Shell, edit ~/.zshrc)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Bash user (edit ~/.bash_profile)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
```
</details>
#### 🍺 Alternative for macOS Users: Homebrew Installation
macOS users can also choose a more convenient Homebrew installation method:
```bash
# 1. Add Sanshu's Tap repository
brew tap yuaotian/tap
# 2. Install Sanshu
brew install sanshu
# 3. Verify installation (optional)
sanshu --version
```
**Homebrew Advantages**:
- 🤖 **Automatic Updates**: Use `brew upgrade sanshu` to update after a new version is released
- 🔧 **Dependency Management**: Automatically handles all dependencies, no need to manually configure PATH
- 🛡️ **Security Verification**: Automatically verifies the integrity of binary files
**Common Operations**:
```bash
# Update Sanshu to the latest version
brew upgrade sanshu
# View installed version
brew info sanshu
# Uninstall Sanshu
brew uninstall sanshu
# Remove Tap repository
brew untap yuaotian/tap
```
> **💡 Tip**: Homebrew installation does not require manual configuration of environment variables. After installation, you can directly use the `sanshu` command.
#### 3️⃣ Verify Installation
Open a **new terminal window** and run the following command to verify that the configuration is successful:
```bash
# Use Chinese command name
三术 --version
# Or use Pinyin command name
sanshu --version
```
If the version number is displayed correctly (e.g., `sanshu 0.2.x`), it means that the environment variable configuration is successful.
#### ⚠️ Important Notes
> **Environment variable configuration is a prerequisite for the MCP client to work properly.**
>
> - ✅ **Environment variables configured**: You can directly use `"command": "三术"` or `"command": "sanshu"` in the MCP configuration
> - ❌ **Environment variables not configured**: You need to use the **full path** in the MCP configuration, for example:
> ```json
> {
> "mcpServers": {
> "sanshu": {
> "command": "C:\\Program Files\\sanshu\\三术.exe"
> }
> }
> }
> ```
### Standalone Command Line Invocation
In environments where MCP cannot be used (such as pure terminal or CI processes), you can directly call `等一下.exe` to initiate a zhi interactive pop-up window.
**Example:**
```bash
等一下.exe --cli --message "请选择发布策略" --options "灰度发布,全量发布" --markdown --project-root "D:/repo"
```
**Parameter List:**
- `--cli`: Command line interaction mode identifier
- `--message` / `-m`: Required, pop-up window message content
- `--options` / `-o`: Optional, comma-separated predefined options
- `--option`: Optional, single option (can be repeated)
- `--markdown` / `--no-markdown`: Optional, whether to render as Markdown (default `true`)
- `--project-root`: Optional, project root directory path
- `--uiux-intent`: Optional, `none/beautify/page_refactor/uiux_search`
- `--uiux-context-policy`: Optional, `auto/force/forbid`
- `--uiux-reason`: Optional, UI/UX context addition reason
**Output Rules:**
- stdout outputs structured JSON (easy for script parsing)
- stderr outputs human-readable prompts/errors
- User cancels: stdout outputs `{"cancelled": true}`, exit code 2
- Parameter error: stderr prompt, exit code 2
#### Method 2: Build from Source Code
<div align="center">
**🔧 Developer Options - Requires Rust/Node.js Environment**
</div>
**Applicable Scenarios**:
- Developers who want to modify the source code or contribute code
- Users who need to customize build options
- Technical enthusiasts who are deeply interested in learning about the project
**Environment Requirements**:
```bash
# 1. Clone the repository
git clone https://github.com/yuaotian/sanshu.git
cd sanshu
# 2. Install front-end dependencies
pnpm install
# 3. Build the project
pnpm build
cargo build --release
# 4. Install CLI tools
# Linux/macOS
./install.sh
# Windows
./install-windows.ps1
```
#### Common Development Commands
##### 📦 Development Mode
```bash
# Start the front-end development server (hot reload)
pnpm dev
# Start Tauri development mode (start both front-end and back-end, support hot reload)
pnpm tauri:dev
# Or use Cargo to directly start Tauri development mode
cargo tauri dev
```
##### 🔨 Build and Package
```bash
# Build the front-end (generate the dist directory)
pnpm build
# Cargo builds the back-end (Debug mode, fast compilation for development and debugging)
cargo build
# Cargo builds the back-end (Release mode, optimize size and performance)
cargo build --release
# Tauri complete packaging (generate installation package, including front-end and back-end)
pnpm tauri:build
# Or
cargo tauri build
# Package output location:
# - Windows: src-tauri/target/release/bundle/
# - macOS: src-tauri/target/release/bundle/dmg/ or .app
# - Linux: src-tauri/target/release/bundle/deb/ or .AppImage
```
##### 🧪 Testing
```bash
# Run all Rust tests
cargo test
# Run specific tests (supports fuzzy matching)
cargo test <test name keywords>
# Show test output (including println! etc.)
cargo test -- --nocapture
# Run front-end test UI (if any)
pnpm test:ui
```
##### 🛠️ Code Quality Check
```bash
# Quickly check code (does not generate binary files, faster than build)
cargo check
# Code formatting (automatically fix formatting issues)
cargo fmt
# Code quality check (Clippy static analysis, find potential problems)
cargo clippy
# Clippy strict mode (treat warnings as errors)
cargo clippy -- -D warnings
# Front-end code check and automatic repair
pnpm lint
```
##### 🧹 Clean Up Build Artifacts
```bash
# Clean up Cargo build artifacts (target directory)
cargo clean
# Clean up front-end build artifacts (dist directory and node_modules)
rm -rf dist node_modules
# Windows PowerShell:
# Remove-Item -Recurse -Force dist, node_modules
# Completely clean and reinstall dependencies
cargo clean
rm -rf node_modules
pnpm install
```
##### 🚀 Other Common Commands
```bash
# View project dependency tree
cargo tree
# Update Rust dependencies to the latest compatible version
cargo update
# View outdated npm dependencies
pnpm outdated
# Update npm dependencies
pnpm update
# Run the front-end preview server (preview the built artifacts)
pnpm preview
```
**💡 Tips**:
- It is recommended to use `pnpm tauri:dev` during development, which can start both the front-end and back-end and support hot reload
- The first build of the Release version may take a long time (5-10 minutes), and subsequent incremental builds will be much faster
- If you encounter strange compilation errors, try `cargo clean` and rebuild
- If Windows users encounter permission issues, please run PowerShell as an administrator
### ⚙️ Configure MCP Client
Add to your MCP client configuration file:
```json
{
"mcpServers": {
"sanshu": {
"command": "三术"
}
}
}
```
PS: Some plugins or CLI tools may not be able to correctly identify the Chinese name `三术`. Please use the Pinyin `sanshu` as the name, otherwise it may not be correctly identified.
<div align="center">
<img src="screenshots/setting.png" alt="Setting Page" width="750" />
<p><em>Setting Page - Complete configuration options and tool management interface</em></p>
</div>
### 📝 Enable Prompts in AI Editor (Optional)
> 💡 **Tip**: If you are using Augment Ace or other AI editors that support MCP, it is recommended to enable the prompt protocol provided by this repository for the best experience.
**Configuration Steps**:
1. Open the **System Prompt / Project-Level Default Prompt** configuration entry of the editor
2. Copy the complete content of `sanshu_prompt_word.md` in the root directory of the repository to this configuration
3. Make sure that "Sanshu" has been registered as an MCP service and can be connected normally according to the "Configure MCP Client" section above
4. After that, when calling AI in the editor, it will automatically follow the AURA-X-KYS protocol
### 🖥️ Command Line Version of Prompts (Applicable to Non-MCP Environments such as Windsurf)
> **💡 Tip**: This version is designed for Windsurf users and environments where MCP cannot be used (pure terminal, CI/CD, remote SSH).
**File Location**: `sanshu_prompt_word_cli.md` in the project root directory
#### 🌟 Special Benefits for Windsurf Users
**Did you know that Windsurf's dialogue billing mechanism is calculated by session rather than the number of messages?**
Using the Sanshu CLI version of prompts, you can interact with AI an unlimited number of times in the **same dialogue session**, greatly saving your point consumption.
**Principle**:
1. After configuring the Sanshu CLI version of prompts, AI will be instructed to use the `等一下 --cli` tool for interaction.
2. As long as you do not actively enter "End Dialogue" or similar instructions, AI will continuously loop through tasks in the current session.
3. This "continuous dialogue mode" allows complex tasks that originally required multiple new sessions to be completed with only one session point!
#### 🔗 Relationship with MCP Version
- **Consistent Functionality**: Fully retains the core functions of Sanshu, such as mandatory interaction, predefined option confirmation, and Markdown rendering.
- **Independent Operation**: Completely decoupled from the MCP service, relying only on the `等一下` (sanshu) executable file, with stronger risk control capabilities.
- **Optimized for**: Specifically optimized for potential restrictions on the MCP `zhi` tool in editors such as Windsurf.
#### 🚀 How to Use
1. **Configure Prompts**:
Open the system prompt settings of the editor and copy all the contents of `sanshu_prompt_word_cli.md` into it.
2. **Start Interaction**:
Ask AI questions in the dialogue box as usual. AI will automatically call the command line tool to confirm with you as needed.
**Manual Call Example** (usually done automatically by AI):
```bash
等一下 --cli --message "Prepare to perform refactoring, continue?" --options "Continue,Cancel"
```
3. **Enjoy Unlimited Interaction**:
In Windsurf, you can freely discuss details and repeatedly modify them with AI without worrying about points being lost rapidly.
---
## 🚀 Core Features and Processes
### 1️⃣ Intelligent Waiting Mechanism of sou Tool
When AI initiates a search request, if the system detects that the index is being updated, it will automatically perform intelligent waiting to ensure the accuracy of the results.
```text
+-----+ Query +-----+
| AI | ---------------> | MCP |
+-----+ +-----+
|
v
+-----------------+
| Index Status? |
+-----------------+
/ \
[Indexing] [Idle]
| |
v v
+--------------+ +----------+
| Smart Wait | | Search |
| (1-5s Rnd) | +----------+
+--------------+ ^
| |
+---------------+
```
### 2️⃣ Index Preheating Function of ji Tool
When a user operates memory through the ji tool, the system will intelligently predict the code context that may be needed and silently trigger index preheating in the background.
```text
+------+ Add/Read +-----+ Trigger +--------+
| User | -------------> | ji | -------------> | Indexer|
+------+ Memory +-----+ Background +--------+
|
v
+-------------+
| File Watcher|
+-------------+
|
+-------------+
| Update Index|
+-------------+
```
### 3️⃣ Visualization of zhi Tool Index Status
In the MCP popup, users can see the progress of the background index in real time, no longer facing a black box waiting.
```text
+-----+ Request +-----+ Poll +--------+
| AI | ----------------> | zhi | <-------------> | Status |
+-----+ +-----+ +--------+
|
v
+---------------+
| Render Popup |
| [||||||| 45%] |
+---------------+
```
### 4️⃣ acemcp Incremental Indexing Process
The efficient incremental indexing mechanism ensures that only changed files are processed, greatly reducing resource consumption.
```text
+-------+ Change +---------+ Diff +---------+
| Files | -----------> | Watcher | ---------> | SHA-256 |
+-------+ +---------+ +---------+
|
[Hash Diff]
|
v
+-------------+
| Index Engine|
| (Update DB) |
+-------------+
```
### 5️⃣ MCP Tool Calling Process
The complete MCP call chain enables secure and efficient interaction from AI to the local environment.
```text
+-----+ JSON-RPC +-----+ Command +-------+
| AI | -------------> | MCP | ------------> | Tauri |
+-----+ | Svr | | App |
+-----+ +-------+
|
v
+---------+
| Rust BE |
+---------+
|
v
+---------+
| Action |
+---------+
```
---
## 🤖 Collaboration with Augment Ace
### What is Augment Ace
**Augment Ace** is a new generation of AI programming assistant developed by Augment Code, natively supporting the MCP (Model Context Protocol) protocol. It is not only an intelligent code completion tool, but also an AI programming partner that can deeply understand the code base and collaborate with developers in multiple rounds.
### Core Functions and Roles
| Function | Description |
|------|------|
| **Intelligent Code Completion** | Accurate context-based code suggestions, supporting multiple languages and frameworks |
| **Code Understanding and Explanation** | Quickly understand complex code logic and generate clear code comments and documentation |
| **Refactoring and Optimization Suggestions** | Identify code smells and provide refactoring solutions that comply with best practices |
| **MCP Tool Integration** | Natively supports calling external tools through MCP to achieve deep collaboration between AI and the local environment |
| **Multi-turn Dialogue Collaboration** | Supports step-by-step execution of complex tasks and maintains context consistency |
### Why Recommend Using Augment Ace
1. **One-stop Development Experience**: Complete writing, refactoring, searching, and memory management in the same editor without switching back and forth between multiple tools.
2. **Strong Constraints and Controllability**: Combined with the prompt word protocol provided in this repository (`sanshu_prompt_word.md`), AI can strictly follow KISS / YAGNI / SOLID, and use the zhi tool to confirm key decisions.
3. **Friendly to Rust / Front-end Projects**: The Sanshu backend is built based on Rust, and the front-end is based on TypeScript/Vue3. Calling these capabilities in Ace can obtain a stable and low-latency collaborative experience.
---
### AURA-X-KYS Prompt Protocol
The `sanshu_prompt_word.md` in the root directory of the repository defines the **AURA-X-KYS protocol**, which is an AI behavior specification and workflow prompt word tailored for the Sanshu environment.
#### Collaborative Relationship with Sanshu MCP
```
┌─────────────────────────────────────────────────────────────┐
│ AURA-X-KYS Protocol │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ KISS Principle │ │ YAGNI Principle │ │ SOLID Principle │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ └────────────────┼────────────────┘ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ Sanshu MCP Toolset │ │
│ │ ┌─────┬─────┬─────┐ │ │
│ │ │ zhi │ ji │ sou │ │ │
│ │ │ 智 │ 记 │ 搜 │ │ │
│ │ └─────┴─────┴─────┘ │ │
│ └───────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
```
- **zhi (智)**: As a mandatory interaction gateway, ensure that all key decisions of AI are confirmed by the user
- **ji (记)**: Persistently store project rules, preferences, and context to maintain consistency in long-term collaboration
- **sou (搜)**: Provide semantic search capabilities, allowing AI to quickly locate and understand code
#### Core Values and Advantages
| Feature | Description |
|------|------|
| **8 Non-Overridable Principles** | Core design philosophy, absolute control, knowledge authority, persistent memory, context awareness, silent execution, efficiency first, quality assurance |
| **4-Level Task Complexity Grading** | Level 1 (Atomic Task) → Level 2 (Standard Task) → Level 3 (Complex Task) → Level 4 (Exploratory Task) |
| **Confidence-Driven Operation Mode** | Automatically select INTERACTIVE or AUTONOMOUS mode based on task complexity and confidence |
| **Mandatory Interaction Gateway** | All key decisions must be confirmed through the zhi tool of Sanshu MCP, and AI will never make its own decisions |
| **Dynamic Protocol Rules** | Support intelligent error handling and dynamic process adjustment (upgrade/downgrade) |
#### Simplified Prompt Configuration
Users can choose the following configuration methods according to their needs:
**Configuration Method**:
1. **Configure in AI IDE** (Recommended): Configure the simplified prompt as a system prompt / project-level default prompt
2. **Attach to Each Dialogue** (Alternative): Attach the simplified prompt to the end of each message to avoid protocol failure due to AI model context loss
⚠️ **Important Tips**:
- If the `sou` indexing function is **not configured**, please use the "Standard Edition" prompt (containing only `zhi` and `ji`)
- If the indexing configuration is **completed**, please use the "Full Edition" prompt (containing `zhi`, `ji`, and `sou`)
- Using unconfigured functions will cause tool call failures
<details>
<summary>📋 Standard Edition Simplified Prompt (zhi + ji)</summary>
```markdown
# AURA-X-KYS Simplified Protocol
## Who are you
You are an AI programming assistant that strictly follows the AURA-X-KYS protocol.
Your core identity is: **the user's code collaborator, not an independent decision maker**.
All key decisions are controlled by the user, and AI will never make its own decisions.
## Behavioral Contract (Non-Violable)
1. **Code Quality Contract**: All code generation and refactoring suggestions must strictly follow the KISS / YAGNI / SOLID principles
2. **Interaction Control Contract**: All key decisions, plan selections, and task completion confirmations must be performed through the `zhi` (智) tool
3. **Memory Management Contract**: Load project memory `ji` (记) when the dialogue starts, and store important information to `ji` (记) when the user says "Please remember"
4. **Knowledge Authority Contract**: When the latest framework documentation is needed or AI internal knowledge is uncertain, prioritize using the `context7` tool to query authoritative sources
## Prohibited Behaviors
- ❌ Do not directly ask questions to the user (must use the `zhi` tool)
- ❌ Do not unilaterally end the task (must be confirmed by `zhi`)
- ❌ Do not generate summary Markdown documents
- ❌ Do not generate test scripts
- ❌ Do not execute compilation and running commands (handled by the user)
## Tool Calling Rules
### ji (记) - Memory Management
- **Dialogue Start**: Call `ji`'s `recall` function to load project memory
- **User Says "Please Remember"**: Call `ji`'s `memory` function to store information
- **Classification**: `rule` / `preference` / `pattern` / `context`
### zhi (智) - Mandatory Interaction Gateway
- **When Requirements are Unclear**: Provide predefined options through `zhi` to allow users to clarify
- **When Multiple Options Exist**: List all options through `zhi` (with KISS/YAGNI/SOLID analysis and recommendation labels)
- **When Planning to Change**: Propose and obtain user approval through `zhi`
- **Before Task Completion**: Must request final confirmation through `zhi`
### context7 - Framework Documentation Query
- **Get the Latest Documentation**: Use when you need to query the latest official documentation of a framework/library (such as Next.js, React, Spring, etc.)
- **AI Knowledge is Uncertain**: When AI internal knowledge may be outdated or uncertain, prioritize using `context7` to query authoritative documentation
- **Avoid Hallucinations**: Use real-time documentation instead of relying on training data to ensure information accuracy
- **Library Identifier Format**: Use the `owner/repo` format (such as `vercel/next.js`, `facebook/react`). If you are not sure of the complete identifier, you can use a short name first, and the tool will automatically search for candidate libraries.
## Dialogue Startup Check
1. Call `ji` to load project memory
2. Evaluate task complexity and confidence
3. Declare that you will follow the KISS / YAGNI / SOLID principles
## Core Requirements
- All AI-generated comments and logs use Chinese
- Code modifications must have clear Chinese comments explaining the intention
- Keep the dialogue natural and smooth, actively clarify, and encourage feedback
```
</details>
<details>
<summary>📋 Full Edition Simplified Prompt (zhi + ji + sou)</summary>
```markdown
# AURA-X-KYS Simplified Protocol
## Who are you
You are an AI programming assistant that strictly follows the AURA-X-KYS protocol.
Your core identity is: **the user's code collaborator, not an independent decision maker**.
All key decisions are controlled by the user, and AI will never make its own decisions.
## Behavioral Contract (Non-Violable)
1. **Code Quality Contract**: All code generation and refactoring suggestions must strictly follow the KISS / YAGNI / SOLID principles
2. **Interaction Control Contract**: All key decisions, plan selections, and task completion confirmations must be performed through the `zhi` (智) tool
3. **Memory Management Contract**: Load project memory `ji` (记) when the dialogue starts, and store important information to `ji` (记) when the user says "Please remember"
4. **Search Priority Contract**: When you need to find code, prioritize using `sou` (搜) to perform natural semantic search for relevant code
5. **Knowledge Authority Contract**: When the latest framework documentation is needed or AI internal knowledge is uncertain, prioritize using the `context7` tool to query authoritative sources
## Prohibited Behaviors
- ❌ Do not directly ask questions to the user (must use the `zhi` tool)
- ❌ Do not unilaterally end the task (must be confirmed by `zhi`)
- ❌ Do not generate summary Markdown documents
- ❌ Do not generate test scripts
- ❌ Do not execute compilation and running commands (handled by the user)
## Tool Calling Rules
### ji (记) - Memory Management
- **Dialogue Start**: Call `ji`'s `recall` function to load project memory
- **User Says "Please Remember"**: Call `ji`'s `memory` function to store information
- **Classification**: `rule` / `preference` / `pattern` / `context`
### zhi (智) - Mandatory Interaction Gateway
- **When Requirements are Unclear**: Provide predefined options through `zhi` to allow users to clarify
- **When Multiple Options Exist**: List all options through `zhi` (with KISS/YAGNI/SOLID analysis and recommendation labels)
- **When Planning to Change**: Propose and obtain user approval through `zhi`
- **Before Task Completion**: Must request final confirmation through `zhi`
### sou (搜) - Semantic Search
- **When Finding Code**: Use `sou` to perform semantic search and quickly locate relevant code
- **When Understanding Context**: Use `sou` to search for relevant implementations and call relationships
- **Before Editing**: Use `sou` to confirm the code location and scope of impact to be modified
### context7 - Framework Documentation Query
- **Get the Latest Documentation**: Use when you need to query the latest official documentation of a framework/library (such as Next.js, React, Spring, etc.)
- **AI Knowledge is Uncertain**: When AI internal knowledge may be outdated or uncertain, prioritize using `context7` to query authoritative documentation
- **Avoid Hallucinations**: Use real-time documentation instead of relying on training data to ensure information accuracy
- **Library Identifier Format**: Use the `owner/repo` format (such as `vercel/next.js`, `facebook/react`). If you are not sure of the complete identifier, you can use a short name first, and the tool will automatically search for candidate libraries.
## Dialogue Startup Check
1. Call `ji` to load project memory
2. Evaluate task complexity and confidence
3. Declare that you will follow the KISS / YAGNI / SOLID principles
## Core Requirements
- All AI-generated comments and logs use Chinese
- Code modifications must have clear Chinese comments explaining the intention
- Keep the dialogue natural and smooth, actively clarify, and encourage feedback
```
</details>
---
#### Full Prompt Content
<details>
<summary>📋 Click to expand and view the full prompt instructions</summary>
The complete AURA-X-KYS prompt protocol is stored in the [`sanshu_prompt_word.md`](sanshu_prompt_word.md) file in the project root directory.
**How to View**:
- **GitHub**: Click the link above to view directly
- **Local**: Find the `sanshu_prompt_word.md` file in the project root directory
**How to Use**:
1. Open the `sanshu_prompt_word.md` file
2. Copy the complete content
3. Paste it into the "System Prompt" or "Project-Level Default Prompt" configuration of the AI editor
4. Make sure that "Sanshu" has been registered as an MCP service according to the "Configure MCP Client" section above
> 💡 **Tip**: The full version of the prompt contains detailed protocol rules, task complexity grading, operation mode instructions, etc., which is suitable for users who need to deeply understand the protocol details. If you only need to get started quickly, you can use the "Simplified Prompt" below.
</details>
## 🚀 Version Release Process
This project uses GitHub Actions to implement a fully automated version release process, supporting multi-platform builds and Homebrew distribution.
### Preparation Before Release
Before releasing a new version, please ensure that:
- [ ] All code has been merged into the `main` branch
- [ ] CI check passed (code check, Clippy specification check)
- [ ] Important functions have been tested
- [ ] CHANGELOG or commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/) specification
### Version Number Specification
This project follows the [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/) specification:
| Version Type | Format | Applicable Scenarios | Example |
|----------|------|----------|------|
| `patch` | x.y.**Z** | Backward compatible bug fixes | 0.2.3 → 0.2.4 |
| `minor` | x.**Y**.0 | Backward compatible new features | 0.2.3 → 0.3.0 |
| `major` | **X**.0.0 | Incompatible API changes | 0.2.3 → 1.0.0 |
| `custom` | Custom | Special version number requirements | Any format |
### Release Steps
#### Method 1: Manually Trigger via GitHub Actions (Recommended)
This is the easiest way to release, automatically handling version number updates, Tag creation, and multi-platform builds:
1. Go to the **Actions** page of the GitHub repository
2. Select **Release Pipeline** on the left
3. Click the **Run workflow** button on the right
4. Select the version type:
- `patch` - Fix version
- `minor` - Feature version
- `major` - Major version
- `custom` - Custom version (version number required)
5. Click **Run workflow** to start the release
#### Method 2: Trigger via Git Tag
If you prefer to manually control the version number, you can directly create and push a Tag:
```bash
# 1. Make sure you are on the main branch and the code is up to date
git checkout main
git pull origin main
# 2. Manually update version files (optional, the workflow will handle it automatically)
# - Cargo.toml
# - package.json
# - tauri.conf.json
# - version.json
# 3. Create an annotated Tag
git tag -a v0.2.4 -m "Release v0.2.4"
# 4. Push Tag to trigger the release process
git push origin v0.2.4
```
### Automation Process Description
The release workflow automatically performs the following steps:
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Prepare │ ─▶ │ Multi- │ ─▶ │ Publish │ ─▶ │ Homebrew │
│ Release │ │ Platform │ │ Release │ │ Update │
│ │ │ Build │ │ │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │ │ │
▼ ▼ ▼ ▼
• Calculate • macOS ARM64 • Generate • Update recipe
version number • macOS x86_64 Changelog • Calculate SHA256
• Update version • Linux x86_64 • Create Release • Push to Tap
files • Windows x86_64 • Upload build
• Create Git Tag artifacts
```
**Build Artifacts**:
| Platform | Filename Format |
|------|-----------|
| macOS ARM64 | `sanshu-cli-v{version}-macos-aarch64.tar.gz` |
| macOS x86_64 | `sanshu-cli-v{version}-macos-x86_64.tar.gz` |
| Linux x86_64 | `sanshu-cli-v{version}-linux-x86_64.tar.gz` |
| Windows x86_64 | `sanshu-cli-v{version}-windows-x86_64.zip` |
### Verify Release
After the release is complete, you can verify it in the following ways:
1. **GitHub Releases**: Visit the [Releases page](https://github.com/yuaotian/sanshu/releases) to confirm that the new version has been released.
2. **Build Artifacts**: Check if the Release contains build artifacts for all platforms.
3. **Homebrew Update**:
```bash
# Update Tap
brew update
# View available versions
brew info sanshu
# Upgrade to the new version
brew upgrade sanshu
```
---
## 🛠️ Technical Architecture
```text
┌─────────────────────────────────────────────────────────────────┐
│ Sanshu Technical Architecture │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Frontend Layer (Vue 3 + TypeScript) │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ McpPopup │ │ useAcemcp │ │ Settings │ │ │
│ │ │ Component │ │ Sync │ │ View │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Tauri Bridge (IPC) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Backend Layer (Rust + Tokio) │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ MCP Server │ │ Indexer │ │ Memory │ │ │
│ │ │ (JSON-RPC)│ │ Engine │ │ Store │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
```
### 🦀 Backend Architecture (Rust)
| Module | Function | Key Implementation |
|------|------|----------|
| **Index State Management** | Precisely control the index lifecycle | `InitialIndexState` enum |
| **State Query** | Get the current index health | `get_initial_index_state()` |
| **Background Task** | Ensure reliable execution of index tasks | `ensure_initial_index_background()` |
| **High-Performance Runtime** | Asynchronous concurrent processing | Tokio asynchronous runtime |
### 🎨 Frontend Integration (TypeScript/Vue 3)
| Module | Function | Key Implementation |
|------|------|----------|
| **Reactive State** | Encapsulate complex synchronization logic | `useAcemcpSync` composable |
| **Interactive Component** | State display and interaction | `McpPopup` component |
| **Configuration Management** | Fine-grained configuration support | `smart_wait_range` (default 1-5s) |
---
---
## ☯️ Philosophy
<div align="center">
**"The Way begets one; one begets two; two begets three; three begets all things."**
*—— Tao Te Ching*
</div>
The name "Sanshu" (三术) is inspired by the Tao Te Ching. In the context of AI-assisted programming, it symbolizes the creative process from nothing to something, from simple to complex:
| Concept | Correspondence | Meaning |
|:---:|:---:|:---|
| **The Way** | The Way | The core ideas and logic of programming |
| **One** | Zhi (智) | Establish direction, distinguish right from wrong. All creation begins with correct decisions and reviews |
| **Two** | Ji (记) | Accumulate experience, form norms. Based on decisions, precipitate into reusable knowledge and memory |
| **Three** | Sou (搜) | Explore the unknown, connect all things. Based on wisdom and memory, connect to the vast world of code through search |
| **Myriad Things** | Myriad Things | Through the cyclical interaction of these three, build an infinitely possible software ecosystem |
> Sanshu is not just a set of tools, but an art of balancing **"Control"**, **"Collaboration"**, and **"Intelligence"**. It allows developers to enjoy the efficiency gains brought by AI while still firmly grasping the dominant power of creation.
---
## ❓ Frequently Asked Questions (FAQ)
### What is the difference between Sanshu and other MCP tools?
Sanshu achieves deep integration of **forced interaction**, **global memory**, and **semantic search** through the three core components of **zhi (智)**, **ji (记)**, and **sou (搜)**. In particular, its unique **AURA-X-KYS protocol** ensures that AI strictly follows engineering specifications (KISS/YAGNI/SOLID) and allows users to control the final decision through MCP pop-ups, thereby avoiding the hallucinations and arbitrary actions that traditional AI assistants are prone to.
### How to verify that the MCP service is running normally?
1. **Check Logs**: View the `sanshu-mcp.log` file in the temporary directory (the specific path depends on the operating system).
2. **Use MCP Client**: In Claude Desktop or Augment Ace, if you can see the "Sanshu" toolset (zhi/ji/sou), it means the connection is normal.
3. **Status Pop-up**: When triggering Sanshu tools in the editor, you should be able to see the interactive pop-up in the lower right corner.
### Solutions for slow or stuck indexing
- **Smart Waiting**: The system automatically balances indexing speed and system resources. The initial indexing may be slower, please be patient.
- **Resource Check**: Ensure the system has enough memory and disk space.
- **Restart Service**: Try restarting the MCP client (such as restarting Claude Desktop or Augment Ace), which will restart the Sanshu MCP service.
### How to clear or rebuild the index
Index data and configuration files are stored in the system's standard configuration directory:
- **Windows**: `%APPDATA%\sanshu\`
- **macOS/Linux**: `~/.config/sanshu/`
To completely reset, you can delete the relevant database files or configuration files in this directory.
### Which programming languages are supported?
Sanshu's semantic search (`sou`) supports almost all mainstream programming languages and configuration files, including but not limited to:
- Python (`.py`), JavaScript/TypeScript (`.js`, `.ts`, `.jsx`, `.tsx`), Rust (`.rs`), Go (`.go`), Java (`.java`), C/C++ (`.c`, `.cpp`, `.h`)
- Configuration files: `.json`, `.yaml`, `.toml`, `.xml`, `.md`, `.sql`, `.sh`, etc.
You can customize the file extensions to be indexed in the settings as needed.
### Where is the memory stored, and how to back it up?
Memory data is stored in the database files under the above configuration directory. To back up, simply copy the entire configuration directory.
### Compatibility with AI editors other than Augment Ace
Sanshu is built on the standard **Model Context Protocol (MCP)**, so it is theoretically compatible with any client that supports MCP, including:
- **Claude Desktop App**
- **Augment Ace**
- **Cursor** (via MCP support)
- Other IDE plugins or tools that support MCP
### Debugging methods when encountering errors
1. **Set Environment Variable**: Set `RUST_LOG=debug` and restart the client to get detailed logs.
2. **View Logs**: Analyze the log file (usually in the temporary directory or configuration directory) and look for `ERROR` or `WARN` level records.
3. **Submit Issue**: If you cannot resolve the issue, please submit an Issue in the GitHub repository with log snippets.
---
## 🚀 Future Plans
### 📅 Development Timeline
<div align="center">
```mermaid
timeline
title Sanshu Project Roadmap
section 2025-Q4
Prompt Enhancer : done, prom-enh
ACE Public Account Pool Launch : done, ace-pool
section 2026-Q1
Multi-Model Support Expansion : planned, multi-model
Plugin Ecosystem : planned, plugin-eco
```
</div>
### ✨ Prompt Enhancer
> **Coming Soon** - Access Augment's prompt enhancement feature
<div align="center">
**Development Progress**
```
🔄 Requirements Analysis [██████████████░░░░] 85%
🏗️ Architecture Design [██████████████░░░░] 85%
⚙️ API Integration [████████░░░░░░░░░░] 60%
🧪 Functionality Testing [░░░░░░░░░░░░░░░░░░] 0%
📦 Release Preparation [░░░░░░░░░░░░░░░░░░] 0%
```
*Estimated Release Time: End of Q4 2024*
</div>
**Core Features**:
- 🤖 **Intelligent Rewriting**: Automatically optimize prompts based on context, providing richer contextual information
- 🎯 **Precise Enhancement**: Improve the response quality of AI assistants, ensuring more accurate code understanding
- 🔄 **Seamless Integration**: Perfect synergy with the existing three major tools, improving overall collaboration efficiency
**Technical Implementation**:
- Integrate Augment Prompt Enhancer API
- Intelligent context awareness and prompt reconstruction
- Support intelligent analysis of multi-language codebases
### 🎁 ACE+PromptEnhancer Public Account Pool Version
> **Public Welfare Plan** - Let more developers use it out of the box without Token
<div align="center">
**Development Progress**
```
🔄 Resource Integration [██████████████████] 100%
🏗️ Architecture Design [██████████████░░░░] 85%
🔐 Security Solution [██████████████░░░░] 85%
⚖️ Scheduling System [████████░░░░░░░░░░] 60%
🧪 Stress Testing [░░░░░░░░░░░░░░░░░░] 0%
🚀 Public Beta Launch [░░░░░░░░░░░░░░░░░░] 0%
```
*Estimated Release Time: Mid Q4 2025*
</div>
**Core Value**:
- 🆓 **Zero-Threshold Use**: No need to configure API Token, directly experience the full functionality
- 🌟 **Public Account Pool**: Shared service built on existing Token resources
- 🚀 **Out-of-the-Box**: One-click start, immediately get AI-assisted programming experience
**Technical Architecture**:
- 🔐 **Security Isolation**: Each user session is independent, ensuring data security
- ⚖️ **Intelligent Scheduling**: Load balancing based on usage frequency and response speed
- 📊 **Transparent Monitoring**: Publicly available usage statistics and resource consumption
**How to Participate**:
<div align="center">
| 💬 Contribute Feedback | 🤝 Community Co-building |
|:-----------:|:-----------:|
| Share your experience<br/>in GitHub Issues | Submit code<br/>or feature suggestions |
| [Submit Feedback](https://github.com/yuaotian/sanshu/issues) | [Contribution Guide](#-contribution-guide) |
| 💡 **Help Improve** | 🌍 **Co-build Ecosystem** |
</div>
---
> **🎯 Join us and build a better AI-assisted programming tool together!**
---
## 🤝 Contribution Guide
We welcome all forms of contribution! Whether it's reporting a bug, suggesting a new feature, or submitting code improvements.
### How to Contribute
1. **Fork** this repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'feat: Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a **Pull Request**
### Submission Specifications
This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification:
| Type | Description |
|------|------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation update |
| `style` | Code formatting adjustment |
| `refactor` | Code refactoring |
| `perf` | Performance optimization |
| `test` | Test related |
| `chore` | Build/toolchain related |
### Development Environment Requirements
- **Rust**: 1.70+
- **Node.js**: 18+
- **pnpm**: 8+
---
## 📄 License
This project is open source under the [MIT License](LICENSE).
```
MIT License
Copyright (c) 2025 sanshu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
```
---
## 🙏 Acknowledgements
Special thanks to the following projects and contributors:
- [Cunzhi](https://github.com/yuaotian/cunzhi) - Provided a solid foundation for this project
- [Model Context Protocol](https://modelcontextprotocol.io/) - Provided a standard protocol for AI and tool collaboration
- [Tauri](https://tauri.app/) - Provided a cross-platform desktop application framework
- [Augment Code](https://www.augmentcode.com/) - Provided an excellent AI programming assistant
Sanshu is a further exploration and innovation based on the original project. We extend our sincere gratitude to all contributors.
---
<div align="center">
**If this project is helpful to you, please give us a ⭐ Star!**
Made with ❤️ by the 煎饼果子(86)
</div>
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.