sweepi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sweepi Skill

Sweepi 技能

The local
AGENTS.md
in this directory is authoritative for lint-fix safety workflow and reporting. If
SKILL.md
and
AGENTS.md
differ, follow
AGENTS.md
.
本目录下的本地
AGENTS.md
是lint修复安全工作流和报告的权威参考。如果
SKILL.md
AGENTS.md
内容不一致,请以
AGENTS.md
为准。

When to run

运行时机

Run Sweepi in either case:
  1. The user explicitly asks to run
    sweepi
    .
  2. You are about to commit or recommend committing code changes.
  3. You are linting code, or the user asks you to lint code.
满足以下任意一种情况时运行Sweepi:
  1. 用户明确要求运行
    sweepi
  2. 你即将提交或建议提交代码变更。
  3. 你正在对代码执行lint,或用户要求你对代码执行lint。

Required workflow

必备工作流

  1. Run Sweepi in this order:
    • First try global CLI:
      sweepi .
    • If
      sweepi
      is not found, fallback to:
      npx sweepi .
  2. Parse all reported issues.
  3. Follow the hard-gate pre-edit process in local
    AGENTS.md
    .
  4. For each rule violation, open the rule docs in:
    • https://raw.githubusercontent.com/jjenzz/sweepi/main/packages/eslint-plugin-sweepit/docs/rules/<rule-id>.md
  5. Apply fixes that match the documented intent, not only a minimal syntax pass.
  6. Re-run
    sweepi
    until issues are resolved (or document blockers if resolution is impossible).
  1. 按以下顺序运行Sweepi:
    • 首先尝试全局CLI:
      sweepi .
    • 如果找不到
      sweepi
      ,回退到:
      npx sweepi .
  2. 解析所有上报的问题。
  3. 遵循本地
    AGENTS.md
    中规定的硬门槛预编辑流程。
  4. 针对每一条规则违规,打开以下路径中的规则文档:
    • https://raw.githubusercontent.com/jjenzz/sweepi/main/packages/eslint-plugin-sweepit/docs/rules/<rule-id>.md
  5. 应用符合文档说明意图的修复方案,不要仅做最低限度的语法修正。
  6. 重新运行
    sweepi
    直到所有问题被解决(如果无法解决,请记录阻塞原因)。

Resolution guidance

修复指导

  • Preserve the documented architectural constraints (compound parts, event-driven APIs, explicit props, etc.).
  • Prefer changes that align with the rule's reasoning section.
  • If a fix has trade-offs, choose the option that best matches the rule docs and explain the choice.
  • Never trade behavior-preserving architecture for a smaller lint-only diff.
  • Do not suppress or ignore rules by default.
  • A rule may be ignored only when a human-in-the-loop (HITL) explicitly authorizes that specific exception.
  • 保留文档中说明的架构约束(复合组件、事件驱动API、显式props等)。
  • 优先选择与规则推理部分对齐的变更方案。
  • 如果修复方案存在权衡,请选择最符合规则文档的选项并说明选择原因。
  • 永远不要为了缩小仅涉及lint的diff而牺牲可保持原有行为的架构。
  • 默认情况下不要禁用或忽略规则。
  • 仅当人工介入(HITL)明确授权该特定例外时,才可忽略某条规则。

Response format

响应格式

After running and fixing, report:
  1. The command you ran.
  2. Which rules were triggered.
  3. Rule analysis and fix mapping required by
    AGENTS.md
    .
  4. The final Sweepi result (clean or remaining blockers).
运行并完成修复后,请上报以下内容:
  1. 你执行的命令。
  2. 触发了哪些规则。
  3. AGENTS.md
    要求的规则分析和修复映射。
  4. Sweepi最终运行结果(无问题或仍存在阻塞项)。