Skip to main content

orch-refine-code

编排行为保持不变的重构——确认测试为绿色,在不改变行为的前提下调整结构,保持测试绿色,审查并门控提交。用于结构需要改进但行为不能改变的场景。

Informations de source

Dépôt
aaione/everything-claude-code-zh
Dernière activité de la source
21 juin 2026 à 01:33
Langue détectée de SKILL.md
chinois
Étoiles
30
Forks
14

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.

Affichage de SKILL.md

SKILL.md
Instructions source · Aperçu en lecture seule
name
orch-refine-code
description
编排行为保持不变的重构——确认测试为绿色,在不改变行为的前提下调整结构,保持测试绿色,审查并门控提交。用于结构需要改进但行为不能改变的场景。
metadata
{"origin":"ECC"}
# orch-refine-code Actor · action · target:**orch · refine · code**。这是共享引擎 [`orch-pipeline`](../orch-pipeline/SKILL.md) 上的一层薄包装。 ## 何时使用 - 相同行为,**更好结构**:提取模块、移除重复、删除死代码、减少嵌套、重命名提高清晰度。 - 与同系列技能区分:只要行为有任何改变,这就不是正确技能(应使用 `orch-change-feature` / `orch-fix-defect`)。 ## 运行设置 - **默认规模下限:** standard——结构调整通常触及多个文件。 - **阶段掩码:** 0 → 2(规划重构)→ 4(保持绿色)→ 5 → 6。不编写新行为测试——现有测试套件是安全网。 - **第一步(phase 4):** 改代码前确认相关测试存在且**已经绿色**;如果覆盖薄弱,先添加 characterization tests。然后小步重构,每步后重新运行测试。 ## 工作方式 1. 使用上述设置运行 `orch-pipeline` 引擎。 2. 对死代码 / 重复清理,委派给 `refactor-cleaner` 智能体(它会运行 knip / depcheck / ts-prune 并安全删除)。 3. 在 **Gate 1**(重构计划)和 **Gate 2**(提交前)停止。 4. 以 `refactor:` 提交——diff 必须保持行为中性。 ## 示例 ``` orch-refine-code: extract the NWS HTTP client out of poller.py → confirm tests green → plan extraction [GATE 1: approve] → move in small steps, tests green throughout → code-review → commit refactor: [GATE 2: confirm] ```
Voir sur GitHub