Some checks failed
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>
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, 13 migration history (+ Phase 7 pending) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated Phase 6 iter 2 |
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— 32 bẫy đã gặpdocs/changelog/migration-todos.md— roadmap 5 phase + Tier 3