refactor
Refactor Bot
Use this skill to run a full refactor workflow from a single command like /refactor interactive-terminal/src/cxxqt_bridge "split monolith into focused modules".
Behavior
When invoked, run this sequence:
-
Parse target + goal
- Target module/path from first argument
- Optional objective from remaining arguments
- If missing objective, default to: improve structure while preserving behavior
-
Start a Project Memory plan
- Register workspace using
memory_workspace(action: "register") - Create a new
refactorplan with clear goals and success criteria - Store initial request via
memory_context(action: "store_initial")
- Register workspace using
-
Orchestrate agent flow
Researcher: inspect usage, dependencies, and risk surfaceArchitect: produce step-by-step refactor design with file scopeExecutor: implement minimal scoped changesReviewer: run build-check + quality reviewTester: write/run targeted testsRevisionist: only when blocked/failingArchivist: archive when complete
-
Enforce safety + scope
- Keep public API stable unless user explicitly allows breaking changes
- Avoid unrelated edits
- If scope must expand, report and request escalation via handoff
- Prefer existing build scripts (
memory_plan(action: "list_build_scripts")) before ad-hoc commands
-
Validate outcomes
- Build and targeted tests pass for touched areas
- No unresolved blocked steps
- Plan archived with summary + artifact list
Output Format
Return a concise execution report:
- Refactor target and goal
- Files changed
- Build/test status
- Risks or follow-up recommendations
Example Invocations
/refactor interactive-terminal/src/cxxqt_bridge split into module directory/refactor vscode-extension/src/chat/tools simplify contracts and reduce coupling
More from ds-codi/project-memory-mcp
pyside6-mvc
Use this skill when building Python desktop applications using PySide6 with strict MVC architecture where all UI is defined by .ui files. Covers architecture patterns, controller/model/view separation, signal handling, and .ui file workflows.
95pyside6-qml-views
Use this skill when creating QML view files, designing QML component hierarchies, building layouts, styling QML controls, creating reusable QML components, implementing QML navigation / page switching, or working with QML resources. Covers QML file structure, component patterns, Material/Controls styling, resource management, and common QML idioms for desktop applications.
49pyside6-qml-architecture
Use this skill when creating a new PySide6 + QML desktop application with MVC architecture, setting up project structure, implementing the application bootstrap / DI container, or understanding how the MVC layers connect. Covers project scaffolding, entry points, singleton application class, service locator, signal registry, and lifecycle management.
47qml-build-deploy
>
4cxxqt-rust-gui
Use this skill when building Qt-based GUI applications in Rust using CxxQt. Covers project structure, QObject integration, QML bindings, signal/slot patterns, and build configuration with cxx-qt-build.
3copilot-sdk
Build agentic applications with GitHub Copilot SDK. Use when embedding AI agents in apps, creating custom tools, implementing streaming responses, managing sessions, connecting to MCP servers, or creating custom agents. Triggers on Copilot SDK, GitHub SDK, agentic app, embed Copilot, programmable agent, MCP server, custom agent.
3