Compare commits

...

4 Commits

4 changed files with 23 additions and 22 deletions

1
.gitattributes vendored
View File

@ -19,6 +19,7 @@
*.xml text eol=lf *.xml text eol=lf
*.csv text eol=lf *.csv text eol=lf
*.sh text eol=lf *.sh text eol=lf
*.bat text eol=crlf
*.py text eol=lf *.py text eol=lf
*.pyi text eol=lf *.pyi text eol=lf
*.pyx text eol=lf *.pyx text eol=lf

View File

@ -61,12 +61,12 @@ if "%SYNC_STANDARDS_INNER%"=="" (
set "AGENTS_SRC=%AGENTS_SRC_ROOT%\%AGENTS_NS%" set "AGENTS_SRC=%AGENTS_SRC_ROOT%\%AGENTS_NS%"
if not exist "%AGENTS_SRC%" ( if not exist "%AGENTS_SRC%" (
rem Backward-compatible fallback: older snapshots used <snapshot>\.agents\* directly. rem Backward-compatible fallback: older snapshots used ^<snapshot^>\.agents\* directly.
if exist "%AGENTS_SRC_ROOT%\index.md" if exist "%AGENTS_SRC_ROOT%\auth.md" ( if exist "%AGENTS_SRC_ROOT%\index.md" if exist "%AGENTS_SRC_ROOT%\auth.md" (
set "AGENTS_SRC=%AGENTS_SRC_ROOT%" set "AGENTS_SRC=%AGENTS_SRC_ROOT%"
) else ( ) else (
echo ERROR: Standards snapshot not found at "%AGENTS_SRC%". echo ERROR: Standards snapshot not found at "%AGENTS_SRC%".
echo Hint: set AGENTS_NS to one of the subdirs under "%AGENTS_SRC_ROOT%" (e.g. tsl/cpp). echo Hint: set AGENTS_NS to one of the subdirs under "%AGENTS_SRC_ROOT%" ^(e.g. tsl/cpp^).
exit /b 1 exit /b 1
) )
) )

View File

@ -14,28 +14,28 @@ rem Notes:
rem - Snapshot is written to: <project-root>\docs\standards\playbook\ rem - Snapshot is written to: <project-root>\docs\standards\playbook\
rem - Existing snapshot is backed up before overwrite. rem - Existing snapshot is backed up before overwrite.
set "SCRIPT_DIR=%~dp0"
for %%I in ("%SCRIPT_DIR%..") do set "SRC=%%~fI"
if "%~1"=="" goto Usage if "%~1"=="" goto Usage
if "%~1"=="-h" goto Usage if "%~1"=="-h" goto Usage
if "%~1"=="--help" goto Usage if "%~1"=="--help" goto Usage
set "DEST_ROOT=%~1" set "DEST_ROOT=%~1"
shift shift /1
set "LANGS=" set "LANGS="
if "%~1"=="--langs" ( if "%~1"=="--langs" (
set "LANGS=%~2" set "LANGS=%~2"
shift shift /1
shift shift /1
) else ( ) else (
set "LANGS=%*" set "LANGS=%1 %2 %3 %4 %5 %6 %7 %8 %9"
) )
if "%LANGS%"=="" set "LANGS=tsl" if "%LANGS%"=="" set "LANGS=tsl"
set "LANGS=%LANGS:,= %" set "LANGS=%LANGS:,= %"
set "SCRIPT_DIR=%~dp0"
for %%I in ("%SCRIPT_DIR%..") do set "SRC=%%~fI"
if not exist "%DEST_ROOT%" mkdir "%DEST_ROOT%" if not exist "%DEST_ROOT%" mkdir "%DEST_ROOT%"
for %%I in ("%DEST_ROOT%") do set "DEST_ROOT_ABS=%%~fI" for %%I in ("%DEST_ROOT%") do set "DEST_ROOT_ABS=%%~fI"

View File

@ -110,7 +110,7 @@ $docLines.Add("本快照为裁剪版 Playbooklangs: $langsCsv。")
$docLines.Add("") $docLines.Add("")
$docLines.Add("## 跨语言common") $docLines.Add("## 跨语言common")
$docLines.Add("") $docLines.Add("")
$docLines.Add("- 提交信息与版本号:`common/commit_message.md`") $docLines.Add('- 提交信息与版本号:`common/commit_message.md`')
function Append-DocsSection([string]$Lang) { function Append-DocsSection([string]$Lang) {
switch ($Lang) { switch ($Lang) {
@ -118,30 +118,30 @@ function Append-DocsSection([string]$Lang) {
$docLines.Add("") $docLines.Add("")
$docLines.Add("## TSLtsl") $docLines.Add("## TSLtsl")
$docLines.Add("") $docLines.Add("")
$docLines.Add("- 代码风格:`tsl/code_style.md`") $docLines.Add('- 代码风格:`tsl/code_style.md`')
$docLines.Add("- 命名规范:`tsl/naming.md`") $docLines.Add('- 命名规范:`tsl/naming.md`')
$docLines.Add("- 语法手册:`tsl/syntax_book/index.md`") $docLines.Add('- 语法手册:`tsl/syntax_book/index.md`')
$docLines.Add("- 工具链与验证命令(模板):`tsl/toolchain.md`") $docLines.Add('- 工具链与验证命令(模板):`tsl/toolchain.md`')
break break
} }
"cpp" { "cpp" {
$docLines.Add("") $docLines.Add("")
$docLines.Add("## C++cpp") $docLines.Add("## C++cpp")
$docLines.Add("") $docLines.Add("")
$docLines.Add("- 代码风格:`cpp/code_style.md`") $docLines.Add('- 代码风格:`cpp/code_style.md`')
$docLines.Add("- 命名规范:`cpp/naming.md`") $docLines.Add('- 命名规范:`cpp/naming.md`')
$docLines.Add("- 工具链与验证命令(模板):`cpp/toolchain.md`") $docLines.Add('- 工具链与验证命令(模板):`cpp/toolchain.md`')
$docLines.Add("- 第三方依赖Conan`cpp/dependencies_conan.md`") $docLines.Add('- 第三方依赖Conan`cpp/dependencies_conan.md`')
$docLines.Add("- clangd 配置:`cpp/clangd.md`") $docLines.Add('- clangd 配置:`cpp/clangd.md`')
break break
} }
"python" { "python" {
$docLines.Add("") $docLines.Add("")
$docLines.Add("## Pythonpython") $docLines.Add("## Pythonpython")
$docLines.Add("") $docLines.Add("")
$docLines.Add("- 代码风格:`python/style_guide.md`") $docLines.Add('- 代码风格:`python/style_guide.md`')
$docLines.Add("- 工具链:`python/tooling.md`") $docLines.Add('- 工具链:`python/tooling.md`')
$docLines.Add("- 配置清单:`python/configuration.md`") $docLines.Add('- 配置清单:`python/configuration.md`')
break break
} }
} }