🎨 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:
parent
0dc244f1b4
commit
565071c11f
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD013": false
|
||||
"MD013": false,
|
||||
"MD024": false,
|
||||
"MD025": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
## 分类目录
|
||||
|
||||
| 分类 | 详情页 | 函数事实数 |
|
||||
| -------------------------- | -------------------------------------------------------------------------------------------------------- | ---------: |
|
||||
| -------------------------- | ---------------------------------------------------------------------------------------------- | ---------: |
|
||||
| 系统参数名称函数 | [datawarehouse/01_system_param_names.md](datawarehouse/01_system_param_names.md) | 17 |
|
||||
| 多市场支撑函数 | [datawarehouse/02_multi_market.md](datawarehouse/02_multi_market.md) | 5 |
|
||||
| 日内数据与收盘后可用 | [datawarehouse/05_intraday_and_after_close.md](datawarehouse/05_intraday_and_after_close.md) | 2 |
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@
|
|||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------ | ---- | -------- | -------------------------------------------- |
|
||||
| 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `46002` |
|
||||
|
||||
# 数据仓库金融函数 - 条件判定
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------ | ---- | -------- | ---------------------------------------- |
|
||||
| 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `0` |
|
||||
|
||||
# 数据仓库金融函数 - 盘后相关(在当日可用于盘中)
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------ | ---- | -------- | ---- |
|
||||
|
||||
# 数据仓库金融函数 - 复权基准日函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@
|
|||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------ | ---- | -------- | -------------------------------------------- |
|
||||
| 1 | `arg1` | 是 | 字符串 | 按源文档示例顺序传入;示例参数形态为 `'1+3'` |
|
||||
|
||||
# 数据仓库金融函数 - 查询和轮询函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@
|
|||
| 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` |
|
||||
| 2 | `date_value_2` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230101T` |
|
||||
| 3 | `date_value_3` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230110T` |
|
||||
|
||||
# 数据仓库金融函数 - 向导函数 / N日 / 中间函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
@ -134,6 +135,7 @@
|
|||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------------ | ---- | ---------- | ----------------------------------------------- |
|
||||
| 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` |
|
||||
|
||||
# 数据仓库金融函数 - 向导函数 / 历史遗留
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@
|
|||
| 3 | `arg3` | 是 | 字符串 | 按源文档示例顺序传入 |
|
||||
| 4 | `lj1` | 是 | 任意值 | 按源文档示例顺序传入 |
|
||||
| 5 | `arg5` | 否 | 整数 | 按源文档示例顺序传入 |
|
||||
|
||||
# 资源访问函数 - 宽字节处理函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@
|
|||
| -------- | ----------- | ---- | -------- | ------------- |
|
||||
| 1 | `buffer` | 是 | 任意值 | Binary Buffer |
|
||||
| 2 | `type_name` | 是 | 字符串 | 类型名称 |
|
||||
|
||||
# 系统相关函数 - 复制函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
@ -351,6 +352,7 @@
|
|||
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
|
||||
| -------- | ------- | ---- | -------- | ------ |
|
||||
| 1 | `value` | 是 | 整数 | 输入值 |
|
||||
|
||||
# 系统相关函数 - 条件选择函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
- 真值示例:`1`、`true`、`-1`、`0.5`、`"abc"`、`array(1)`;通过时返回 `0`。
|
||||
- 假值示例:`0`、`false`、`nil`、`""`、`array()`;失败时直接抛出 `error_message`。
|
||||
- 断言失败不会把错误信息作为普通返回值交给调用方继续执行。
|
||||
|
||||
# 系统相关函数 - 性能优化相关函数
|
||||
|
||||
文档类型:函数事实页
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
| 写单元 (unit) / uses | [09_units_and_scope.md](09_units_and_scope.md) | 查找路径、模块边界或文件名不明 |
|
||||
| 写运行时环境参数、`sysParams[...]`、`with array(...)`、网格调用或全局缓存 | [10_runtime_context_and_with.md](10_runtime_context_and_with.md) | 需要项目运行时事实 |
|
||||
| 核对高频误写 / 反例 / 负向边界 | [11_pitfalls.md](11_pitfalls.md) | 反例没有指向正确专题 |
|
||||
| 写数组创建、键表、集合运算(+/-/*) | [12_matrix_and_collections.md](12_matrix_and_collections.md) | 需要未记录的数据结构操作 |
|
||||
| 写数组创建、键表、集合运算(+/-/\*) | [12_matrix_and_collections.md](12_matrix_and_collections.md) | 需要未记录的数据结构操作 |
|
||||
| 写结果集过滤专题 | [13_resultset_and_filters.md](13_resultset_and_filters.md) | 结果集来源或字段结构不明 |
|
||||
| 写 TS-SQL 专题 | [14_ts_sql.md](14_ts_sql.md) | 需要未记录的 SQL 外形 |
|
||||
| 看调试与性能分析器专题 | [15_debug_and_profiler.md](15_debug_and_profiler.md) | 需要项目执行环境 |
|
||||
|
|
@ -56,10 +56,12 @@
|
|||
## 常见歧义边界判断
|
||||
|
||||
### 数组 vs 矩阵
|
||||
|
||||
- **用 12(数组基础)** 如果:创建数组 `array()`、键表操作、集合运算(`+`/`-`/`*`)、基础索引
|
||||
- **用 22(矩阵进阶)** 如果:矩阵维度操作、转置、线性代数、矩阵专属语义
|
||||
|
||||
### 类基础 vs 重载
|
||||
|
||||
- **用 08(类基础)** 如果:类定义、继承、property、静态字段、构造函数
|
||||
- **用 24(对象重载)** 如果:运算符重载(`+`/`-`/`*`/`[]`)、for 迭代器重载
|
||||
|
||||
|
|
|
|||
|
|
@ -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,12 +64,14 @@ test/agent/
|
|||
### 测试不同的 Agent
|
||||
|
||||
1. **使用相同的测试定义**
|
||||
|
||||
```bash
|
||||
# 所有 agent 都使用 test_cases.md 中的测试用例
|
||||
cat test_cases.md
|
||||
```
|
||||
|
||||
2. **为每个 Agent 记录结果**
|
||||
|
||||
```bash
|
||||
# 创建结果目录
|
||||
mkdir -p test/agent/result
|
||||
|
|
@ -84,6 +87,7 @@ test/agent/
|
|||
```
|
||||
|
||||
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/ # 测试结果目录
|
||||
```
|
||||
|
||||
|
|
@ -190,7 +198,7 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
|
|||
`test_cases.md` 包含 100+ 测试用例,覆盖:
|
||||
|
||||
| 语法点 | 测试用例数 |
|
||||
|-------|----------|
|
||||
| ---------- | ---------- |
|
||||
| 函数定义 | 15+ |
|
||||
| 类与对象 | 10+ |
|
||||
| 控制流 | 10+ |
|
||||
|
|
@ -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 消耗
|
||||
- 包含精确行号和示例代码
|
||||
|
|
|
|||
Loading…
Reference in New Issue