Skip to content

Commit 70957c5

Browse files
committed
refactor: remove unused components and move README_CN
- Delete: package.json, bun.lock, Dockerfile, mcp-server/, blueprints/, blueprint-runner.sh - Move README_CN.md → docs/README_CN.md - Remove MCP server build step from install.sh - Annotate historical docs with (已移除) for deleted components
1 parent 5a7c4fc commit 70957c5

17 files changed

Lines changed: 32 additions & 447 deletions

CONTRIBUTING.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ Thank you for your interest in contributing to VibeGuard — the AI anti-halluci
2222
|------|----------------|---------|
2323
| Git | 2.30+ | Version control |
2424
| Bash | 5.0+ | Hook and guard scripts |
25-
| Node.js | 20.x | MCP server |
2625
| Python | 3.11+ | Analysis scripts |
27-
| npm | 10+ | MCP server dependencies |
2826

2927
> **macOS users:** The system Bash (3.x) is too old. Install a modern Bash via `brew install bash`.
3028
@@ -41,10 +39,6 @@ git remote add upstream https://github.com/majiayu000/vibeguard.git
4139
# 3. Run the setup script (installs VibeGuard into ~/.claude/)
4240
bash setup.sh
4341

44-
# 4. Install MCP server dependencies
45-
cd mcp-server
46-
npm ci
47-
cd ..
4842
```
4943

5044
### Running Tests
@@ -57,12 +51,6 @@ bash tests/test_hooks.sh
5751
bash tests/test_rust_guards.sh
5852
bash tests/test_setup.sh
5953

60-
# MCP server: build and test
61-
cd mcp-server
62-
npm run build
63-
npm test
64-
cd ..
65-
6654
# CI validation scripts (mirrors what GitHub Actions runs)
6755
bash scripts/ci/validate-guards.sh
6856
bash scripts/ci/validate-hooks.sh
@@ -136,7 +124,6 @@ Signed-off-by: Your Name <your@email.com>
136124
| `guards/universal` | Language-agnostic guards |
137125
| `hooks` | Hook scripts in `hooks/` |
138126
| `rules` | Rule definitions in `rules/` |
139-
| `mcp` | MCP server in `mcp-server/` |
140127
| `scripts` | Automation scripts |
141128
| `agents` | Agent definitions |
142129
| `docs` | Documentation |
@@ -212,7 +199,6 @@ git config --global format.signOff true
212199
Before requesting review, verify:
213200

214201
- [ ] All existing tests pass (`bash tests/test_hooks.sh`, `bash tests/test_rust_guards.sh`, `bash tests/test_setup.sh`)
215-
- [ ] MCP server builds and tests pass (`cd mcp-server && npm run build && npm test`)
216202
- [ ] All CI validation scripts pass (see [Running Tests](#running-tests))
217203
- [ ] New guard scripts have corresponding regression tests in `tests/`
218204
- [ ] New rules are referenced in `rules/` and wired to a guard (`validate-wiring-contract.sh` checks Rust guards automatically; verify other languages manually)
@@ -360,11 +346,8 @@ fi
360346

361347
For guards that should run automatically, register them in **all** of the following locations:
362348

363-
- **MCP tool registry** — add detection logic to `mcp-server/src/tools.ts` (the `GUARD_REGISTRY` block for the relevant language)
364-
- **MCP index description** — add the guard name to the `rust:` (or relevant language) description list in `mcp-server/src/index.ts` so it appears in the tool's human-readable capability list
365349
- **README guard table** — add a row with the script path (`guards/<language>/check_<rule_slug>.sh`) to the guard table in `README.md`
366-
- **Wiring contract** — run `scripts/ci/validate-wiring-contract.sh` to verify your additions; note that this script currently validates **Rust guards only**. For Go, Python, and TypeScript guards, verify the three locations above manually before submitting your PR.
367-
- **Language detection** — update `mcp-server/src/detector.ts` if the guard targets a new language or file pattern
350+
- **Wiring contract** — run `scripts/ci/validate-wiring-contract.sh` to verify your additions; note that this script currently validates **Rust guards only**. For Go, Python, and TypeScript guards, verify the README guard table manually before submitting your PR.
368351

369352
### Step 4: Write Regression Tests
370353

Dockerfile

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

README.md

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

55
**Stop AI from hallucinating code.**
66

7-
[中文文档](README_CN.md) | [Rule Reference](docs/rule-reference.md)
7+
[中文文档](docs/README_CN.md) | [Rule Reference](docs/rule-reference.md)
88

99
When using Claude Code or Codex, AI frequently invents non-existent APIs, reinvents the wheel, hardcodes fake data, and over-engineers solutions. VibeGuard prevents these problems at the source through **rule injection + real-time interception + static scanning** — three layers of defense.
1010

@@ -307,4 +307,4 @@ Key lessons:
307307

308308
---
309309

310-
[中文文档 / Chinese Documentation →](README_CN.md)
310+
[中文文档 / Chinese Documentation →](docs/README_CN.md)

blueprints/pre-commit.json

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

blueprints/standard-edit.json

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

bun.lock

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.

docs/reference/harness-audit-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
| 维度 | 状态 | 实现文件 |
7676
|------|------|----------|
77-
| Agent 调度器 || `agents/dispatcher.md` + `mcp-server/src/detector.ts` |
77+
| Agent 调度器 || `agents/dispatcher.md` + `mcp-server/src/detector.ts`(已移除) |
7878
| 推理预算分配 || 规划用 opus、执行用 sonnet、验证用 opus |
7979
| Agent-to-Agent 审查 | ⚠️ | 有审查 agent,无自动链式调用协议 |
8080
| 会话状态模型 || 无 Turn/Thread 原语,仅日志级追踪 |
@@ -130,7 +130,7 @@
130130

131131
| 维度 | 状态 | 实现文件 | 备注 |
132132
|------|------|----------|------|
133-
| MCP 通信协议 || `mcp-server/src/index.ts` — 3 个工具接口 | 有意选择 MCP 而非 JSON-RPC |
133+
| MCP 通信协议 |(已移除) | `mcp-server/src/index.ts`(已移除)— 3 个工具接口 | 已替换为直接守卫脚本 |
134134
| 结构化原语 || decision: pass/warn/block/gate/escalate/complete | |
135135
| Turn/Thread 模型 || 仅日志级 session 追踪 | |
136136
| 多表面集成 | ⚠️ | Claude Code 集成完整,无 Web/IDE 独立支持 | |

docs/reference/harness-roadmap.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
**涉及文件**:
1616
- `hooks/post-edit-guard.sh` — 添加 hashline 验证
17-
- `mcp-server/src/tools.ts` — 新增 hashline 编辑工具
17+
- `mcp-server/src/tools.ts`(已移除)— 新增 hashline 编辑工具
1818
- 新增(规划中): scripts/test-edit-stability.sh
1919

2020
**方案**:
@@ -34,8 +34,8 @@
3434
**目标**: 长周期任务的状态恢复和并发隔离
3535

3636
**涉及文件**:
37-
- 新增(规划中): mcp-server/src/session_manager.ts
38-
- `mcp-server/src/index.ts` — 多 Turn 处理
37+
- 新增(规划中): mcp-server/src/session_manager.ts(已移除)
38+
- `mcp-server/src/index.ts`(已移除)— 多 Turn 处理
3939
- `hooks/log.sh` — 扩展 turn_id/thread_id
4040

4141
**方案**:
@@ -116,7 +116,7 @@ GC 频率: A=7天 B=3天 C=1天 D=实时
116116
**目标**: agent 自动调用其他 agent 形成工作流链
117117

118118
**涉及文件**:
119-
- 新增(规划中): mcp-server/src/agent_connector.ts
119+
- 新增(规划中): mcp-server/src/agent_connector.ts(已移除)
120120
- `agents/dispatcher.md` — 扩展链接规则
121121

122122
**方案**:
@@ -234,7 +234,7 @@ P3: 未开始(映射文档 + 集成指南)
234234
235235
## 设计原则
236236
237-
1. **因地制宜**: 不照搬 Harness 的 JSON-RPC,基于 Claude Code 的 Hook + MCP 生态
237+
1. **因地制宜**: 不照搬 Harness 的 JSON-RPC,基于 Claude Code 的 Hook + MCP 生态(MCP server 已移除,改用直接守卫脚本)
238238
2. **安全优先**: P0 集中在防幻觉直接有效性
239239
3. **可测试**: 每个任务有明确验收标准
240240
4. **增量交付**: 每个 Phase 独立可发布

docs/vibe/01-problem-analysis.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
|---|---|---|---|
1212
| D1 | P0 | `setup.sh` 过于单体且重复逻辑多 | 维护成本高,回归风险高 |
1313
| D2 | P0 | `post-write-guard` 全量扫描策略开销大 | 大仓库性能明显下降 |
14-
| D3 | P1 | MCP 守卫并发缺少资源治理 | CPU/IO 抖动,稳定性下降 |
15-
| D4 | P1 | MCP 语言模型与 hooks 实际覆盖不一致 | 体验断层,规则不一致 |
14+
| D3 | P1 | MCP 守卫并发缺少资源治理(已移除)| CPU/IO 抖动,稳定性下降 |
15+
| D4 | P1 | MCP 语言模型与 hooks 实际覆盖不一致(已移除)| 体验断层,规则不一致 |
1616
| D5 | P1 | 已有 CI 校验脚本但未接入自动流水线 | 质量门禁无法自动化 |
1717
| D6 | P1 | 自动化测试覆盖不足(集中在 hooks) | 重构缺乏保护网 |
1818
| D7 | P2 | 多处 bash 内嵌 Python,复用性弱 | 扩展难度与维护成本增加 |
@@ -34,19 +34,21 @@
3434
- 风险:随着代码量增长,写入后延迟变高,影响交互体验。
3535
- 优化方向:改用 `rg` + 扫描预算 + 缓存索引/增量策略。
3636

37-
### D3: MCP 并发无治理
37+
### D3: MCP 并发无治理(已移除)
3838

3939
- 现象:多守卫采用 `Promise.all` 同时跑;包含 `npx eslint .``find` 等重操作。
4040
- 证据:`mcp-server/src/tools.ts` 第 138, 144, 258 行附近。
4141
- 风险:资源争抢导致任务抖动,长尾耗时上升。
4242
- 优化方向:加入并发上限、超时与降级策略。
43+
- ****:mcp-server 已移除,此问题随之消解。
4344

44-
### D4: 语言覆盖模型不一致
45+
### D4: 语言覆盖模型不一致(已移除)
4546

4647
- 现象:MCP `language` 入参不含 `javascript`,但 hooks 规则明确覆盖 `.js`
4748
- 证据:`mcp-server/src/index.ts` 第 30 行;`hooks/log.sh` 第 25 行;README hooks 表格包含 `.js`
4849
- 风险:同一仓库在不同入口得到不一致行为。
4950
- 优化方向:统一语言模型(显式 `javascript``js->typescript` 别名策略)。
51+
- ****:mcp-server 已移除,此问题随之消解。
5052

5153
### D5: CI 校验未自动触发
5254

0 commit comments

Comments
 (0)