|
|
ae30f8f5e2
|
[CLAUDE] Docs: S44 monthly drift audit + AI_INFRA bundle 06-01 adopt
Cadence audit (2026-06-01), docs-only -> CI-skip. investigator-codebase
drift scan (ground-truth from disk) -> em main patch. No code touched,
154 test unchanged.
Drift fixes (42 count corrections): 40->42 mig, 84/59/55/47->91 tables,
130/111->154 test, 52/49->56 gotcha across CLAUDE.md, docs/CLAUDE.md,
ef-core-migration + dependency-audit skills, schema-diagram, database-guide.
schema-diagram migration table extended Mig 17-42; ef-core history Mig 27-42;
detailed-section gap (Mig 27-42 modules) flagged explicit (deferred, not silent).
AI_INFRA bundle 06-01 (federated, full scope):
- A: RAG T1/T2 auto-ack
- C: hygiene 7/7 agent-mem L1 <=16KB; "25KB"->"~30KB tiered" wording x7
- D: #4 self-sustaining adoption-report step -> /session-end Phase 6.3
- E/F: report + ledger -> docs/governance/
Carry-over .mcp.json + BROADCAST-05-29 left untouched (concurrency rule).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-01 12:39:56 +07:00 |
|
|
|
098baa6da6
|
[CLAUDE] Docs: Chunk G — K8 Plan K wrap S23 t1: docs + session log + Designer comment cleanup + 3 agent MEMORY drift
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m30s
Plan K Mig 31 F2 refactor sang per-Approver-slot DONE — 8 commits cumulative
S23 t1 (`56868bf..<this>`). K8 wrap docs + dirty MEMORY.md commit:
Docs updates:
- docs/STATUS.md: Last updated S23 t1 entry với Plan K summary 8 chunk
- docs/HANDOFF.md: TL;DR S23 t1 đầy đủ (top) — multi-agent ROI evidence
- docs/database/schema-diagram.md §14: title Mig 22-31 (was 22-29) + add
Mig 30 F4 + Mig 31 F2 blocks per slot Approver + DROP Users column note
- NEW docs/changelog/sessions/2026-05-14-s23-turn1-plan-k-mig31-f2-refactor.md
session log đầy đủ 8 chunk timeline + multi-agent spawn cost table + pattern
reinforced 3×
FE Admin Designer comment cleanup (Reviewer K2 follow-up):
- ApprovalWorkflowsV2Page.tsx lines 73-75 + 502-504: 2 stale narratives "F2
AllowDrafterSkipToFinal xuống per User (User Management)" rewrite Mig 29+30+31
cumulative narrative "7 Allow* ALL xuống per Level slot, pattern proven 3×"
3 agent MEMORY.md drift commit (dirty từ session start S23 + S22 chốt):
- Investigator: K0 pre-flight findings + 5 surprises catch
- Reviewer: K2 PASS report + new pattern "transient sentinel zombie" anti-pattern
- CICD Monitor: S22 chốt verify cumulative (Run #193 + S23 t1 pending K9 spawn)
User-level memory updates (cross-project diary persisted ngoài repo):
- feedback_per_nv_permission_scope.md: reinforcement S23 t1 — Pattern 3×
cumulative (Mig 29 + Mig 30 + Mig 31). Pattern ALSO applies cho refactor existing
scope, KHÔNG chỉ greenfield. Cross-ref discoveries Plan K (compile-break workaround,
stale narrative drift, transient sentinel zombie anti-pattern caught Reviewer).
- MEMORY.md index: cumulative reinforcement note 3× Mig 31
Verify:
- dotnet build production projects clean
- npm run build fe-admin pass 17.76s, 0 TS err
- Test 104/104 PASS (S23 t1 K7 chunk maintained baseline)
Plan K state final: 31 mig · 59 tables · ~145 endpoints · 104 test · 47 gotcha
· 20 memory · 6 skills · 4 sub-agents active. CHƯA push remote — chờ bro confirm
K9 spawn CICD Monitor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-14 23:48:41 +07:00 |
|
|
|
c0af9e05ec
|
[CLAUDE] Docs: S21 t5 Chunk D — chốt refactor Allow* per-NV (Mig 29)
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m18s
Update docs theo rule §6.5 KEEP narrative:
- `docs/database/schema-diagram.md §14` title "Mig 22-29, S17-21":
- Update ApprovalWorkflows block: note Mig 28 cũ 6 column DROP, refactor per-NV
- Add 5 column Allow* trong ApprovalWorkflowLevels block (inline comment F1+F3)
- Add Users block với F2 AllowDrafterSkipToFinal Mig 29
- `docs/STATUS.md` Last updated S21 t5 + count 28→29 mig. UAT defer test count
unchanged 84.
- `docs/HANDOFF.md` Insert TL;DR S21 t5 đầy đủ (trước S21 t4):
- Trigger UAT feedback "cấu hình cho từng người"
- Q&A 2 lượt chốt scope
- 4 chunk narrative: A BE+Mig 29 + Service refactor → B FE Admin Designer
per-Level → C FE eOffice rename → D Docs
- Pattern reusable: EF migration reorder cho BACKFILL preserve data,
per-NV scope split theo role (Approver Level vs Drafter User)
- State table + Pending User Mgmt F2 UI defer
- NEW session log `docs/changelog/sessions/2026-05-13-1400-s21-turn5-refactor-allow-to-per-nv.md`:
- Code snippets BE/FE refactor
- 5 lessons learned (incl EF reorder pattern + backward compat backfill discipline)
- References file paths
Stats cumulative S21 t5:
- 29 mig (+1 Mig 29 refactor) · 59 tables · ~143 endpoints · 34 FE pages
- 84 test pass (UAT defer test-after §7) · 45 gotcha · 17 memory · 6 skills
- 4 commits S21 t5 cumulative ready push remote
Pending: bro confirm push `eea86fd..HEAD` 4 commits ahead.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-13 20:12:21 +07:00 |
|
|
|
eea86fdfe7
|
[CLAUDE] Docs: Chunk E — chốt Session 21 turn 4 F1+F2+F3 PE Workflow advanced options (Mig 28)
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m31s
Update docs theo rule §6.5 KEEP narrative:
- `docs/database/schema-diagram.md §14` title "Mig 22-28, S17-21" + thêm 6
column Allow* inline trong Core ApprovalWorkflows block (inline comment
F1/F2/F3 mapping). Bonus: 3 bảng (Steps + Levels) unchanged.
- `docs/STATUS.md` Last updated S21 t4 + count 27→28 mig (Mig 28 advanced
options 6 column). UAT defer test count unchanged 84 (test-after-uat candidate
bundle Plan C carry).
- `docs/HANDOFF.md` Insert TL;DR S21 t4 đầy đủ (trước S21 t3):
- Q&A clarify 2 lượt chốt scope (F1 cả 2 mode admin, F1 Assignee runtime,
F2 chỉ Cấp cuối, F3 Section 2 only, F2+F3 admin tick, F3 mọi approver
active, test-after UAT)
- 5 chunk narrative đầy đủ A schema → B BE → C FE Admin → D FE eOffice → E Docs
- Pattern reusable: backward-compat option flags, boundary helper extension
- State table cumulative + pending Plan C test-after catch-up
- NEW session log `docs/changelog/sessions/2026-05-13-1200-s21-turn4-pe-workflow-advanced-options.md`:
- Trigger + Q&A 2 lượt
- 5 chunk narrative chi tiết với code snippets
- Pattern reusable 5 lessons learned
- References file paths + spec context
Stats cumulative S21 t4:
- 28 mig (+1) · 59 tables · ~143 endpoints (+1) · 34 FE pages · 84 test pass
(UAT defer test-after §7) · 45 gotcha unchanged · 17 memory · 6 skills
- 5 commits S21 t4 cumulative ready push remote
Pending: bro confirm push `0a3b747..HEAD` 8 commits ahead (S21 t3 + S21 t4).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-13 19:11:14 +07:00 |
|
|
|
7710d4345c
|
[CLAUDE] Docs+Skill: Session 19 consolidate — schema-diagram §15 + skill refresh
User chốt Session 19 toàn bộ: update các MD chưa làm ở Chunk D Docs
trước (theo §6.5 không cố sửa khi không cần — nhưng schema mới fundamental
+ skill drift quá lệch → đáng update ngay).
- docs/database/schema-diagram.md — thêm §15 PE Level Opinions V2 (Mig 26):
bối cảnh decision (5 câu Q&A user chốt), schema bảng + constraint design
rationale (UNIQUE composite, FK Cascade Pe + Restrict Level, denorm
SignedByFullName), Service hook pattern (ApproveV2Async UPSERT), so sánh
anti-pattern Mig 15 cũ (endpoint POST/opinions rời) vs Mig 26 (Service
hook auto sync khi Duyệt). Pattern reusable cho derived state khác.
§16 cũ "Liên quan" đổi thành §16 (renumber).
- .claude/skills/ef-core-migration/SKILL.md — frontmatter "21 migration"
→ "26 migration" + table history thêm Mig 22 ApprovalWorkflowsV2 / Mig
23 PE.ApprovalWorkflowId / Mig 24 CurrentApprovalLevelOrder / Mig 25
IsUserSelectable / Mig 26 PeLevelOpinionsForV2. Total bảng 55→59. Code
pointers + Related cross-ref §15 mới.
- .claude/skills/README.md — count "16 migration" → "26 migration" + "41
bẫy" → "44 bẫy" (drift cumulative S16-S19 patch).
Path filter `.claude/skills/**` + `docs/**` → CI skip deploy (gotcha #41).
Verify: dotnet test 81 pass (no regression).
Memory home dir KHÔNG commit (ở C:\Users\pqhuy\.claude\): add entry mới
`feedback_service_hook_vs_endpoint.md` + MEMORY.md index +1 row (15
entries total).
|
2026-05-09 21:40:34 +07:00 |
|
|
|
daad79d282
|
[CLAUDE] Docs: chốt Session 18 wrap-up — PE V2 polish + Clone B + Mig 25 IsUserSelectable + 4 bug fix UAT
Session 18 (16:56 → 19:45, 7 commit `aaa1c6c` → `32a8d4d`):
- B1 Pe Duyệt filter cứng "Đã gửi duyệt"
- B2 HistoryTab filter Trả lại / Gửi lại
- B3 Clone V2 cho B (DuyetNccPhuongAn) — audit reuse pattern
- B4 Fix silent 403 ApprovalWorkflowsV2Controller
- B5 Fix sidebar highlight queryMatches transient keys
- B6 Mig 25 IsUserSelectable + Designer pin toggle + bỏ "(clone)" + Workspace filter
- B7 Cleanup orphan zip files
Updates:
- STATUS — header 24→25 mig + 43→44 gotcha + 1 row Recently Done top + session log link
- HANDOFF — TL;DR S18 đầy đủ + cảnh báo S19+ (giữ S17 narrative §6.5)
- CLAUDE.md root — count 25 mig + Mig 25 description block
- schema-diagram §14 — heading 22→25 + cột IsUserSelectable + filter logic section + Pending S19+ Mig 26/27
- gotchas — +#44 silent 403 + checklist debug 21
- migration-todos — Phase 9 S18 done section
- session log mới đầy đủ E2E narrative
Stats: 25 mig, 58 tables, ~141 endpoints, 81 test pass (no change), 44 gotcha, 14 memory entries, 6 skill, 7 commit S18.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-08 19:56:42 +07:00 |
|
|
|
8680f4c849
|
[CLAUDE] Docs: Session 17 wrap-up — PE Workflow V2 end-to-end consolidation
User chốt MD wrap-up Session 17 (13 commit từ c847dc0 → de0f38d) — PE
Workflow V2 schema + Service wire + UX iteration đầy đủ.
MD updates:
- STATUS.md — header counts (24 mig, 58 tables, 81 test, 43 gotcha) +
Recently Done row consolidate Session 17 wrap-up (gộp 4 row iter cũ
thành 1 row tổng, không cắt narrative quan trọng)
- HANDOFF.md — TL;DR Session 17 + Chunk E (Designer iter + State
machine + Service wire + UX) + Pending Session 18+
- CLAUDE.md — count (22→24 mig, 77→81 test) + V2 schema overview
- changelog/migration-todos.md — section ✅ Session 17 done với 7 task
ticked + Defer Session 18+ explicit
- database/schema-diagram.md — §14 ApprovalWorkflow V2 schema (3 bảng
+ 2 column PE + state transitions + Service branch + Designer
constraints + match approver V2 vs V1 table)
- gotchas.md — +#42 Dual schema branch + #43 Step.Order ≠ index 0-based
- skill contract-workflow — +section "Phase 9+ done Mig 22-24" với V2
spec + Service branch + match logic table + Designer constraints +
UX V2-aware + Defer Session 18+
- changelog/sessions/2026-05-08-1100-pe-workflow-v2-end-to-end.md (NEW)
— full session log với 13 commit timeline + stats + gotchas + pending
Memory:
- project_solution_erp.md — entry Session 17 wrap-up đầy đủ (KHÔNG tạo
file feedback mới — decisions specific cho project, không reusable
cross-project per §9.5 anti-pattern)
Verify:
- 81 test pass (58 Domain + 23 Infra) — không thay đổi sau wrap-up
- 0 BE error
- 2 FE builds OK (đã verify ở các commit trước)
- Quy tắc consolidate §6.5: KHÔNG cắt narrative, chỉ phân tầng + remove
duplicate. Session 17 row dài cố ý — cover full 13 commit context cho
Session 18+ đọc lại.
|
2026-05-08 16:40:49 +07:00 |
|
|
|
d206e14550
|
[CLAUDE] Docs+Skill: chốt session 8 ending — patch count drift + skill refresh
Session 8 ending workflow theo template (kết thúc lúc ~13:00).
Patch drift count post Migration 16:
- docs/architecture.md §1: "(dbo schema, 19 bảng)" → 55 bảng
(drift cũ session 6 chưa fix, giờ fix luôn)
- docs/database/schema-diagram.md §8 Migration history: thêm row 16
AddTwoStageDeptApprovalAndSmartReject + Tổng 52 → 55 bảng
- .claude/skills/ef-core-migration/SKILL.md: 15→16 migration history,
52→55 tables, description + code pointers + related links
- .claude/skills/README.md: ef-core-migration row "13 migration" → 16,
gotchas count "32 bẫy" → 41 (drift cũ chưa fix)
Memory entry mới (cross-session pattern):
- feedback_per_chunk_commit.md: rule per-chunk commit cho big-feature
(>500 LOC, multi-layer). Bài học S8 — 5 commit A-B-C-D-E thay vì
1 monolithic. MEMORY.md index +1 entry (6 total).
Skip (intentional, theo §6.5 KHÔNG cố sửa):
- docs/gotchas.md: KHÔNG có gotcha mới đáng note (S8 dùng pattern
đã proven, không có bug pitfall mới)
- docs/database/database-guide.md: KHÔNG có migration table chi tiết,
chỉ conventions. Skip.
- contract-workflow + permission-matrix skills: KHÔNG touch (PE module
only, contract policy chưa đổi, permission không liên quan bypass-review)
Verify:
- 77 unit test vẫn pass (54 Domain + 23 Infra)
- Build pass
Total session 8 cumulative: 6 commit (5 code A-B-C-D-E1 + 1 docs ending).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-04 13:02:22 +07:00 |
|
|
|
52999f33fa
|
[CLAUDE] Docs: chốt session 5 — Budget FE + PE feature complete + Tests Phase 1-2 + CI gate
Deploy SOLUTION_ERP / build-deploy (push) Failing after 22s
Session 5 (29/04) — 6 commit feature + 1 chốt MD này.
==== Stats sau session 5 ====
- 52 DB tables (+1 PEDeptOpinions)
- 15 migrations (+`AddPurchaseEvaluationDepartmentOpinions`)
- ~128 API endpoints (+4)
- ~31 FE pages (+5 Budget + 1 PeWorkflowsPage)
- 71 unit test pass (54 Domain + 17 Infra) — CI gate live, fail → no deploy
- ~13050 BE LOC (+1300)
- 30 demo user, 38 gotchas, 6 skill (no change)
==== MD touched ====
- STATUS.md: header Phase 8 + 6 row Recently Done session 5 + cumulative cột S5 + In Progress S6 (Hard blockers + Optional polish + Tests Phase 3-5 + Ops)
- HANDOFF.md: TL;DR 6 milestone S5 + Cảnh báo S6 (CI test gate workflow mới) + Priority 0 S6 (UAT + Ops focus) + Phase status table cập nhật
- migration-todos.md: Phase 8 done với A/B/C/D/E (FE Budget / PE-HD integration / PE WF Designer / Ý kiến 4 PB / Tests Phase 1-2) + Phase 9 active (UAT + Ops + carry over)
- architecture.md: §11 Testing strategy mới (test pyramid bottom-heavy + stack + CI gate + phased priority + quy tắc bổ sung mỗi feature)
- database/schema-diagram.md: Migration 15 row + total 52 tables + §13 PE Department Opinion (1 bảng UNIQUE PEId+Kind + Upsert behavior + SQL DDL)
- ef-core-migration SKILL: migration 15 entry + 52 tables total + Phase 8 update note
- CLAUDE.md (root): modules table + Tests row + scope `Tests` + Tests section mới + count update 15/52
- docs/CLAUDE.md: 7 module bullet + ERD 52 bảng + Roadmap Phase 8 done + Phase 9 active S6
- memory project_solution_erp.md: Phase 8 summary + Session 6 priority + workflow user mới (dotnet test → commit → push)
- session log 2026-04-29-chot-session-5-budget-fe-pe-tests.md (NEW — 10+ section detail)
==== Verify ====
- dotnet test SolutionErp.slnx → 71 pass / 2s
- git status clean sau commit này
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-29 13:50:54 +07:00 |
|
|
|
e0b4e7f096
|
[CLAUDE] Docs: chốt session 4 — Budget BE module + 14 Solutions users
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m53s
- STATUS.md: header Phase 7 + 3 row Recently Done (Budget BE / 14 users / Docs cleanup) + cumulative cột mới (51 tables / 14 mig / ~124 endpoints)
- HANDOFF.md: TL;DR session 4 (2 milestone Budget BE + 14 users) + Cảnh báo session 5 + Priority 0 (FE Budget + PE/HD integration + PE feature gap) + Credentials 30 user
- migration-todos.md: Phase 7 thêm section D Budget done + Phase 8 mới (FE Budget pages + integration) + pending migrations Budget
- architecture.md: §10 Budget module mới (ERD + state machine + auto-recompute + integration roadmap)
- database/schema-diagram.md: migration history rows 13+14 + §12 Budget ERD chi tiết
- ef-core-migration SKILL: migration 14 entry + Phase 8 pending Budget refinement
- CLAUDE.md root + docs: modules table thêm Budget row + scope Budget + count 51 bảng / 14 mig
- Session log 2026-04-28-chot-session-4-budget.md (10+ section detailed)
Stats: 51 tables (+4 Budget), 14 migrations (+AddBudgets), ~124 endpoints (+11 Budget),
30 demo user (16 sample + 14 Solutions thật), 38 gotchas, ~340 LOC Budget CQRS.
FE Budget pages chưa làm — Priority 0 session 5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-28 12:36:31 +07:00 |
|
|
|
aaf03be8d7
|
[CLAUDE] Docs: chốt Phase 6 — Module Duyệt NCC E2E
Update 5 file:
- STATUS.md: phase hiện tại + recently done 4 entry + cumulative stats
(46 tables, ~110 endpoints, 12 migrations, ~26 FE pages)
- HANDOFF.md: TL;DR + thêm row "Module Duyệt NCC E2E" ✅
- changelog/migration-todos.md: thêm Phase 6 section với checklist
done/optional (PE Workflow admin UI + Attachments + Auto-map
Details skip MVP)
- database/schema-diagram.md: Migration 12 row + section 11 "PurchaseEvaluation
module" full (10 bảng + state machine + kế thừa HĐ flow)
- changelog/sessions/2026-04-23-2300-purchase-evaluations.md: session
log đầy đủ (user input + design + 4 commit + stats + skip MVP notes)
|
2026-04-23 17:01:53 +07:00 |
|
|
|
ff5e35f279
|
[CLAUDE] Docs: chốt session 2026-04-23 chiều — toolkit + 4-bảng + master + roles VN
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m47s
11 commit feature work (b75448e → ae59cfe) → docs sync.
## STATUS.md
- Last updated 2026-04-23 16:00
- Phase header: Tier 3 + 4-bảng + master catalogs + roles VN
- 7 Recently Done row mới (3-panel layout, 4-bảng overhaul, Thao tác
2-panel, Mã HĐ gen Create, master catalogs, roles VN demo users)
- Cumulative table thêm cột "+Toolkit/Catalogs/Roles" (DB 36, endpoints
~80, migrations 11, commits ~47)
- Session log link mới
- Skill list count = 13 file
## HANDOFF.md
- TL;DR cập nhật: 36 tables, 80 endpoints, 11 migrations
- Phase table thêm 5 row Done (3-panel, 4-bảng, mã HĐ, master, roles)
- Git state 18 commit gần nhất
- Credentials block thêm 13 demo user (User@123456) — warn rotate trước UAT
## migration-todos.md
Section "Session 2026-04-23 (chiều)" với 14 ticked checkbox + commit refs.
## schema-diagram.md
- Header: 24 → 36 bảng
- Migration table thêm row 9-11 (highlighted)
- Section 8bis mới: chi tiết 7 Details + ContractChangelogs + 4 Catalogs +
Role.ShortName + User.DepartmentId/Position
## Session log mới
`docs/changelog/sessions/2026-04-23-1500-toolkit-data-roles.md` (~270
dòng) — outcome A→I, stats cumulative, 6 architectural decisions, next
session priority.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 14:39:48 +07:00 |
|
|
|
fbca83264c
|
[CLAUDE] Docs: chốt session Tier 3 feature-complete + versioned workflow
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m33s
- Session log 2026-04-22-0300 (A→K): attachment, SignalR, form builder,
PDF, dynamic + versioned workflow, nested menu, 3-panel permissions,
seed master, brand identity, content polish, Gitea fix
- STATUS: Tier 3 feature-complete snapshot + cumulative stats (24 tables,
~50 endpoints, 8 migrations); next-up = UAT + Email SMTP (blocked) +
rotate creds + SQL backup schedule
- HANDOFF: rewrite brief cho session mới — phase 5 prod done, Tier 3
đóng gói, quick sanity-check 2 app, versioned workflow quick ref,
file active hiện trạng, git state
- migration-todos: tick Tier 3 items (attachment/realtime/form builder/
PDF/dynamic+versioned workflow/nested menu) + thêm iter-3 versioned
workflow section + post-launch list
- schema-diagram: +5 table (Notifications, WorkflowTypeAssignments,
WorkflowDefinitions, WorkflowSteps, WorkflowStepApprovers); indexes
mới, cardinality FK restrict cho pinned policy, truy vấn tiêu biểu
- workflow-contract: +section 7bis resolution order, 7ter admin
designer flow, updated data model + code pointers Tier 3
- PROJECT-MAP: module map post-Tier-3 (3 box mới Notification/
Attachment/Branding + Infra/DevOps box), API namespace đầy đủ,
architectural wins 5 điểm
- contract-workflow skill: versioned workflow section, policy
resolution code snippet, admin designer flow, code pointers Tier 3,
tier 4+ backlog
- gotchas +7 bẫy mới (#26-32): SignalR WebSocket headers, interceptor
2-phase pattern, LibreOffice mirror 404, PS 5.1 UTF-16 GITHUB_PATH,
PS 5.1 diacritics parse, Dialog size TS, NavLink end query-params
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-22 10:25:02 +07:00 |
|
|
|
fe7ad8e4a3
|
[CLAUDE] Phase4: Report MVP + Docs Consolidation (rules, architecture, schema-diagram)
Backend Report:
- Application/Reports/Dtos/DashboardStatsDto: 5 KPI + PhaseCount + SupplierCount + ProjectCount + MonthlyValue
- Application/Reports/Queries/GetDashboardStats handler: total/active/overdue/published this month/totalValueActive + byPhase + top 5 NCC/du an + 12 thang monthly (fill zero khi thang empty)
- Application/Reports/Services/IContractExcelExporter interface
- Infrastructure/Reports/ContractExcelExporter: ClosedXML workbook 10 cot, header style bold+blue, number format #,##0, formula SUM, auto-fit, freeze header
- Application/Reports/Commands/ExportContractsToExcelCommand: filter phase/supplier/project/date range
- Api/Controllers/ReportsController: GET /reports/dashboard, GET /reports/contracts/export
- DI register IContractExcelExporter (Scoped)
Frontend fe-admin:
- types/reports.ts: DashboardStats type
- components/BarChart.tsx: generic horizontal bar chart — chi Tailwind, khong thu vien ngoai
- pages/DashboardPage.tsx REWRITE: 5 KPI card (FileText/TrendingUp/AlertTriangle/CheckCircle2/Coins) + by-phase bar + monthly 12-month chart + top 5 NCC + top 5 du an + skeleton loader
- pages/ReportsPage.tsx MOI: filter phase/fromDate/toDate → export Excel button
- Route /reports vao App.tsx
E2E verified:
- GET /api/reports/dashboard → 200 voi day du KPI + monthly fill 12 thang
- GET /api/reports/contracts/export → 200 xlsx 7229 bytes (Microsoft Excel 2007+)
Docs consolidation (theo yeu cau user):
- docs/rules.md MOI: 9 section coding conventions (ngon ngu UI/code/DB/docs, BE Clean Arch, CQRS+MediatR, Validation FluentValidation, Error handling, Async, Entity rules, DI, Package pinning, FE React/TS erasableSyntaxOnly, path alias, TanStack Query, Permission guard, Toast+error, DB convention, Git commit format, Docs structure, Testing, Security)
- docs/architecture.md MOI: layered overview ASCII art, request lifecycle (1 POST/api/contracts qua 10 step), workflow state machine 9 phase, permission model, data flow sequence diagram 4 actor (Drafter/Manager/CCM/BOD/HRA), deployment architecture Phase 5, skill library, non-functional table
- docs/database/schema-diagram.md MOI: full ERD 19 table mermaid + data flow diagram + vong doi 1 HD (create → 7 transition → gen ma → publish) + index strategy table + relationship cardinality + soft delete behavior + SQL queries (inbox/dashboard/gen ma) + migration history
- docs/gotchas.md UPDATE: 17 → 26 pitfalls, them section "Claude Code harness quirks" (Edit File not read, DI build pass nhung runtime fail) + "Contract workflow" (ma HD gen 2 lan, BE-FE NEXT_PHASES sync, race condition) + "Permission matrix" (cache real-time, MenuKey typo)
- docs/STATUS.md: Phase 4 MVP done, docs entry points section liet ke het, next Phase 5 Production
- docs/HANDOFF.md: phase table them Phase 4 row, file tree update voi Reports, test points day du, git state commit 7
- docs/changelog/migration-todos.md: tick Phase 4 MVP items + them iteration 2 list
- docs/changelog/sessions/2026-04-21-1430-phase4-report.md: session log voi thong so cumulative (BE 3100 LOC, 30 docs)
- CLAUDE.md root: update Tai lieu quan trong section them rules.md, architecture.md, schema-diagram.md, .claude/skills (13 links now)
Bug fix:
- TS unused import ContractPhaseLabel trong DashboardPage
- DI thieu register IContractExcelExporter — build pass but runtime would fail (added)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-21 12:42:46 +07:00 |
|