monolith-cleanup
Monolith Cleanup Guidelines
Use this skill after a monolithic file has been split into smaller modules.
Objective
Complete cleanup without changing behavior:
- Archive the original monolithic file
- Remove redundant module paths
- Preserve existing public API access patterns
- Verify the refactor tree is stable and buildable
Required Cleanup Steps
- Archive the original monolithic file before deleting it:
- Copy or move it to
src/_archive/ - Rename with
.baksuffix (example:src/_archive/foo.rs.bak)
- Copy or move it to
- Delete (cull) the original monolithic source file from
src/once replacement modules are in place. - Avoid duplicate module paths:
- Do not keep both
foo.rsandfoo/mod.rs - Keep only one module path strategy for each module
- Do not keep both
- Keep public APIs stable by re-exporting from
mod.rs(or equivalent index file) as needed.
Cleanup Checklist
- Remove unused imports introduced during the split.
- Verify
mod.rs(or index file) re-exports all intended public items. - Update
lib.rsor parent module declarations to point to the new module path. - Confirm only the archived
.bakfile remains from the original monolith. - Run a quick build or targeted tests related to the refactored module.
Scope Guardrails
- Do not change runtime behavior unless explicitly requested.
- Keep cleanup focused on module-path consistency and API continuity.
- Avoid broad opportunistic refactors while performing cleanup.
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.
47mvc-architecture
Use this skill when implementing Model-View-Controller architecture. Covers core MVC principles, layer separation, dependency injection, event-driven communication, and patterns for controllers, models, and views.
40qml-build-deploy
>
4copilot-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