playbook/docs/tsl/reference/index.md

39 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Reference Index
文档类型:检索页
是否可直接用于生成代码:否
遇到不确定时跳转到:[catalog/index.md](catalog/index.md)、[../syntax/index.md](../syntax/index.md)、[../finance/index.md](../finance/index.md)
这里是函数查阅层,不是默认通读入口。现在这一页本身就是函数总入口,不再要求先跳到额外的中转页。
reference 的目标是确认每个方法的参数类型,让 agent 写代码时知道该传什么。文档只保留 agent 生成代码需要的函数事实。
## Agent 函数使用规则
- 只从 verified 函数页读取参数类型、返回值和调用约束。
- catalog 只是候选函数索引,不能把 catalog 里的函数名直接当成可调用事实。
- 函数没有进入 verified 函数页时,不要根据函数名猜参数,也不要生成调用代码。
- 函数参数必须按正确类型传入TSL 本身弱类型,不等于函数参数无类型。
- 如果函数被记录为当前测试环境不支持,不要使用该函数生成代码。
## 检索策略
1. 先看 [catalog/index.md](catalog/index.md) 的模块目录,确定候选大类。
2. 进入对应模块页,在页内搜索具体候选函数名。
3. 先看 [verified/index.md](verified/index.md),再进入具体 verified 函数页读取参数类型、返回值和调用约束;当前核心函数页是 [verified/core.md](verified/core.md)。
4. 如果候选函数没有进入 verified 函数页,不要生成调用代码。
5. 当前测试环境不支持的方法见 [unavailable_methods.md](unavailable_methods.md)。
6. 如果目录和定向检索都找不到函数,不要发明函数名,也不要默认它是 TSL 内建函数;回 [../syntax/index.md](../syntax/index.md)、[../finance/index.md](../finance/index.md)、[../modules/index.md](../modules/index.md) 或项目文档确认来源。
## 按任务跳转
| 当前任务 | 先读哪里 |
| ------------------------ | ------------------------------------------------ |
| 查函数库入口 | [catalog/index.md](catalog/index.md) |
| 直接按模块查函数 | [catalog/index.md](catalog/index.md) |
| 查可调用函数参数类型 | [verified/index.md](verified/index.md) |
| 查当前测试环境不支持方法 | [unavailable_methods.md](unavailable_methods.md) |
| 回到语法层 | [../syntax/index.md](../syntax/index.md) |
| 回到金融层 | [../finance/index.md](../finance/index.md) |
| 回到模块层 | [../modules/index.md](../modules/index.md) |