A fastforward lane for trivial refactors that skips the usual three-phase ceremony. When you just want to extract a function, add guard clauses, or pull out a composable without writing design docs, this checks three hard gates (behavior unchanged, scope under 100 lines, tests exist), asks for one confirmation, makes the change using named classic methods, runs tests, and reports back in one line. Falls back to full cs-refactor if anything gets complicated mid-flight. The discipline is in the gates, not the process. Best for "clean up this function" moments where the full scan/design/checklist workflow feels like overkill but you still want guardrails against scope creep and behavioral drift.
npx -y skills add liuzhengdongfortest/codestable --skill cs-refactor-ff --agent claude-codeInstalls into .claude/skills of the current project.
开始任何判断或动作前,先读取 .codestable/attention.md;缺失则视为骨架不完整,提示先补齐或运行 cs-onboard,不要回退到外部 AI 入口文件。
用户说"优化一下这个函数"而改动明显很小(单函数变长、组件里抽个 composable、一段重复代码合并)时走完整三阶段太重。fastforward 让 AI 像平时一样直接改但守住底线——行为等价、引用经典方法、跑测试自证。
很轻:没有 scan 清单、没有 design doc、没有 checklist,改完一句话汇报就行。
任一不过就退到 cs-refactor:
完整 scan 阶段是 7 条入场检查,这里压成最关键 3 条——剩下 4 条(跨模块 / 全口味 / 生成代码 / 扫不完)在"范围真的小吗"里已被隐含排除。
fastforward 不读完整方法库,但要守住"每一处改动都能对应到一个经典重构方法"。AI 心里想不出"我这步是 Extract Function / Memoization / Guard Clauses / ..." 里的哪一个 → 这次不是简单重构退完整流程查方法库。
常用方法(覆盖 fastforward 80% 场景):
想做的动作不在这几种里、不是开箱即用的经典方法(涉及 Parallel Change / Strangler Fig / 分层纠偏)→ 退完整流程。
一句话回用户:"我打算做 {方法名},动 {具体文件/函数},改动点 {N} 处,预计影响 {范围}。确认就开干。"
确认就下一步。用户说"还有个 X 要改"——评估 X 是否破坏入场 3 条,破坏了就退完整流程。
按经典方法步骤改。不产出 design doc / checklist,代码直接落盘。
✓ 已完成。方法:{方法名}。改动:{文件路径:行号范围}。验证:{跑了什么测试 / 通过情况}。
有偏离 / apply 过程中发现想再改点别的 → 停下问用户不发挥。
默认不建 .codestable/refactors/ 目录——fastforward 的价值就在不留存档。
例外:用户明确"这次要留个记录" → 建 .codestable/refactors/{YYYY-MM-DD}-{slug}/{slug}-refactor-note.md,内容就是上面那句汇报 + 一段"做了什么 / 为什么"。不写 design / checklist。
改到一半出现以下任一,停下告诉用户"比预期复杂,建议切回完整流程":
切回:触发 cs-refactor 从 scan 开始。已改的部分要么提交保留、要么 git restore 回到干净状态再扫。
cs-refactor/SKILL.md — 完整 refactor 流程cs-refactor/reference/methods.md — 完整方法库.codestable/reference/system-overview.md — CodeStable 体系总览cursor/plugins
metabase/metabase
metabase/metabase
telagod/code-abyss
github/awesome-copilot
DietrichGebert/ponytail