♻️ refactor(test): rebuild agent runtime test flow
This commit is contained in:
+2
-1
@@ -4,7 +4,7 @@
|
||||
是否可直接用于生成代码:否
|
||||
是否含可直接照写示例:否
|
||||
是否含不可照写反例:否
|
||||
遇到不确定时:先按“按任务跳转”分层;语法问题看 [syntax/index.md](syntax/index.md),函数库查询看 [reference/index.md](reference/index.md),模块 / 集成看 [modules/index.md](modules/index.md),项目执行问题回项目自身文档、`scripts/*` 入口脚本和 CI 配置
|
||||
遇到不确定时:先按“按任务跳转”分层;语法问题看 [syntax/index.md](syntax/index.md),命名问题看 [naming.md](naming.md),函数库查询看 [reference/index.md](reference/index.md),模块 / 集成看 [modules/index.md](modules/index.md),项目执行问题回项目自身文档、`scripts/*` 入口脚本和 CI 配置
|
||||
|
||||
本页只决定第一跳。不要在这里生成代码,不要通读全部 TSL 文档,不要用相似语言补全 TSL 事实。
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
| ------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------ |
|
||||
| 写最短可运行骨架、核对语言核心事实 | [syntax/01_quickstart.md](syntax/01_quickstart.md) | `.tsl` / `.tsf` 文件模型不明 |
|
||||
| 判断语法能不能写、查语言写法 | [syntax/index.md](syntax/index.md) | 没有命中具体语法专题 |
|
||||
| 给变量、函数、类型、unit 或 `.tsf` 文件取名 | [naming.md](naming.md) | 文件模型或顶层声明规则不明 |
|
||||
| 核对高频误写、反例、负向边界 | [syntax/11_pitfalls.md](syntax/11_pitfalls.md) | 反例没有指向正确专题 |
|
||||
| 查行情、财务、板块、选股等金融函数 | [reference/catalog/datawarehouse.md](reference/catalog/datawarehouse.md) | 没有命中带参数表的函数事实条目 |
|
||||
| 查通用函数库函数名、参数、返回值 | [reference/index.md](reference/index.md) | catalog 没有正式函数条目 |
|
||||
|
||||
@@ -46,6 +46,14 @@
|
||||
`if`、`for`、`class`、`function`、`unit`、`return` 等。
|
||||
- 调用内置/标准库/第三方 API 时,推荐保持对方官方大小写形式(`aaBBCC`/lowerCamelCase),例如
|
||||
`getSysParams("xxx")`;自定义 wrapper 仍按本指南使用 `PascalCase`。
|
||||
- 常规自定义标识符不要使用 TSL 关键字、保留字或内置函数名。适用范围包括变量、
|
||||
参数、函数/过程、类/类型、property、方法、字段、unit 名和文件基名。
|
||||
- 关键字和保留名清单以
|
||||
[16_lexical_structure_and_compile_options.md](syntax/16_lexical_structure_and_compile_options.md)
|
||||
为准;例如 `label` 是控制流保留名,不要作为普通变量、函数或属性名。
|
||||
- 如果业务术语与关键字或内置名冲突,优先换成语义清楚的替代名称。只有明确需要
|
||||
演示同名遮蔽、绑定外部接口或保持协议兼容时,才允许使用冲突名。
|
||||
- 函数参数场景可以使用 5.1 中的前导下划线例外。
|
||||
|
||||
## 3. 类型命名(Type Names)
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"version": "2.0",
|
||||
"version": "2.1",
|
||||
"description": "Agent-optimized quick index for TSL syntax - read this FIRST",
|
||||
"total_tokens_saved_per_query": "~2000-3000",
|
||||
"changelog": {
|
||||
"2.1": "Added naming/style routing for identifiers and TSF filename alignment",
|
||||
"2.0": "Extended coverage from 7 to 14 scenarios, added understand_code and optimize_code decision paths",
|
||||
"1.0": "Initial version with 7 high-frequency scenarios"
|
||||
},
|
||||
@@ -62,6 +63,12 @@
|
||||
"token_cost": 80,
|
||||
"example": "var a;\na := 1;"
|
||||
},
|
||||
"identifier_naming": {
|
||||
"file": "../naming.md",
|
||||
"line": 42,
|
||||
"token_cost": 120,
|
||||
"example": "UserAccount, LoadData, max_retry_count"
|
||||
},
|
||||
"class_basic": {
|
||||
"file": "08_objects_and_classes.md",
|
||||
"line": 98,
|
||||
@@ -122,6 +129,11 @@
|
||||
"tsl_file_structure": {
|
||||
"order": ["statements first", "declarations after"],
|
||||
"wrong": "declarations before statements or after declarations"
|
||||
},
|
||||
"identifier_naming": {
|
||||
"doc": "../naming.md#L42",
|
||||
"avoid": "ordinary custom identifiers should not use TSL keywords, reserved words, or builtin function names",
|
||||
"tsf_filename_rule": "02_core_model.md#L38"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -159,6 +171,7 @@
|
||||
"simple_script": "01_quickstart.md#L182",
|
||||
"function": "05_functions_and_calls.md#L103",
|
||||
"procedure": "05_functions_and_calls.md#L130",
|
||||
"naming": "../naming.md#L42",
|
||||
"class": "08_objects_and_classes.md#L98",
|
||||
"loop": "07_control_flow.md#L89",
|
||||
"condition": "07_control_flow.md#L54",
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
"hello_world": "01_quickstart.md#L182",
|
||||
"function": "05_functions_and_calls.md#L103",
|
||||
"class": "08_objects_and_classes.md#L98",
|
||||
"naming": "../naming.md#L42",
|
||||
"tsf_filename": "02_core_model.md#L38",
|
||||
"loop": "07_control_flow.md#L89",
|
||||
"if": "07_control_flow.md#L54",
|
||||
"fix_a=1_error": "11_pitfalls.md#L45",
|
||||
@@ -30,6 +32,7 @@
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------ |
|
||||
| 写最短骨架、核对语言核心事实 | [01_quickstart.md](01_quickstart.md) | 文件模型不明 |
|
||||
| 判断 `.tsl` / `.tsf`、顶层语句区、声明区、文件模型 | [02_core_model.md](02_core_model.md) | 用户交付目标不足以判断后缀 |
|
||||
| 给变量、函数、类型、unit 或 `.tsf` 文件取名 | [../naming.md](../naming.md) | 文件模型或顶层声明规则不明 |
|
||||
| 写值、数组、字符串、字符串编码边界 | [03_values_and_literals.md](03_values_and_literals.md) | 需要未记录的字面量或编码写法 |
|
||||
| 写变量、常量、显式声明 | [04_variables_and_constants.md](04_variables_and_constants.md) | 变量生命周期或作用域不明 |
|
||||
| 写 `function` / `procedure`、参数、默认参数、命名参数、变参 | [05_functions_and_calls.md](05_functions_and_calls.md) | 需要未记录的调用外形 |
|
||||
|
||||
Reference in New Issue
Block a user