skills/DataFlow-Comparator-Context/SKILL.md
# SKILL: data-flow-comparator ## Purpose (Mục đích) Kiểm tra tính toàn vẹn luồng dữ liệu (Data Flow Integrity) trước khi triển khai module Comparator thực sự. Khi dữ liệu từ Builder ra bị biến dạng (như lỗi swimlane vừa phát hiện), Comparator sẽ chấm điểm sai hoàn toàn. Skill này định nghĩa cách xác minh rằng pipeline Parser→Builder đang chạy chính xác trước khi so sánh 2 Graph. ## Use When - Vừa sửa xong `IModelBuilder` và cần kiểm tra output chưa bị méo mó trước khi code Matcher/Comparator.
npx skillsauth add nguyen-agn/uml_comparator skills/DataFlow-Comparator-ContextInstall 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.
Kiểm tra tính toàn vẹn luồng dữ liệu (Data Flow Integrity) trước khi triển khai module Comparator thực sự. Khi dữ liệu từ Builder ra bị biến dạng (như lỗi swimlane vừa phát hiện), Comparator sẽ chấm điểm sai hoàn toàn. Skill này định nghĩa cách xác minh rằng pipeline Parser→Builder đang chạy chính xác trước khi so sánh 2 Graph.
IModelBuilder và cần kiểm tra output chưa bị méo mó trước khi code Matcher/Comparator.*domain.UMLGraph (đã Build từ file đáp án mẫu)*domain.UMLGraph (đã Build từ bài sinh viên)Edge.SourceID và Edge.TargetID phải tồn tại trong danh sách graph.Nodes của chính graph đóUMLNode.Name phải không rỗng (nếu rỗng = bug ở Builder)UMLNode.Type phải thuộc tập hợp hợp lệ: ["Class", "Interface", "Actor"]ValidateGraph(*domain.UMLGraph) trên cả 2 graph.[DATA_INTEGRITY_ERROR] và dừng pipeline.Nếu luồng dữ liệu bị biến dạng (data corruption) ở tầng Builder → Comparator dùng data đó sẽ sinh ra kết quả sai lệch 100%. Luôn chạy validate trước khi so sánh.
umlClass style) → Node bị nhận sai Type → Cần fallback detection.scheme/uml_graph.md: Bảng RelationType hợp lệ và bất biến của UMLGraphSkills/Builder-AI-Context/recorrect.md: Log lỗi swimlane đã phát hiện và sửa 2026-03-20development
# 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
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.
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.