用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。
The English summary is being prepared. Showing the original description.
用于在不改变可观察行为的前提下重组既有前端代码,包括职责提炼、模块搬移、条件逻辑简化、API 整理和数据组织。不要用于新增功能、改变行为的缺陷修复、依赖或框架迁移,以及已经证实的死代码清理。
The English summary is being prepared. Showing the original description.
Run score Not tested
See how to installReview the instructions the agent will receive before you install.
以小步、可验证、可回滚的方式重组仍在使用的前端代码,同时保持用户、调用方、测试、路由和集成能够观察到的行为不变。
每次执行都遵守以下规则:
纯重构采用 GREEN → REFACTOR → GREEN,不为了形式上的 TDD 人为制造失败行为测试。
| 风险 | 常见范围 | 默认动作 |
|---|---|---|
SAFE | 局部私有代码、契约稳定、容易回滚 | 可执行,并逐步验证 |
CAUTION | 跨模块、共享状态、导入、Hook/Composable、生命周期 | 安全证据充分时执行,否则先规划 |
DANGER | 公开 API、路由、持久化、网络契约、认证、SSR/水合、大范围状态或继承改造 | 默认先规划并停止等待明确授权 |
风险由上下文决定,不能只凭手法名称判定安全级别。
每个可执行步骤先写清:
预期文件数:N
预期函数/组件数:N
预期公开 API 变化:0
预期行为变化:0
如果实际 diff 明显超出预算,停止并重新评估,不能静默扩大成重新设计。
SAFE。输出带证据、风险、差异预算、逐步验证和必要回滚记录的重构方案或实现,并给出 PASS、PARTIAL 或 NOT PROVEN 的行为保持结论。
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。
The English summary is being prepared. Showing the original description.
Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.
The English summary is being prepared. Showing the original description.
Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.
The English summary is being prepared. Showing the original description.
用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。
The English summary is being prepared. Showing the original description.
用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。
The English summary is being prepared. Showing the original description.
Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.
The English summary is being prepared. Showing the original description.