From f71a70780dd43e26f90685336b0d468bb16722d4 Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Thu, 27 Aug 2026 02:37:04 +0800 Subject: [PATCH] docs(plays): check root README when archiving an application Add a step to the plays-archive skill and the after-release track 1 to check the root README of the main and current branches before generating a functional summary: merge the README into the summary when it exists, summarize directly otherwise, and update (create) the root README after archiving when neither branch has one. Root README creation follows the fork-owner convention. --- docs/development/after-release.md | 6 ++++++ docs/development/after-release.zh_CN.md | 4 ++++ skills/plays-archive/SKILL.md | 28 ++++++++++++++++++++++++- skills/plays-archive/SKILL.zh_CN.md | 23 ++++++++++++++++++-- 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/docs/development/after-release.md b/docs/development/after-release.md index 07115f3..e6db711 100644 --- a/docs/development/after-release.md +++ b/docs/development/after-release.md @@ -22,6 +22,12 @@ the cover image as `plays//-cover.`. Commit on the summary and cover; do not store the firmware `.bin` here. See [`../../plays/README.md`](../../plays/README.md). +Before generating the summary, check the root README of the `main` and current +branches (`plays-archive` skill): if a README exists, prompt the developer to +update it and merge it into the summary; if not, summarize directly. After +archiving, if neither branch has a root README, update (create) it so the +archived application is discoverable from the fork's own README. + ## Track 2: Collect suggestions and file issues Run the `issue-suggestions` skill to gather the releasing developer's own diff --git a/docs/development/after-release.zh_CN.md b/docs/development/after-release.zh_CN.md index 0612f69..a99a97f 100644 --- a/docs/development/after-release.zh_CN.md +++ b/docs/development/after-release.zh_CN.md @@ -17,6 +17,10 @@ `plays//-cover.`。只提交总结与封面;**不要**在这里存固件 `.bin`。见 [`../../plays/README.md`](../../plays/README.md)。 +生成总结前,先检查 `main` 分支和当前分支**根目录**的 README(`plays-archive` skill):若有 README, +提示开发者更新并把它合并进总结;若没有,直接总结。归档完成后,若两侧分支根目录都无 README, +则更新(创建)它,让归档的应用能从 fork 自己的 README 检索到。 + ## 轨道 2:收集建议并提交 issue 运行 `issue-suggestions` skill,收集发布固件的开发者本人的改进点,把有价值的整理成功能 diff --git a/skills/plays-archive/SKILL.md b/skills/plays-archive/SKILL.md index 58a77cd..ba9277a 100644 --- a/skills/plays-archive/SKILL.md +++ b/skills/plays-archive/SKILL.md @@ -36,6 +36,28 @@ Confirm the application name and the source it belongs to (for example a subdirectory name. See [`../../plays/README.md`](../../plays/README.md) for the full convention. +## Check the project README + +Before generating the summary, check the **root README** of both the `main` +branch and the current branch: + +- `git ls-tree --name-only main README.md` — is there a README on `main`? +- `test -f README.md` — is there a README on the current branch? + +Follow the repository rule that the root README path is reserved for the fork +owner (see `docs/fork-guide.md`); do not create a root README unless the fork +actually owns one. + +1. **If a README exists** (on `main` or the current branch): prompt the developer + to update it and read it. When archiving, **merge the README content into the + functional summary** so the summary reflects the human-facing description, not + just the code. +2. **If no README exists**: summarize directly from the implementation, with no + README merge. +3. **After archiving is complete**: if neither `main` nor the current branch has a + root README, update (create) the root README so the archived application is + discoverable from the fork's own README. + ## Generate the functional summary Write `plays//README.md` and its paired `.zh_CN.md` as an AI-generated @@ -47,6 +69,9 @@ functional summary for later querying (not a publishing artifact). Record: - The source branch or directory it lives in. - The cover image file name and format. +If the root README exists, merge its content into the summary rather than +ignoring the human-facing description. + Write the default `.md` in English and the `.zh_CN.md` in Simplified Chinese, aligned in the same change. @@ -59,7 +84,8 @@ to the repository. Keep it representative and under 10 MiB. Commit the summary and cover on the dedicated branch (English imperative Conventional Commit title, for example -`docs(plays): add application archive`). Do **not** store the merged +`docs(plays): add application archive`). If a root README was created +or updated, include it in the same change. Do **not** store the merged firmware `.bin` here; it is a build/publish artifact. Report Build, Host tests, Device tests, and Unverified separately. diff --git a/skills/plays-archive/SKILL.zh_CN.md b/skills/plays-archive/SKILL.zh_CN.md index 7b1bf50..2326de6 100644 --- a/skills/plays-archive/SKILL.zh_CN.md +++ b/skills/plays-archive/SKILL.zh_CN.md @@ -29,6 +29,22 @@ description: 固件发布之后,把已发布的应用归档到本仓库的 pla 确认应用名及其所属源码(例如某个 `demo/*` 分支或 `main/`)。用小写连字符的应用名作为子目录名。 完整约定见 [`../../plays/README.md`](../../plays/README.md)。 +## 检查项目 README + +生成功能说明前,先检查 `main` 分支和当前分支**根目录**的 README: + +- `git ls-tree --name-only main README.md` —— `main` 分支有没有 README? +- `test -f README.md` —— 当前分支有没有 README? + +遵循仓库规则:根 README 路径保留给 fork owner(见 `docs/fork-guide.md`);除非 fork 确实拥有 +根 README,否则不要创建。 + +1. **若有 README**(`main` 或当前分支有):提示开发者更新并读取它。归档时把 **README 内容合并进 + 功能说明**,让说明既反映人类可读的描述,也反映代码。 +2. **若没有 README**:直接从实现总结,不合并 README。 +3. **归档完成后**:若 `main` 和当前分支根目录都**没有** README,则更新(创建)根 README,让归档的 + 应用能从 fork 自己的 README 检索到。 + ## 生成功能说明 写 `plays//README.md` 及其配对 `.zh_CN.md`,作为为后续查询而生成的 AI 功能说明 @@ -40,6 +56,8 @@ description: 固件发布之后,把已发布的应用归档到本仓库的 pla - 所属源码分支或目录。 - 封面图文件名与格式。 +若根 README 存在,把它合并进说明,而不是忽略人类可读的描述。 + 默认 `.md` 用英文、配对 `.zh_CN.md` 用简体中文,并在同一次变更中对齐。 ## 添加封面图 @@ -50,8 +68,9 @@ description: 固件发布之后,把已发布的应用归档到本仓库的 pla ## 提交 在独立分支上提交总结与封面(英文祈使句 Conventional Commit 标题,例如 -`docs(plays): add application archive`)。**不要**在这里存合并固件 `.bin`;它是构建/ -发布产物。按 Build、Host tests、Device tests、Unverified 分别上报。 +`docs(plays): add application archive`)。若创建或更新了根 README,一并纳入同一次变更。 +**不要**在这里存合并固件 `.bin`;它是构建/发布产物。按 Build、Host tests、Device tests、 +Unverified 分别上报。 ## 本 skill 不做的事