fix-logs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIMPORTANT: 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 for full protocol.
.claude/skills/shared/anti-hallucination-protocol.md在修改任何代码之前: 用实际的代码证据验证假设。搜索用法、阅读实现、追踪依赖。如果对任何更改的信心低于90%,请先调查或询问用户。完整协议请查看。
.claude/skills/shared/anti-hallucination-protocol.mdMission
任务
<issue>$ARGUMENTS</issue>
<issue>$ARGUMENTS</issue>
Workflow
工作流程
- Check if exists:
./logs.txt- If missing, set up permanent log piping in project's script config (,
package.json,Makefile, etc.):pyproject.toml- Bash/Unix: append
2>&1 | tee logs.txt - PowerShell: append
*>&1 | Tee-Object logs.txt
- Bash/Unix: append
- Run the command to generate logs
- If missing, set up permanent log piping in project's script config (
- Use subagent to analyze
debuggerand find root causes:./logs.txt- Use with
Grepto read only last 30 lines (avoid loading entire file)head_limit: 30 - If insufficient context, increase as needed
head_limit
- Use
- Use subagent to analyze the codebase and find the exact location of the issues, then report back to main agent.
scout - Use subagent to create an implementation plan based on the reports, then report back to main agent.
planner - Start implementing the fix based the reports and solutions.
- Use agent to test the fix and make sure it works, then report back to main agent.
tester - Use subagent to quickly review the code changes and make sure it meets requirements, then report back to main agent.
code-reviewer - If there are issues or failed tests, repeat from step 3.
- 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.
- 检查是否存在:
./logs.txt- 如果缺失,在项目的脚本配置(、
package.json、Makefile等)中设置永久日志管道:pyproject.toml- Bash/Unix:追加
2>&1 | tee logs.txt - PowerShell:追加
*>&1 | Tee-Object logs.txt
- Bash/Unix:追加
- 运行命令生成日志
- 如果缺失,在项目的脚本配置(
- 使用子代理分析
debugger并找出根本原因:./logs.txt- 使用并设置
Grep,仅读取最后30行(避免加载整个文件)head_limit: 30 - 如果上下文不足,根据需要增加
head_limit
- 使用
- 使用子代理分析代码库,找出问题的确切位置,然后向主代理报告。
scout - 使用子代理根据报告创建实施计划,然后向主代理报告。
planner - 根据报告和解决方案开始实施修复。
- 使用代理测试修复,确保其有效,然后向主代理报告。
tester - 使用子代理快速审查代码更改,确保符合要求,然后向主代理报告。
code-reviewer - 如果存在问题或测试失败,从步骤3重复执行。
- 完成后,向用户回复更改摘要,简要说明所有内容,指导用户开始使用并建议下一步操作。
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
- 始终规划并拆分多个小型待办任务
- 始终添加最终审查待办任务,在结束时审查已完成的工作,以发现任何需要修复或改进的地方