📝 docs(tsl): align agent-facing guidance

This commit is contained in:
csh
2026-05-28 19:12:34 +08:00
parent c48354e0cb
commit d8eb418277
63 changed files with 1921 additions and 371 deletions
+8
View File
@@ -14,6 +14,14 @@
回答“`goto``DebugReturn``DebugRunEnv``MTIC` / `MTOC``SetProfiler``__line__``__stack_frame` 在当前解释器里怎样写、会怎样表现”。
## Agent 调试/Profiler 判断流程
1. 先判断任务需要跳转、提前返回、运行环境调试、计时还是 profiler。
2. 普通控制流优先回到 `08_control_flow.md`,本页只处理调试补充工具。
3. `DebugReturn` 会结束整段脚本,不能当成普通函数返回。
4. 计时和 profiler 只照已验证最小调用写,不要补未验证参数。
5. 没有已验证代码块时不要发明调试/Profiler 写法。
## 必须记住的规则
- `goto label_name;` 当前已验证可用,但目标位置当前以 `label label_name; statement` 这种内联形式最稳。