architecture-cleanuplisted
Install: claude install-skill itlackey/akm
# Architecture Cleanup
Use this skill for narrow architectural cleanup where the code structure should
improve but the product behavior must remain exactly the same.
## Core rules
1. No user-visible functionality changes.
2. All existing tests must continue to pass with the same validation
expectations.
3. The only allowed test edits are import-path or symbol-import updates caused
by file or module moves.
4. Do not rewrite assertions, fixtures, or expected outputs to make a refactor
easier.
5. Prefer adapters first, rewrites second.
6. Stop if the work starts to resemble framework-building instead of targeted
cleanup.
## Non-goals
This work is not for:
- building a generalized plugin framework
- adding complexity for its own sake
- introducing runtime plugin loading or dynamic discovery
- replacing simple direct code with abstract dispatch where no hotspot exists
- changing command behavior, output envelopes, scoring semantics, or feature
scope under the banner of refactoring
## Repeated patterns
Use these patterns only when they remove a concrete maintenance problem.
### Fixed-stage pipeline
Good for:
- search
- improve
- indexing
Rule:
- keep orchestration centralized
- make stage order explicit
- do not create contributor graphs
### Ordered contributor registry
Good for:
- ranking signals
- proposal validators
- search-hit enrichers
Rule:
- define composition semantics once
- keep registration static and deterministic
### Structural contrac