system-debugger-core
Skill: system-debugger-core
Purpose
Fix correctness issues while preserving:
- architecture
- business rules
- OpenAPI contract
- module structure
This skill prioritizes safe correction, not redesign.
Core Principle
Fix correctness, not architecture redesign.
When in doubt:
- choose the minimal safe fix
- preserve contract and folder structure
- avoid unrelated refactors
Fix Priority
- compilation/build errors
- API contract mismatch
- response wrapper / pagination mismatch
- DB mapping issues
- architecture violations
- runtime edge cases
- code cleanup only if necessary
Allowed Backend Fixes
- fix imports
- fix package names
- fix DTO/VO usage
- fix mapper/entity annotations
- move business logic out of controllers
- fix service wiring
- fix convertor mapping
- fix wrapper response usage
- fix pagination response structure
Allowed Frontend Fixes
- fix imports
- fix TypeScript types
- fix wrong API calls
- fix wrong response unwrapping
- fix pagination handling
- fix store/composable integration
- fix module file placement
- fix route wiring consistent with module structure
Allowed DB Mapping Fixes
- fix entity column mapping
- fix naming mismatches
- fix missing mapping annotations
- align backend models with schema
Forbidden Actions
- changing business rules
- silently redesigning OpenAPI
- removing required endpoints
- splitting frontend into multiple apps
- moving business module code into random shared locations
- introducing a different architecture just because current code is messy
OpenAPI Contract Rule
OpenAPI is immutable during debugging unless explicitly approved elsewhere.
Do not “fix” backend/frontend by changing the API contract silently.
Always fix implementation against contract first.
Standard Success Response Rule
Assume the correct success shape is:
{
"code": 0,
"message": "success",
"data": {}
}
Standard Pagination Response Rule
Assume paginated success shape is:
{
"code": 0,
"message": "success",
"data": {
"content": [],
"page": 1,
"size": 10,
"total": 100
}
}
If code behaves as if pagination is raw top-level data, fix that behavior.
Backend Preservation Rules
Preserve:
- module-based structure
- controller/service/impl/mapper/entity flow
- DTO/VO separation
- convertor layer
- MyBatis Plus orientation
Do not introduce repository/ unless explicitly required.
Frontend Preservation Rules
Preserve:
- single Vue app structure
- module path:
frontend/src/modules/<module_name>/
- shared generic code under:
frontend/src/shared/
- admin/storefront expressed via routes/layouts/guards
Do not invent:
frontend/apps/storefrontfrontend/apps/admin
unless explicitly required by a later architecture change.
Debug Method
- identify exact failure point
- trace which contract or structure rule it violates
- apply the smallest safe correction
- verify no nearby layer is now inconsistent
Output Guidance
If documenting fixes, summarize:
- what broke
- what was changed
- which files were touched
- whether the result is ready for re-review
Final Goal
System should become:
- buildable
- type-safe
- API-consistent
- architecture-preserving
- ready for reviewer verification
