From e59c0c5676e60ceb3b758713ad3c0c92310eaee2 Mon Sep 17 00:00:00 2001 From: LittleGuo Date: Sun, 22 Nov 2026 00:10:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20build-arx=20=E9=87=8C?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E5=87=86=E6=A0=87=E6=B3=A8=EF=BC=9AR250=20?= =?UTF-8?q?=E6=98=AF=20C++14=EF=BC=8C=E4=B8=8D=E6=98=AF=20C++20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现象 build-arx skill 写「R190 = AutoCAD 2019(C++98),R250/R260 = 2025/2027(C++20)」。 根因 cmakelists.txt 按 CAD_SDK_VERSION 分支:>25 提权到 C++20,>=20 提到 C++14。 R250 的 preset 是 25,落的是 C++14;只有 R260(26) 是 C++20。 照着错误标注选 preset,会以为在验现代标准,实际编的是 C++14 —— 兼容性验证的结论就是错的。 改动 - R250 = 2025(C++14),R260 = 2027(C++20) - 补一行标准阶梯:<20 → C++98,20–25 → C++14,26+ → C++20 验证 对照 SourceCode/Code2026/cmakelists.txt 与 cmakepresets.json 里的 CAD_SDK_VERSION 逐个 preset 核对。纯文档改动,未动代码。 --- .pi/skills/build-arx/SKILL.md | 3 +- .pi/skills/pr-flow/SKILL.md | 56 ----------------------------------- 2 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 .pi/skills/pr-flow/SKILL.md diff --git a/.pi/skills/build-arx/SKILL.md b/.pi/skills/build-arx/SKILL.md index 4683465..0d324e3 100644 --- a/.pi/skills/build-arx/SKILL.md +++ b/.pi/skills/build-arx/SKILL.md @@ -20,7 +20,8 @@ cmake --build --preset R190 --config Debug --target | AutoCAD | `R180 R190 R200 R210 R220 R230 R240 R243 R250 R260` | | 中望CAD | `Z2023 Z2024 Z2025 Z2026` | -R190 = AutoCAD 2019(C++98),R250/R260 = 2025/2027(C++20)。 +R190 = AutoCAD 2019(C++98),R250 = 2025(C++14),R260 = 2027(C++20)。 +标准由 `CAD_SDK_VERSION` 决定:`<20` → C++98,`20–25` → C++14,`26+` → C++20(见 cmakelists.txt)。 不确定用哪个就先用 `R190`:标准最老,代码最容易暴露问题,且 Debug 编译最快。 ## 常用 target diff --git a/.pi/skills/pr-flow/SKILL.md b/.pi/skills/pr-flow/SKILL.md deleted file mode 100644 index adc5d8b..0000000 --- a/.pi/skills/pr-flow/SKILL.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: pr-flow -description: Commit and push changes the way this repo requires — branch naming, Chinese commit messages, and pushing to refs/for/main for Gitea review. Use whenever the user asks to commit, push, or open a PR here. ---- - -# 提交与推送流程 - -远端:`origin = ssh://git@39.107.55.179:222/gjm/envi-code.git`(Gitea),主干 `main`。 -**不要直推 `main`。** - -## 1. 分支 - -```bash -git fetch origin -git log --oneline -1 origin/main # 确认起点 -git checkout -b <分支名> -``` - -分支名沿仓库历史惯例,优先 `/<英文短横线描述>`: - -``` -company-desktop-computer/perf-pipe-style-sqlite-cache -home-laptop/fix-aecdbslab-memory-leaks -``` - -也见过纯英文(`refactor-i_aecdbxequipment-copyfrom`)和带分类前缀(`docs/xxx`、`fix/xxx`),但不要用中文分支名。 - -## 2. commit - -- message **用中文**;代码修复开头用「修复」或 `fix:` / `perf:` / `refactor:` / `docs:` -- **代码与文档分开两个 commit**(便于单独 review / revert),历史先例: - `f349ed2 补充 HLR 模块问题记录文档`、`9b80db3 rafactor-pipe,fitting-speedup` -- message 正文写清:现象 → 根因 → 改动范围 → 与之前 PR 的关系 → 验证方式 → 已知风险 -- 用 `git commit -F <文件>` 传多行中文 message,避免 shell 引号问题 - -## 3. 推送 - -```bash -git push origin HEAD:refs/for/main/<分支名> -``` - -成功后 Gitea 会返回 PR 地址(`http://39.107.55.179:3000/gjm/envi-code/pulls/`)。 -更新同一个 PR:amend / 追加 commit 后再推一次同一个分支名即可。 - -## 4. 提交前检查 - -- [ ] `git status --short` 干净,无临时文件、无 `cmake_output/` 之类产物 -- [ ] `git diff --numstat` 不是整文件重写 -- [ ] 改过 `.cpp/.h` → `git diff --numstat` 确认不是整文件重写(BOM 只在整文件重写时才会丢) -- [ ] 至少编过受影响的 target(`build-arx` skill) -- [ ] **没做过 CAD 实测就在 PR 里写明"仅编译验证"**,并列出待实测项 - -## 5. 安全 - -- 各机器 SSH 私钥不同,在 `~/.ssh/config` 里指定;**私钥文件名不要写进仓库**。 -- 不要把 `auth.json`、token、客户专版配置提交进来。 -- 2.54.0 From c0fe228af0335a2aa11707b8381a3e75c5e4cc08 Mon Sep 17 00:00:00 2001 From: LittleGuo Date: Sun, 22 Nov 2026 00:10:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=80=80=E5=BD=B9=20pr-flow=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=81=E7=A8=8B=E7=BB=9F=E4=B8=80=E5=88=B0?= =?UTF-8?q?=E5=85=A8=E5=B1=80=20skill=20repo-workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 现象 pr-flow 与本机全局 skill repo-workflow 内容重复,而且已经过期:文档里写的远端是 ssh://git@39.107.55.179:222/gjm/envi-code.git,实际 origin 早已迁到 git@git.ethereal-realm.top:gjm/envi-code.git。 改动 - 删除 .pi/skills/pr-flow/SKILL.md - AGENTS.md 的 skill 表把该行标为「已退役」,指向全局 repo-workflow 影响 提交流程(分支命名、中文 commit、refs/for/main、合并后清理 main 并删分支)改由 ~/.agents/skills/repo-workflow 提供,所有仓库共用一份,不再各仓库维护副本。 build-arx / analyze-big-entity / notify-decision 属本仓库特有,保留在原处。 验证 纯文档/SKILL 改动,未动源码;repo-workflow 已在 my-skill 仓库评审合并。 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index e7b2cff..cbf12a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -76,7 +76,7 @@ | skill | 用途 | | --- | --- | | `build-arx` | 按 preset 编译、单 target、产物与部署路径 | -| `pr-flow` | 分支命名 / 中文 commit / `refs/for/main` 推送 | +| `pr-flow` | **已退役** → 改用全局 skill `repo-workflow`(提交流程已跨仓库统一) | | `analyze-big-entity` | 万行实体类的分析与改动套路 | | `notify-decision` | 需要用户拍板时主动推送通知(桌面 toast / IM 机器人),不让他干等终端 | -- 2.54.0