@dtt_siye/atool 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +30 -10
  2. package/VERSION +1 -1
  3. package/hooks/session-start +9 -12
  4. package/lib/export-analysis.sh +100 -0
  5. package/lib/install-kiro.sh +11 -6
  6. package/lib/knowledge-graph.sh +7 -2
  7. package/package.json +1 -1
  8. package/skills/doc-standards-enforcer/SKILL.md +200 -220
  9. package/skills/doc-standards-enforcer/examples/valid-document-example.md +5 -5
  10. package/skills/doc-standards-enforcer/references/101-standards-summary.md +17 -17
  11. package/skills/project-analyze/SKILL.md +138 -124
  12. package/skills/project-analyze/phases/{phase0-discovery.md → archive/phase0-discovery.md} +6 -2
  13. package/skills/project-analyze/phases/{phase1-inventory.md → archive/phase1-inventory.md} +10 -0
  14. package/skills/project-analyze/phases/{phase2-deep-analysis.md → archive/phase2-deep-analysis.md} +20 -0
  15. package/skills/project-analyze/phases/{phase3-knowledge-graph.md → archive/phase3-knowledge-graph.md} +31 -0
  16. package/skills/project-analyze/phases/{phase3a-multi-dimensional.md → archive/phase3a-multi-dimensional.md} +13 -0
  17. package/skills/project-analyze/phases/{phase5-synthesis.md → archive/phase5-synthesis.md} +20 -0
  18. package/skills/project-analyze/phases/phase1-setup.md +182 -0
  19. package/skills/project-analyze/phases/phase2-understand.md +108 -0
  20. package/skills/project-analyze/phases/phase3-graph.md +77 -0
  21. package/skills/project-analyze/phases/phase4-synthesize.md +260 -0
  22. package/skills/project-analyze/phases/phase5-export.md +161 -0
  23. package/skills/project-analyze/prompts/{deep-analysis-agent.md → archive/deep-analysis-agent.md} +14 -1
  24. package/skills/project-analyze/prompts/understand-agent.md +407 -0
  25. package/skills/requirements-writer/README.md +1 -1
  26. package/skills/requirements-writer/SKILL.md +378 -284
  27. package/skills/requirements-writer/examples/prd-outline-example.md +5 -5
  28. package/skills/requirements-writer/templates/module-prd-template.md +15 -15
  29. package/skills/requirements-writer/templates/prd-outline-template.md +3 -3
  30. package/skills/requirements-writer/templates/user-story-template.md +23 -23
  31. package/skills/software-architecture/SKILL.md +248 -17
  32. package/templates/CLAUDE.md.android +17 -0
  33. package/templates/CLAUDE.md.devops +17 -0
  34. package/templates/CLAUDE.md.generic +17 -0
  35. package/templates/CLAUDE.md.go +17 -0
  36. package/templates/CLAUDE.md.harmony +17 -0
  37. package/templates/CLAUDE.md.java +17 -0
  38. package/templates/CLAUDE.md.mobile-flutter +17 -0
  39. package/templates/CLAUDE.md.mobile-react-native +17 -0
  40. package/templates/CLAUDE.md.mobile-swift +17 -0
  41. package/templates/CLAUDE.md.python +17 -0
  42. package/templates/CLAUDE.md.rust +17 -0
  43. package/templates/CLAUDE.md.rust-tauri +17 -0
  44. package/templates/CLAUDE.md.web +17 -0
  45. package/templates/cursor-rules.android.mdc +17 -0
  46. package/templates/cursor-rules.devops.mdc +17 -0
  47. package/templates/cursor-rules.generic.mdc +17 -0
  48. package/templates/cursor-rules.go.mdc +17 -0
  49. package/templates/cursor-rules.harmony.mdc +17 -0
  50. package/templates/cursor-rules.java.mdc +17 -0
  51. package/templates/cursor-rules.mobile-flutter.mdc +17 -0
  52. package/templates/cursor-rules.mobile-react-native.mdc +17 -0
  53. package/templates/cursor-rules.mobile-swift.mdc +17 -0
  54. package/templates/cursor-rules.python.mdc +17 -0
  55. package/templates/cursor-rules.rust-tauri.mdc +17 -0
  56. package/templates/cursor-rules.rust.mdc +17 -0
  57. package/templates/cursor-rules.web.mdc +17 -0
  58. package/templates/kiro-steering.android.md +6 -0
  59. package/templates/kiro-steering.devops.md +6 -0
  60. package/templates/kiro-steering.generic.md +6 -0
  61. package/templates/kiro-steering.go.md +6 -0
  62. package/templates/kiro-steering.harmony.md +6 -0
  63. package/templates/kiro-steering.java.md +6 -0
  64. package/templates/kiro-steering.mobile-flutter.md +6 -0
  65. package/templates/kiro-steering.mobile-react-native.md +6 -0
  66. package/templates/kiro-steering.mobile-swift.md +6 -0
  67. package/templates/kiro-steering.python.md +6 -0
  68. package/templates/kiro-steering.rust-tauri.md +6 -0
  69. package/templates/kiro-steering.rust.md +6 -0
  70. package/templates/kiro-steering.web.md +6 -0
  71. package/templates/shared/hard-rules.md +21 -0
  72. /package/skills/project-analyze/phases/{phase0.5-prescan.md → archive/phase0.5-prescan.md} +0 -0
  73. /package/skills/project-analyze/phases/{phase2a-l4-analysis.md → archive/phase2a-l4-analysis.md} +0 -0
  74. /package/skills/project-analyze/phases/{phase2b-l5-analysis.md → archive/phase2b-l5-analysis.md} +0 -0
  75. /package/skills/project-analyze/phases/{phase4-code-quality.md → archive/phase4-code-quality.md} +0 -0
  76. /package/skills/project-analyze/phases/{phase6-validation.md → archive/phase6-validation.md} +0 -0
  77. /package/skills/project-analyze/prompts/{code-review-agent.md → archive/code-review-agent.md} +0 -0
  78. /package/skills/project-analyze/prompts/{inventory-agent.md → archive/inventory-agent.md} +0 -0
  79. /package/skills/project-analyze/prompts/{l4-analysis-agent.md → archive/l4-analysis-agent.md} +0 -0
@@ -1,133 +1,190 @@
1
1
  ---
2
2
  name: doc-standards-enforcer
3
- description: Enforce documentation standards for document writing. Automatically validate when creating, modifying, or reviewing documentation files (.md). Use explicitly when context indicates documentation work, or via direct reference. Validates: file naming (<3-digit-id>-<slug>.md), hundreds-based directory structure, mandatory frontmatter (doc_id, title, status, owner, last_updated, related_docs), valid status values (draft|review|approved|deprecated), required sections (Purpose/Scope, Content, Version History), cross-document references, and version history tables.
4
- version: 1.0.0
5
- allowed-tools: Read, Write, Edit, Bash
3
+ description: "Enforce documentation standards and route to specialized skills. 在创建/修改文档时自动验证格式、结构、内容质量。自动路由:300→requirements-writer、400→software-architecture、500→ui-ux-pro、700→code-review。三级验证:L1 格式 L2 结构 L3 内容质量。"
4
+ version: 2.0.0
5
+ category: documentation
6
6
  ---
7
7
 
8
- # Documentation Standards Enforcer
8
+ # Documentation Standards Enforcer v2.0
9
9
 
10
- Enforce compliance with the project's documentation standards defined in `100-standards/101-documentation-standards.md`.
10
+ 文档标准验证与专业 Skill 路由。在创建或修改文档时自动验证格式、结构、内容质量,并根据文档类型建议对应的专业 Skill。
11
11
 
12
12
  > **aTool Compatibility Note:** This skill governs documentation within the `docs/` directory and
13
13
  > follows a numbered naming convention (`<id>-<slug>.md`). It does **not** apply to aTool-managed
14
- > files such as `CLAUDE.md`, `README.md`, `COMPONENT.md`, or `UI_STYLE.md` at the project root.
15
- > These root-level files follow aTool's own template conventions.
14
+ > files such as `CLAUDE.md`, `README.md`, `COMPONENT.md`, or `UI_STYLE.md` at the project root,
15
+ > nor to `atool-analysis/` output files. These follow aTool's own conventions.
16
16
 
17
- ## Purpose
17
+ ## 触发条件
18
18
 
19
- Ensure all documentation in this repository follows consistent standards for:
20
- - File naming and directory structure
21
- - Frontmatter completeness
22
- - Document structure and required sections
23
- - Cross-document references
24
- - Version history tracking
19
+ 自动触发:
20
+ - `docs/` 目录下创建或修改 `.md` 文件
21
+ - 上下文涉及文档撰写(PRD、设计文档、需求文档等)
22
+ - 其他 Skill 生成文档后调用验证
25
23
 
26
- ## When This Skill Activates
24
+ 手动触发:
25
+ - "validate documentation standards"、"检查文档规范"
26
+ - "check doc format"、"文档格式检查"
27
27
 
28
- This skill activates automatically when:
29
- - Creating new `.md` files in the repository
30
- - Modifying existing documentation
31
- - Context indicates documentation work (PRD, design docs, requirements, etc.)
32
- - Explicitly invoked via "validate documentation standards" or similar phrases
28
+ ---
33
29
 
34
- ## Validation Checklist
30
+ ## 目录体系(v2.0)
31
+
32
+ | 编号 | 目录名 | 文档类型 | 专业 Skill 路由 |
33
+ |------|--------|---------|----------------|
34
+ | 100 | `100-governance/` | 标准、规范、流程定义、团队协议 | — |
35
+ | 200 | `200-business/` | 商业分析、项目章程、利益相关者分析、商业论证 | — |
36
+ | 300 | `300-requirements/` | PRD、SRS、用户故事、验收标准、功能需求 | **requirements-writer** |
37
+ | 400 | `400-architecture/` | 系统架构(HLD/LLD)、技术设计、ADR、部署架构 | **software-architecture** |
38
+ | 500 | `500-design/` | UI/UX 设计、交互规范、视觉规范、原型说明 | **ui-ux-pro** |
39
+ | 600 | `600-data/` | 数据模型、数据字典、ER 图、数据流、数据迁移 | project-analyze data-model 模板 |
40
+ | 700 | `700-quality/` | 测试策略、测试用例、安全审计、代码质量报告 | **code-review** |
41
+ | 800 | `800-engineering/` | 开发规范、API 文档、集成指南、编码标准 | **{stack}-conventions** |
42
+ | 900 | `900-operations/` | 部署文档、运维手册、监控配置、SLA | — |
43
+ | 950 | `950-project/` | 项目计划、会议纪要、变更管理、风险登记 | — |
44
+ | 990 | `990-archive/` | 历史归档(已废弃文档) | — |
45
+
46
+ ### 目录命名规则
47
+ - 格式:`<3位编号>-<slug>/`
48
+ - slug:英文 kebab-case(如 `300-requirements`)
49
+ - 子目录可用更细分编号(如 `300-requirements/310-prd/`、`300-requirements/330-user-stories/`)
50
+
51
+ ### 与旧目录的映射
52
+ | 旧目录 | 新目录 | 说明 |
53
+ |--------|--------|------|
54
+ | 200-product/ | 200-business/ | "产品文档"拆分:PRD 移到 300,商业分析留 200 |
55
+ | 400-design/ | 500-design/ | UI/UX 设计独立为 500 |
56
+ | 500-data/ | 600-data/ | 编号顺延 |
57
+ | 600-architecture/ | 400-architecture/ | 与旧 400 合并,架构统一在 400 |
58
+ | 700-engineering/ | 800-engineering/ | 编号顺延 |
59
+ | 800-operations/ | 900-operations/ | 编号顺延 |
60
+ | 900-project-mgmt/ | 950-project/ | 编号调整 |
35
61
 
36
- When creating or modifying documentation, verify:
62
+ ---
37
63
 
38
- ### 1. File Naming
39
- - [ ] Pattern: `<3-digit-id>-<slug>.md` (e.g., `201-project-brief.md`)
40
- - [ ] Lowercase with kebab-case (no spaces, no Chinese characters)
41
- - [ ] Three-digit ID matches directory structure (e.g., files in `200-product/` start with `2`)
64
+ ## 文档路由规则
42
65
 
43
- ### 2. Directory Structure
44
- - [ ] Located in appropriate hundreds-based directory
45
- - [ ] Directories follow pattern: `<hundreds>-<slug>/`
66
+ 当检测到用户在某个目录下创建文档时,**主动建议**对应的专业 Skill:
46
67
 
47
- ### 3. Frontmatter (Required)
48
- ```yaml
49
- ---
50
- doc_id: <DOC_ID>
51
- title: <Title>
52
- status: draft|review|approved|deprecated
53
- owner: <Role/Person>
54
- last_updated: YYYY-MM-DD
55
- related_docs:
56
- - <path or doc_id>
57
- ---
58
68
  ```
69
+ 检测到在 docs/300-requirements/ 创建文件
70
+ → "建议使用 /requirements-writer 确保 PRD 覆盖率达到按钮级标准(用户故事+验收标准+UI 交互定义)"
59
71
 
60
- ### 4. Status Values
61
- - `draft`: Initial draft version
62
- - `review`: Under review
63
- - `approved`: Approved, can serve as delivery basis
64
- - `deprecated`: Deprecated (must reference replacement)
72
+ 检测到在 docs/400-architecture/ 创建文件
73
+ "建议使用 /software-architecture 确保架构决策完整(风格选型+NFR+ADR)"
65
74
 
66
- ### 5. Required Sections
67
- - [ ] Purpose/Scope (目的/范围)
68
- - [ ] Main Content (主体内容)
69
- - [ ] Version History (版本历史)
75
+ 检测到在 docs/500-design/ 创建文件
76
+ "建议使用 /ui-ux-pro 确保交互规范完整(线框图+状态定义+无障碍)"
70
77
 
71
- ### 6. Version History Table
72
- ```markdown
73
- | Version | Date | Owner | Change |
74
- |---|---|---|---|
75
- | v0.1 | YYYY-MM-DD | Name | Initial version |
78
+ 检测到在 docs/600-data/ 创建文件
79
+ → "数据文档应包含 ER 图+字段约束表+枚举定义。参考 project-analyze 的 data-model.md 模板"
80
+
81
+ 检测到在 docs/700-quality/ 创建文件
82
+ "建议使用 /code-review 确保质量维度覆盖(8 维度分析+重构方案)"
83
+
84
+ 检测到在 docs/800-engineering/ 创建文件
85
+ → "API 文档应包含请求/响应 Schema+错误码表+curl 示例。参考对应 {stack}-conventions"
76
86
  ```
77
87
 
78
- ### 7. Cross-Document References
79
- - [ ] Use relative paths from repository root
80
- - [ ] Include context explaining "why reference"
81
- - [ ] Example: `See docs/500-data/502-data-dictionary.md (field definitions)`
88
+ ### 路由时机
82
89
 
83
- ## How to Use
90
+ 1. **创建新文件时**:在用户开始写内容前,先建议专业 Skill
91
+ 2. **Review 现有文件时**:验证后,如果 L2 结构不合格,建议对应 Skill 补齐
92
+ 3. **其他 Skill 生成文档后**:作为最后一步验证格式合规
84
93
 
85
- ### Automatic Mode
86
- When creating documentation, this skill automatically activates to guide you through compliance.
94
+ ---
87
95
 
88
- ### Explicit Invocation
89
- Reference this skill by:
90
- - Mentioning "follow documentation standards"
91
- - Saying "validate against doc standards"
92
- - Running validation scripts directly
96
+ ## 三级验证
97
+
98
+ ### Level 1: 格式验证(所有文档必须通过)
99
+
100
+ - [ ] **文件命名**:`<3位编号>-<slug>.md`(如 `301-prd-user-management.md`)
101
+ - [ ] **目录归属**:文件编号与目录编号一致(300 开头的文件在 `300-*/` 下)
102
+ - [ ] **Frontmatter 完整**(必填 6 个字段):
103
+ ```yaml
104
+ ---
105
+ doc_id: <DOC_TYPE>-<MODULE>-<SEQ> # 如 PRD-USER-001, ADR-AUTH-003
106
+ title: <文档标题>
107
+ status: draft|review|approved|deprecated
108
+ owner: <负责人角色/姓名>
109
+ last_updated: YYYY-MM-DD
110
+ related_docs:
111
+ - <相关文档路径或 doc_id>
112
+ ---
113
+ ```
114
+ - [ ] **必填节**:Purpose/Scope + 主体内容 + Version History
115
+ - [ ] **版本历史表**存在且格式正确
116
+
117
+ ### Level 2: 结构验证(按文档类型检查)
118
+
119
+ | 目录 | 必须包含的结构要素 |
120
+ |------|-----------------|
121
+ | 300-requirements/ | 用户故事(As a...)、验收标准(AC-)、功能需求编号(FR-)、非功能需求(NFR-) |
122
+ | 400-architecture/ | 架构图(Mermaid/ASCII)、组件说明、ADR(决策/替代/理由)、NFR 约束 |
123
+ | 500-design/ | 页面/组件列表、交互流程、状态定义(加载/空/错误/正常)、无障碍要求 |
124
+ | 600-data/ | ER 图(Mermaid erDiagram)、字段约束表、枚举定义、关联关系 |
125
+ | 700-quality/ | 测试用例表(ID/场景/步骤/预期)、覆盖率目标、风险评估 |
126
+ | 800-engineering/ | API Schema(请求/响应)、错误码表、调用示例、版本兼容性 |
127
+
128
+ ### Level 3: 内容质量验证(可选,调用专业 Skill)
129
+
130
+ | 目录 | 质量检查内容 | 委托 Skill |
131
+ |------|------------|-----------|
132
+ | 300-requirements/ | PRD 覆盖率检查表(按钮级/字段级/场景级)| requirements-writer |
133
+ | 400-architecture/ | 架构原则合规、NFR 可行性 | software-architecture |
134
+ | 500-design/ | 交互完整性、无障碍合规 | ui-ux-pro |
135
+ | 700-quality/ | 测试覆盖率、安全审计完整性 | code-review |
136
+ | 800-engineering/ | 技术术语准确性、代码示例可运行 | {stack}-conventions |
137
+
138
+ **Level 3 触发条件**:文档 `status` 从 `draft` 变为 `review` 或 `approved` 时建议执行。
93
139
 
94
- ### Validation Scripts
140
+ ---
95
141
 
96
- Run validation scripts from repository root:
142
+ ## 被调用协议
97
143
 
98
- ```bash
99
- # Main validation
100
- python skills/doc-standards-enforcer/scripts/validate_doc_standards.py <file.md>
144
+ 其他 Skill 在生成文档后应调用 doc-standards-enforcer 验证。调用方式:
101
145
 
102
- # Check references
103
- python skills/doc-standards-enforcer/scripts/check_references.py <file.md>
146
+ ```
147
+ 在你的 Skill 输出步骤末尾添加:
104
148
 
105
- # Fix common issues (interactive)
106
- python skills/doc-standards-enforcer/scripts/fix_common_issues.py <file.md> --interactive
149
+ "文档已生成。建议运行 doc-standards-enforcer 验证格式合规:
150
+ - Level 1 格式验证(命名/frontmatter/必填节)
151
+ - Level 2 结构验证(按文档类型检查必须要素)"
107
152
  ```
108
153
 
109
- ## Document Templates
154
+ ### Skill 的调用点
110
155
 
111
- ### Standard Document Template
156
+ | Skill | 调用时机 | 验证级别 |
157
+ |-------|---------|---------|
158
+ | project-analyze Phase 4 | 生成 atool-analysis/ 文档后(如用户将文档移到 docs/)| L1 |
159
+ | requirements-writer Phase 3 | Review & Stitch 阶段 | L1 + L2 |
160
+ | software-architecture | 生成 ADR/HLD 后 | L1 + L2 |
161
+ | code-review | 生成 CODE_REVIEW.md 后(如移到 docs/) | L1 |
162
+ | doc-coauthoring | 协作完成的文档 | L1 + L2 + L3 |
163
+
164
+ ---
165
+
166
+ ## 文档模板
167
+
168
+ ### 通用模板
112
169
 
113
170
  ```markdown
114
171
  ---
115
- doc_id: XXX-XXX-0100
116
- title: Document Title
172
+ doc_id: XXX-MODULE-001
173
+ title: 文档标题
117
174
  status: draft
118
175
  owner: Your Name
119
176
  last_updated: YYYY-MM-DD
120
177
  related_docs:
121
- - docs/100-standards/101-documentation-standards.md
178
+ - docs/100-governance/101-documentation-standards.md
122
179
  ---
123
180
 
124
181
  ## Purpose
125
182
 
126
- Describe the purpose and scope of this document.
183
+ 描述本文档的目的和范围。
127
184
 
128
185
  ## Main Content
129
186
 
130
- Your document content here.
187
+ 文档正文。
131
188
 
132
189
  ## Version History
133
190
 
@@ -136,155 +193,78 @@ Your document content here.
136
193
  | v0.1 | YYYY-MM-DD | Name | Initial version |
137
194
  ```
138
195
 
139
- ### User Story Template
140
-
141
- ```markdown
142
- ---
143
- doc_id: US-XXX-3301
144
- title: User Story Title
145
- status: draft
146
- owner: PM
147
- last_updated: YYYY-MM-DD
148
- related_docs:
149
- - docs/300-requirements/300-index.md
150
- us_id: US-IA-0001
151
- module: IA
152
- priority: P1
153
- ---
154
-
155
- ## User Story
156
-
157
- As a [role], I want [feature], so that [benefit].
158
-
159
- ## Acceptance Criteria
160
-
161
- - [ ] Criterion 1
162
- - [ ] Criterion 2
163
-
164
- ## Version History
196
+ ### doc_id 命名规则
165
197
 
166
- | Version | Date | Owner | Change |
167
- |---|---|---|---|
168
- | v0.1 | YYYY-MM-DD | PM | Initial version |
169
198
  ```
170
-
171
- ## Integration for Other Skills
172
-
173
- Other skills can depend on this documentation standards skill:
174
-
175
- ### Automatic Triggering
176
- When your skill creates documentation, this skill automatically activates to ensure compliance.
177
-
178
- ### Explicit Reference
179
- Mention "follow documentation standards" or "validate against 101-standards" in your skill.
180
-
181
- ### Workflow Integration
182
- If your skill creates documentation:
183
- 1. Let doc-standards-enforcer activate automatically
184
- 2. Follow the provided templates
185
- 3. Run validation scripts before completing
186
- 4. Fix any reported issues
187
- 5. Update `log.md` and create commit (per 109-agent-llm-guidelines.md)
188
-
189
- ### Example Pattern
190
-
191
- ```markdown
192
- When creating documentation for your feature:
193
-
194
- 1. Invoke doc-standards-enforcer skill
195
- 2. Use the provided frontmatter template
196
- 3. Run: `python skills/doc-standards-enforcer/scripts/validate_doc_standards.py <file>`
197
- 4. Fix validation errors
198
- 5. Update log.md
199
- 6. Commit changes
199
+ 格式:<TYPE>-<MODULE>-<SEQ>
200
+
201
+ TYPE 可选值:
202
+ PRD — 产品需求文档
203
+ SRS — 软件需求规格
204
+ US — 用户故事
205
+ FR — 功能需求
206
+ NFR — 非功能需求
207
+ ADR — 架构决策记录
208
+ HLD — 高层设计
209
+ LLD — 低层设计
210
+ DM — 数据模型
211
+ DD — 数据字典
212
+ TP — 测试计划
213
+ TC — 测试用例
214
+ SA — 安全审计
215
+ API — API 文档
216
+ DP — 部署文档
217
+ RM — 运维手册
218
+ PP — 项目计划
219
+ CR — 变更请求
220
+
221
+ MODULE:模块/功能缩写(如 USER, ORDER, AUTH)
222
+ SEQ:3 位序号(001, 002...)
223
+
224
+ 示例:PRD-USER-001, ADR-AUTH-003, TC-ORDER-012
200
225
  ```
201
226
 
202
- ## Common Mistakes to Avoid
203
-
204
- 1. **Invalid filenames**: Using `test.md` instead of `201-project-brief.md`
205
- 2. **Missing frontmatter**: Documents without YAML frontmatter block
206
- 3. **Invalid status**: Using `in-progress` instead of `draft|review|approved|deprecated`
207
- 4. **No version history**: Forgetting the version history table
208
- 5. **Broken references**: Links to non-existent documents
209
- 6. **Chinese in filenames**: Using Chinese characters in `.md` file names
210
- 7. **Mixed concerns**: Combining business requirements with technical implementation
211
-
212
- ## Content Accuracy Check (Optional)
213
-
214
- Beyond format validation, technical documents should have accurate content. This is a **recommended but optional** step:
215
-
216
- ### Tech-Stack Terminology Validation
217
-
218
- When the document contains technical content (API definitions, code examples, architecture descriptions):
219
-
220
- 1. **Detect the project tech stack** — check for `CLAUDE.md`, `package.json`, `pom.xml`, `Cargo.toml`, etc.
221
- 2. **Reference the conventions skill** — identify `{stack}-conventions` skill for naming conventions and patterns
222
- 3. **Verify technical claims** — ensure code examples compile/run, API paths match routes, class names follow naming conventions
223
-
224
- ### Architecture Document Validation
225
-
226
- For architecture documents (system design, ADRs, deployment guides):
227
+ ---
227
228
 
228
- 1. **Reference `software-architecture` skill** — validate that architectural decisions follow its principles
229
- 2. **Check consistency** — ensure diagrams match described architecture, component names are consistent
230
- 3. **Verify feasibility** — NFR claims should be realistic for the described architecture style
229
+ ## 验证脚本(可选)
231
230
 
232
- ### Integration Pattern
231
+ > **注意**:主路径为 AI 读取上方规则直接验证。以下脚本为可选的自动化辅助工具。
233
232
 
234
- ```markdown
235
- After structural validation passes, for technical documents:
236
- 1. Check tech-stack conventions alignment
237
- 2. Verify code examples against conventions skill rules
238
- 3. For architecture docs, cross-reference software-architecture principles
233
+ ```bash
234
+ # Bash 快速检查(无 Python 依赖)
235
+ # 检查文件命名规范
236
+ find docs/ -name "*.md" | grep -vE '^docs/[0-9]{3}-[a-z].*/' && echo "WARN: 文件不在编号目录中"
237
+
238
+ # 检查 frontmatter 存在
239
+ for f in docs/**/*.md; do
240
+ head -1 "$f" | grep -q "^---" || echo "MISSING frontmatter: $f"
241
+ done
239
242
  ```
240
243
 
