Sfoglia il codice sorgente

docs(full-stack-doc): 更新文档标准说明和模板目录结构

- 重构 README.md 内容,简化模板目录说明并更新表格格式
- 更新 SKILL.md 描述,添加元数据信息和兼容性要求
- 新增 references/structure.md 详细文件结构参考文档
- 整合原有 14 阶段模板映射关系到新的目录结构中
- 更新占位符说明和使用步骤指引
- 优化验证清单和特殊情况处理说明
wandl-6A72h 5 mesi fa
parent
commit
319ad25a4b

+ 66 - 79
skills/document-skills/full-stack-doc/SKILL.md

@@ -1,111 +1,98 @@
 ---
 name: full-stack-doc
-description: Enforces the PartMe/Octo-style product documentation layout—11 root standard docs, 7 per version folder, optional module triplets (PRD/Stitch/UI), plus 技术调研/其他/special dirs. Markdown templates live under templates/ as root/, version/, module/, delivery/ (merged legacy 1–14 + OctoPanel examples). Use when organizing partme-docs, Octo* projects, scaffolding doc trees, or aligning repo docs to this standard.
+description: >
+  Scaffolds, validates, and maintains PartMe/Octo-style product documentation
+  trees — 11 root-level docs, 7 per-version docs, and optional per-module
+  triplets (PRD / Stitch / UI). Provides ready-to-copy Markdown templates with
+  {Name} and {V} placeholders. Use when creating new product doc repositories,
+  organizing partme-docs or Octo* projects, auditing repo doc structures, or
+  generating documentation scaffolding — even if the user just says "set up docs",
+  "create doc structure", "初始化文档", or "产品文档".
+metadata:
+  author: partme
+  version: "2.0"
+compatibility: Requires filesystem access for scaffolding and template copying.
 ---
 
-## 概述
+# Product Documentation Standard
 
-本技能将 **产品文档目录与文件命名** 固化为可复用标准(与 `partme-docs` 下 Octo 系列实践一致)。**正文模板** 位于 [`templates/`](templates/) 下四个子目录 [`root/`](templates/root/)、[`version/`](templates/version/)、[`module/`](templates/module/)、[`delivery/`](templates/delivery/)(已合并原全生命周期 14 阶段模板与 OctoPanel 实例结构);不再维护单独的 `legacy-lifecycle` 或 `project-standard` 嵌套目录。
+Enforces a fixed directory-and-naming convention for product documentation, aligned with the PartMe / Octo series. Ready-to-copy Markdown templates live under [`templates/`](templates/).
 
-**关键词**: 产品文档、版本目录、PRD、功能菜单、技术调研、其他目录、Octo、partme-docs
+## When to use
 
-## 占位符
+- Creating or initializing a product documentation repository
+- Scaffolding doc trees for Octo* or PartMe projects
+- Auditing or aligning existing repos against the PartMe doc standard
+- Generating / renaming docs to match the naming convention
+- Aligning `partme-docs/` content with the template structure
 
-- `{Name}`:产品或项目英文名/品牌名(如 `OctoPanel`、`OctoClaw-4j`),用于文件名前缀。
-- `{V}`:版本目录名(如 `V1`、`V2`、`V1.5`),用于版本级文件名后缀。
+## Placeholders
 
-生成实际文件时:将 `{Name}`、`{V}` 替换为真实值;**根目录与「详细功能清单」允许两个文件同用序号 `6、`**(与现网约定一致)。
+| Placeholder | Meaning | Example |
+|-------------|---------|---------|
+| `{Name}` | Product / brand name | `OctoPanel` |
+| `{V}` | Version directory name | `V1`, `V2` |
+| `{模块简称}` | Module short name | `登录页`, `设备中心` |
 
-## 一、项目根目录:11 份标准文档
+Replace placeholders in **both filenames and content**. Root allows two files sharing sequence `6、` — this is intentional.
 
-路径:`{项目根}/`
+## Structure at a glance
 
