[CLAUDE] Docs: S96 monthly drift audit + FD memory distill + mega-line re-tier
Monthly drift audit (2026-07-01, cron ngày 1) — workflow-prepared (wf_2d687d27-175, 4 clusters draft→adversarial-verify), em-main single-writer applied: - ef-core-migration/SKILL.md: latest-mig 56→59 + append table rows 57/58/59 + Mig 14 + Phase-7 Budget annotate DROPPED Mig 50 (S61) - skills/README.md: ef-core row Mig 55→59/S87 + gotcha cite #69→#76 (5 latest, authoritative gotchas.md headings) - docs/CLAUDE.md: Budget module marked REMOVED Mig 50 — §1 item 6 + roadmap Phase 7/8 rows (strike-through, non-destructive) - docs/governance/vocab-alias-map.md (NEW): 3 vocab-forks documented (run-trace / Ngân sách PRO / all-inherit canonical) + governance-detectors.ps1 $ExcludeExact entry (anti self-match) - re-tier STATUS/HANDOFF mega-line 5→3 blurbs (S92/S91 → archive verbatim, conservation delta=0, BOM preserved) + hoist 3 UAT-carry items to blockers FD memory distill (H17 loop strike-1 → CLEARED, GAPS: none): - frontend-designer L1 26129B→21492B: 5 old Activity war-stories → archive/2026-06.md + _INDEX + gist; Lessons value-protect distilled to L1 - budget.json measured.frontend-designer refreshed Detector 27→25 (2 real drift cleared; remaining = documented false-positives module-local/never-built-defer). AS-10 residual reviewer sub-write reverted (git-diff backstop, E-006 recurrence — guard HELD). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -42,12 +42,15 @@
|
|||||||
- ⚠️ **fe-admin parity follow-up:** same subtitle likely `text-slate-500` in fe-admin LoginPage — apply same bump next fe-admin touch (did NOT touch fe-admin this run; scope-disciplined).
|
- ⚠️ **fe-admin parity follow-up:** same subtitle likely `text-slate-500` in fe-admin LoginPage — apply same bump next fe-admin touch (did NOT touch fe-admin this run; scope-disciplined).
|
||||||
- Minor noted (NOT fixed, out of bounded scope): 2 `blur-3xl` blobs barely visible at 1440 = render cost ~0 payoff; eyebrow `tracking-[0.2em]` heavy. Candidates if login redesign requested.
|
- Minor noted (NOT fixed, out of bounded scope): 2 `blur-3xl` blobs barely visible at 1440 = render cost ~0 payoff; eyebrow `tracking-[0.2em]` heavy. Candidates if login redesign requested.
|
||||||
|
|
||||||
|
## Lessons / anti-patterns (value_protect — GIỮ L1 bất-kể tuổi)
|
||||||
|
- **Anti-truncation #53 (atomic-Write):** file lớn (>1000 LOC) = ONE atomic `Write` cả-file (lands-fully-or-errors, no half-break) + **EMIT change-list + build-verdict TRƯỚC khi vào FD2 screenshot loop** (2× truncate liên-tiếp CÙNG điểm rig-entry — S55/S58, em-main proxy recover). Truncate giữa-run → build ×2 verify.
|
||||||
|
- **Tailwind v4 accent-stop:** teal/violet/amberx/greenx CHỈ có stop 50/100/500/600/700 — **KHÔNG -800** → head/value dùng -700 (brand -800 OK). Dùng -800 = silent no-class (build PASS, phải soi dist CSS). Rail pseudo cần `before:content-['']` else ::before không render box.
|
||||||
|
- **Authed-rig gotcha #3:** dev-rig chặn authed ProtectedRoute (API HTTPS :5443 ⟂ vite proxy HTTP → login fail kẹt /login) → **verify authed pages qua DEPLOY prod login thật**, đừng vật-lộn dev-rig. Public /login chụp trực-tiếp OK.
|
||||||
|
- **Lucide alias-dodge:** icon từ export-aggregation-line (`SendHorizonal`) / mojibake token (`网络Placeholder` autocomplete) → dùng proven-safe export (`Send`), node-check icons trước build.
|
||||||
|
|
||||||
## Activity log
|
## Activity log
|
||||||
- **S79 (2026-06-19) PE list fe-user → DECOUPLE chọn/mở-rộng (anh chốt, annotated screenshot):** `pages/pe/PurchaseEvaluationsListPage.tsx`. S78 cũ: bấm dòng = mở overlay full-bleed, 2 panel giữa/phải LÀ placeholder vĩnh viễn. S79 đổi: **bấm dòng = inline 3-panel detail "như cũ" (8e68ed1)** + thêm nút **"Xem mở rộng"** mỗi dòng → overlay. Mechanism = param thứ-2 **`?expand=1`** cạnh `?id`: overlay render CHỈ khi `id && expand`; inline detail (panel giữa `<PeDetailTabs readOnly onBack=closeDetail>` + panel phải `<PeWorkflowPanel readOnly={!pendingMe} onApproved>`) render khi `id && !expand`. Handlers: `selectRow`=set id+clear expand (NHƯNG `<lg`/innerWidth<1024 → set expand=1 đi thẳng overlay vì 3-panel không vừa) · `expandRow`=id+expand=1 · `collapseFocus`(Thu gọn/Esc/backdrop)=`setParam('expand',null)` GIỮ id (về inline, KHÔNG về list) · `closeDetail`(← Đóng/del)=clear id+expand → list · `onApproved`=clear cả hai → list (phiếu rời inbox). Overlay gate đổi `hasSelection`→`overlayActive=id&&expand`; Esc gọi collapseFocus (không closeFocus). Nút "Xem mở rộng" = `Maximize2` (lucide, import THÊM) icon-btn 7×7 góc phải-trên mỗi leaf row, `opacity-0 group-hover/row:opacity-100` + `opacity-100` khi selected, `title`+`aria-label`+brand focus-ring; leaf `<button>` cũ bọc trong `<div className="group/row relative">` + `pr-9` chừa chỗ nút. **ALL logic VERBATIM** (grep ✓): 3 queryKey (`approval-workflows-v2-filter`/`pe-list`/`pe-detail`) · 3 endpoint (`/inbox`+paged+detail) · `del` mutation (onSuccess giờ clear id+expand thay `setParam`) · `yearGroups` 4-tầng tree memo · `PeUrgentChips` pill · search/filter/SLA/localStorage-expand. `PurchaseEvaluationDetailPage` route GIỮ. **slide+a11y S78 giữ NGUYÊN** (mount-rAF×2, role=dialog/aria-modal, focus-trap Tab-vòng, body scroll-lock, motion-reduce). `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 570ms** (3 warning pre-existing). **FD2: static layout-shell harness** (backend :5443 down → authed dev-rig blocked gotcha#3) — Playwright 6 shot × 3 state: (a) inline 3-panel desktop1920+laptop1280 = list+PeDetailTabs giữa+PeWorkflowPanel phải, dòng-chọn có nút Maximize2; (b) overlay 1920+1280 = full-bleed phiếu+panel cạnh; (c) mobile390 list (1-col, nút mở-rộng) + mobile390 overlay (stack). Read tất 6 PNG — đúng hết, no overflow, pill+tree intact. Harness/driver/shots ĐÃ XÓA. Rubric PASS. fe-admin NOT mirrored (implementer-frontend SHA-mirror riêng), no BE, no commit. Tag [s79, pe-decouple-select-expand, expand-param, maximize2-row-btn, inline-restore-8e68ed1, lg-straight-overlay, collapse-keeps-id, logic-verbatim, build-pass, harness-fd2].
|
- **S79 (2026-06-19) PE list fe-user → DECOUPLE chọn/mở-rộng (anh chốt, annotated screenshot):** `pages/pe/PurchaseEvaluationsListPage.tsx`. S78 cũ: bấm dòng = mở overlay full-bleed, 2 panel giữa/phải LÀ placeholder vĩnh viễn. S79 đổi: **bấm dòng = inline 3-panel detail "như cũ" (8e68ed1)** + thêm nút **"Xem mở rộng"** mỗi dòng → overlay. Mechanism = param thứ-2 **`?expand=1`** cạnh `?id`: overlay render CHỈ khi `id && expand`; inline detail (panel giữa `<PeDetailTabs readOnly onBack=closeDetail>` + panel phải `<PeWorkflowPanel readOnly={!pendingMe} onApproved>`) render khi `id && !expand`. Handlers: `selectRow`=set id+clear expand (NHƯNG `<lg`/innerWidth<1024 → set expand=1 đi thẳng overlay vì 3-panel không vừa) · `expandRow`=id+expand=1 · `collapseFocus`(Thu gọn/Esc/backdrop)=`setParam('expand',null)` GIỮ id (về inline, KHÔNG về list) · `closeDetail`(← Đóng/del)=clear id+expand → list · `onApproved`=clear cả hai → list (phiếu rời inbox). Overlay gate đổi `hasSelection`→`overlayActive=id&&expand`; Esc gọi collapseFocus (không closeFocus). Nút "Xem mở rộng" = `Maximize2` (lucide, import THÊM) icon-btn 7×7 góc phải-trên mỗi leaf row, `opacity-0 group-hover/row:opacity-100` + `opacity-100` khi selected, `title`+`aria-label`+brand focus-ring; leaf `<button>` cũ bọc trong `<div className="group/row relative">` + `pr-9` chừa chỗ nút. **ALL logic VERBATIM** (grep ✓): 3 queryKey (`approval-workflows-v2-filter`/`pe-list`/`pe-detail`) · 3 endpoint (`/inbox`+paged+detail) · `del` mutation (onSuccess giờ clear id+expand thay `setParam`) · `yearGroups` 4-tầng tree memo · `PeUrgentChips` pill · search/filter/SLA/localStorage-expand. `PurchaseEvaluationDetailPage` route GIỮ. **slide+a11y S78 giữ NGUYÊN** (mount-rAF×2, role=dialog/aria-modal, focus-trap Tab-vòng, body scroll-lock, motion-reduce). `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 570ms** (3 warning pre-existing). **FD2: static layout-shell harness** (backend :5443 down → authed dev-rig blocked gotcha#3) — Playwright 6 shot × 3 state: (a) inline 3-panel desktop1920+laptop1280 = list+PeDetailTabs giữa+PeWorkflowPanel phải, dòng-chọn có nút Maximize2; (b) overlay 1920+1280 = full-bleed phiếu+panel cạnh; (c) mobile390 list (1-col, nút mở-rộng) + mobile390 overlay (stack). Read tất 6 PNG — đúng hết, no overflow, pill+tree intact. Harness/driver/shots ĐÃ XÓA. Rubric PASS. fe-admin NOT mirrored (implementer-frontend SHA-mirror riêng), no BE, no commit. Tag [s79, pe-decouple-select-expand, expand-param, maximize2-row-btn, inline-restore-8e68ed1, lg-straight-overlay, collapse-keeps-id, logic-verbatim, build-pass, harness-fd2].
|
||||||
- **S69 (2026-06-17) OfficeDashboardPage.tsx fe-user — E-Office landing, PURO HomePage, COMPOSES 3 shared widgets:** built `pages/office/OfficeDashboardPage.tsx` (~400 LOC) over EXISTING data hooks of 4 modules. Read-first: 3 ui widgets (exact prop sigs) + 4 source pages (ProposalsListPage/WorkflowAppsListPage/ItTicketsPage/MeetingCalendarPage) to harvest queryKey+endpoint + types + App.tsx routes. **Reused hooks verbatim** → shared TanStack cache, ZERO new API/BE: `GET /proposals` (+inboxOnly query for needs-my-action) · `/leave|ot|travel-requests` (merged, countByStatus client-side) · `/it-tickets` · `/meeting-bookings` (today window). Layout = PageHeader(brand) + `lg:grid-cols-3` [LEFT col-span-2 = 4 WidgetCards w/ KpiCard filter-chip bodies | RIGHT col-span-1 = "Công việc của tôi" hero+MetricRows + "Thao tác nhanh" 3 buttons], 1-col <lg. **Routing insight (verified App.tsx):** đơn-từ + ticket have NO standalone `/new` route (creation in-page) → quick-actions point at landings `/workflow-apps/leave` + `/it-tickets` (only `/proposals/new` is a real create route) so no link hits the `*` "chưa build" fallback. Per-widget graceful states: WidgetError(retry)/WidgetSkeleton(pulse, motion-reduce)/empty — never blocks. a11y full (role=button+Enter/Space+focus-ring on clickables, reduced-motion). `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 434ms** (only pre-existing @import-order + chunk-size + INEFFECTIVE_DYNAMIC_IMPORT warnings — none from new file). Routing/menu NOT wired (next agent; page not yet in App.tsx). fe-admin NOT mirrored. FD2 authed-screenshot SKIP (ProtectedRoute + rig gotcha #3 — verify via deploy). Tag [s69, office-dashboard, compose-3-widgets, reuse-hooks-shared-cache, no-new-be, routing-existing-only, build-pass].
|
- **S69 (2026-06-17) OfficeDashboardPage.tsx fe-user — E-Office landing, PURO HomePage, COMPOSES 3 shared widgets:** built `pages/office/OfficeDashboardPage.tsx` (~400 LOC) over EXISTING data hooks of 4 modules. Read-first: 3 ui widgets (exact prop sigs) + 4 source pages (ProposalsListPage/WorkflowAppsListPage/ItTicketsPage/MeetingCalendarPage) to harvest queryKey+endpoint + types + App.tsx routes. **Reused hooks verbatim** → shared TanStack cache, ZERO new API/BE: `GET /proposals` (+inboxOnly query for needs-my-action) · `/leave|ot|travel-requests` (merged, countByStatus client-side) · `/it-tickets` · `/meeting-bookings` (today window). Layout = PageHeader(brand) + `lg:grid-cols-3` [LEFT col-span-2 = 4 WidgetCards w/ KpiCard filter-chip bodies | RIGHT col-span-1 = "Công việc của tôi" hero+MetricRows + "Thao tác nhanh" 3 buttons], 1-col <lg. **Routing insight (verified App.tsx):** đơn-từ + ticket have NO standalone `/new` route (creation in-page) → quick-actions point at landings `/workflow-apps/leave` + `/it-tickets` (only `/proposals/new` is a real create route) so no link hits the `*` "chưa build" fallback. Per-widget graceful states: WidgetError(retry)/WidgetSkeleton(pulse, motion-reduce)/empty — never blocks. a11y full (role=button+Enter/Space+focus-ring on clickables, reduced-motion). `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 434ms** (only pre-existing @import-order + chunk-size + INEFFECTIVE_DYNAMIC_IMPORT warnings — none from new file). Routing/menu NOT wired (next agent; page not yet in App.tsx). fe-admin NOT mirrored. FD2 authed-screenshot SKIP (ProtectedRoute + rig gotcha #3 — verify via deploy). Tag [s69, office-dashboard, compose-3-widgets, reuse-hooks-shared-cache, no-new-be, routing-existing-only, build-pass].
|
||||||
- **S69 (2026-06-17) Văn phòng số / Đơn từ fe-user RE-SKIN (PURO + HRM visual lang) — 2 file, CONSUMES shared ui (parallel fan-out, 7 agents same app):** surgical re-skin (KHÔNG rewrite) `pages/office/WorkflowAppsListPage.tsx` + `WorkflowAppDetailPage.tsx` (`:kind`-driven leave/ot/travel/vehicle via KIND_CONFIG). **LIST:** swap `@/components/PageHeader`(constrained)→`@/components/ui/PageHeader`(eyebrow "Văn phòng số · Đơn từ" / title từ KIND_CONFIG / icon per-kind / **accent teal**) + status filter = ROW 4 `ui/KpiCard` (Tất cả teal / Đã gửi duyệt amberx / Trả lại violet / Đã duyệt greenx, `grid-cols-2 sm:grid-cols-4`) + slate table chrome (thead uppercase 11px slate-500, hover teal-50). **Filter là CLIENT-SIDE view** — added `useState<StatusFilter>` + 2 `useMemo` (counts + visibleItems) DERIVED over already-fetched `items`; **KHÔNG touch query/endpoint/queryKey/navigation** (page chỉ fetch `page:1` như cũ, không có filter-state sẵn nên thêm view-layer = thuần presentation; empty-state phân biệt "chưa có data" vs "không có đơn ở trạng thái này"). **DETAIL:** ui/PageHeader teal + 4 section dùng local `Card`(accent-rail pseudo `before:bg-{x}-500` + icon-chip) + `Field`(label uppercase `text-{x}-700`, value `text-brand-800`) — copy idiom HRM EmployeesListPage (KHÔNG import HRM, helper local riêng). Accent gán: Thông tin=teal · Số dư phép=greenx · Quy trình=violet · Ý kiến=brand. Status badge giữ `WORKFLOW_APP_STATUS_BADGE`. Drop raw "⚠️" emoji trong over-budget banner→text thuần (anti-slop FD3). **ALL data logic VERBATIM** (grep-verified): 2 query `[endpoint,id]`+`['approval-workflows-v2',applicableType]` (key/endpoint/`enabled` y nguyên) · 3 mutation pinWorkflow(PUT /workflow)/submit(POST /submit)/action(POST /{k}) body+onSuccess+invalidate identical · 3 state + flags isDraft/isInWorkflow/hasWorkflow + mọi onClick/nav target bất biến. **gotcha Tailwind-v4 stop:** dùng CHỈ -50/-500/-700 cho teal/violet/amberx/greenx (no -800) — `border-l-greenx-500`/`bg-amberx-50`/`text-amberx-700` đều stop tồn tại (index.css verified). **Self-caught:** `SendHorizonal` (KpiCard "Đã gửi duyệt" icon) export-aggregation-line trong lucide d.ts → đổi `Send` (proven-safe export) tránh alias-risk. Self-review: mọi import resolve, 0 unused local (noUnusedLocals strict) — `Info`/`Wallet`/`GitBranch`/`MessageSquareText` đều dùng. **KHÔNG run npm build** (em main builds central, 7-agent parallel interference) + KHÔNG modify ui/index.css (other agents edit). FD2 authed-screenshot SKIP (ProtectedRoute + rig gotcha #3 — verify via deploy). fe-admin NOT mirrored. Tag [s69, eoffice-donutu-reskin, puro-hrm-visual, consume-ui-pageheader-kpicard, client-side-filter-view, logic-verbatim, no-build-parallel-fanout, lucide-alias-dodge].
|
- **S69 (2026-06-17) Văn phòng số / Đơn từ fe-user RE-SKIN (PURO + HRM visual lang) — 2 file, CONSUMES shared ui (parallel fan-out, 7 agents same app):** surgical re-skin (KHÔNG rewrite) `pages/office/WorkflowAppsListPage.tsx` + `WorkflowAppDetailPage.tsx` (`:kind`-driven leave/ot/travel/vehicle via KIND_CONFIG). **LIST:** swap `@/components/PageHeader`(constrained)→`@/components/ui/PageHeader`(eyebrow "Văn phòng số · Đơn từ" / title từ KIND_CONFIG / icon per-kind / **accent teal**) + status filter = ROW 4 `ui/KpiCard` (Tất cả teal / Đã gửi duyệt amberx / Trả lại violet / Đã duyệt greenx, `grid-cols-2 sm:grid-cols-4`) + slate table chrome (thead uppercase 11px slate-500, hover teal-50). **Filter là CLIENT-SIDE view** — added `useState<StatusFilter>` + 2 `useMemo` (counts + visibleItems) DERIVED over already-fetched `items`; **KHÔNG touch query/endpoint/queryKey/navigation** (page chỉ fetch `page:1` như cũ, không có filter-state sẵn nên thêm view-layer = thuần presentation; empty-state phân biệt "chưa có data" vs "không có đơn ở trạng thái này"). **DETAIL:** ui/PageHeader teal + 4 section dùng local `Card`(accent-rail pseudo `before:bg-{x}-500` + icon-chip) + `Field`(label uppercase `text-{x}-700`, value `text-brand-800`) — copy idiom HRM EmployeesListPage (KHÔNG import HRM, helper local riêng). Accent gán: Thông tin=teal · Số dư phép=greenx · Quy trình=violet · Ý kiến=brand. Status badge giữ `WORKFLOW_APP_STATUS_BADGE`. Drop raw "⚠️" emoji trong over-budget banner→text thuần (anti-slop FD3). **ALL data logic VERBATIM** (grep-verified): 2 query `[endpoint,id]`+`['approval-workflows-v2',applicableType]` (key/endpoint/`enabled` y nguyên) · 3 mutation pinWorkflow(PUT /workflow)/submit(POST /submit)/action(POST /{k}) body+onSuccess+invalidate identical · 3 state + flags isDraft/isInWorkflow/hasWorkflow + mọi onClick/nav target bất biến. **gotcha Tailwind-v4 stop:** dùng CHỈ -50/-500/-700 cho teal/violet/amberx/greenx (no -800) — `border-l-greenx-500`/`bg-amberx-50`/`text-amberx-700` đều stop tồn tại (index.css verified). **Self-caught:** `SendHorizonal` (KpiCard "Đã gửi duyệt" icon) export-aggregation-line trong lucide d.ts → đổi `Send` (proven-safe export) tránh alias-risk. Self-review: mọi import resolve, 0 unused local (noUnusedLocals strict) — `Info`/`Wallet`/`GitBranch`/`MessageSquareText` đều dùng. **KHÔNG run npm build** (em main builds central, 7-agent parallel interference) + KHÔNG modify ui/index.css (other agents edit). FD2 authed-screenshot SKIP (ProtectedRoute + rig gotcha #3 — verify via deploy). fe-admin NOT mirrored. Tag [s69, eoffice-donutu-reskin, puro-hrm-visual, consume-ui-pageheader-kpicard, client-side-filter-view, logic-verbatim, no-build-parallel-fanout, lucide-alias-dodge].
|
||||||
- **S66 (2026-06-16) HRM Hồ sơ Nhân sự fe-user REFINE từ eoffice LIVE (3 việc) — layout 3-cột→2-cột + tô màu detail:** anh góp ý sau khi xem prod. **Việc 1 (layout):** 3-cột-ngang `[tree 244 | list 352 | detail 1fr]` → **2-cột** `lg:grid-cols-[22rem_1fr] xl:[24rem_1fr]`: CỘT TRÁI = `<div flex flex-col gap-4>` ôm tree (TRÊN, `lg:max-h-[44%] lg:shrink-0`, overflow-auto) + list+filter (DƯỚI, `flex-1`, overflow-auto) — mỗi panel cuộn độc lập; CỘT PHẢI = detail (flex-1, rộng hơn nhiều, đỡ chật). <lg vẫn 1-col tree→list→detail + giữ nguyên `treeOpenMobile` toggle. **Việc 2+3 (màu detail):** thêm `ACCENT` map 5 tone (brand/teal/violet/amberx/greenx) → `Card` prop `accent` tô icon-chip nền nhạt (`--chip-bg/--chip-fg`) + heading `text-{x}-700` + rail trái pseudo-element; `Field` label uppercase `text-{x}-700` semibold (was slate-400 đơn điệu) + value `font-medium text-slate-900`; mỗi card/section gán 1 accent → có màu rõ nhưng tinh tế, brand #1F7DC1 + Be Vietnam Pro + avatar gradient brand GIỮ. **Strategy chống truncation #53 = ONE atomic `Write` cả file** (1556 LOC) → emit change-list + build status SỚM. **2 self-caught bug TRƯỚC build:** (1) `text-{teal,violet,greenx}-800` — accent palettes KHÔNG có stop -800 (chỉ 50/100/500/600/700) → Tailwind v4 silent no-class → đổi head sang -700 (all AA on white); (2) rail pseudo thiếu `before:content-['']` → ::before không render box → thêm. `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 495ms** (warning @import-order + chunk-size = pre-existing, không phải mình). **5 satellite CRUD + 15 satellite api endpoint + top-level del + 3 reads + 3 query keys (employees-list/employee-detail/departments-tree-hrm) + cây SOLUTION COMPANY + 5 tab + search/filter preserved VERBATIM** (grep: 15 satellite api.post/put/delete + 3 queryKey + 5 form fns; tsc type-checks mọi payload shape = wiring bất biến). FD2 authed-screenshot SKIPPED per task instruction + gotcha #3 (rig chặn authed ProtectedRoute; anh xem qua deploy) → structural verify thay thế. fe-admin + BE NOT touched, no commit (em main commits). Tag [s66, hrm-2col-refine, eoffice-ref, accent-system, atomic-write-antitrunc, crud-preserved, build-pass, tailwind-v4-stop-gotcha].
|
|
||||||
- **S65 (2026-06-16) HRM Hồ sơ Nhân sự fe-user → 3-panel master-detail NamGroup-ref:** RESTRUCTURE `EmployeesListPage.tsx` (1201→~1140 LOC) — 6 `<details>` → [Org tree | List | Detail 5-tab]. **Strategy chống truncation #53 = ONE atomic `Write` (cả file)** thay piecemeal Edit (atomic Write either fully-lands or errors, KHÔNG half-break) → emit change-list TRƯỚC build → DID BOTH Part A (avatar header+5 tab+section→tab redistribution) + Part B (org tree panel) trong 1 pass, không phải defer B. Org tree consume `/departments/tree` verified BE-side (DepartmentFeatures.cs DepartmentTreeNodeDto, controller `[HttpGet("tree")]`, class-Authorize only). Foundation màu mới DÙNG: `.app-gradient-brand` header / `.icon-chip` / accent palette teal/violet/amberx/greenx (avatar tones) — brand #1F7DC1 + Be Vietnam Pro KEPT. **5 satellite CRUD + 16 api endpoint + query keys preserved VERBATIM** (grep-verified: 16 api.post/put/delete identical payload shape, 5 form fns intact). `npm run build` (tsc -b strict + vite) **PASS 0 TS err, 6.13s**. 1 self-caught bug: typo garbage token `网络Placeholder` trong lucide import (mojibake autocomplete) → removed, all 21 icons valid (node-checked). FD2 authed-screenshot SKIPPED per explicit task instruction + gotcha #3 (rig blocks authed; anh xem qua deploy) — did static structural verify instead (grep endpoint/key preservation). fe-admin NOT touched (mirror = separate pass), no commit. Tag [s65, hrm-3panel, namgroup-ref, atomic-write-antitrunc, crud-preserved, build-pass].
|
> _Older Activity (S66/S65/S58/S55/S47 · 2026-06-02→16) → `archive/2026-06.md` verbatim · map `archive/_INDEX.md` · distill `archive/2026-06.gist.md`. Curated @S96 first-overflow (L1 26129B > autoinject-cap 25600B, H17-loop strike-1)._
|
||||||
- **S58 (2026-06-11) fe-user redesign theo UI/UX guide AI_INFRA canonical — KEEP brand [em main proxy — truncated #53 giữa FD2 screenshot, 2nd consecutive]:** Mirror design-system fe-admin S55 → 14 file fe-user (index.css heading-ladder+.label-eyebrow / 6 ui primitives — Button gần SHA-identical fe-admin chỉ khác comment / 6 shell DataTable+RowActions-additive·Layout-brand-left-rail·TopBar·PageHeader·PhaseBadge-ring·EmptyState / LoginPage polish). Rubric mới = guide 13 mục `D:\Dropbox\CONG_VIEC\AI_INFRA\docs\reference\ui-ux-design-guide.md` (density 14px/h32-34/radius-8/thead-sticky/action-luôn-hiện/no-font-bold). BRAND KEPT: #1F7DC1 + Be Vietnam Pro + slate (guide cho plug hue riêng). Chết NGAY TRƯỚC with_server.py screenshot /login → em main recover: build ×2 PASS 0 TS + diff-review key-stability từng file + ship `e959f72`; authed visual qua deploy prod (rig-gotcha #3 standing). LESSON: 2 lần liên tiếp truncate ở CÙNG điểm (sau khi sửa xong, lúc bắt đầu FD2 rig) → lần sau EMIT file-list verdict TRƯỚC khi vào screenshot loop. Tag [s58, fe-user-redesign, guide-aiinfra, keep-brand, truncated-53-proxy].
|
|
||||||
- **S55 (2026-06-09) Phase-1 fe-admin redesign — density-first NAMGROUP-ref, KEEP brand** [em main proxy — truncated #53]: 14 file (index.css density ladder + 6 ui primitive Button h-7/8/10 brand-ring + 6 shell + DashboardPage KPI). Brand #1F7DC1+Be Vietnam Pro KEPT. build 0 TS. Visual loop BLOCKED authed-rig#3 → chỉ /login. → S58 mirror sang fe-user. (detail archive nếu cần). Tag [s55, density-namgroup, keep-brand].
|
|
||||||
- **S47 (2026-06-02) FD2 RIG VERIFIED ✅** — first real spawn. Ran full FD2 loop end-to-end on fe-user `/login`: read DS (Tailwind v4 CSS-first, corrected stale config-path assumption) → started Vite via `with_server.py` → Playwright screenshot 375+1440 → Read PNGs → FD4 critique → 1-line contrast fix → re-screenshot confirmed → `npm run build` 0 TS error. Closes adap-report `2026-06-02-Agent-frontend-designer-floor` FD2 runtime proof. 2 Vite gotchas captured above. Loop is REAL, not theoretical.
|
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
# frontend-designer — archive 2026-06.gist (L2 distill · 4-field · distill-gen 1)
|
||||||
|
|
||||||
|
> Coverage-gate: every gotcha#/lesson/file:line/root-cause/surprise in `2026-06.md` verbatim survives here (or N/A). Distilled @S96 (2026-07-01) from `2026-06.md`. FROZEN once written; re-distill bumps distill-gen.
|
||||||
|
|
||||||
|
### S66 hrm-2col-refine (2026-06-16)
|
||||||
|
- **task:** HRM Hồ sơ Nhân sự fe-user REFINE (anh prod-feedback): layout 3-cột→2-cột + tô màu detail (ACCENT 5-tone brand/teal/violet/amberx/greenx).
|
||||||
|
- **verdict:** build PASS 0 TS 495ms; 5 satellite CRUD + 15 api endpoint + 3 query keys VERBATIM (grep+tsc).
|
||||||
|
- **learned:** 2-col `lg:grid-cols-[22rem_1fr] xl:[24rem_1fr]`; left = tree(top, max-h-44%)+list(bottom) độc-lập-cuộn; Card `accent` prop → icon-chip tinted + head text-{x}-700 + rail pseudo.
|
||||||
|
- **surprise/gotcha:** accent palettes NO -800 (chỉ 50/100/500/600/700) → head -700 else silent no-class; rail pseudo cần `before:content-['']`; atomic-Write cả-file = anti-truncation #53.
|
||||||
|
|
||||||
|
### S65 hrm-3panel (2026-06-16)
|
||||||
|
- **task:** EmployeesListPage 1201→~1140 LOC → [Org tree | List | Detail 5-tab] master-detail (NamGroup-ref).
|
||||||
|
- **verdict:** build PASS 0 TS 6.13s; 5 CRUD + 16 api + query keys VERBATIM.
|
||||||
|
- **learned:** ONE atomic `Write` whole-file = anti-#53 (lands-fully-or-errors, no half-break); emit change-list BEFORE build; org-tree consume `/departments/tree` (DepartmentTreeNodeDto).
|
||||||
|
- **surprise/gotcha:** mojibake garbage token `网络Placeholder` in lucide import (autocomplete) → removed, node-checked 21 icons.
|
||||||
|
|
||||||
|
### S58 fe-user-redesign (2026-06-11)
|
||||||
|
- **task:** mirror fe-admin S55 design-system → 14 file fe-user, KEEP brand #1F7DC1.
|
||||||
|
- **verdict:** build ×2 PASS 0 TS; shipped `e959f72` (em-main PROXY — FD truncated #53 mid-run).
|
||||||
|
- **learned:** rubric = AI_INFRA `ui-ux-design-guide.md` 13-mục (density 14px/h32/radius-8/thead-sticky/action-luôn-hiện). **LESSON: 2× consecutive truncate at SAME point (start of FD2 screenshot rig) → EMIT file-list+build verdict BEFORE screenshot loop.**
|
||||||
|
- **surprise/gotcha:** #53 truncate at rig-entry (2nd consecutive); authed visual via deploy (rig gotcha #3 standing).
|
||||||
|
|
||||||
|
### S55 density-namgroup (2026-06-09)
|
||||||
|
- **task:** Phase-1 fe-admin redesign density-first (NAMGROUP-ref, 14 file), KEEP brand.
|
||||||
|
- **verdict:** build 0 TS; em-main proxy (truncated #53). → S58 mirrored to fe-user.
|
||||||
|
- **learned:** density ladder (Button h-7/8/10 brand-ring); brand #1F7DC1 + Be Vietnam Pro kept.
|
||||||
|
- **surprise/gotcha:** visual loop BLOCKED by authed-rig #3 → chỉ /login screenshot.
|
||||||
|
|
||||||
|
### S47 fd2-rig-verified (2026-06-02)
|
||||||
|
- **task:** first real spawn — run full FD2 visual-verification loop end-to-end on fe-user /login.
|
||||||
|
- **verdict:** loop REAL (screenshot 375+1440 → FD4 critique → 1-line contrast fix slate-500→600 → re-shot → build 0 TS); closes adap-report FD2 runtime proof.
|
||||||
|
- **learned:** Tailwind v4 CSS-first (no config.js; tokens in `index.css` @theme, brand-600=#1f7dc1); with_server.py rig pattern (Python Playwright not npm).
|
||||||
|
- **surprise/gotcha:** 2 Vite gotchas — (1) `networkidle` NEVER fires (HMR ws) → `domcontentloaded`+`wait_for_selector`; (2) first cold goto dep-optimize >15s → warm-up goto 60s timeout.
|
||||||
11
.claude/agent-memory/frontend-designer/archive/2026-06.md
Normal file
11
.claude/agent-memory/frontend-designer/archive/2026-06.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# frontend-designer — archive 2026-06 (L2 verbatim · FROZEN additive)
|
||||||
|
|
||||||
|
> Curated from L1 `MEMORY.md` @S96 (2026-07-01) — first-overflow distillation (L1 hit 26129B > autoinject-cap 25600B, H17-loop strike-1). Older Activity-log war-stories moved here VERBATIM (byte-exact, additive-only — NEVER rewrite existing bytes). Recent 3 (S79/S69×2) + all reference sections (design-system · FD2-rig · component-inventory · lessons) stay in L1. Map → `_INDEX.md` · 4-field distill → `2026-06.gist.md`.
|
||||||
|
|
||||||
|
## Activity log (archived — moved-set, newest-of-moved on top)
|
||||||
|
|
||||||
|
- **S66 (2026-06-16) HRM Hồ sơ Nhân sự fe-user REFINE từ eoffice LIVE (3 việc) — layout 3-cột→2-cột + tô màu detail:** anh góp ý sau khi xem prod. **Việc 1 (layout):** 3-cột-ngang `[tree 244 | list 352 | detail 1fr]` → **2-cột** `lg:grid-cols-[22rem_1fr] xl:[24rem_1fr]`: CỘT TRÁI = `<div flex flex-col gap-4>` ôm tree (TRÊN, `lg:max-h-[44%] lg:shrink-0`, overflow-auto) + list+filter (DƯỚI, `flex-1`, overflow-auto) — mỗi panel cuộn độc lập; CỘT PHẢI = detail (flex-1, rộng hơn nhiều, đỡ chật). <lg vẫn 1-col tree→list→detail + giữ nguyên `treeOpenMobile` toggle. **Việc 2+3 (màu detail):** thêm `ACCENT` map 5 tone (brand/teal/violet/amberx/greenx) → `Card` prop `accent` tô icon-chip nền nhạt (`--chip-bg/--chip-fg`) + heading `text-{x}-700` + rail trái pseudo-element; `Field` label uppercase `text-{x}-700` semibold (was slate-400 đơn điệu) + value `font-medium text-slate-900`; mỗi card/section gán 1 accent → có màu rõ nhưng tinh tế, brand #1F7DC1 + Be Vietnam Pro + avatar gradient brand GIỮ. **Strategy chống truncation #53 = ONE atomic `Write` cả file** (1556 LOC) → emit change-list + build status SỚM. **2 self-caught bug TRƯỚC build:** (1) `text-{teal,violet,greenx}-800` — accent palettes KHÔNG có stop -800 (chỉ 50/100/500/600/700) → Tailwind v4 silent no-class → đổi head sang -700 (all AA on white); (2) rail pseudo thiếu `before:content-['']` → ::before không render box → thêm. `npm run build` (tsc -b strict + vite v8) **PASS 0 TS err, 495ms** (warning @import-order + chunk-size = pre-existing, không phải mình). **5 satellite CRUD + 15 satellite api endpoint + top-level del + 3 reads + 3 query keys (employees-list/employee-detail/departments-tree-hrm) + cây SOLUTION COMPANY + 5 tab + search/filter preserved VERBATIM** (grep: 15 satellite api.post/put/delete + 3 queryKey + 5 form fns; tsc type-checks mọi payload shape = wiring bất biến). FD2 authed-screenshot SKIPPED per task instruction + gotcha #3 (rig chặn authed ProtectedRoute; anh xem qua deploy) → structural verify thay thế. fe-admin + BE NOT touched, no commit (em main commits). Tag [s66, hrm-2col-refine, eoffice-ref, accent-system, atomic-write-antitrunc, crud-preserved, build-pass, tailwind-v4-stop-gotcha].
|
||||||
|
- **S65 (2026-06-16) HRM Hồ sơ Nhân sự fe-user → 3-panel master-detail NamGroup-ref:** RESTRUCTURE `EmployeesListPage.tsx` (1201→~1140 LOC) — 6 `<details>` → [Org tree | List | Detail 5-tab]. **Strategy chống truncation #53 = ONE atomic `Write` (cả file)** thay piecemeal Edit (atomic Write either fully-lands or errors, KHÔNG half-break) → emit change-list TRƯỚC build → DID BOTH Part A (avatar header+5 tab+section→tab redistribution) + Part B (org tree panel) trong 1 pass, không phải defer B. Org tree consume `/departments/tree` verified BE-side (DepartmentFeatures.cs DepartmentTreeNodeDto, controller `[HttpGet("tree")]`, class-Authorize only). Foundation màu mới DÙNG: `.app-gradient-brand` header / `.icon-chip` / accent palette teal/violet/amberx/greenx (avatar tones) — brand #1F7DC1 + Be Vietnam Pro KEPT. **5 satellite CRUD + 16 api endpoint + query keys preserved VERBATIM** (grep-verified: 16 api.post/put/delete identical payload shape, 5 form fns intact). `npm run build` (tsc -b strict + vite) **PASS 0 TS err, 6.13s**. 1 self-caught bug: typo garbage token `网络Placeholder` trong lucide import (mojibake autocomplete) → removed, all 21 icons valid (node-checked). FD2 authed-screenshot SKIPPED per explicit task instruction + gotcha #3 (rig blocks authed; anh xem qua deploy) — did static structural verify instead (grep endpoint/key preservation). fe-admin NOT touched (mirror = separate pass), no commit. Tag [s65, hrm-3panel, namgroup-ref, atomic-write-antitrunc, crud-preserved, build-pass].
|
||||||
|
- **S58 (2026-06-11) fe-user redesign theo UI/UX guide AI_INFRA canonical — KEEP brand [em main proxy — truncated #53 giữa FD2 screenshot, 2nd consecutive]:** Mirror design-system fe-admin S55 → 14 file fe-user (index.css heading-ladder+.label-eyebrow / 6 ui primitives — Button gần SHA-identical fe-admin chỉ khác comment / 6 shell DataTable+RowActions-additive·Layout-brand-left-rail·TopBar·PageHeader·PhaseBadge-ring·EmptyState / LoginPage polish). Rubric mới = guide 13 mục `D:\Dropbox\CONG_VIEC\AI_INFRA\docs\reference\ui-ux-design-guide.md` (density 14px/h32-34/radius-8/thead-sticky/action-luôn-hiện/no-font-bold). BRAND KEPT: #1F7DC1 + Be Vietnam Pro + slate (guide cho plug hue riêng). Chết NGAY TRƯỚC with_server.py screenshot /login → em main recover: build ×2 PASS 0 TS + diff-review key-stability từng file + ship `e959f72`; authed visual qua deploy prod (rig-gotcha #3 standing). LESSON: 2 lần liên tiếp truncate ở CÙNG điểm (sau khi sửa xong, lúc bắt đầu FD2 rig) → lần sau EMIT file-list verdict TRƯỚC khi vào screenshot loop. Tag [s58, fe-user-redesign, guide-aiinfra, keep-brand, truncated-53-proxy].
|
||||||
|
- **S55 (2026-06-09) Phase-1 fe-admin redesign — density-first NAMGROUP-ref, KEEP brand** [em main proxy — truncated #53]: 14 file (index.css density ladder + 6 ui primitive Button h-7/8/10 brand-ring + 6 shell + DashboardPage KPI). Brand #1F7DC1+Be Vietnam Pro KEPT. build 0 TS. Visual loop BLOCKED authed-rig#3 → chỉ /login. → S58 mirror sang fe-user. (detail archive nếu cần). Tag [s55, density-namgroup, keep-brand].
|
||||||
|
- **S47 (2026-06-02) FD2 RIG VERIFIED ✅** — first real spawn. Ran full FD2 loop end-to-end on fe-user `/login`: read DS (Tailwind v4 CSS-first, corrected stale config-path assumption) → started Vite via `with_server.py` → Playwright screenshot 375+1440 → Read PNGs → FD4 critique → 1-line contrast fix → re-screenshot confirmed → `npm run build` 0 TS error. Closes adap-report `2026-06-02-Agent-frontend-designer-floor` FD2 runtime proof. 2 Vite gotchas captured above. Loop is REAL, not theoretical.
|
||||||
10
.claude/agent-memory/frontend-designer/archive/_INDEX.md
Normal file
10
.claude/agent-memory/frontend-designer/archive/_INDEX.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# frontend-designer — archive _INDEX (L2 map · inject the map, not the territory)
|
||||||
|
|
||||||
|
> One line per archived entry. Pointer = unique substring (Ctrl-F in `2026-06.md`). NO line-hints (additive appends shift lines). Built @S96 (2026-07-01). Verbatim → `2026-06.md` · 4-field distill → `2026-06.gist.md`.
|
||||||
|
|
||||||
|
## 2026-06 (5 entries · S66→S47)
|
||||||
|
- **S66 hrm-2col-refine** (2026-06-16) — HRM Hồ sơ 3-cột→2-cột + accent-detail 5-tone; Tailwind-v4 -800-stop self-caught ×2 + rail `before:content-['']`; atomic-Write anti-#53; 5 CRUD+15 api verbatim. → find `S66 (2026-06-16) HRM Hồ sơ`
|
||||||
|
- **S65 hrm-3panel** (2026-06-16) — EmployeesListPage → 3-panel master-detail NamGroup-ref; ONE atomic Write anti-#53; mojibake `网络Placeholder` lucide self-caught; org-tree `/departments/tree`. → find `S65 (2026-06-16) HRM Hồ sơ`
|
||||||
|
- **S58 fe-user-redesign** (2026-06-11) — mirror fe-admin DS → 14 file fe-user KEEP brand; truncated-#53 2nd-consecutive (em-main proxy, ship `e959f72`); LESSON emit-file-list-before-FD2-loop. → find `S58 (2026-06-11) fe-user redesign`
|
||||||
|
- **S55 density-namgroup** (2026-06-09) — Phase-1 fe-admin redesign density-first KEEP brand; em-main proxy #53; authed-rig#3 blocked → /login only; → S58 mirror. → find `S55 (2026-06-09) Phase-1 fe-admin`
|
||||||
|
- **S47 fd2-rig-verified** (2026-06-02) — first real spawn; FD2 loop end-to-end proven /login; Tailwind-v4 CSS-first; 2 Vite gotchas (networkidle-never-fires + cold-goto-dep-optimize). → find `S47 (2026-06-02) FD2 RIG VERIFIED`
|
||||||
@ -106,7 +106,7 @@
|
|||||||
"investigator-codebase": { "l1_hot": 10281, "l2_verbatim": 102446, "l2_index": 12308, "l2_gist": 27297, "rollout": "done (re-curated S80: 15 recon entries -> archive)" },
|
"investigator-codebase": { "l1_hot": 10281, "l2_verbatim": 102446, "l2_index": 12308, "l2_gist": 27297, "rollout": "done (re-curated S80: 15 recon entries -> archive)" },
|
||||||
"reviewer": { "l1_hot": 10242, "l2_verbatim": 92316, "l2_index": 10067, "l2_gist": 19114, "rollout": "done (re-curated S80: 13 war-story entries -> archive)" },
|
"reviewer": { "l1_hot": 10242, "l2_verbatim": 92316, "l2_index": 10067, "l2_gist": 19114, "rollout": "done (re-curated S80: 13 war-story entries -> archive)" },
|
||||||
"implementer-backend": { "l1_hot": 19394, "l2_verbatim": 59233, "l2_index": 10105, "l2_gist": 23079, "rollout": "done" },
|
"implementer-backend": { "l1_hot": 19394, "l2_verbatim": 59233, "l2_index": 10105, "l2_gist": 23079, "rollout": "done" },
|
||||||
"frontend-designer": { "l1_hot": 26129, "l2_verbatim": 0, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (no archive); OVER autoinject-cap 25600 (under soft-cap 30720) -- WATCH strike-1, first-overflow needs _INDEX/gist build" },
|
"frontend-designer": { "l1_hot": 21492, "l2_verbatim": 6624, "l2_index": 1531, "l2_gist": 3231, "rollout": "done (S96 first-overflow curate: 5 old Activity war-stories S66/S65/S58/S55/S47 -> L2 verbatim + _INDEX map + gist; Lessons value-protect distilled to L1; back under autoinject-cap 25600)" },
|
||||||
"test-specialist": { "l1_hot": 27723, "l2_verbatim": 5546, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (tiny archive, no _INDEX); OVER autoinject-cap 25600 (under soft-cap) -- WATCH strike-1; value-protect FLAG fired S81 (gotcha#/guard in move-set)" },
|
"test-specialist": { "l1_hot": 27723, "l2_verbatim": 5546, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (tiny archive, no _INDEX); OVER autoinject-cap 25600 (under soft-cap) -- WATCH strike-1; value-protect FLAG fired S81 (gotcha#/guard in move-set)" },
|
||||||
"harvest-curator": { "l1_hot": 18952, "l2_verbatim": 0, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (no archive)" },
|
"harvest-curator": { "l1_hot": 18952, "l2_verbatim": 0, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (no archive)" },
|
||||||
"tooling-auditor": { "l1_hot": 18431, "l2_verbatim": 0, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (no archive)" },
|
"tooling-auditor": { "l1_hot": 18431, "l2_verbatim": 0, "l2_index": 0, "l2_gist": 0, "rollout": "n/a (no archive)" },
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Skill này là tài liệu chuyên biệt để Claude (và developer khác) dù
|
|||||||
| Skill | Mục đích | Trigger ví dụ | Trạng thái |
|
| Skill | Mục đích | Trigger ví dụ | Trạng thái |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 |
|
| `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 |
|
||||||
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất Mig 55; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S74 (Mig 55 PE CcmNote) |
|
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, migration history (mới nhất Mig 59; số → `docs/STATUS.md`) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S87 (Mig 59 PE CcmBudgetPeriod; số → `docs/STATUS.md`) |
|
||||||
| `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) |
|
| `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) |
|
||||||
|
|
||||||
## Format chuẩn 1 skill
|
## Format chuẩn 1 skill
|
||||||
@ -87,5 +87,5 @@ when-to-use:
|
|||||||
## Related
|
## Related
|
||||||
|
|
||||||
- `docs/CLAUDE.md` — quick rules + full stack context
|
- `docs/CLAUDE.md` — quick rules + full stack context
|
||||||
- `docs/gotchas.md` — bẫy đã gặp (số hiện tại → `docs/STATUS.md`; latest #69 FE bundle-hash non-deterministic + deploy rebuild-FE-unconditional, S72; #68 IDE TS diagnostic giữa background-agent/workflow = snapshot dở-dang → chỉ tin build sạch sau-cùng, S69; #67 Tailwind v4 accent palette thiếu-stop vỡ-màu im-lặng; #66 rule `h1-h4{color}` unlayered thắng utility `text-white`, S68)
|
- `docs/gotchas.md` — bẫy đã gặp (số hiện tại → `docs/STATUS.md`; latest #76 `deploy.yml` render `appsettings.Production.json` từ `.example` mỗi deploy → prod thiếu config gitignored, S91; #75 seed demo UNGATED per-code → RE-ADD data đã wipe mỗi restart (wipe KHÔNG bền), S91; #74 MCP `save_to_disk` KHÔNG tạo file truy-cập được → chụp prod bằng PowerShell `CopyFromScreen`, S90; #73 UPDATE-handler absolute-set → CLEAR field khi FE KHÔNG gửi (bug-class S42), S85; #72 DateTime serialize thiếu 'Z' → FE hiểu local lệch +7h, S85)
|
||||||
- `docs/changelog/migration-todos.md` — roadmap 5 phase + Tier 3
|
- `docs/changelog/migration-todos.md` — roadmap 5 phase + Tier 3
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: ef-core-migration
|
name: ef-core-migration
|
||||||
description: Tạo/sửa/revert EF Core 10 migration cho SOLUTION_ERP. Dùng khi thêm entity mới, thay đổi schema, rollback migration, debug DesignTimeDbContextFactory fail. Đã có nhiều migration (số hiện tại → docs/STATUS.md canonical; mới nhất Mig 56 AddProBudgetSplitToPeWorkItemBudget, S76). Snapshot + Designer + Migration 3-file rule bắt buộc commit đủ.
|
description: Tạo/sửa/revert EF Core 10 migration cho SOLUTION_ERP. Dùng khi thêm entity mới, thay đổi schema, rollback migration, debug DesignTimeDbContextFactory fail. Đã có nhiều migration (số hiện tại → docs/STATUS.md canonical; mới nhất Mig 59 AddCcmBudgetPeriodToPurchaseEvaluation, S87). Snapshot + Designer + Migration 3-file rule bắt buộc commit đủ.
|
||||||
when-to-use:
|
when-to-use:
|
||||||
- "thêm migration"
|
- "thêm migration"
|
||||||
- "EF Core migration"
|
- "EF Core migration"
|
||||||
@ -16,7 +16,7 @@ when-to-use:
|
|||||||
|
|
||||||
> **Context:** .NET 10 + EF Core 10 + SQL Server. DbContext: `ApplicationDbContext` ở `Infrastructure/Persistence/`. Startup: `SolutionErp.Api`.
|
> **Context:** .NET 10 + EF Core 10 + SQL Server. DbContext: `ApplicationDbContext` ở `Infrastructure/Persistence/`. Startup: `SolutionErp.Api`.
|
||||||
|
|
||||||
## Migration history (số hiện tại → `docs/STATUS.md` canonical; mới nhất Mig 56)
|
## Migration history (số hiện tại → `docs/STATUS.md` canonical; mới nhất Mig 59)
|
||||||
|
|
||||||
| # | Name | Tables added / changed |
|
| # | Name | Tables added / changed |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
@ -33,7 +33,7 @@ when-to-use:
|
|||||||
| 11 | `AddRoleShortNameAndUserDepartment` | +Role.ShortName + User.DepartmentId/Position (cột thêm, không bảng mới) |
|
| 11 | `AddRoleShortNameAndUserDepartment` | +Role.ShortName + User.DepartmentId/Position (cột thêm, không bảng mới) |
|
||||||
| **12** | **`AddPurchaseEvaluations`** | **10 bảng module Duyệt NCC: PurchaseEvaluations + Suppliers + Details + Quotes + Approvals + Changelogs + Attachments + WorkflowDefinitions/Steps/StepApprovers** |
|
| **12** | **`AddPurchaseEvaluations`** | **10 bảng module Duyệt NCC: PurchaseEvaluations + Suppliers + Details + Quotes + Approvals + Changelogs + Attachments + WorkflowDefinitions/Steps/StepApprovers** |
|
||||||
| **13** | **`AddPurchaseEvaluationCodeSequences`** | **1 bảng `PurchaseEvaluationCodeSequences` (Prefix PK, LastSeq) — atomic sequence cho MaPhieu format `PE/{YYYY}/{A\|B}/{Seq:D3}`** |
|
| **13** | **`AddPurchaseEvaluationCodeSequences`** | **1 bảng `PurchaseEvaluationCodeSequences` (Prefix PK, LastSeq) — atomic sequence cho MaPhieu format `PE/{YYYY}/{A\|B}/{Seq:D3}`** |
|
||||||
| **14** | **`AddBudgets`** | **4 bảng module Ngân sách: Budgets + BudgetDetails + BudgetApprovals + BudgetChangelogs. + nullable FK index `Contracts.BudgetId` & `PurchaseEvaluations.BudgetId`** |
|
| **14** | **`AddBudgets`** | **⚠️ DROPPED Mig 50 (S61) — module Ngân sách cũ đã XÓA, thay bằng `PeWorkItemBudgets` per-gói-thầu. Bản gốc: 4 bảng Budgets + BudgetDetails + BudgetApprovals + BudgetChangelogs + nullable FK index `Contracts.BudgetId` & `PurchaseEvaluations.BudgetId` (append-only history, giữ row đánh dấu superseded).** |
|
||||||
| **15** | **`AddPurchaseEvaluationDepartmentOpinions`** | **1 bảng `PurchaseEvaluationDepartmentOpinions` (UNIQUE PEId+Kind, max 1 row mỗi PeDepartmentKind per phiếu — Phê duyệt/Ccm/MuaHang/SmPm)** |
|
| **15** | **`AddPurchaseEvaluationDepartmentOpinions`** | **1 bảng `PurchaseEvaluationDepartmentOpinions` (UNIQUE PEId+Kind, max 1 row mỗi PeDepartmentKind per phiếu — Phê duyệt/Ccm/MuaHang/SmPm)** |
|
||||||
| **16** | **`AddTwoStageDeptApprovalAndSmartReject`** | **3 bảng `Contract/PurchaseEvaluation/Budget DepartmentApprovals` (UNIQUE TargetId+Phase+Dept+Stage cho 2-stage NV.Review → TPB.Confirm per phòng × phase) + 4 ALTER (`Users.CanBypassReview` bit cho NV bypass + 3 `RejectedFromPhase` int cho smart reject jump-back). Phase 9 — đóng bug "NV duyệt được hết phase" anh Kiệt (FDC) báo. Logic 2-stage trong PurchaseEvaluationWorkflowService chỉ áp PE; HĐ + Budget defer.** |
|
| **16** | **`AddTwoStageDeptApprovalAndSmartReject`** | **3 bảng `Contract/PurchaseEvaluation/Budget DepartmentApprovals` (UNIQUE TargetId+Phase+Dept+Stage cho 2-stage NV.Review → TPB.Confirm per phòng × phase) + 4 ALTER (`Users.CanBypassReview` bit cho NV bypass + 3 `RejectedFromPhase` int cho smart reject jump-back). Phase 9 — đóng bug "NV duyệt được hết phase" anh Kiệt (FDC) báo. Logic 2-stage trong PurchaseEvaluationWorkflowService chỉ áp PE; HĐ + Budget defer.** |
|
||||||
| **17** | **`AddManualBudgetFieldsToPeAndContract`** | **4 ALTER (PE + HĐ × `BudgetManualName` nvarchar(200) + `BudgetManualAmount` decimal(18,2)) — manual budget fallback khi user không link Budget entity approved. KHÔNG XOR với BudgetId, cả 2 cùng null OK. Carry-forward `pe.BudgetManualName/Amount → contract` ở `CreateContractFromEvaluation`. Phase 9 — Session 11 (2026-05-07).** |
|
| **17** | **`AddManualBudgetFieldsToPeAndContract`** | **4 ALTER (PE + HĐ × `BudgetManualName` nvarchar(200) + `BudgetManualAmount` decimal(18,2)) — manual budget fallback khi user không link Budget entity approved. KHÔNG XOR với BudgetId, cả 2 cùng null OK. Carry-forward `pe.BudgetManualName/Amount → contract` ở `CreateContractFromEvaluation`. Phase 9 — Session 11 (2026-05-07).** |
|
||||||
@ -76,6 +76,9 @@ when-to-use:
|
|||||||
| **54** | **`AddPeSuggestedAndApprovedPrice`** | **🎯 S73 — PE +5 cột giá đề xuất (ProSuggestedMin/Max + CcmSuggested + ApprovedPriceAmount + ApprovedPriceSource) additive-nullable — CEO chọn giá chốt + CCM duyệt-done opt-in. anh Kiệt FDC go-live 22/06.** |
|
| **54** | **`AddPeSuggestedAndApprovedPrice`** | **🎯 S73 — PE +5 cột giá đề xuất (ProSuggestedMin/Max + CcmSuggested + ApprovedPriceAmount + ApprovedPriceSource) additive-nullable — CEO chọn giá chốt + CCM duyệt-done opt-in. anh Kiệt FDC go-live 22/06.** |
|
||||||
| **55** | **`AddCcmNoteToPeWorkItemBudget`** | **🎯 S74 — PeWorkItemBudget +`CcmNote nvarchar(1000)?` (ô "Ghi chú từ CCM" mirror ProNote). AddColumn-only, no new table.** |
|
| **55** | **`AddCcmNoteToPeWorkItemBudget`** | **🎯 S74 — PeWorkItemBudget +`CcmNote nvarchar(1000)?` (ô "Ghi chú từ CCM" mirror ProNote). AddColumn-only, no new table.** |
|
||||||
| **56** | **`AddProBudgetSplitToPeWorkItemBudget`** | **🎯 S76 — PeWorkItemBudget +`ProInitialAmount`+`ProAdjustmentAmount` decimal(18,2)? (cột PRO "Ban hành lần đầu"+"V0/hiệu chỉnh", mirror CCM Initial/Adjustment). AddColumn additive + `Sql()` data-migrate `ProInitial=ProEstimate WHERE ProEstimate NOT NULL` (4 rows prod, gotcha #64). no new table. Form ngân sách → MA TRẬN 3 cột Dự án/PRO/CCM (bảng lưới `<table>`).** |
|
| **56** | **`AddProBudgetSplitToPeWorkItemBudget`** | **🎯 S76 — PeWorkItemBudget +`ProInitialAmount`+`ProAdjustmentAmount` decimal(18,2)? (cột PRO "Ban hành lần đầu"+"V0/hiệu chỉnh", mirror CCM Initial/Adjustment). AddColumn additive + `Sql()` data-migrate `ProInitial=ProEstimate WHERE ProEstimate NOT NULL` (4 rows prod, gotcha #64). no new table. Form ngân sách → MA TRẬN 3 cột Dự án/PRO/CCM (bảng lưới `<table>`).** |
|
||||||
|
| **57** | **`AddPeSuggestedPriceNotes`** | **🎯 S77 — PurchaseEvaluations +`ProSuggestedPriceNote`+`CcmSuggestedPriceNote` nvarchar(1000)? (ghi chú kèm giá đề xuất PRO/CCM, mirror ProNote/CcmNote). 2 AddColumn additive-nullable, no new table.** |
|
||||||
|
| **58** | **`AddPeMultiWinnerAndLevelFinalize`** | **🎯 S87 — PE multi-winner + per-Level finalize: PurchaseEvaluationSuppliers +`IsWinner bit` (nhiều NCC trúng thầu, thay winner đơn lẻ `SelectedSupplierId`) + ApprovalWorkflowLevels +`AllowApproverFinalize bit` (per-Cấp kết-thúc-tại-đây, không lên CEO) + `Sql()` backfill `IsWinner=1 WHERE SupplierId = pe.SelectedSupplierId` (phiếu UAT giữ winner cũ, idempotent). 2 AddColumn, no new table.** |
|
||||||
|
| **59** | **`AddCcmBudgetPeriodToPurchaseEvaluation`** | **🎯 S87 — PurchaseEvaluations +`CcmBudgetPeriodAmount` decimal(18,2)? (ngân sách CCM cột Section-B kỳ này, per-PE, mirror `BudgetPeriodAmount` phía PRO). 1 AddColumn additive-nullable, no new table.** |
|
||||||
|
|
||||||
Total: **88 bảng** dbo + `__EFMigrationsHistory` (re-ground S62 cicd `sys.tables`; last schema-changing Mig 50 net 93→88 — Mig 51-55 đều AddColumn-only, không đổi số bảng). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-55 chi tiết pending).
|
Total: **88 bảng** dbo + `__EFMigrationsHistory` (re-ground S62 cicd `sys.tables`; last schema-changing Mig 50 net 93→88 — Mig 51-55 đều AddColumn-only, không đổi số bảng). Xem `docs/database/schema-diagram.md` migration table + §11-15 module ERD (§16+ Mig 27-55 chi tiết pending).
|
||||||
|
|
||||||
@ -115,7 +118,7 @@ Architecture decision đáng ghi cho session sau:
|
|||||||
- Migration verify pattern thêm: chạy `dotnet test SolutionErp.slnx` local trước mỗi migration commit để chống regression policy/codegen.
|
- Migration verify pattern thêm: chạy `dotnet test SolutionErp.slnx` local trước mỗi migration commit để chống regression policy/codegen.
|
||||||
|
|
||||||
**Phase 7 update (2026-04-28):**
|
**Phase 7 update (2026-04-28):**
|
||||||
- Migration 14 `AddBudgets` — 4 bảng (Budgets/Details/Approvals/Changelogs) + 2 cột `BudgetId?` thêm vào Contracts & PurchaseEvaluations. Workflow hardcoded `BudgetPolicy.Default` (chưa versioned).
|
- Migration 14 `AddBudgets` — ⚠️ **DROPPED Mig 50 (S61)** — module Budget cũ đã XÓA, thay bằng `PeWorkItemBudgets`. (Bản gốc: 4 bảng Budgets/Details/Approvals/Changelogs + 2 cột `BudgetId?` thêm vào Contracts & PurchaseEvaluations. Workflow hardcoded `BudgetPolicy.Default` chưa versioned.)
|
||||||
- 14 demo user thật `@solutions.com.vn` qua `SeedDemoUsersAsync` reconcile (PRO 5 + CCM 7 + ISO 1 + CEO 1).
|
- 14 demo user thật `@solutions.com.vn` qua `SeedDemoUsersAsync` reconcile (PRO 5 + CCM 7 + ISO 1 + CEO 1).
|
||||||
|
|
||||||
**Phase 6 update (2026-04-24):**
|
**Phase 6 update (2026-04-24):**
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
3. Tự gen mã HĐ theo Quy định SOL-CCM-RG-001
|
3. Tự gen mã HĐ theo Quy định SOL-CCM-RG-001
|
||||||
4. Dashboard báo cáo HĐ theo NCC, dự án, trạng thái, giá trị
|
4. Dashboard báo cáo HĐ theo NCC, dự án, trạng thái, giá trị
|
||||||
5. **Module Duyệt NCC (Phase 6-8)** — phiếu trình duyệt so sánh giá tiền-HĐ, 2 quy trình A/B versioned admin-config, kế thừa HĐ 1-click khi DaDuyet, Ý kiến 4 phòng ban sign-off
|
5. **Module Duyệt NCC (Phase 6-8)** — phiếu trình duyệt so sánh giá tiền-HĐ, 2 quy trình A/B versioned admin-config, kế thừa HĐ 1-click khi DaDuyet, Ý kiến 4 phòng ban sign-off
|
||||||
6. **Module Ngân sách (Phase 7-8)** — 4 bảng quản lý ngân sách dự án, workflow simple 3-step, integration link với Contract & PE + cột "So với ngân sách" PE matrix
|
6. ~~**Module Ngân sách (Phase 7-8)** — 4 bảng quản lý ngân sách dự án, workflow simple 3-step, integration link với Contract & PE + cột "So với ngân sách" PE matrix~~ ⚠️ **REMOVED Mig 50 (S61)** — module Budget cũ (4 bảng Budgets/BudgetDetails/BudgetApprovals/BudgetChangelogs) XÓA, thay bằng **ngân sách per-gói-thầu `PeWorkItemBudgets`** (1 record/cặp Dự án × Hạng mục, nhập theo role PRO/CCM); FE pages/types/menu `Bg_*` gỡ hết.
|
||||||
7. **Test gate (Phase 8)** — xUnit Domain policy + Infra code generator, CI fail-fast no deploy
|
7. **Test gate (Phase 8)** — xUnit Domain policy + Infra code generator, CI fail-fast no deploy
|
||||||
|
|
||||||
## 2. Kiến trúc tổng thể
|
## 2. Kiến trúc tổng thể
|
||||||
@ -120,8 +120,8 @@ SOLUTION_ERP/
|
|||||||
| **5 Production** | CI/CD Gitea Actions + 3 IIS site + Let's Encrypt + Security headers + Users CRUD | ✅ Done |
|
| **5 Production** | CI/CD Gitea Actions + 3 IIS site + Let's Encrypt + Security headers + Users CRUD | ✅ Done |
|
||||||
| **Tier 3** | Versioned WF + 3-panel layout + 4-bảng + 4 catalogs + 16 demo users + Brand identity | ✅ Done |
|
| **Tier 3** | Versioned WF + 3-panel layout + 4-bảng + 4 catalogs + 16 demo users + Brand identity | ✅ Done |
|
||||||
| **6 Module Duyệt NCC** | PE iter 1 (skeleton) + iter 2 (UX polish) + Domain rebrand `.solutions.com.vn` | ✅ Done |
|
| **6 Module Duyệt NCC** | PE iter 1 (skeleton) + iter 2 (UX polish) + Domain rebrand `.solutions.com.vn` | ✅ Done |
|
||||||
| **7 Budget BE + 14 Solutions users** | Migration 14 — 4 bảng Budget + workflow simple + 11 endpoint + 14 user thật | ✅ Done (Session 4) |
|
| **7 Budget BE + 14 Solutions users** | Migration 14 — 4 bảng Budget + workflow simple + 11 endpoint + 14 user thật ⚠️ Budget bị **REMOVED Mig 50 (S61)** → `PeWorkItemBudgets` | ✅ Done (Session 4) |
|
||||||
| **8 Budget FE + PE feature complete + Tests** | FE Budget 3-panel + PE/HD-Budget integration + PE Workflow Designer + Ý kiến 4 PB (mig 15) + Tests Phase 1-2 (71 test) + CI gate | ✅ Done (Session 5) |
|
| **8 Budget FE + PE feature complete + Tests** | FE Budget 3-panel + PE/HD-Budget integration + PE Workflow Designer + Ý kiến 4 PB (mig 15) + Tests Phase 1-2 (71 test) + CI gate ⚠️ FE Budget (pages/types/menu `Bg_*`) **REMOVED S61** cùng Mig 50 | ✅ Done (Session 5) |
|
||||||
| **9 UAT + Ops + carry over** | UAT thật + SMTP + Rotate creds + SQL backup + Export PDF (pending) + Tests Phase 3-5 | 📝 Active (Session 6) |
|
| **9 UAT + Ops + carry over** | UAT thật + SMTP + Rotate creds + SQL backup + Export PDF (pending) + Tests Phase 3-5 | 📝 Active (Session 6) |
|
||||||
| **10+ Post-launch** | E-signature, Bravo/SAP, Mobile, AI OCR | 📝 Future |
|
| **10+ Post-launch** | E-signature, Bravo/SAP, Mobile, AI OCR | 📝 Future |
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
72
docs/governance/vocab-alias-map.md
Normal file
72
docs/governance/vocab-alias-map.md
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# Vocab Alias-Map — Bản đồ Thuật ngữ Tương đương
|
||||||
|
|
||||||
|
> **Mục đích:** Đây là nguồn duy nhất (single source) ghi lại các cặp thuật ngữ ĐỒNG NGHĨA trong SOLUTION_ERP — một khái niệm nhưng đang tồn tại dưới hai cái tên (canonical hiện hành ↔ alias lịch sử đã bị thay thế). Tài liệu phục vụ đợt kiểm tra trôi-nghĩa (drift audit) hằng tháng: khi detector `scripts/governance-detectors.ps1` (kiểm tra C3 — vocab-fork) phát cờ báo "hai biến thể cùng sống side-by-side", người rà soát mở file này để tra ngay đâu là từ chuẩn, đâu là từ cũ, và lý do đổi tên.
|
||||||
|
>
|
||||||
|
> **Chủ sở hữu ghi (single-writer):** em-main. Tài liệu **append-only** — chỉ thêm dòng mới khi phát sinh cặp thuật ngữ mới, KHÔNG viết lại các mục cũ. Sub-agent chỉ đọc, không được sửa (tuân thủ nguyên tắc D9 single-writer).
|
||||||
|
>
|
||||||
|
> **Phạm vi:** Chỉ ghi các cặp thật sự là MỘT khái niệm hai tên (fork-để-hợp-nhất). KHÔNG ghi các từ trùng-mặt-chữ nhưng khác nghĩa (ví dụ "memory-fidelity", "coverage", "audit") — những từ đó đã được phân biệt bằng ngữ cảnh trong `harness-11-engine.md` PHẦN H/I và cố ý KHÔNG seed vào detector.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ Lưu ý nền tảng — vì sao alias vẫn còn xuất hiện đầy trong repo
|
||||||
|
|
||||||
|
Phần lớn số lần alias xuất hiện là **hợp lệ theo lịch sử — KHÔNG phải drift cần sửa**. Các file dưới đây **ĐÓNG BĂNG (frozen), tuyệt đối không viết lại**:
|
||||||
|
|
||||||
|
- `docs/changelog/sessions/**` — nhật ký từng session (ghi lại đúng từ ngữ tại thời điểm đó).
|
||||||
|
- `docs/_archive/**` — snapshot STATUS/HANDOFF đã archive verbatim.
|
||||||
|
- `docs/governance/adap-reports/**` — báo cáo adoption đã chốt.
|
||||||
|
- `.claude/workflows/runs/**` — vết chạy workflow (run-trace), git-tracked bất biến.
|
||||||
|
- `broadcasts/inbox|outbox/**` — thư liên-team đã gửi.
|
||||||
|
|
||||||
|
Một session-log viết "two-tier" hồi S60 là **đúng sự thật lịch sử** — nó phản ánh mô hình còn hiệu lực khi đó. Không được sửa ngược quá khứ. Do vậy alias sẽ **mãi mãi còn tồn tại** trong các file đóng băng, và detector C3 (quét TOÀN BỘ `docs/**` + `.claude/**` *.md, KHÔNG loại trừ file frozen) sẽ **vẫn tiếp tục báo cờ MED** cho mỗi cặp — đây là trạng thái **documented-known**, không phải lỗi tồn đọng. Việc "làm sạch" chỉ áp dụng cho các file **đang-sống (live-editable)**: `docs/STATUS.md`, `docs/HANDOFF.md`, các `SKILL.md`, `agent-memory/**/MEMORY.md` (bản HOT, không phải archive), và các doc governance đang bảo trì.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Bảng thuật ngữ tương đương
|
||||||
|
|
||||||
|
### 1. `run-trace` (chuẩn) ↔ `wave-folder` (alias cũ)
|
||||||
|
|
||||||
|
| Thuộc tính | Giá trị |
|
||||||
|
|---|---|
|
||||||
|
| **Canonical (hiện hành)** | `run-trace` — thư mục cô lập bộ nhớ mỗi lần chạy workflow tại `.claude/workflows/runs/<id>/` |
|
||||||
|
| **Alias (đã thay thế)** | `wave-folder` / `wave-*` — tên cũ của cùng thư mục cô lập đó |
|
||||||
|
| **Đổi tên bởi** | Harness-10 (Session 72, 2026-06-18) — đổi cấu trúc `wave-*` sang mô hình run-trace phẳng (`sub-*.md` + `*-synthesis.md`) git-tracked |
|
||||||
|
| **Ghi chú frozen** | Session-log/adap-report/runs cũ giữ nguyên "wave-folder" — đúng lịch sử, không sửa |
|
||||||
|
|
||||||
|
### 2. `Ngân sách PRO` (chuẩn) ↔ `Dự trù PRO` (alias cũ)
|
||||||
|
|
||||||
|
| Thuộc tính | Giá trị |
|
||||||
|
|---|---|
|
||||||
|
| **Canonical (hiện hành)** | `Ngân sách PRO` — nhãn cột/badge PRO trong ma trận ngân sách PE (module PurchaseEvaluation) |
|
||||||
|
| **Alias (đã thay thế)** | `Dự trù PRO` — nhãn cũ trước khi anh Kiệt (FDC) yêu cầu đổi |
|
||||||
|
| **Đổi tên bởi** | Session 65 (2026-06-16) — anh Kiệt Zalo: "Dự trù PRO → Ngân sách PRO"; áp dụng row + badge trên cả 2 app (fe-admin + fe-user), SHA256-mirror |
|
||||||
|
| **Ghi chú kỹ thuật** | Field BE gốc `PeWorkItemBudget.ProInitialAmount` ("Ban hành lần đầu") + `ProAdjustmentAmount`; nhánh `ProEstimateAmount` cũ đánh dấu LEGACY (Mig 56 migrate → ProInitialAmount). Còn 1 comment mã nguồn stale ở `PurchaseEvaluationDtos.cs:324` ("badge dự trù PRO") — chỉ là comment, KHÔNG phải nhãn FE đang render; có thể dọn khi tiện, không bắt buộc |
|
||||||
|
| **Ghi chú frozen** | Session-log S65 và bản archive giữ "Dự trù PRO" — đúng lịch sử |
|
||||||
|
| **Lưu ý mở rộng** | `PeWorkItemBudget` là tên ENTITY (khái niệm khác — bảng ngân-sách-per-gói-thầu), KHÔNG phải alias của nhãn PRO. "PRO" = Procurement (phòng Mua hàng), không phải viết tắt khác |
|
||||||
|
|
||||||
|
### 3. `all-inherit` (chuẩn) ↔ `two-tier` (alias cũ)
|
||||||
|
|
||||||
|
| Thuộc tính | Giá trị |
|
||||||
|
|---|---|
|
||||||
|
| **Canonical (hiện hành)** | `all-inherit` — mọi sub-agent kế thừa model lead (chất-lượng > chi-phí), cấu hình qua frontmatter + `hmw.js` resolveModel |
|
||||||
|
| **Alias (đã thay thế)** | `two-tier` — mô hình cũ 2 tầng (lead promote-inherit vài agent / demote-pin số còn lại về Opus) |
|
||||||
|
| **Đổi tên bởi** | Harness-8 (Session 66, 2026-06-16) — thay mô hình two-tier model-promotion bằng all-inherit |
|
||||||
|
| **Ghi chú frozen** | Các adap-report Harness-4/5 và session-log ≤ S66 giữ "two-tier" — đúng lịch sử tại thời điểm đó |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quy trình cập nhật (khi thêm cặp mới)
|
||||||
|
|
||||||
|
1. Chỉ append 1 mục `### N.` mới bên dưới, KHÔNG sửa mục cũ.
|
||||||
|
2. Ghi đủ 4 trường: **canonical · alias · đổi-tên-bởi (Harness/Session) · ghi-chú-frozen**.
|
||||||
|
3. Nếu muốn detector nhận-biết cặp mới, seed vào `$aliasSets` trong `scripts/governance-detectors.ps1` (C3). Lưu ý: detector CHỈ grep, KHÔNG đọc file này — xem mục dưới.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Về việc detector có "im" sau khi tạo file này không
|
||||||
|
|
||||||
|
**KHÔNG.** Detector C3 (`scripts/governance-detectors.ps1`) là **pure-grep**: `$aliasSets` được hard-code trong script (dòng ~350-354), và C3 báo cờ mỗi khi ≥2 biến thể của một set còn sống trong corpus. Nó **KHÔNG đọc bất kỳ alias-map file nào**. Vì các file frozen (mãi mãi chứa alias) nằm trong phạm vi quét, cờ MED cho cả 3 cặp sẽ **vẫn còn** — nay chuyển trạng thái thành **documented-known** (đã có tài liệu giải thích tại đây), không còn là drift lạ.
|
||||||
|
|
||||||
|
> Câu "resolve: … or record an alias-map in docs/governance" trong output detector là **gợi ý cho con người**, KHÔNG phải hook tự-động. Muốn detector THẬT-SỰ ngừng báo cặp nào, phải sửa `$aliasSets` (bỏ set đó) — nhưng làm vậy sẽ mất khả năng phát hiện fork tương lai, nên **không khuyến nghị**.
|
||||||
|
|
||||||
|
> **Cảnh báo self-match:** File `vocab-alias-map.md` này tự thân chứa cả 6 thuật ngữ ở dạng live → nếu KHÔNG loại trừ, nó sẽ tự-đóng-góp thêm 1 file live cho MỖI biến thể và khiến detector đếm sai. Cần thêm đường dẫn `docs/governance/vocab-alias-map.md` vào `$ExcludeExact` trong `governance-detectors.ps1` (đặt cạnh `harness-11-engine.md` đã được loại trừ sẵn) để tài liệu này không tự-match. Đây là bước bắt buộc khi commit file.
|
||||||
@ -88,7 +88,8 @@ $VN_NGANSACH_PRO = U @(0x4E, 0x67, 0xE2, 0x6E, 0x20, 0x73, 0xE1, 0x63, 0x68, 0x2
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
$ExcludeExact = @(
|
$ExcludeExact = @(
|
||||||
(Join-Path $RepoRoot 'scripts\governance-detectors.ps1'),
|
(Join-Path $RepoRoot 'scripts\governance-detectors.ps1'),
|
||||||
(Join-Path $RepoRoot 'docs\governance\harness-11-engine.md')
|
(Join-Path $RepoRoot 'docs\governance\harness-11-engine.md'),
|
||||||
|
(Join-Path $RepoRoot 'docs\governance\vocab-alias-map.md')
|
||||||
) | ForEach-Object { $_ -replace '/', '\' }
|
) | ForEach-Object { $_ -replace '/', '\' }
|
||||||
|
|
||||||
$ExcludeDirFragments = @(
|
$ExcludeDirFragments = @(
|
||||||
|
|||||||
Reference in New Issue
Block a user