✨ feat(sync_standards): default gitattributes to append
This commit is contained in:
@@ -153,13 +153,12 @@ git commit -m ":package: deps(playbook): add tsl standards"
|
||||
- 规则入口可读:`.agents/tsl/index.md`
|
||||
- (可选)C++ 规则入口可读:`.agents/cpp/index.md`
|
||||
- 标准文档可读:`docs/standards/playbook/docs/index.md`
|
||||
- `.gitattributes` 包含区块:`# BEGIN playbook .gitattributes` /
|
||||
`# END playbook .gitattributes`
|
||||
- `.gitattributes` 包含追加块头:`# Added from playbook .gitattributes`
|
||||
|
||||
4. 将同步产物纳入版本控制(目标项目建议提交):
|
||||
- `docs/standards/playbook/`(标准快照)
|
||||
- `.agents/tsl/`(落地规则集)
|
||||
- `.gitattributes`(managed block 更新)
|
||||
- `.gitattributes`(追加缺失规则)
|
||||
- `AGENTS.md`(若本次自动生成)
|
||||
|
||||
#### 新项目 / 旧项目(命令示例)
|
||||
@@ -240,8 +239,8 @@ sh docs/standards/playbook/scripts/sync_standards.sh tsl cpp
|
||||
同步脚本行为(目标项目内的最终落地内容):
|
||||
|
||||
- 覆盖/更新:`.agents/<AGENTS_NS>/`(默认 `.agents/tsl/`)
|
||||
- 更新 `.gitattributes`:默认只维护 `# BEGIN playbook .gitattributes` 区块(可用
|
||||
`SYNC_GITATTR_MODE=block|overwrite|skip` 控制)
|
||||
- 更新 `.gitattributes`:默认追加缺失规则(可用
|
||||
`SYNC_GITATTR_MODE=append|block|overwrite|skip` 控制)
|
||||
- 缺省创建:`.agents/index.md`
|
||||
- 覆盖前备份:写入同目录的 `*.bak.*`(或 Windows 下随机后缀)
|
||||
- 不修改:`.gitignore`(项目自行维护)
|
||||
@@ -256,7 +255,7 @@ sh docs/standards/playbook/scripts/sync_standards.sh tsl cpp
|
||||
| 变量名 | 默认值 | 说明 |
|
||||
| ------------------- | ------- | ------------------------------------------------------------------------------------------- |
|
||||
| `AGENTS_NS` | `tsl` | 同步的规则集名/落地目录名:`.agents/<AGENTS_NS>/`(例如 `tsl`、`cpp`) |
|
||||
| `SYNC_GITATTR_MODE` | `block` | `.gitattributes` 同步模式:`block` 仅维护 managed 区块;`overwrite` 全量覆盖;`skip` 不更新 |
|
||||
| `SYNC_GITATTR_MODE` | `append` | `.gitattributes` 同步模式:`append` 仅追加缺失规则(忽略注释/空行,比对后按块追加);`block` 仅维护 managed 区块;`overwrite` 全量覆盖;`skip` 不更新 |
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user