🎨 style(md): lint and format all Markdown files
- Update .markdownlint.json: disable MD024 (duplicate headings) and MD025 (multiple h1) - MD024: test cases intentionally use duplicate headings for test IDs - MD025: function catalog files use multiple h1 for different function groups - Fix MD040: add language identifiers to fenced code blocks in test/agent/README.md - Fix MD031: add blank lines around fenced code blocks - Run prettier to format all Markdown files consistently - Fix table alignment and spacing issues All markdownlint errors are now resolved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+30
-20
@@ -9,6 +9,7 @@
|
||||
### 测试定义(通用)
|
||||
|
||||
- **`test_cases.md`** - 100+ 测试用例定义(英文完整版)
|
||||
|
||||
- 适用于所有 agent(Claude, GPT-4, Gemini, 等)
|
||||
- 包含提示词、评分标准、预期代码
|
||||
- 与具体 agent 无关
|
||||
@@ -33,7 +34,7 @@
|
||||
|
||||
### 当前文件
|
||||
|
||||
```
|
||||
```text
|
||||
test/agent/
|
||||
├── README.md # 本文件
|
||||
├── test_cases.md # 通用测试定义(英文完整版)⭐
|
||||
@@ -46,7 +47,7 @@ test/agent/
|
||||
|
||||
### 添加新 Agent 的测试结果
|
||||
|
||||
```
|
||||
```text
|
||||
test/agent/
|
||||
├── test_cases.md # 通用(不变)
|
||||
├── test_cases_zh.md # 中文版(不变)
|
||||
@@ -63,27 +64,30 @@ test/agent/
|
||||
### 测试不同的 Agent
|
||||
|
||||
1. **使用相同的测试定义**
|
||||
|
||||
```bash
|
||||
# 所有 agent 都使用 test_cases.md 中的测试用例
|
||||
cat test_cases.md
|
||||
```
|
||||
|
||||
2. **为每个 Agent 记录结果**
|
||||
|
||||
```bash
|
||||
# 创建结果目录
|
||||
mkdir -p test/agent/result
|
||||
|
||||
|
||||
# 测试 GPT-4
|
||||
# 结果保存为:test/agent/result/results_gpt4_20240617.md
|
||||
|
||||
|
||||
# 测试 Gemini
|
||||
# 结果保存为:test/agent/result/results_gemini_20240617.md
|
||||
|
||||
|
||||
# 测试 Claude
|
||||
# 结果保存为:test/agent/result/results_claude_20240617.md
|
||||
```
|
||||
|
||||
3. **对比不同 Agent 的表现**
|
||||
|
||||
```bash
|
||||
# 对比通过率、得分、常见错误等
|
||||
diff test/agent/result/results_claude_20240617.md \
|
||||
@@ -108,6 +112,7 @@ DATE=$(date +%Y%m%d)
|
||||
### 2. 执行测试
|
||||
|
||||
对于每个测试用例:
|
||||
|
||||
1. 复制提示词(Prompt)
|
||||
2. 发送给目标 agent
|
||||
3. 记录生成的代码
|
||||
@@ -145,18 +150,19 @@ test/agent/result/results_gemini_20240617.md
|
||||
|
||||
### 格式
|
||||
|
||||
```
|
||||
```text
|
||||
test/agent/result/results_{agent}_{YYYYMMDD}.md
|
||||
```
|
||||
|
||||
**说明**:
|
||||
|
||||
- `result/`: 测试结果统一存放目录(已加入 `.gitignore`)
|
||||
- `{agent}`: agent 名称(小写,如 claude, gpt4, gemini)
|
||||
- `{YYYYMMDD}`: 测试日期(如 20240617)
|
||||
|
||||
### 示例
|
||||
|
||||
```
|
||||
```text
|
||||
test/agent/result/results_claude_20260610.md # Claude 在 2026-06-10 的测试
|
||||
test/agent/result/results_claude_20240617.md # Claude 在 2024-06-17 的测试
|
||||
test/agent/result/results_gpt4_20240617.md # GPT-4 在 2024-06-17 的测试
|
||||
@@ -172,14 +178,16 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
|
||||
### 版本控制策略
|
||||
|
||||
**提交到 git**:
|
||||
```
|
||||
|
||||
```text
|
||||
✅ test/agent/test_cases.md # 测试定义(英文完整版)
|
||||
✅ test/agent/test_cases_zh.md # 测试定义(中文完整版)
|
||||
✅ test/agent/README.md # 说明文档
|
||||
```
|
||||
|
||||
**不提交**(已加入 `.gitignore`):
|
||||
```
|
||||
|
||||
```text
|
||||
❌ test/agent/result/ # 测试结果目录
|
||||
```
|
||||
|
||||
@@ -189,17 +197,17 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
|
||||
|
||||
`test_cases.md` 包含 100+ 测试用例,覆盖:
|
||||
|
||||
| 语法点 | 测试用例数 |
|
||||
|-------|----------|
|
||||
| 函数定义 | 15+ |
|
||||
| 类与对象 | 10+ |
|
||||
| 控制流 | 10+ |
|
||||
| 变量与赋值 | 8+ |
|
||||
| Unit 模块 | 5+ |
|
||||
| 参数传递 | 8+ |
|
||||
| 类型系统 | 6+ |
|
||||
| 错误边界 | 10+ |
|
||||
| 其他 | 30+ |
|
||||
| 语法点 | 测试用例数 |
|
||||
| ---------- | ---------- |
|
||||
| 函数定义 | 15+ |
|
||||
| 类与对象 | 10+ |
|
||||
| 控制流 | 10+ |
|
||||
| 变量与赋值 | 8+ |
|
||||
| Unit 模块 | 5+ |
|
||||
| 参数传递 | 8+ |
|
||||
| 类型系统 | 6+ |
|
||||
| 错误边界 | 10+ |
|
||||
| 其他 | 30+ |
|
||||
|
||||
**总计**:100+ 测试用例
|
||||
|
||||
@@ -208,11 +216,13 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
|
||||
## 🔗 相关文档
|
||||
|
||||
### TSL 文档
|
||||
|
||||
- TSL 语法文档:`docs/tsl/syntax/`
|
||||
- TSL 快速索引:`docs/tsl/syntax/00_agent_index.json`
|
||||
- TSL 语法入口:`docs/tsl/syntax/index.md`
|
||||
|
||||
### Agent 优化
|
||||
|
||||
- Agent 快速索引:`docs/tsl/syntax/00_agent_index.json`
|
||||
- 为 agent 优化,减少 75% token 消耗
|
||||
- 包含精确行号和示例代码
|
||||
|
||||
Reference in New Issue
Block a user