← 返回列表
全部 Skill›开发 Development›system-consistency-checker

system-consistency-checker

作者 @findsun-vn · 语言 en
Validate consistency across planner, OpenAPI, DB, backend, and frontend.
开发 Development前端开发通用待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
0
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Skill: system-consistency-checker

Purpose

Validate the full system across all layers:

  • planner
  • OpenAPI
  • DB schema
  • backend code
  • frontend code

The goal is to detect drift before it becomes production breakage.


Source of Truth Hierarchy

Use this consistency order:

  1. planner defines intended module scope and business rules
  2. OpenAPI defines the API contract
  3. DB schema must align with planner + OpenAPI
  4. backend must implement OpenAPI
  5. frontend must consume OpenAPI

If a layer conflicts with the contract chain, flag it.


Validation Domains

1. Planner -> API

Check:

  • every planned endpoint exists in OpenAPI
  • business rules are reflected
  • naming stays consistent
  • no major missing capability

2. API -> DB

Check:

  • important API fields exist in DB
  • types align reasonably
  • enum/status handling is consistent
  • soft delete semantics are represented
  • ownership/relations are backed by schema relations

3. API -> Backend

Check:

  • all endpoints implemented
  • correct HTTP methods
  • request DTOs align
  • response VOs align
  • standard success wrapper is used
  • pagination wrapper is used correctly

4. Backend architecture

Check:

  • controller -> service -> impl -> mapper flow
  • no business logic in controller
  • no entity exposure
  • DTO/VO layers exist
  • convertor usage is reasonable
  • module structure is respected

5. API -> Frontend

Check:

  • API functions exist for needed endpoints
  • types reflect OpenAPI
  • frontend unwraps ApiResponse<T> correctly
  • paginated flows use wrapped data
  • routes/pages/stores match module needs
  • module files live under frontend/src/modules/<module_name>/
  • shared code lives under frontend/src/shared/

6. DB quality

Check:

  • PK/FK/index quality
  • uniqueness enforcement
  • deleted_at presence
  • schema cleanliness

Contract Checks

Response wrapper check

All success flows must use:

{

"code": 0,

"message": "success",

"data": {}

}

Pagination wrapper check

Paginated success flows must use:

{

"code": 0,

"message": "success",

"data": {

"content": [],

"page": 1,

"size": 10,

"total": 100

}

}

Flag any layer that behaves as if pagination is a raw top-level response.


Frontend Structure Check

This project uses:

  • one Vue app
  • module-based feature folders
  • shared generic code under shared
  • admin/storefront separation through routes/layouts/guards

Flag as inconsistent if:

  • code is placed in frontend/apps/--
  • module code is placed outside frontend/src/modules/<module_name>/
  • business code is incorrectly pushed into shared

Backend Structure Check

This project uses:

  • backend module folders under backend/src/main/java/com/yourapp/modules/<module_name>/

Flag as inconsistent if:

  • repository is introduced without JPA requirement
  • entity is exposed directly
  • module files appear outside intended business module structure

Severity Guidance

CRITICAL

  • missing API implementation
  • wrong endpoint used by frontend
  • broken wrapper contract
  • DB relationship missing where critical
  • path mismatch that breaks generation pipeline

HIGH

  • schema inconsistency
  • architecture violation
  • pagination mismatch
  • wrong module placement
  • missing validation

MEDIUM

  • naming inconsistency
  • missing index
  • duplication / weak organization

LOW

  • style / formatting / comment quality

Reviewer Behavior Rule

When inconsistency is found:

  • identify exact file/path
  • state why it breaks contract or architecture
  • suggest the smallest safe correction

Do not redesign the project unless the structure itself is contradictory.


Final Goal

The system should be:

  • internally consistent
  • contract-safe
  • architecture-aligned
  • maintainable
  • ready for debug/fix/deploy
评论
Ffindsun-vn
findsun-vn
findsun-vn/E-Commerce
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@findsun-vn
所属大类开发 Development / 前端开发
国内可用性通用
最近源活动—
风险提示无
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。