📝 docs(tsl): clarify syntax constraints and enhance test infrastructure

- Add TSF file naming constraint to syntax/02_core_model.md
- Clarify semicolon rules: syntax facts vs style preferences
- Separate control flow end semicolon rules (syntax allows both)
- Add function body semicolon requirements to syntax/05_functions_and_calls.md
- Move style preferences to code_style.md (control flow end semicolons)
- Remove cross-references from syntax docs to maintain independence
- Enhance Gitea workflow emoji for better CI output readability
- Fix CI test path from tests/ to test/
- Organize agent test results under test/agent/result/ directory
- Add complete Chinese translation of test cases (test_cases_zh.md)
- Clean up .gitignore to use unified test/agent/result/ directory
- Remove obsolete agent test artifacts (REPORTS_LOCATION.md, old results)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
csh
2026-06-21 17:04:50 +08:00
co-authored by Claude Opus 4.6
parent 6026401907
commit 8b93311cae
138 changed files with 7018 additions and 1705 deletions
@@ -1,126 +0,0 @@
# 提示词生成器(元提示词)
<!--
用途:根据场景自动生成专用提示词
原理:α-prompts(生成)+ Ω-prompts(优化)递归循环
-->
## 何时使用
- 需要为新场景创建专用提示词
- 现有提示词不满足特定需求
- 需要批量生成同类提示词
---
## 生成流程(α循环)
### 1. 分析场景
```markdown
**场景名称**[名称]
**目标用户**[AI/人类/两者]
**触发条件**[何时使用这个提示词]
**预期输出**[使用后应该产出什么]
```
### 2. 提取约束
```markdown
**必须做**
- 约束1
- 约束2
**禁止做**
- 禁止1
- 禁止2
**边界条件**
- 边界1
- 边界2
```
### 3. 生成草稿
```markdown
# [提示词标题]
<!--
用途:[一句话描述]
触发:[触发条件]
-->
## 何时使用
- 场景1
- 场景2
## [核心内容]
[根据场景填充]
## [约束/原则]
- 约束1
- 约束2
---
**最后更新**{{DATE}}
```
---
## 优化流程(Ω循环)
### 1. 评估维度
| 维度 | 问题 |
| ---------- | ---------------------- |
| **清晰度** | 指令是否明确无歧义? |
| **完整度** | 是否覆盖所有必要场景? |
| **简洁度** | 是否有冗余内容可删除? |
| **可操作** | AI 能否直接执行? |
### 2. 迭代优化
```text
草稿 → 评估 → 修改 → 再评估 → ... → 定稿
```
### 3. 验证测试
- 用实际场景测试提示词效果
- 收集反馈,持续迭代
---
## 提示词模板库
### 标准结构
```markdown
# [标题]
<!--
用途:
触发:
-->
## 何时使用
## [核心内容]
## [约束/原则]
---
**最后更新**{{DATE}}
```
### 命名规范
- 文件名:`[动词]-[对象].template.md`
- 示例:`clarify-requirement.template.md`
---
**最后更新**{{DATE}}
@@ -2,7 +2,7 @@
<!--
本文件不重复定义核心规则;它只负责把任务路由到合适的任务入口。
安全红线、验证要求、主循环规则见 AGENT_RULES.md。
验证要求、主循环规则见 AGENT_RULES.md。
-->
## 路由原则