-| 序号 | 文件名 |
-|------|--------|
-| 1 | `1、{Name}-命名与品牌说明.md` |
-| 2 | `2、{Name}-术语表与词汇表.md` |
-| 3 | `3、{Name}-市场与商业分析.md` |
-| 4 | `4、{Name}-技术与可行性分析.md` |
-| 5 | `5、{Name}-技术方案与路线.md` |
-| 6 | `6、{Name}-产品与版本规划.md` |
-| 6 | `6、{Name}-详细功能清单.md` |
-| 7 | `7、{Name}-领域模型设计.md` |
-| 8 | `8、{Name}-系统架构设计.md` |
-| 9 | `9、{Name}-视觉与交互DNA规范.md` |
-| 10 | `10、{Name}-功能菜单与版本规划.md` |
+| Scope | Count | Templates | Naming pattern |
+|-------|-------|-----------|----------------|
+| Root | 11 (two share `6、`) | [`templates/root/`](templates/root/) | `{序号}、{Name}-{文档名}.md` |
+| Version (`{V}/`) | 7 | [`templates/version/`](templates/version/) | `{序号}、{Name}-{文档名}-{V}.md` |
+| Module (optional) | 3 per module | [`templates/module/`](templates/module/) | `{Name}-{模块简称}-{类型}-{V}.md` |
+| Delivery (optional) | 5 | [`templates/delivery/`](templates/delivery/) | Context-dependent |
 
-**骨架模板目录**: [`templates/root/`](templates/root/)(每个文件对应上表一项,正文内含 `{Name}` 占位)。
+Special directories: `技术调研/` for tech research, `其他/` for non-standard docs. Directories like `demo/`, `assets/`, `.stitch/` stay untouched.
 
-## 二、版本目录:7 份标准文档
+For complete file listings and naming rules, see [`references/structure.md`](references/structure.md).
 
-路径:`{项目根}/{V}/`(如 `V1/`、`V2/`)
+## Scaffolding workflow
 
-| 序号 | 文件名 |
-|------|--------|
-| 1 | `1、{Name}-需求调研文档-{V}.md` |
-| 2 | `2、{Name}-需求分析文档-{V}.md` |
-| 3 | `3、{Name}-系统架构设计-{V}.md` |
-| 4 | `4、{Name}-功能与界面规划-{V}.md` |
-| 5 | `5、{Name}-PRD文档-{V}.md` |
-| 6 | `6、{Name}-功能菜单与版本规划-{V}.md` |
-| 7 | `7、{Name}-UI设计说明-{V}.md` |
+Copy this checklist and track progress:
 
-**骨架模板目录**: [`templates/version/`](templates/version/)
+```
+Doc Scaffolding:
+- [ ] Step 1: Root — copy templates/root/ → project root, rename with {Name}
+- [ ] Step 2: Version — copy templates/version/ → {V}/, rename with {Name} and {V}
+- [ ] Step 3: Modules — copy templates/module/ per module folder (if applicable)
+- [ ] Step 4: Special dirs — create 技术调研/ and 其他/ as needed
+- [ ] Step 5: Validate — run the checklist below
+```
 
-**注意**: 版本目录内若还有对象字典、错误码、研发拆解等非标准文档,**不得占用** 1–7 序号与上述文件名语义;应使用 `8、` 及以后序号,或放入 `其他/`。
+**Step 1 — Root docs**: Copy all 11 files from `templates/root/` into the project root. Rename each replacing `{Name}` with the actual product name: e.g., `1、命名与品牌说明.md` → `1、OctoPanel-命名与品牌说明.md`.
 
-## 三、功能模块:每个模块 3 份文档(可选)
+**Step 2 — Version docs**: Create `{V}/` (e.g., `V1/`). Copy 7 files from `templates/version/`. Replace both `{Name}` and `{V}` in filenames and content.
 
-路径示例:`{项目根}/{V}/{序号}、{模块中文名}/`
-
-每个功能点模块建议具备:
-
-- `{Name}-{模块简称}-PRD-{V}.md`
-- `{Name}-{模块简称}-Stitch设计提示词.md`(或无 `-{V}`,按项目约定)
-- `{Name}-{模块简称}-UI设计说明-{V}.md`
-
-**示例**(OctoPanel V1 用户登录):
+**Step 3 — Module docs** (optional): For each functional module, create `{V}/{序号}、{模块名}/`. Copy 3 files from `templates/module/`. Replace `{Name}`, `{模块简称}`, and `{V}`.
 
+Example (OctoPanel V1 login):
 - `OctoPanel-登录页-PRD-V1.md`
 - `OctoPanel-登录页-Stitch设计提示词.md`
 - `OctoPanel-登录页-UI设计说明-V1.md`
 
