refactor-backend-03-dao-model

Installation
SKILL.md

DAO & Model-Layer Tidy-Up — refactor-chain · backend lane · step 03/09

Bundle: refactor-chain (self-diagnosing, self-healing fix-it pipeline). Phase: do-the-work · Prerequisite: refactor-backend-02-module-rename · Next: refactor-backend-04-service. Adaptivity / conditional: repo-agnostic. Check mode is advisory (report only); fix mode is behavior-preserving and confirmation-gated.

Purpose

Bring the lowest code layer into shape before anything above it is touched: fix impimpl directory naming (including compound variants like serviceImp/), put DAO implementations under dao/impl/ while interfaces stay at dao/ root, split Mapper and Entity classes into dao/mapper/ and dao/entity/, and gather scattered model classes into the module's shared model artifact. The model consolidation is compile-neutral by construction: files move physically, package declarations stay byte-identical, so not a single import anywhere changes. Every classification decision comes from a deterministic filename-and-position table — never from reading file contents — so two runs on the same tree always produce the same result.

When to use

  • Audit only: "DAO layer check", "step 3 check" → produces a FAIL/WARN/INFO report, changes nothing.
  • Repair: "DAO cleanup", "step 3 fix", "split mapper and entity", "consolidate the model classes".
  • Both: "step 3 check and fix".
  • Precondition: steps 01–02 done (stable module names); the user confirms the fix plan before execution.
Installs
5
GitHub Stars
3
First Seen
Jul 6, 2026
refactor-backend-03-dao-model — ahmedbenaw/refactor-chain