fix-logs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
IMPORTANT: Analyze the skills catalog and activate the skills that are needed for the task during the process.
重要提示: 分析技能目录,并在过程中激活任务所需的技能。

⚠️ Anti-Hallucination Reminder

⚠️ 防幻觉提醒

Before modifying ANY code: Verify assumptions with actual code evidence. Search for usages, read implementations, trace dependencies. If confidence < 90% on any change, investigate first or ask user. See
.claude/skills/shared/anti-hallucination-protocol.md
for full protocol.
在修改任何代码之前: 用实际的代码证据验证假设。搜索用法、阅读实现、追踪依赖。如果对任何更改的信心低于90%,请先调查或询问用户。完整协议请查看
.claude/skills/shared/anti-hallucination-protocol.md

Mission

任务

<issue>$ARGUMENTS</issue>
<issue>$ARGUMENTS</issue>

Workflow

工作流程

  1. Check if
    ./logs.txt
    exists:
    • If missing, set up permanent log piping in project's script config (
      package.json
      ,
      Makefile
      ,
      pyproject.toml
      , etc.):
      • Bash/Unix: append
        2>&1 | tee logs.txt
      • PowerShell: append
        *>&1 | Tee-Object logs.txt
    • Run the command to generate logs
  2. Use
    debugger
    subagent to analyze
    ./logs.txt
    and find root causes:
    • Use
      Grep
      with
      head_limit: 30
      to read only last 30 lines (avoid loading entire file)
    • If insufficient context, increase
      head_limit
      as needed
  3. Use
    scout
    subagent to analyze the codebase and find the exact location of the issues, then report back to main agent.
  4. Use
    planner
    subagent to create an implementation plan based on the reports, then report back to main agent.
  5. Start implementing the fix based the reports and solutions.
  6. Use
    tester
    agent to test the fix and make sure it works, then report back to main agent.
  7. Use
    code-reviewer
    subagent to quickly review the code changes and make sure it meets requirements, then report back to main agent.
  8. If there are issues or failed tests, repeat from step 3.
  9. After finishing, respond back to user with a summary of the changes and explain everything briefly, guide user to get started and suggest the next steps.
  1. 检查
    ./logs.txt
    是否存在:
    • 如果缺失,在项目的脚本配置(
      package.json
      Makefile
      pyproject.toml
      等)中设置永久日志管道:
      • Bash/Unix:追加
        2>&1 | tee logs.txt
      • PowerShell:追加
        *>&1 | Tee-Object logs.txt
    • 运行命令生成日志
  2. 使用
    debugger
    子代理分析
    ./logs.txt
    并找出根本原因:
    • 使用
      Grep
      并设置
      head_limit: 30
      ,仅读取最后30行(避免加载整个文件)
    • 如果上下文不足,根据需要增加
      head_limit
  3. 使用
    scout
    子代理分析代码库,找出问题的确切位置,然后向主代理报告。
  4. 使用
    planner
    子代理根据报告创建实施计划,然后向主代理报告。
  5. 根据报告和解决方案开始实施修复。
  6. 使用
    tester
    代理测试修复,确保其有效,然后向主代理报告。
  7. 使用
    code-reviewer
    子代理快速审查代码更改,确保符合要求,然后向主代理报告。
  8. 如果存在问题或测试失败,从步骤3重复执行。
  9. 完成后,向用户回复更改摘要,简要说明所有内容,指导用户开始使用并建议下一步操作。

IMPORTANT Task Planning Notes

重要的任务规划注意事项

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
  • 始终规划并拆分多个小型待办任务
  • 始终添加最终审查待办任务,在结束时审查已完成的工作,以发现任何需要修复或改进的地方