Session 16 (2026-05-08) docs/skill/memory wrap-up: STATUS.md: - Last updated Session 16 (2 commit Chunk A+B) - Phase summary count (20→21 mig, 96→77 test, 57→55 bảng) - Recently Done row Session 16 chi tiết (drastic refactor hoàn tất) - Phase enum simplified semantic post-Mig 21 HANDOFF.md: - TL;DR Session 16 prepend với 2 chunk + Chunk C SKIP rationale - Per-chunk implementation chi tiết (Domain + Mig 21 + Service + Tests + FE Designer) - 8 cảnh báo Session 17+: UAT live test / old data migration / Sample seed / Budget N-stage / schema-diagram / skill refresh / tests flat / Hard blockers Ops migration-todos.md: Phase 9 + Session 16 block 2 chunk done + 7 defer task Session log NEW `2026-05-08-0500-drastic-refactor-flat-workflow.md`: - Bối cảnh resume từ S15 defer - Spec implementation (Phase enum, state machine, schema Mig 21) - Per-chunk Chunk A + Chunk B detail - Chunk C skip rationale - Memory `feedback_drastic_refactor_scope` validation: scope estimate 30% accurate (3h actual vs 10h conservative) - Plan organization sau S16 Skill ef-core-migration: - description + heading: 20→21 migration - + Mig 21 row "RefactorWorkflowToFlatModel" với detail (4 ALTER + 2 ALTER + DROP TABLE × 2 + DROP COLUMN × 2 + restore simple unique × 2) - Total 57→55 bảng (-2 InnerStep tables) - Tests: 96→77 (drop 19 legacy) CLAUDE.md root: - Migration count 20→21 - DB tables 57→55 - Workflow flat description thay N-stage description docs/rules.md §7: 96→77 test (Mig 21 simplified) Memory `project_solution_erp.md`: - Add "Tổng sau session 16" block với drastic refactor details 🎉 Session 16 wrap-up. Cumulative since session start (S15 wrap-up `38d10b7`): 4 commit (S15 wrap-up was final S15) + 3 commit Session 16 (A `dbb0089` + B `88a5be1` + D current). Defer Session 17+ priority: 1. UAT live test workflow flat (3 phòng × N cấp realistic) 2. Old PE/HĐ legacy phase data migration 3. Sample data seed (Task 2 carry-over) 4. Hard blockers Ops Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Skill Library — SOLUTION_ERP
Skill này là tài liệu chuyên biệt để Claude (và developer khác) dùng khi cần deep-dive 1 domain area. Claude tự động invoke qua Skill tool dựa trên semantic matching với description trong từng SKILL.md.
Skills hiện có
Domain skills (logic nghiệp vụ)
| Skill | Mục đích | Trigger ví dụ | Trạng thái |
|---|---|---|---|
contract-workflow |
State machine 9 phase + versioned workflow per ContractType + role × phase guard + SLA + auto-gen mã HĐ RG-001 | "approve contract", "chuyển phase", "versioned workflow", "HĐ cũ giữ cũ" | ✅ Tier 3 + Phase 6 cross-ref PE workflow |
form-engine |
Render template docx/xlsx + FieldSpec JSON + DynamicForm + PDF export LibreOffice | "export contract as word", "điền form", "render template", "PDF export" | ✅ Active |
permission-matrix |
Role × MenuKey × CRUD + seed + 3-layer resolution + inherit Contracts/Workflows/PurchaseEvaluations | "permission denied", "gán role", "menu không hiện", "inherit permission" | ✅ Active (Phase 6 +Pe_/PeWf_) |
Ops/infra skills (devops + security + schema)
| 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 |
ef-core-migration |
Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, 16 migration history (Init → AddTwoStageDeptApprovalAndSmartReject) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated Phase 9 (Mig 16) |
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
Mỗi skill là 1 folder với ít nhất SKILL.md + optional examples/ + references/:
.claude/skills/<skill-name>/
├── SKILL.md ← Entry point: description, when-to-use, workflow
├── examples/ ← Code snippets mẫu (optional)
│ └── *.cs | *.tsx
└── references/ ← Link đến file code thật, docs (optional)
Frontmatter SKILL.md (BẮT BUỘC when-to-use để skill auto-trigger):
---
name: skill-name-kebab-case
description: 1-3 câu mô tả skill làm gì + stack specificity (để embedding match chính xác)
when-to-use:
- "trigger phrase 1"
- "trigger phrase 2"
- "keyword tiếng Việt"
---
# Skill Name
## Context
...
## Workflow / Commands
...
## Pitfalls
...
## Code pointers
- `path/to/file.cs`
Tạo skill mới — checklist
- Tạo folder
.claude/skills/<kebab-case-name>/ - Viết
SKILL.mdvới frontmatter + sections: Context / Workflow / Code pointers / Common pitfalls - Add row vào bảng "Skills hiện có" phía trên
- Update
docs/CLAUDE.md(dòng skill count) - Commit
[CLAUDE] Skill: add <name>
Nguyên tắc design skill
PROJECT-SPECIFIC, không clone generic:
- Skill user-level global đã có sẵn (
code-reviewer,sql-database-assistant,focused-fix, ...) - Skill project-level phải encode kiến thức SOLUTION_ERP-only mà generic không có:
- Commit convention
[CLAUDE] <scope>: ... - Path pattern
src/Backend/SolutionErp.*/... - Pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0, TypeScript 6 erasableSyntaxOnly)
- Gotcha-referenced (dẫn chiếu
docs/gotchas.md#N) - Workflow Vietnamese-first
- Commit convention
Keep it actionable:
- Commands copy-pastable (không pseudocode)
- Paths đầy đủ (không
src/...) - Version pinned (không "latest")
- Dẫn chiếu gotcha/migration # cụ thể
Related
docs/CLAUDE.md— quick rules + full stack contextdocs/gotchas.md— 41 bẫy đã gặpdocs/changelog/migration-todos.md— roadmap 5 phase + Tier 3