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.
- package/.aodw/01-core/ai-interaction-rules.md +218 -0
- package/.aodw/01-core/ai-knowledge-rules.md +302 -0
- package/.aodw/01-core/ai-project-overview-rules.md +284 -0
- package/.aodw/01-core/aodw-constitution-summary.md +20 -0
- package/.aodw/01-core/aodw-constitution.md +419 -0
- package/.aodw/01-core/csf-thinking-framework.md +373 -0
- package/.aodw/01-core/git-discipline.md +226 -0
- package/.aodw/01-core/module-doc-rules.md +90 -0
- package/.aodw/02-workflow/aodw-development-stages.md +235 -0
- package/.aodw/02-workflow/rt-id-generation-rules.md +267 -0
- package/.aodw/02-workflow/rt-manager-summary.md +15 -0
- package/.aodw/02-workflow/rt-manager.md +399 -0
- package/.aodw/02-workflow/spec-full-profile-summary.md +13 -0
- package/.aodw/02-workflow/spec-full-profile.md +391 -0
- package/.aodw/02-workflow/spec-lite-profile.md +313 -0
- package/.aodw/02-workflow/ui-workflow-rules.md +334 -0
- package/.aodw/03-standards/ai-coding-rules-common.md +89 -0
- package/.aodw/03-standards/ai-coding-rules.md +370 -0
- package/.aodw/03-standards/stacks/java-springboot/ai-coding-rules-backend.md +100 -0
- package/.aodw/03-standards/stacks/python-fastapi/ai-coding-rules-backend.md +612 -0
- package/.aodw/03-standards/stacks/react-typescript/ai-coding-rules-frontend.md +291 -0
- package/.aodw/03-standards/stacks/vue2/ai-coding-rules-frontend.md +97 -0
- package/.aodw/03-standards/ui-kit/ui-kit.md +163 -0
- package/.aodw/04-auditors/aodw-development-auditor-rules.md +470 -0
- package/.aodw/04-auditors/aodw-full-auditor-rules.md +365 -0
- package/.aodw/04-auditors/aodw-requirement-auditor-rules.md +408 -0
- package/.aodw/05-tooling/ai-tools-init-rules.md +465 -0
- package/.aodw/06-project/ai-overview.md +116 -0
- package/.aodw/06-project/modules-index.yaml +11 -0
- package/.aodw/07-optimization/token-usage-analysis.md +253 -0
- package/.aodw/README.md +26 -0
- package/.aodw/RELEASE-CHECKLIST.md +144 -0
- package/.aodw/config.yaml +2 -0
- package/.aodw/manifest.yaml +98 -0
- package/.aodw/templates/SOURCE-TO-DISTRIBUTION-GUIDE.md +276 -0
- package/.aodw/templates/TEMPLATE-APPLICATION-GUIDE.md +246 -0
- package/.aodw/templates/aodw-kernel-loader-template.md +70 -0
- package/.aodw/templates/audit-report-template.md +232 -0
- package/.aodw/templates/changelog-template.md +16 -0
- package/.aodw/templates/checklists/coding-standards-template.md +110 -0
- package/.aodw/templates/csf-review-template.md +201 -0
- package/.aodw/templates/impact-template.md +17 -0
- package/.aodw/templates/invariants-template.md +12 -0
- package/.aodw/templates/module-readme-template.md +39 -0
- package/.aodw/templates/plan-lite-template.md +11 -0
- package/.aodw/templates/rt-decision-template.md +13 -0
- package/.aodw/templates/rt-intake-template.md +33 -0
- package/.aodw/templates/rt-meta-template.yaml +43 -0
- package/.aodw/templates/spec-lite-template.md +17 -0
- package/.aodw/templates/tests-template.md +13 -0
- package/.aodw/templates/tools-config/README.md +80 -0
- package/.aodw/templates/tools-config/backend/black.config.template.toml +6 -0
- package/.aodw/templates/tools-config/backend/pre-commit.config.template.yaml +16 -0
- package/.aodw/templates/tools-config/backend/ruff.config.template.toml +23 -0
- package/.aodw/templates/tools-config/frontend/eslint.config.template.json +113 -0
- package/.aodw/templates/tools-config/frontend/prettier.config.template.json +10 -0
- package/.aodw/templates/tools-config/frontend/tsconfig.paths.template.json +11 -0
- package/.aodw/workflow-guide.md +51 -0
- package/AODW_Adapters/README.md +143 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-check.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-done.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-full.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-governance.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-impact.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-init.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-invariants.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-lite.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-module.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-new.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-open.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-pause.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-resume.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-tests.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw-upgrade.md +7 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/.agent/rules/aodw.md +35 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-check.md +16 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-done.md +16 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-full.md +14 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-governance.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-impact.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-init.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-invariants.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-lite.md +14 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-module.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-new.md +30 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-open.md +10 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-pause.md +12 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-resume.md +12 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-tests.md +13 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw-upgrade.md +12 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/antigravity/global_workflows/aodw.md +18 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/claude/CLAUDE.md +17 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-check.md +30 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-done.md +52 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-full.md +31 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-governance.md +34 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-impact.md +25 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-init.md +75 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-invariants.md +29 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-lite.md +23 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-module.md +24 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-new.md +70 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-open.md +19 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-pause.md +19 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-resume.md +20 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-tests.md +26 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw-upgrade.md +27 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/aodw.md +69 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/deploypromote.md +20 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/commands/featuretotester.md +32 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/feature_to_master_push_test_local.sh +390 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/promote_only.sh +210 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/deploy/rollback_prod.sh +99 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/cursor/.cursor/rules/aodw.mdc +26 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-check.md +29 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-done.md +52 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-full.md +30 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-governance.md +33 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-impact.md +24 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-init.md +75 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-invariants.md +28 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-lite.md +22 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-module.md +23 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-new.md +92 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-open.md +18 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-pause.md +18 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-resume.md +19 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-tests.md +25 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw-upgrade.md +26 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/.agent/rules/aodw.md +68 -0
- package/AODW_Adapters/_backup/v3.1.0-pre-refactor/gemini/GEMINI.md +17 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-analyze.md +15 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-complete.md +15 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-control.md +14 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-decide.md +16 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-governance.md +7 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-implement.md +16 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-init.md +7 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-intake.md +15 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-open.md +7 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-simplified.md +107 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/.agent/rules/aodw-verify.md +14 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-analyze.md +24 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-complete.md +23 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-control.md +21 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-decide.md +26 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-governance.md +13 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-implement.md +21 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-init.md +13 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-intake.md +28 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-open.md +10 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw-verify.md +20 -0
- package/AODW_Adapters/_backup/v4.0.0-simplified/antigravity/global_workflows/aodw.md +18 -0
- package/AODW_Adapters/antigravity/.agent/rules/aodw.md +74 -0
- package/AODW_Adapters/claude/CLAUDE.md +70 -0
- package/AODW_Adapters/cursor/.cursor/commands/README.md +37 -0
- package/AODW_Adapters/cursor/.cursor/rules/aodw.mdc +77 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-analyze.md +15 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-complete.md +15 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-control.md +14 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-decide.md +16 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-governance.md +33 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-implement.md +16 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-init.md +75 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-intake.md +15 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-open.md +18 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw-verify.md +14 -0
- package/AODW_Adapters/gemini/.agent/rules/aodw.md +70 -0
- package/AODW_Adapters/gemini/GEMINI.md +17 -0
- package/AODW_Adapters/general/.github/copilot-instructions.md +34 -0
- package/AODW_Adapters/general/AGENTS.md +70 -0
- package/README.md +118 -0
- package/bin/aodw.js +627 -0
- package/bin/commands/init-overview.js +801 -0
- package/bin/commands/init-tools.js +811 -0
- package/bin/commands/new.js +235 -0
- package/bin/commands/serve.js +79 -0
- package/bin/processors/index.js +109 -0
- package/bin/update-adapters-from-template.js +89 -0
- package/bin/utils/config.js +56 -0
- package/docs/README.md +26 -0
- package/docs/adapter-evaluation.md +55 -0
- package/docs/backend-guidelines.md +335 -0
- package/docs/frontend-guidelines.md +266 -0
- package/docs/installation-variants.md +88 -0
- package/docs/migration-guide-0.2.0.md +250 -0
- package/docs/platform-matrix.md +83 -0
- 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,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,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,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. 提供清晰的使用说明
|