skills/UML-TestCase-Runner/SKILL.md
Chạy test case trên các file UML draw.io để kiểm tra xem Builder + ValidateGraph có phát hiện đúng lỗi. Dùng để verify rằng pipeline xử lý UML bắt được các loại lỗi sai trong file .drawio.
npx skillsauth add nguyen-agn/uml_comparator uml-testcase-runnerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill này nhận vào một file .drawio bị lỗi có chủ đích, chạy qua pipeline
Builder → ValidateGraph, sau đó so sánh kết quả thực tế với expected
errors. Mục tiêu: đảm bảo hệ thống phát hiện đúng lỗi UML, không bị
false-negative (lỗi có mà không phát hiện) hay false-positive (báo lỗi sai).
Skill này áp dụng tư duy Verification Layer từ Strategy: "Làm sao biết thứ vừa tạo ra là đúng, dùng được, và đáng tin?"
.drawio mới vào UMLs_testcase/incorrect/ → cần verify hệ thống bắt đúng lỗi.ValidateGraph() hoặc Builder → cần chạy lại toàn bộ test incorrect để đảm bảo không có regression..drawio cần testIntegrityError.Code kỳ vọng (xem knowledge.md)ERROR (pipeline stop) hoặc WARN (có thể tiếp tục)TestCase: <filename>
✔ Got error code: <EXPECTED_CODE> [<SEVERITY>]
✔ Pipeline behavior: <STOP|CONTINUE> (correct)
--- OR ---
✘ MISSING expected code: <EXPECTED_CODE>
✘ UNEXPECTED code found: <ACTUAL_CODE>
.drawio từ UMLs_testcase/incorrect/<filename>builder.NewStandardModelBuilder().Build(rawXML)domain.ValidateGraph(graph, label)testcases.mdUMLs_testcase/incorrect/.drawio hoàn toàn rỗng (0 bytes) → Parser trả error trước khi Builder chạy<mxGraphModel> → Builder trả errorEMPTY_NODE_NAME lẫn INVALID_NODE_TYPE cùng lúc → Cả hai phải được báoknowledge.md: bảng tất cả error codes và cách triggertestcases.md: bảng test cases cụ thể + expected resultscheck.md: checklist tự verification../UMLs_testcase/incorrect/: thư mục chứa các file .drawio lỗi../../domain/validator.go: implementation của ValidateGraph()../../builder/incorrect_uml_test.go: Go test file tự độngdevelopment
# SKILL: drawio-visualizer ## Purpose Render kết quả chấm UML ra 2 loại file HTML self-contained: 1. **Grader Report** (`report_*.html`): Full side-by-side Student vs Solution, summary, deduction feedbacks — dành cho người chấm. 2. **Student Feedback** (`feedback_*.html`): Chỉ hiển thị bài làm SV với color-coded status (đúng/sai/thừa). Không lộ đáp án, không hiện deduction details — gửi cho sinh viên xem lại. ## Execution 1. Pipeline: Parse → Build → Validate → PreMatch → Match → Compare → Grad
development
# SKILL: batch-grader-reporter ## Purpose Cung cấp chức năng chấm điểm đồng loạt (Batch Grading) cho nhiều file bài làm UML (`.drawio`) của sinh viên đối chiếu với 1 file đáp án mẫu. Kết quả của tất cả các bài nộp được tổng hợp lại thành `BatchGradeResult` và chuyển đền interface `IReporter` để sinh report. ## Execution 1. Cấu trúc: - Load file solution `solution.drawio`. - Quét thư mục `student_dir` tìm các file `.drawio`. - Với mỗi file: Parse → Build → PreMatch → Match → Compare →
development
Skill để tái cấu trúc (refactor) một module bất kỳ theo chuẩn SOLID, áp dụng Interface-first và bổ sung Unit Test hoàn chỉnh.
development
# SKILL: uml-pre-matcher ## Purpose Biến đổi mô hình `domain.UMLGraph` (dạng chuỗi thô) thành `domain.ProcessedUMLGraph` (dạng cấu trúc chi tiết). Đây là bước đệm quan trọng để module Matcher có thể so khớp chính xác dựa trên thuộc tính, phương thức và trọng số kiến trúc (ArchWeight). ## Use When - Khi Builder đã tạo xong `UMLGraph`. - Khi cần phân tích sâu cấu trúc của từng Class/Interface (tách biệt Name, Scope, Type của Attribute/Method). - Khi cần tính toán trọng số thiết kế (ArchWeight)