Files
solution-erp/.claude/skills
pqhuy1987 6e7a6db4e8 [CLAUDE] Docs+Skill: chốt Session S10-11+++++++ wrap-up — PE Workspace UX overhaul
Tổng hợp 23 commit từ `b7a153e` (post Session 9+) → `4c0625c` (last) thành
1 wrap-up entry. KHÔNG cắt narrative cũ — thêm 1 row đầu STATUS + 1 TL;DR
prepend HANDOFF + 1 block migration-todos + 1 session log mới (rule §6.5).

Files:
  ~ docs/STATUS.md
    - Last updated S10-11+++++++ wrap-up + Phase summary 16→17 mig + 5 display
      status + 8→9 phase enum (TraLai)
    + Recently Done: 1 row tổng hợp 11 batch deliverable (B1-B11) với commit
      SHA range, narrative đầy đủ context per §6.5 KEEP rule
  ~ docs/HANDOFF.md
    - Last updated + TL;DR Session S10-11+++++++ prepend với 11 batch summary
    + Stats table cumulative (BE LOC +450, Mig 17, FE pages 31→32, +5 component
      mới, +1 phase TraLai, +5 display status, 23 commit)
    + 7 cảnh báo Session 12+ (TraLai workflow transition pending, multi-phase
      filter, opinion sign Duyệt mode, UAT skip-verify exception, Workspace
      vs Danh sách vs Duyệt matrix, Mig 17 backward compat, CI deploy status)
  ~ docs/changelog/migration-todos.md
    + Session S10-11+++++++ done block với 11 task tick + commit SHA references
    + 3 defer task cho Session 12+ (TraLai workflow, multi-phase filter, opinion sign)
  + docs/changelog/sessions/2026-05-07-2359-pe-workspace-ux-overhaul.md
    Session log đầy đủ (11 batch chi tiết + bug log + docs updates checklist
    + stats cumulative + Plan organization hierarchy)
  ~ .claude/skills/ef-core-migration/SKILL.md
    - "16 migration" → "17 migration" header
    + Row 17 `AddManualBudgetFieldsToPeAndContract` table entry
    - Total: 55 bảng giữ nguyên (+4 cột không thêm bảng) + note clarification
    ~ Phase 7 pending PaymentTermFields cập nhật note (Workspace UI đã thay
      Select preset, BE schema giữ nvarchar(max), defer migration tách field)

Defer cho cron audit 2026-06-01:
  - contract-workflow/SKILL.md TraLai phase note (chờ wire workflow xong)
  - schema-diagram.md §15 Mig 17 +4 columns (small, không drift major)
  - gotchas count update (KHÔNG add vì TS strict CI fail là process issue,
    addressed via memory rule, không phải code-bug pattern)

Memory updated trước đó (commit không có vì memory ở ngoài repo):
  - feedback_uat_skip_verify.md: thêm exception "rename/remove → BẮT BUỘC
    npm run build" + lesson hotfix CI 0ae3fe2

Verify: `dotnet test` 83 pass · git log clean · branch up-to-date sau push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 16:24:53 +07:00
..

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

  1. Tạo folder .claude/skills/<kebab-case-name>/
  2. Viết SKILL.md với frontmatter + sections: Context / Workflow / Code pointers / Common pitfalls
  3. Add row vào bảng "Skills hiện có" phía trên
  4. Update docs/CLAUDE.md (dòng skill count)
  5. 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

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ể
  • docs/CLAUDE.md — quick rules + full stack context
  • docs/gotchas.md — 41 bẫy đã gặp
  • docs/changelog/migration-todos.md — roadmap 5 phase + Tier 3