[CLAUDE] Agents: S39 upgrade multi-agent 4→7 + budget +50% + 5 RAG MCP (BVAAU pattern adapted)
Anh main yêu cầu tăng tốc + chất lượng SOLUTION_ERP: tham khảo BVAAU 7-agent config + budget token +50% + thêm 3 sub-agent. Adapted (NOT copied) — SOLUTION_ERP 2-FE-app fit + giữ 6 skill proven battle-test 38 session. Split 4→7 agent (anh main chốt via AskUserQuestion): - investigator → SPLIT: investigator-codebase (cyan, internal SQL/EF/grep) + investigator-api (blue, external docs/CVE/lib/cross-project) - implementer → SPLIT: implementer-backend (yellow, .NET Domain+App+Infra+Api) + implementer-frontend (orange, FE 2 app cookie-cutter mirror SHA256) [anh chốt backend/frontend thay domain/infra BVAAU — fit 2 React app + giảm gotcha #53 truncate] - test-specialist NEW (purple, dedicated tests/ — anh chốt full test layer) - reviewer (red) + cicd-monitor (green) giữ Tool grant +3 RAG MCP all 7 agent (search_code BM25 + store_memory + list_projects) — BVAAU port, MCP server verified support. Prior chỉ 2 (search_memory + cross_project). Skill re-distribute 6 skill across 7 agent (xem README matrix). Memory: rename investigator→investigator-codebase + implementer→implementer-backend (giữ history) + seed 3 new MEMORY (investigator-api/implementer-frontend/test-specialist) extract relevant patterns. Delete old investigator.md + implementer.md. README rewrite: 7-agent architecture + decision tree split-routing + phân việc matrix boundary + token budget +50% cost reality (~1.05M opt / ~2M heavy ceiling) + anti-truncation rules (gotcha #53 5× mitigation: brief ≤8K + curate pre-spawn + entry ≤1.5K + 529 fallback solo). ⚠️ Anh main RESTART Claude Code CLI để registry hot-reload 7 agent (per S27 lesson model:inherit + new files). Verify post-restart: smoke spawn 3 new agent confirm load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
53
.claude/agent-memory/implementer-frontend/MEMORY.md
Normal file
53
.claude/agent-memory/implementer-frontend/MEMORY.md
Normal file
@ -0,0 +1,53 @@
|
||||
# Implementer-Frontend Agent — Persistent Memory
|
||||
|
||||
> **Persistent diary cross-session.** Auto-injected first 200 lines / 25KB at spawn.
|
||||
> Update BEFORE every stop. Curate when > 25KB. Keep entry ≤ 1.5K chars (gotcha #53).
|
||||
> **NEW agent S39 (2026-05-29)** — split từ implementer (FE 2 app half). Backend scaffold history ở `implementer-backend`.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Role baseline
|
||||
|
||||
WRITE specialist FE 2 app (fe-admin + fe-user). Cookie-cutter mirror SHA256 IDENTICAL + Pattern 16-bis 4-place + declarative KIND_CONFIG + npm build × 2. Case 1+2 only. Tools: Read, Edit, Write, Bash, Skill, Grep, Glob + 5 RAG. Skill: `permission-matrix`.
|
||||
|
||||
## 🚫 Split boundary
|
||||
- ✅ MINE: `fe-admin/src/**` + `fe-user/src/**`
|
||||
- ❌ NOT: `src/Backend/**` → `implementer-backend` (chỉ Read DTO shape) · tests/ → `test-specialist`
|
||||
- ❌ NOT: UX flow decision (drawer/tab/modal) → em main solo
|
||||
|
||||
## 📋 Patterns proven (apply confidently)
|
||||
|
||||
### Pattern 16-bis 4-place mirror (9× cumulative — BLESSED FOUNDATION)
|
||||
Add/move page cross-app MUST mirror 4 places:
|
||||
1. Page/types file · 2. `App.tsx` Route · 3. `lib/menuKeys.ts` const · 4. ⚠️ `components/Layout.tsx` `resolvePath` staticMap (**DỄ MISS** → silent sidebar drop gotcha #50)
|
||||
Verified clean S33/S34/S35/S36/S37/S38 = 9× cumulative. Spec MUST list 4 places explicit.
|
||||
|
||||
### SHA256 IDENTICAL × 2 app
|
||||
Viết fe-admin → `cp` fe-user → `sha256sum` verify. Khác UX (admin full sidebar vs user filter) → mirror tay + `diff`. Proven S36 (3 pair) + S37 (4 pair) + S38 (5 pair).
|
||||
|
||||
### Declarative KIND_CONFIG Record (S35, 2× proven)
|
||||
Single-page multi-kind CRUD URL `:kind` param + `Record<Kind, {fields, columns, icon, label}>` + renderField switch FieldType. Reuse: HrmConfigs (S35) + WorkflowApps (S38).
|
||||
|
||||
### Pattern 14 Tailwind JIT palette
|
||||
Dynamic class purged. PALETTE array full literal `as const` cycle `index % length`.
|
||||
|
||||
### TS6 / convention
|
||||
- `erasableSyntaxOnly` cấm enum → `const X = {...} as const` + `type X = typeof X[keyof typeof X]`
|
||||
- Named export only (trừ App). UI 100% tiếng Việt.
|
||||
- **PageHeader signature (S37):** `title/description/actions` only — KHÔNG `icon` / `children` prop (build fail TS2322)
|
||||
- fe-user thiếu Card/Badge shadcn → fallback inline `<div className="rounded-lg border bg-card">`
|
||||
|
||||
## ✅ Verify protocol
|
||||
`cd fe-admin && npm run build` + `cd fe-user && npm run build` BOTH 0 TS error + `sha256sum` mirror proof. Bundle >500KB warning OK pre-existing.
|
||||
|
||||
## 📅 Recent activity (last 10 FIFO)
|
||||
|
||||
- **2026-05-29 (S39 agent split setup):** NEW agent từ split implementer. Seeded FE patterns (16-bis 9× + SHA256 mirror + KIND_CONFIG + Tailwind palette + PageHeader S37). Prior FE work absorbed: S33 EmployeesListPage + S34 Directory + S35 HrmConfigs declarative + S36 MeetingCalendar + S37 Proposal + S38 WorkflowApps generic. First dedicated spawn pending em main S39+ FE task.
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Anti-patterns (DO NOT)
|
||||
1. ❌ Touch BE files · 2. ❌ Miss 4th Layout staticMap · 3. ❌ Skip npm build × 2 · 4. ❌ `git add -A` · 5. ❌ Push remote · 6. ❌ UX decision autonomous → REFUSE
|
||||
|
||||
## 🔄 Curate trigger
|
||||
Size > 25KB → archive. Commit scope (em main commits): `FE-Admin` · `FE-User`.
|
||||
36
.claude/agent-memory/investigator-api/MEMORY.md
Normal file
36
.claude/agent-memory/investigator-api/MEMORY.md
Normal file
@ -0,0 +1,36 @@
|
||||
# Investigator-API Agent — Persistent Memory
|
||||
|
||||
> **Persistent diary cross-session.** Auto-injected first 200 lines / 25KB at spawn.
|
||||
> Update BEFORE every stop. Curate when > 25KB. Keep entry ≤ 1.5K chars (gotcha #53).
|
||||
> **NEW agent S39 (2026-05-29)** — split từ investigator (external research half). Internal audit history ở `investigator-codebase`.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Role baseline
|
||||
|
||||
Read-only EXTERNAL research specialist. WebFetch/WebSearch official docs + NuGet/npm CVE + FE lib eval + cross-project reference (NamGroup/DH_Y_DUOC/BVAAU). Tools: Read, Bash, WebFetch, WebSearch + 5 RAG MCP. Output: findings + source URLs ≤ 500 words. Skill: `dependency-audit-erp`.
|
||||
|
||||
## 🚫 Split boundary
|
||||
- ✅ MINE: external docs, CVE scan, lib license+bundle eval, cross-project pattern port
|
||||
- ❌ NOT: internal codebase audit / SQL schema / grep symbol → `investigator-codebase`
|
||||
|
||||
## 🔑 Dependency pin constraints (flag violation)
|
||||
- MediatR `12.4.1` (gotcha #1) · Swashbuckle `6.9.0` (gotcha #2) · Node CI `20.x` · LibreOffice `25.8.6` · @microsoft/signalr `8.0.7`
|
||||
- New dep eval: license MIT? bundle gzipped impact? (vd FullCalendar v6 React MIT verified S36 — daygrid/timegrid OK, Premium chỉ scheduler — SOL chọn custom HTML grid save ~80KB instead)
|
||||
|
||||
## 🌐 Trusted source URLs
|
||||
- `anthropic.com/engineering/` · `cognition.ai/blog/` · `learn.microsoft.com/en-us/aspnet/core/` + `/ef/core/` · `tanstack.com/query/latest` · `ui.shadcn.com` · `philschmid.de` · `eugeneyan.com` · `hamel.dev`
|
||||
|
||||
## 📂 Cross-project reference paths
|
||||
- NamGroup `D:\Dropbox\CONG_VIEC\NAMGROUP\SOURCECODE_CÔNG_TY\NAMGROUP\` (Phase 10 port — TblNhanVien/TblPhongHop/TblResource patterns)
|
||||
- DH_Y_DUOC `D:\Dropbox\CONG_VIEC\DAI_Y_DUOC\DH_Y_DUOC_SOURCECODE\DH_Y_DUOC\` (clean arch + CQRS)
|
||||
- BVAAU `D:\Dropbox\CONG_VIEC\BENHVIEN_A_AU\SOURCE_CODDE\` (multi-agent config — 7 agent split reference)
|
||||
|
||||
## 📅 Recent activity (last 10 FIFO)
|
||||
|
||||
- **2026-05-29 (S39 agent split setup):** NEW agent created từ split investigator. Seeded external-research half. Prior cross-project audits (NamGroup Phase 10 port G-H1/G-O2 + FullCalendar eval S36 + BVAAU 7-agent config S39) absorbed into role baseline. First real spawn pending em main S39+ external research task (vd Phase 11 lib eval / CVE scan định kỳ / NamGroup G-O5 Vehicle reference).
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Curate trigger
|
||||
- Size > 25KB → archive `archive/<period>.md`. Stale > 3 months → remove.
|
||||
@ -129,6 +129,8 @@ State machine 5 trạng thái phiếu PE: Nháp / Đã gửi duyệt / **Trả l
|
||||
|
||||
## 📅 Recent activity (last 10 FIFO)
|
||||
|
||||
- **2026-05-29 (cross-project — BVAAU 7-agent config extract):** Em đọc full 8 file `D:\Dropbox\CONG_VIEC\BENHVIEN_A_AU\SOURCE_CODDE\.claude\agents\` ~22K. **BVAAU split 4→7 trục research(2)/implement(2)/quality(3)**: investigator-api(blue READ external GetFly/Pancake docs) · investigator-codebase(cyan READ internal+sqlcmd) · implementer-domain(yellow WRITE `Domain/**`+`Application/**` only) · implementer-infra(orange WRITE `Infra/**`+`Api/**`+`Web/**`+`Web.Reports React`) · test-specialist(purple WRITE `tests/**` only NEW) · reviewer(red) · cicd-monitor(green). **Boundary key**: repo *interface*=domain, EF *config*=infra, test assertion=test-specialist (2 implementer KHÔNG viết test). **8-criteria REFUSE** cả 2 implementer (schema/UX/cross-stack>2layer/bug-reasoning/<30min/first-time/spec ambiguity>20%). **Token**: ~1.35M/heavy (~6.5× solo) optimized ~700K; Agent fresh ~150K cache-write / warm ~50K / SendMessage 5-30K/turn / parallel SendMessage ⚠️2.25-3×. **Tool diff CRITICAL**: cả 7 BVAAU agent có 5 RAG MCP (`search_memory+search_code+cross_project_search+store_memory+list_projects`) vs SOLUTION_ERP hiện chỉ 2 (`search_memory+cross_project_search`) → BVAAU +3 (`search_code` BM25 saves Read full file + `store_memory` instant index + `list_projects`). **Skill**: BVAAU `skills:` frontmatter KHÔNG có, total skill=0 (Phase 0 all TBD) — SOLUTION_ERP 6 skill+preload MẠNH HƠN, giữ nguyên khi port. **Curate rule**: >25KB archive `<YYYY-MM>.md`, >50KB hard limit. **Parallel patterns**: A=investigator-api→DTO→(infra+domain parallel)→test→reviewer→cicd; B=4 sync job song song file-disjoint. **Surprises**: (a) VIPIX guide `D:\...\VIPIX_MULTISITE_PROJECT\docs\guides\multi-agent-setup-guide.md` KHÔNG tồn tại (glob toàn project miss) → "16 spawn ~1.49M" claim không verify được, đừng cite. (b) 3 inconsistency BVAAU file: cicd ghi cả `.gitea/` (L25) lẫn `.github/` (L159) workflow path; investigator-codebase MEMORY path `/investigator/` mismatch tên agent; README "Setup checklist" L331 vẫn "4 sub-agent" chưa update 7. (c) BVAAU Phase 0 codebase RỖNG → config aspirational template chưa battle-test (vs SOLUTION_ERP 38 session proven). **Recommend port**: trục split + 8-criteria REFUSE + 5-category reviewer adversarial, GIỮ skill-frontmatter SOLUTION_ERP, ADD 3 RAG tool nếu MCP support. Token cost ~22K. Tag `[cross-project, bvaau-agent-config, port-pattern]`.
|
||||
|
||||
- **2026-05-28 (S37 Plan G-O3 Đề xuất pre-flight 4 task):** Em spawn ~14K. **T1 Enum:** `ApprovalWorkflowApplicableType` ở `ApprovalWorkflow.cs:45-50` Mig 22 add — 3 value 1-based (DuyetNcc=1, DuyetNccPhuongAn=2, Contract=3) NOT 0-based. Mig 37 +1 value Proposal=4 (G-O3 first), reserve 5-8 cho G-O4..O6 future. **T2 PE pattern intel** (mirror skeleton Mig 38): main entity 25 field critical (Id/MaPhieu/Type/Phase 5-state/TenGoiThau/ProjectId/DepartmentId/DrafterUserId + ApprovalWorkflowId pin V2/CurrentStepIndex/CurrentLevelOrder + BudgetId/BudgetManual + RejectedFromPhase legacy + 8 nav list). LevelOpinion UNIQUE per-LEVEL NOT per-User (composite `(PEId, LevelId)`), FK Cascade Pe + Restrict Level, denorm SignedByFullName(200). CodeSequence **1 row per Prefix** (NOT N rows per year): `PE/YYYY/A` + `PE/YYYY/B` riêng, 3 col Prefix PK+LastSeq+UpdatedAt, tx SERIALIZABLE. ApproveV2Async logic 7 step (load eager → group Levels by Order = Cấp OR-of-N → match actor.Id ∈ ApproverUserId + Admin bypass → log Approval + UPSERT LevelOpinion auto sync → F2 skipToFinal check matchingLevel.AllowApproverSkipToFinal advance tới last Step+last Level Phase giữ ChoDuyet → advance normal levelOrder++ trong Step → next Step reset 1 → DaDuyet terminal). **T3 NamGroup Proposal**: 3 entity `TblRequest.cs` (25 cols generic + SoTien decimal + NguoiNhanTien + TaiKhoanNganHang advance payment) + `TblRequestConfig.cs` (CSV ListApproval inline + IsDirectManager) + `TblRequestListApproval.cs` (forward mechanism qua NguoiChuyenTiepId/NgayChuyenTiep + ChapThuanHoanToan int). **Verdict: SOL CLEAN-ROOM MẠNH HƠN** — NamGroup generic Request KHÔNG phân biệt Đề xuất/Yêu cầu/Phép (1 entity cover ALL). SOL dedicated `Proposal` entity + Workflow V2 pin FK > NamGroup inline CSV JSON. **T4 Mig 38 propose 4 bảng**: Proposals (Code `DX/YYYY/NNNN`, Title/Desc/Category nullable FK + free text fallback, AmountEstimate decimal? optional, Status ProposalStatus 5-state mirror PE, DepartmentId/DrafterUserId, ApprovalWorkflowId pin ApplicableType=4 + CurrentStep/Level pointer + SLA) + ProposalAttachments + ProposalLevelOpinions UNIQUE (PropId, LevelId) + ProposalCodeSequences 1 row Prefix `DX/YYYY`. **3 decision points em main chốt**: (1) CategoryId nullable FK + free text fallback (lesson Plan C drift 8 FK ZERO populated 1675 NV). (2) 5-state mirror PE NOT 7-state Contract (Đề xuất đơn giản hơn HĐ). (3) Dedicated `ProposalStatus` enum NOT reuse PurchaseEvaluationPhase (anti-pattern cross-module coupling). **Surprises**: (a) NamGroup TblRequest có `SoTien + NguoiNhanTien + TaiKhoanNganHang` advance payment — SOL có cần? Defer Mig 39 optional. (b) F1+F3+F4+F2 per-Level pattern Mig 29-31 — Proposal có nên mirror? Option B "đơn giản KHÔNG flag" tiết kiệm 3 chunk admin Designer. (c) **Recommend gộp Mig 37+38 → 1 Mig** `AddProposalsAndExtendApplicableType` (mirror Mig 20 Contract N-stage gộp). Token cost ~14K.
|
||||
|
||||
- **2026-05-28 (S36 Plan G-O2 pre-flight Phòng họp 3 task):** Em spawn ~10K. **T1 NamGroup `TblResource` + `TblBookingResource`** (`NAMGROUP.Server\Data\Entities\TblPhongHop.cs` 5-47): 2 entity LEGACY V1 reuse, KHÔNG dedicated MeetingRoom. TblResource 11 cols generic (Id long, GroupReSourceID, NameReSource, ListManager CSV NhanVienID, ListViewer CSV, Note, IsDelete int?). TblBookingResource 18 cols (ResourceID, Title, FromDate datetime giờ-phút, ToDate, ThanhPhan plain text NOT CSV, TrangThai int? -1=Rej/0=Pending/1=Approved/2=Cancelled, IsDelete int? NULL=active+1=deleted ZERO `=0` rows, Note1 admin secondary, AcceptUser/AcceptDate/RejectUser/RejectDate). **5 gotcha NamGroup**: (1) IsDelete filter `(IsDelete ?? 0) != 1` NOT `== 0`, (2) TrangThai 4-state NO Completed, (3) ThanhPhan plain text NOT CSV NV ID, (4) Note1 admin only, (5) V1 ZERO overlap protection (37 overlap pairs prod 798 rows). Repo `PhongHopRepository.cs:61-75` overlap app-level: `b.FromDate < toDate AND b.ToDate > fromDate AND TrangThai NOT IN (-1, 2)`. CSV ListManager → manager approve. **Conclusion: SOL Mig 36 CLEAN-ROOM** mirror G-H2 verdict — KHÔNG port reason: (a) TblResource mix 4 group catalog generic, (b) ThanhPhan plain text yếu cho notification, (c) ZERO overlap V1 → SOL phải DB-level SERIALIZABLE tx. **T2 FullCalendar v6 React** (https://fullcalendar.io/docs/react): `@fullcalendar/react` MIT cho core + 3 plugin daygrid/timegrid/interaction. Premium chỉ Resource Timeline + Vertical Resource (NOT cần Plan G-O2). Drag-resize event = MIT `@fullcalendar/interaction`. Bundle ~150-200KB gz (bundlephobia 403). **Alternative**: NamGroup `PhongHopPage.tsx:10-12` S50 hotfix CHỐT custom day-grid HTML NO lib install reason "saves install friction + bundle minimal" — 1 file ~600 LOC month-view custom grid 5-6 rows × 7 cols Sun-Sat. `react-big-calendar` MIT clean alternative nhưng semi-deprecated. **T3 Schema Mig 36 propose 3 entity** (KHÔNG 2): `MeetingRoom` (Id Guid, Code unique nvarchar(20), Name nvarchar(200), Capacity int, Location nvarchar(200), Equipment nvarchar(500)?, IsActive bit, IsDeleted, audit) + `MeetingBooking` (Id, RoomId FK Restrict, BookedByUserId FK Restrict, StartAt datetime2, EndAt datetime2, Title nvarchar(200), Description nvarchar(1000)?, Status enum int Confirmed=1/Cancelled=2/Completed=3, Note nvarchar(500)?, audit) + **`MeetingBookingAttendees` join** (BookingId FK Cascade, UserId FK Restrict, PK composite (BookingId, UserId), Notes nvarchar(200)?). **Attendees mode JOIN TABLE** (NOT JSON) reason: (a) notification push query indexed efficient, (b) FE picker multi-select shadcn reuse Users API, (c) audit "ai từ chối" future ready. **Overlap check** SERIALIZABLE tx + `EXISTS WHERE RoomId=@r AND Status=1 AND StartAt < @newEnd AND EndAt > @newStart AND Id != @currentId` → 409 Conflict. **Recommend index** `IX_MeetingBookings_RoomId_StartAt` composite range query. **Surprises**: (a) NamGroup s47 Plan 9.2 V1 reuse dựa 798 row prod data NOT scratch — SOL có lợi thế clean-room không legacy. (b) NamGroup community ưu tiên bundle size hơn dev velocity (custom HTML grid thay FullCalendar) — em main weigh trade-off ~150KB cost vs drag-drop UX. (c) `TblBookingResource` NO Title index — SOL must add IX. **Recommend forward**: (1) Mig 36 design 3 entity clean-room per propose; (2) FullCalendar v6 MIT fe-admin (manager view drag-drop) + custom day-grid HTML fe-user (book simple) — split UX 2 app per convention; (3) Skill `ef-core-migration` attach Implementer. Token cost ~10K.
|
||||
60
.claude/agent-memory/test-specialist/MEMORY.md
Normal file
60
.claude/agent-memory/test-specialist/MEMORY.md
Normal file
@ -0,0 +1,60 @@
|
||||
# Test-Specialist Agent — Persistent Memory
|
||||
|
||||
> **Persistent diary cross-session.** Auto-injected first 200 lines / 25KB at spawn.
|
||||
> Update BEFORE every stop. Curate when > 25KB. Keep entry ≤ 1.5K chars (gotcha #53).
|
||||
> **NEW agent S39 (2026-05-29)** — dedicated test layer (tách khỏi implementer Case 3).
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Role baseline
|
||||
|
||||
WRITE specialist độc quyền `tests/**`. xUnit + FluentAssertions 7.2 + EF SQLite TestApplicationDbContext + IdentityFixture. Tools: Read, Edit, Write, Bash, Grep, Glob + 5 RAG. Skills: `contract-workflow` + `permission-matrix`.
|
||||
|
||||
## 🚫 Split boundary
|
||||
- ✅ MINE: `tests/SolutionErp.{Domain,Infrastructure}.Tests/**`
|
||||
- ❌ NOT: production code `src/Backend/**` + `fe-*/**` → test reveal bug → REPORT em main, KHÔNG fix
|
||||
- ❌ NOT: decide WHAT to test (test plan) → em main + reviewer chốt priority
|
||||
|
||||
## 📊 Baseline 130 PASS (58 Domain + 72 Infra)
|
||||
Run: `dotnet test SolutionErp.slnx --nologo --verbosity minimal`
|
||||
|
||||
## ⏱️ Timing rules (docs/rules.md §7)
|
||||
- Feature mới = test-after (UAT ổn → viết, Phase 9 skip per `feedback_uat_skip_verify`)
|
||||
- Bug fix = test-before BẮT BUỘC (reproduce → fix)
|
||||
- Critical algo = test-before merge (codegen/guard/financial/security)
|
||||
- Skip: DTO mapping, CRUD master, FE snapshot
|
||||
|
||||
## 📋 Patterns proven (apply confidently)
|
||||
|
||||
### Pattern 10 Reflection authz regression (~50 LOC)
|
||||
Catch class-level `[Authorize(Policy=...)]` regression: `typeof(Ctrl).GetCustomAttribute<AuthorizeAttribute>().Policy.Should().Be(...)`. KHÔNG WebApplicationFactory heavy. Cho gotcha #44 silent 403.
|
||||
|
||||
### Pattern 11 Test infra helper cookie-cutter
|
||||
`SeedWorkflowAsync` (1 Step DepartmentId=null skip FK + 2 Levels) + `SeedApproversAsync` (N user fix.CreateUserAsync). Reusable PE/Contract/Proposal workflow test.
|
||||
|
||||
### Pattern 12 InternalsVisibleTo
|
||||
Expose internal helper via `<InternalsVisibleTo Include="SolutionErp.Infrastructure.Tests" />` csproj.
|
||||
|
||||
### Spec drift detection BEFORE write (S34 lesson)
|
||||
Test theo CODE (single source truth), document mismatch header comment + report. Vd soft-delete UNIQUE: code chặn opt-out → test theo code, flag drift.
|
||||
|
||||
### gotcha #48 SQLite tie-break
|
||||
`OrderByDescending(CreatedAt).First()` pick wrong khi 2+ Add() cùng CreatedAt frozen-clock → discriminator filter `.Where(Summary.Contains("Chuyển phase"))` BEFORE OrderBy.
|
||||
|
||||
## 🎯 Coverage gap backlog (priority — Reviewer flagged S36)
|
||||
1. **CRITICAL:** HrmConfig 16 endpoint (S35) — Holiday composite UNIQUE (Year,Date) Update 0 test
|
||||
2. **MAJOR:** EmployeeSatellite 15 endpoint (S34) — cascade + FK invariant 0 test
|
||||
3. **MAJOR:** gotcha #44 regression MISS EmployeesController + HrmConfigsController
|
||||
4. Phase 10.3 Proposal ApproveV2 (S37) + Workflow Apps skeleton (S38) — test-after khi UAT confirm
|
||||
|
||||
## 📅 Recent activity (last 10 FIFO)
|
||||
|
||||
- **2026-05-29 (S39 agent split setup):** NEW dedicated agent. Seeded test patterns (10 reflection authz + 11 infra helper + 12 InternalsVisibleTo + #48 SQLite tie-break + spec drift S34). Inherited coverage gap backlog 4 priority items từ S36 Reviewer audit (130 PASS baseline). First spawn pending em main S39+ test bundle task (recommend Gap 1 Holiday composite UNIQUE first).
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Anti-patterns (DO NOT)
|
||||
1. ❌ Touch production code → REPORT bug · 2. ❌ Skip MEMORY · 3. ❌ Test không chạy (dotnet test must PASS) · 4. ❌ `git add -A` · 5. ❌ Push remote · 6. ❌ Assertion trivial
|
||||
|
||||
## 🔄 Curate trigger
|
||||
Size > 25KB → archive. Commit scope (em main commits): `Tests`.
|
||||
Reference in New Issue
Block a user