Agent skill
formax-rework-convergence-workflow
Use when code has gone through repeated rework and may contain redundant logic, style drift, or tangled structure. Trigger when user asks for "返工收敛", "cleanup-pass", or requests a focused cleanup pass that reduces churn without changing behavior.
Install this agent skill to your Project
npx add-skill https://github.com/yusifeng/formax/tree/main/.codex/skills/formax-rework-convergence-workflow
SKILL.md
Formax Rework Convergence Workflow
Purpose
Use this workflow to clean up code after multiple back-and-forth edits.
Primary goal:
- Reduce redundancy
- Restore structure clarity
- Keep behavior unchanged unless user explicitly asks for behavior changes
Trigger Phrases
Run this skill when the user says:
返工收敛(recommended keyword)cleanup-pass- "帮我收敛一下这波改动"
- "把返工后冗余代码清掉"
Scope Rules
- No feature expansion during convergence.
- No broad redesign unless user explicitly asks.
- Prefer local cleanup in touched files first.
- Preserve existing runtime behavior and UI semantics.
Workflow
- Freeze Intent
- Restate the target in one sentence.
- Identify "must keep" behavior before editing.
- Build Cleanup Map
- Inspect current diff and touched files.
- Group issues into:
- duplicate logic
- dead code / unreachable branches
- conflicting style patterns
- state ownership confusion
- temporary patches that became permanent
- Rank by Risk and Value
- High priority:
- behavior-risky duplication
- conflicting state sources
- repeated conditional branches causing drift
- Medium priority:
- naming inconsistencies
- repeated style tokens/classes
- Low priority:
- cosmetic micro-cleanups
- Apply Minimal Convergence Edits
- Collapse duplicated branches into one shared path.
- Remove dead paths only when replacement path is verified.
- Keep interfaces stable.
- Keep patch size small and reviewable.
- Validate
- Run targeted type-check/tests for changed scope.
- If UI is touched, do a quick manual visual sanity check path.
- If validation is blocked, report the exact blocker and impact.
- Report Back in Convergence Format
what was removedwhat was unifiedwhat behavior stayed the sameresidual risks
Guardrails
- Do not hide uncertainty: explicitly call out assumptions.
- Do not ship "temporary fixes" silently.
- If a temporary mitigation is unavoidable, mark it and define removal conditions.
- Never mix unrelated cleanup in the same pass.
Output Template
Use this structure in responses:
- Convergence summary (2-4 lines)
- Redundancy removed
- Structure unified
- Behavior parity check
- Risks and next small pass (optional)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
formax-dev-loop-workflow
Use when working on Formax code changes and you need a disciplined dev loop: keep a single mainline task, avoid scope drift, run only targeted tests (no coverage), avoid partial staging (MM), run mandatory review before commit, include an incremental optimization check, and keep commits small and reviewable.
formax-tool-ui-blocks-workflow
Implement or refactor Formax tool transcript UI using the Tool UI Blocks (C-lite) pattern (ToolUiBlocks renderer + blocks presenters) to avoid touching many tool presenter files; use when adjusting ⏺/⎿ spacing, indent rules, or migrating additional tools to blocks presenters with targeted Ink/Vitest tests and Codex review before commit.
formax-web-css-convergence-workflow
Use when changing web CSS/UI styling so requirements, state ownership, and acceptance checks are locked before edits to prevent rework churn.
formax-config-settings-workflow
Use when implementing or extending /config (storage, prompt injection, request params, UI-only toggles) with tests and strict UI parity.
formax-semantics-parity-workflow
Use when implementing or modifying behavior that must stay consistent across TUI and Web (mode/input/tool/replay/order). Require canonical semantics first, then TUI/Web adapters, then renderer-specific UI.
formax-rolling-plan-loop-workflow
Use when the user wants a reusable rolling execution pattern (README + TODO-INDEX) like plans/web-reference-react-refactor, and wants to run delivery in small validated loops.
Didn't find tool you were looking for?