@tinkcarlos/skillora 0.2.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.
- package/.claude/skills/.temp-skill-index.md +245 -0
- package/.claude/skills/SKILL.md +264 -0
- package/.claude/skills/api-scaffolding/SKILL.md +431 -0
- package/.claude/skills/api-scaffolding/agents/backend-architect.md +282 -0
- package/.claude/skills/api-scaffolding/agents/django-pro.md +144 -0
- package/.claude/skills/api-scaffolding/agents/fastapi-pro.md +156 -0
- package/.claude/skills/api-scaffolding/agents/graphql-architect.md +146 -0
- package/.claude/skills/api-scaffolding/skills/fastapi-templates/SKILL.md +171 -0
- package/.claude/skills/api-testing-observability/SKILL.md +583 -0
- package/.claude/skills/api-testing-observability/agents/api-documenter.md +146 -0
- package/.claude/skills/api-testing-observability/commands/api-mock.md +1320 -0
- package/.claude/skills/brainstorming/SKILL.md +283 -0
- package/.claude/skills/bug-fixing/SKILL.md +382 -0
- package/.claude/skills/bug-fixing/references/backend-guide.md +132 -0
- package/.claude/skills/bug-fixing/references/bug-guide.md +354 -0
- package/.claude/skills/bug-fixing/references/bug-record-template.md +134 -0
- package/.claude/skills/bug-fixing/references/bug-records.md +88 -0
- package/.claude/skills/bug-fixing/references/code-review-gate.md +81 -0
- package/.claude/skills/bug-fixing/references/common-bugs.md +140 -0
- package/.claude/skills/bug-fixing/references/complete-workflow.md +361 -0
- package/.claude/skills/bug-fixing/references/config-driven-fixes.md +136 -0
- package/.claude/skills/bug-fixing/references/context-isolation-protocol.md +268 -0
- package/.claude/skills/bug-fixing/references/cross-surface-regression.md +120 -0
- package/.claude/skills/bug-fixing/references/database-investigation.md +129 -0
- package/.claude/skills/bug-fixing/references/dependency-and-integrity-protocol.md +369 -0
- package/.claude/skills/bug-fixing/references/fix-completeness-checklist.md +239 -0
- package/.claude/skills/bug-fixing/references/frontend-guide.md +219 -0
- package/.claude/skills/bug-fixing/references/fullstack-joint-guide.md +123 -0
- package/.claude/skills/bug-fixing/references/functional-breakage.md +117 -0
- package/.claude/skills/bug-fixing/references/ide-lint-errors-guide.md +176 -0
- package/.claude/skills/bug-fixing/references/impact-analysis.md +511 -0
- package/.claude/skills/bug-fixing/references/investigation-checklist.md +263 -0
- package/.claude/skills/bug-fixing/references/knowledge-extraction-guide.md +531 -0
- package/.claude/skills/bug-fixing/references/knowledge-workflow.md +212 -0
- package/.claude/skills/bug-fixing/references/post-edit-quality-gate.md +30 -0
- package/.claude/skills/bug-fixing/references/python-env-and-testing.md +126 -0
- package/.claude/skills/bug-fixing/references/rca-guide.md +428 -0
- package/.claude/skills/bug-fixing/references/similar-bug-patterns.md +113 -0
- package/.claude/skills/bug-fixing/references/skill-delegation-guide.md +350 -0
- package/.claude/skills/bug-fixing/references/skill-orchestration.md +155 -0
- package/.claude/skills/bug-fixing/references/testing-strategy.md +350 -0
- package/.claude/skills/bug-fixing/references/tooling-build-scripts.md +162 -0
- package/.claude/skills/bug-fixing/references/user-input-validation.md +77 -0
- package/.claude/skills/bug-fixing/references/ux-patterns.md +158 -0
- package/.claude/skills/bug-fixing/references/windows-terminal-hygiene.md +106 -0
- package/.claude/skills/bug-fixing/references/zero-regression-matrix.md +239 -0
- package/.claude/skills/bug-fixing/references/zero-risk-protocol.md +102 -0
- package/.claude/skills/bug-fixing/scripts/format_code.py +611 -0
- package/.claude/skills/bug-fixing/scripts/generate_report_template.py +74 -0
- package/.claude/skills/bug-fixing/scripts/lint_check.py +816 -0
- package/.claude/skills/bug-fixing/scripts/requirements.txt +36 -0
- package/.claude/skills/cicd-pipeline/SKILL.md +300 -0
- package/.claude/skills/code-review/SKILL.md +535 -0
- package/.claude/skills/code-review/references/anti-pattern-scan.md +102 -0
- package/.claude/skills/code-review/references/automated-analysis.md +456 -0
- package/.claude/skills/code-review/references/backend-common-issues.md +589 -0
- package/.claude/skills/code-review/references/backend-expert-guide.md +415 -0
- package/.claude/skills/code-review/references/backend-review.md +868 -0
- package/.claude/skills/code-review/references/batch-processing-strategy.md +198 -0
- package/.claude/skills/code-review/references/call-chain-analysis-protocol.md +166 -0
- package/.claude/skills/code-review/references/common-patterns.md +321 -0
- package/.claude/skills/code-review/references/configuration-review.md +425 -0
- package/.claude/skills/code-review/references/control-flow-completeness.md +114 -0
- package/.claude/skills/code-review/references/database-review.md +298 -0
- package/.claude/skills/code-review/references/dependency-and-integrity-protocol.md +313 -0
- package/.claude/skills/code-review/references/external-standards.md +51 -0
- package/.claude/skills/code-review/references/feature-review.md +329 -0
- package/.claude/skills/code-review/references/file-review-template.md +326 -0
- package/.claude/skills/code-review/references/frontend-advanced.md +654 -0
- package/.claude/skills/code-review/references/frontend-common-issues.md +482 -0
- package/.claude/skills/code-review/references/frontend-expert-guide.md +342 -0
- package/.claude/skills/code-review/references/frontend-review.md +783 -0
- package/.claude/skills/code-review/references/fullstack-consistency.md +418 -0
- package/.claude/skills/code-review/references/fullstack-review.md +477 -0
- package/.claude/skills/code-review/references/functional-completeness.md +386 -0
- package/.claude/skills/code-review/references/hidden-bugs-detection.md +473 -0
- package/.claude/skills/code-review/references/ide-lint-errors-guide.md +173 -0
- package/.claude/skills/code-review/references/infrastructure-review.md +453 -0
- package/.claude/skills/code-review/references/iteration-review.md +264 -0
- package/.claude/skills/code-review/references/job-review.md +335 -0
- package/.claude/skills/code-review/references/layered-checklist-protocol.md +157 -0
- package/.claude/skills/code-review/references/logic-completeness.md +535 -0
- package/.claude/skills/code-review/references/mandatory-checklist.md +288 -0
- package/.claude/skills/code-review/references/multi-language-guide.md +800 -0
- package/.claude/skills/code-review/references/new-project-review.md +226 -0
- package/.claude/skills/code-review/references/non-code-files-review.md +451 -0
- package/.claude/skills/code-review/references/overlooked-issues.md +657 -0
- package/.claude/skills/code-review/references/platform-specific-review.md +195 -0
- package/.claude/skills/code-review/references/precision-analysis-protocol.md +260 -0
- package/.claude/skills/code-review/references/python-patterns.md +494 -0
- package/.claude/skills/code-review/references/rca-techniques.md +362 -0
- package/.claude/skills/code-review/references/report-template.md +430 -0
- package/.claude/skills/code-review/references/resource-limits-and-degradation.md +137 -0
- package/.claude/skills/code-review/references/review-dimensions.md +311 -0
- package/.claude/skills/code-review/references/review-guide.md +202 -0
- package/.claude/skills/code-review/references/review-knowledge-workflow.md +257 -0
- package/.claude/skills/code-review/references/review-progress-tracker-protocol.md +172 -0
- package/.claude/skills/code-review/references/review-record-template.md +195 -0
- package/.claude/skills/code-review/references/skill-orchestration.md +143 -0
- package/.claude/skills/code-review/references/ui-ux-review.md +470 -0
- package/.claude/skills/containerization/SKILL.md +313 -0
- package/.claude/skills/database-migrations/agents/database-admin.md +142 -0
- package/.claude/skills/database-migrations/agents/database-optimizer.md +144 -0
- package/.claude/skills/database-migrations/commands/migration-observability.md +408 -0
- package/.claude/skills/database-migrations/commands/sql-migrations.md +492 -0
- package/.claude/skills/finishing-a-development-branch/SKILL.md +319 -0
- package/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/.claude/skills/frontend-design/SKILL.md +587 -0
- package/.claude/skills/frontend-design/references/color-consistency.md +487 -0
- package/.claude/skills/frontend-design/references/color-palettes-full.md +657 -0
- package/.claude/skills/frontend-design/references/design-system-generator.md +285 -0
- package/.claude/skills/frontend-design/references/font-pairings-full.md +705 -0
- package/.claude/skills/frontend-design/references/industry-anti-patterns.md +281 -0
- package/.claude/skills/frontend-design/references/layout-anti-patterns.md +582 -0
- package/.claude/skills/frontend-design/references/motion-patterns.md +659 -0
- package/.claude/skills/frontend-design/references/pre-delivery-checklist.md +153 -0
- package/.claude/skills/frontend-design/references/responsive-design.md +555 -0
- package/.claude/skills/frontend-design/references/style-modification-rules.md +335 -0
- package/.claude/skills/frontend-design/references/ui-styles-full.md +383 -0
- package/.claude/skills/frontend-design/references/ui-styles-rating.md +191 -0
- package/.claude/skills/frontend-design/references/ux-guidelines.md +640 -0
- package/.claude/skills/fullstack-developer/SKILL.md +512 -0
- package/.claude/skills/fullstack-developer/references/api-contract-guide.md +312 -0
- package/.claude/skills/fullstack-developer/references/api-response-patterns.md +223 -0
- package/.claude/skills/fullstack-developer/references/async-patterns.md +220 -0
- package/.claude/skills/fullstack-developer/references/bug-prevention.md +914 -0
- package/.claude/skills/fullstack-developer/references/code-quality-checklist.md +271 -0
- package/.claude/skills/fullstack-developer/references/complete-development-workflow.md +278 -0
- package/.claude/skills/fullstack-developer/references/context-isolation-protocol.md +256 -0
- package/.claude/skills/fullstack-developer/references/database-migration.md +331 -0
- package/.claude/skills/fullstack-developer/references/dependency-and-integrity-protocol.md +390 -0
- package/.claude/skills/fullstack-developer/references/development-phases.md +333 -0
- package/.claude/skills/fullstack-developer/references/expert-guide.md +214 -0
- package/.claude/skills/fullstack-developer/references/file-import-patterns.md +114 -0
- package/.claude/skills/fullstack-developer/references/graceful-degradation-patterns.md +78 -0
- package/.claude/skills/fullstack-developer/references/ide-lint-errors-guide.md +183 -0
- package/.claude/skills/fullstack-developer/references/integration-testing.md +301 -0
- package/.claude/skills/fullstack-developer/references/mock-api-patterns.md +307 -0
- package/.claude/skills/fullstack-developer/references/phase-gate-template.md +249 -0
- package/.claude/skills/fullstack-developer/references/post-edit-quality-gate.md +30 -0
- package/.claude/skills/fullstack-developer/references/python-engineering.md +79 -0
- package/.claude/skills/fullstack-developer/references/skill-orchestration.md +214 -0
- package/.claude/skills/fullstack-developer/references/skill-router-table.md +304 -0
- package/.claude/skills/fullstack-developer/references/state-sync.md +217 -0
- package/.claude/skills/fullstack-developer/references/ui-testing-checklist.md +292 -0
- package/.claude/skills/fullstack-developer/scripts/format_code.py +611 -0
- package/.claude/skills/fullstack-developer/scripts/lint_check.py +816 -0
- package/.claude/skills/fullstack-developer/scripts/requirements.txt +36 -0
- package/.claude/skills/performance-optimization/SKILL.md +250 -0
- package/.claude/skills/product-requirements/SKILL.md +357 -0
- package/.claude/skills/product-requirements/references/acceptance-criteria.md +335 -0
- package/.claude/skills/product-requirements/references/answer-first-questioning-protocol.md +299 -0
- package/.claude/skills/product-requirements/references/competitive-analysis-guide.md +183 -0
- package/.claude/skills/product-requirements/references/document-accuracy-protocol.md +253 -0
- package/.claude/skills/product-requirements/references/document-management-protocol.md +278 -0
- package/.claude/skills/product-requirements/references/external-standards.md +62 -0
- package/.claude/skills/product-requirements/references/feature-spec-template.md +359 -0
- package/.claude/skills/product-requirements/references/knowledge-acquisition-protocol.md +251 -0
- package/.claude/skills/product-requirements/references/plan-execution-protocol.md +334 -0
- package/.claude/skills/product-requirements/references/plan-generation-protocol.md +264 -0
- package/.claude/skills/product-requirements/references/prioritization-frameworks.md +80 -0
- package/.claude/skills/product-requirements/references/requirement-decomposition-protocol.md +291 -0
- package/.claude/skills/product-requirements/references/user-story-examples.md +297 -0
- package/.claude/skills/product-requirements/references/workflow-templates.md +266 -0
- package/.claude/skills/react-best-practices/SKILL.md +198 -0
- package/.claude/skills/react-best-practices/references/advanced-patterns.md +94 -0
- package/.claude/skills/react-best-practices/references/bundle-optimization.md +182 -0
- package/.claude/skills/react-best-practices/references/client-data-fetching.md +112 -0
- package/.claude/skills/react-best-practices/references/complete-guide.md +2249 -0
- package/.claude/skills/react-best-practices/references/eliminating-waterfalls.md +169 -0
- package/.claude/skills/react-best-practices/references/javascript-performance.md +256 -0
- package/.claude/skills/react-best-practices/references/rendering-performance.md +230 -0
- package/.claude/skills/react-best-practices/references/rerender-optimization.md +214 -0
- package/.claude/skills/react-best-practices/references/server-performance.md +182 -0
- package/.claude/skills/security-audit/SKILL.md +226 -0
- package/.claude/skills/shared-references/advanced-debugging-techniques.md +186 -0
- package/.claude/skills/shared-references/code-quality-checklist.md +218 -0
- package/.claude/skills/shared-references/code-review-efficiency-guide.md +125 -0
- package/.claude/skills/shared-references/mcp-dependency-compatibility-protocol.md +276 -0
- package/.claude/skills/shared-references/skill-call-graph.md +230 -0
- package/.claude/skills/shared-references/skill-orchestration-protocol.md +281 -0
- package/.claude/skills/shared-references/subagent-dispatch-templates.md +199 -0
- package/.claude/skills/skill-expert-skills/LICENSE.txt +204 -0
- package/.claude/skills/skill-expert-skills/QUICK_NAVIGATION.md +374 -0
- package/.claude/skills/skill-expert-skills/SKILL.md +247 -0
- package/.claude/skills/skill-expert-skills/docs/_index.md +91 -0
- package/.claude/skills/skill-expert-skills/references/deep-research-methodology.md +389 -0
- package/.claude/skills/skill-expert-skills/references/docs-generation-workflow.md +398 -0
- package/.claude/skills/skill-expert-skills/references/domain-expertise-protocol.md +343 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge/_index.md +54 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge/backend-expertise.md +517 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge/bug-fixing-expertise.md +363 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge/code-review-expertise.md +392 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge/frontend-expertise.md +410 -0
- package/.claude/skills/skill-expert-skills/references/domain-knowledge-template.md +503 -0
- package/.claude/skills/skill-expert-skills/references/examples.md +782 -0
- package/.claude/skills/skill-expert-skills/references/integration-examples.md +655 -0
- package/.claude/skills/skill-expert-skills/references/knowledge-validation-checklist.md +246 -0
- package/.claude/skills/skill-expert-skills/references/latest-knowledge-acquisition.md +461 -0
- package/.claude/skills/skill-expert-skills/references/mcp-tools-guide.md +439 -0
- package/.claude/skills/skill-expert-skills/references/official-best-practices.md +616 -0
- package/.claude/skills/skill-expert-skills/references/patterns.md +218 -0
- package/.claude/skills/skill-expert-skills/references/plugin-skills-guide.md +432 -0
- package/.claude/skills/skill-expert-skills/references/requirement-elicitation-protocol.md +290 -0
- package/.claude/skills/skill-expert-skills/references/skill-creator-SKILL.md +353 -0
- package/.claude/skills/skill-expert-skills/references/skill-templates.md +583 -0
- package/.claude/skills/skill-expert-skills/references/skills-knowledge-base.md +561 -0
- package/.claude/skills/skill-expert-skills/references/tools-guide.md +379 -0
- package/.claude/skills/skill-expert-skills/references/troubleshooting.md +378 -0
- package/.claude/skills/skill-expert-skills/references/universality-guide.md +205 -0
- package/.claude/skills/skill-expert-skills/references/writing-style-guide.md +466 -0
- package/.claude/skills/skill-expert-skills/scripts/__pycache__/quick_validate.cpython-313.pyc +0 -0
- package/.claude/skills/skill-expert-skills/scripts/__pycache__/universal_validate.cpython-313.pyc +0 -0
- package/.claude/skills/skill-expert-skills/scripts/analyze_trigger.py +425 -0
- package/.claude/skills/skill-expert-skills/scripts/diff_with_official.py +188 -0
- package/.claude/skills/skill-expert-skills/scripts/init_skill.py +349 -0
- package/.claude/skills/skill-expert-skills/scripts/package_skill.py +156 -0
- package/.claude/skills/skill-expert-skills/scripts/quick_validate.py +493 -0
- package/.claude/skills/skill-expert-skills/scripts/requirements.txt +2 -0
- package/.claude/skills/skill-expert-skills/scripts/universal_validate.py +182 -0
- package/.claude/skills/skill-expert-skills/scripts/upgrade_skill.py +431 -0
- package/.claude/skills/subagent-driven-development/SKILL.md +268 -0
- package/.claude/skills/test-driven-development/SKILL.md +246 -0
- package/.claude/skills/test-driven-development/references/testing-anti-patterns.md +192 -0
- package/.claude/skills/using-git-worktrees/SKILL.md +266 -0
- package/.claude/skills/using-skillstack/SKILL.md +127 -0
- package/.claude/skills/vercel-deploy/SKILL.md +166 -0
- package/.claude/skills/vercel-deploy/scripts/deploy.sh +249 -0
- package/.claude/skills/verification-before-completion/SKILL.md +305 -0
- package/.claude/skills/writing-plans/SKILL.md +259 -0
- package/README.md +69 -0
- package/bin/cli.js +468 -0
- package/lib/init.js +333 -0
- package/package.json +29 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
# Dependency Management & Code Integrity Protocol
|
|
2
|
+
|
|
3
|
+
> **核心原则**: 新增依赖必须安装 → 依赖文件必须更新 → 完成后必须验证 → 验证包括兼容性和文件完整性
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🔴 依赖管理门禁 (Dependency Management Gate)
|
|
8
|
+
|
|
9
|
+
### 触发条件
|
|
10
|
+
|
|
11
|
+
当代码中出现以下情况时,**必须执行依赖管理流程**:
|
|
12
|
+
|
|
13
|
+
| 触发条件 | 示例 |
|
|
14
|
+
|----------|------|
|
|
15
|
+
| 新增 import/require 语句 | `import { Collapsible } from "@radix-ui/react-collapsible"` |
|
|
16
|
+
| 安装新的组件库/UI 框架 | shadcn/ui, Ant Design, Material UI |
|
|
17
|
+
| 引入新的工具函数库 | lodash, date-fns, zod |
|
|
18
|
+
| 使用新的后端框架/库 | FastAPI, LangChain, Pydantic |
|
|
19
|
+
| 调用新的第三方 API SDK | Stripe, OpenAI, AWS SDK |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 依赖检测规则 (通用)
|
|
24
|
+
|
|
25
|
+
### Step 1: 识别依赖类型
|
|
26
|
+
|
|
27
|
+
| 项目类型 | 依赖文件 | 安装命令 |
|
|
28
|
+
|----------|---------|----------|
|
|
29
|
+
| Node.js/前端 | `package.json` | `npm install <pkg>` / `yarn add <pkg>` / `pnpm add <pkg>` |
|
|
30
|
+
| Python | `requirements.txt` / `pyproject.toml` | `pip install <pkg>` / `uv add <pkg>` |
|
|
31
|
+
| Go | `go.mod` | `go get <pkg>` |
|
|
32
|
+
| Rust | `Cargo.toml` | `cargo add <pkg>` |
|
|
33
|
+
| Java/Kotlin | `pom.xml` / `build.gradle` | Maven/Gradle 手动添加 |
|
|
34
|
+
|
|
35
|
+
### Step 2: 检查依赖是否已存在
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Node.js - 检查 package.json
|
|
39
|
+
grep "<package-name>" package.json
|
|
40
|
+
|
|
41
|
+
# Python - 检查 requirements.txt
|
|
42
|
+
grep "<package-name>" requirements.txt
|
|
43
|
+
|
|
44
|
+
# 通用 - 检查 node_modules / venv
|
|
45
|
+
ls node_modules/<package-name> 2>/dev/null || echo "Not installed"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 3: 安装缺失依赖
|
|
49
|
+
|
|
50
|
+
**🔴 必须在代码修改前或立即之后安装依赖!**
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Node.js
|
|
54
|
+
npm install <package-name>
|
|
55
|
+
# 或指定版本
|
|
56
|
+
npm install <package-name>@<version>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### 🔴 Python 虚拟环境强制要求 (NON-NEGOTIABLE)
|
|
60
|
+
|
|
61
|
+
**Python 项目的所有依赖操作必须在虚拟环境中进行!**
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Step 1: 检查虚拟环境是否存在
|
|
65
|
+
ls venv/ 2>/dev/null || ls .venv/ 2>/dev/null || echo "虚拟环境不存在"
|
|
66
|
+
|
|
67
|
+
# Step 2: 如果不存在,创建虚拟环境
|
|
68
|
+
python -m venv venv
|
|
69
|
+
|
|
70
|
+
# Step 3: 激活虚拟环境 (必须!)
|
|
71
|
+
# Windows CMD
|
|
72
|
+
venv\Scripts\activate
|
|
73
|
+
# Windows PowerShell
|
|
74
|
+
.\venv\Scripts\Activate.ps1
|
|
75
|
+
# Linux/Mac
|
|
76
|
+
source venv/bin/activate
|
|
77
|
+
|
|
78
|
+
# Step 4: 在虚拟环境中安装依赖
|
|
79
|
+
pip install <package-name>
|
|
80
|
+
# 或指定版本
|
|
81
|
+
pip install <package-name>==<version>
|
|
82
|
+
|
|
83
|
+
# Step 5: 更新 requirements.txt
|
|
84
|
+
pip freeze > requirements.txt
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**❌ 禁止事项**:
|
|
88
|
+
- 禁止在全局 Python 环境中安装项目依赖
|
|
89
|
+
- 禁止不激活虚拟环境就执行 `pip install`
|
|
90
|
+
- 禁止使用系统 Python 运行项目脚本
|
|
91
|
+
|
|
92
|
+
**✅ 验证虚拟环境激活**:
|
|
93
|
+
```bash
|
|
94
|
+
# 检查 which/where python 指向虚拟环境
|
|
95
|
+
which python # Linux/Mac: 应显示 .../venv/bin/python
|
|
96
|
+
where python # Windows: 应显示 ...\venv\Scripts\python.exe
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 4: 更新依赖文件
|
|
100
|
+
|
|
101
|
+
**🔴 安装后必须验证依赖文件已更新!**
|
|
102
|
+
|
|
103
|
+
| 项目类型 | 验证方式 |
|
|
104
|
+
|----------|---------|
|
|
105
|
+
| Node.js | 检查 `package.json` 和 `package-lock.json` 是否包含新依赖 |
|
|
106
|
+
| Python | 执行 `pip freeze > requirements.txt` 或手动添加到 requirements.txt |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 🔴 代码文件完整性检查 (File Integrity Check)
|
|
111
|
+
|
|
112
|
+
### 触发条件
|
|
113
|
+
|
|
114
|
+
当新增功能涉及以下情况时,**必须执行文件完整性检查**:
|
|
115
|
+
|
|
116
|
+
| 场景 | 检查内容 |
|
|
117
|
+
|------|----------|
|
|
118
|
+
| 使用 UI 组件库 | 组件文件是否存在于 `components/ui/` |
|
|
119
|
+
| 引用工具函数 | 工具函数文件是否存在于 `lib/` 或 `utils/` |
|
|
120
|
+
| 导入类型定义 | 类型文件是否存在于 `types/` |
|
|
121
|
+
| 调用 API 服务 | 服务文件是否存在于 `services/` 或 `api/` |
|
|
122
|
+
|
|
123
|
+
### 检查流程
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
代码中有新 import
|
|
127
|
+
↓
|
|
128
|
+
┌──────────────────────────────────────────────────────┐
|
|
129
|
+
│ Step 1: 解析 import 路径 │
|
|
130
|
+
│ ─────────────────────────────────────────────────────│
|
|
131
|
+
│ 相对路径? → 检查文件是否存在 │
|
|
132
|
+
│ 别名路径 (@/)? → 解析别名后检查文件是否存在 │
|
|
133
|
+
│ 包路径? → 检查 node_modules 或 site-packages │
|
|
134
|
+
└──────────────────────────────────────────────────────┘
|
|
135
|
+
↓
|
|
136
|
+
┌──────────────────────────────────────────────────────┐
|
|
137
|
+
│ Step 2: 文件不存在时的处理 │
|
|
138
|
+
│ ─────────────────────────────────────────────────────│
|
|
139
|
+
│ UI 组件? → 创建组件文件 (shadcn/ui 风格) │
|
|
140
|
+
│ 工具函数? → 创建工具函数文件 │
|
|
141
|
+
│ 第三方包? → 安装依赖 │
|
|
142
|
+
└──────────────────────────────────────────────────────┘
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 常见缺失文件场景
|
|
146
|
+
|
|
147
|
+
| 场景 | 缺失类型 | 解决方案 |
|
|
148
|
+
|------|---------|----------|
|
|
149
|
+
| shadcn/ui 组件 | `components/ui/xxx.tsx` | 使用 `npx shadcn@latest add xxx` 或手动创建 |
|
|
150
|
+
| Radix UI 原语 | npm 包未安装 | `npm install @radix-ui/react-xxx` |
|
|
151
|
+
| 自定义 Hook | `hooks/useXxx.ts` | 创建 Hook 文件 |
|
|
152
|
+
| API 服务 | `services/xxxService.ts` | 创建服务文件 |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 🔴 兼容性检查 (Compatibility Check)
|
|
157
|
+
|
|
158
|
+
### 版本兼容性矩阵
|
|
159
|
+
|
|
160
|
+
| 检查项 | 方法 | 风险等级 |
|
|
161
|
+
|--------|------|----------|
|
|
162
|
+
| **Peer Dependencies** | 检查 npm 警告信息 | 🔴 高 |
|
|
163
|
+
| **Node.js 版本** | 对比 `engines` 字段 | 🔴 高 |
|
|
164
|
+
| **TypeScript 版本** | 检查类型定义兼容性 | 🟡 中 |
|
|
165
|
+
| **React 版本** | 检查 Hooks/API 可用性 | 🔴 高 |
|
|
166
|
+
| **Python 版本** | 对比 `python_requires` | 🔴 高 |
|
|
167
|
+
| 🔴 **原生模块 (Electron/RN)** | 检查是否需要编译 | 🔴 高 |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## 🔴 原生模块选型指南 (Electron/React Native)
|
|
172
|
+
|
|
173
|
+
> **原则**: Electron/React Native 项目优先选择纯 JS 实现,避免原生模块编译问题
|
|
174
|
+
|
|
175
|
+
### 什么是原生模块?
|
|
176
|
+
|
|
177
|
+
原生模块 = 使用 C/C++/Rust 编写并编译为 `.node` 文件的 Node.js 模块
|
|
178
|
+
|
|
179
|
+
**识别方法**:
|
|
180
|
+
```bash
|
|
181
|
+
# 方法 1: 检查 .node 文件
|
|
182
|
+
ls node_modules/<pkg>/*.node
|
|
183
|
+
|
|
184
|
+
# 方法 2: 检查 binding.gyp
|
|
185
|
+
ls node_modules/<pkg>/binding.gyp
|
|
186
|
+
|
|
187
|
+
# 方法 3: npm info
|
|
188
|
+
npm info <pkg> | grep -i "native\|gyp\|c++"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 原生模块 vs 纯 JS 替代方案
|
|
192
|
+
|
|
193
|
+
| 功能领域 | ❌ 原生模块 (避免) | ✅ 纯 JS 替代 (推荐) |
|
|
194
|
+
|----------|-------------------|---------------------|
|
|
195
|
+
| **SQLite 数据库** | `better-sqlite3`, `sqlite3` | `sql.js` |
|
|
196
|
+
| **图片处理** | `sharp` | `jimp`, `pica` |
|
|
197
|
+
| **密码哈希** | `bcrypt` | `bcryptjs` |
|
|
198
|
+
| **SCSS 编译** | `node-sass` | `sass` (dart-sass) |
|
|
199
|
+
| **画布渲染** | `canvas` | HTML Canvas API |
|
|
200
|
+
| **文件监听** | `fsevents` | `chokidar` |
|
|
201
|
+
| **LevelDB** | `leveldown` | `level-js` |
|
|
202
|
+
|
|
203
|
+
### 选型决策流程
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
需要某个依赖
|
|
207
|
+
│
|
|
208
|
+
▼
|
|
209
|
+
┌─────────────────────────────────────────────────────┐
|
|
210
|
+
│ Step 1: 检查是否为 Electron/React Native 项目 │
|
|
211
|
+
└─────────────────────────────────────────────────────┘
|
|
212
|
+
│
|
|
213
|
+
▼ 是
|
|
214
|
+
┌─────────────────────────────────────────────────────┐
|
|
215
|
+
│ Step 2: 检查候选依赖是否为原生模块 │
|
|
216
|
+
│ → npm info <pkg> | grep -i "gyp\|native" │
|
|
217
|
+
└─────────────────────────────────────────────────────┘
|
|
218
|
+
│
|
|
219
|
+
▼ 是原生模块
|
|
220
|
+
┌─────────────────────────────────────────────────────┐
|
|
221
|
+
│ Step 3: 搜索纯 JS 替代方案 │
|
|
222
|
+
│ → 搜索 "<功能> pure javascript" 或 "<功能> wasm" │
|
|
223
|
+
└─────────────────────────────────────────────────────┘
|
|
224
|
+
│
|
|
225
|
+
├─ 有替代 → ✅ 使用纯 JS 版本
|
|
226
|
+
│
|
|
227
|
+
└─ 无替代 → 配置 electron-rebuild + asarUnpack
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### 必须使用原生模块时的配置
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
// package.json
|
|
234
|
+
{
|
|
235
|
+
"scripts": {
|
|
236
|
+
"postinstall": "electron-rebuild"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// electron-builder.json5
|
|
241
|
+
{
|
|
242
|
+
"asarUnpack": ["**/node_modules/<native-pkg>/**"]
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// vite.config.ts
|
|
246
|
+
{
|
|
247
|
+
rollupOptions: {
|
|
248
|
+
external: ['<native-pkg>']
|
|
249
|
+
},
|
|
250
|
+
optimizeDeps: {
|
|
251
|
+
exclude: ['<native-pkg>']
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### 🔴 强制运行时验证
|
|
257
|
+
|
|
258
|
+
**安装任何依赖后,必须执行启动测试:**
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Electron 项目
|
|
262
|
+
npm run dev
|
|
263
|
+
# 确保无 "Cannot find module" 错误
|
|
264
|
+
# 确保无 "NODE_MODULE_VERSION mismatch" 错误
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### 兼容性检查命令
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Node.js - 检查 peer dependency 警告
|
|
271
|
+
npm ls 2>&1 | grep -i "peer dep"
|
|
272
|
+
|
|
273
|
+
# Node.js - 审计安全问题
|
|
274
|
+
npm audit
|
|
275
|
+
|
|
276
|
+
# Python - 检查依赖冲突
|
|
277
|
+
pip check
|
|
278
|
+
|
|
279
|
+
# Python - 查看依赖树
|
|
280
|
+
pip show <package-name>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### 常见兼容性问题处理
|
|
284
|
+
|
|
285
|
+
| 问题 | 症状 | 解决方案 |
|
|
286
|
+
|------|------|----------|
|
|
287
|
+
| Peer dependency 不满足 | npm 警告 | 安装兼容版本或使用 `--legacy-peer-deps` |
|
|
288
|
+
| TypeScript 类型错误 | 编译失败 | 安装 `@types/xxx` 或升级 TS 版本 |
|
|
289
|
+
| React 版本不匹配 | 运行时错误 | 检查组件库的 React 版本要求 |
|
|
290
|
+
| Python 版本不兼容 | ImportError | 检查库的 Python 版本要求 |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 任务完成验证清单 (Post-Task Verification)
|
|
295
|
+
|
|
296
|
+
**🔴 每个开发任务结束前,必须完成以下检查:**
|
|
297
|
+
|
|
298
|
+
### 依赖验证
|
|
299
|
+
|
|
300
|
+
- [ ] **依赖安装完成**: 所有新增依赖已安装到项目中
|
|
301
|
+
- [ ] **依赖文件更新**: `package.json` / `requirements.txt` 已包含新依赖
|
|
302
|
+
- [ ] **Lock 文件同步**: `package-lock.json` / `poetry.lock` 已更新
|
|
303
|
+
- [ ] **无兼容性警告**: `npm ls` / `pip check` 无报错
|
|
304
|
+
|
|
305
|
+
### 文件完整性验证
|
|
306
|
+
|
|
307
|
+
- [ ] **所有 import 可解析**: 无 "Cannot find module" / "ModuleNotFoundError"
|
|
308
|
+
- [ ] **组件文件存在**: UI 组件文件均存在于正确路径
|
|
309
|
+
- [ ] **类型定义完整**: 无 TypeScript 类型错误
|
|
310
|
+
|
|
311
|
+
### 运行时验证
|
|
312
|
+
|
|
313
|
+
- [ ] **开发服务器启动**: `npm run dev` / `python run.py` 无报错
|
|
314
|
+
- [ ] **无控制台错误**: 浏览器/终端无红色错误
|
|
315
|
+
- [ ] **核心功能正常**: 主要功能可正常使用
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## 验证命令速查
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# ===== Node.js 项目 =====
|
|
323
|
+
# 检查依赖安装
|
|
324
|
+
npm ls --depth=0
|
|
325
|
+
|
|
326
|
+
# 检查 peer dependency
|
|
327
|
+
npm ls 2>&1 | grep -i "peer\|missing\|invalid"
|
|
328
|
+
|
|
329
|
+
# 启动开发服务器验证
|
|
330
|
+
npm run dev
|
|
331
|
+
|
|
332
|
+
# ===== Python 项目 (🔴 必须在虚拟环境中!) =====
|
|
333
|
+
# Step 0: 检查虚拟环境是否存在
|
|
334
|
+
ls venv/ 2>/dev/null || ls .venv/ 2>/dev/null || echo "需要创建虚拟环境"
|
|
335
|
+
|
|
336
|
+
# Step 1: 创建虚拟环境 (如果不存在)
|
|
337
|
+
python -m venv venv
|
|
338
|
+
|
|
339
|
+
# Step 2: 激活虚拟环境 (🔴 必须!)
|
|
340
|
+
# Windows CMD
|
|
341
|
+
venv\Scripts\activate
|
|
342
|
+
# Windows PowerShell
|
|
343
|
+
.\venv\Scripts\Activate.ps1
|
|
344
|
+
# Linux/Mac
|
|
345
|
+
source venv/bin/activate
|
|
346
|
+
|
|
347
|
+
# Step 3: 验证虚拟环境已激活
|
|
348
|
+
which python # 应指向 venv/bin/python 或 venv\Scripts\python.exe
|
|
349
|
+
|
|
350
|
+
# Step 4: 安装依赖
|
|
351
|
+
pip install -r requirements.txt
|
|
352
|
+
|
|
353
|
+
# Step 5: 检查依赖安装
|
|
354
|
+
pip list | grep <package-name>
|
|
355
|
+
|
|
356
|
+
# Step 6: 检查依赖冲突
|
|
357
|
+
pip check
|
|
358
|
+
|
|
359
|
+
# Step 7: 导出依赖 (安装新包后)
|
|
360
|
+
pip freeze > requirements.txt
|
|
361
|
+
|
|
362
|
+
# Step 8: 运行项目 (使用虚拟环境 Python)
|
|
363
|
+
python run.py # 或 venv/bin/python run.py
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## 输出契约 (Dependency Gate Report)
|
|
369
|
+
|
|
370
|
+
**任务完成时,在 Output Contract 中添加:**
|
|
371
|
+
|
|
372
|
+
```markdown
|
|
373
|
+
## 依赖管理报告
|
|
374
|
+
|
|
375
|
+
### 新增依赖
|
|
376
|
+
| 包名 | 版本 | 用途 | 安装状态 |
|
|
377
|
+
|------|------|------|----------|
|
|
378
|
+
| @radix-ui/react-collapsible | ^1.0.0 | Collapsible 组件 | ✅ 已安装 |
|
|
379
|
+
|
|
380
|
+
### 文件完整性
|
|
381
|
+
| 文件 | 类型 | 状态 |
|
|
382
|
+
|------|------|------|
|
|
383
|
+
| components/ui/collapsible.tsx | UI 组件 | ✅ 已创建 |
|
|
384
|
+
|
|
385
|
+
### 验证结果
|
|
386
|
+
- [x] 依赖安装完成
|
|
387
|
+
- [x] 依赖文件更新
|
|
388
|
+
- [x] 无兼容性警告
|
|
389
|
+
- [x] 开发服务器启动正常
|
|
390
|
+
```
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# Development Phases Guide
|
|
2
|
+
|
|
3
|
+
> Incremental delivery: Complete, test, and integrate each phase before moving on.
|
|
4
|
+
|
|
5
|
+
## Phase Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ DEVELOPMENT PHASES │
|
|
10
|
+
├────────────────────────────────────────────────────────────┤
|
|
11
|
+
│ │
|
|
12
|
+
│ Phase 1: Requirements ─────► Approved requirements │
|
|
13
|
+
│ │ │
|
|
14
|
+
│ ▼ │
|
|
15
|
+
│ Phase 2: API Contract ─────► Swagger/OpenAPI spec │
|
|
16
|
+
│ │ │
|
|
17
|
+
│ ▼ │
|
|
18
|
+
│ Phase 3: Backend Dev ─────► Working APIs + tests │
|
|
19
|
+
│ │ │
|
|
20
|
+
│ ▼ │
|
|
21
|
+
│ Phase 4: Frontend Dev ─────► UI with mocks │
|
|
22
|
+
│ │ │
|
|
23
|
+
│ ▼ │
|
|
24
|
+
│ Phase 5: Integration ─────► Real API integration │
|
|
25
|
+
│ │ │
|
|
26
|
+
│ ▼ │
|
|
27
|
+
│ Phase 6: Polish ─────► Edge cases + UX │
|
|
28
|
+
│ │ │
|
|
29
|
+
│ ▼ │
|
|
30
|
+
│ Phase 7: Testing ─────► E2E + acceptance │
|
|
31
|
+
│ │
|
|
32
|
+
│ ⚠️ IMPORTANT: Test after EACH phase, not at the end! │
|
|
33
|
+
└────────────────────────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Phase 1: Requirements Clarification
|
|
39
|
+
|
|
40
|
+
### Input
|
|
41
|
+
- User request / feature idea
|
|
42
|
+
|
|
43
|
+
### Activities
|
|
44
|
+
1. Ask clarifying questions
|
|
45
|
+
2. Define scope and boundaries
|
|
46
|
+
3. Identify user personas
|
|
47
|
+
4. Document acceptance criteria
|
|
48
|
+
5. Get user approval
|
|
49
|
+
|
|
50
|
+
### Output
|
|
51
|
+
- Approved requirement document
|
|
52
|
+
|
|
53
|
+
### Gate Criteria
|
|
54
|
+
- [ ] User has confirmed understanding
|
|
55
|
+
- [ ] Scope is clear and bounded
|
|
56
|
+
- [ ] Success criteria defined
|
|
57
|
+
- [ ] Edge cases identified
|
|
58
|
+
|
|
59
|
+
### If Needed
|
|
60
|
+
→ Invoke `product-requirements` skill for formal PRD
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Phase 2: API Contract Definition
|
|
65
|
+
|
|
66
|
+
### Input
|
|
67
|
+
- Approved requirements
|
|
68
|
+
|
|
69
|
+
### Activities
|
|
70
|
+
1. Design API endpoints
|
|
71
|
+
2. Define request/response schemas
|
|
72
|
+
3. Document error responses
|
|
73
|
+
4. Write OpenAPI/Swagger spec
|
|
74
|
+
5. Review with stakeholders
|
|
75
|
+
|
|
76
|
+
### Output
|
|
77
|
+
- Complete OpenAPI specification
|
|
78
|
+
- Swagger UI accessible
|
|
79
|
+
|
|
80
|
+
### Gate Criteria
|
|
81
|
+
- [ ] All endpoints documented
|
|
82
|
+
- [ ] Schemas are complete
|
|
83
|
+
- [ ] Error responses defined
|
|
84
|
+
- [ ] Frontend team approved
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Phase 3: Backend Development
|
|
89
|
+
|
|
90
|
+
### Sub-Phases
|
|
91
|
+
|
|
92
|
+
#### 3A: Database Layer
|
|
93
|
+
- Schema design
|
|
94
|
+
- Migrations
|
|
95
|
+
- Seed data
|
|
96
|
+
|
|
97
|
+
**Test**: Migrations run successfully
|
|
98
|
+
|
|
99
|
+
#### 3B: API Layer
|
|
100
|
+
- Route definitions
|
|
101
|
+
- Request validation
|
|
102
|
+
- Response formatting
|
|
103
|
+
|
|
104
|
+
**Test**: Swagger UI shows endpoints
|
|
105
|
+
|
|
106
|
+
#### 3C: Business Logic
|
|
107
|
+
- Service layer
|
|
108
|
+
- Business rules
|
|
109
|
+
- Data processing
|
|
110
|
+
|
|
111
|
+
**Test**: Unit tests pass
|
|
112
|
+
|
|
113
|
+
#### 3D: Integration
|
|
114
|
+
- Connect all layers
|
|
115
|
+
- API tests
|
|
116
|
+
|
|
117
|
+
**Test**: Integration tests pass
|
|
118
|
+
|
|
119
|
+
### Output
|
|
120
|
+
- Working API endpoints
|
|
121
|
+
- Swagger documentation live
|
|
122
|
+
- All tests passing
|
|
123
|
+
|
|
124
|
+
### Gate Criteria
|
|
125
|
+
- [ ] All endpoints implemented
|
|
126
|
+
- [ ] Unit tests pass (>80% coverage)
|
|
127
|
+
- [ ] Integration tests pass
|
|
128
|
+
- [ ] Swagger UI works
|
|
129
|
+
- [ ] No security vulnerabilities
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Phase 4: Frontend Development
|
|
134
|
+
|
|
135
|
+
### Sub-Phases
|
|
136
|
+
|
|
137
|
+
#### 4A: Component Structure
|
|
138
|
+
- Create component files
|
|
139
|
+
- Define props/types
|
|
140
|
+
- Basic rendering
|
|
141
|
+
|
|
142
|
+
**Test**: Components render without errors
|
|
143
|
+
|
|
144
|
+
#### 4B: Mock API Integration
|
|
145
|
+
- Create mock data
|
|
146
|
+
- Connect to mock API
|
|
147
|
+
- Data flows correctly
|
|
148
|
+
|
|
149
|
+
**Test**: Data displays from mocks
|
|
150
|
+
|
|
151
|
+
#### 4C: UI Implementation
|
|
152
|
+
- Styling
|
|
153
|
+
- Layout
|
|
154
|
+
- Responsiveness
|
|
155
|
+
|
|
156
|
+
**Test**: Visual review passes
|
|
157
|
+
|
|
158
|
+
→ If design needed: Invoke `frontend-design` or `canvas-design` skill
|
|
159
|
+
|
|
160
|
+
#### 4D: Interactions
|
|
161
|
+
- Event handlers
|
|
162
|
+
- State management
|
|
163
|
+
- User flows
|
|
164
|
+
|
|
165
|
+
**Test**: All interactions work
|
|
166
|
+
|
|
167
|
+
### Output
|
|
168
|
+
- Complete UI with mock data
|
|
169
|
+
- All states implemented
|
|
170
|
+
- Responsive design
|
|
171
|
+
|
|
172
|
+
### Gate Criteria
|
|
173
|
+
- [ ] All components render
|
|
174
|
+
- [ ] Mock data displays
|
|
175
|
+
- [ ] All interactions work
|
|
176
|
+
- [ ] Responsive on all breakpoints
|
|
177
|
+
- [ ] No console errors
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Phase 5: Frontend-Backend Integration
|
|
182
|
+
|
|
183
|
+
### Activities
|
|
184
|
+
1. Replace mock with real API calls
|
|
185
|
+
2. Verify data contract matches
|
|
186
|
+
3. Test all endpoints
|
|
187
|
+
4. Handle loading states
|
|
188
|
+
5. Handle error states
|
|
189
|
+
|
|
190
|
+
### Common Issues
|
|
191
|
+
| Issue | Solution |
|
|
192
|
+
|-------|----------|
|
|
193
|
+
| Field name mismatch | Update frontend to match backend |
|
|
194
|
+
| Missing error handling | Add try-catch, error UI |
|
|
195
|
+
| Loading not shown | Add loading state |
|
|
196
|
+
| Auth issues | Verify token handling |
|
|
197
|
+
|
|
198
|
+
### Output
|
|
199
|
+
- Fully integrated application
|
|
200
|
+
- Real data flowing
|
|
201
|
+
|
|
202
|
+
### Gate Criteria
|
|
203
|
+
- [ ] All API calls work
|
|
204
|
+
- [ ] Data matches between FE/BE
|
|
205
|
+
- [ ] Loading states work
|
|
206
|
+
- [ ] Error states work
|
|
207
|
+
- [ ] Auth flows work
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Phase 6: Polish & Edge Cases
|
|
212
|
+
|
|
213
|
+
### Activities
|
|
214
|
+
1. Handle edge cases
|
|
215
|
+
2. Improve UX
|
|
216
|
+
3. Add animations
|
|
217
|
+
4. Optimize performance
|
|
218
|
+
5. Add analytics
|
|
219
|
+
|
|
220
|
+
### Edge Cases to Test
|
|
221
|
+
- Empty states
|
|
222
|
+
- Maximum data
|
|
223
|
+
- Network errors
|
|
224
|
+
- Session timeout
|
|
225
|
+
- Concurrent actions
|
|
226
|
+
- Browser back button
|
|
227
|
+
- Refresh behavior
|
|
228
|
+
|
|
229
|
+
### Output
|
|
230
|
+
- Production-ready feature
|
|
231
|
+
- All edge cases handled
|
|
232
|
+
|
|
233
|
+
### Gate Criteria
|
|
234
|
+
- [ ] All edge cases handled
|
|
235
|
+
- [ ] Performance acceptable
|
|
236
|
+
- [ ] UX smooth
|
|
237
|
+
- [ ] Analytics tracking
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Phase 7: Final Testing
|
|
242
|
+
|
|
243
|
+
### Activities
|
|
244
|
+
1. End-to-end tests
|
|
245
|
+
2. Cross-browser testing
|
|
246
|
+
3. Accessibility audit
|
|
247
|
+
4. Security review
|
|
248
|
+
5. Performance testing
|
|
249
|
+
|
|
250
|
+
### Test Checklist
|
|
251
|
+
|
|
252
|
+
#### Functional
|
|
253
|
+
- [ ] All user flows work
|
|
254
|
+
- [ ] All CRUD operations work
|
|
255
|
+
- [ ] Validation works
|
|
256
|
+
- [ ] Error handling works
|
|
257
|
+
|
|
258
|
+
#### Non-Functional
|
|
259
|
+
- [ ] Performance acceptable
|
|
260
|
+
- [ ] Accessible (WCAG AA)
|
|
261
|
+
- [ ] Secure (no vulnerabilities)
|
|
262
|
+
- [ ] Cross-browser works
|
|
263
|
+
|
|
264
|
+
### Output
|
|
265
|
+
- Verified, production-ready feature
|
|
266
|
+
|
|
267
|
+
### Gate Criteria
|
|
268
|
+
- [ ] All tests pass
|
|
269
|
+
- [ ] No critical bugs
|
|
270
|
+
- [ ] Ready for deployment
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Bug Handling During Development
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
┌─────────────────────────────────────┐
|
|
278
|
+
│ Bug Found During Development │
|
|
279
|
+
├─────────────────────────────────────┤
|
|
280
|
+
│ │
|
|
281
|
+
│ 1. STOP current task │
|
|
282
|
+
│ 2. Document the bug │
|
|
283
|
+
│ 3. Assess severity │
|
|
284
|
+
│ │ │
|
|
285
|
+
│ ├─► Minor: Fix inline │
|
|
286
|
+
│ │ │
|
|
287
|
+
│ └─► Complex: Invoke bug-fixing │
|
|
288
|
+
│ │
|
|
289
|
+
│ 4. Verify fix │
|
|
290
|
+
│ 5. Resume development │
|
|
291
|
+
│ │
|
|
292
|
+
│ ❌ NEVER: Ignore and continue │
|
|
293
|
+
│ ❌ NEVER: "Fix later" pile-up │
|
|
294
|
+
└─────────────────────────────────────┘
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Phase Gate Template
|
|
300
|
+
|
|
301
|
+
```markdown
|
|
302
|
+
## Phase [X] Gate Review
|
|
303
|
+
|
|
304
|
+
### Completed Tasks
|
|
305
|
+
| Task | Status | Notes |
|
|
306
|
+
|------|--------|-------|
|
|
307
|
+
| T1 | ✅ | |
|
|
308
|
+
| T2 | ✅ | |
|
|
309
|
+
|
|
310
|
+
### Tests Run
|
|
311
|
+
| Test Type | Result | Coverage |
|
|
312
|
+
|-----------|--------|----------|
|
|
313
|
+
| Unit | ✅ Pass | 85% |
|
|
314
|
+
| Integration | ✅ Pass | |
|
|
315
|
+
| Manual | ✅ Pass | |
|
|
316
|
+
|
|
317
|
+
### Issues Found
|
|
318
|
+
| Issue | Severity | Resolution |
|
|
319
|
+
|-------|----------|------------|
|
|
320
|
+
| None | - | - |
|
|
321
|
+
|
|
322
|
+
### Checklist
|
|
323
|
+
- [ ] All tasks complete
|
|
324
|
+
- [ ] All tests pass
|
|
325
|
+
- [ ] No console errors
|
|
326
|
+
- [ ] Code reviewed
|
|
327
|
+
- [ ] Documentation updated
|
|
328
|
+
|
|
329
|
+
### Decision
|
|
330
|
+
- [ ] ✅ PASS - Proceed to next phase
|
|
331
|
+
- [ ] ❌ FAIL - Fix issues first
|
|
332
|
+
```
|
|
333
|
+
|