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/)
> **道生一,一生二,二生三,三生万物**
*智 · 记 · 搜 —— AI 辅助编程增强系统*
[功能特性](#-核心功能) •
[快速开始](#-安装与使用) •
[技术架构](#️-技术架构) •
[贡献指南](#-贡献指南) •
[许可证](#-许可证)
</div>
---
## 📥 Releases
### 快速下载
<div align="center">
**🚀 最新版本下载 - 选择适合您的平台**
</div>
#### 📦 预编译二进制文件
| 🖥️ 平台 | 📥 GitHub 直链 | 🌏 国内加速 | 📋 说明 |
|:-------:|:-------------:|:-----------:|:------:|
| **Windows x64** | [下载 .zip ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-windows-x86_64.zip) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-windows-x86_64.zip) | 64位 Windows 系统 |
| **macOS ARM64** | [下载 .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-macos-aarch64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-macos-aarch64.tar.gz) | Apple Silicon (M1/M2/M3) |
| **macOS Intel** | [下载 .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-macos-x86_64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-macos-x86_64.tar.gz) | Intel 芯片 Mac |
| **Linux x64** | [下载 .tar.gz ⏬](https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-linux-x86_64.tar.gz) | [wget.la ⏬](https://wget.la/https://github.com/yuaotian/sanshu/releases/download/v0.4.8/sanshu-cli-v0.4.8-linux-x86_64.tar.gz) | 64位 Linux 系统 |
> **🎯 如何选择下载链接?**
>
> 🇨🇳 **中国大陆用户** → 优先选择 **wget.la 加速链接** 🚀
>
> 🌍 **其他地区用户** → 选择 **GitHub 直链** 🌐
>
> 📱 **移动端下载** → 所有链接都支持手机浏览器直接下载
#### 🚀 快速使用指南
**对于中国大陆用户**:
1. 📍 优先选择 **wget.la 加速链接**,下载速度更快
2. 📱 支持手机端直接下载,无需电脑
3. ⚡ 自动解压后按照[安装指南](#-安装与使用)配置即可
**下载选项说明**:
- 🏳️ **GitHub 直链**:全球用户适用,速度取决于网络状况
- 🇨🇳 **wget.la 加速**:专为中国大陆用户优化,下载速度更快
- 📱 **移动端友好**:支持手机浏览器直接下载
- 🔄 **自动更新**:新版本发布后链接自动指向最新版
> **💡 wget.la 是什么?**
> wget.la 是专业的 GitHub 加速服务,为中国大陆用户提供更快的下载体验。所有链接均指向官方 GitHub Releases,确保安全性和完整性。
> **📋 版本信息**:当前最新版本 0.4.8 | 上次更新:2026-01-29
### 安装说明
下载后请参考 [📦 安装与使用](#-安装与使用) 章节完成环境配置。
> 💡 **提示**:如果你更喜欢从源码构建或使用包管理器安装,请查看下方的 [📦 安装与使用](#-安装与使用) 章节。
---
## 📖 简介
**三术 (sanshu)** is an AI-assisted programming enhancement system that integrates the three core capabilities of **智 (zhi)**, **记 (ji)**, and **搜 (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>三术主界面 - 集成三大核心工具的统一工作台</em></p>
</div>
---
## 📑 目录
- [🌟 核心功能](#-核心功能)
- [🚀 核心特性与流程](#-核心特性与流程)
- [🤖 与 Augment Ace 的协同](#-与-augment-ace-的协同)
- [🚀 版本发布流程](#-版本发布流程)
- [🛠️ 技术架构](#️-技术架构)
- [📦 安装与使用](#-安装与使用)
- [☯️ 哲学理念](#️-哲学理念)
- [❓ 常见问题 (FAQ)](#-常见问题-faq)
- [🤝 贡献指南](#-贡献指南)
- [📄 许可证](#-许可证)
- [🙏 致谢](#-致谢)
---
## 🌟 核心功能
三术由三个相辅相成的核心工具组成,并集成了 Context7 文档查询能力:
| 工具 | 名称 | 理念 | 核心能力 | 默认状态 |
|:---:|:---:|:---:|:---|:---:|
| 🧠 | **zhi (智)** | 审时度势,智在必行 | 交互式决策、多模态输入(文本/图片/选项)、状态可视化 | ✅ 启用 |
| 📚 | **ji (记)** | 博闻强记,温故知新 | 全局记忆、自动回忆、分类管理、智能去重 | ✅ 启用 |
| 🔍 | **sou (搜)** | 搜神索隐,洞若观火 | 语义搜索、增量索引、智能等待、文件监听 | ⚙️ 可选 |
| 📖 | **context7** | 博采众长,与时俱进 | 框架文档查询、智能降级搜索、分页浏览 | ✅ 启用 |
| 🎨 | **tu (图标工坊)** | 以图会意,取用自如 | Iconfont 图标搜索、预览、批量下载、SVG 编辑 | ✅ 内置 |
| 🧩 | **uiux (UI/UX Pro Max)** | 万技归一,随用随载 | 设计系统生成、技术栈推荐、样式搜索 | ✅ 启用 |
| ✨ | **enhance (提示词增强)** | 化繁为简,精准表达 | 提示词优化、上下文增强、历史对话整合 | ⚙️ 可选 |
### 🚀 辅助功能
| 功能 | 说明 |
|:---|:---|
| 📱 **Telegram Bot 通知** | 支持将交互弹窗推送至 Telegram,实现远程交互(需配置 Bot Token 和 Chat ID) |
| 🔄 **继续回复** | 自动检测未完成回复,支持自定义阈值(默认 1000 字符)和提示词 |
| 🎵 **音效提醒** | MCP 弹窗时播放自定义音效,支持自定义音效 URL |
| 🖼️ **窗口管理** | 自动调整大小、置顶、固定模式,支持自定义窗口尺寸 |
| 🎨 **主题定制** | 深色/浅色主题切换,自定义字体系列和大小 |
| ⌨️ **快捷键** | 可配置的全局快捷键(设置页面中自定义) |
| 🌐 **代理设置** | 支持 HTTP/SOCKS5 代理,可配置仅对特定请求启用 |
### ⚙️ 高级配置选项
以下配置可在设置页面或配置文件中调整:
| 配置项 | 类型 | 说明 | 默认值 |
|:---|:---|:---|:---|
| `skill_python_path` | 字符串 | 自定义 Python 解释器路径(用于技能运行时) | 系统 PATH |
| `context7_api_key` | 字符串 | Context7 API Key(可选,提高 API 调用速率限制) | 空 |
| `smart_wait_range` | 数值 | sou 工具智能等待范围(秒) | 1-5 |
| `icon_cache_expiry_minutes` | 数值 | 图标缓存过期时间(分钟) | 30 |
| `auto_continue_threshold` | 数值 | 自动继续回复的字符阈值 | 1000 |
| `request_timeout_ms` | 数值 | MCP 请求超时时间(毫秒) | 30000 |
| `max_retry_count` | 数值 | MCP 请求最大重试次数 | 3 |
> 💡 **提示**:配置文件位于系统配置目录:
> - **Windows**: `%APPDATA%\sanshu\settings.json`
> - **macOS/Linux**: `~/.config/sanshu/settings.json`
## 🛠️ 进阶使用指南
### 1. 🔍 sou 代码搜索高级配置
`sou` 工具的语义搜索能力底座来自于内置的 `acemcp` 引擎。要获得最佳体验,您可能需要调整相关配置:
- **acemcp_batch_size**: 控制建立索引时的批处理大小(默认 10)。显存/内存较大时可调高至 20-50 以加快索引速度。
- **acemcp_max_lines_per_blob**: 单个代码块的最大行数(默认 800)。增加此值可保留更多上下文,但会增加 Token 消耗。
- **智能等待 (Smart Wait)**: 当检测到后台正在索引变更文件时,`sou` 会自动等待 1-5 秒(`smart_wait_range`)。这是为了防止读取到旧的代码快照。
### 2. 🌐 网络与代理详解
三术内置了智能代理管理功能,确保在复杂网络环境下依然可用:
- **auto_detect (自动检测)**: 默认启用。三术会自动尝试读取系统代理设置或常见的代理端口(如 7890)。
- **only_for_cn (仅中国大陆生效)**: 默认启用。启用后,仅当检测到国内网络环境或访问受限资源时才使用代理,避免影响内网访问速度。
- **支持协议**: HTTP / SOCKS5。推荐使用 SOCKS5 以获得更好的性能。
### 3. 🎨 UI/UX Pro Max 隐藏参数
`uiux` 工具支持一些不在常规提示词中的高级参数,可通过 `custom` 动作调用:
- **persist**: `true/false` (默认 false)。是否将生成的设计系统或组件保存为本地文件。
- **output_dir**: 指定保存路径(默认为 `src/design` 或 `src/components`)。
- **domain**: 在搜索素材时限制特定域名(如 `dribbble.com`)。
### 🧠 zhi (智/审) - 智能代码审查与交互
> **"审时度势,智在必行"**
- **交互式决策**:通过 MCP 弹窗主动询问用户意图,避免 AI 自作主张
- **多模态输入**:支持文本、图片、预定义选项等多种交互方式
- **状态可视化**:实时展示后端任务状态(如索引进度),让协作更加透明
<div align="center">
<img src="screenshots/popup.png" alt="Zhi Popup Interaction" width="700" />
<p><em>Zhi 智能交互弹窗 - 确保AI决策透明化的强制交互界面</em></p>
</div>
### 📚 ji (记) - 记忆管理系统
> **"博闻强记,温故知新"**
- **全局记忆**:存储项目级别的规则、偏好、最佳实践和上下文
- **自动回忆**:每次对话开始时自动加载相关记忆,保持上下文连贯性
- **分类管理**:支持 Rule (规则)、Preference (偏好)、Pattern (模式)、Context (上下文) 等多维度管理
### 🔍 sou (搜) - 代码语义搜索引擎
> **"搜神索隐,洞若观火"**
- **语义搜索**:基于 acemcp 引擎,支持自然语言查询代码库
- **增量索引**:实时监听文件变更,自动维护最新索引
- **智能等待**:在索引更新时自动平衡速度与完整性
### 📖 context7 - 框架文档查询
> **"博采众长,与时俱进"**
查询最新的框架和库文档,支持 Next.js、React、Vue、Spring 等主流框架。
- **免费使用**:无需配置 API Key 即可使用,配置后可获得更高速率限制
- **智能降级**:当库标识符错误时,自动搜索候选库并提供建议
- **实时文档**:获取框架的最新官方文档,避免 AI 知识过时问题
**使用示例**:
```json
{
"library": "vercel/next.js",
"topic": "routing",
"version": "15.1.0"
}
```
**支持的库示例**:
- `vercel/next.js` - Next.js 框架
- `facebook/react` - React 库
- `vuejs/vue` - Vue.js 框架
- `spring-projects/spring-framework` - Spring 框架
- `mybatis/mybatis-3` - MyBatis ORM
**配置说明**:
- API Key(可选):在设置页面的「MCP 工具」标签页中配置
- 配置 API Key 后可获得更高的 API 调用速率限制
<div align="center">
<img src="screenshots/mcp-tool.png" alt="MCP工具配置界面" width="700" />
<p><em>MCP工具配置界面 - Context7文档查询工具设置</em></p>
</div>
### 🎨 icon (图标工坊) - 图标下载与管理
> **"以图会意,取用自如"**
- **图标搜索**:按关键词检索 Iconfont 图标库
- **批量下载**:支持多选、批量保存 SVG/PNG
- **路径可配**:默认保存路径可在设置中调整
**使用方式(MCP 工具)**:
```json
{
"query": "search keyword",
"style": "line",
"save_path": "assets/icons",
"project_root": "C:/path/to/project"
}
```
**说明**:
- `style` 可选:line / fill / flat / all
- `save_path` 为相对项目根目录路径
- 工具名称为 `tu`,界面显示为“图标工坊”
### 🧩 skill (技能运行时) - Skill MCP(内置 UI/UX Pro Max)
> **"万技归一,随用随载"**
技能运行时用于发现、加载并执行本地 skills。当前内置 `ui-ux-pro-max` 技能(位于 `skills/ui-ux-pro-max`),支持 UI/UX 设计系统与搜索能力。
**技能发现目录(默认扫描)**:
- 项目内:`.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/`
- 用户全局:`~/.codex/skills`
**运行时约束**:
- 仅支持 Python 入口
- 默认使用系统 PATH,可通过配置 `skill_python_path` 指定 Python 路径
**使用方式(独立工具)**:
```json
{
"action": "search",
"query": "beauty spa wellness service"
}
```
**使用方式(通用工具)**:
```json
{
"skill_name": "ui-ux-pro-max",
"action": "design_system",
"query": "beauty spa wellness service"
}
```
**ui-ux-pro-max 支持的动作**:
- `search`:通用检索
- `design_system`:生成设计系统推荐
- `custom`:允许传递自定义参数
技能入口由 `skill.config.json` 声明,未提供清单时会按约定式入口兜底(例如 `scripts/search.py`)。
---
## 📦 安装与使用
### 环境要求
| 依赖 | 版本要求 | 说明 |
|------|----------|------|
| Rust | 1.70+ | 后端编译 |
| Node.js | 18+ | 前端构建 |
| pnpm | 8+ | 包管理器 |
### 🚀 快速开始
#### 方式一:下载预编译二进制文件
<div align="center">
**📦 通用安装方式 - 支持所有平台**
</div>
如果您选择直接下载预编译的可执行文件,请按照以下步骤完成安装和环境配置。
```
#### 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"
> }
> }
> }
> ```
### Command Line Standalone Call
In environments where MCP cannot be used (such as pure terminal or CI process), 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 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 volume and performance)
cargo build --release
# Tauri complete package (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
```
##### 🧪 Test
```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 problems, 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="设置页面" 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 into 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 root directory of the project
#### 🌟 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**, which greatly saves 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 separated from the MCP service, only relies on the `等一下` (sanshu) executable file, and has stronger risk control capabilities.
- **Targeted Optimization**: Specially optimized for potential restrictions on the MCP `zhi` tool by 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 directly 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 "准备执行重构,是否继续?" --options "继续,取消"
```
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 Strong 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` under 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 users
- **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 Classification** | Level 1 (Atomic Task) → Level 2 (Standard Task) → Level 3 (Complex Task) → Level 4 (Exploration 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 by 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 it to each conversation** (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 calls to fail
<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 autonomous 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 conversation 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 the AI's 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 or running commands (handled by the user)
## Tool Calling Rules
### ji (记) - Memory Management
- **Start of Conversation**: 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 the requirements are unclear**: Provide predefined options through `zhi` to allow users to clarify
- **When there are multiple options**: 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
- **When obtaining the latest documentation**: Use when you need to query the latest official documentation of the framework/library (such as Next.js, React, Spring, etc.)
- **When AI knowledge is uncertain**: When AI's 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 about the complete identifier, you can use a short name first, and the tool will automatically search for candidate libraries.
## Conversation 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
- Maintain a natural and smooth conversation, 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 autonomous 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 conversation 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 related code
5. **Knowledge Authority Contract**: When the latest framework documentation is needed or the AI's 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 or running commands (handled by the user)
## Tool Calling Rules
### ji (记) - Memory Management
- **Start of Conversation**: 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 the requirements are unclear**: Provide predefined options through `zhi` to allow users to clarify
- **When there are multiple options**: 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 to quickly locate related code
- **When understanding context**: Use `sou` to search for related implementations and call relationships
- **Before editing**: Use `sou` to confirm the code location and scope of impact to be modified
### context7 - Framework Documentation Query
- **When obtaining the latest documentation**: Use when you need to query the latest official documentation of the framework/library (such as Next.js, React, Spring, etc.)
- **When AI knowledge is uncertain**: When AI's 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 about the complete identifier, you can use a short name first, and the tool will automatically search for candidate libraries.
## Conversation 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
- Maintain a natural and smooth conversation, actively clarify, and encourage feedback
```
</details>
---
#### Full Prompt Content
<details>
<summary>📋 Click to expand to 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
> 💡 **Hint**: The full version of the prompt contains detailed protocol rules, task complexity classification, operation mode instructions, etc., which is suitable for users who need to deeply understand the details of the protocol. 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 • 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 Tao produced One; One produced Two; Two produced Three; Three produced 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 |
|:---:|:---:|:---|
| **Tao** | 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 a balanced art of **"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)
### How Sanshu Differs from 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 Properly
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 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 slow, please be patient.
- **Resource Check**: Ensure that 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 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 Variables**: Set `RUST_LOG=debug` and restart the client to get detailed logs.
2. **View Logs**: Analyze the log files (usually in the temporary directory or configuration directory) and look for `ERROR` or `WARN` level records.
3. **Submit Issue**: If you cannot solve the problem, 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%
🧪 Functional 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 collaboration 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 the 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 bugs, suggesting new features, 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 format 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.
```
---
## 🙏 Acknowledgments
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.
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.
git
A Model Context Protocol server for Git automation and interaction.