✨ feat(markdown): add ruleset and sync support
This commit is contained in:
@@ -123,7 +123,8 @@ if not exist "%AGENTS_ROOT%\index.md" (
|
||||
>> "%AGENTS_ROOT%\index.md" echo.
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/tsl/`:TSL 相关规则集(由 `sync_standards.*` 同步;适用于 `.tsl`/`.tsf`)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/cpp/`:C++ 相关规则集(由 `sync_standards.*` 同步;适用于 C++23/Modules)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/python/` 等:其他语言的规则集(按需增加)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/python/`:Python 相关规则集(由 `sync_standards.*` 同步)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/markdown/`:Markdown 相关规则集(仅代码格式化)
|
||||
>> "%AGENTS_ROOT%\index.md" echo.
|
||||
>> "%AGENTS_ROOT%\index.md" echo 规则发生冲突时,建议以“更靠近代码的目录规则更具体”为准。
|
||||
>> "%AGENTS_ROOT%\index.md" echo.
|
||||
@@ -131,6 +132,7 @@ if not exist "%AGENTS_ROOT%\index.md" (
|
||||
>> "%AGENTS_ROOT%\index.md" echo.
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/tsl/index.md`(TSL 规则集入口)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/cpp/index.md`(C++ 规则集入口)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `.agents/markdown/index.md`(Markdown 规则集入口)
|
||||
>> "%AGENTS_ROOT%\index.md" echo - `docs/standards/playbook/docs/`(人类开发规范快照:`tsl/`、`cpp/`、`python/`、`common/`)
|
||||
echo Created .agents\index.md
|
||||
)
|
||||
|
||||
@@ -119,7 +119,8 @@ if (-not (Test-Path $AgentsIndex)) {
|
||||
|
||||
- `.agents/tsl/`:TSL 相关规则集(由 `sync_standards.*` 同步;适用于 `.tsl`/`.tsf`)
|
||||
- `.agents/cpp/`:C++ 相关规则集(由 `sync_standards.*` 同步;适用于 C++23/Modules)
|
||||
- `.agents/python/` 等:其他语言的规则集(按需增加)
|
||||
- `.agents/python/`:Python 相关规则集(由 `sync_standards.*` 同步)
|
||||
- `.agents/markdown/`:Markdown 相关规则集(仅代码格式化)
|
||||
|
||||
规则发生冲突时,建议以“更靠近代码的目录规则更具体”为准。
|
||||
|
||||
@@ -127,6 +128,7 @@ if (-not (Test-Path $AgentsIndex)) {
|
||||
|
||||
- `.agents/tsl/index.md`(TSL 规则集入口)
|
||||
- `.agents/cpp/index.md`(C++ 规则集入口)
|
||||
- `.agents/markdown/index.md`(Markdown 规则集入口)
|
||||
- `docs/standards/playbook/docs/`(人类开发规范快照:`tsl/`、`cpp/`、`python/`、`common/`)
|
||||
'@ | Set-Content -Path $AgentsIndex -Encoding UTF8
|
||||
Write-Host "Created .agents/index.md"
|
||||
|
||||
@@ -127,7 +127,8 @@ if [ ! -f "$AGENTS_INDEX" ]; then
|
||||
|
||||
- `.agents/tsl/`:TSL 相关规则集(由 `sync_standards.*` 同步;适用于 `.tsl`/`.tsf`)
|
||||
- `.agents/cpp/`:C++ 相关规则集(由 `sync_standards.*` 同步;适用于 C++23/Modules)
|
||||
- `.agents/python/` 等:其他语言的规则集(按需增加)
|
||||
- `.agents/python/`:Python 相关规则集(由 `sync_standards.*` 同步)
|
||||
- `.agents/markdown/`:Markdown 相关规则集(仅代码格式化)
|
||||
|
||||
规则发生冲突时,建议以“更靠近代码的目录规则更具体”为准。
|
||||
|
||||
@@ -135,6 +136,7 @@ if [ ! -f "$AGENTS_INDEX" ]; then
|
||||
|
||||
- `.agents/tsl/index.md`(TSL 规则集入口)
|
||||
- `.agents/cpp/index.md`(C++ 规则集入口)
|
||||
- `.agents/markdown/index.md`(Markdown 规则集入口)
|
||||
- `docs/standards/playbook/docs/`(人类开发规范快照:`tsl/`、`cpp/`、`python/`、`common/`)
|
||||
EOF
|
||||
echo "Created .agents/index.md"
|
||||
|
||||
@@ -204,6 +204,7 @@ if not exist "%PROJECT_AGENTS_INDEX%" (
|
||||
if /I "%%~L"=="tsl" >> "%PROJECT_AGENTS_INDEX%" echo - .agents/tsl/:TSL 相关规则集(适用于 .tsl/.tsf)
|
||||
if /I "%%~L"=="cpp" >> "%PROJECT_AGENTS_INDEX%" echo - .agents/cpp/:C++ 相关规则集(C++23,含 Modules)
|
||||
if /I "%%~L"=="python" >> "%PROJECT_AGENTS_INDEX%" echo - .agents/python/:Python 相关规则集
|
||||
if /I "%%~L"=="markdown" >> "%PROJECT_AGENTS_INDEX%" echo - .agents/markdown/:Markdown 相关规则集(仅代码格式化)
|
||||
)
|
||||
>> "%PROJECT_AGENTS_INDEX%" echo.
|
||||
>> "%PROJECT_AGENTS_INDEX%" echo 入口建议从:
|
||||
@@ -254,6 +255,12 @@ if /I "%LANG%"=="python" (
|
||||
>> "%DOC_INDEX%" echo - 工具链:`python/tooling.md`
|
||||
>> "%DOC_INDEX%" echo - 配置清单:`python/configuration.md`
|
||||
)
|
||||
if /I "%LANG%"=="markdown" (
|
||||
>> "%DOC_INDEX%" echo.
|
||||
>> "%DOC_INDEX%" echo ## Markdown(markdown)
|
||||
>> "%DOC_INDEX%" echo.
|
||||
>> "%DOC_INDEX%" echo - 代码块与行内代码格式:`markdown/index.md`
|
||||
)
|
||||
exit /b 0
|
||||
|
||||
:Usage
|
||||
|
||||
@@ -144,6 +144,13 @@ function Append-DocsSection([string]$Lang) {
|
||||
$docLines.Add('- 配置清单:`python/configuration.md`')
|
||||
break
|
||||
}
|
||||
"markdown" {
|
||||
$docLines.Add("")
|
||||
$docLines.Add("## Markdown(markdown)")
|
||||
$docLines.Add("")
|
||||
$docLines.Add('- 代码块与行内代码格式:`markdown/index.md`')
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +226,7 @@ if (-not (Test-Path $ProjectAgentsIndex)) {
|
||||
"tsl" { $agentLines.Add("- .agents/tsl/:TSL 相关规则集(适用于 .tsl/.tsf)"); break }
|
||||
"cpp" { $agentLines.Add("- .agents/cpp/:C++ 相关规则集(C++23,含 Modules)"); break }
|
||||
"python" { $agentLines.Add("- .agents/python/:Python 相关规则集"); break }
|
||||
"markdown" { $agentLines.Add("- .agents/markdown/:Markdown 相关规则集(仅代码格式化)"); break }
|
||||
}
|
||||
}
|
||||
$agentLines.Add("")
|
||||
|
||||
@@ -170,6 +170,14 @@ EOF
|
||||
- 代码风格:`python/style_guide.md`
|
||||
- 工具链:`python/tooling.md`
|
||||
- 配置清单:`python/configuration.md`
|
||||
EOF
|
||||
;;
|
||||
markdown)
|
||||
cat >>"$DEST_PREFIX/docs/index.md" <<'EOF'
|
||||
|
||||
## Markdown(markdown)
|
||||
|
||||
- 代码块与行内代码格式:`markdown/index.md`
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
@@ -245,6 +253,7 @@ EOF
|
||||
tsl) printf '%s\n' "- .agents/tsl/:TSL 相关规则集(适用于 .tsl/.tsf)" >>"$PROJECT_AGENTS_INDEX" ;;
|
||||
cpp) printf '%s\n' "- .agents/cpp/:C++ 相关规则集(C++23,含 Modules)" >>"$PROJECT_AGENTS_INDEX" ;;
|
||||
python) printf '%s\n' "- .agents/python/:Python 相关规则集" >>"$PROJECT_AGENTS_INDEX" ;;
|
||||
markdown) printf '%s\n' "- .agents/markdown/:Markdown 相关规则集(仅代码格式化)" >>"$PROJECT_AGENTS_INDEX" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user