-**骨架模板**: [`templates/module/`](templates/module/) 下三个文件;复制后按模块改名。
-
-## 四、技术调研目录
-
-路径:`{项目根}/技术调研/`
-
-凡技术选型、方案对比、协议与第三方集成调研等 **非版本定稿叙述**,放此目录(可再分子目录)。
-
-## 五、其他目录
-
-路径:`{项目根}/其他/`
-
-凡 **非版本特定**、**非技术调研**、且 **不属于** 根 11 份 / 版本 7 份 / 模块 3 份 的文档(任务单、门禁清单、对标报告、临时索引等),统一放 `其他/`。
-
-**技术细分模板**(接口/库表级细节):[`templates/delivery/1、技术细分模板.md`](templates/delivery/1、技术细分模板.md);落地时建议放入项目 `其他/` 或研发仓库。
-
-## 五之一、交付阶段模板(可选)
-
-不占用根目录标准序号时,可使用 [`templates/delivery/`](templates/delivery/):`1、技术细分`,以及 `2~5`(功能提测、测试结果、上线通知、项目运维)。
-
-## 六、特殊目录(保持不动)
+**Step 4 — Special dirs**: Create `技术调研/` for tech research and `其他/` for non-standard docs. Delivery templates (`templates/delivery/`) go into `其他/` or a dedicated delivery folder.
 
-已按约定组织的目录 **不要强行迁入标准序号**,例如:`demo/`、`assets/`、`article/`、`article-cn/`、`archive/`、`.stitch/`、`stitch_*`、`实施指南/` 等——除非用户明确要求重构。
+**Step 5 — Validate**: Run the validation checklist below.
 
-## 七、与旧版「14 模板」的关系
+## Gotchas
 
-原 **14 阶段模板** 已 **合并进** [`templates/`](templates/) 下 `root/`、`version/`、`module/`、`delivery/`,与 OctoPanel 实例正文同一套目录即可扩写;**独立 `templates/legacy-lifecycle/` 与 `templates/project-standard/` 目录已移除**,避免重复维护。
+- Sequence numbers `1–7` in version folders are **reserved** for the 7 standard docs. Non-standard docs must use `8+` or go into `其他/`.
+- Root has **two** files numbered `6、` (产品与版本规划 and 详细功能清单) — this is by design.
+- Don't reorganize special directories (`demo/`, `assets/`, `.stitch/`, `stitch_*`, `实施指南/`) unless the user explicitly requests it.
+- Delivery templates are optional and do **not** occupy root-level standard sequence numbers.
 
-## 八、相关技能
+## Validation checklist
 
-- `documentation-builder`:通用文档编写与格式([`../dev-utils-skills/documentation-builder`](../dev-utils-skills/documentation-builder))
-- `api-doc-generator`:OpenAPI 等 API 文档(同组 `document-skills`)
+1. Root contains 11 standard files (including two `6、`s) ending with `10、功能菜单与版本规划`
+2. Each active version folder contains exactly 7 standard files with correct `{V}` suffix
+3. `技术调研/` and `其他/` do not contain root-level standard docs
+4. Module folders have PRD / Stitch / UI triplet (if project uses module-level docs)
+5. No sequence numbers 1–7 used for non-standard docs in version folders
 
-## 九、校验清单(Agent 自检)
+## Related skills
 
-1. 项目根是否存在 11 份标准文件(含两个 `6、`)与 `10、` 功能菜单。
-2. 每个活跃版本目录是否存在 7 份标准文件,且 UI 为 `7、`、功能菜单为 `6、`。
-3. 技术调研与其它目录是否未混放根级标准文档。
-4. 模块目录是否具备 PRD / Stitch / UI 三件套(若该项目约定模块级文档)。
+- [`documentation-builder`](../dev-utils-skills/documentation-builder): General doc writing and formatting conventions
+- [`api-doc-generator`](api-doc-generator): OpenAPI and API documentation generation

+ 106 - 0
skills/document-skills/full-stack-doc/references/structure.md

