@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,88 @@
|
|
|
1
|
+
# Bug Records - Project-Specific Bug Documentation
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Record all bugs fixed in the current project with root cause and fix method only.
|
|
4
|
+
> **Update Rule**: MANDATORY update after every bug fix. If previous fix was incomplete, update the record.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Record Template
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
### [BUG-XXX] Brief Description
|
|
12
|
+
**Date**: YYYY-MM-DD
|
|
13
|
+
**Severity**: P0/P1/P2
|
|
14
|
+
|
|
15
|
+
**Root Cause**:
|
|
16
|
+
[1-2 sentences explaining WHY the bug occurred]
|
|
17
|
+
|
|
18
|
+
**Fix Method**:
|
|
19
|
+
[Concise description of HOW the bug was fixed]
|
|
20
|
+
|
|
21
|
+
**Files Modified**:
|
|
22
|
+
- `path/to/file1.ts`
|
|
23
|
+
- `path/to/file2.ts`
|
|
24
|
+
|
|
25
|
+
**Environment Impact**:
|
|
26
|
+
- [ ] Development
|
|
27
|
+
- [ ] Staging
|
|
28
|
+
- [ ] Production
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Bug Records
|
|
34
|
+
|
|
35
|
+
<!-- Add new records below this line, newest first -->
|
|
36
|
+
|
|
37
|
+
### [BUG-001] Example: Environment Configuration Mismatch
|
|
38
|
+
**Date**: 2024-XX-XX
|
|
39
|
+
**Severity**: P1
|
|
40
|
+
|
|
41
|
+
**Root Cause**:
|
|
42
|
+
Bug fix only modified production `.env` file, but development mode uses `.env.development` which was not updated.
|
|
43
|
+
|
|
44
|
+
**Fix Method**:
|
|
45
|
+
1. Identified all environment files: `.env`, `.env.development`, `.env.production`, `.env.local`
|
|
46
|
+
2. Applied the same configuration change to ALL relevant environment files
|
|
47
|
+
3. Verified startup in both dev and prod modes
|
|
48
|
+
|
|
49
|
+
**Files Modified**:
|
|
50
|
+
- `.env`
|
|
51
|
+
- `.env.development`
|
|
52
|
+
- `.env.production`
|
|
53
|
+
|
|
54
|
+
**Environment Impact**:
|
|
55
|
+
- [x] Development
|
|
56
|
+
- [ ] Staging
|
|
57
|
+
- [x] Production
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Quick Reference: Common Root Causes
|
|
62
|
+
|
|
63
|
+
| Category | Root Cause Pattern | Prevention |
|
|
64
|
+
|----------|-------------------|------------|
|
|
65
|
+
| **Environment** | Config only in one env file | Check ALL env files |
|
|
66
|
+
| **Import** | Wrong import path/syntax | Verify module resolution |
|
|
67
|
+
| **State** | Race condition/stale state | Add proper synchronization |
|
|
68
|
+
| **Type** | Type mismatch/null check | Enable strict TypeScript |
|
|
69
|
+
| **API** | Contract mismatch | Verify request/response schema |
|
|
70
|
+
| **Dependency** | Version incompatibility | Lock versions, test upgrades |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Statistics
|
|
75
|
+
|
|
76
|
+
| Month | Total Bugs | P0 | P1 | P2 | Most Common Category |
|
|
77
|
+
|-------|------------|----|----|----|--------------------|
|
|
78
|
+
| YYYY-MM | 0 | 0 | 0 | 0 | - |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Update Checklist
|
|
83
|
+
|
|
84
|
+
After fixing a bug, ensure:
|
|
85
|
+
- [ ] New record added with root cause and fix method
|
|
86
|
+
- [ ] Previous incomplete fix records updated if applicable
|
|
87
|
+
- [ ] Environment impact correctly marked
|
|
88
|
+
- [ ] `bug-fixing-guide.md` updated if this is a new pattern
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Post-fix Code Review Gate (Bug Fixes)
|
|
2
|
+
|
|
3
|
+
The goal of the code review gate is to prevent “fixed the symptom, introduced a new bug” outcomes.
|
|
4
|
+
This checklist is optimized for bug-fix PRs/patches: small changes, high confidence.
|
|
5
|
+
|
|
6
|
+
## When to run
|
|
7
|
+
|
|
8
|
+
Run this **after** your verification steps (tests/lint/build) pass, but **before** declaring the bug “done”.
|
|
9
|
+
|
|
10
|
+
If the review finds issues, update your scope/impact lists and iterate the fix loop.
|
|
11
|
+
|
|
12
|
+
## Review checklist (bug-fix focused)
|
|
13
|
+
|
|
14
|
+
### 1) Correctness & edge cases
|
|
15
|
+
|
|
16
|
+
- Does the fix address the **root cause**, not only the symptom?
|
|
17
|
+
- Are boundary cases handled? (empty inputs, missing data, nulls, timeouts, retries)
|
|
18
|
+
- Are error messages actionable (for users and for operators)?
|
|
19
|
+
- Is behavior deterministic where it should be (no accidental randomness)?
|
|
20
|
+
|
|
21
|
+
### 2) Contract compatibility (very common regression source)
|
|
22
|
+
|
|
23
|
+
- API shape: no accidental breaking changes (renamed fields, removed keys, changed types)
|
|
24
|
+
- Defaults: distinguish **omitted** vs **null** vs **empty** consistently
|
|
25
|
+
- Backward compatibility: legacy fallbacks do not override explicit new settings
|
|
26
|
+
- Sorting/pagination/filtering: unchanged unless explicitly part of the fix
|
|
27
|
+
|
|
28
|
+
### 3) Reference safety (blast radius control)
|
|
29
|
+
|
|
30
|
+
- Any changed function/class is referenced elsewhere: did you update or preserve callers?
|
|
31
|
+
- Any shared config/mapping affects multiple consumers: did you validate list + detail + selection surfaces?
|
|
32
|
+
- Any stringly-typed identifiers (model IDs, URLs, enum values): are they validated and tested?
|
|
33
|
+
|
|
34
|
+
Tip: if you changed a mapping or URL builder, add a unit test that locks the behavior.
|
|
35
|
+
|
|
36
|
+
### 4) Security & privacy
|
|
37
|
+
|
|
38
|
+
- No secrets in logs, errors, or diffs
|
|
39
|
+
- Authorization/permissions still enforced on all paths (including new fallbacks)
|
|
40
|
+
- Avoid widening network access implicitly (new external calls, proxies, open redirects)
|
|
41
|
+
|
|
42
|
+
### 5) Performance & failure modes
|
|
43
|
+
|
|
44
|
+
- No unnecessary N+1 behavior (queries, API calls, file reads) introduced
|
|
45
|
+
- Timeouts are explicit; retries are bounded
|
|
46
|
+
- Caching/invalidation remains correct (no stale reads, no cache poisoning)
|
|
47
|
+
- Background tasks do not accidentally spawn unbounded work
|
|
48
|
+
|
|
49
|
+
### 6) Maintainability & clarity
|
|
50
|
+
|
|
51
|
+
- Minimal change: no unrelated refactor, no style-only churn
|
|
52
|
+
- Names and comments clarify intent (especially around fallbacks and edge cases)
|
|
53
|
+
- Configuration-driven behavior is documented where users will find it
|
|
54
|
+
|
|
55
|
+
## Review output template (copy/paste)
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## Code Review Gate
|
|
59
|
+
- Scope reviewed:
|
|
60
|
+
- Correctness/edge cases:
|
|
61
|
+
- Contract compatibility:
|
|
62
|
+
- Reference safety:
|
|
63
|
+
- Security/privacy:
|
|
64
|
+
- Performance/failure modes:
|
|
65
|
+
- Maintainability:
|
|
66
|
+
- Findings:
|
|
67
|
+
- Fixed in this patch:
|
|
68
|
+
- Follow-ups (if any):
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Iterate rule
|
|
72
|
+
|
|
73
|
+
If the review finds issues, do not “paper over” them. Update:
|
|
74
|
+
|
|
75
|
+
- Scope discovery summary (what else is impacted)
|
|
76
|
+
- Impact analysis (layers 0–5)
|
|
77
|
+
- Verification matrix (add a regression check for the newly discovered risk)
|
|
78
|
+
|
|
79
|
+
Then repeat the fix loop.
|
|
80
|
+
|
|
81
|
+
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Common Bug Patterns
|
|
2
|
+
|
|
3
|
+
Quick reference for frequently encountered bug types.
|
|
4
|
+
|
|
5
|
+
## API/Library Changes
|
|
6
|
+
|
|
7
|
+
| Symptom | Cause | Investigation |
|
|
8
|
+
|---------|-------|---------------|
|
|
9
|
+
| `unexpected argument` | API signature changed | Check library changelog |
|
|
10
|
+
| `attribute not found` | Class/module restructured | Check import paths |
|
|
11
|
+
| `deprecated warning` | API will be removed | Find replacement API |
|
|
12
|
+
|
|
13
|
+
**Fix Approach**:
|
|
14
|
+
1. Check library version: `pip show package` or `npm list package`
|
|
15
|
+
2. Read changelog for breaking changes
|
|
16
|
+
3. Update code to new API
|
|
17
|
+
|
|
18
|
+
## Frontend-Backend Sync
|
|
19
|
+
|
|
20
|
+
| Symptom | Cause | Investigation |
|
|
21
|
+
|---------|-------|---------------|
|
|
22
|
+
| UI shows success, action failed | Not reading response status | Check response handling |
|
|
23
|
+
| Data not updating | Using wrong response field | Compare response schema |
|
|
24
|
+
| 401/403 errors | Auth token issue | Check token storage/sending |
|
|
25
|
+
|
|
26
|
+
**Fix Approach**:
|
|
27
|
+
1. Check network tab in browser devtools
|
|
28
|
+
2. Compare request/response with API schema
|
|
29
|
+
3. Ensure frontend uses actual response fields
|
|
30
|
+
|
|
31
|
+
## Database Issues
|
|
32
|
+
|
|
33
|
+
| Symptom | Cause | Investigation |
|
|
34
|
+
|---------|-------|---------------|
|
|
35
|
+
| `column not found` | Migration not applied | Check migration status |
|
|
36
|
+
| Constraint violation | Missing field/wrong type | Check ORM vs DB schema |
|
|
37
|
+
| Slow queries | Missing index | Run EXPLAIN ANALYZE |
|
|
38
|
+
|
|
39
|
+
**Fix Approach**:
|
|
40
|
+
1. Compare ORM model with actual DB schema
|
|
41
|
+
2. Create migration if needed
|
|
42
|
+
3. Apply migration and verify
|
|
43
|
+
|
|
44
|
+
## Configuration Issues
|
|
45
|
+
|
|
46
|
+
| Symptom | Cause | Investigation |
|
|
47
|
+
|---------|-------|---------------|
|
|
48
|
+
| Works locally, fails in prod | Missing env var | Check .env files |
|
|
49
|
+
| Feature not working | Feature flag disabled | Check config files |
|
|
50
|
+
| Wrong API endpoint | Hardcoded URL | Check for env variable usage |
|
|
51
|
+
|
|
52
|
+
**Fix Approach**:
|
|
53
|
+
1. List all env vars: `env | grep PREFIX`
|
|
54
|
+
2. Compare local vs production configs
|
|
55
|
+
3. Use environment variables, not hardcoded values
|
|
56
|
+
|
|
57
|
+
## State Management
|
|
58
|
+
|
|
59
|
+
| Symptom | Cause | Investigation |
|
|
60
|
+
|---------|-------|---------------|
|
|
61
|
+
| Stale data displayed | Cache not invalidated | Check cache logic |
|
|
62
|
+
| Inconsistent UI | State mutation | Check for direct state changes |
|
|
63
|
+
| Race conditions | Async timing issues | Check await/async usage |
|
|
64
|
+
|
|
65
|
+
**Fix Approach**:
|
|
66
|
+
1. Trace state updates through data flow
|
|
67
|
+
2. Ensure immutable state updates
|
|
68
|
+
3. Add proper loading/error states
|
|
69
|
+
|
|
70
|
+
## Integration Issues
|
|
71
|
+
|
|
72
|
+
| Symptom | Cause | Investigation |
|
|
73
|
+
|---------|-------|---------------|
|
|
74
|
+
| Field name mismatch | Frontend/backend contract differs | Compare schemas |
|
|
75
|
+
| Type mismatch | Serialization/parsing issue | Check type definitions |
|
|
76
|
+
| Missing data | Optional field not handled | Check null handling |
|
|
77
|
+
|
|
78
|
+
**Fix Approach**:
|
|
79
|
+
1. Define shared types/schemas
|
|
80
|
+
2. Generate types from API spec
|
|
81
|
+
3. Add proper null checks
|
|
82
|
+
|
|
83
|
+
## UI Positioning Issues (Popup/Tooltip/Menu)
|
|
84
|
+
|
|
85
|
+
| Symptom | Cause | Investigation |
|
|
86
|
+
|---------|-------|---------------|
|
|
87
|
+
| Popup clipped at bottom | No viewport boundary check | Check if position uses raw clientY |
|
|
88
|
+
| Menu hidden behind element | z-index or stacking context | Check z-index and parent overflow |
|
|
89
|
+
| Tooltip cut off at edge | No flip/boundary logic | Check positioning calculation |
|
|
90
|
+
| Dropdown scrolls with page | Using absolute instead of fixed | Check position strategy |
|
|
91
|
+
|
|
92
|
+
**Fix Approach**:
|
|
93
|
+
1. Use `getBoundingClientRect()` to get element dimensions
|
|
94
|
+
2. Compare with `window.innerHeight/innerWidth`
|
|
95
|
+
3. Flip direction or clamp position when near edges
|
|
96
|
+
4. Use `useLayoutEffect` for position adjustments (before paint)
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
// Standard boundary-aware positioning
|
|
100
|
+
useLayoutEffect(() => {
|
|
101
|
+
if (!ref.current) return;
|
|
102
|
+
const rect = ref.current.getBoundingClientRect();
|
|
103
|
+
const vh = window.innerHeight;
|
|
104
|
+
const vw = window.innerWidth;
|
|
105
|
+
|
|
106
|
+
// Flip if overflow
|
|
107
|
+
if (position.y + rect.height > vh - 10) {
|
|
108
|
+
setY(position.y - rect.height);
|
|
109
|
+
}
|
|
110
|
+
if (position.x + rect.width > vw - 10) {
|
|
111
|
+
setX(position.x - rect.width);
|
|
112
|
+
}
|
|
113
|
+
}, [position]);
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Detection**:
|
|
117
|
+
```bash
|
|
118
|
+
# Find popup components without boundary check
|
|
119
|
+
grep -rn "clientX\|clientY" --include="*.tsx" -B 2 -A 10 | grep -v "innerHeight\|innerWidth"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Similar Bug Search
|
|
125
|
+
|
|
126
|
+
After fixing any pattern above, search for similar occurrences:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Example: Find all hardcoded URLs
|
|
130
|
+
grep -rn "http://\|https://" --include="*.ts" --include="*.py" | grep -v "env\|config"
|
|
131
|
+
|
|
132
|
+
# Example: Find all direct state mutations
|
|
133
|
+
grep -rn "\.push(\|\.splice(\|delete " --include="*.ts" --include="*.tsx"
|
|
134
|
+
|
|
135
|
+
# Example: Find all missing await
|
|
136
|
+
grep -rn "async function" --include="*.ts" -A 5 | grep -v "await"
|
|
137
|
+
|
|
138
|
+
# Example: Find popup/menu without boundary detection
|
|
139
|
+
grep -rn "position: fixed\|position: absolute" --include="*.tsx" | grep -i "menu\|popup\|tooltip"
|
|
140
|
+
```
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# Complete Bug Fixing Workflow (完整工作流程)
|
|
2
|
+
|
|
3
|
+
本文档包含 bug-fixing 各阶段的详细操作指南。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Phase -1: Knowledge Base Query (MANDATORY)
|
|
8
|
+
|
|
9
|
+
**修复任何 Bug 前,必须先查询 bug-guide.md!**
|
|
10
|
+
|
|
11
|
+
### 查询流程
|
|
12
|
+
|
|
13
|
+
1. 读取 `references/bug-guide.md`
|
|
14
|
+
2. 搜索匹配的 Bug 模式:
|
|
15
|
+
- 按症状关键词搜索
|
|
16
|
+
- 按错误类型分类查找
|
|
17
|
+
- 按技术栈筛选
|
|
18
|
+
3. 如果找到匹配模式:
|
|
19
|
+
- 直接应用已知解决方案
|
|
20
|
+
- 跳过部分调查阶段 (可选)
|
|
21
|
+
- 标注:基于历史经验修复
|
|
22
|
+
4. 如果未找到匹配:
|
|
23
|
+
- 标注:新 Bug 模式,需完整调查
|
|
24
|
+
- 继续标准流程
|
|
25
|
+
|
|
26
|
+
### 匹配决策矩阵
|
|
27
|
+
|
|
28
|
+
| 匹配度 | 定义 | 处理方式 |
|
|
29
|
+
|--------|------|---------|
|
|
30
|
+
| 🟢 **高匹配** | 症状、根因、技术栈都匹配 | 直接应用修复策略,可跳过 RCA |
|
|
31
|
+
| 🟡 **中匹配** | 症状相似,但细节不同 | 参考策略,但需验证假设 |
|
|
32
|
+
| 🔴 **无匹配** | 找不到相关模式 | 完整调查,修复后必须更新知识库 |
|
|
33
|
+
|
|
34
|
+
### Phase -1 输出模板
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## 📚 Phase -1: 知识库查询结果
|
|
38
|
+
|
|
39
|
+
### 搜索关键词
|
|
40
|
+
- 症状: [用户描述的症状关键词]
|
|
41
|
+
- 错误类型: [如: 状态不同步, API 超时, 类型错误]
|
|
42
|
+
- 技术栈: [如: React, FastAPI, PostgreSQL]
|
|
43
|
+
|
|
44
|
+
### 匹配结果
|
|
45
|
+
| 匹配度 | 模式名称 | 相关性说明 |
|
|
46
|
+
|--------|---------|-----------|
|
|
47
|
+
| 🟢 高 | [Category X: Pattern Name] | 症状完全匹配 |
|
|
48
|
+
|
|
49
|
+
### 决策
|
|
50
|
+
- [ ] 应用已知解决方案
|
|
51
|
+
- [x] 参考已知模式,执行完整流程
|
|
52
|
+
- [ ] 新模式,执行完整流程 + Phase 6 知识沉淀
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Phase 0: Clarify & Triage
|
|
58
|
+
|
|
59
|
+
### 0.1 Quick Decision: Failure vs Noise
|
|
60
|
+
|
|
61
|
+
| Signal | Classification | Action |
|
|
62
|
+
|--------|----------------|--------|
|
|
63
|
+
| User flow fails, wrong output, security issue | **Failure (P0/P1)** | Full zero-regression workflow |
|
|
64
|
+
| Flow succeeds but console is noisy | **Noise (P2)** | Feature detection, fallback, log level |
|
|
65
|
+
|
|
66
|
+
If unclear, ask: **Final outcome?** (A) Fails (B) Succeeds but noisy (C) Succeeds but wrong
|
|
67
|
+
|
|
68
|
+
### 0.2 Entry Point Disambiguation
|
|
69
|
+
|
|
70
|
+
> **Which entry point?**
|
|
71
|
+
> (A) UI: page/route → button/menu → expected outcome
|
|
72
|
+
> (B) API: method + endpoint
|
|
73
|
+
> (C) Background: job/cron/task name
|
|
74
|
+
> (D) Not sure (share screenshot/video)
|
|
75
|
+
|
|
76
|
+
### 0.3 High-Information Question Templates
|
|
77
|
+
|
|
78
|
+
| User says | Ask (pick 1-2 only) |
|
|
79
|
+
|-----------|---------------------|
|
|
80
|
+
| "Works but console shows red errors" | (1) Final outcome? (A/B/C) (2) Which action triggers the first error? |
|
|
81
|
+
| "Fails when I click X" | (1) Exact UI path? (2) What is the expected output? |
|
|
82
|
+
| "Intermittent / flaky" | (1) Always vs intermittent? (2) Environment? (dev/staging/prod) |
|
|
83
|
+
| "Same log in multiple places" | (1) Which entry points show it? (2) Do ALL of them fail? |
|
|
84
|
+
|
|
85
|
+
### 0.4 Questioning Rules (NON-NEGOTIABLE)
|
|
86
|
+
|
|
87
|
+
- Ask **1-2 questions per round** (max)
|
|
88
|
+
- Prefer **multiple-choice** with "Other/Not sure" option
|
|
89
|
+
- **Do not ask user to confirm assumptions** — write them explicitly
|
|
90
|
+
- Request **evidence** (screenshot, log) instead of more guesses
|
|
91
|
+
|
|
92
|
+
### 0.5 Phase 0 Output Template
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
## Triage Summary
|
|
96
|
+
- Entry point:
|
|
97
|
+
- Final outcome: (Fail / Succeed but noisy / Succeed but wrong)
|
|
98
|
+
- Classification: (Failure / Noise)
|
|
99
|
+
- Severity: (P0 / P1 / P2) + why
|
|
100
|
+
- 🔄 Collaborating Skills: [from skill router table]
|
|
101
|
+
- 📚 Knowledge Base Match: [from Phase -1]
|
|
102
|
+
- Working hypothesis:
|
|
103
|
+
- Next step:
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Phase 4: Fix with Skill Delegation
|
|
109
|
+
|
|
110
|
+
### 4.1 识别修复需要的额外工作
|
|
111
|
+
|
|
112
|
+
| 修复需要 | 处理方式 |
|
|
113
|
+
|---------|---------|
|
|
114
|
+
| 仅修改现有代码 | 直接在 bug-fixing 上下文中修复 |
|
|
115
|
+
| 新增 API 接口 | 🔧 委托 `fullstack-developer` |
|
|
116
|
+
| 新增/修改前端组件 | 🔧 委托 `frontend-design` |
|
|
117
|
+
| 数据库 Schema 变更 | 🔧 委托 `database-migrations` |
|
|
118
|
+
| 数据修复 | 🔧 委托 `database-design` |
|
|
119
|
+
| 需要测试 | 🔧 委托 `unit-testing` / `webapp-testing` |
|
|
120
|
+
|
|
121
|
+
### 4.2 委托执行流程
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
修复需要额外工作
|
|
125
|
+
│
|
|
126
|
+
▼
|
|
127
|
+
Step 1: 输出委托通知 (Delegation Notice)
|
|
128
|
+
│ - 锚定主上下文 (Bug ID, 症状, 根因, 当前阶段)
|
|
129
|
+
│ - 明确委托范围 (✅ 做什么, ❌ 不做什么)
|
|
130
|
+
│ - 定义退出条件
|
|
131
|
+
│
|
|
132
|
+
▼
|
|
133
|
+
Step 2: 执行委托任务
|
|
134
|
+
│ - 加载目标技能规范
|
|
135
|
+
│ - 按最小范围执行
|
|
136
|
+
│ - 遵守约束 (不超出范围, 保持风格一致)
|
|
137
|
+
│
|
|
138
|
+
▼
|
|
139
|
+
Step 3: 退出检查
|
|
140
|
+
│ - 是否完成委托目标?
|
|
141
|
+
│ - 是否超出范围? (如超出, 停止并确认)
|
|
142
|
+
│ - 输出委托完成通知
|
|
143
|
+
│
|
|
144
|
+
▼
|
|
145
|
+
Step 4: 返回主上下文
|
|
146
|
+
│ - 继续 bug-fixing 流程
|
|
147
|
+
│ - 集成委托任务产出
|
|
148
|
+
│ - 验证修复效果
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 4.3 委托范围约束
|
|
152
|
+
|
|
153
|
+
| 委托技能 | ✅ 允许 | ❌ 禁止 |
|
|
154
|
+
|---------|--------|--------|
|
|
155
|
+
| `fullstack-developer` | 创建修复所需的最小 API | 重构其他 API、添加额外功能 |
|
|
156
|
+
| `frontend-design` | 修复/创建问题组件 | 重新设计整个页面、更换样式系统 |
|
|
157
|
+
| `database-migrations` | 修复所需的 Schema 变更 | 重构整个数据模型、优化无关表 |
|
|
158
|
+
| `unit-testing` | 添加修复相关的回归测试 | 重写整个测试套件 |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🔴 委托任务模板
|
|
163
|
+
|
|
164
|
+
### 进入委托任务时输出:
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
---
|
|
168
|
+
## 🔧 技能委托通知 (Skill Delegation Notice)
|
|
169
|
+
|
|
170
|
+
### 主上下文锚定 (Main Context Anchor)
|
|
171
|
+
- **Bug ID**: [BUG-XXX]
|
|
172
|
+
- **原始症状**: [用户报告的问题]
|
|
173
|
+
- **根因**: [已识别的根本原因]
|
|
174
|
+
- **当前阶段**: Phase 4.X - 修复实施
|
|
175
|
+
|
|
176
|
+
### 委托任务详情 (Delegation Details)
|
|
177
|
+
- **委托技能**: `skill-name`
|
|
178
|
+
- **委托目的**: [目的]
|
|
179
|
+
- **委托范围**:
|
|
180
|
+
- ✅ [允许做的]
|
|
181
|
+
- ❌ [不允许做的]
|
|
182
|
+
- **退出条件**: [完成标准]
|
|
183
|
+
|
|
184
|
+
### 约束继承
|
|
185
|
+
- 保持现有代码风格
|
|
186
|
+
- 最小 LOC 原则
|
|
187
|
+
- 不引入新依赖 (除非必须)
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
⏱️ 进入委托任务...
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### 退出委托任务时输出:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
---
|
|
197
|
+
## ✅ 委托任务完成 (Delegation Complete)
|
|
198
|
+
|
|
199
|
+
### 完成情况
|
|
200
|
+
- **创建的文件**: [列表]
|
|
201
|
+
- **修改的文件**: [列表]
|
|
202
|
+
- **是否超出范围**: 是/否
|
|
203
|
+
|
|
204
|
+
### 返回主上下文
|
|
205
|
+
- **继续阶段**: Phase X - [阶段名]
|
|
206
|
+
- **下一步**: [具体动作]
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
🔄 返回 Bug 修复主上下文...
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Phase 6: Knowledge Extraction (MANDATORY)
|
|
215
|
+
|
|
216
|
+
**每次 Bug 修复后,必须更新 bug-guide.md!**
|
|
217
|
+
|
|
218
|
+
### 知识提取流程
|
|
219
|
+
|
|
220
|
+
1. **模式抽象**: 这个 Bug 属于哪个类别?
|
|
221
|
+
2. **通用化描述**: 将项目特定细节抽象为通用模式
|
|
222
|
+
3. **更新 bug-guide.md**: 添加到对应类别表格
|
|
223
|
+
4. **验证可用性**: 下次能通过 Phase -1 找到吗?
|
|
224
|
+
|
|
225
|
+
### 知识提取模板
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## 📝 Phase 6: 知识提取报告
|
|
229
|
+
|
|
230
|
+
### Bug 基本信息
|
|
231
|
+
- **Bug ID**: BUG-XXX
|
|
232
|
+
- **日期**: YYYY-MM-DD
|
|
233
|
+
- **严重程度**: P0/P1/P2
|
|
234
|
+
|
|
235
|
+
### 模式抽象
|
|
236
|
+
- **类别**: [现有类别名 或 NEW: 新类别名]
|
|
237
|
+
- **模式名称**: [通用化的模式名称]
|
|
238
|
+
- **典型症状**: [通用化描述]
|
|
239
|
+
- **检测方法**: [如何发现这类 Bug]
|
|
240
|
+
- **修复策略**: [通用化的修复方法]
|
|
241
|
+
|
|
242
|
+
### bug-guide.md 更新内容
|
|
243
|
+
[将被添加到 bug-guide.md 的具体内容]
|
|
244
|
+
|
|
245
|
+
### 检查
|
|
246
|
+
- [ ] 模式已添加到 bug-guide.md
|
|
247
|
+
- [ ] 描述足够通用,可复用
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 知识质量标准
|
|
251
|
+
|
|
252
|
+
| 标准 | 检查问题 |
|
|
253
|
+
|------|---------|
|
|
254
|
+
| **通用性** | 换个项目能理解吗? |
|
|
255
|
+
| **可操作性** | 能直接按步骤执行吗? |
|
|
256
|
+
| **可搜索性** | 用不同关键词能找到吗? |
|
|
257
|
+
| **完整性** | 症状+检测+修复都有吗? |
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 🔴 Mandatory Checkpoints
|
|
262
|
+
|
|
263
|
+
**每个阶段完成前,必须确认对应检查项!**
|
|
264
|
+
|
|
265
|
+
### Phase -1: Knowledge Query
|
|
266
|
+
- [ ] 已读取 bug-guide.md
|
|
267
|
+
- [ ] 已搜索匹配模式
|
|
268
|
+
- [ ] 已记录匹配结果
|
|
269
|
+
|
|
270
|
+
### Phase 0: Triage
|
|
271
|
+
- [ ] 已确定入口点
|
|
272
|
+
- [ ] 已分类 (Failure / Noise)
|
|
273
|
+
- [ ] 已评估严重程度
|
|
274
|
+
|
|
275
|
+
### Phase 1-3: Reproduce & RCA & Scope
|
|
276
|
+
- [ ] 已最小复现
|
|
277
|
+
- [ ] 已识别根因
|
|
278
|
+
- [ ] 已执行全局搜索
|
|
279
|
+
|
|
280
|
+
### Phase 4: Fix
|
|
281
|
+
- [ ] 所有位置已修复
|
|
282
|
+
- [ ] 委托任务已完成 (如适用)
|
|
283
|
+
- [ ] 格式化 + Lint 通过
|
|
284
|
+
|
|
285
|
+
### Phase 4.5-4.7: Impact & Completeness & Deps
|
|
286
|
+
- [ ] 已追踪所有调用者
|
|
287
|
+
- [ ] 控制流完整性检查
|
|
288
|
+
- [ ] 新依赖已安装
|
|
289
|
+
|
|
290
|
+
### Phase 5: Verify
|
|
291
|
+
- [ ] 核心修复验证
|
|
292
|
+
- [ ] 回归测试通过
|
|
293
|
+
- [ ] 🔴 code-review 通过
|
|
294
|
+
|
|
295
|
+
### Phase 6: Learn
|
|
296
|
+
- [ ] 模式已抽象
|
|
297
|
+
- [ ] bug-guide.md 已更新
|
|
298
|
+
- [ ] 知识可搜索性验证
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Complete Output Contract
|
|
303
|
+
|
|
304
|
+
```markdown
|
|
305
|
+
## 📚 Knowledge Base Query (Phase -1)
|
|
306
|
+
- **匹配结果**: [已有模式名 / 无匹配]
|
|
307
|
+
- **应用策略**: [直接应用 / 参考 / 完整调查]
|
|
308
|
+
|
|
309
|
+
## Tech Stack
|
|
310
|
+
- Platform: [Web / Desktop / Mobile]
|
|
311
|
+
- Framework: [version]
|
|
312
|
+
- Runtime: [Browser / Node / Tauri / Electron]
|
|
313
|
+
|
|
314
|
+
## Triage Summary
|
|
315
|
+
- Entry point:
|
|
316
|
+
- Classification: [Failure / Noise]
|
|
317
|
+
- Severity: [P0 / P1 / P2]
|
|
318
|
+
|
|
319
|
+
## Root Cause
|
|
320
|
+
[1-sentence explanation of WHY it fails]
|
|
321
|
+
|
|
322
|
+
## Scope Discovery (Global Search)
|
|
323
|
+
- **Search Query Used**: `grep "pattern" path/`
|
|
324
|
+
- **Locations Found**:
|
|
325
|
+
- `FileA.tsx`
|
|
326
|
+
- `FileB.tsx`
|
|
327
|
+
|
|
328
|
+
## Fix Summary
|
|
329
|
+
[What changed]
|
|
330
|
+
|
|
331
|
+
## 🔧 Skill Delegation Report
|
|
332
|
+
| Delegated Skill | Purpose | Scope | Completed |
|
|
333
|
+
|-----------------|---------|-------|-----------|
|
|
334
|
+
| `frontend-design` | 创建组件 | 仅修复所需 | ✅ |
|
|
335
|
+
|
|
336
|
+
## Associated Fixes (Proactive)
|
|
337
|
+
[Extra places fixed beyond user's report]
|
|
338
|
+
|
|
339
|
+
## Impact Analysis
|
|
340
|
+
- **Inventory (Source)**: [modified symbols]
|
|
341
|
+
- **Trace (Radius)**: [affected files]
|
|
342
|
+
- **Verification**: [x] All consumers compatible
|
|
343
|
+
|
|
344
|
+
## Verification
|
|
345
|
+
- [x] Core fix works
|
|
346
|
+
- [x] All instances fixed
|
|
347
|
+
- [x] No regressions
|
|
348
|
+
- [x] 🔴 code-review passed
|
|
349
|
+
- [x] Real environment tested
|
|
350
|
+
|
|
351
|
+
## 📝 Knowledge Extraction (Phase 6)
|
|
352
|
+
- **模式类别**: [Category X: Name]
|
|
353
|
+
- **是否更新 bug-guide.md**: ✅ 是
|
|
354
|
+
- **新增内容摘要**: [简要描述]
|
|
355
|
+
|
|
356
|
+
## 🔒 Checkpoint Verification
|
|
357
|
+
- [x] Phase -1 completed
|
|
358
|
+
- [x] Phase 0-5 completed
|
|
359
|
+
- [x] Phase 6 completed
|
|
360
|
+
- [x] All mandatory checkpoints passed
|
|
361
|
+
```
|