🔧 chore(markdown): add markdownlint baseline and lint fixes

This commit is contained in:
csh 2026-05-18 15:43:48 +08:00
parent a22b324c5c
commit 214c44eebc
10 changed files with 22 additions and 9 deletions

4
.markdownlint.json Normal file
View File

@ -0,0 +1,4 @@
{
"default": true,
"MD013": false
}

4
.markdownlintignore Normal file
View File

@ -0,0 +1,4 @@
node_modules
tmp
reports
codex/skills/thirdparty

View File

@ -19,6 +19,7 @@ Follow `docs/common/commit_message.md` and use the required emoji/type mapping.
Run the relevant checks before pushing:
```bash
npm run lint:md
python -m unittest discover -s tests/cli -v
python -m unittest discover -s tests -p "test_*.py" -v
sh tests/templates/validate_python_templates.sh

View File

@ -3,8 +3,8 @@
本 Playbook 的 Python 代码风格以 Google Python Style Guide 为基线(基于 PEP
8
- Google Python Style Guide: https://google.github.io/styleguide/pyguide.html
- PEP 8: https://peps.python.org/pep-0008/
- Google Python Style Guide: <https://google.github.io/styleguide/pyguide.html>
- PEP 8: <https://peps.python.org/pep-0008/>
## 项目约定Project Conventions

View File

@ -40,7 +40,7 @@ Guide 对齐:通过名字的“形状”快速判断实体类型(类型/函
- 自定义标识符只使用本指南约定的 `PascalCase`/`snake_case``lowerCamelCase`
仅用于沿用内置/标准库/第三方 API 的既有命名。
**大小写与关键字约定**
### 大小写与关键字约定
- TSL 语言大小写无关,但本指南仍要求按约定使用大小写以提升可读性;不要用仅大小写不同的名字区分不同实体;同一标识符在仓库中应保持一致写法。
- 所有语法关键字统一使用全小写书写,例如

View File

@ -555,7 +555,9 @@ WriteLn(s[1:3]);
s := %%ABC%%;
```
上面这种写法在当前解释器里会报 `missing or invalid characters`。`%%` 原始字符串开头后面必须先跟一个空白分隔符,或者写成 `%%tag ` 这种“标识符 + 空白”形式。
上面这种写法在当前解释器里会报 `missing or invalid characters`。`%%`
原始字符串开头后面必须先跟一个空白分隔符,或者写成 `%%tag<space>`
这种“标识符 + 空白”形式。
代码块身份:反例 / 不可照写

View File

@ -2,8 +2,8 @@
本 Playbook 的 TypeScript/JavaScript 代码风格以 Google TypeScript Style Guide 为基线:
- Google TypeScript Style Guide: https://google.github.io/styleguide/tsguide.html
- TypeScript 官方手册: https://www.typescriptlang.org/docs/handbook/
- Google TypeScript Style Guide: <https://google.github.io/styleguide/tsguide.html>
- TypeScript 官方手册: <https://www.typescriptlang.org/docs/handbook/>
## 项目约定

View File

@ -2,9 +2,11 @@
"name": "playbook",
"private": true,
"devDependencies": {
"markdownlint-cli": "0.48.0",
"prettier": "3.2.5"
},
"scripts": {
"format:md": "prettier -w \"**/*.md\""
"format:md": "prettier -w \"**/*.md\"",
"lint:md": "npx markdownlint-cli \"**/*.md\""
}
}

View File

@ -6,7 +6,7 @@
> - **AI 读取**:目标项目根目录的 `.agents/`,而非此处
> - **使用流程**
>
> ```
> ```text
> playbook/rulesets/tsl/ → [sync] → your-project/.agents/tsl/ ← AI 代理读取
> (模板源) (实际使用)
> ```

View File

@ -84,7 +84,7 @@
### 2. 迭代优化
```
```text
草稿 → 评估 → 修改 → 再评估 → ... → 定稿
```