@@ -0,0 +1,106 @@
+# Document Structure Reference
+
+Detailed file listings and naming conventions for the PartMe/Octo documentation standard. This file is loaded on-demand when agents need exact filenames or mapping details.
+
+## Contents
+
+- [Root directory: 11 standard docs](#root-directory-11-standard-docs)
+- [Version directory: 7 standard docs](#version-directory-7-standard-docs)
+- [Module directory: 3 docs per module](#module-directory-3-docs-per-module)
+- [Delivery templates: 5 optional docs](#delivery-templates-5-optional-docs)
+- [Special directories](#special-directories)
+- [Legacy template mapping](#legacy-template-mapping)
+
+## Root directory: 11 standard docs
+
+Path: `{项目根}/`
+
+| # | Filename | Template |
+|---|----------|----------|
+| 1 | `1、{Name}-命名与品牌说明.md` | [`templates/root/1、命名与品牌说明.md`](../templates/root/1、命名与品牌说明.md) |
+| 2 | `2、{Name}-术语表与词汇表.md` | [`templates/root/2、术语表与词汇表.md`](../templates/root/2、术语表与词汇表.md) |
+| 3 | `3、{Name}-市场与商业分析.md` | [`templates/root/3、市场与商业分析.md`](../templates/root/3、市场与商业分析.md) |
+| 4 | `4、{Name}-技术与可行性分析.md` | [`templates/root/4、技术与可行性分析.md`](../templates/root/4、技术与可行性分析.md) |
+| 5 | `5、{Name}-技术方案与路线.md` | [`templates/root/5、技术方案与路线.md`](../templates/root/5、技术方案与路线.md) |
+| 6 | `6、{Name}-产品与版本规划.md` | [`templates/root/6、产品与版本规划.md`](../templates/root/6、产品与版本规划.md) |
+| 6 | `6、{Name}-详细功能清单.md` | [`templates/root/6、详细功能清单.md`](../templates/root/6、详细功能清单.md) |
+| 7 | `7、{Name}-领域模型设计.md` | [`templates/root/7、领域模型设计.md`](../templates/root/7、领域模型设计.md) |
+| 8 | `8、{Name}-系统架构设计.md` | [`templates/root/8、系统架构设计.md`](../templates/root/8、系统架构设计.md) |
+| 9 | `9、{Name}-视觉与交互DNA规范.md` | [`templates/root/9、视觉与交互DNA规范.md`](../templates/root/9、视觉与交互DNA规范.md) |
+| 10 | `10、{Name}-功能菜单与版本规划.md` | [`templates/root/10、功能菜单与版本规划.md`](../templates/root/10、功能菜单与版本规划.md) |
+
+Two files share sequence number `6、` — this is intentional and matches the production convention.
+
+## Version directory: 7 standard docs
+
+Path: `{项目根}/{V}/` (e.g., `V1/`, `V2/`)
+
+| # | Filename | Template |
+|---|----------|----------|
+| 1 | `1、{Name}-需求调研文档-{V}.md` | [`templates/version/1、需求调研文档.md`](../templates/version/1、需求调研文档.md) |
+| 2 | `2、{Name}-需求分析文档-{V}.md` | [`templates/version/2、需求分析文档.md`](../templates/version/2、需求分析文档.md) |
+| 3 | `3、{Name}-系统架构设计-{V}.md` | [`templates/version/3、系统架构设计.md`](../templates/version/3、系统架构设计.md) |
+| 4 | `4、{Name}-功能与界面规划-{V}.md` | [`templates/version/4、功能与界面规划.md`](../templates/version/4、功能与界面规划.md) |
+| 5 | `5、{Name}-PRD文档-{V}.md` | [`templates/version/5、PRD文档.md`](../templates/version/5、PRD文档.md) |
+| 6 | `6、{Name}-功能菜单与版本规划-{V}.md` | [`templates/version/6、功能菜单与版本规划.md`](../templates/version/6、功能菜单与版本规划.md) |
+| 7 | `7、{Name}-UI设计说明-{V}.md` | [`templates/version/7、UI设计说明.md`](../templates/version/7、UI设计说明.md) |
+
+Sequence numbers 1–7 are **reserved**. Non-standard docs in version folders must use `8+` or be placed in `其他/`.
+
+## Module directory: 3 docs per module
+
+Path: `{项目根}/{V}/{序号}、{模块中文名}/`
+
+| File | Template |
+|------|----------|
+| `{Name}-{模块简称}-PRD-{V}.md` | [`templates/module/模块-PRD.md`](../templates/module/模块-PRD.md) |
+| `{Name}-{模块简称}-Stitch设计提示词.md` | [`templates/module/模块-Stitch设计提示词.md`](../templates/module/模块-Stitch设计提示词.md) |
+| `{Name}-{模块简称}-UI设计说明-{V}.md` | [`templates/module/模块-UI设计说明.md`](../templates/module/模块-UI设计说明.md) |
+
+The Stitch file may omit the `-{V}` suffix per project convention.
+
+## Delivery templates: 5 optional docs
+
+Located in [`templates/delivery/`](../templates/delivery/). These do **not** occupy root-level sequence numbers. Place deliverables in `其他/` or a dedicated delivery folder.
+
+| # | File | Original legacy # |
+|---|------|--------------------|
+| 1 | `1、技术细分模板.md` | Legacy #10 |
+| 2 | `2、功能提测模板.md` | Legacy #11 |
+| 3 | `3、测试结果模板.md` | Legacy #12 |
+| 4 | `4、上线通知模板.md` | Legacy #13 |
+| 5 | `5、项目运维模板.md` | Legacy #14 |
+
+## Special directories
+
+These directories follow their own conventions — do **not** reorganize unless the user explicitly requests it:
+
+| Directory | Purpose |
+|-----------|---------|
+| `技术调研/` | Tech research, feasibility studies, protocol analysis (non-version-specific) |
+| `其他/` | Non-standard docs: task lists, gate checklists, benchmarks, temporary indexes |
+| `demo/`, `assets/`, `article/`, `article-cn/` | Project-specific content directories |
+| `archive/`, `.stitch/`, `stitch_*`, `实施指南/` | Tool-specific or historical directories |
+
+## Legacy template mapping
+
+The original 14-phase lifecycle templates have been merged into the current structure:
+
+| Legacy # | Legacy name | Current location |
+|----------|-------------|------------------|
+| 1 | 市场分析模板 | → `root/3、市场与商业分析.md` |
+| 2 | 需求调研模板 | → `version/1、需求调研文档.md` |
+| 3 | 技术调研模板 | → `root/4、技术与可行性分析.md` + `root/5、技术方案与路线.md` |
+| 4 | 交互原型模板 | → `version/4、功能与界面规划.md` |
+| 5 | PRD 文档模板 | → `version/5、PRD文档.md` + `module/模块-PRD.md` |
+| 6 | 视觉规范模板 | → `root/9、视觉与交互DNA规范.md` |
+| 7 | UI 设计说明模板 | → `version/7、UI设计说明.md` + `module/模块-UI设计说明.md` |
+| 8 | 领域模型说明模板 | → `root/7、领域模型设计.md` |
+| 9 | 系统架构模板 | → `root/8、系统架构设计.md` + `version/3、系统架构设计.md` |
+| 10 | 技术细分模板 | → `delivery/1、技术细分模板.md` |
+| 11 | 功能提测模板 | → `delivery/2、功能提测模板.md` |
+| 12 | 测试结果模板 | → `delivery/3、测试结果模板.md` |
+| 13 | 上线通知模板 | → `delivery/4、上线通知模板.md` |
+| 14 | 项目运维模板 | → `delivery/5、项目运维模板.md` |
+
+The `templates/legacy-lifecycle/` and `templates/project-standard/` directories have been removed; all content lives in `templates/root/`, `templates/version/`, `templates/module/`, and `templates/delivery/`.

+ 9 - 17
skills/document-skills/full-stack-doc/templates/README.md

@@ -1,20 +1,12 @@
-# full-stack-doc 模板目录
+# Templates
 
-与 `SKILL.md` 中 **根目录 11 份 + 版本目录 7 份 + 模块 3 份** 对齐;正文已合并原全生命周期 14 阶段模板与 **OctoPanel**(`partme-docs/1、OctoPanel/`)实例结构。
+Ready-to-copy Markdown templates for the PartMe/Octo documentation standard. Replace `{Name}` with the product name and `{V}` with the version identifier before use.
 
-本目录 **直接** 包含四类子目录(复制到产品仓库时按子目录拷贝即可):
+| Directory | Contents | Count |
+|-----------|----------|-------|
+| [`root/`](root/) | Root-level standard docs (includes two `6、`) | 11 |
+| [`version/`](version/) | Per-version standard docs | 7 |
+| [`module/`](module/) | Per-module PRD / Stitch / UI triplet | 3 |
+| [`delivery/`](delivery/) | Tech details + delivery phase docs (optional) | 5 |
 
-| 子目录 | 说明 |
-| :--- | :--- |
-| [`root/`](root/) | 产品根目录 11 个 Markdown(含两个 `6、`) |
-| [`version/`](version/) | 每个版本目录 7 个 Markdown(占位 `{Name}`、`{V}`) |
-| [`module/`](module/) | 单功能模块 PRD / Stitch / UI 三件套 |
-| [`delivery/`](delivery/) | 技术细分(原 10)+ 提测 / 测试 / 上线 / 运维(原 11–14;本仓库内文件名为 `1~5`) |
-
-原 `templates/project-standard/` 与 `templates/legacy-lifecycle/` 已废弃:内容已迁入上述四类目录,**不再**嵌套一层 `project-standard`。
-
-## 使用步骤(摘要)
-
-1. 将 `{Name}` 替换为实际产品名;`version/` 下的 `{V}` 同步进文件名(如 `V1`)。
-2. 根目录标准文件由 `root/` 中文件重命名为 `1、{Name}-命名与品牌说明.md` 等形式后放到项目根。
-3. 版本标准文件放入 `{项目根}/{V}/`;模块三件套放入 `{项目根}/{V}/{序号}、{模块名}/`。
+See [`SKILL.md`](../SKILL.md) for the scaffolding workflow and [`references/structure.md`](../references/structure.md) for detailed file listings.