🔧 chore(markdown): add markdownlint baseline and lint fixes
This commit is contained in:
parent
a22b324c5c
commit
214c44eebc
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD013": false
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
node_modules
|
||||||
|
tmp
|
||||||
|
reports
|
||||||
|
codex/skills/thirdparty
|
||||||
|
|
@ -19,6 +19,7 @@ Follow `docs/common/commit_message.md` and use the required emoji/type mapping.
|
||||||
Run the relevant checks before pushing:
|
Run the relevant checks before pushing:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
npm run lint:md
|
||||||
python -m unittest discover -s tests/cli -v
|
python -m unittest discover -s tests/cli -v
|
||||||
python -m unittest discover -s tests -p "test_*.py" -v
|
python -m unittest discover -s tests -p "test_*.py" -v
|
||||||
sh tests/templates/validate_python_templates.sh
|
sh tests/templates/validate_python_templates.sh
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
本 Playbook 的 Python 代码风格以 Google Python Style Guide 为基线(基于 PEP
|
本 Playbook 的 Python 代码风格以 Google Python Style Guide 为基线(基于 PEP
|
||||||
8):
|
8):
|
||||||
|
|
||||||
- Google Python Style Guide: https://google.github.io/styleguide/pyguide.html
|
- Google Python Style Guide: <https://google.github.io/styleguide/pyguide.html>
|
||||||
- PEP 8: https://peps.python.org/pep-0008/
|
- PEP 8: <https://peps.python.org/pep-0008/>
|
||||||
|
|
||||||
## 项目约定(Project Conventions)
|
## 项目约定(Project Conventions)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ Guide 对齐:通过名字的“形状”快速判断实体类型(类型/函
|
||||||
- 自定义标识符只使用本指南约定的 `PascalCase`/`snake_case`;`lowerCamelCase`
|
- 自定义标识符只使用本指南约定的 `PascalCase`/`snake_case`;`lowerCamelCase`
|
||||||
仅用于沿用内置/标准库/第三方 API 的既有命名。
|
仅用于沿用内置/标准库/第三方 API 的既有命名。
|
||||||
|
|
||||||
**大小写与关键字约定**
|
### 大小写与关键字约定
|
||||||
|
|
||||||
- TSL 语言大小写无关,但本指南仍要求按约定使用大小写以提升可读性;不要用仅大小写不同的名字区分不同实体;同一标识符在仓库中应保持一致写法。
|
- TSL 语言大小写无关,但本指南仍要求按约定使用大小写以提升可读性;不要用仅大小写不同的名字区分不同实体;同一标识符在仓库中应保持一致写法。
|
||||||
- 所有语法关键字统一使用全小写书写,例如
|
- 所有语法关键字统一使用全小写书写,例如
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,9 @@ WriteLn(s[1:3]);
|
||||||
s := %%ABC%%;
|
s := %%ABC%%;
|
||||||
```
|
```
|
||||||
|
|
||||||
上面这种写法在当前解释器里会报 `missing or invalid characters`。`%%` 原始字符串开头后面必须先跟一个空白分隔符,或者写成 `%%tag ` 这种“标识符 + 空白”形式。
|
上面这种写法在当前解释器里会报 `missing or invalid characters`。`%%`
|
||||||
|
原始字符串开头后面必须先跟一个空白分隔符,或者写成 `%%tag<space>`
|
||||||
|
这种“标识符 + 空白”形式。
|
||||||
|
|
||||||
代码块身份:反例 / 不可照写
|
代码块身份:反例 / 不可照写
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
本 Playbook 的 TypeScript/JavaScript 代码风格以 Google TypeScript Style Guide 为基线:
|
本 Playbook 的 TypeScript/JavaScript 代码风格以 Google TypeScript Style Guide 为基线:
|
||||||
|
|
||||||
- Google TypeScript Style Guide: https://google.github.io/styleguide/tsguide.html
|
- Google TypeScript Style Guide: <https://google.github.io/styleguide/tsguide.html>
|
||||||
- TypeScript 官方手册: https://www.typescriptlang.org/docs/handbook/
|
- TypeScript 官方手册: <https://www.typescriptlang.org/docs/handbook/>
|
||||||
|
|
||||||
## 项目约定
|
## 项目约定
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
"name": "playbook",
|
"name": "playbook",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"markdownlint-cli": "0.48.0",
|
||||||
"prettier": "3.2.5"
|
"prettier": "3.2.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format:md": "prettier -w \"**/*.md\""
|
"format:md": "prettier -w \"**/*.md\"",
|
||||||
|
"lint:md": "npx markdownlint-cli \"**/*.md\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
> - **AI 读取**:目标项目根目录的 `.agents/`,而非此处
|
> - **AI 读取**:目标项目根目录的 `.agents/`,而非此处
|
||||||
> - **使用流程**:
|
> - **使用流程**:
|
||||||
>
|
>
|
||||||
> ```
|
> ```text
|
||||||
> playbook/rulesets/tsl/ → [sync] → your-project/.agents/tsl/ ← AI 代理读取
|
> playbook/rulesets/tsl/ → [sync] → your-project/.agents/tsl/ ← AI 代理读取
|
||||||
> (模板源) (实际使用)
|
> (模板源) (实际使用)
|
||||||
> ```
|
> ```
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
|
|
||||||
### 2. 迭代优化
|
### 2. 迭代优化
|
||||||
|
|
||||||
```
|
```text
|
||||||
草稿 → 评估 → 修改 → 再评估 → ... → 定稿
|
草稿 → 评估 → 修改 → 再评估 → ... → 定稿
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue