aodw-skill 0.7.3

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 (188) hide show
  1. package/.aodw/01-core/ai-interaction-rules.md +218 -0
  2. package/.aodw/01-core/ai-knowledge-rules.md +302 -0
  3. package/.aodw/01-core/ai-project-overview-rules.md +284 -0
  4. package/.aodw/01-core/aodw-constitution-summary.md +20 -0
  5. package/.aodw/01-core/aodw-constitution.md +419 -0
  6. package/.aodw/01-core/csf-thinking-framework.md +373 -0
  7. package/.aodw/01-core/git-discipline.md +226 -0
  8. package/.aodw/01-core/module-doc-rules.md +90 -0
  9. package/.aodw/02-workflow/aodw-development-stages.md +235 -0
  10. package/.aodw/02-workflow/rt-id-generation-rules.md +267 -0
  11. package/.aodw/02-workflow/rt-manager-summary.md +15 -0
  12. package/.aodw/02-workflow/rt-manager.md +399 -0
  13. package/.aodw/02-workflow/spec-full-profile-summary.md +13 -0
  14. package/.aodw/02-workflow/spec-full-profile.md +391 -0
  15. package/.aodw/02-workflow/spec-lite-profile.md +313 -0
  16. package/.aodw/02-workflow/ui-workflow-rules.md +334 -0
  17. package/.aodw/03-standards/ai-coding-rules-common.md +89 -0
  18. package/.aodw/03-standards/ai-coding-rules.md +370 -0
  19. package/.aodw/03-standards/stacks/java-springboot/ai-coding-rules-backend.md +100 -0
  20. package/.aodw/03-standards/stacks/python-fastapi/ai-coding-rules-backend.md +612 -0
  21. package/.aodw/03-standards/stacks/react-typescript/ai-coding-rules-frontend.md +291 -0
  22. package/.aodw/03-standards/stacks/vue2/ai-coding-rules-frontend.md +97 -0
  23. package/.aodw/03-standards/ui-kit/ui-kit.md +163 -0
  24. package/.aodw/04-auditors/aodw-development-auditor-rules.md +470 -0
  25. package/.aodw/04-auditors/aodw-full-auditor-rules.md +365 -0
  26. package/.aodw/04-auditors/aodw-requirement-auditor-rules.md +408 -0
  27. package/.aodw/05-tooling/ai-tools-init-rules.md +465 -0
  28. package/.aodw/06-project/ai-overview.md +116 -0
  29. package/.aodw/06-project/modules-index.yaml +11 -0
  30. package/.aodw/07-optimization/token-usage-analysis.md +253 -0
  31. package/.aodw/README.md +26 -0
  32. package/.aodw/RELEASE-CHECKLIST.md +144 -0
  33. package/.aodw/config.yaml +2 -0
  34. package/.aodw/manifest.yaml +98 -0
  35. package/.aodw/templates/SOURCE-TO-DISTRIBUTION-GUIDE.md +276 -0
  36. package/.aodw/templates/TEMPLATE-APPLICATION-GUIDE.md +246 -0
  37. package/.aodw/templates/aodw-kernel-loader-template.md +70 -0
  38. package/.aodw/templates/audit-report-template.md +232 -0
  39. package/.aodw/templates/changelog-template.md +16 -0
  40. package/.aodw/templates/checklists/coding-standards-template.md +110 -0
  41. package/.aodw/templates/csf-review-template.md +201 -0
  42. package/.aodw/templates/impact-template.md +17 -0
  43. package/.aodw/templates/invariants-template.md +12 -0
  44. package/.aodw/templates/module-readme-template.md +39 -0
  45. package/.aodw/templates/plan-lite-template.md +11 -0
  46. package/.aodw/templates/rt-decision-template.md +13 -0
  47. package/.aodw/templates/rt-intake-template.md +33 -0
  48. package/.aodw/templates/rt-meta-template.yaml +43 -0
  49. package/.aodw/templates/spec-lite-template.md +17 -0
  50. package/.aodw/templates/tests-template.md +13 -0
  51. package/.aodw/templates/tools-config/README.md +80 -0
  52. package/.aodw/templates/tools-config/backend/black.config.template.toml +6 -0
  53. package/.aodw/templates/tools-config/backend/pre-commit.config.template.yaml +16 -0
  54. package/.aodw/templates/tools-config/backend/ruff.config.template.toml +23 -0
  55. package/.aodw/templates/tools-config/frontend/eslint.config.template.json +113 -0
  56. package/.aodw/templates/tools-config/frontend/prettier.config.template.json +10 -0
  57. package/.aodw/templates/tools-config/frontend/tsconfig.paths.template.json +11 -0
  58. package/.aodw/workflow-guide.md +51 -0
  59. package/AODW_Adapters/README.md +143 -0
  60. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-check.md +7 -0
  61. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-done.md +7 -0
  62. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-full.md +7 -0
  63. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-governance.md +7 -0
  64. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-impact.md +7 -0
  65. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-init.md +7 -0
  66. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-invariants.md +7 -0
  67. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-lite.md +7 -0
  68. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-module.md +7 -0
  69. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-new.md +7 -0
  70. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-open.md +7 -0
  71. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-pause.md +7 -0
  72. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-resume.md +7 -0
  73. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-tests.md +7 -0
  74. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-upgrade.md +7 -0
  75. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw.md +35 -0
  76. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-check.md +16 -0
  77. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-done.md +16 -0
  78. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-full.md +14 -0
  79. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-governance.md +13 -0
  80. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-impact.md +13 -0
  81. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-init.md +13 -0
  82. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-invariants.md +13 -0
  83. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-lite.md +14 -0
  84. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-module.md +13 -0
  85. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-new.md +30 -0
  86. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-open.md +10 -0
  87. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-pause.md +12 -0
  88. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-resume.md +12 -0
  89. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-tests.md +13 -0
  90. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-upgrade.md +12 -0
  91. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw.md +18 -0
  92. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/claude/CLAUDE.md +17 -0
  93. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-check.md +30 -0
  94. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-done.md +52 -0
  95. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-full.md +31 -0
  96. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-governance.md +34 -0
  97. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-impact.md +25 -0
  98. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-init.md +75 -0
  99. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-invariants.md +29 -0
  100. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-lite.md +23 -0
  101. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-module.md +24 -0
  102. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-new.md +70 -0
  103. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-open.md +19 -0
  104. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-pause.md +19 -0
  105. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-resume.md +20 -0
  106. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-tests.md +26 -0
  107. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-upgrade.md +27 -0
  108. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw.md +69 -0
  109. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/deploypromote.md +20 -0
  110. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/featuretotester.md +32 -0
  111. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/feature_to_master_push_test_local.sh +390 -0
  112. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/promote_only.sh +210 -0
  113. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/rollback_prod.sh +99 -0
  114. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/rules/aodw.mdc +26 -0
  115. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-check.md +29 -0
  116. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-done.md +52 -0
  117. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-full.md +30 -0
  118. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-governance.md +33 -0
  119. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-impact.md +24 -0
  120. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-init.md +75 -0
  121. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-invariants.md +28 -0
  122. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-lite.md +22 -0
  123. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-module.md +23 -0
  124. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-new.md +92 -0
  125. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-open.md +18 -0
  126. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-pause.md +18 -0
  127. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-resume.md +19 -0
  128. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-tests.md +25 -0
  129. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-upgrade.md +26 -0
  130. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw.md +68 -0
  131. package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/GEMINI.md +17 -0
  132. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-analyze.md +15 -0
  133. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-complete.md +15 -0
  134. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-control.md +14 -0
  135. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-decide.md +16 -0
  136. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-governance.md +7 -0
  137. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-implement.md +16 -0
  138. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-init.md +7 -0
  139. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-intake.md +15 -0
  140. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-open.md +7 -0
  141. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-simplified.md +107 -0
  142. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-verify.md +14 -0
  143. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-analyze.md +24 -0
  144. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-complete.md +23 -0
  145. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-control.md +21 -0
  146. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-decide.md +26 -0
  147. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-governance.md +13 -0
  148. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-implement.md +21 -0
  149. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-init.md +13 -0
  150. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-intake.md +28 -0
  151. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-open.md +10 -0
  152. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-verify.md +20 -0
  153. package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw.md +18 -0
  154. package/AODW_Adapters/antigravity/.agent/rules/aodw.md +74 -0
  155. package/AODW_Adapters/claude/CLAUDE.md +70 -0
  156. package/AODW_Adapters/cursor/.cursor/commands/README.md +37 -0
  157. package/AODW_Adapters/cursor/.cursor/rules/aodw.mdc +77 -0
  158. package/AODW_Adapters/gemini/.agent/rules/aodw-analyze.md +15 -0
  159. package/AODW_Adapters/gemini/.agent/rules/aodw-complete.md +15 -0
  160. package/AODW_Adapters/gemini/.agent/rules/aodw-control.md +14 -0
  161. package/AODW_Adapters/gemini/.agent/rules/aodw-decide.md +16 -0
  162. package/AODW_Adapters/gemini/.agent/rules/aodw-governance.md +33 -0
  163. package/AODW_Adapters/gemini/.agent/rules/aodw-implement.md +16 -0
  164. package/AODW_Adapters/gemini/.agent/rules/aodw-init.md +75 -0
  165. package/AODW_Adapters/gemini/.agent/rules/aodw-intake.md +15 -0
  166. package/AODW_Adapters/gemini/.agent/rules/aodw-open.md +18 -0
  167. package/AODW_Adapters/gemini/.agent/rules/aodw-verify.md +14 -0
  168. package/AODW_Adapters/gemini/.agent/rules/aodw.md +70 -0
  169. package/AODW_Adapters/gemini/GEMINI.md +17 -0
  170. package/AODW_Adapters/general/.github/copilot-instructions.md +34 -0
  171. package/AODW_Adapters/general/AGENTS.md +70 -0
  172. package/README.md +118 -0
  173. package/bin/aodw.js +627 -0
  174. package/bin/commands/init-overview.js +801 -0
  175. package/bin/commands/init-tools.js +811 -0
  176. package/bin/commands/new.js +235 -0
  177. package/bin/commands/serve.js +79 -0
  178. package/bin/processors/index.js +109 -0
  179. package/bin/update-adapters-from-template.js +89 -0
  180. package/bin/utils/config.js +56 -0
  181. package/docs/README.md +26 -0
  182. package/docs/adapter-evaluation.md +55 -0
  183. package/docs/backend-guidelines.md +335 -0
  184. package/docs/frontend-guidelines.md +266 -0
  185. package/docs/installation-variants.md +88 -0
  186. package/docs/migration-guide-0.2.0.md +250 -0
  187. package/docs/platform-matrix.md +83 -0
  188. package/package.json +40 -0
@@ -0,0 +1,43 @@
1
+ # RT 元数据模板(单个 RT 的权威信息)
2
+ # 路径建议:.aodw/templates/rt-meta-template.yaml
3
+
4
+ id: RT-XXX # 由 RT-Manager 生成,例如 RT-001
5
+ title: <在此填写简短标题> # 例如 "修复订单列表加载缓慢的问题"
6
+
7
+ # RT 类型:用于分类与统计
8
+ # 可选值:Feature | Bug | Enhancement | Refactor | Research | AODW
9
+ type: Bug
10
+
11
+ # 使用的 AODW Profile
12
+ # 可选值:Spec-Full | Spec-Lite
13
+ profile: Spec-Lite
14
+
15
+ # 当前状态
16
+ # 可选值:created | intakeing | decided | in-progress | reviewing | done
17
+ status: created
18
+
19
+ # 涉及的业务/技术模块标识,来自你的模块体系(例如 orders / users / auth 等)
20
+ modules: []
21
+
22
+ # 当前主要执行工具:cursor / claude / mixed / unknown
23
+ tool: unknown
24
+
25
+ # 负责人(可选,可以是人名、昵称或账号)
26
+ owner: null
27
+
28
+ # 时间字段(必须使用系统命令或 API 获取真实时间,禁止 AI 自行推断)
29
+ # 获取方法:date -u +"%Y-%m-%dT%H:%M:%SZ" 或 new Date().toISOString()
30
+ # 格式:ISO8601(如 2025-11-28T11:54:45Z 或 2025-11-28T19:54:45+08:00)
31
+ created_at: <to-be-filled>
32
+ updated_at: <to-be-filled>
33
+ closed_at: null
34
+
35
+ # 与外部系统(JIRA / GitHub Issues 等)的关联 ID
36
+ external_ids:
37
+ jira: null
38
+ github: null
39
+ other: null
40
+
41
+ # 额外说明(可选,供人和 AI 阅读)
42
+ notes: >
43
+ 在这里简要描述本 RT 的背景、限制或特殊说明。
@@ -0,0 +1,17 @@
1
+ # Spec-Lite: RT-XXX - <short title>
2
+
3
+ ## 1. 背景(Context)
4
+ - 当前存在的问题 / 需求:
5
+
6
+ ## 2. 目标(Goal)
7
+ - 希望达到的业务 / 用户效果:
8
+
9
+ ## 3. 当前行为(Current Behavior)
10
+ - 当前系统在相关场景下的行为:
11
+
12
+ ## 4. 期望行为(Desired Behavior)
13
+ - 修改后的预期行为:
14
+
15
+ ## 5. 影响范围(Scope)
16
+ - 涉及模块 / 文件:
17
+ - 预期不应影响的功能:
@@ -0,0 +1,13 @@
1
+ # Tests: RT-XXX - <short title>
2
+
3
+ ## 1. 新增测试用例(New Tests)
4
+ - [ ] 描述用例 1(对应测试文件路径)
5
+ - [ ] 描述用例 2
6
+
7
+ ## 2. 回归测试(Regression)
8
+ - [ ] 回归用例 1
9
+ - [ ] 回归用例 2
10
+
11
+ ## 3. 手动验证建议(Manual Checks)
12
+ - [ ] 手动步骤 1
13
+ - [ ] 手动步骤 2
@@ -0,0 +1,80 @@
1
+ # 工具配置模板
2
+
3
+ 本目录包含 AODW 规范要求的开发工具配置模板。
4
+
5
+ ## 目录结构
6
+
7
+ ```
8
+ tools-config/
9
+ ├── frontend/ # 前端工具配置模板
10
+ │ ├── eslint.config.template.json
11
+ │ ├── prettier.config.template.json
12
+ │ └── tsconfig.paths.template.json
13
+ ├── backend/ # 后端工具配置模板
14
+ │ ├── ruff.config.template.toml
15
+ │ ├── black.config.template.toml
16
+ │ └── pre-commit.config.template.yaml
17
+ └── README.md
18
+ ```
19
+
20
+ ## 使用方式
21
+
22
+ ### 方式 1:通过 CLI 命令
23
+
24
+ ```bash
25
+ aodw init-tools
26
+ ```
27
+
28
+ CLI 会自动检测项目类型,并使用相应的模板生成配置文件。
29
+
30
+ ### 方式 2:通过 AI 命令
31
+
32
+ 在 AI 工具(Cursor/Claude 等)中说:
33
+ - "初始化工具"
34
+ - "设置开发工具"
35
+ - "配置工具"
36
+
37
+ AI 会引导您完成工具初始化和配置。
38
+
39
+ ## 配置说明
40
+
41
+ ### 前端配置
42
+
43
+ #### ESLint 配置
44
+ - 文件:`.eslintrc.json` 或 `eslint.config.js`
45
+ - 模板:`frontend/eslint.config.template.json`
46
+ - 包含:TypeScript、React、Hooks、Import、可访问性规则
47
+ - 限制:文件大小、函数长度、复杂度
48
+
49
+ #### Prettier 配置
50
+ - 文件:`.prettierrc.json` 或 `prettier.config.js`
51
+ - 模板:`frontend/prettier.config.template.json`
52
+ - 包含:代码格式化规则
53
+
54
+ #### TypeScript Path Alias
55
+ - 文件:`tsconfig.json`
56
+ - 模板:`frontend/tsconfig.paths.template.json`
57
+ - 包含:路径别名配置(@app、@pages、@features、@shared)
58
+
59
+ ### 后端配置
60
+
61
+ #### Ruff 配置
62
+ - 文件:`pyproject.toml`(合并到 `[tool.ruff]` 部分)
63
+ - 模板:`backend/ruff.config.template.toml`
64
+ - 包含:代码质量检查、复杂度限制
65
+
66
+ #### Black 配置
67
+ - 文件:`pyproject.toml`(合并到 `[tool.black]` 部分)
68
+ - 模板:`backend/black.config.template.toml`
69
+ - 包含:代码格式化规则
70
+
71
+ #### pre-commit 配置
72
+ - 文件:`.pre-commit-config.yaml`
73
+ - 模板:`backend/pre-commit.config.template.yaml`
74
+ - 包含:Git 提交前检查钩子
75
+
76
+ ## 注意事项
77
+
78
+ 1. **配置文件合并**:如果配置文件已存在,工具初始化会询问您是否合并配置
79
+ 2. **模板更新**:模板更新不会自动应用到已有项目,需要重新运行工具初始化
80
+ 3. **自定义配置**:您可以在工具初始化后手动调整配置,但建议保持核心规范不变
@@ -0,0 +1,6 @@
1
+ # Black 配置模板(TOML 片段)
2
+ # 需要合并到 pyproject.toml 的 [tool.black] 部分
3
+
4
+ [tool.black]
5
+ line-length = 100
6
+ target-version = ["py311"]
@@ -0,0 +1,16 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: backend-ruff
5
+ name: Backend Ruff Check
6
+ entry: ruff check .
7
+ language: system
8
+ pass_filenames: false
9
+ always_run: true
10
+
11
+ - id: backend-black
12
+ name: Backend Black Format
13
+ entry: black .
14
+ language: system
15
+ pass_filenames: false
16
+ always_run: true
@@ -0,0 +1,23 @@
1
+ # Ruff 配置模板(TOML 片段)
2
+ # 需要合并到 pyproject.toml 的 [tool.ruff] 部分
3
+
4
+ [tool.ruff]
5
+ line-length = 100
6
+ target-version = "py311"
7
+
8
+ [tool.ruff.lint]
9
+ select = [
10
+ "E", # 基本语法错误
11
+ "F", # 未使用变量、导入等
12
+ "I", # import 排序
13
+ "PLR", # 复杂度 & 过长函数(核心)
14
+ ]
15
+ ignore = []
16
+
17
+ # ✅ 重点拦截:
18
+ # PLR0915 -> 函数语句过多(怪物函数)
19
+ # PLR0912 -> 分支过多
20
+ # PLR0911 -> return 过多
21
+
22
+ [tool.ruff.lint.per-file-ignores]
23
+ "__init__.py" = ["F401"]
@@ -0,0 +1,113 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "parserOptions": {
5
+ "ecmaVersion": 2022,
6
+ "sourceType": "module",
7
+ "ecmaFeatures": {
8
+ "jsx": true
9
+ },
10
+ "project": "./tsconfig.json"
11
+ },
12
+ "extends": [
13
+ "eslint:recommended",
14
+ "plugin:@typescript-eslint/recommended",
15
+ "plugin:react/recommended",
16
+ "plugin:react-hooks/recommended",
17
+ "plugin:import/recommended",
18
+ "plugin:import/typescript",
19
+ "plugin:jsx-a11y/recommended",
20
+ "prettier"
21
+ ],
22
+ "plugins": [
23
+ "@typescript-eslint",
24
+ "react",
25
+ "react-hooks",
26
+ "import",
27
+ "jsx-a11y"
28
+ ],
29
+ "settings": {
30
+ "react": {
31
+ "version": "detect"
32
+ },
33
+ "import/resolver": {
34
+ "typescript": {
35
+ "alwaysTryTypes": true,
36
+ "project": "./tsconfig.json"
37
+ },
38
+ "node": {
39
+ "extensions": [".js", ".jsx", ".ts", ".tsx"]
40
+ }
41
+ }
42
+ },
43
+ "rules": {
44
+ "max-lines": ["error", { "max": 300, "skipBlankLines": true, "skipComments": true }],
45
+ "max-lines-per-function": ["error", { "max": 60, "skipBlankLines": true, "skipComments": true }],
46
+ "complexity": ["error", 10],
47
+ "import/order": [
48
+ "error",
49
+ {
50
+ "groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
51
+ "pathGroups": [
52
+ {
53
+ "pattern": "@app/**",
54
+ "group": "internal",
55
+ "position": "before"
56
+ },
57
+ {
58
+ "pattern": "@pages/**",
59
+ "group": "internal",
60
+ "position": "before"
61
+ },
62
+ {
63
+ "pattern": "@features/**",
64
+ "group": "internal",
65
+ "position": "before"
66
+ },
67
+ {
68
+ "pattern": "@shared/**",
69
+ "group": "internal",
70
+ "position": "before"
71
+ }
72
+ ],
73
+ "pathGroupsExcludedImportTypes": ["builtin"],
74
+ "newlines-between": "always",
75
+ "alphabetize": {
76
+ "order": "asc",
77
+ "caseInsensitive": true
78
+ }
79
+ }
80
+ ],
81
+ "no-restricted-imports": [
82
+ "error",
83
+ {
84
+ "paths": [
85
+ {
86
+ "name": "@pages",
87
+ "message": "pages 只能从 features / shared 引用,不能直接引用其他 pages"
88
+ }
89
+ ],
90
+ "patterns": [
91
+ {
92
+ "group": ["@features/*/components", "@features/*/hooks", "@features/*/store"],
93
+ "message": "features 不能直接引用其他 features 的内部实现,只能走公共入口"
94
+ }
95
+ ]
96
+ }
97
+ ]
98
+ },
99
+ "overrides": [
100
+ {
101
+ "files": ["src/pages/**/*.tsx", "src/pages/**/*.ts"],
102
+ "rules": {
103
+ "max-lines": ["error", { "max": 300, "skipBlankLines": true, "skipComments": true }]
104
+ }
105
+ },
106
+ {
107
+ "files": ["src/features/**/*.tsx", "src/features/**/*.ts", "src/shared/**/*.tsx", "src/shared/**/*.ts"],
108
+ "rules": {
109
+ "max-lines": ["error", { "max": 200, "skipBlankLines": true, "skipComments": true }]
110
+ }
111
+ }
112
+ ]
113
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "arrowParens": "avoid",
9
+ "endOfLine": "lf"
10
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "@app/*": ["src/app/*"],
6
+ "@pages/*": ["src/pages/*"],
7
+ "@features/*": ["src/features/*"],
8
+ "@shared/*": ["src/shared/*"]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,51 @@
1
+ # AODW Workflow Guide (Level 2)
2
+
3
+ 本文件为 AODW 的核心流程指令层,用于在触发任务时快速加载。
4
+
5
+ ## 1. 核心流程(RT 生命周期)
6
+
7
+ created → intakeing → decided → in-progress → reviewing → done
8
+
9
+ 关键动作:
10
+ - **Intake**:澄清范围、风险、模块影响,记录到 `intake.md`
11
+ - **Decision**:选择 Spec-Full / Spec-Lite,并记录到 `decision.md`
12
+ - **Plan**:先写 plan,获批后进入实现
13
+
14
+ ## 2. Spec-Full vs Spec-Lite 决策
15
+
16
+ 使用 Spec-Full:
17
+ - 跨模块影响
18
+ - 数据模型 / schema 变更
19
+ - 外部 API 合约变更
20
+ - 高风险或高复杂度变更
21
+
22
+ 使用 Spec-Lite:
23
+ - 局部改动
24
+ - 单模块小修复
25
+ - 无外部 API 合约变化
26
+
27
+ ## 3. Gate 检查点
28
+
29
+ - Gate 1:Intake 澄清完成
30
+ - Gate 2:分支确认(必须在 feature 分支)
31
+ - Gate 3:Plan 确认(未批准不得实现)
32
+ - Gate 4:提交前确认(展示 diff 与 status)
33
+ - Gate 5:完成确认(文档与测试齐备)
34
+
35
+ ## 4. 加载策略(渐进式披露)
36
+
37
+ 优先读取:
38
+ 1. `.aodw/manifest.yaml`(规则索引)
39
+ 2. 本文件(流程指令)
40
+ 3. 必要规则文件(优先摘要 `*-summary.md`)
41
+
42
+ 摘要策略:
43
+ - 先读 `*-summary.md`
44
+ - 需要细节再读完整文件
45
+
46
+ ## 5. 关键文件入口
47
+
48
+ - 规则索引:`.aodw/manifest.yaml`
49
+ - RT 流程:`.aodw/02-workflow/rt-manager.md`
50
+ - Spec-Full:`.aodw/02-workflow/spec-full-profile.md`
51
+ - Spec-Lite:`.aodw/02-workflow/spec-lite-profile.md`
@@ -0,0 +1,143 @@
1
+ # AODW Tool Adapters
2
+
3
+ 此目录包含不同 AI 工具的配置模板,用于将 AODW 规范桥接到具体的开发工具。
4
+
5
+ ## 📦 支持的工具
6
+
7
+ ### `cursor/`
8
+ **Cursor IDE 适配器**
9
+ - `.cursor/` - Cursor 配置目录
10
+ - 包含规则文件、命令定义等
11
+
12
+ ### `gemini/`
13
+ **Google Gemini 适配器**
14
+ - `.agent/` - Gemini Agent 配置
15
+ - `GEMINI.md` - Gemini 专用提示词
16
+
17
+ ### `claude/`
18
+ **Anthropic Claude 适配器**
19
+ - `CLAUDE.md` - Claude 专用提示词
20
+
21
+ ### `general/`
22
+ **通用适配器**
23
+ - `AGENTS.md` - 所有工具通用的说明文档
24
+ - 不依赖特定工具的配置
25
+
26
+ ## 🚀 使用方法
27
+
28
+ ### 作为用户
29
+
30
+ 用户**不应该**直接使用此目录,而是通过 CLI 工具自动安装:
31
+
32
+ ```bash
33
+ npx create-aodw init
34
+ ```
35
+
36
+ CLI 会根据选择自动将对应的适配器文件复制到项目根目录。
37
+
38
+ ### 作为开发者
39
+
40
+ #### 添加新工具适配器
41
+
42
+ 1. **创建新目录**:
43
+ ```bash
44
+ mkdir AODW_Adapters/vscode
45
+ ```
46
+
47
+ 2. **添加配置文件**:
48
+ - 工具特定的配置
49
+ - 提示词文件
50
+ - 规则定义
51
+
52
+ 3. **更新 CLI**:
53
+ 编辑 `cli/bin/aodw.js`,在选项列表中添加新工具:
54
+ ```javascript
55
+ choices: [
56
+ { name: 'All (Install all adapters)', value: 'all' },
57
+ { name: 'Cursor', value: 'cursor', checked: true },
58
+ { name: 'Google Gemini', value: 'gemini' },
59
+ { name: 'Anthropic Claude', value: 'claude' },
60
+ { name: 'VS Code', value: 'vscode' } // 新增
61
+ ]
62
+ ```
63
+
64
+ 4. **更新逻辑**:
65
+ 确保 `toolsToInstall` 逻辑包含新工具:
66
+ ```javascript
67
+ const toolsToInstall = tools.includes('all')
68
+ ? ['cursor', 'gemini', 'claude', 'vscode'] // 新增
69
+ : tools;
70
+ ```
71
+
72
+ 5. **发布新版本**:
73
+ ```bash
74
+ cd cli
75
+ ./publish.sh minor # 新功能使用 minor
76
+ ```
77
+
78
+ #### 更新现有适配器
79
+
80
+ 1. 修改对应目录下的文件
81
+ 2. 运行 `cli/publish.sh patch` 发布补丁版本
82
+ 3. 用户运行 `npx create-aodw update` 即可获得更新
83
+
84
+ ## 🏗️ 设计原则
85
+
86
+ ### "薄适配器"原则
87
+
88
+ 适配器应该**尽量轻量**:
89
+
90
+ ❌ **错误做法** - 在适配器中重复规范内容:
91
+ ```markdown
92
+ <!-- GEMINI.md -->
93
+ # AODW 规范
94
+ ## RT 管理
95
+ RT-ID 格式为 RT-XXX...(大量重复 .aodw 中的内容)
96
+ ```
97
+
98
+ ✅ **正确做法** - 引导 AI 阅读核心规范:
99
+ ```markdown
100
+ <!-- GEMINI.md -->
101
+ 你正在一个 AODW 项目中工作。
102
+ 请优先阅读 `.aodw/01-core/aodw-constitution.md` 了解核心规范。
103
+ 当处理 RT 时,参考 `.aodw/02-workflow/rt-manager.md`。
104
+ ```
105
+
106
+ ### 职责边界
107
+
108
+ - **适配器的职责**:将工具特定的接口映射到 AODW 规范
109
+ - **核心规范的职责**:定义"什么是 AODW"
110
+
111
+ ## 📝 目录结构
112
+
113
+ ```
114
+ AODW_Adapters/
115
+ ├── README.md # 本文件
116
+ ├── cursor/
117
+ │ ├── .cursor/
118
+ │ │ ├── aodw_all.mdc
119
+ │ │ ├── rules/
120
+ │ │ └── commands/
121
+ │ └── CLAUDE_lite.md
122
+ ├── gemini/
123
+ │ ├── .agent/
124
+ │ │ └── rules/
125
+ │ └── GEMINI.md
126
+ ├── claude/
127
+ │ └── CLAUDE.md
128
+ └── general/
129
+ └── AGENTS.md
130
+ ```
131
+
132
+ ## 🔄 版本同步
133
+
134
+ 适配器版本与 AODW 核心规范保持同步:
135
+ - 当 `.aodw` 更新时,适配器也应相应调整
136
+ - CLI 的 `update` 命令会同时更新核心和适配器
137
+
138
+ ## 🤝 贡献
139
+
140
+ 欢迎为新工具贡献适配器!请确保:
141
+ 1. 遵循"薄适配器"原则
142
+ 2. 测试适配器在目标工具中的效果
143
+ 3. 提供清晰的使用说明
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # RT 一致性检查
5
+
6
+ 当用户想要 **检查 RT 状态**、**验证一致性** 或 **运行检查** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-check`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 完成 RT
5
+
6
+ 当用户想要 **完成 RT**、**关闭任务** 或 **标记为 Done** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-done`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 切换到 Spec-Full
5
+
6
+ 当用户想要 **切换到 Spec-Full 模式** 或 **启用完整规范** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-full`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # AODW 治理检查
5
+
6
+ 当用户想要 **检查治理状态** 或 **运行治理流程** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-governance`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 更新影响分析
5
+
6
+ 当用户想要 **更新影响分析** 或 **分析改动影响** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-impact`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 初始化 AODW
5
+
6
+ 当用户想要 **初始化 AODW** 或 **设置新项目** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-init`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 检查不变量
5
+
6
+ 当用户想要 **检查不变量** 或 **验证系统约束** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-invariants`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 切换到 Spec-Lite
5
+
6
+ 当用户想要 **切换到 Spec-Lite 模式** 或 **启用轻量规范** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-lite`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 更新模块文档
5
+
6
+ 当用户想要 **更新模块文档** 或 **创建新模块** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-module`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 创建新 RT
5
+
6
+ 当用户想要 **创建新 RT**、**开始新任务** 或 **启动 AODW 流程** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-new`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 打开 RT
5
+
6
+ 当用户想要 **打开某个 RT** 或 **查看任务详情** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-open`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 暂停 AODW
5
+
6
+ 当用户想要 **暂停 AODW** 或 **进入普通模式** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-pause`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 恢复 AODW
5
+
6
+ 当用户想要 **恢复 AODW** 或 **重新进入工作流** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-resume`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 生成测试计划
5
+
6
+ 当用户想要 **生成测试计划** 或 **更新测试文档** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-tests`。
@@ -0,0 +1,7 @@
1
+ ---
2
+ trigger: model_decision
3
+ ---
4
+ # 升级到 Spec-Full
5
+
6
+ 当用户想要 **升级当前 RT** 或 **从 Lite 转为 Full** 时,请**不要**直接尝试操作。
7
+ 你**必须**运行工作流 `/aodw-upgrade`。