Loading...
Loading...
General Bugfix Workflow Knowledge Base, including TDD process, output format specifications, confidence scoring standards, and general best practices. Applicable to all tech stacks (backend/frontend/e2e).
npx skill4agent add penkzhou/swiss-army-knife-plugin bugfix-workflowmake test TARGET={stack} FILTER={test_file}make test TARGET={stack}
make lint TARGET={stack}
make typecheck TARGET={stack}| Score Range | Action |
|---|---|
| ≥60 | Proceed automatically |
| 40-59 | Pause and ask user |
| <40 | Stop and collect more information |
| Score Range | Level | Action |
|---|---|---|
| ≥90 | Critical | Auto-fix |
| 80-89 | Important | Auto-fix |
| <80 | Below threshold | Do not report |
{
"id": "BF-{YYYY}-{MMDD}-{NNN}",
"file": "File path",
"line": Line number,
"severity": "critical|high|medium|low",
"category": "Error type",
"description": "Issue description",
"evidence": ["Evidence supporting the judgment"],
"stack": "Stack trace"
}{
"total": Total count,
"by_type": { "Type": Count },
"by_file": { "File": Count }
}{
"solution": {
"approach": "Overview of fix思路",
"steps": ["Step 1", "Step 2"],
"risks": ["Risk 1", "Risk 2"],
"estimated_complexity": "low|medium|high"
},
"tdd_plan": {
"red_phase": { "tests": [...] },
"green_phase": { "changes": [...] },
"refactor_phase": { "items": [...] }
},
"impact_analysis": {
"affected_files": [...],
"api_changes": [...],
"test_impact": [...]
},
"security_review": {
"performed": true/false,
"vulnerabilities": [...],
"passed": true/false
}
}{
"issue_id": "BF-2025-MMDD-001",
"phases": {
"red": { "status": "pass|fail|skip", "duration_ms": 1234 },
"green": { "status": "pass|fail|skip", "changes": [...] },
"refactor": { "status": "pass|fail|skip", "changes": [...] }
},
"overall_status": "success|partial|failed"
}# [Issue Brief] Bugfix Report
> Date: {YYYY-MM-DD}
> Confidence: {confidence}/100
> Tech stack: {stack}
## 1. Issue Description
### 1.1 Error Messages
[Structured error list]
### 1.2 Root Cause Analysis
[Root cause description + evidence]
## 2. Fix Solution
### 2.1 TDD Plan
#### RED Phase
[Failing test code]
#### GREEN Phase
[Minimal implementation code]
#### REFACTOR Phase
- [ ] Refactoring items
### 2.2 Impact Analysis
[Impact scope]
## 3. Verification Plan
- [ ] Tests passed
- [ ] Coverage meets standard
- [ ] No regression| Check Item | Standard | Blocking Level |
|---|---|---|
| Test Pass Rate | 100% | Blocking |
| Coverage | >= 90% | Blocking |
| New Code Coverage | 100% | Blocking |
| Lint | No errors | Blocking |
| TypeCheck | No errors | Blocking |
| Regression Test | No regression | Blocking |