Skip to content

Commit 6b8a8a5

Browse files
committed
Restructure plugin workflow and simplify docs
1 parent e014d7e commit 6b8a8a5

13 files changed

Lines changed: 269 additions & 7376 deletions

CLAUDE.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,47 @@
44

55
## 项目概述
66

7-
AutoCode MCP Server 是基于论文《AutoCode: LLMs as Problem Setters for Competitive Programming》实现的竞赛编程出题辅助工具,提供 Validator-Generator-Checker 框架
7+
AutoCode 是一个 Claude Code plugin,默认以远程仓库安装使用;仓库内部同时包含 `autocode-mcp` 这个 MCP server 实现。它基于论文《AutoCode: LLMs as Problem Setters for Competitive Programming》实现竞赛编程出题辅助能力,并提供 Validator-Generator-Checker 工作流约束
88

99
## 开发命令
1010

1111
```bash
1212
# 安装依赖
1313
uv sync
1414

15-
# 运行测试
16-
uv run pytest tests/ -v
15+
# 运行核心测试
16+
uv run pytest tests/ -q
1717

1818
# 代码检查
1919
uv run ruff check .
2020

2121
# 类型检查
2222
uv run mypy src/
2323

24-
# 运行 MCP Server
24+
# 校验 Claude plugin 结构
25+
claude plugin validate .
26+
27+
# 运行 MCP Server(本地开发/测试)
2528
uv run autocode-mcp
2629
```
2730

2831
## 项目结构
2932

3033
```
3134
AutoCode/
32-
├── src/autocode_mcp/ # 源代码
35+
├── .claude-plugin/ # Claude plugin manifest
36+
├── agents/ # Claude plugin agent definitions
37+
├── hooks/ # Claude hook config
38+
├── scripts/ # Hook/runtime helper scripts
39+
├── skills/ # Claude plugin skills
40+
├── src/autocode_mcp/ # MCP server 源代码
3341
│ ├── tools/ # MCP 工具实现
34-
│ ├── resources/ # 模板资源
42+
│ ├── templates/ # 内置模板资源
3543
│ ├── prompts/ # 工作流提示词
3644
│ └── utils/ # 工具函数
3745
├── tests/ # 测试用例
38-
├── templates/ # C++ 模板文件 (testlib.h 等)
46+
├── .mcp.json # 本地 MCP 接入配置
47+
├── settings.json # Claude plugin settings
3948
└── pyproject.toml # 项目配置
4049
```
4150

@@ -62,14 +71,22 @@ AutoCode/
6271
## 出题工作流程
6372

6473
1. 初始化题目目录 (`problem_create`)
65-
2. 实现解法 (`solution_build`)
66-
3. 构建校验器 (`validator_build`)
67-
4. 构建生成器 (`generator_build`)
68-
5. 运行压力测试 (`stress_test_run`)
69-
6. 生成测试数据 (`problem_generate_tests`)
74+
2. 构建标准解 (`solution_build`, `solution_type=sol`)
75+
3. 构建暴力解 (`solution_build`, `solution_type=brute`)
76+
4. 构建校验器 (`validator_build`, accuracy >= 0.9)
77+
5. 构建生成器 (`generator_build`)
78+
6. 运行压力测试 (`stress_test_run`, completed_rounds == total_rounds)
79+
7. 按需构建检查器 (`checker_build`, accuracy >= 0.9)
80+
8. 生成测试数据 (`problem_generate_tests`, generated_test_count > 0)
81+
9. 打包 Polygon (`problem_pack_polygon`)
82+
83+
该顺序会被 [hooks/hooks.json](/c:/userProgram/program/AutoCode/hooks/hooks.json)[scripts/workflow_guard.py](/c:/userProgram/program/AutoCode/scripts/workflow_guard.py) 实际强制执行。
7084

7185
## 关键约束
7286

7387
- 包管理强制使用 `uv`(绝对禁用 pip/poetry/conda)
74-
- 运行时强制使用 `uv run`
88+
- 对外分发形态优先是 Claude plugin,不是单独的本地 MCP 配置
89+
- 默认主路径是远程 plugin 安装;本地模式只用于开发、测试、验证
90+
- `hooks/` 只放 hook 配置,hook 逻辑脚本放在 `scripts/`
91+
- 模板资源统一放在 `src/autocode_mcp/templates/`,不要再在仓库根目录维护一份重复模板
7592
- C++ 标准使用 C++20(需要 GCC 10+)

Makefile

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

0 commit comments

Comments
 (0)