12 lines
463 B
Markdown
12 lines
463 B
Markdown
# Skill: refactor-guide
|
|
|
|
## Principle
|
|
Refactor by **extracting stable, framework-agnostic logic into `packages/sdk`**, then build UI shells in `packages/editor`.
|
|
|
|
## Steps
|
|
1. Identify domain concepts (widgets, data sources, canvas, layout).
|
|
2. Define types and pure operations in `sdk/core`.
|
|
3. Implement adapters behind interfaces (storage, network) in `sdk/runtime`.
|
|
4. In editor, consume only SDK public APIs.
|
|
5. Add tests to SDK for every extracted behavior.
|