fix

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Bug修复工作流

Bug Fixing Workflow

入口交互

Entry Interaction

用户输入
/fix
后,读取
bugs/pending.csv
列出待修复bug
After the user inputs
/fix
, read
bugs/pending.csv
to list pending bugs

交互流程

Interaction Process

  1. 读取
    bugs/pending.csv
  2. AskUserQuestion 列出待修复bug让用户选择(by ID)
  3. 更新选中bug状态为
    in_progress
    (整行更新,重写文件无空行)
  4. 全自动执行八阶段
  1. Read
    bugs/pending.csv
  2. AskUserQuestion lists pending bugs for the user to select (by ID)
  3. Update the status of the selected bug to
    in_progress
    (update the entire row, rewrite the file without blank lines)
  4. Automatically execute the 8-stage process

CSV 结构

CSV Structure

pending.csv(QA 写入,RD 读取)

pending.csv (Written by QA, Read by RD)

id,title,description,severity,reporter,created_at,status,related_dev
  • related_dev: 关联的开发任务目录名(如 用户积分-20260120143052)
id,title,description,severity,reporter,created_at,status,related_dev
  • related_dev: Directory name of the associated development task (e.g., User Points-20260120143052)

archived.csv(RD 写入,QA 验收)

archived.csv (Written by RD, Accepted by QA)

id,title,description,severity,reporter,created_at,root_cause,fix_plan,affected_scope,fix_report,fixed_at,fixed_by
id,title,description,severity,reporter,created_at,root_cause,fix_plan,affected_scope,fix_report,fixed_at,fixed_by

八阶段流程

8-Stage Process

阶段1:分析Bug

Stage 1: Bug Analysis

  • 解析bug描述
  • 结合当前项目代码复现问题路径
  • 输出:问题现象描述
  • Parse the bug description
  • Reproduce the problem path in combination with the current project code
  • Output: Problem phenomenon description

阶段2:确定根因

Stage 2: Root Cause Identification

  • 定位具体文件、函数、行号
  • 分析代码逻辑找出根本原因
  • 输出:根因分析报告
  • Locate the specific file, function, and line number
  • Analyze code logic to find the root cause
  • Output: Root cause analysis report

阶段3:审核根因

Stage 3: Root Cause Review

  • AskUserQuestion 确认根因判断
  • 用户确认后继续
  • AskUserQuestion to confirm the root cause judgment
  • Proceed after user confirmation

阶段4:修复方案

Stage 4: Repair Solution

  • 基于现有架构设计修复方案
  • 评估修复复杂度
  • 输出:修复方案概要
  • Design a repair solution based on the existing architecture
  • Evaluate repair complexity
  • Output: Repair solution overview

阶段5:影响范围

Stage 5: Impact Scope

  • 列出受影响的模块/接口/组件
  • 评估回归风险
  • 输出:影响范围清单
  • List affected modules/interfaces/components
  • Evaluate regression risks
  • Output: Impact scope list

阶段6:执行修复

Stage 6: Execute Repair

  • ⚠️ 执行前重新读取 CLAUDE.md 规范
  • 分批修改(≤20行)
  • 实时标记修复进度
  • ⚠️ Re-read the CLAUDE.md specification before execution
  • Modify in batches (≤20 lines)
  • Mark repair progress in real-time

阶段7:复测验证

Stage 7: Retest Verification

  • Playwright 自动化验证或手动验证
  • 确认问题已修复
  • 输出:验证结果
  • Automated verification with Playwright or manual verification
  • Confirm the problem has been fixed
  • Output: Verification result

阶段8:归档留痕

Stage 8: Archiving and Traceability

  • ⚠️ 执行前重新读取 CLAUDE.md 规范
  • 从 pending.csv 删除该行(重写文件,无空行)
  • 整行数据+修复字段追加到 archived.csv
  • ⚠️ Re-read the CLAUDE.md specification before execution
  • Delete the row from pending.csv (rewrite the file without blank lines)
  • Append the entire row of data + repair fields to archived.csv

CSV 操作规范

CSV Operation Specifications

  • 删除行后必须重写整个文件,确保无空行
  • 整行操作,禁止单独操作某列导致错位
  • 移动到 archived 时完整复制原行所有字段后追加新字段
  • After deleting a row, the entire file must be rewritten to ensure no blank lines
  • Operate on entire rows; it is forbidden to operate a single column separately to avoid misalignment
  • When moving to archived, copy all fields of the original row completely and then append new fields

与 QA 联动

Collaboration with QA

  • QA 提交 bug 到 pending.csv(生成唯一 ID: BUG-yyyymmdd-xxx)
  • RD 通过 /fix 选择 ID 执行修复
  • QA 查询 archived.csv 验收修复结果
  • QA submits bugs to pending.csv (generates a unique ID: BUG-yyyymmdd-xxx)
  • RD selects an ID via /fix to execute the repair
  • QA queries archived.csv to accept the repair results