241
- ## Related Standards
242
-
243
- - **Full standards**: `100-standards/101-documentation-standards.md`
244
- - **Agent workflow**: `100-standards/109-agent-llm-guidelines.md`
245
- - **Repository guide**: `CLAUDE.md`
246
-
247
- ## Quick Reference
248
-
249
- ### Valid Status Values
250
- - `draft` - Draft version
251
- - `review` - Under review
252
- - `approved` - Approved
253
- - `deprecated` - Deprecated
254
-
255
- ### Directory Structure
256
- - `100-standards/` - Project standards
257
- - `200-product/` - Product documentation
258
- - `300-requirements/` - Requirements
259
- - `400-design/` - Design documents
260
- - `500-data/` - Data documentation
261
- - `600-architecture/` - Architecture
262
- - `700-engineering/` - Engineering standards
263
- - `800-operations/` - Operations
264
- - `900-project-mgmt/` - Project management
265
- - `990-archive/` - Historical archives
244
+ Python 脚本仍可用(`scripts/validate_doc_standards.py`),但不是必须的。
266
245
 
267
- ### Required Frontmatter Fields
268
- - `doc_id` - Document identifier
269
- - `title` - Document title
270
- - `status` - Status (draft|review|approved|deprecated)
271
- - `owner` - Responsible role/person
272
- - `last_updated` - Date (YYYY-MM-DD)
273
- - `related_docs` - List of related documents
274
-
275
- ## Error Handling
246
+ ---
276
247
 
277
- Validation scripts provide clear error messages:
248
+ ## 常见错误
278
249
 
279
- ```
280
- [ERROR] FILE_NAMING: File 'test.md' doesn't match pattern <3-digit-id>-<slug>.md
281
- [ERROR] FRONTMATTER: Missing required field: doc_id
282
- [ERROR] STATUS: Invalid status 'in-progress'. Use: draft|review|approved|deprecated
283
- [ERROR] VERSION_HISTORY: Version history table not found
284
- ```
250
+ 1. **文件放错目录**:PRD 放在 200-business/ 而非 300-requirements/
251
+ 2. **编号不匹配**:文件名 301-xxx.md 但放在 400-architecture/ 目录下
252
+ 3. **缺少 frontmatter**:文档没有 YAML frontmatter
253
+ 4. **无效 status**:使用 `in-progress` 而非 `draft|review|approved|deprecated`
254
+ 5. **无版本历史**:忘记 Version History
255
+ 6. **模糊需求**:PRD 中使用"快速"、"易用"等不可度量描述
256
+ 7. **缺少交叉引用**:文档间的依赖关系未声明
285
257
 
286
- ## Version History
258
+ ---
287
259
 
288
- | Version | Date | Owner | Change |
289
- |---|---|---|---|
290
- | v1.0.0 | 2026-01-09 | Claude Code | Initial skill implementation |
260
+ ## Skill 协作
261
+
262
+ | 协作 Skill | 触发条件 | 交互方式 |
263
+ |-----------|---------|---------|
264
+ | requirements-writer | 300-requirements/ 文档创建/验证 | L2 结构不合格时建议调用 |
265
+ | software-architecture | 400-architecture/ 文档创建/验证 | L2 结构不合格时建议调用 |
266
+ | ui-ux-pro | 500-design/ 文档创建/验证 | L2 结构不合格时建议调用 |
267
+ | code-review | 700-quality/ 文档创建/验证 | L2 结构不合格时建议调用 |
268
+ | {stack}-conventions | 800-engineering/ 文档验证 | L3 内容质量检查时调用 |
269
+ | doc-coauthoring | 协作文档完成后 | 调用 L1+L2+L3 全量验证 |
270
+ | project-analyze | Phase 4 文档生成后 | 调用 L1 格式验证 |
@@ -5,8 +5,8 @@ status: approved
5
5
  owner: PM
6
6
  last_updated: 2026-01-09
7
7
  related_docs:
8
- - docs/200-product/200-index.md
9
- - docs/100-standards/101-documentation-standards.md
8
+ - docs/200-business/200-index.md
9
+ - docs/100-governance/101-documentation-standards.md
10
10
  ---
11
11
 
12
12
  ## Purpose
@@ -54,9 +54,9 @@ The Inspection Agent project aims to develop a comprehensive inspection system t
54
54
 
55
55
  ## References
56
56
 
