feat(skills): add v2 data refactoring skills (migrator, data-api, renderer)#13298
Merged
feat(skills): add v2 data refactoring skills (migrator, data-api, renderer)#13298
Conversation
…derer) Add three skills to guide the v2 data layer migration lifecycle: - v2-migrator: Redux/Dexie/ElectronStore → SQLite migration with TDD - v2-data-api: Main-process Handler→Service→Repository architecture - v2-renderer: Renderer hooks (useQuery, usePreference, useCache) Includes cross-domain reference guidance, FK design patterns, cache tier selection, and cross-category migration examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0xfullex
approved these changes
Mar 8, 2026
Collaborator
|
Note This issue/comment/review was translated by Claude. Pay attention to regular maintenance Original Content注意定期维护 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Before this PR:
No structured guidance existed for Claude agents working on the v2 data layer migration. Each migration task required re-explaining the architecture, patterns, and constraints from scratch.
After this PR:
Three new skills guide the full v2 data refactoring lifecycle:
v2-migrator(Phase 1): Moving legacy Redux/Dexie/ElectronStore data into SQLite — covers source classification, migrator contract, cross-domain references & FK design, orphan handling, and streaming patternsv2-data-api(Phase 2): Building Main-process services — covers Handler→Service→Repository layered architecture, API schema design, preference schema, and database patternsv2-renderer(Phase 3): Wiring up Renderer-process hooks — coversuseQuery/useMutation(DataApi),usePreference(settings), anduseCache/useSharedCache/usePersistCache(temporary data) with cache tier selection guidance and multi-window sync considerationsAll three skills enforce strict TDD (red-green-refactor).
Why we need it and why it was done in this way
The v2 data refactoring involves migrating ~391 classified data items across Redux, Dexie, and ElectronStore into a unified SQLite + Preference + Cache architecture. Without structured skills, agents repeatedly make mistakes around:
Model,KnowledgeBase[]) instead of IDs, leading to stale phantom data when originals are deleted. Skills document the FK-IDs-only pattern and orphan reference handling.memory.embedderModel,websearch.compressionConfig.embeddingModel) rather than settings. Skills guide correct reclassification.The following tradeoffs were made:
Skills are split into 3 phases (migrator → data-api → renderer) matching the natural dependency order, rather than one monolithic skill.
The following alternatives were considered:
A single combined skill was considered but rejected — each phase has distinct concerns, file locations, and testing strategies.
Breaking changes
None. This PR only adds new skill files and updates
.gitignore/public-skills.txt.Special notes for your reviewer
pnpm skills:check(8 public skills validated)docs/en/references/data/and existing migration code insrc/main/data/migration/v2/v2-migratorwere built from actual Redux store analysis (src/renderer/src/store/)Checklist
/gh-pr-review,gh pr diff, or GitHub UI) before requesting review from othersRelease note