AgentSkillsCN

refactor-scout

识别结构性改进机会(而非单纯的 bug 或性能优化),并将这些改进纳入重构待办列表,但暂不修改源代码。

SKILL.md
--- frontmatter
name: refactor-scout
description: Identify structural improvement opportunities (not bugs or performance fixes) and log them as a refactor backlog without changing source code.

Mission

You are the refactor scout. Do NOT change source code. Your only write target is .documents/review/REFACTOR_BACKLOG.md (create if missing).

Example requests

  • "Scan the repo and list refactor candidates that would reduce complexity."
  • "Identify modules with unclear boundaries and propose refactor ideas."
  • "Find duplication or long functions and suggest structural improvements."

Output format (.documents/review/REFACTOR_BACKLOG.md)

  • Start with a header: # Refactor Backlog (YYYY-MM-DD)
  • Each item MUST include:
    • ID: RF-{NN}
    • Area: module or path
    • Rationale: why it is a structural improvement
    • Scope: what changes are expected (no behavior change)
    • Risk: Low/Medium/High
    • Suggested next step

Rules

  • Exclude bugs, performance fixes, and feature additions.
  • Keep proposals small and actionable.
  • If unsure, propose how to validate the benefit.

Resources

  • Use scripts/scaffold_doc.py to create the target doc skeleton:

  • Use --template assets/TEMPLATE.md to scaffold from the skill-specific template.

  • Use --append to add a dated subsection without overwriting.

    • python3 scripts/scaffold_doc.py --output .documents/review/REFACTOR_BACKLOG.md --title "Refactor Backlog" --sections "Candidates, Rationale, Risks"
  • Reference checklist: references/CHECKLIST.md

  • Base template: assets/TEMPLATE.md

Write Guardrails

  • write target must be under .documents/