---
name: feedback-skeleton-first-aggressive-finish
description: "SOLUTION_ERP S38 skeleton-first strategy — finish 5 plan combo 1 commit mega với trade-off DEFER rõ ràng, UAT visible 100% nhưng workflow simplified"
metadata: 
  node_type: memory
  type: project
  tags: 
    - pattern
    - scope-strategy
    - phase-10
  phase: phase-10
  originSessionId: 2a3ce6e1-edc5-464d-a436-38c8ed876dde
---

# Skeleton-First Aggressive Finish (Session 38 — 2026-05-28)

**Trigger:** Anh main "OK check lại plan nhé, xem còn gì ko thì finish cho xong luôn đi nhé" — yêu cầu finish 5 plan còn lại (G-O4/O5/O6/P1/H3 ~17-22h full-feature) trong scope hẹp.

## Strategy chốt: SKELETON Phase 1 combo

Thay vì full-feature 5 plan riêng lẻ (5 session) → **1 session 1 commit mega skeleton**:
- Mig 39 mega 5 entity (Leave/OT/Travel/Vehicle/ItTicket) + Mig 40 Attendance — combine để tiết kiệm CI run
- BE skeleton: Create + List + GetById per module (defer ApproveV2 + workflow advance)
- FE skeleton: declarative generic `WorkflowAppsListPage` handle 4 module via :kind + kanban ItTickets + GPS Attendance + Dashboard KPI
- Status flat 5-state `WorkflowAppStatus` share (KHÔNG per-module LevelOpinions)

## Trade-off DEFER Phase 11 (ghi rõ commit message + 7 amber banner UI)

- ApproveV2 workflow advance level + LevelOpinions per-module
- LeaveBalance calc business logic + CodeGen atomic MaDonTu/MaTicket
- Vehicle catalog + Driver catalog (free text placeholder)
- ItTicketComments thread + Auto-assign round-robin + SLA timer
- AttendanceReport admin + Excel export + OtPolicy multiplier

## Kết quả

- **UAT visible 100%** — mọi route navigate được, sidebar 11 sub-menu live, list empty + check-in GPS button + Dashboard KPI thật (33 NV aggregate)
- **Workflow simplified** — Drafter Create OK, Approve flow chưa wire (defer)
- Run #247 PASS 3m25s (fastest) + 0 prod regression + 130 test unchanged
- Phase 10 = 11/11 atomic 100% (foundation deployed, polish defer)

## When to apply (decision rule)

✅ **DÙNG skeleton-first khi:**
- Anh main signal "finish cho xong" / scope hẹp / time-box
- Module pattern proven (mirror reference — Proposal pattern S37 → 5 module clone)
- UAT cần visible toàn bộ để feedback structure trước khi polish logic
- Trade-off defer KHÔNG ảnh hưởng data integrity (schema đầy đủ, chỉ logic defer)

❌ **KHÔNG skeleton khi:**
- Feature cần workflow hoàn chỉnh ngay (vd financial approval bắt buộc)
- Schema thiếu sẽ cần Mig breaking change sau (skeleton schema phải FULL từ đầu)

## Key insight

**Schema FULL + Logic SKELETON** — Mig 39+40 schema đầy đủ field (ApprovalWorkflowId pin, GPS lat/long, OtPolicyId FK) để Phase 11 wire logic KHÔNG cần Mig breaking. Defer chỉ ở Application/FE layer (handler logic + UI form), KHÔNG defer Domain/schema.

**Reusable cross-project:** "finish cho xong" request → skeleton-first với schema FULL + logic defer + trade-off ghi rõ commit + UI banner. UAT visible nhanh, polish iterative sau.

Related: [[feedback-phase10-namgroup-port]] [[feedback-declarative-kind-config-pattern]]