57
- - Technical specifications: See docs/400-design/401-system-design.md (architecture overview)
58
- - Data model: Refer to docs/500-data/501-data-model.md (entity definitions)
59
- - API documentation: See docs/700-engineering/701-api-reference.md (endpoint specifications)
57
+ - Technical specifications: See docs/500-design/401-system-design.md (architecture overview)
58
+ - Data model: Refer to docs/600-data/501-data-model.md (entity definitions)
59
+ - API documentation: See docs/800-engineering/701-api-reference.md (endpoint specifications)
60
60
 
61
61
  ## Version History
62
62
 
@@ -5,7 +5,7 @@ status: approved
5
5
  owner: PM
6
6
  last_updated: 2026-01-09
7
7
  related_docs:
8
- - ../100-standards/101-documentation-standards.md
8
+ - ../100-governance/101-documentation-standards.md
9
9
  ---
10
10
 
11
11
  # Documentation Standards Quick Reference
@@ -40,15 +40,15 @@ Quick reference guide for the Inspection Agent project's documentation standards
40
40
  ### Hundreds-Based Directories
41
41
  ```
42
42
  docs/
43
- ├── 100-standards/ # Project standards
44
- ├── 200-product/ # Product documentation
43
+ ├── 100-governance/ # Project standards & governance
44
+ ├── 200-business/ # Business & product documentation
45
45
  ├── 300-requirements/ # Requirements
46
- ├── 400-design/ # Design documents
47
- ├── 500-data/ # Data documentation
48
- ├── 600-architecture/ # Architecture
49
- ├── 700-engineering/ # Engineering standards
50
- ├── 800-operations/ # Operations
51
- ├── 900-project-mgmt/ # Project management
46
+ ├── 400-architecture/ # Architecture
47
+ ├── 500-design/ # Design documents (UI/UX)
48
+ ├── 600-data/ # Data documentation
49
+ ├── 800-engineering/ # Engineering standards
50
+ ├── 900-operations/ # Operations
51
+ ├── 950-project/ # Project management
52
52
  └── 990-archive/ # Historical archives
53
53
  ```
54
54
 
@@ -58,13 +58,13 @@ docs/
58
58
  ```
59
59
 
60
60
  ### Examples
61
- - ✓ `100-standards/`
62
- - ✓ `200-product/`
61
+ - ✓ `100-governance/`
62
+ - ✓ `200-business/`
63
63
  - ✓ `300-requirements/`
64
64
 
65
65
  ### File-Directory Matching
66
66
  Files should match their directory's hundreds digit:
67
- - Files in `200-product/` start with `2` (e.g., `201-*.md`)
67
+ - Files in `200-business/` start with `2` (e.g., `201-*.md`)
68
68
  - Files in `300-requirements/` start with `3` (e.g., `301-*.md`)
69
69
 
70
70
  ## Frontmatter Template
@@ -78,7 +78,7 @@ status: draft
78
78
  owner: Your Name
79
79
  last_updated: 2026-01-09
80
80
  related_docs:
81
- - docs/100-standards/101-documentation-standards.md
81
+ - docs/100-governance/101-documentation-standards.md
82
82
  ---
83
83
  ```
84
84
 
@@ -172,7 +172,7 @@ Table tracking all changes.
172
172
  Use relative paths from repository root:
173
173
 
174
174
  ```markdown
175
- See docs/500-data/502-data-dictionary.md (field definitions)
175
+ See docs/600-data/502-data-dictionary.md (field definitions)
176
176
  ```
177
177
 
178
178
  ### Rules
@@ -181,12 +181,12 @@ See docs/500-data/502-data-dictionary.md (field definitions)
181
181
  - **Clear descriptions**: Add parenthetical context
182
182
 
183
183
  ### Good Examples
184
- - ✓ `See docs/500-data/502-data-dictionary.md (field definitions)`
184
+ - ✓ `See docs/600-data/502-data-dictionary.md (field definitions)`
185
185
  - ✓ `As defined in docs/100-standards/106-engineering-standards.md (tech stack)`
186
186
  - ✓ `Refer to docs/300-requirements/310-prd.md (business requirements)`
187
187
 
188
188
  ### Bad Examples
189
- - ✗ `See docs/500-data/502-data-dictionary.md` (no context)
189
+ - ✗ `See docs/600-data/502-data-dictionary.md` (no context)
190
190
  - ✗ `Check the data dictionary` (ambiguous)
191
191
 
192
192
  ## Common Mistakes
@@ -270,7 +270,7 @@ status: draft
270
270
  owner: Your Name
271
271
  last_updated: 2026-01-09
272
272
  related_docs:
273
- - docs/100-standards/101-documentation-standards.md
273
+ - docs/100-governance/101-documentation-standards.md
274
274
  ---
275
275
 
276
276
  ## Purpose