feat(typescript): add standards docs and sync rewrite coverage

This commit is contained in:
csh
2026-02-24 17:30:43 +08:00
parent 872c1afc24
commit 1f46203299
12 changed files with 360 additions and 12 deletions
+12
View File
@@ -269,6 +269,16 @@ def write_docs_index(dest_prefix: Path, langs: list[str]) -> None:
"- 工具链:`python/tooling.md`",
"- 配置清单:`python/configuration.md`",
]
elif lang == "typescript":
lines += [
"",
"## TypeScripttypescript",
"",
"- 代码风格:`typescript/code_style.md`",
"- 命名规范:`typescript/naming.md`",
"- 工具链:`typescript/toolchain.md`",
"- 配置清单:`typescript/configuration.md`",
]
elif lang == "markdown":
lines += [
"",
@@ -832,6 +842,7 @@ def create_agents_index(agents_root: Path, langs: list[str], docs_prefix: str |
"- `.agents/tsl/`TSL 相关规则集(由 playbook 同步;适用于 `.tsl`/`.tsf`",
"- `.agents/cpp/`C++ 相关规则集(由 playbook 同步;适用于 C++23/Modules",
"- `.agents/python/`Python 相关规则集(由 playbook 同步)",
"- `.agents/typescript/`TypeScript/JavaScript 相关规则集(由 playbook 同步)",
"- `.agents/markdown/`Markdown 相关规则集(仅代码格式化)",
"",
"规则发生冲突时,建议以“更靠近代码的目录规则更具体”为准。",
@@ -856,6 +867,7 @@ def rewrite_agents_docs_links(agents_dir: Path, docs_prefix: str) -> None:
"`docs/tsl/": f"`{docs_prefix}/tsl/",
"`docs/cpp/": f"`{docs_prefix}/cpp/",
"`docs/python/": f"`{docs_prefix}/python/",
"`docs/typescript/": f"`{docs_prefix}/typescript/",
"`docs/markdown/": f"`{docs_prefix}/markdown/",
"`docs/common/": f"`{docs_prefix}/common/",
}